├── LICENSE ├── README.md ├── css ├── reset.css └── style.css ├── index.html ├── js ├── app.js ├── midi.js ├── synth.instrument.js ├── synth.view.html ├── ui.js └── vendor │ ├── handlebars-v3.0.3.min.js │ └── jquery-2.2.3.min.js └── logo2.svg /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 errozero 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # poly-synth 2 | Polyphonic Web Audio Synth 3 | 4 | [Demo Site](https://errozero.co.uk/stuff/poly/) 5 | 6 | ![alt text](https://www.errozero.co.uk/stuff/poly/main_image.png "WASYN-1") 7 | -------------------------------------------------------------------------------- /css/reset.css: -------------------------------------------------------------------------------- 1 | /* http://meyerweb.com/eric/tools/css/reset/ 2 | v2.0 | 20110126 3 | License: none (public domain) 4 | */ 5 | 6 | html, body, div, span, applet, object, iframe, 7 | h1, h2, h3, h4, h5, h6, p, blockquote, pre, 8 | a, abbr, acronym, address, big, cite, code, 9 | del, dfn, em, img, ins, kbd, q, s, samp, 10 | small, strike, strong, sub, sup, tt, var, 11 | b, u, i, center, 12 | dl, dt, dd, ol, ul, li, 13 | fieldset, form, label, legend, 14 | table, caption, tbody, tfoot, thead, tr, th, td, 15 | article, aside, canvas, details, embed, 16 | figure, figcaption, footer, header, hgroup, 17 | menu, nav, output, ruby, section, summary, 18 | time, mark, audio, video { 19 | margin: 0; 20 | padding: 0; 21 | border: 0; 22 | font-size: 100%; 23 | font: inherit; 24 | /*vertical-align: baseline;*/ 25 | } 26 | /* HTML5 display-role reset for older browsers */ 27 | article, aside, details, figcaption, figure, 28 | footer, header, hgroup, menu, nav, section { 29 | display: block; 30 | } 31 | body { 32 | line-height: 1; 33 | } 34 | ol, ul { 35 | list-style: none; 36 | } 37 | blockquote, q { 38 | quotes: none; 39 | } 40 | blockquote:before, blockquote:after, 41 | q:before, q:after { 42 | content: ''; 43 | content: none; 44 | } 45 | table { 46 | border-collapse: collapse; 47 | border-spacing: 0; 48 | } -------------------------------------------------------------------------------- /css/style.css: -------------------------------------------------------------------------------- 1 | body{ 2 | margin:0; 3 | padding:0; 4 | font-family:arial, sans-serif; 5 | width:100%; 6 | cursor: default; 7 | -webkit-touch-callout: none; 8 | -webkit-user-select: none; 9 | -khtml-user-select: none; 10 | -moz-user-select: none; 11 | -ms-user-select: none; 12 | user-select: none; 13 | /*background:linear-gradient(180deg, #eee 0%, #fff 100%);*/ 14 | background:linear-gradient(180deg, #000 0%, #333 100%); 15 | font-family: verdana, sans-serif; 16 | font-size:0.9vw; 17 | overflow:hidden; 18 | } 19 | 20 | .instructions{ 21 | position:absolute; 22 | bottom:5vh; 23 | left:50%; 24 | transform:translateX(-50%) scale(1); 25 | background: #5d9612; 26 | padding:0.6vw; 27 | border-radius:8px; 28 | box-shadow: 0px 4px 4px rgba(0,0,0,0.5); 29 | color:white; 30 | transition: 0.5s all; 31 | display:flex; 32 | align-items:center; 33 | } 34 | .instructions > span{ 35 | font-size:1.6vw; 36 | margin-right:0.3vw; 37 | } 38 | .instructions-hide{ 39 | opacity:0; 40 | } 41 | 42 | .instruments-container{ 43 | position: relative; 44 | width:100vw; 45 | height:100vh; 46 | overflow:hidden; 47 | display:flex; 48 | justify-content: center; 49 | align-items:center; 50 | } 51 | 52 | .keyboard{ 53 | width:20vw; 54 | } 55 | 56 | .ib{ 57 | display:inline-block; 58 | vertical-align:top; 59 | } 60 | 61 | .voice-level-meter{ 62 | width:4vw; 63 | height:8vw; 64 | background:#ccc; 65 | display:inline-block; 66 | position: relative; 67 | } 68 | .voice-level-meter > div{ 69 | background:red; 70 | width:100%; 71 | position:absolute; 72 | bottom:0; 73 | } 74 | 75 | .voice-filter-meter{ 76 | width:4vw; 77 | height:8vw; 78 | background:#ccc; 79 | display:inline-block; 80 | position: relative; 81 | } 82 | .voice-filter-meter > div{ 83 | background:#0066ff; 84 | width:100%; 85 | position:absolute; 86 | bottom:0; 87 | } 88 | 89 | .meter-container{ 90 | border-radius:1vw; 91 | padding:1vw; 92 | border:1px solid #ccc; 93 | display:inline-block; 94 | } 95 | 96 | input[type=range] { 97 | 98 | } -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | WASYN-1 : Web Audio Synth 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 |
🛈 Use keyboard to play synth
14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /js/app.js: -------------------------------------------------------------------------------- 1 | var app = { 2 | 3 | //Web audio context (Passed in to instruments) 4 | context: new (window.AudioContext || window.webkitAudioContext)(), 5 | keyboardOctave: 3, 6 | synth: null, 7 | instructionsHidden: false, 8 | 9 | //---------------------- 10 | 11 | init: function(){ 12 | //Init the main UI and create the synth 13 | ui.init(); 14 | app.createSynth(); 15 | }, 16 | 17 | //---------------------- 18 | 19 | //Create a new instrument object 20 | createSynth: function(){ 21 | 22 | app.synth = new synth({ 23 | context: this.context 24 | }); 25 | 26 | //Load the UI template for the synth 27 | $.get('js/synth.view.html', function(template){ 28 | 29 | //Get the preset names to include in the UI 30 | var presets = app.synth.presets; 31 | 32 | //Use handlebars to replace placeholders within template 33 | var instrumentTemplateData = app.synth.viewData; 34 | 35 | var instrumentTemplate = Handlebars.compile(template); 36 | var instrumentHtml = instrumentTemplate(instrumentTemplateData); 37 | 38 | $('#instruments-container').append(instrumentHtml); 39 | 40 | //Set initial visual control positions 41 | ui.updateSynthVisualControls(); 42 | 43 | }); 44 | 45 | }, 46 | 47 | //---------------------- 48 | 49 | //Receive a midi note number, return frequency 50 | midiNoteToFrequency: function(noteNumber){ 51 | var tuningFrequency = 440; 52 | var tuningNote = 69; 53 | return Math.exp ((noteNumber-tuningNote) * Math.log(2) / 12) * tuningFrequency; 54 | }, 55 | 56 | //---------------------- 57 | 58 | checkContext(){ 59 | if(this.context.state == 'suspended'){ 60 | this.context.resume(); 61 | } 62 | }, 63 | 64 | //------------------- 65 | 66 | hideInstructions: function(){ 67 | if(!app.instructionsHidden){ 68 | this.instructionsHidden = true; 69 | $('#instructions').removeClass('instructions-animate'); 70 | $('#instructions').addClass('instructions-hide'); 71 | } 72 | }, 73 | 74 | }; 75 | 76 | app.init(); -------------------------------------------------------------------------------- /js/midi.js: -------------------------------------------------------------------------------- 1 | var midi = { 2 | 3 | midiAcess:null, 4 | inputDeviceID:null, 5 | outputDeviceID:null, 6 | output:null, 7 | active: false, 8 | tempInstrument:null, 9 | 10 | connected: false, 11 | devices: {}, 12 | deviceMapping: {}, 13 | learn:false, 14 | learnSelected: { 15 | type: null, 16 | instrument: null, 17 | instrumentCount:null, 18 | controlID: null, 19 | controlType: null 20 | }, 21 | 22 | init:function(){ 23 | 24 | console.log('Starting MIDI....'); 25 | 26 | function onMIDISuccess(midiAccess) { 27 | 28 | console.log('<===---MIDI INPUTS---===>'); 29 | console.log(midiAccess.inputs); 30 | 31 | midi.connected = true; 32 | 33 | midi.midiAccess = midiAccess; 34 | 35 | var inputDeviceCount = midiAccess.inputs.size; 36 | var outputDeviceCount = midiAccess.outputs.size; 37 | 38 | //Monitor input signals 39 | var inputs = midiAccess.inputs.values(); 40 | for(var input = inputs.next(); input && !input.done; input = inputs.next()){ 41 | input.value.onmidimessage = midi.midiMessage; 42 | } 43 | 44 | } 45 | 46 | function onMIDIFailure(e) { 47 | midi.connected = false; 48 | console.log("No access to MIDI devices or your browser doesn't support WebMIDI API. Please use WebMIDIAPIShim " + e); 49 | } 50 | 51 | if(navigator.requestMIDIAccess) { 52 | navigator.requestMIDIAccess({ sysex: false }).then(onMIDISuccess, onMIDIFailure); 53 | } else { 54 | console.log("No MIDI support in your browser."); 55 | } 56 | 57 | 58 | }, 59 | 60 | 61 | midiMessage: function(message){ 62 | 63 | var deviceID = message.target.id; 64 | var data = message.data; 65 | 66 | var controlType = data[0]; 67 | var controlID = data[1]; 68 | var controlVal = data[2]; 69 | 70 | console.log(controlID); 71 | 72 | //Only continues controllers allowed 73 | if(controlType == 144){ 74 | app.checkContext(); 75 | app.hideInstructions(); 76 | app.synth.noteOn(controlID); 77 | } 78 | 79 | else if(controlType == 128){ 80 | app.synth.noteOff(controlID); 81 | } 82 | 83 | }, 84 | 85 | 86 | } 87 | 88 | midi.init(); -------------------------------------------------------------------------------- /js/synth.instrument.js: -------------------------------------------------------------------------------- 1 | var synth = function(config){ 2 | 3 | this.context = config.context; 4 | this.masterGainNode = null; 5 | this.notes = {}; 6 | this.noteVoiceLog = {}; 7 | 8 | this.polyphony = 16; 9 | this.oscsPerVoice = 2; 10 | this.lastVoice = 0; 11 | 12 | this.oscNodes = []; 13 | this.ampNodes = []; 14 | this.filterNodes = []; 15 | this.filterGainNodes = []; 16 | this.filterEnvelopeNodes = []; 17 | this.filterEnvelopeOscs = []; 18 | 19 | this.lfoNodes = []; 20 | this.lfoGainNodes = []; 21 | 22 | this.filterMaxFreq = 7200; 23 | this.filterMinFreq = 60; 24 | 25 | //Used in envelopes to help prevent clicking 26 | this.timePadding = 0.03; 27 | 28 | this.masterVolume = 0.3; 29 | 30 | //Control values 31 | this.ampEnv = { 32 | attack: 0, 33 | decay: 0, 34 | sustain: 0, 35 | release: 0, 36 | }; 37 | 38 | this.filtEnv = { 39 | attack: 0, 40 | decay: 0, 41 | sustain: 0, 42 | release: 0, 43 | }; 44 | 45 | this.filtCutoffFrequency = this.filterMinFreq; 46 | 47 | this.oscTuning = [0,0]; 48 | this.oscFineTuning = [0,0]; 49 | 50 | //Preset values for all controls 51 | this.presets = [ 52 | {name: 'Basic', value: [0, 64, 64, 0, 0, 64, 64, 0, 127, 0, 0, 64, 64, 0, 64, 64, 0, 16, 0, 0, 0, 16, 0, 0, 3] }, 53 | {name: 'Night Ride', value: [0, 64, 64, 14, 0, 64, 64, 7, 113, 32, 0, 64, 77, 0, 64, 64, 0, 16, 0, 0, 0, 16, 0, 0, 3] }, 54 | {name: 'Crystal Caves', value: [0, 64, 64, 9, 0, 0, 60, 27, 127, 0, 0, 127, 71, 1, 127, 64, 1, 16, 0, 0, 0, 53, 1, 0, 2] }, 55 | {name: 'Old VHS Tape', value: [0, 64, 64, 55, 0, 33, 10, 30, 68, 67, 0, 64, 64, 1, 65, 70, 1, 4, 7, 3, 3, 6, 1, 3, 2] }, 56 | {name: 'Sunburst Pad', value: [20, 64, 64, 52, 26, 42, 0, 52, 64, 51, 0, 64, 64, 0, 108, 69, 1, 16, 0, 0, 0, 16, 0, 0, 3] }, 57 | {name: 'Cascade Pad', value: [127, 64, 64, 70, 0, 80, 0, 102, 64, 59, 0, 108, 72, 0, 108, 65, 0, 16, 0, 0, 0, 14, 9, 1, 3] }, 58 | {name: 'Rave Sound', value: [0, 4, 0, 0, 0, 64, 64, 5, 88, 0, 0, 108, 63, 0, 113, 64, 0, 16, 0, 0, 0, 16, 0, 0, 3] }, 59 | {name: 'Fatalogue', value: [0, 64, 64, 14, 4, 18, 0, 12, 49, 61, 0, 18, 83, 0, 19, 64, 0, 16, 0, 0, 0, 16, 0, 0, 3] }, 60 | {name: 'Hazy Morning', value: [0, 64, 64, 18, 0, 113, 72, 127, 56, 99, 0, 64, 65, 0, 108, 69, 1, 5, 14, 3, 3, 27, 1, 3, 0] }, 61 | {name: 'Wub One', value: [0, 52, 66, 3, 25, 94, 87, 0, 76, 127, 0, 0, 61, 1, 18, 80, 0, 0, 0, 2, 3, 18, 127, 3, 3] }, 62 | {name: 'Freeze Ray FX', value: [6, 64, 64, 17, 22, 63, 63, 17, 127, 53, 0, 127, 127, 0, 127, 64, 1, 16, 63, 0, 0, 101, 6, 3, 2] }, 63 | ]; 64 | 65 | this.currentPreset = 1; 66 | 67 | this.controls = [ 68 | {id: 0, label: 'Amplitude Attack', type: 'knob', value: 0}, 69 | {id: 1, label: 'Amplitude Decay', type: 'knob', value: 0}, 70 | {id: 2, label: 'Amplitude Sustain', type: 'knob', value: 0}, 71 | {id: 3, label: 'Amplitude Release', type: 'knob', value: 0}, 72 | 73 | {id: 4, label: 'Filter Attack', type: 'knob', value: 0}, 74 | {id: 5, label: 'Filter Decay', type: 'knob', value: 0}, 75 | {id: 6, label: 'Filter Sustain', type: 'knob', value: 0}, 76 | {id: 7, label: 'Filter Release', type: 'knob', value: 0}, 77 | 78 | {id: 8, label: 'Filter Cutoff', type: 'knob', value: 0}, 79 | {id: 9, label: 'Filter Resonance', type: 'knob', value: 0}, 80 | {id: 10, label: 'Filter Type LP', type: 'radio', value: 0}, 81 | 82 | {id: 11, label: 'Oscillator 1 CRS', type: 'knob', value: 0}, 83 | {id: 12, label: 'Oscillator 1 Fine', type: 'knob', value: 0}, 84 | {id: 13, label: 'Oscillator 1 Type', type: 'radio', value: 0}, 85 | {id: 14, label: 'Oscillator 2 CRS', type: 'knob', value: 0}, 86 | {id: 15, label: 'Oscillator 2 Fine', type: 'knob', value: 0}, 87 | {id: 16, label: 'Oscillator 2 Type', type: 'radio', value: 0}, 88 | 89 | {id: 17, label: 'LFO 1 Rate', type: 'knob', value: 0}, 90 | {id: 18, label: 'LFO 1 Amount', type: 'knob', value: 0}, 91 | {id: 19, label: 'LFO 1 Shape', type: 'radio', value: 0}, 92 | {id: 20, label: 'LFO 1 Target', type: 'radio', value: 0}, 93 | 94 | {id: 21, label: 'LFO 2 Rate', type: 'knob', value: 0}, 95 | {id: 22, label: 'LFO 2 Amount', type: 'knob', value: 0}, 96 | {id: 23, label: 'LFO 2 Shape', type: 'radio', value: 0}, 97 | {id: 24, label: 'LFO 2 Target', type: 'radio', value: 0}, 98 | 99 | ]; 100 | 101 | //Data to include in the synths ui - passed in with handlebars 102 | this.viewData = { 103 | presets: this.presets, 104 | oscillators: [ 105 | {id: 1, tuneControlID: 11, fineTuneControlID: 12, typeControlID: 13}, 106 | {id: 2, tuneControlID: 14, fineTuneControlID: 15, typeControlID: 16} 107 | ], 108 | lfos: [ 109 | {id: 1, rateControlID: 17, amountControlID: 18, shapeControlID: 19, targetControlID: 20 }, 110 | {id: 2, rateControlID: 21, amountControlID: 22, shapeControlID: 23, targetControlID: 24 }, 111 | ] 112 | }; 113 | 114 | this.init(); 115 | 116 | }; 117 | 118 | synth.prototype = { 119 | 120 | init: function(){ 121 | 122 | this.createNodes(); 123 | this.connectNodes(); 124 | 125 | //Load default preset 126 | this.loadPreset(this.currentPreset); 127 | 128 | }, 129 | 130 | //------- 131 | 132 | createNodes: function(){ 133 | 134 | var self = this; 135 | 136 | //Loop through the voices count (polyphony) and create oscillator, filter and gain nodes 137 | for(var i=0; i this.polyphony-1){ 443 | voice = 0; 444 | } 445 | 446 | for(var i=0; i this.polyphony-1){ 455 | voice = 0; 456 | } 457 | } 458 | 459 | } 460 | 461 | return voice; 462 | }, 463 | 464 | //------- 465 | 466 | noteOn: function(noteNumber, velocity){ 467 | 468 | //Get frequency of midi note and note start time 469 | var frequency = app.midiNoteToFrequency(noteNumber); 470 | 471 | //Select a voice to use 472 | var currentVoice = this.getVoice(); 473 | this.lastVoice = currentVoice; 474 | 475 | //Keep a log of which voice this note is using (This can then be used on noteOff) 476 | this.noteVoiceLog[noteNumber] = currentVoice; 477 | 478 | //Set frequency of the oscillators for this voice 479 | var oscNode; 480 | for(var i=0; i 2 | .synth{ 3 | 4 | width:64vw; 5 | height:31.6vw; 6 | background: 7 | linear-gradient(90deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.1) 2%, rgba(200, 200, 200, 0.1) 50%, rgba(0,0,0,0.1) 99%, rgba(0,0,0,0.15) 100%), 8 | linear-gradient(#aaa 0%, #fff 1%, #fff 80%, #fff 99%, #bbb 100%); 9 | border-radius:6px; 10 | box-shadow:rgba(0,0,0,0.1) 2px -10px 10px; 11 | padding:1vw; 12 | box-sizing:border-box; 13 | position:relative; 14 | } 15 | 16 | .synth .knob-outer{ 17 | position:relative; 18 | width:4.0vw; 19 | height:4.0vw; 20 | border-radius:50%; 21 | /*background:linear-gradient(#b5b5b5,#F9F8F7);*/ 22 | background:linear-gradient(#aeb0b1, #f9fbfb); 23 | top:0.2vw; 24 | } 25 | 26 | .synth .knob-inner{ 27 | position:absolute; 28 | left:0.4vw; 29 | top:0.4vw; 30 | bottom:0.4vw; 31 | right:0.4vw; 32 | border-radius:50%; 33 | /*background:linear-gradient(90deg,#dde4e8, #dde4e8 10%, #c7cfd3 20%, #7e858a 30%, #82898f 31%, #edf1fc 32%, #edf1fc 34%, #edf1fc 66%, #82898f 67%, #7e858a 68%, #c7cfd3 75%, #dde4e8 80%);*/ 34 | background:linear-gradient(90deg,#dde4e8, #dde4e8 10%, #c7cfd3 25%, #edf1fc 31%, #edf1fc 69%, #c7cfd3 75%, #dde4e8 90%); 35 | /*background:linear-gradient(90deg,#dde4e8, #dde4e8 10%, #c7cfd3 20%, #c7cfd3 75%, #dde4e8 80%);*/ 36 | backface-visibility:hidden; 37 | box-shadow: 0px 0px .18vw .12vw rgba(0,0,0,0.80); 38 | 39 | will-change:transform; 40 | } 41 | 42 | .synth .knob-inner:before { 43 | display:block; 44 | content:""; 45 | width:6%; 46 | height:1.2vw; 47 | background:#0d4566; 48 | /*margin:0 auto;*/ 49 | left:46%; 50 | position:absolute; 51 | opacity:.8; 52 | box-shadow:0 .25vw .1vw rgba(0,0,0,0.4) inset; 53 | } 54 | 55 | .synth .control-section{ 56 | background:rgba(0,0,0,0.05); 57 | margin:0.1vw; 58 | border:0.1vw solid #bbb; 59 | border-radius:8px; 60 | width:30%; 61 | } 62 | 63 | .synth .control-section > div { 64 | display:flex; 65 | justify-content:space-between; 66 | padding:0.5vw; 67 | } 68 | 69 | .synth .control-section > h4 { 70 | background:#333; 71 | color:#fff; 72 | padding:0.2vw; 73 | text-align:center; 74 | } 75 | 76 | .synth .meter-container{ 77 | display:none; 78 | } 79 | 80 | .synth .btn-enabled{ 81 | background:#0088CC; 82 | color:white; 83 | } 84 | 85 | .synth .preset-container{ 86 | position:relative; 87 | height:100%; 88 | overflow-y:auto; 89 | background:linear-gradient(#8094af 0%, #c7eaff 30%, #c7eaff 60%, #adcbe7 70%, #a1bcd7 80%, #748ca4 100% ); 90 | border:0.2vw solid #333; 91 | padding:0; 92 | box-shadow:0 0px 20px 0px rgba(0,0,0,0.3); 93 | height:14vw; 94 | } 95 | 96 | .synth .preset-container li{ 97 | list-style: none; 98 | border-bottom:1px solid #305581; 99 | padding:0.2vw 0.5vw; 100 | text-align:center; 101 | } 102 | 103 | .synth .preset-selected{ 104 | background:#305581; 105 | color:#DDEEFF; 106 | } 107 | 108 | .synth .presets-outer{ 109 | position:absolute; 110 | left:50%; 111 | top:1vw; 112 | width:30%; 113 | transform: translateX(-50%); 114 | box-sizing:border-box; 115 | padding:1vw; 116 | border:1px solid white; 117 | } 118 | 119 | .synth .control-section-right{ 120 | position:absolute; 121 | right:1vw; 122 | top:1vw; 123 | width:20vw; 124 | } 125 | 126 | .synth .lfo1{ 127 | position:absolute; 128 | right:1vw; 129 | top:1vw; 130 | } 131 | 132 | .synth .lfo2{ 133 | position:absolute; 134 | right:1vw; 135 | top:11.5vw; 136 | } 137 | 138 | .synth .control-bottom{ 139 | position:absolute; 140 | bottom:1vw; 141 | width:30%; 142 | } 143 | 144 | .synth .bottom-1{ 145 | left:1vw; 146 | } 147 | 148 | .synth .bottom-2{ 149 | right:1vw; 150 | } 151 | 152 | .synth .bottom-3{ 153 | left:50%; 154 | transform:translateX(-50%); 155 | 156 | } 157 | 158 | .synth .title{ 159 | position:absolute; 160 | font-size:2.8vw; 161 | font-weight:bold; 162 | color:#b71342; 163 | left:50%; 164 | bottom:30%; 165 | transform:translateX(-50%); 166 | width:16vw; 167 | } 168 | 169 | .synth button{ 170 | font-size:0.8vw; 171 | border:0; 172 | background:#fff; 173 | padding:0.2vw 0.2vw; 174 | border-radius:2px; 175 | background:linear-gradient(to bottom, #fff, #edf1fc 4%, #edf1fc 96%, #82898f 100%); 176 | box-shadow:0 0.1vw 0.15vw 0.1vw rgba(0,0,0,0.1); 177 | border:1px solid rgba(0,0,0,0.2); 178 | cursor:pointer; 179 | } 180 | 181 | .synth .lfo-container .target-container{ 182 | 183 | } 184 | 185 | .synth .lfo-container .target-btn{ 186 | padding:0.2vw 0.0vw; 187 | width:47%; 188 | margin-right:0.2vw; 189 | margin-top:0.2vw; 190 | } 191 | 192 | 193 | 194 | 195 |
196 | 197 | 198 | 199 |
200 | 201 |
202 | {{#each oscillators}} 203 |
204 |

Oscillator {{this.id}}

205 |
206 |
207 |
208 |
209 |
210 |
211 |
212 |
213 |
214 |
215 | 216 |
217 | 218 |
219 | 220 | 221 | 222 | 223 |
224 |
225 |

226 | {{/each}} 227 |
228 | 229 |
230 |

Amp Envelope

231 |
232 |
233 |
234 |
235 |
236 |
237 |
238 |
239 |
240 |
241 |
242 |
243 |
244 |
245 |
246 |
247 |
248 |
249 |
250 | 251 |
252 |

Filter Envelope

253 |
254 |
255 |
256 |
257 |
258 |
259 |
260 |
261 |
262 |
263 |
264 |
265 |
266 |
267 |
268 |
269 |
270 |
271 |
272 | 273 |
274 |

Filter

275 |
276 |
277 |
278 |
279 |
280 |
281 |
282 |
283 |
284 |
285 |
286 | 287 |
288 |

Preset

289 |
    290 | {{#each presets}} 291 |
  • {{this.name}}
  • 292 | {{/each}} 293 |
294 |
295 | 296 | 297 | 298 | {{#each lfos}} 299 |
300 |

LFO {{this.id}}

301 |
302 |
303 |
304 |
305 |
306 |
307 |
308 |
309 |
310 |
311 |
312 |
313 | 317 |
318 |
319 |
320 |
321 | 322 |
323 | 324 | 325 | 326 | 327 |
328 |
329 | 330 |
331 | {{/each}} 332 | 333 |
334 | 335 |
-------------------------------------------------------------------------------- /js/ui.js: -------------------------------------------------------------------------------- 1 | var ui = { 2 | 3 | //Keep track of which keys are pressed (stops re-triggering) 4 | keysDown: [], 5 | mousePos: {}, 6 | mouseDown: false, 7 | lastControlID: null, 8 | dragStart: null, 9 | 10 | //------------------- 11 | 12 | init: function(){ 13 | this.eventListeners(); 14 | this.handlebarsHelpers(); 15 | }, 16 | 17 | //------------------- 18 | 19 | eventListeners: function(){ 20 | 21 | var self = this; 22 | 23 | $(document) 24 | 25 | .mousedown(function(){ 26 | self.mouseDown = true; 27 | }) 28 | .mouseup(function(){ 29 | self.mouseDown = false; 30 | self.lastControlID = null; 31 | self.dragStart = null; 32 | }) 33 | //Mouse move 34 | .mousemove(function(e){ 35 | self.mousePos = {x: e.pageX, y: e.pageY}; 36 | if(ui.lastControlID == null) return; 37 | //Set knob pos 38 | var vPos = e.clientY; 39 | self.setKnobPos(vPos); 40 | }) 41 | 42 | .keydown(function(e){ 43 | self.keyDown(e); 44 | }) 45 | .keyup(function(e){ 46 | self.keyUp(e); 47 | }) 48 | 49 | .on('mousedown', '.js-control-knob', function(e){ 50 | var controlID = $(this).data('control-id'); 51 | self.lastControlID = controlID; 52 | self.dragStart = e.clientY; 53 | }) 54 | 55 | //Adjust instrument control 56 | /* 57 | .on('input', '.js-control-knob', function(){ 58 | 59 | var controlID = $(this).data('control-id'); 60 | var value = $(this).val(); 61 | 62 | //Convert percent value to midi value 63 | var midiValue = Math.round((127 / 100) * value); 64 | 65 | //Pass the control id and midi value to the instrument 66 | app.synth.setControlValue(controlID, midiValue); 67 | 68 | }) 69 | */ 70 | 71 | .on('mousedown', '.js-control-radio-button', function(){ 72 | console.log('radio click'); 73 | var controlID = $(this).data('control-id'); 74 | var value = $(this).data('value'); 75 | app.synth.setControlValue(controlID, value); 76 | ui.updateSynthVisualControls(); 77 | }) 78 | 79 | .on('mousedown', '.js-preset-select', function(){ 80 | var presetID = $(this).data('preset-id'); 81 | app.synth.loadPreset(presetID); 82 | ui.updateSynthVisualControls(); 83 | //ui.highlightPreset(presetID); 84 | }) 85 | ; 86 | 87 | }, 88 | 89 | //------------- 90 | 91 | highlightPreset: function(presetID){ 92 | $('.preset-selected').removeClass('preset-selected'); 93 | $('.js-preset-select[data-preset-id="' + presetID + '"]').addClass('preset-selected'); 94 | }, 95 | 96 | //------------- 97 | 98 | handlebarsHelpers: function(){ 99 | 100 | /* 101 | Handlebars.registerHelper('simpleLoop', function(n, block) { 102 | var accum = ''; 103 | for(var i = 0; i < n; ++i) 104 | accum += block.fn(i); 105 | return accum; 106 | }); 107 | 108 | Handlebars.registerHelper('isEqual', function(a, b, opts){ 109 | if(a===b){ 110 | return opts.fn(this); 111 | } else{ 112 | return opts.inverse(this); 113 | } 114 | }); 115 | */ 116 | 117 | }, 118 | 119 | //------------------- 120 | 121 | //Capture all press events 122 | keyDown: function(e){ 123 | //e.preventDefault(); 124 | 125 | var keyCode = e.which; 126 | if(this.keysDown[keyCode]){ 127 | return; 128 | } 129 | 130 | var midiNote = this.keyCodeToMidiNote(keyCode); 131 | 132 | app.checkContext(); 133 | app.hideInstructions(); 134 | 135 | if(midiNote){ 136 | this.keysDown[keyCode] = midiNote; 137 | app.synth.noteOn(midiNote, 127); 138 | } 139 | 140 | }, 141 | 142 | //------------------- 143 | 144 | keyUp: function(e){ 145 | var keyCode = e.which; 146 | if(this.keysDown[keyCode]){ 147 | var midiNote = this.keysDown[keyCode]; 148 | app.synth.noteOff(midiNote); 149 | this.keysDown[keyCode] = false; 150 | } 151 | }, 152 | 153 | //------------------- 154 | 155 | keyCodeToMidiNote: function(keyCode){ 156 | 157 | var mappings = { 158 | 90: 0, 159 | 83: 1, 160 | 88: 2, 161 | 68: 3, 162 | 67: 4, 163 | 86: 5, 164 | 71: 6, 165 | 66: 7, 166 | 72: 8, 167 | 78: 9, 168 | 74: 10, 169 | 77: 11, 170 | //Next octave 171 | 81: 12, 172 | 50: 13, 173 | 87: 14, 174 | 51: 15, 175 | 69: 16, 176 | 82: 17, 177 | 53: 18, 178 | 84: 19, 179 | 54: 20, 180 | 89: 21, 181 | 55: 22, 182 | 85: 23, 183 | //Next octave 184 | 73: 24, 185 | 57: 25, 186 | 79: 26, 187 | 48: 27, 188 | 80: 28, 189 | 219: 29, 190 | 187: 30, 191 | 221: 31, 192 | 222: 32 193 | }; 194 | 195 | if(mappings[keyCode] !== undefined){ 196 | var midiNote = mappings[keyCode] + (app.keyboardOctave*12); 197 | return midiNote; 198 | } else { 199 | return false; 200 | } 201 | 202 | }, 203 | 204 | //---------------------- 205 | 206 | setKnobPos: function(vPos){ 207 | 208 | //Limit min and max vals 209 | function limitVal(newVal){ 210 | if(newVal < 0){ 211 | newVal = 0; 212 | } else if(newVal > 127){ 213 | newVal = 127; 214 | } 215 | 216 | return newVal; 217 | } 218 | 219 | var pointer = {y: vPos}; 220 | 221 | //Set the drag start pos 222 | if(!ui.mouseDown){ 223 | ui.dragStart = pointer.y; 224 | ui.mouseDown = true; 225 | } 226 | ui.dragNew = pointer.y; 227 | 228 | //Difference between dragStart and dragNew 229 | var moveAmount = ui.dragNew - ui.dragStart; 230 | 231 | //Invert the value 232 | if(moveAmount < 0){ 233 | moveAmount = Math.abs(moveAmount); 234 | } else if(moveAmount > 0){ 235 | moveAmount = -Math.abs(moveAmount); 236 | } 237 | 238 | var currentKnobID = ui.lastControlID, 239 | currentVal; 240 | 241 | currentVal = app.synth.controls[currentKnobID].value; 242 | var newVal = limitVal(currentVal + moveAmount); 243 | app.synth.setControlValue(currentKnobID, newVal); 244 | ui.setKnobRotation(currentKnobID, newVal); 245 | 246 | //Update dragstart 247 | ui.dragStart = ui.dragNew; 248 | 249 | return; 250 | }, 251 | 252 | //---------------------- 253 | 254 | setKnobRotation: function(controlID, value){ 255 | 256 | var valPercent = Math.round( (value / 127) * 100 ); 257 | 258 | var rotAngle = (270 / 100) * valPercent - 135; 259 | var css = { transition: 'transform 0s', transform: 'rotate(' + rotAngle + 'deg)' }; 260 | var element = $('.js-control-knob[data-control-id="' + controlID + '"]'); 261 | 262 | if(element){ 263 | element.css(css); 264 | } 265 | 266 | }, 267 | 268 | //---------------------- 269 | 270 | updateSynthVisualControls: function(){ 271 | var controls = app.synth.controls; 272 | var presetID = app.synth.currentPreset; 273 | for(var i in controls){ 274 | 275 | if(controls[i].type == 'knob'){ 276 | this.setKnobRotation(i, controls[i].value); 277 | } 278 | else if(controls[i].type == 'radio'){ 279 | $('.js-control-radio-button[data-control-id="' + i + '"]').removeClass('btn-enabled'); 280 | $('.js-control-radio-button[data-control-id="' + i + '"][data-value="' + controls[i].value + '"]').addClass('btn-enabled');; 281 | } 282 | 283 | } 284 | 285 | this.highlightPreset(presetID); 286 | 287 | }, 288 | 289 | }; -------------------------------------------------------------------------------- /js/vendor/handlebars-v3.0.3.min.js: -------------------------------------------------------------------------------- 1 | !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):"object"==typeof exports?exports.Handlebars=e():t.Handlebars=e()}(this,function(){return function(t){function e(i){if(s[i])return s[i].exports;var r=s[i]={exports:{},id:i,loaded:!1};return t[i].call(r.exports,r,r.exports,e),r.loaded=!0,r.exports}var s={};return e.m=t,e.c=s,e.p="",e(0)}([function(t,e,s){"use strict";function i(){var t=v();return t.compile=function(e,s){return l.compile(e,s,t)},t.precompile=function(e,s){return l.precompile(e,s,t)},t.AST=h["default"],t.Compiler=l.Compiler,t.JavaScriptCompiler=u["default"],t.Parser=c.parser,t.parse=c.parse,t}var r=s(8)["default"];e.__esModule=!0;var n=s(1),a=r(n),o=s(2),h=r(o),c=s(3),l=s(4),p=s(5),u=r(p),f=s(6),d=r(f),m=s(7),g=r(m),v=a["default"].create,y=i();y.create=i,g["default"](y),y.Visitor=d["default"],y["default"]=y,e["default"]=y,t.exports=e["default"]},function(t,e,s){"use strict";function i(){var t=new o.HandlebarsEnvironment;return f.extend(t,o),t.SafeString=c["default"],t.Exception=p["default"],t.Utils=f,t.escapeExpression=f.escapeExpression,t.VM=m,t.template=function(e){return m.template(e,t)},t}var r=s(9)["default"],n=s(8)["default"];e.__esModule=!0;var a=s(10),o=r(a),h=s(11),c=n(h),l=s(12),p=n(l),u=s(13),f=r(u),d=s(14),m=r(d),g=s(7),v=n(g),y=i();y.create=i,v["default"](y),y["default"]=y,e["default"]=y,t.exports=e["default"]},function(t,e,s){"use strict";e.__esModule=!0;var i={Program:function(t,e,s,i){this.loc=i,this.type="Program",this.body=t,this.blockParams=e,this.strip=s},MustacheStatement:function(t,e,s,i,r,n){this.loc=n,this.type="MustacheStatement",this.path=t,this.params=e||[],this.hash=s,this.escaped=i,this.strip=r},BlockStatement:function(t,e,s,i,r,n,a,o,h){this.loc=h,this.type="BlockStatement",this.path=t,this.params=e||[],this.hash=s,this.program=i,this.inverse=r,this.openStrip=n,this.inverseStrip=a,this.closeStrip=o},PartialStatement:function(t,e,s,i,r){this.loc=r,this.type="PartialStatement",this.name=t,this.params=e||[],this.hash=s,this.indent="",this.strip=i},ContentStatement:function(t,e){this.loc=e,this.type="ContentStatement",this.original=this.value=t},CommentStatement:function(t,e,s){this.loc=s,this.type="CommentStatement",this.value=t,this.strip=e},SubExpression:function(t,e,s,i){this.loc=i,this.type="SubExpression",this.path=t,this.params=e||[],this.hash=s},PathExpression:function(t,e,s,i,r){this.loc=r,this.type="PathExpression",this.data=t,this.original=i,this.parts=s,this.depth=e},StringLiteral:function(t,e){this.loc=e,this.type="StringLiteral",this.original=this.value=t},NumberLiteral:function(t,e){this.loc=e,this.type="NumberLiteral",this.original=this.value=Number(t)},BooleanLiteral:function(t,e){this.loc=e,this.type="BooleanLiteral",this.original=this.value="true"===t},UndefinedLiteral:function(t){this.loc=t,this.type="UndefinedLiteral",this.original=this.value=void 0},NullLiteral:function(t){this.loc=t,this.type="NullLiteral",this.original=this.value=null},Hash:function(t,e){this.loc=e,this.type="Hash",this.pairs=t},HashPair:function(t,e,s){this.loc=s,this.type="HashPair",this.key=t,this.value=e},helpers:{helperExpression:function(t){return!("SubExpression"!==t.type&&!t.params.length&&!t.hash)},scopedId:function(t){return/^\.|this\b/.test(t.original)},simpleId:function(t){return 1===t.parts.length&&!i.helpers.scopedId(t)&&!t.depth}}};e["default"]=i,t.exports=e["default"]},function(t,e,s){"use strict";function i(t,e){if("Program"===t.type)return t;o["default"].yy=m,m.locInfo=function(t){return new m.SourceLocation(e&&e.srcName,t)};var s=new p["default"];return s.accept(o["default"].parse(t))}var r=s(8)["default"],n=s(9)["default"];e.__esModule=!0,e.parse=i;var a=s(15),o=r(a),h=s(2),c=r(h),l=s(16),p=r(l),u=s(17),f=n(u),d=s(13);e.parser=o["default"];var m={};d.extend(m,f,c["default"])},function(t,e,s){"use strict";function i(){}function r(t,e,s){if(null==t||"string"!=typeof t&&"Program"!==t.type)throw new l["default"]("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+t);e=e||{},"data"in e||(e.data=!0),e.compat&&(e.useDepths=!0);var i=s.parse(t,e),r=(new s.Compiler).compile(i,e);return(new s.JavaScriptCompiler).compile(r,e)}function n(t,e,s){function i(){var e=s.parse(t,n),i=(new s.Compiler).compile(e,n),r=(new s.JavaScriptCompiler).compile(i,n,void 0,!0);return s.template(r)}function r(t,e){return a||(a=i()),a.call(this,t,e)}var n=void 0===arguments[1]?{}:arguments[1];if(null==t||"string"!=typeof t&&"Program"!==t.type)throw new l["default"]("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+t);"data"in n||(n.data=!0),n.compat&&(n.useDepths=!0);var a=void 0;return r._setup=function(t){return a||(a=i()),a._setup(t)},r._child=function(t,e,s,r){return a||(a=i()),a._child(t,e,s,r)},r}function a(t,e){if(t===e)return!0;if(p.isArray(t)&&p.isArray(e)&&t.length===e.length){for(var s=0;ss;s++){var i=this.opcodes[s],r=t.opcodes[s];if(i.opcode!==r.opcode||!a(i.args,r.args))return!1}e=this.children.length;for(var s=0;e>s;s++)if(!this.children[s].equals(t.children[s]))return!1;return!0},guid:0,compile:function(t,e){this.sourceNode=[],this.opcodes=[],this.children=[],this.options=e,this.stringParams=e.stringParams,this.trackIds=e.trackIds,e.blockParams=e.blockParams||[];var s=e.knownHelpers;if(e.knownHelpers={helperMissing:!0,blockHelperMissing:!0,each:!0,"if":!0,unless:!0,"with":!0,log:!0,lookup:!0},s)for(var i in s)i in s&&(e.knownHelpers[i]=s[i]);return this.accept(t)},compileProgram:function(t){var e=new this.compiler,s=e.compile(t,this.options),i=this.guid++;return this.usePartial=this.usePartial||s.usePartial,this.children[i]=s,this.useDepths=this.useDepths||s.useDepths,i},accept:function(t){this.sourceNode.unshift(t);var e=this[t.type](t);return this.sourceNode.shift(),e},Program:function(t){this.options.blockParams.unshift(t.blockParams);for(var e=t.body,s=e.length,i=0;s>i;i++)this.accept(e[i]);return this.options.blockParams.shift(),this.isSimple=1===s,this.blockParams=t.blockParams?t.blockParams.length:0,this},BlockStatement:function(t){o(t);var e=t.program,s=t.inverse;e=e&&this.compileProgram(e),s=s&&this.compileProgram(s);var i=this.classifySexpr(t);"helper"===i?this.helperSexpr(t,e,s):"simple"===i?(this.simpleSexpr(t),this.opcode("pushProgram",e),this.opcode("pushProgram",s),this.opcode("emptyHash"),this.opcode("blockValue",t.path.original)):(this.ambiguousSexpr(t,e,s),this.opcode("pushProgram",e),this.opcode("pushProgram",s),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},PartialStatement:function(t){this.usePartial=!0;var e=t.params;if(e.length>1)throw new l["default"]("Unsupported number of partial arguments: "+e.length,t);e.length||e.push({type:"PathExpression",parts:[],depth:0});var s=t.name.original,i="SubExpression"===t.name.type;i&&this.accept(t.name),this.setupFullMustacheParams(t,void 0,void 0,!0);var r=t.indent||"";this.options.preventIndent&&r&&(this.opcode("appendContent",r),r=""),this.opcode("invokePartial",i,s,r),this.opcode("append")},MustacheStatement:function(t){this.SubExpression(t),t.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},ContentStatement:function(t){t.value&&this.opcode("appendContent",t.value)},CommentStatement:function(){},SubExpression:function(t){o(t);var e=this.classifySexpr(t);"simple"===e?this.simpleSexpr(t):"helper"===e?this.helperSexpr(t):this.ambiguousSexpr(t)},ambiguousSexpr:function(t,e,s){var i=t.path,r=i.parts[0],n=null!=e||null!=s;this.opcode("getContext",i.depth),this.opcode("pushProgram",e),this.opcode("pushProgram",s),this.accept(i),this.opcode("invokeAmbiguous",r,n)},simpleSexpr:function(t){this.accept(t.path),this.opcode("resolvePossibleLambda")},helperSexpr:function(t,e,s){var i=this.setupFullMustacheParams(t,e,s),r=t.path,n=r.parts[0];if(this.options.knownHelpers[n])this.opcode("invokeKnownHelper",i.length,n);else{if(this.options.knownHelpersOnly)throw new l["default"]("You specified knownHelpersOnly, but used the unknown helper "+n,t);r.falsy=!0,this.accept(r),this.opcode("invokeHelper",i.length,r.original,f["default"].helpers.simpleId(r))}},PathExpression:function(t){this.addDepth(t.depth),this.opcode("getContext",t.depth);var e=t.parts[0],s=f["default"].helpers.scopedId(t),i=!t.depth&&!s&&this.blockParamIndex(e);i?this.opcode("lookupBlockParam",i,t.parts):e?t.data?(this.options.data=!0,this.opcode("lookupData",t.depth,t.parts)):this.opcode("lookupOnContext",t.parts,t.falsy,s):this.opcode("pushContext")},StringLiteral:function(t){this.opcode("pushString",t.value)},NumberLiteral:function(t){this.opcode("pushLiteral",t.value)},BooleanLiteral:function(t){this.opcode("pushLiteral",t.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(t){var e=t.pairs,s=0,i=e.length;for(this.opcode("pushHash");i>s;s++)this.pushParam(e[s].value);for(;s--;)this.opcode("assignToHash",e[s].key);this.opcode("popHash")},opcode:function(t){this.opcodes.push({opcode:t,args:d.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(t){t&&(this.useDepths=!0)},classifySexpr:function(t){var e=f["default"].helpers.simpleId(t.path),s=e&&!!this.blockParamIndex(t.path.parts[0]),i=!s&&f["default"].helpers.helperExpression(t),r=!s&&(i||e);if(r&&!i){var n=t.path.parts[0],a=this.options;a.knownHelpers[n]?i=!0:a.knownHelpersOnly&&(r=!1)}return i?"helper":r?"ambiguous":"simple"},pushParams:function(t){for(var e=0,s=t.length;s>e;e++)this.pushParam(t[e])},pushParam:function(t){var e=null!=t.value?t.value:t.original||"";if(this.stringParams)e.replace&&(e=e.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")),t.depth&&this.addDepth(t.depth),this.opcode("getContext",t.depth||0),this.opcode("pushStringParam",e,t.type),"SubExpression"===t.type&&this.accept(t);else{if(this.trackIds){var s=void 0;if(!t.parts||f["default"].helpers.scopedId(t)||t.depth||(s=this.blockParamIndex(t.parts[0])),s){var i=t.parts.slice(1).join(".");this.opcode("pushId","BlockParam",s,i)}else e=t.original||e,e.replace&&(e=e.replace(/^\.\//g,"").replace(/^\.$/g,"")),this.opcode("pushId",t.type,e)}this.accept(t)}},setupFullMustacheParams:function(t,e,s,i){var r=t.params;return this.pushParams(r),this.opcode("pushProgram",e),this.opcode("pushProgram",s),t.hash?this.accept(t.hash):this.opcode("emptyHash",i),r},blockParamIndex:function(t){for(var e=0,s=this.options.blockParams.length;s>e;e++){var i=this.options.blockParams[e],r=i&&p.indexOf(i,t);if(i&&r>=0)return[e,r]}}}},function(t,e,s){"use strict";function i(t){this.value=t}function r(){}function n(t,e,s,i){var r=e.popStack(),n=0,a=s.length;for(t&&a--;a>n;n++)r=e.nameLookup(r,s[n],i);return t?[e.aliasable("this.strict"),"(",r,", ",e.quotedString(s[n]),")"]:r}var a=s(8)["default"];e.__esModule=!0;var o=s(10),h=s(12),c=a(h),l=s(13),p=s(18),u=a(p);r.prototype={nameLookup:function(t,e){return r.isValidJavaScriptVariableName(e)?[t,".",e]:[t,"['",e,"']"]},depthedLookup:function(t){return[this.aliasable("this.lookup"),'(depths, "',t,'")']},compilerInfo:function(){var t=o.COMPILER_REVISION,e=o.REVISION_CHANGES[t];return[t,e]},appendToBuffer:function(t,e,s){return l.isArray(t)||(t=[t]),t=this.source.wrap(t,e),this.environment.isSimple?["return ",t,";"]:s?["buffer += ",t,";"]:(t.appendToBuffer=!0,t)},initializeBuffer:function(){return this.quotedString("")},compile:function(t,e,s,i){this.environment=t,this.options=e,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!i,this.name=this.environment.name,this.isChild=!!s,this.context=s||{programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(t,e),this.useDepths=this.useDepths||t.useDepths||this.options.compat,this.useBlockParams=this.useBlockParams||t.useBlockParams;var r=t.opcodes,n=void 0,a=void 0,o=void 0,h=void 0;for(o=0,h=r.length;h>o;o++)n=r[o],this.source.currentLocation=n.loc,a=a||n.loc,this[n.opcode].apply(this,n.args);if(this.source.currentLocation=a,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new c["default"]("Compile completed with content left on stack");var l=this.createFunctionContext(i);if(this.isChild)return l;var p={compiler:this.compilerInfo(),main:l},u=this.context.programs;for(o=0,h=u.length;h>o;o++)u[o]&&(p[o]=u[o]);return this.environment.usePartial&&(p.usePartial=!0),this.options.data&&(p.useData=!0),this.useDepths&&(p.useDepths=!0),this.useBlockParams&&(p.useBlockParams=!0),this.options.compat&&(p.compat=!0),i?p.compilerOptions=this.options:(p.compiler=JSON.stringify(p.compiler),this.source.currentLocation={start:{line:1,column:0}},p=this.objectLiteral(p),e.srcName?(p=p.toStringWithSourceMap({file:e.destName}),p.map=p.map&&p.map.toString()):p=p.toString()),p},preamble:function(){this.lastContext=0,this.source=new u["default"](this.options.srcName)},createFunctionContext:function(t){var e="",s=this.stackVars.concat(this.registers.list);s.length>0&&(e+=", "+s.join(", "));var i=0;for(var r in this.aliases){var n=this.aliases[r];this.aliases.hasOwnProperty(r)&&n.children&&n.referenceCount>1&&(e+=", alias"+ ++i+"="+r,n.children[0]="alias"+i)}var a=["depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&a.push("blockParams"),this.useDepths&&a.push("depths");var o=this.mergeSource(e);return t?(a.push(o),Function.apply(this,a)):this.source.wrap(["function(",a.join(","),") {\n ",o,"}"])},mergeSource:function(t){var e=this.environment.isSimple,s=!this.forceBuffer,i=void 0,r=void 0,n=void 0,a=void 0;return this.source.each(function(t){t.appendToBuffer?(n?t.prepend(" + "):n=t,a=t):(n&&(r?n.prepend("buffer += "):i=!0,a.add(";"),n=a=void 0),r=!0,e||(s=!1))}),s?n?(n.prepend("return "),a.add(";")):r||this.source.push('return "";'):(t+=", buffer = "+(i?"":this.initializeBuffer()),n?(n.prepend("return buffer + "),a.add(";")):this.source.push("return buffer;")),t&&this.source.prepend("var "+t.substring(2)+(i?"":";\n")),this.source.merge()},blockValue:function(t){var e=this.aliasable("helpers.blockHelperMissing"),s=[this.contextName(0)];this.setupHelperArgs(t,0,s);var i=this.popStack();s.splice(1,0,i),this.push(this.source.functionCall(e,"call",s))},ambiguousBlockValue:function(){var t=this.aliasable("helpers.blockHelperMissing"),e=[this.contextName(0)];this.setupHelperArgs("",0,e,!0),this.flushInline();var s=this.topStack();e.splice(1,0,s),this.pushSource(["if (!",this.lastHelper,") { ",s," = ",this.source.functionCall(t,"call",e),"}"])},appendContent:function(t){this.pendingContent?t=this.pendingContent+t:this.pendingLocation=this.source.currentLocation,this.pendingContent=t},append:function(){if(this.isInline())this.replaceStack(function(t){return[" != null ? ",t,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var t=this.popStack();this.pushSource(["if (",t," != null) { ",this.appendToBuffer(t,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("this.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(t){this.lastContext=t},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(t,e,s){var i=0;s||!this.options.compat||this.lastContext?this.pushContext():this.push(this.depthedLookup(t[i++])),this.resolvePath("context",t,i,e)},lookupBlockParam:function(t,e){this.useBlockParams=!0,this.push(["blockParams[",t[0],"][",t[1],"]"]),this.resolvePath("context",e,1)},lookupData:function(t,e){t?this.pushStackLiteral("this.data(data, "+t+")"):this.pushStackLiteral("data"),this.resolvePath("data",e,0,!0)},resolvePath:function(t,e,s,i){var r=this;if(this.options.strict||this.options.assumeObjects)return void this.push(n(this.options.strict,this,e,t));for(var a=e.length;a>s;s++)this.replaceStack(function(n){var a=r.nameLookup(n,e[s],t);return i?[" && ",a]:[" != null ? ",a," : ",n]})},resolvePossibleLambda:function(){this.push([this.aliasable("this.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(t,e){this.pushContext(),this.pushString(e),"SubExpression"!==e&&("string"==typeof t?this.pushString(t):this.pushStackLiteral(t))},emptyHash:function(t){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}")),this.pushStackLiteral(t?"undefined":"{}")},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:[],types:[],contexts:[],ids:[]}},popHash:function(){var t=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(t.ids)),this.stringParams&&(this.push(this.objectLiteral(t.contexts)),this.push(this.objectLiteral(t.types))),this.push(this.objectLiteral(t.values))},pushString:function(t){this.pushStackLiteral(this.quotedString(t))},pushLiteral:function(t){this.pushStackLiteral(t)},pushProgram:function(t){null!=t?this.pushStackLiteral(this.programExpression(t)):this.pushStackLiteral(null)},invokeHelper:function(t,e,s){var i=this.popStack(),r=this.setupHelper(t,e),n=s?[r.name," || "]:"",a=["("].concat(n,i);this.options.strict||a.push(" || ",this.aliasable("helpers.helperMissing")),a.push(")"),this.push(this.source.functionCall(a,"call",r.callParams))},invokeKnownHelper:function(t,e){var s=this.setupHelper(t,e);this.push(this.source.functionCall(s.name,"call",s.callParams))},invokeAmbiguous:function(t,e){this.useRegister("helper");var s=this.popStack();this.emptyHash();var i=this.setupHelper(0,t,e),r=this.lastHelper=this.nameLookup("helpers",t,"helper"),n=["(","(helper = ",r," || ",s,")"];this.options.strict||(n[0]="(helper = ",n.push(" != null ? helper : ",this.aliasable("helpers.helperMissing"))),this.push(["(",n,i.paramsInit?["),(",i.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("helper","call",i.callParams)," : helper))"])},invokePartial:function(t,e,s){var i=[],r=this.setupParams(e,1,i,!1);t&&(e=this.popStack(),delete r.name),s&&(r.indent=JSON.stringify(s)),r.helpers="helpers",r.partials="partials",t?i.unshift(e):i.unshift(this.nameLookup("partials",e,"partial")),this.options.compat&&(r.depths="depths"),r=this.objectLiteral(r),i.push(r),this.push(this.source.functionCall("this.invokePartial","",i))},assignToHash:function(t){var e=this.popStack(),s=void 0,i=void 0,r=void 0;this.trackIds&&(r=this.popStack()),this.stringParams&&(i=this.popStack(),s=this.popStack());var n=this.hash;s&&(n.contexts[t]=s),i&&(n.types[t]=i),r&&(n.ids[t]=r),n.values[t]=e},pushId:function(t,e,s){"BlockParam"===t?this.pushStackLiteral("blockParams["+e[0]+"].path["+e[1]+"]"+(s?" + "+JSON.stringify("."+s):"")):"PathExpression"===t?this.pushString(e):"SubExpression"===t?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:r,compileChildren:function(t,e){for(var s=t.children,i=void 0,r=void 0,n=0,a=s.length;a>n;n++){i=s[n],r=new this.compiler;var o=this.matchExistingProgram(i);null==o?(this.context.programs.push(""),o=this.context.programs.length,i.index=o,i.name="program"+o,this.context.programs[o]=r.compile(i,e,this.context,!this.precompile),this.context.environments[o]=i,this.useDepths=this.useDepths||r.useDepths,this.useBlockParams=this.useBlockParams||r.useBlockParams):(i.index=o,i.name="program"+o,this.useDepths=this.useDepths||i.useDepths,this.useBlockParams=this.useBlockParams||i.useBlockParams)}},matchExistingProgram:function(t){for(var e=0,s=this.context.environments.length;s>e;e++){var i=this.context.environments[e];if(i&&i.equals(t))return e}},programExpression:function(t){var e=this.environment.children[t],s=[e.index,"data",e.blockParams];return(this.useBlockParams||this.useDepths)&&s.push("blockParams"),this.useDepths&&s.push("depths"),"this.program("+s.join(", ")+")"},useRegister:function(t){this.registers[t]||(this.registers[t]=!0,this.registers.list.push(t))},push:function(t){return t instanceof i||(t=this.source.wrap(t)),this.inlineStack.push(t),t},pushStackLiteral:function(t){this.push(new i(t))},pushSource:function(t){this.pendingContent&&(this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),this.pendingContent=void 0),t&&this.source.push(t)},replaceStack:function(t){var e=["("],s=void 0,r=void 0,n=void 0;if(!this.isInline())throw new c["default"]("replaceStack on non-inline");var a=this.popStack(!0);if(a instanceof i)s=[a.value],e=["(",s],n=!0;else{r=!0;var o=this.incrStack();e=["((",this.push(o)," = ",a,")"],s=this.topStack()}var h=t.call(this,s);n||this.popStack(),r&&this.stackSlot--,this.push(e.concat(h,")"))},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 t=this.inlineStack;this.inlineStack=[];for(var e=0,s=t.length;s>e;e++){var r=t[e];if(r instanceof i)this.compileStack.push(r);else{var n=this.incrStack();this.pushSource([n," = ",r,";"]),this.compileStack.push(n)}}},isInline:function(){return this.inlineStack.length},popStack:function(t){var e=this.isInline(),s=(e?this.inlineStack:this.compileStack).pop();if(!t&&s instanceof i)return s.value;if(!e){if(!this.stackSlot)throw new c["default"]("Invalid stack pop");this.stackSlot--}return s},topStack:function(){var t=this.isInline()?this.inlineStack:this.compileStack,e=t[t.length-1];return e instanceof i?e.value:e},contextName:function(t){return this.useDepths&&t?"depths["+t+"]":"depth"+t},quotedString:function(t){return this.source.quotedString(t)},objectLiteral:function(t){return this.source.objectLiteral(t)},aliasable:function(t){var e=this.aliases[t];return e?(e.referenceCount++,e):(e=this.aliases[t]=this.source.wrap(t),e.aliasable=!0,e.referenceCount=1,e)},setupHelper:function(t,e,s){var i=[],r=this.setupHelperArgs(e,t,i,s),n=this.nameLookup("helpers",e,"helper");return{params:i,paramsInit:r,name:n,callParams:[this.contextName(0)].concat(i)}},setupParams:function(t,e,s){var i={},r=[],n=[],a=[],o=void 0;i.name=this.quotedString(t),i.hash=this.popStack(),this.trackIds&&(i.hashIds=this.popStack()),this.stringParams&&(i.hashTypes=this.popStack(),i.hashContexts=this.popStack());var h=this.popStack(),c=this.popStack();(c||h)&&(i.fn=c||"this.noop",i.inverse=h||"this.noop");for(var l=e;l--;)o=this.popStack(),s[l]=o,this.trackIds&&(a[l]=this.popStack()),this.stringParams&&(n[l]=this.popStack(),r[l]=this.popStack());return this.trackIds&&(i.ids=this.source.generateArray(a)),this.stringParams&&(i.types=this.source.generateArray(n),i.contexts=this.source.generateArray(r)),this.options.data&&(i.data="data"),this.useBlockParams&&(i.blockParams="blockParams"),i},setupHelperArgs:function(t,e,s,i){var r=this.setupParams(t,e,s,!0);return r=this.objectLiteral(r),i?(this.useRegister("options"),s.push("options"),["options=",r]):(s.push(r),"")}},function(){for(var t="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(" "),e=r.RESERVED_WORDS={},s=0,i=t.length;i>s;s++)e[t[s]]=!0}(),r.isValidJavaScriptVariableName=function(t){return!r.RESERVED_WORDS[t]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(t)},e["default"]=r,t.exports=e["default"]},function(t,e,s){"use strict";function i(){this.parents=[]}var r=s(8)["default"];e.__esModule=!0;var n=s(12),a=r(n),o=s(2),h=r(o);i.prototype={constructor:i,mutating:!1,acceptKey:function(t,e){var s=this.accept(t[e]);if(this.mutating){if(s&&(!s.type||!h["default"][s.type]))throw new a["default"]('Unexpected node type "'+s.type+'" found when accepting '+e+" on "+t.type);t[e]=s}},acceptRequired:function(t,e){if(this.acceptKey(t,e),!t[e])throw new a["default"](t.type+" requires "+e)},acceptArray:function(t){for(var e=0,s=t.length;s>e;e++)this.acceptKey(t,e),t[e]||(t.splice(e,1),e--,s--)},accept:function(t){if(t){this.current&&this.parents.unshift(this.current),this.current=t;var e=this[t.type](t);return this.current=this.parents.shift(),!this.mutating||e?e:e!==!1?t:void 0}},Program:function(t){this.acceptArray(t.body)},MustacheStatement:function(t){this.acceptRequired(t,"path"),this.acceptArray(t.params),this.acceptKey(t,"hash")},BlockStatement:function(t){this.acceptRequired(t,"path"),this.acceptArray(t.params),this.acceptKey(t,"hash"),this.acceptKey(t,"program"),this.acceptKey(t,"inverse")},PartialStatement:function(t){this.acceptRequired(t,"name"),this.acceptArray(t.params),this.acceptKey(t,"hash")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:function(t){this.acceptRequired(t,"path"),this.acceptArray(t.params),this.acceptKey(t,"hash")},PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(t){this.acceptArray(t.pairs)},HashPair:function(t){this.acceptRequired(t,"value")}},e["default"]=i,t.exports=e["default"]},function(t,e,s){(function(s){"use strict";e.__esModule=!0,e["default"]=function(t){var e="undefined"!=typeof s?s:window,i=e.Handlebars;t.noConflict=function(){e.Handlebars===t&&(e.Handlebars=i)}},t.exports=e["default"]}).call(e,function(){return this}())},function(t,e,s){"use strict";e["default"]=function(t){return t&&t.__esModule?t:{"default":t}},e.__esModule=!0},function(t,e,s){"use strict";e["default"]=function(t){if(t&&t.__esModule)return t;var e={};if("object"==typeof t&&null!==t)for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e["default"]=t,e},e.__esModule=!0},function(t,e,s){"use strict";function i(t,e){this.helpers=t||{},this.partials=e||{},r(this)}function r(t){t.registerHelper("helperMissing",function(){if(1===arguments.length)return void 0;throw new p["default"]('Missing helper: "'+arguments[arguments.length-1].name+'"')}),t.registerHelper("blockHelperMissing",function(e,s){var i=s.inverse,r=s.fn;if(e===!0)return r(this);if(e===!1||null==e)return i(this);if(m(e))return e.length>0?(s.ids&&(s.ids=[s.name]),t.helpers.each(e,s)):i(this);if(s.data&&s.ids){var a=n(s.data);a.contextPath=c.appendContextPath(s.data.contextPath,s.name),s={data:a}}return r(e,s)}),t.registerHelper("each",function(t,e){function s(e,s,r){h&&(h.key=e,h.index=s,h.first=0===s,h.last=!!r,l&&(h.contextPath=l+e)),o+=i(t[e],{data:h,blockParams:c.blockParams([t[e],e],[l+e,null])})}if(!e)throw new p["default"]("Must pass iterator to #each");var i=e.fn,r=e.inverse,a=0,o="",h=void 0,l=void 0;if(e.data&&e.ids&&(l=c.appendContextPath(e.data.contextPath,e.ids[0])+"."),g(t)&&(t=t.call(this)),e.data&&(h=n(e.data)),t&&"object"==typeof t)if(m(t))for(var u=t.length;u>a;a++)s(a,a,a===t.length-1);else{var f=void 0;for(var d in t)t.hasOwnProperty(d)&&(f&&s(f,a-1),f=d,a++);f&&s(f,a-1,!0)}return 0===a&&(o=r(this)),o}),t.registerHelper("if",function(t,e){return g(t)&&(t=t.call(this)),!e.hash.includeZero&&!t||c.isEmpty(t)?e.inverse(this):e.fn(this)}),t.registerHelper("unless",function(e,s){return t.helpers["if"].call(this,e,{fn:s.inverse,inverse:s.fn,hash:s.hash})}),t.registerHelper("with",function(t,e){g(t)&&(t=t.call(this));var s=e.fn;if(c.isEmpty(t))return e.inverse(this);if(e.data&&e.ids){var i=n(e.data);i.contextPath=c.appendContextPath(e.data.contextPath,e.ids[0]),e={data:i}}return s(t,e)}),t.registerHelper("log",function(e,s){var i=s.data&&null!=s.data.level?parseInt(s.data.level,10):1;t.log(i,e)}),t.registerHelper("lookup",function(t,e){return t&&t[e]})}function n(t){var e=c.extend({},t);return e._parent=t,e}var a=s(9)["default"],o=s(8)["default"];e.__esModule=!0,e.HandlebarsEnvironment=i,e.createFrame=n;var h=s(13),c=a(h),l=s(12),p=o(l),u="3.0.1";e.VERSION=u;var f=6;e.COMPILER_REVISION=f;var d={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"};e.REVISION_CHANGES=d;var m=c.isArray,g=c.isFunction,v=c.toString,y="[object Object]";i.prototype={constructor:i,logger:k,log:S,registerHelper:function(t,e){if(v.call(t)===y){if(e)throw new p["default"]("Arg not supported with multiple helpers");c.extend(this.helpers,t)}else this.helpers[t]=e},unregisterHelper:function(t){delete this.helpers[t]},registerPartial:function(t,e){if(v.call(t)===y)c.extend(this.partials,t);else{if("undefined"==typeof e)throw new p["default"]("Attempting to register a partial as undefined");this.partials[t]=e}},unregisterPartial:function(t){delete this.partials[t]}};var k={methodMap:{0:"debug",1:"info",2:"warn",3:"error"},DEBUG:0,INFO:1,WARN:2,ERROR:3,level:1,log:function(t,e){if("undefined"!=typeof console&&k.level<=t){var s=k.methodMap[t];(console[s]||console.log).call(console,e)}}};e.logger=k;var S=k.log;e.log=S},function(t,e,s){"use strict";function i(t){this.string=t}e.__esModule=!0,i.prototype.toString=i.prototype.toHTML=function(){return""+this.string},e["default"]=i,t.exports=e["default"]},function(t,e,s){"use strict";function i(t,e){var s=e&&e.loc,n=void 0,a=void 0;s&&(n=s.start.line,a=s.start.column,t+=" - "+n+":"+a);for(var o=Error.prototype.constructor.call(this,t),h=0;hs;s++)if(t[s]===e)return s;return-1}function a(t){if("string"!=typeof t){if(t&&t.toHTML)return t.toHTML();if(null==t)return"";if(!t)return t+"";t=""+t}return u.test(t)?t.replace(p,i):t}function o(t){return t||0===t?m(t)&&0===t.length?!0:!1:!0}function h(t,e){return t.path=e,t}function c(t,e){return(t?t+".":"")+e}e.__esModule=!0,e.extend=r,e.indexOf=n,e.escapeExpression=a,e.isEmpty=o,e.blockParams=h,e.appendContextPath=c;var l={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},p=/[&<>"'`]/g,u=/[&<>"'`]/,f=Object.prototype.toString;e.toString=f;var d=function(t){return"function"==typeof t};d(/x/)&&(e.isFunction=d=function(t){return"function"==typeof t&&"[object Function]"===f.call(t)});var d;e.isFunction=d;var m=Array.isArray||function(t){return t&&"object"==typeof t?"[object Array]"===f.call(t):!1};e.isArray=m},function(t,e,s){"use strict";function i(t){var e=t&&t[0]||1,s=g.COMPILER_REVISION;if(e!==s){if(s>e){var i=g.REVISION_CHANGES[s],r=g.REVISION_CHANGES[e];throw new m["default"]("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+i+") or downgrade your runtime to an older version ("+r+").")}throw new m["default"]("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+t[1]+").")}}function r(t,e){function s(s,i,r){r.hash&&(i=f.extend({},i,r.hash)),s=e.VM.resolvePartial.call(this,s,i,r);var n=e.VM.invokePartial.call(this,s,i,r); 2 | if(null==n&&e.compile&&(r.partials[r.name]=e.compile(s,t.compilerOptions,e),n=r.partials[r.name](i,r)),null!=n){if(r.indent){for(var a=n.split("\n"),o=0,h=a.length;h>o&&(a[o]||o+1!==h);o++)a[o]=r.indent+a[o];n=a.join("\n")}return n}throw new m["default"]("The partial "+r.name+" could not be compiled when running in runtime-only mode")}function i(e){var s=void 0===arguments[1]?{}:arguments[1],n=s.data;i._setup(s),!s.partial&&t.useData&&(n=c(e,n));var a=void 0,o=t.useBlockParams?[]:void 0;return t.useDepths&&(a=s.depths?[e].concat(s.depths):[e]),t.main.call(r,e,r.helpers,r.partials,n,o,a)}if(!e)throw new m["default"]("No environment passed to template");if(!t||!t.main)throw new m["default"]("Unknown template object: "+typeof t);e.VM.checkRevision(t.compiler);var r={strict:function(t,e){if(!(e in t))throw new m["default"]('"'+e+'" not defined in '+t);return t[e]},lookup:function(t,e){for(var s=t.length,i=0;s>i;i++)if(t[i]&&null!=t[i][e])return t[i][e]},lambda:function(t,e){return"function"==typeof t?t.call(e):t},escapeExpression:f.escapeExpression,invokePartial:s,fn:function(e){return t[e]},programs:[],program:function(t,e,s,i,r){var a=this.programs[t],o=this.fn(t);return e||r||i||s?a=n(this,t,o,e,s,i,r):a||(a=this.programs[t]=n(this,t,o)),a},data:function(t,e){for(;t&&e--;)t=t._parent;return t},merge:function(t,e){var s=t||e;return t&&e&&t!==e&&(s=f.extend({},e,t)),s},noop:e.VM.noop,compilerInfo:t.compiler};return i.isTop=!0,i._setup=function(s){s.partial?(r.helpers=s.helpers,r.partials=s.partials):(r.helpers=r.merge(s.helpers,e.helpers),t.usePartial&&(r.partials=r.merge(s.partials,e.partials)))},i._child=function(e,s,i,a){if(t.useBlockParams&&!i)throw new m["default"]("must pass block params");if(t.useDepths&&!a)throw new m["default"]("must pass parent depths");return n(r,e,t[e],s,0,i,a)},i}function n(t,e,s,i,r,n,a){function o(e){var r=void 0===arguments[1]?{}:arguments[1];return s.call(t,e,t.helpers,t.partials,r.data||i,n&&[r.blockParams].concat(n),a&&[e].concat(a))}return o.program=e,o.depth=a?a.length:0,o.blockParams=r||0,o}function a(t,e,s){return t?t.call||s.name||(s.name=t,t=s.partials[t]):t=s.partials[s.name],t}function o(t,e,s){if(s.partial=!0,void 0===t)throw new m["default"]("The partial "+s.name+" could not be found");return t instanceof Function?t(e,s):void 0}function h(){return""}function c(t,e){return e&&"root"in e||(e=e?g.createFrame(e):{},e.root=t),e}var l=s(9)["default"],p=s(8)["default"];e.__esModule=!0,e.checkRevision=i,e.template=r,e.wrapProgram=n,e.resolvePartial=a,e.invokePartial=o,e.noop=h;var u=s(13),f=l(u),d=s(12),m=p(d),g=s(10)},function(t,e,s){"use strict";e.__esModule=!0;var i=function(){function t(){this.yy={}}var e={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,content:12,COMMENT:13,CONTENT:14,openRawBlock:15,END_RAW_BLOCK:16,OPEN_RAW_BLOCK:17,helperName:18,openRawBlock_repetition0:19,openRawBlock_option0:20,CLOSE_RAW_BLOCK:21,openBlock:22,block_option0:23,closeBlock:24,openInverse:25,block_option1:26,OPEN_BLOCK:27,openBlock_repetition0:28,openBlock_option0:29,openBlock_option1:30,CLOSE:31,OPEN_INVERSE:32,openInverse_repetition0:33,openInverse_option0:34,openInverse_option1:35,openInverseChain:36,OPEN_INVERSE_CHAIN:37,openInverseChain_repetition0:38,openInverseChain_option0:39,openInverseChain_option1:40,inverseAndProgram:41,INVERSE:42,inverseChain:43,inverseChain_option0:44,OPEN_ENDBLOCK:45,OPEN:46,mustache_repetition0:47,mustache_option0:48,OPEN_UNESCAPED:49,mustache_repetition1:50,mustache_option1:51,CLOSE_UNESCAPED:52,OPEN_PARTIAL:53,partialName:54,partial_repetition0:55,partial_option0:56,param:57,sexpr:58,OPEN_SEXPR:59,sexpr_repetition0:60,sexpr_option0:61,CLOSE_SEXPR:62,hash:63,hash_repetition_plus0:64,hashSegment:65,ID:66,EQUALS:67,blockParams:68,OPEN_BLOCK_PARAMS:69,blockParams_repetition_plus0:70,CLOSE_BLOCK_PARAMS:71,path:72,dataName:73,STRING:74,NUMBER:75,BOOLEAN:76,UNDEFINED:77,NULL:78,DATA:79,pathSegments:80,SEP:81,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",13:"COMMENT",14:"CONTENT",16:"END_RAW_BLOCK",17:"OPEN_RAW_BLOCK",21:"CLOSE_RAW_BLOCK",27:"OPEN_BLOCK",31:"CLOSE",32:"OPEN_INVERSE",37:"OPEN_INVERSE_CHAIN",42:"INVERSE",45:"OPEN_ENDBLOCK",46:"OPEN",49:"OPEN_UNESCAPED",52:"CLOSE_UNESCAPED",53:"OPEN_PARTIAL",59:"OPEN_SEXPR",62:"CLOSE_SEXPR",66:"ID",67:"EQUALS",69:"OPEN_BLOCK_PARAMS",71:"CLOSE_BLOCK_PARAMS",74:"STRING",75:"NUMBER",76:"BOOLEAN",77:"UNDEFINED",78:"NULL",79:"DATA",81:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[12,1],[10,3],[15,5],[9,4],[9,4],[22,6],[25,6],[36,6],[41,2],[43,3],[43,1],[24,3],[8,5],[8,5],[11,5],[57,1],[57,1],[58,5],[63,1],[65,3],[68,3],[18,1],[18,1],[18,1],[18,1],[18,1],[18,1],[18,1],[54,1],[54,1],[73,2],[72,1],[80,3],[80,1],[6,0],[6,2],[19,0],[19,2],[20,0],[20,1],[23,0],[23,1],[26,0],[26,1],[28,0],[28,2],[29,0],[29,1],[30,0],[30,1],[33,0],[33,2],[34,0],[34,1],[35,0],[35,1],[38,0],[38,2],[39,0],[39,1],[40,0],[40,1],[44,0],[44,1],[47,0],[47,2],[48,0],[48,1],[50,0],[50,2],[51,0],[51,1],[55,0],[55,2],[56,0],[56,1],[60,0],[60,2],[61,0],[61,1],[64,1],[64,2],[70,1],[70,2]],performAction:function(t,e,s,i,r,n,a){var o=n.length-1;switch(r){case 1:return n[o-1];case 2:this.$=new i.Program(n[o],null,{},i.locInfo(this._$));break;case 3:this.$=n[o];break;case 4:this.$=n[o];break;case 5:this.$=n[o];break;case 6:this.$=n[o];break;case 7:this.$=n[o];break;case 8:this.$=new i.CommentStatement(i.stripComment(n[o]),i.stripFlags(n[o],n[o]),i.locInfo(this._$));break;case 9:this.$=new i.ContentStatement(n[o],i.locInfo(this._$));break;case 10:this.$=i.prepareRawBlock(n[o-2],n[o-1],n[o],this._$);break;case 11:this.$={path:n[o-3],params:n[o-2],hash:n[o-1]};break;case 12:this.$=i.prepareBlock(n[o-3],n[o-2],n[o-1],n[o],!1,this._$);break;case 13:this.$=i.prepareBlock(n[o-3],n[o-2],n[o-1],n[o],!0,this._$);break;case 14:this.$={path:n[o-4],params:n[o-3],hash:n[o-2],blockParams:n[o-1],strip:i.stripFlags(n[o-5],n[o])};break;case 15:this.$={path:n[o-4],params:n[o-3],hash:n[o-2],blockParams:n[o-1],strip:i.stripFlags(n[o-5],n[o])};break;case 16:this.$={path:n[o-4],params:n[o-3],hash:n[o-2],blockParams:n[o-1],strip:i.stripFlags(n[o-5],n[o])};break;case 17:this.$={strip:i.stripFlags(n[o-1],n[o-1]),program:n[o]};break;case 18:var h=i.prepareBlock(n[o-2],n[o-1],n[o],n[o],!1,this._$),c=new i.Program([h],null,{},i.locInfo(this._$));c.chained=!0,this.$={strip:n[o-2].strip,program:c,chain:!0};break;case 19:this.$=n[o];break;case 20:this.$={path:n[o-1],strip:i.stripFlags(n[o-2],n[o])};break;case 21:this.$=i.prepareMustache(n[o-3],n[o-2],n[o-1],n[o-4],i.stripFlags(n[o-4],n[o]),this._$);break;case 22:this.$=i.prepareMustache(n[o-3],n[o-2],n[o-1],n[o-4],i.stripFlags(n[o-4],n[o]),this._$);break;case 23:this.$=new i.PartialStatement(n[o-3],n[o-2],n[o-1],i.stripFlags(n[o-4],n[o]),i.locInfo(this._$));break;case 24:this.$=n[o];break;case 25:this.$=n[o];break;case 26:this.$=new i.SubExpression(n[o-3],n[o-2],n[o-1],i.locInfo(this._$));break;case 27:this.$=new i.Hash(n[o],i.locInfo(this._$));break;case 28:this.$=new i.HashPair(i.id(n[o-2]),n[o],i.locInfo(this._$));break;case 29:this.$=i.id(n[o-1]);break;case 30:this.$=n[o];break;case 31:this.$=n[o];break;case 32:this.$=new i.StringLiteral(n[o],i.locInfo(this._$));break;case 33:this.$=new i.NumberLiteral(n[o],i.locInfo(this._$));break;case 34:this.$=new i.BooleanLiteral(n[o],i.locInfo(this._$));break;case 35:this.$=new i.UndefinedLiteral(i.locInfo(this._$));break;case 36:this.$=new i.NullLiteral(i.locInfo(this._$));break;case 37:this.$=n[o];break;case 38:this.$=n[o];break;case 39:this.$=i.preparePath(!0,n[o],this._$);break;case 40:this.$=i.preparePath(!1,n[o],this._$);break;case 41:n[o-2].push({part:i.id(n[o]),original:n[o],separator:n[o-1]}),this.$=n[o-2];break;case 42:this.$=[{part:i.id(n[o]),original:n[o]}];break;case 43:this.$=[];break;case 44:n[o-1].push(n[o]);break;case 45:this.$=[];break;case 46:n[o-1].push(n[o]);break;case 53:this.$=[];break;case 54:n[o-1].push(n[o]);break;case 59:this.$=[];break;case 60:n[o-1].push(n[o]);break;case 65:this.$=[];break;case 66:n[o-1].push(n[o]);break;case 73:this.$=[];break;case 74:n[o-1].push(n[o]);break;case 77:this.$=[];break;case 78:n[o-1].push(n[o]);break;case 81:this.$=[];break;case 82:n[o-1].push(n[o]);break;case 85:this.$=[];break;case 86:n[o-1].push(n[o]);break;case 89:this.$=[n[o]];break;case 90:n[o-1].push(n[o]);break;case 91:this.$=[n[o]];break;case 92:n[o-1].push(n[o])}},table:[{3:1,4:2,5:[2,43],6:3,13:[2,43],14:[2,43],17:[2,43],27:[2,43],32:[2,43],46:[2,43],49:[2,43],53:[2,43]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:[1,11],14:[1,18],15:16,17:[1,21],22:14,25:15,27:[1,19],32:[1,20],37:[2,2],42:[2,2],45:[2,2],46:[1,12],49:[1,13],53:[1,17]},{1:[2,1]},{5:[2,44],13:[2,44],14:[2,44],17:[2,44],27:[2,44],32:[2,44],37:[2,44],42:[2,44],45:[2,44],46:[2,44],49:[2,44],53:[2,44]},{5:[2,3],13:[2,3],14:[2,3],17:[2,3],27:[2,3],32:[2,3],37:[2,3],42:[2,3],45:[2,3],46:[2,3],49:[2,3],53:[2,3]},{5:[2,4],13:[2,4],14:[2,4],17:[2,4],27:[2,4],32:[2,4],37:[2,4],42:[2,4],45:[2,4],46:[2,4],49:[2,4],53:[2,4]},{5:[2,5],13:[2,5],14:[2,5],17:[2,5],27:[2,5],32:[2,5],37:[2,5],42:[2,5],45:[2,5],46:[2,5],49:[2,5],53:[2,5]},{5:[2,6],13:[2,6],14:[2,6],17:[2,6],27:[2,6],32:[2,6],37:[2,6],42:[2,6],45:[2,6],46:[2,6],49:[2,6],53:[2,6]},{5:[2,7],13:[2,7],14:[2,7],17:[2,7],27:[2,7],32:[2,7],37:[2,7],42:[2,7],45:[2,7],46:[2,7],49:[2,7],53:[2,7]},{5:[2,8],13:[2,8],14:[2,8],17:[2,8],27:[2,8],32:[2,8],37:[2,8],42:[2,8],45:[2,8],46:[2,8],49:[2,8],53:[2,8]},{18:22,66:[1,32],72:23,73:24,74:[1,25],75:[1,26],76:[1,27],77:[1,28],78:[1,29],79:[1,31],80:30},{18:33,66:[1,32],72:23,73:24,74:[1,25],75:[1,26],76:[1,27],77:[1,28],78:[1,29],79:[1,31],80:30},{4:34,6:3,13:[2,43],14:[2,43],17:[2,43],27:[2,43],32:[2,43],37:[2,43],42:[2,43],45:[2,43],46:[2,43],49:[2,43],53:[2,43]},{4:35,6:3,13:[2,43],14:[2,43],17:[2,43],27:[2,43],32:[2,43],42:[2,43],45:[2,43],46:[2,43],49:[2,43],53:[2,43]},{12:36,14:[1,18]},{18:38,54:37,58:39,59:[1,40],66:[1,32],72:23,73:24,74:[1,25],75:[1,26],76:[1,27],77:[1,28],78:[1,29],79:[1,31],80:30},{5:[2,9],13:[2,9],14:[2,9],16:[2,9],17:[2,9],27:[2,9],32:[2,9],37:[2,9],42:[2,9],45:[2,9],46:[2,9],49:[2,9],53:[2,9]},{18:41,66:[1,32],72:23,73:24,74:[1,25],75:[1,26],76:[1,27],77:[1,28],78:[1,29],79:[1,31],80:30},{18:42,66:[1,32],72:23,73:24,74:[1,25],75:[1,26],76:[1,27],77:[1,28],78:[1,29],79:[1,31],80:30},{18:43,66:[1,32],72:23,73:24,74:[1,25],75:[1,26],76:[1,27],77:[1,28],78:[1,29],79:[1,31],80:30},{31:[2,73],47:44,59:[2,73],66:[2,73],74:[2,73],75:[2,73],76:[2,73],77:[2,73],78:[2,73],79:[2,73]},{21:[2,30],31:[2,30],52:[2,30],59:[2,30],62:[2,30],66:[2,30],69:[2,30],74:[2,30],75:[2,30],76:[2,30],77:[2,30],78:[2,30],79:[2,30]},{21:[2,31],31:[2,31],52:[2,31],59:[2,31],62:[2,31],66:[2,31],69:[2,31],74:[2,31],75:[2,31],76:[2,31],77:[2,31],78:[2,31],79:[2,31]},{21:[2,32],31:[2,32],52:[2,32],59:[2,32],62:[2,32],66:[2,32],69:[2,32],74:[2,32],75:[2,32],76:[2,32],77:[2,32],78:[2,32],79:[2,32]},{21:[2,33],31:[2,33],52:[2,33],59:[2,33],62:[2,33],66:[2,33],69:[2,33],74:[2,33],75:[2,33],76:[2,33],77:[2,33],78:[2,33],79:[2,33]},{21:[2,34],31:[2,34],52:[2,34],59:[2,34],62:[2,34],66:[2,34],69:[2,34],74:[2,34],75:[2,34],76:[2,34],77:[2,34],78:[2,34],79:[2,34]},{21:[2,35],31:[2,35],52:[2,35],59:[2,35],62:[2,35],66:[2,35],69:[2,35],74:[2,35],75:[2,35],76:[2,35],77:[2,35],78:[2,35],79:[2,35]},{21:[2,36],31:[2,36],52:[2,36],59:[2,36],62:[2,36],66:[2,36],69:[2,36],74:[2,36],75:[2,36],76:[2,36],77:[2,36],78:[2,36],79:[2,36]},{21:[2,40],31:[2,40],52:[2,40],59:[2,40],62:[2,40],66:[2,40],69:[2,40],74:[2,40],75:[2,40],76:[2,40],77:[2,40],78:[2,40],79:[2,40],81:[1,45]},{66:[1,32],80:46},{21:[2,42],31:[2,42],52:[2,42],59:[2,42],62:[2,42],66:[2,42],69:[2,42],74:[2,42],75:[2,42],76:[2,42],77:[2,42],78:[2,42],79:[2,42],81:[2,42]},{50:47,52:[2,77],59:[2,77],66:[2,77],74:[2,77],75:[2,77],76:[2,77],77:[2,77],78:[2,77],79:[2,77]},{23:48,36:50,37:[1,52],41:51,42:[1,53],43:49,45:[2,49]},{26:54,41:55,42:[1,53],45:[2,51]},{16:[1,56]},{31:[2,81],55:57,59:[2,81],66:[2,81],74:[2,81],75:[2,81],76:[2,81],77:[2,81],78:[2,81],79:[2,81]},{31:[2,37],59:[2,37],66:[2,37],74:[2,37],75:[2,37],76:[2,37],77:[2,37],78:[2,37],79:[2,37]},{31:[2,38],59:[2,38],66:[2,38],74:[2,38],75:[2,38],76:[2,38],77:[2,38],78:[2,38],79:[2,38]},{18:58,66:[1,32],72:23,73:24,74:[1,25],75:[1,26],76:[1,27],77:[1,28],78:[1,29],79:[1,31],80:30},{28:59,31:[2,53],59:[2,53],66:[2,53],69:[2,53],74:[2,53],75:[2,53],76:[2,53],77:[2,53],78:[2,53],79:[2,53]},{31:[2,59],33:60,59:[2,59],66:[2,59],69:[2,59],74:[2,59],75:[2,59],76:[2,59],77:[2,59],78:[2,59],79:[2,59]},{19:61,21:[2,45],59:[2,45],66:[2,45],74:[2,45],75:[2,45],76:[2,45],77:[2,45],78:[2,45],79:[2,45]},{18:65,31:[2,75],48:62,57:63,58:66,59:[1,40],63:64,64:67,65:68,66:[1,69],72:23,73:24,74:[1,25],75:[1,26],76:[1,27],77:[1,28],78:[1,29],79:[1,31],80:30},{66:[1,70]},{21:[2,39],31:[2,39],52:[2,39],59:[2,39],62:[2,39],66:[2,39],69:[2,39],74:[2,39],75:[2,39],76:[2,39],77:[2,39],78:[2,39],79:[2,39],81:[1,45]},{18:65,51:71,52:[2,79],57:72,58:66,59:[1,40],63:73,64:67,65:68,66:[1,69],72:23,73:24,74:[1,25],75:[1,26],76:[1,27],77:[1,28],78:[1,29],79:[1,31],80:30},{24:74,45:[1,75]},{45:[2,50]},{4:76,6:3,13:[2,43],14:[2,43],17:[2,43],27:[2,43],32:[2,43],37:[2,43],42:[2,43],45:[2,43],46:[2,43],49:[2,43],53:[2,43]},{45:[2,19]},{18:77,66:[1,32],72:23,73:24,74:[1,25],75:[1,26],76:[1,27],77:[1,28],78:[1,29],79:[1,31],80:30},{4:78,6:3,13:[2,43],14:[2,43],17:[2,43],27:[2,43],32:[2,43],45:[2,43],46:[2,43],49:[2,43],53:[2,43]},{24:79,45:[1,75]},{45:[2,52]},{5:[2,10],13:[2,10],14:[2,10],17:[2,10],27:[2,10],32:[2,10],37:[2,10],42:[2,10],45:[2,10],46:[2,10],49:[2,10],53:[2,10]},{18:65,31:[2,83],56:80,57:81,58:66,59:[1,40],63:82,64:67,65:68,66:[1,69],72:23,73:24,74:[1,25],75:[1,26],76:[1,27],77:[1,28],78:[1,29],79:[1,31],80:30},{59:[2,85],60:83,62:[2,85],66:[2,85],74:[2,85],75:[2,85],76:[2,85],77:[2,85],78:[2,85],79:[2,85]},{18:65,29:84,31:[2,55],57:85,58:66,59:[1,40],63:86,64:67,65:68,66:[1,69],69:[2,55],72:23,73:24,74:[1,25],75:[1,26],76:[1,27],77:[1,28],78:[1,29],79:[1,31],80:30},{18:65,31:[2,61],34:87,57:88,58:66,59:[1,40],63:89,64:67,65:68,66:[1,69],69:[2,61],72:23,73:24,74:[1,25],75:[1,26],76:[1,27],77:[1,28],78:[1,29],79:[1,31],80:30},{18:65,20:90,21:[2,47],57:91,58:66,59:[1,40],63:92,64:67,65:68,66:[1,69],72:23,73:24,74:[1,25],75:[1,26],76:[1,27],77:[1,28],78:[1,29],79:[1,31],80:30},{31:[1,93]},{31:[2,74],59:[2,74],66:[2,74],74:[2,74],75:[2,74],76:[2,74],77:[2,74],78:[2,74],79:[2,74]},{31:[2,76]},{21:[2,24],31:[2,24],52:[2,24],59:[2,24],62:[2,24],66:[2,24],69:[2,24],74:[2,24],75:[2,24],76:[2,24],77:[2,24],78:[2,24],79:[2,24]},{21:[2,25],31:[2,25],52:[2,25],59:[2,25],62:[2,25],66:[2,25],69:[2,25],74:[2,25],75:[2,25],76:[2,25],77:[2,25],78:[2,25],79:[2,25]},{21:[2,27],31:[2,27],52:[2,27],62:[2,27],65:94,66:[1,95],69:[2,27]},{21:[2,89],31:[2,89],52:[2,89],62:[2,89],66:[2,89],69:[2,89]},{21:[2,42],31:[2,42],52:[2,42],59:[2,42],62:[2,42],66:[2,42],67:[1,96],69:[2,42],74:[2,42],75:[2,42],76:[2,42],77:[2,42],78:[2,42],79:[2,42],81:[2,42]},{21:[2,41],31:[2,41],52:[2,41],59:[2,41],62:[2,41],66:[2,41],69:[2,41],74:[2,41],75:[2,41],76:[2,41],77:[2,41],78:[2,41],79:[2,41],81:[2,41]},{52:[1,97]},{52:[2,78],59:[2,78],66:[2,78],74:[2,78],75:[2,78],76:[2,78],77:[2,78],78:[2,78],79:[2,78]},{52:[2,80]},{5:[2,12],13:[2,12],14:[2,12],17:[2,12],27:[2,12],32:[2,12],37:[2,12],42:[2,12],45:[2,12],46:[2,12],49:[2,12],53:[2,12]},{18:98,66:[1,32],72:23,73:24,74:[1,25],75:[1,26],76:[1,27],77:[1,28],78:[1,29],79:[1,31],80:30},{36:50,37:[1,52],41:51,42:[1,53],43:100,44:99,45:[2,71]},{31:[2,65],38:101,59:[2,65],66:[2,65],69:[2,65],74:[2,65],75:[2,65],76:[2,65],77:[2,65],78:[2,65],79:[2,65]},{45:[2,17]},{5:[2,13],13:[2,13],14:[2,13],17:[2,13],27:[2,13],32:[2,13],37:[2,13],42:[2,13],45:[2,13],46:[2,13],49:[2,13],53:[2,13]},{31:[1,102]},{31:[2,82],59:[2,82],66:[2,82],74:[2,82],75:[2,82],76:[2,82],77:[2,82],78:[2,82],79:[2,82]},{31:[2,84]},{18:65,57:104,58:66,59:[1,40],61:103,62:[2,87],63:105,64:67,65:68,66:[1,69],72:23,73:24,74:[1,25],75:[1,26],76:[1,27],77:[1,28],78:[1,29],79:[1,31],80:30},{30:106,31:[2,57],68:107,69:[1,108]},{31:[2,54],59:[2,54],66:[2,54],69:[2,54],74:[2,54],75:[2,54],76:[2,54],77:[2,54],78:[2,54],79:[2,54]},{31:[2,56],69:[2,56]},{31:[2,63],35:109,68:110,69:[1,108]},{31:[2,60],59:[2,60],66:[2,60],69:[2,60],74:[2,60],75:[2,60],76:[2,60],77:[2,60],78:[2,60],79:[2,60]},{31:[2,62],69:[2,62]},{21:[1,111]},{21:[2,46],59:[2,46],66:[2,46],74:[2,46],75:[2,46],76:[2,46],77:[2,46],78:[2,46],79:[2,46]},{21:[2,48]},{5:[2,21],13:[2,21],14:[2,21],17:[2,21],27:[2,21],32:[2,21],37:[2,21],42:[2,21],45:[2,21],46:[2,21],49:[2,21],53:[2,21]},{21:[2,90],31:[2,90],52:[2,90],62:[2,90],66:[2,90],69:[2,90]},{67:[1,96]},{18:65,57:112,58:66,59:[1,40],66:[1,32],72:23,73:24,74:[1,25],75:[1,26],76:[1,27],77:[1,28],78:[1,29],79:[1,31],80:30},{5:[2,22],13:[2,22],14:[2,22],17:[2,22],27:[2,22],32:[2,22],37:[2,22],42:[2,22],45:[2,22],46:[2,22],49:[2,22],53:[2,22]},{31:[1,113]},{45:[2,18]},{45:[2,72]},{18:65,31:[2,67],39:114,57:115,58:66,59:[1,40],63:116,64:67,65:68,66:[1,69],69:[2,67],72:23,73:24,74:[1,25],75:[1,26],76:[1,27],77:[1,28],78:[1,29],79:[1,31],80:30},{5:[2,23],13:[2,23],14:[2,23],17:[2,23],27:[2,23],32:[2,23],37:[2,23],42:[2,23],45:[2,23],46:[2,23],49:[2,23],53:[2,23]},{62:[1,117]},{59:[2,86],62:[2,86],66:[2,86],74:[2,86],75:[2,86],76:[2,86],77:[2,86],78:[2,86],79:[2,86]},{62:[2,88]},{31:[1,118]},{31:[2,58]},{66:[1,120],70:119},{31:[1,121]},{31:[2,64]},{14:[2,11]},{21:[2,28],31:[2,28],52:[2,28],62:[2,28],66:[2,28],69:[2,28]},{5:[2,20],13:[2,20],14:[2,20],17:[2,20],27:[2,20],32:[2,20],37:[2,20],42:[2,20],45:[2,20],46:[2,20],49:[2,20],53:[2,20]},{31:[2,69],40:122,68:123,69:[1,108]},{31:[2,66],59:[2,66],66:[2,66],69:[2,66],74:[2,66],75:[2,66],76:[2,66],77:[2,66],78:[2,66],79:[2,66]},{31:[2,68],69:[2,68]},{21:[2,26],31:[2,26],52:[2,26],59:[2,26],62:[2,26],66:[2,26],69:[2,26],74:[2,26],75:[2,26],76:[2,26],77:[2,26],78:[2,26],79:[2,26]},{13:[2,14],14:[2,14],17:[2,14],27:[2,14],32:[2,14],37:[2,14],42:[2,14],45:[2,14],46:[2,14],49:[2,14],53:[2,14]},{66:[1,125],71:[1,124]},{66:[2,91],71:[2,91]},{13:[2,15],14:[2,15],17:[2,15],27:[2,15],32:[2,15],42:[2,15],45:[2,15],46:[2,15],49:[2,15],53:[2,15]},{31:[1,126]},{31:[2,70]},{31:[2,29]},{66:[2,92],71:[2,92]},{13:[2,16],14:[2,16],17:[2,16],27:[2,16],32:[2,16],37:[2,16],42:[2,16],45:[2,16],46:[2,16],49:[2,16],53:[2,16]}],defaultActions:{4:[2,1],49:[2,50],51:[2,19],55:[2,52],64:[2,76],73:[2,80],78:[2,17],82:[2,84],92:[2,48],99:[2,18],100:[2,72],105:[2,88],107:[2,58],110:[2,64],111:[2,11],123:[2,70],124:[2,29]},parseError:function(t,e){throw new Error(t)},parse:function(t){function e(){var t;return t=s.lexer.lex()||1,"number"!=typeof t&&(t=s.symbols_[t]||t),t}var s=this,i=[0],r=[null],n=[],a=this.table,o="",h=0,c=0,l=0;this.lexer.setInput(t),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,"undefined"==typeof this.lexer.yylloc&&(this.lexer.yylloc={});var p=this.lexer.yylloc;n.push(p);var u=this.lexer.options&&this.lexer.options.ranges;"function"==typeof this.yy.parseError&&(this.parseError=this.yy.parseError);for(var f,d,m,g,v,y,k,S,b,P={};;){if(m=i[i.length-1],this.defaultActions[m]?g=this.defaultActions[m]:((null===f||"undefined"==typeof f)&&(f=e()),g=a[m]&&a[m][f]),"undefined"==typeof g||!g.length||!g[0]){var _="";if(!l){b=[];for(y in a[m])this.terminals_[y]&&y>2&&b.push("'"+this.terminals_[y]+"'");_=this.lexer.showPosition?"Parse error on line "+(h+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+b.join(", ")+", got '"+(this.terminals_[f]||f)+"'":"Parse error on line "+(h+1)+": Unexpected "+(1==f?"end of input":"'"+(this.terminals_[f]||f)+"'"),this.parseError(_,{text:this.lexer.match,token:this.terminals_[f]||f,line:this.lexer.yylineno,loc:p,expected:b})}}if(g[0]instanceof Array&&g.length>1)throw new Error("Parse Error: multiple actions possible at state: "+m+", token: "+f);switch(g[0]){case 1:i.push(f),r.push(this.lexer.yytext),n.push(this.lexer.yylloc),i.push(g[1]),f=null,d?(f=d,d=null):(c=this.lexer.yyleng,o=this.lexer.yytext,h=this.lexer.yylineno,p=this.lexer.yylloc,l>0&&l--);break;case 2:if(k=this.productions_[g[1]][1],P.$=r[r.length-k],P._$={first_line:n[n.length-(k||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(k||1)].first_column,last_column:n[n.length-1].last_column},u&&(P._$.range=[n[n.length-(k||1)].range[0],n[n.length-1].range[1]]),v=this.performAction.call(P,o,c,h,this.yy,g[1],r,n),"undefined"!=typeof v)return v;k&&(i=i.slice(0,-1*k*2),r=r.slice(0,-1*k),n=n.slice(0,-1*k)),i.push(this.productions_[g[1]][0]),r.push(P.$),n.push(P._$),S=a[i[i.length-2]][i[i.length-1]],i.push(S);break;case 3:return!0}}return!0}},s=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t){return this._input=t,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 t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,s=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e-1),this.offset-=e;var i=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),s.length-1&&(this.yylineno-=s.length-1);var r=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:s?(s.length===i.length?this.yylloc.first_column:0)+i[i.length-s.length].length-s[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this},more:function(){return this._more=!0,this},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var t,e,s,i,r;this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),a=0;ae[0].length)||(e=s,i=a,this.options.flex));a++);return e?(r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,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(e[0].length),this.matched+=e[0],t=this.performAction.call(this,this.yy,this,n[i],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),t?t: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 t=this.next();return"undefined"!=typeof t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},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(t){this.begin(t)}};return t.options={},t.performAction=function(t,e,s,i){function r(t,s){return e.yytext=e.yytext.substr(t,e.yyleng-s)}switch(s){case 0:if("\\\\"===e.yytext.slice(-2)?(r(0,1),this.begin("mu")):"\\"===e.yytext.slice(-1)?(r(0,1),this.begin("emu")):this.begin("mu"),e.yytext)return 14;break;case 1:return 14;case 2:return this.popState(),14;case 3:return e.yytext=e.yytext.substr(5,e.yyleng-9),this.popState(),16;case 4:return 14;case 5:return this.popState(),13;case 6:return 59;case 7:return 62;case 8:return 17;case 9:return this.popState(),this.begin("raw"),21;case 10:return 53;case 11:return 27;case 12:return 45;case 13:return this.popState(),42;case 14:return this.popState(),42;case 15:return 32;case 16:return 37;case 17:return 49;case 18:return 46;case 19:this.unput(e.yytext),this.popState(),this.begin("com");break;case 20:return this.popState(),13;case 21:return 46;case 22:return 67;case 23:return 66;case 24:return 66;case 25:return 81;case 26:break;case 27:return this.popState(),52;case 28:return this.popState(),31;case 29:return e.yytext=r(1,2).replace(/\\"/g,'"'),74;case 30:return e.yytext=r(1,2).replace(/\\'/g,"'"),74;case 31:return 79;case 32:return 76;case 33:return 76;case 34:return 77;case 35:return 78;case 36:return 75;case 37:return 69;case 38:return 71;case 39:return 66;case 40:return 66;case 41:return"INVALID";case 42:return 5}},t.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\/.)|]))))/,/^(?:\[[^\]]*\])/,/^(?:.)/,/^(?:$)/],t.conditions={mu:{rules:[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],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[5],inclusive:!1},raw:{rules:[3,4],inclusive:!1},INITIAL:{rules:[0,1,42],inclusive:!0}},t}();return e.lexer=s,t.prototype=e,e.Parser=t,new t}();e["default"]=i,t.exports=e["default"]},function(t,e,s){"use strict";function i(){}function r(t,e,s){void 0===e&&(e=t.length);var i=t[e-1],r=t[e-2];return i?"ContentStatement"===i.type?(r||!s?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(i.original):void 0:s}function n(t,e,s){void 0===e&&(e=-1);var i=t[e+1],r=t[e+2];return i?"ContentStatement"===i.type?(r||!s?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(i.original):void 0:s}function a(t,e,s){var i=t[null==e?0:e+1];if(i&&"ContentStatement"===i.type&&(s||!i.rightStripped)){var r=i.value;i.value=i.value.replace(s?/^\s+/:/^[ \t]*\r?\n?/,""),i.rightStripped=i.value!==r}}function o(t,e,s){var i=t[null==e?t.length-1:e-1];if(i&&"ContentStatement"===i.type&&(s||!i.leftStripped)){var r=i.value;return i.value=i.value.replace(s?/\s+$/:/[ \t]+$/,""),i.leftStripped=i.value!==r,i.leftStripped}}var h=s(8)["default"];e.__esModule=!0;var c=s(6),l=h(c);i.prototype=new l["default"],i.prototype.Program=function(t){var e=!this.isRootSeen;this.isRootSeen=!0;for(var s=t.body,i=0,h=s.length;h>i;i++){var c=s[i],l=this.accept(c);if(l){var p=r(s,i,e),u=n(s,i,e),f=l.openStandalone&&p,d=l.closeStandalone&&u,m=l.inlineStandalone&&p&&u;l.close&&a(s,i,!0),l.open&&o(s,i,!0),m&&(a(s,i),o(s,i)&&"PartialStatement"===c.type&&(c.indent=/([ \t]+$)/.exec(s[i-1].original)[1])),f&&(a((c.program||c.inverse).body),o(s,i)),d&&(a(s,i),o((c.inverse||c.program).body))}}return t},i.prototype.BlockStatement=function(t){this.accept(t.program),this.accept(t.inverse);var e=t.program||t.inverse,s=t.program&&t.inverse,i=s,h=s;if(s&&s.chained)for(i=s.body[0].program;h.chained;)h=h.body[h.body.length-1].program;var c={open:t.openStrip.open,close:t.closeStrip.close,openStandalone:n(e.body),closeStandalone:r((i||e).body)};if(t.openStrip.close&&a(e.body,null,!0),s){var l=t.inverseStrip;l.open&&o(e.body,null,!0),l.close&&a(i.body,null,!0),t.closeStrip.open&&o(h.body,null,!0),r(e.body)&&n(i.body)&&(o(e.body),a(i.body))}else t.closeStrip.open&&o(e.body,null,!0);return c},i.prototype.MustacheStatement=function(t){return t.strip},i.prototype.PartialStatement=i.prototype.CommentStatement=function(t){var e=t.strip||{};return{inlineStandalone:!0,open:e.open,close:e.close}},e["default"]=i,t.exports=e["default"]},function(t,e,s){"use strict";function i(t,e){this.source=t,this.start={line:e.first_line,column:e.first_column},this.end={line:e.last_line,column:e.last_column}}function r(t){return/^\[.*\]$/.test(t)?t.substr(1,t.length-2):t}function n(t,e){return{open:"~"===t.charAt(2),close:"~"===e.charAt(e.length-3)}}function a(t){return t.replace(/^\{\{~?\!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function o(t,e,s){s=this.locInfo(s);for(var i=t?"@":"",r=[],n=0,a="",o=0,h=e.length;h>o;o++){var c=e[o].part,l=e[o].original!==c;if(i+=(e[o].separator||"")+c,l||".."!==c&&"."!==c&&"this"!==c)r.push(c);else{if(r.length>0)throw new f["default"]("Invalid path: "+i,{loc:s});".."===c&&(n++,a+="../")}}return new this.PathExpression(t,n,r,i,s)}function h(t,e,s,i,r,n){var a=i.charAt(3)||i.charAt(2),o="{"!==a&&"&"!==a;return new this.MustacheStatement(t,e,s,o,r,this.locInfo(n))}function c(t,e,s,i){if(t.path.original!==s){var r={loc:t.path.loc};throw new f["default"](t.path.original+" doesn't match "+s,r)}i=this.locInfo(i);var n=new this.Program([e],null,{},i);return new this.BlockStatement(t.path,t.params,t.hash,n,void 0,{},{},{},i)}function l(t,e,s,i,r,n){if(i&&i.path&&t.path.original!==i.path.original){var a={loc:t.path.loc};throw new f["default"](t.path.original+" doesn't match "+i.path.original,a)}e.blockParams=t.blockParams;var o=void 0,h=void 0;return s&&(s.chain&&(s.program.body[0].closeStrip=i.strip),h=s.strip,o=s.program),r&&(r=o,o=e,e=r),new this.BlockStatement(t.path,t.params,t.hash,e,o,t.strip,h,i&&i.strip,this.locInfo(n))}var p=s(8)["default"];e.__esModule=!0,e.SourceLocation=i,e.id=r,e.stripFlags=n,e.stripComment=a,e.preparePath=o,e.prepareMustache=h,e.prepareRawBlock=c,e.prepareBlock=l;var u=s(12),f=p(u)},function(t,e,s){"use strict";function i(t,e,s){if(n.isArray(t)){for(var i=[],r=0,a=t.length;a>r;r++)i.push(e.wrap(t[r],s));return i}return"boolean"==typeof t||"number"==typeof t?t+"":t}function r(t){this.srcFile=t,this.source=[]}e.__esModule=!0;var n=s(13),a=void 0;try{}catch(o){}a||(a=function(t,e,s,i){this.src="",i&&this.add(i)},a.prototype={add:function(t){n.isArray(t)&&(t=t.join("")),this.src+=t},prepend:function(t){n.isArray(t)&&(t=t.join("")),this.src=t+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}}),r.prototype={prepend:function(t,e){this.source.unshift(this.wrap(t,e))},push:function(t,e){this.source.push(this.wrap(t,e))},merge:function(){var t=this.empty();return this.each(function(e){t.add([" ",e,"\n"])}),t},each:function(t){for(var e=0,s=this.source.length;s>e;e++)t(this.source[e])},empty:function(){var t=void 0===arguments[0]?this.currentLocation||{start:{}}:arguments[0];return new a(t.start.line,t.start.column,this.srcFile)},wrap:function(t){var e=void 0===arguments[1]?this.currentLocation||{start:{}}:arguments[1];return t instanceof a?t:(t=i(t,this,e),new a(e.start.line,e.start.column,this.srcFile,t)); 3 | },functionCall:function(t,e,s){return s=this.generateList(s),this.wrap([t,e?"."+e+"(":"(",s,")"])},quotedString:function(t){return'"'+(t+"").replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(t){var e=[];for(var s in t)if(t.hasOwnProperty(s)){var r=i(t[s],this);"undefined"!==r&&e.push([this.quotedString(s),":",r])}var n=this.generateList(e);return n.prepend("{"),n.add("}"),n},generateList:function(t,e){for(var s=this.empty(e),r=0,n=t.length;n>r;r++)r&&s.add(","),s.add(i(t[r],this,e));return s},generateArray:function(t,e){var s=this.generateList(t,e);return s.prepend("["),s.add("]"),s}},e["default"]=r,t.exports=e["default"]}])}); -------------------------------------------------------------------------------- /js/vendor/jquery-2.2.3.min.js: -------------------------------------------------------------------------------- 1 | /*! jQuery v2.2.3 | (c) jQuery Foundation | jquery.org/license */ 2 | !function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=a.document,e=c.slice,f=c.concat,g=c.push,h=c.indexOf,i={},j=i.toString,k=i.hasOwnProperty,l={},m="2.2.3",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return e.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:e.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a){return n.each(this,a)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(e.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor()},push:g,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){var b=a&&a.toString();return!n.isArray(a)&&b-parseFloat(b)+1>=0},isPlainObject:function(a){var b;if("object"!==n.type(a)||a.nodeType||n.isWindow(a))return!1;if(a.constructor&&!k.call(a,"constructor")&&!k.call(a.constructor.prototype||{},"isPrototypeOf"))return!1;for(b in a);return void 0===b||k.call(a,b)},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?i[j.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=d.createElement("script"),b.text=a,d.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b){var c,d=0;if(s(a)){for(c=a.length;c>d;d++)if(b.call(a[d],d,a[d])===!1)break}else for(d in a)if(b.call(a[d],d,a[d])===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):g.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:h.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,e,g=0,h=[];if(s(a))for(d=a.length;d>g;g++)e=b(a[g],g,c),null!=e&&h.push(e);else for(g in a)e=b(a[g],g,c),null!=e&&h.push(e);return f.apply([],h)},guid:1,proxy:function(a,b){var c,d,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(d=e.call(arguments,2),f=function(){return a.apply(b||this,d.concat(e.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:l}),"function"==typeof Symbol&&(n.fn[Symbol.iterator]=c[Symbol.iterator]),n.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(a,b){i["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=!!a&&"length"in a&&a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ga(),z=ga(),A=ga(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+M+"))|)"+L+"*\\]",O=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+N+")*)|.*)\\)|)",P=new RegExp(L+"+","g"),Q=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),R=new RegExp("^"+L+"*,"+L+"*"),S=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),T=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),U=new RegExp(O),V=new RegExp("^"+M+"$"),W={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M+"|[*])"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},X=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,Z=/^[^{]+\{\s*\[native \w/,$=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,_=/[+~]/,aa=/'|\\/g,ba=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),ca=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},da=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(ea){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fa(a,b,d,e){var f,h,j,k,l,o,r,s,w=b&&b.ownerDocument,x=b?b.nodeType:9;if(d=d||[],"string"!=typeof a||!a||1!==x&&9!==x&&11!==x)return d;if(!e&&((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,p)){if(11!==x&&(o=$.exec(a)))if(f=o[1]){if(9===x){if(!(j=b.getElementById(f)))return d;if(j.id===f)return d.push(j),d}else if(w&&(j=w.getElementById(f))&&t(b,j)&&j.id===f)return d.push(j),d}else{if(o[2])return H.apply(d,b.getElementsByTagName(a)),d;if((f=o[3])&&c.getElementsByClassName&&b.getElementsByClassName)return H.apply(d,b.getElementsByClassName(f)),d}if(c.qsa&&!A[a+" "]&&(!q||!q.test(a))){if(1!==x)w=b,s=a;else if("object"!==b.nodeName.toLowerCase()){(k=b.getAttribute("id"))?k=k.replace(aa,"\\$&"):b.setAttribute("id",k=u),r=g(a),h=r.length,l=V.test(k)?"#"+k:"[id='"+k+"']";while(h--)r[h]=l+" "+qa(r[h]);s=r.join(","),w=_.test(a)&&oa(b.parentNode)||b}if(s)try{return H.apply(d,w.querySelectorAll(s)),d}catch(y){}finally{k===u&&b.removeAttribute("id")}}}return i(a.replace(Q,"$1"),b,d,e)}function ga(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ha(a){return a[u]=!0,a}function ia(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ja(a,b){var c=a.split("|"),e=c.length;while(e--)d.attrHandle[c[e]]=b}function ka(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function la(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function na(a){return ha(function(b){return b=+b,ha(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function oa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=fa.support={},f=fa.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fa.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=n.documentElement,p=!f(n),(e=n.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",da,!1):e.attachEvent&&e.attachEvent("onunload",da)),c.attributes=ia(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ia(function(a){return a.appendChild(n.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Z.test(n.getElementsByClassName),c.getById=ia(function(a){return o.appendChild(a).id=u,!n.getElementsByName||!n.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ba,ca);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ba,ca);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return"undefined"!=typeof b.getElementsByClassName&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=Z.test(n.querySelectorAll))&&(ia(function(a){o.appendChild(a).innerHTML="",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ia(function(a){var b=n.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=Z.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ia(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",O)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=Z.test(o.compareDocumentPosition),t=b||Z.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===n||a.ownerDocument===v&&t(v,a)?-1:b===n||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,g=[a],h=[b];if(!e||!f)return a===n?-1:b===n?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return ka(a,b);c=a;while(c=c.parentNode)g.unshift(c);c=b;while(c=c.parentNode)h.unshift(c);while(g[d]===h[d])d++;return d?ka(g[d],h[d]):g[d]===v?-1:h[d]===v?1:0},n):n},fa.matches=function(a,b){return fa(a,null,null,b)},fa.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(T,"='$1']"),c.matchesSelector&&p&&!A[b+" "]&&(!r||!r.test(b))&&(!q||!q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fa(b,n,null,[a]).length>0},fa.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fa.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fa.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fa.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fa.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fa.selectors={cacheLength:50,createPseudo:ha,match:W,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ba,ca),a[3]=(a[3]||a[4]||a[5]||"").replace(ba,ca),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fa.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fa.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return W.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&U.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ba,ca).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fa.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(P," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h,t=!1;if(q){if(f){while(p){m=b;while(m=m[p])if(h?m.nodeName.toLowerCase()===r:1===m.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){m=q,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n&&j[2],m=n&&q.childNodes[n];while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if(1===m.nodeType&&++t&&m===b){k[a]=[w,n,t];break}}else if(s&&(m=b,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n),t===!1)while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if((h?m.nodeName.toLowerCase()===r:1===m.nodeType)&&++t&&(s&&(l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),k[a]=[w,t]),m===b))break;return t-=e,t===d||t%d===0&&t/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fa.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ha(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ha(function(a){var b=[],c=[],d=h(a.replace(Q,"$1"));return d[u]?ha(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ha(function(a){return function(b){return fa(a,b).length>0}}),contains:ha(function(a){return a=a.replace(ba,ca),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ha(function(a){return V.test(a||"")||fa.error("unsupported lang: "+a),a=a.replace(ba,ca).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Y.test(a.nodeName)},input:function(a){return X.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:na(function(){return[0]}),last:na(function(a,b){return[b-1]}),eq:na(function(a,b,c){return[0>c?c+b:c]}),even:na(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:na(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:na(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:na(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function ra(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j,k=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(j=b[u]||(b[u]={}),i=j[b.uniqueID]||(j[b.uniqueID]={}),(h=i[d])&&h[0]===w&&h[1]===f)return k[2]=h[2];if(i[d]=k,k[2]=a(b,c,g))return!0}}}function sa(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ta(a,b,c){for(var d=0,e=b.length;e>d;d++)fa(a,b[d],c);return c}function ua(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(c&&!c(f,d,e)||(g.push(f),j&&b.push(h)));return g}function va(a,b,c,d,e,f){return d&&!d[u]&&(d=va(d)),e&&!e[u]&&(e=va(e,f)),ha(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ta(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ua(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ua(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ua(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function wa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=ra(function(a){return a===b},h,!0),l=ra(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[ra(sa(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return va(i>1&&sa(m),i>1&&qa(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(Q,"$1"),c,e>i&&wa(a.slice(i,e)),f>e&&wa(a=a.slice(e)),f>e&&qa(a))}m.push(c)}return sa(m)}function xa(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,o,q,r=0,s="0",t=f&&[],u=[],v=j,x=f||e&&d.find.TAG("*",k),y=w+=null==v?1:Math.random()||.1,z=x.length;for(k&&(j=g===n||g||k);s!==z&&null!=(l=x[s]);s++){if(e&&l){o=0,g||l.ownerDocument===n||(m(l),h=!p);while(q=a[o++])if(q(l,g||n,h)){i.push(l);break}k&&(w=y)}c&&((l=!q&&l)&&r--,f&&t.push(l))}if(r+=s,c&&s!==r){o=0;while(q=b[o++])q(t,u,g,h);if(f){if(r>0)while(s--)t[s]||u[s]||(u[s]=F.call(i));u=ua(u)}H.apply(i,u),k&&!f&&u.length>0&&r+b.length>1&&fa.uniqueSort(i)}return k&&(w=y,j=v),t};return c?ha(f):f}return h=fa.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xa(e,d)),f.selector=a}return f},i=fa.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ba,ca),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=W.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ba,ca),_.test(j[0].type)&&oa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qa(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,!b||_.test(a)&&oa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ia(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ia(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||ja("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ia(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ja("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ia(function(a){return null==a.getAttribute("disabled")})||ja(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fa}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.uniqueSort=n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},v=function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c},w=n.expr.match.needsContext,x=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,y=/^.[^:#\[\.,]*$/;function z(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(y.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return h.call(b,a)>-1!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(z(this,a||[],!1))},not:function(a){return this.pushStack(z(this,a||[],!0))},is:function(a){return!!z(this,"string"==typeof a&&w.test(a)?n(a):a||[],!1).length}});var A,B=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=n.fn.init=function(a,b,c){var e,f;if(!a)return this;if(c=c||A,"string"==typeof a){if(e="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:B.exec(a),!e||!e[1]&&b)return!b||b.jquery?(b||c).find(a):this.constructor(b).find(a);if(e[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(e[1],b&&b.nodeType?b.ownerDocument||b:d,!0)),x.test(e[1])&&n.isPlainObject(b))for(e in b)n.isFunction(this[e])?this[e](b[e]):this.attr(e,b[e]);return this}return f=d.getElementById(e[2]),f&&f.parentNode&&(this.length=1,this[0]=f),this.context=d,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?void 0!==c.ready?c.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};C.prototype=n.fn,A=n(d);var D=/^(?:parents|prev(?:Until|All))/,E={children:!0,contents:!0,next:!0,prev:!0};n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=w.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.uniqueSort(f):f)},index:function(a){return a?"string"==typeof a?h.call(n(a),this[0]):h.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.uniqueSort(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function F(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return u(a,"parentNode")},parentsUntil:function(a,b,c){return u(a,"parentNode",c)},next:function(a){return F(a,"nextSibling")},prev:function(a){return F(a,"previousSibling")},nextAll:function(a){return u(a,"nextSibling")},prevAll:function(a){return u(a,"previousSibling")},nextUntil:function(a,b,c){return u(a,"nextSibling",c)},prevUntil:function(a,b,c){return u(a,"previousSibling",c)},siblings:function(a){return v((a.parentNode||{}).firstChild,a)},children:function(a){return v(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(E[a]||n.uniqueSort(e),D.test(a)&&e.reverse()),this.pushStack(e)}});var G=/\S+/g;function H(a){var b={};return n.each(a.match(G)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?H(a):n.extend({},a);var b,c,d,e,f=[],g=[],h=-1,i=function(){for(e=a.once,d=b=!0;g.length;h=-1){c=g.shift();while(++h-1)f.splice(c,1),h>=c&&h--}),this},has:function(a){return a?n.inArray(a,f)>-1:f.length>0},empty:function(){return f&&(f=[]),this},disable:function(){return e=g=[],f=c="",this},disabled:function(){return!f},lock:function(){return e=g=[],c||(f=c=""),this},locked:function(){return!!e},fireWith:function(a,c){return e||(c=c||[],c=[a,c.slice?c.slice():c],g.push(c),b||i()),this},fire:function(){return j.fireWith(this,arguments),this},fired:function(){return!!d}};return j},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().progress(c.notify).done(c.resolve).fail(c.reject):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=e.call(arguments),d=c.length,f=1!==d||a&&n.isFunction(a.promise)?d:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(d){b[a]=this,c[a]=arguments.length>1?e.call(arguments):d,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(d>1)for(i=new Array(d),j=new Array(d),k=new Array(d);d>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().progress(h(b,j,i)).done(h(b,k,c)).fail(g.reject):--f;return f||g.resolveWith(k,c),g.promise()}});var I;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(I.resolveWith(d,[n]),n.fn.triggerHandler&&(n(d).triggerHandler("ready"),n(d).off("ready"))))}});function J(){d.removeEventListener("DOMContentLoaded",J),a.removeEventListener("load",J),n.ready()}n.ready.promise=function(b){return I||(I=n.Deferred(),"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll?a.setTimeout(n.ready):(d.addEventListener("DOMContentLoaded",J),a.addEventListener("load",J))),I.promise(b)},n.ready.promise();var K=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)K(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},L=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function M(){this.expando=n.expando+M.uid++}M.uid=1,M.prototype={register:function(a,b){var c=b||{};return a.nodeType?a[this.expando]=c:Object.defineProperty(a,this.expando,{value:c,writable:!0,configurable:!0}),a[this.expando]},cache:function(a){if(!L(a))return{};var b=a[this.expando];return b||(b={},L(a)&&(a.nodeType?a[this.expando]=b:Object.defineProperty(a,this.expando,{value:b,configurable:!0}))),b},set:function(a,b,c){var d,e=this.cache(a);if("string"==typeof b)e[b]=c;else for(d in b)e[d]=b[d];return e},get:function(a,b){return void 0===b?this.cache(a):a[this.expando]&&a[this.expando][b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=a[this.expando];if(void 0!==f){if(void 0===b)this.register(a);else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in f?d=[b,e]:(d=e,d=d in f?[d]:d.match(G)||[])),c=d.length;while(c--)delete f[d[c]]}(void 0===b||n.isEmptyObject(f))&&(a.nodeType?a[this.expando]=void 0:delete a[this.expando])}},hasData:function(a){var b=a[this.expando];return void 0!==b&&!n.isEmptyObject(b)}};var N=new M,O=new M,P=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Q=/[A-Z]/g;function R(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(Q,"-$&").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:P.test(c)?n.parseJSON(c):c; 3 | }catch(e){}O.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return O.hasData(a)||N.hasData(a)},data:function(a,b,c){return O.access(a,b,c)},removeData:function(a,b){O.remove(a,b)},_data:function(a,b,c){return N.access(a,b,c)},_removeData:function(a,b){N.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=O.get(f),1===f.nodeType&&!N.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),R(f,d,e[d])));N.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){O.set(this,a)}):K(this,function(b){var c,d;if(f&&void 0===b){if(c=O.get(f,a)||O.get(f,a.replace(Q,"-$&").toLowerCase()),void 0!==c)return c;if(d=n.camelCase(a),c=O.get(f,d),void 0!==c)return c;if(c=R(f,d,void 0),void 0!==c)return c}else d=n.camelCase(a),this.each(function(){var c=O.get(this,d);O.set(this,d,b),a.indexOf("-")>-1&&void 0!==c&&O.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){O.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=N.get(a,b),c&&(!d||n.isArray(c)?d=N.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return N.get(a,c)||N.access(a,c,{empty:n.Callbacks("once memory").add(function(){N.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length",""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};$.optgroup=$.option,$.tbody=$.tfoot=$.colgroup=$.caption=$.thead,$.th=$.td;function _(a,b){var c="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function aa(a,b){for(var c=0,d=a.length;d>c;c++)N.set(a[c],"globalEval",!b||N.get(b[c],"globalEval"))}var ba=/<|&#?\w+;/;function ca(a,b,c,d,e){for(var f,g,h,i,j,k,l=b.createDocumentFragment(),m=[],o=0,p=a.length;p>o;o++)if(f=a[o],f||0===f)if("object"===n.type(f))n.merge(m,f.nodeType?[f]:f);else if(ba.test(f)){g=g||l.appendChild(b.createElement("div")),h=(Y.exec(f)||["",""])[1].toLowerCase(),i=$[h]||$._default,g.innerHTML=i[1]+n.htmlPrefilter(f)+i[2],k=i[0];while(k--)g=g.lastChild;n.merge(m,g.childNodes),g=l.firstChild,g.textContent=""}else m.push(b.createTextNode(f));l.textContent="",o=0;while(f=m[o++])if(d&&n.inArray(f,d)>-1)e&&e.push(f);else if(j=n.contains(f.ownerDocument,f),g=_(l.appendChild(f),"script"),j&&aa(g),c){k=0;while(f=g[k++])Z.test(f.type||"")&&c.push(f)}return l}!function(){var a=d.createDocumentFragment(),b=a.appendChild(d.createElement("div")),c=d.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),l.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="",l.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var da=/^key/,ea=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,fa=/^([^.]*)(?:\.(.+)|)/;function ga(){return!0}function ha(){return!1}function ia(){try{return d.activeElement}catch(a){}}function ja(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)ja(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=ha;else if(!e)return a;return 1===f&&(g=e,e=function(a){return n().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=n.guid++)),a.each(function(){n.event.add(this,b,e,d,c)})}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=N.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return"undefined"!=typeof n&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(G)||[""],j=b.length;while(j--)h=fa.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=N.hasData(a)&&N.get(a);if(r&&(i=r.events)){b=(b||"").match(G)||[""],j=b.length;while(j--)if(h=fa.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&N.remove(a,"handle events")}},dispatch:function(a){a=n.event.fix(a);var b,c,d,f,g,h=[],i=e.call(arguments),j=(N.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())a.rnamespace&&!a.rnamespace.test(g.namespace)||(a.handleObj=g,a.data=g.data,d=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==d&&(a.result=d)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&("click"!==a.type||isNaN(a.button)||a.button<1))for(;i!==this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>-1:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h]*)\/>/gi,la=/\s*$/g;function pa(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function qa(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function ra(a){var b=na.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function sa(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(N.hasData(a)&&(f=N.access(a),g=N.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)n.event.add(b,e,j[e][c])}O.hasData(a)&&(h=O.access(a),i=n.extend({},h),O.set(b,i))}}function ta(a,b){var c=b.nodeName.toLowerCase();"input"===c&&X.test(a.type)?b.checked=a.checked:"input"!==c&&"textarea"!==c||(b.defaultValue=a.defaultValue)}function ua(a,b,c,d){b=f.apply([],b);var e,g,h,i,j,k,m=0,o=a.length,p=o-1,q=b[0],r=n.isFunction(q);if(r||o>1&&"string"==typeof q&&!l.checkClone&&ma.test(q))return a.each(function(e){var f=a.eq(e);r&&(b[0]=q.call(this,e,f.html())),ua(f,b,c,d)});if(o&&(e=ca(b,a[0].ownerDocument,!1,a,d),g=e.firstChild,1===e.childNodes.length&&(e=g),g||d)){for(h=n.map(_(e,"script"),qa),i=h.length;o>m;m++)j=e,m!==p&&(j=n.clone(j,!0,!0),i&&n.merge(h,_(j,"script"))),c.call(a[m],j,m);if(i)for(k=h[h.length-1].ownerDocument,n.map(h,ra),m=0;i>m;m++)j=h[m],Z.test(j.type||"")&&!N.access(j,"globalEval")&&n.contains(k,j)&&(j.src?n._evalUrl&&n._evalUrl(j.src):n.globalEval(j.textContent.replace(oa,"")))}return a}function va(a,b,c){for(var d,e=b?n.filter(b,a):a,f=0;null!=(d=e[f]);f++)c||1!==d.nodeType||n.cleanData(_(d)),d.parentNode&&(c&&n.contains(d.ownerDocument,d)&&aa(_(d,"script")),d.parentNode.removeChild(d));return a}n.extend({htmlPrefilter:function(a){return a.replace(ka,"<$1>")},clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=n.contains(a.ownerDocument,a);if(!(l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(g=_(h),f=_(a),d=0,e=f.length;e>d;d++)ta(f[d],g[d]);if(b)if(c)for(f=f||_(a),g=g||_(h),d=0,e=f.length;e>d;d++)sa(f[d],g[d]);else sa(a,h);return g=_(h,"script"),g.length>0&&aa(g,!i&&_(a,"script")),h},cleanData:function(a){for(var b,c,d,e=n.event.special,f=0;void 0!==(c=a[f]);f++)if(L(c)){if(b=c[N.expando]){if(b.events)for(d in b.events)e[d]?n.event.remove(c,d):n.removeEvent(c,d,b.handle);c[N.expando]=void 0}c[O.expando]&&(c[O.expando]=void 0)}}}),n.fn.extend({domManip:ua,detach:function(a){return va(this,a,!0)},remove:function(a){return va(this,a)},text:function(a){return K(this,function(a){return void 0===a?n.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=a)})},null,a,arguments.length)},append:function(){return ua(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=pa(this,a);b.appendChild(a)}})},prepend:function(){return ua(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=pa(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return ua(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return ua(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(n.cleanData(_(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return K(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!la.test(a)&&!$[(Y.exec(a)||["",""])[1].toLowerCase()]){a=n.htmlPrefilter(a);try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(_(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=[];return ua(this,arguments,function(b){var c=this.parentNode;n.inArray(this,a)<0&&(n.cleanData(_(this)),c&&c.replaceChild(b,this))},a)}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=[],e=n(a),f=e.length-1,h=0;f>=h;h++)c=h===f?this:this.clone(!0),n(e[h])[b](c),g.apply(d,c.get());return this.pushStack(d)}});var wa,xa={HTML:"block",BODY:"block"};function ya(a,b){var c=n(b.createElement(a)).appendTo(b.body),d=n.css(c[0],"display");return c.detach(),d}function za(a){var b=d,c=xa[a];return c||(c=ya(a,b),"none"!==c&&c||(wa=(wa||n("