atome 0.5.1.9 → 0.5.2.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (91) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +22 -5
  3. data/lib/atome/atome.rb +46 -21
  4. data/lib/atome/extensions/atome.rb +5 -26
  5. data/lib/atome/extensions/geolocation.rb +0 -1
  6. data/lib/atome/extensions/matrix.rb +171 -0
  7. data/lib/atome/extensions/ping.rb +9 -11
  8. data/lib/atome/genesis/generators/atome.rb +14 -2
  9. data/lib/atome/genesis/generators/communication.rb +1 -1
  10. data/lib/atome/genesis/generators/event.rb +32 -3
  11. data/lib/atome/genesis/generators/identity.rb +32 -0
  12. data/lib/atome/genesis/generators/material.rb +21 -0
  13. data/lib/atome/genesis/generators/spatial.rb +1 -0
  14. data/lib/atome/genesis/generators/time.rb +5 -0
  15. data/lib/atome/genesis/generators/utility.rb +20 -2
  16. data/lib/atome/genesis/genesis.rb +4 -4
  17. data/lib/atome/genesis/sparkle.rb +1 -1
  18. data/lib/atome/helpers/callbacks.rb +36 -29
  19. data/lib/atome/helpers/essentials.rb +5 -2
  20. data/lib/atome/helpers/utilities.rb +59 -10
  21. data/lib/atome/kernel/universe.rb +3 -7
  22. data/lib/atome/presets/atome.rb +11 -7
  23. data/lib/atome/renderers/browser/atome.rb +7 -7
  24. data/lib/atome/renderers/browser/browser.rb +6 -2
  25. data/lib/atome/renderers/browser/effect.rb +2 -2
  26. data/lib/atome/renderers/browser/event.rb +25 -19
  27. data/lib/atome/renderers/browser/geometry.rb +2 -2
  28. data/lib/atome/renderers/browser/helpers/animation_helper.rb +69 -0
  29. data/lib/atome/renderers/browser/helpers/browser_helper.rb +0 -1
  30. data/lib/atome/renderers/browser/helpers/color_helper.rb +0 -2
  31. data/lib/atome/renderers/browser/helpers/drag_helper.rb +6 -6
  32. data/lib/atome/renderers/browser/helpers/effect_helper.rb +1 -0
  33. data/lib/atome/renderers/browser/helpers/event_helper.rb +59 -0
  34. data/lib/atome/renderers/browser/helpers/video_helper.rb +10 -3
  35. data/lib/atome/renderers/browser/identity.rb +10 -3
  36. data/lib/atome/renderers/browser/material.rb +28 -5
  37. data/lib/atome/renderers/browser/spatial.rb +36 -5
  38. data/lib/atome/renderers/browser/time.rb +3 -0
  39. data/lib/atome/renderers/browser/utility.rb +20 -11
  40. data/lib/atome/renderers/headless/utility.rb +2 -2
  41. data/lib/atome/renderers/html/atome.rb +5 -5
  42. data/lib/atome/renderers/html/effect.rb +1 -1
  43. data/lib/atome/renderers/html/event.rb +1 -1
  44. data/lib/atome/renderers/html/geometry.rb +2 -2
  45. data/lib/atome/renderers/html/html.rb +1 -1
  46. data/lib/atome/renderers/html/identity.rb +2 -2
  47. data/lib/atome/renderers/html/spatial.rb +5 -5
  48. data/lib/atome/renderers/html/utility.rb +7 -7
  49. data/lib/atome/renderers/server/utility.rb +2 -2
  50. data/lib/atome/version.rb +1 -1
  51. data/lib/atome.rb +7 -3
  52. data/sig/atome.rbs +6 -0
  53. data/sig/atome_js.rbs +1 -0
  54. data/vendor/assets/build/css/style.css +23 -16
  55. data/vendor/assets/build/index.html +4 -2
  56. data/vendor/assets/build/js/third_parties/wad.min.js +9 -0
  57. data/vendor/assets/build/medias/audios/Binrpilot.mp3 +0 -0
  58. data/vendor/assets/build/medias/rubies/examples/_2_solve.rb +24 -2
  59. data/vendor/assets/build/medias/rubies/examples/_audio.rb +178 -0
  60. data/vendor/assets/build/medias/rubies/examples/_dataset.rb +80 -0
  61. data/vendor/assets/build/medias/rubies/examples/_os.rb +29 -0
  62. data/vendor/assets/build/medias/rubies/examples/_test.rb +1 -0
  63. data/vendor/assets/build/medias/rubies/examples/_vie.rb +211 -0
  64. data/vendor/assets/build/medias/rubies/examples/add.rb +25 -0
  65. data/vendor/assets/build/medias/rubies/examples/animation.rb +81 -0
  66. data/vendor/assets/build/medias/rubies/examples/{atome.new.rb → atome_new.rb} +5 -5
  67. data/vendor/assets/build/medias/rubies/examples/bottom.rb +1 -1
  68. data/vendor/assets/build/medias/rubies/examples/center.rb +21 -0
  69. data/vendor/assets/build/medias/rubies/examples/clone.rb +35 -0
  70. data/vendor/assets/build/medias/rubies/examples/color.rb +20 -15
  71. data/vendor/assets/build/medias/rubies/examples/cursor.rb +7 -0
  72. data/vendor/assets/build/medias/rubies/examples/delete.rb +25 -3
  73. data/vendor/assets/build/medias/rubies/examples/drag.rb +3 -2
  74. data/vendor/assets/build/medias/rubies/examples/edit.rb +12 -0
  75. data/vendor/assets/build/medias/rubies/examples/empty_atome.rb +12 -0
  76. data/vendor/assets/build/medias/rubies/examples/hide.rb +7 -0
  77. data/vendor/assets/build/medias/rubies/examples/markers.rb +48 -0
  78. data/vendor/assets/build/medias/rubies/examples/matrix.rb +58 -0
  79. data/vendor/assets/build/medias/rubies/examples/monitoring.rb +22 -11
  80. data/vendor/assets/build/medias/rubies/examples/play.rb +1 -1
  81. data/vendor/assets/build/medias/rubies/examples/read.rb +7 -4
  82. data/vendor/assets/build/medias/rubies/examples/remove.rb +16 -0
  83. data/vendor/assets/build/medias/rubies/examples/right.rb +1 -1
  84. data/vendor/assets/build/medias/rubies/examples/shadow.rb +8 -1
  85. data/vendor/assets/build/medias/rubies/examples/sort.rb +7 -4
  86. data/vendor/assets/build/medias/rubies/examples/style.rb +4 -0
  87. data/vendor/assets/build/medias/rubies/examples/touch.rb +50 -7
  88. data/vendor/assets/build/medias/texts/lorem.txt +1 -0
  89. metadata +28 -5
  90. data/vendor/assets/build/medias/rubies/examples/_animation.rb +0 -46
  91. data/vendor/assets/build/medias/rubies/examples/at.rb +0 -17
@@ -0,0 +1,9 @@
1
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Wad=e():t.Wad=e()}(window,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=9)}([function(t,e,n){"use strict";n.r(e),n.d(e,"logStats",(function(){return h})),n.d(e,"logMessage",(function(){return p})),n.d(e,"audioCache",(function(){return f})),n.d(e,"context",(function(){return c})),n.d(e,"noiseBuffer",(function(){return y})),n.d(e,"constructEnv",(function(){return m})),n.d(e,"constructFilter",(function(){return b})),n.d(e,"requestAudioFile",(function(){return _})),n.d(e,"constructVibrato",(function(){return w})),n.d(e,"constructTremolo",(function(){return x})),n.d(e,"constructReverb",(function(){return k})),n.d(e,"constructPanning",(function(){return T})),n.d(e,"constructDelay",(function(){return O})),n.d(e,"constructCompressor",(function(){return I})),n.d(e,"getConsent",(function(){return j})),n.d(e,"permissionsGranted",(function(){return A})),n.d(e,"setUpMic",(function(){return M})),n.d(e,"setUpPanningOnPlay",(function(){return D})),n.d(e,"setUpVibratoOnPlay",(function(){return N})),n.d(e,"setUpTremoloOnPlay",(function(){return E})),n.d(e,"setUpDelayOnPlay",(function(){return B})),n.d(e,"setUpTunaOnPlay",(function(){return z})),n.d(e,"plugEmIn",(function(){return R})),n.d(e,"setUpEnvOnPlay",(function(){return P})),n.d(e,"setUpFilterOnPlay",(function(){return F})),n.d(e,"setUpReverbOnPlay",(function(){return q})),n.d(e,"filterEnv",(function(){return S})),n.d(e,"playEnv",(function(){return L})),n.d(e,"setUpOscillator",(function(){return C})),n.d(e,"createFilters",(function(){return G}));var r=n(3),i=n.n(r),a=n(5),o=n(2),u=n(1),s=n.n(u);let c,l=window.AudioContext||window.webkitAudioContext,f={},h={verbosity:0,suppressedLogs:0},p=function(t,e){e=e||1,h.verbosity>=e?console.log(t):h.suppressedLogs++},d=document.querySelector("a-scene");d&&d.audioListener&&d.audioListener.context?(c=d.audioListener.context,p("An A-Frame scene has been detected.")):c=new l;let v=function(){p("unlock",2),"suspended"===c.state?(p("suspended",2),c.resume()):"running"===c.state&&(p("The audio context is running.",2),p(c,2),window.removeEventListener("click",v),window.removeEventListener("touchstart",v),window.removeEventListener("touchend",v))};window.addEventListener("click",v),window.addEventListener("touchstart",v),window.addEventListener("touchend",v);let g=function(t){if(t.navigator.mediaDevices&&t.navigator.mediaDevices.getUserMedia)return t.navigator.mediaDevices.getUserMedia.bind(t.navigator.mediaDevices);let e=t.navigator.getUserMedia||t.navigator.webkitGetUserMedia||t.navigator.mozGetUserMedia;return e?function(n){return new Promise((function(r,i){e.call(t.navigator,n,r,i)}))}:function(){throw"getUserMedia is unsupported"}}(window);p(g?"Your browser supports getUserMedia.":"Your browser does not support getUserMedia.");let y=function(){Math.seed=6,Math.seededRandom=function(t,e){return t=t||1,e=e||0,Math.seed=(9301*Math.seed+49297)%233280,e+Math.seed/233280*(t-e)};for(var t=2*c.sampleRate,e=c.createBuffer(1,t,c.sampleRate),n=e.getChannelData(0),r=0;r<t;r++)n[r]=2*Math.seededRandom()-1;return e}(),m=function(t){return{attack:s.a.get(t,"env.attack",0),decay:s.a.get(t,"env.decay",0),sustain:s.a.get(t,"env.sustain",1),hold:s.a.get(t,"env.hold",3.14159),release:s.a.get(t,"env.release",0)}},b=function(t){return t.filter?s.a.isArray(t.filter)?t.filter.map((function(t){return{type:t.type||"lowpass",frequency:t.frequency||600,q:t.q||1,env:t.env||null}})):[{type:t.filter.type||"lowpass",frequency:t.filter.frequency||600,q:t.filter.q||1,env:t.filter.env||null}]:null},_=function(t,e){let n;t.playable--,t.useCache&&f[t.source]?n=f[t.source]:(n=fetch(t.source).then(t=>t.arrayBuffer()).then(t=>c.decodeAudioData(t)),t.useCache&&(f[t.source]=n)),n.then(n=>{t.decodedBuffer=n,3.14159===t.env.hold&&(t.defaultEnv.hold=t.decodedBuffer.duration*(1/t.rate),t.env.hold=t.decodedBuffer.duration*(1/t.rate)),t.duration=1e3*t.env.hold,e&&e(t),t.playable++,t.playOnLoad&&t.play(t.playOnLoadArg)})},w=function(t){return t.vibrato?{shape:s.a.get(t,"vibrato.shape","sine"),speed:s.a.get(t,"vibrato.speed",1),magnitude:s.a.get(t,"vibrato.magnitude",5),attack:s.a.get(t,"vibrato.attack",0)}:null},x=function(t){return t.tremolo?{shape:s.a.get(t,"tremolo.shape","sine"),speed:s.a.get(t,"tremolo.speed",1),magnitude:s.a.get(t,"tremolo.magnitude",5),attack:s.a.get(t,"tremolo.attack",1)}:null},k=function(t,e){if(e.reverb){var n=e.reverb.impulse||"https://frivolous.biz/audio/widehall.wav",r=new XMLHttpRequest;return r.open("GET",n,!0),r.responseType="arraybuffer",t.playable--,r.onload=function(){c.decodeAudioData(r.response,(function(n){t.reverb.buffer=n,t.playable++,t.playOnLoad&&t.play(t.playOnLoadArg),t instanceof a.a&&t.setUp(e),"mic"===t.source&&t.reverb&&t.reverb.buffer&&t.reverb.node&&!t.reverb.node.buffer&&(t.reverb.node.convolver.buffer=t.reverb.buffer)}))},r.send(),{wet:s.a.get(e,"reverb.wet",1)}}return null},T=function(t){let e=null;return"panning"in t?(e={location:t.panning},"number"==typeof t.panning?e.type="stereo":(e.type="3d",e.panningModel=t.panningModel||"equalpower",e.distanceModel=t.distanceModel,e.maxDistance=t.maxDistance,e.rolloffFactor=t.rolloffFactor,e.refDistance=t.refDistance,e.coneInnerAngle=t.coneInnerAngle,e.coneOuterAngle=t.coneOuterAngle,e.coneOuterGain=t.coneOuterGain)):e={location:0,type:"stereo"},"stereo"!==e.type||c.createStereoPanner||(p("Your browser does not support stereo panning. Falling back to 3D panning."),e={location:[0,0,0],type:"3d",panningModel:"equalpower"}),e},O=function(t){return t.delay?{delayTime:s.a.get(t,"delay.delayTime",.5),maxDelayTime:s.a.get(t,"delay.maxDelayTime",2),feedback:s.a.get(t,"delay.feedback",.25),wet:s.a.get(t,"delay.wet",.25)}:null},A={micConsent:!1},j=function(t,e){return t.nodes=[],t.mediaStreamSource=null,t.gain=null,g({audio:!0,video:!1}).then((function(n){return t.mediaStreamSource=c.createMediaStreamSource(n),A.micConsent=!0,M(t,e),t})).catch((function(t){p("Error setting up microphone input: ",t)}))},M=function(t,e){t.nodes=[],t.gain=c.createGain(),t.gain.gain.value=s.a.get(e,"volume",t.volume),t.nodes.push(t.mediaStreamSource),t.nodes.push(t.gain),(t.filter||e.filter)&&G(t,e),(t.reverb||e.reverb)&&q(t,e),T(t,e),D(t,e),(t.delay||e.delay)&&B(t,e),z(t,e),t.setUpExternalFxOnPlay(e,c)},S=function(t,e){t.filter.forEach((function(t,n){t.node.frequency.linearRampToValueAtTime(t.frequency,e.exactTime),t.node.frequency.linearRampToValueAtTime(t.env.frequency,e.exactTime+t.env.attack)}))},L=function(t,e){let n,r=e.loop||e.loop;n=-1!==t.env.hold&&(!r||t.userSetHold||e.env&&e.env.hold)?t.env.hold:999,t.gain[0].gain.linearRampToValueAtTime(1e-4,e.exactTime),t.gain[0].gain.linearRampToValueAtTime(t.volume,e.exactTime+t.env.attack+1e-5),t.gain[0].gain.linearRampToValueAtTime(t.volume*t.env.sustain,e.exactTime+t.env.attack+t.env.decay+2e-5),t.gain[0].gain.linearRampToValueAtTime(t.volume*t.env.sustain,e.exactTime+t.env.attack+t.env.decay+n+3e-5),t.gain[0].gain.linearRampToValueAtTime(1e-4,e.exactTime+t.env.attack+t.env.decay+n+t.env.release+4e-5),t.soundSource.start(e.exactTime,e.offset),t.soundSource.playbackRate||t.soundSource.stop(e.exactTime+t.env.attack+t.env.decay+n+t.env.release+5e-5)},R=function(t,e){let n,r=e&&e.destination||t.destination;for(let e=1;e<t.nodes.length;e++){let n,r;n="custom"===t.nodes[e-1].interface?t.nodes[e-1].output:t.nodes[e-1],r="custom"===t.nodes[e].interface?t.nodes[e].input:t.nodes[e],n.connect(r)}n="custom"===t.nodes[t.nodes.length-1].interface?t.nodes[t.nodes.length-1].output:t.nodes[t.nodes.length-1],n.connect(r)},C=function(t,e){e=e||{},t.soundSource=c.createOscillator(),t.soundSource.type=t.source,e.pitch?e.pitch in o.a?t.soundSource.frequency.value=o.a[e.pitch]:t.soundSource.frequency.value=e.pitch:t.soundSource.frequency.value=t.pitch},P=function(t,e){e&&e.env?(t.env.attack=s.a.get(e,"env.attack",t.defaultEnv.attack),t.env.decay=s.a.get(e,"env.decay",t.defaultEnv.decay),t.env.sustain=s.a.get(e,"env.sustain",t.defaultEnv.sustain),t.env.hold=s.a.get(e,"env.hold",t.defaultEnv.hold),t.env.release=s.a.get(e,"env.release",t.defaultEnv.release)):t.env={attack:t.defaultEnv.attack,decay:t.defaultEnv.decay,sustain:t.defaultEnv.sustain,hold:t.defaultEnv.hold,release:t.defaultEnv.release}},G=function(t,e){e.filter&&!s.a.isArray(e.filter)&&(e.filter=[e.filter]),t.filter.forEach((function(n,r){n.node=c.createBiquadFilter(),n.node.type=n.type,n.node.frequency.value=e.filter&&e.filter[r]&&e.filter[r].frequency||n.frequency,n.node.Q.value=e.filter&&e.filter[r]&&e.filter[r].q||n.q,(e.filter&&e.filter[r].env||t.filter[r].env)&&"mic"!==t.source&&(n.env={attack:e.filter&&e.filter[r].env&&e.filter[r].env.attack||t.filter[r].env.attack,frequency:e.filter&&e.filter[r].env&&e.filter[r].env.frequency||t.filter[r].env.frequency}),t.nodes.push(n.node)}))},F=function(t,e){e&&e.filter&&t.filter?(s.a.isArray(e.filter)||(e.filter=[e.filter]),G(t,e)):t.filter&&G(t,t)},q=function(t,e){var n={interface:"custom",input:c.createGain(),convolver:c.createConvolver(),wet:c.createGain(),output:c.createGain()};n.convolver.buffer=t.reverb.buffer,n.wet.gain.value=t.reverb.wet,n.input.connect(n.convolver),n.input.connect(n.output),n.convolver.connect(n.wet),n.wet.connect(n.output),t.reverb.node=n,t.nodes.push(t.reverb.node)},D=function(t,e){var n=e&&e.panning;void 0===n&&(n=t.panning.location),"number"==typeof n&&c.createStereoPanner?(t.panning.node=c.createStereoPanner(),t.panning.node.pan.value=n,t.panning.type="stereo"):(t.panning.node=c.createPanner(),"number"==typeof n?t.panning.node.setPosition(n,0,0):t.panning.node.setPosition(n[0],n[1],n[2]),t.panning.node.panningModel=e.panningModel||t.panningModel||"equalpower",t.panning.type="3d",t.panning.node.distanceModel=e.distanceModel||t.distanceModel||t.panning.node.distanceModel,t.panning.node.maxDistance=e.maxDistance||t.maxDistance||t.panning.node.maxDistance,t.panning.node.rolloffFactor=e.rolloffFactor||t.rolloffFactor||t.panning.node.rolloffFactor,t.panning.node.refDistance=e.refDistance||t.refDistance||t.panning.node.refDistance,t.panning.node.coneInnerAngle=e.coneInnerAngle||t.coneInnerAngle||t.panning.node.coneInnerAngle,t.panning.node.coneOuterAngle=e.coneOuterAngle||t.coneOuterAngle||t.panning.node.coneOuterAngle,t.panning.node.coneOuterGain=e.coneOuterGain||t.coneOuterGain||t.panning.node.coneOuterGain),t.nodes.push(t.panning.node)},N=function(t,e,n){t.vibrato.wad=new n({source:t.vibrato.shape,pitch:t.vibrato.speed,volume:t.vibrato.magnitude,env:{attack:t.vibrato.attack},destination:t.soundSource.frequency}),t.vibrato.wad.play()},E=function(t,e,n){t.tremolo.wad=new n({source:t.tremolo.shape,pitch:t.tremolo.speed,volume:t.tremolo.magnitude,env:{attack:t.tremolo.attack,hold:10},destination:t.gain[0].gain}),t.tremolo.wad.play()},B=function(t,e){if(t.delay){e.delay||(e.delay={});var n={interface:"custom",input:c.createGain(),output:c.createGain(),delayNode:c.createDelay(t.delay.maxDelayTime),feedbackNode:c.createGain(),wetNode:c.createGain()};n.delayNode.delayTime.value=s.a.get(e,"delay.delayTime",t.delay.delayTime),n.feedbackNode.gain.value=s.a.get(e,"delay.feedback",t.delay.feedback),n.wetNode.gain.value=s.a.get(e,"delay.wet",t.delay.wet),n.input.connect(n.delayNode),n.input.connect(n.output),n.delayNode.connect(n.feedbackNode),n.delayNode.connect(n.wetNode),n.feedbackNode.connect(n.delayNode),n.wetNode.connect(n.output),t.delay.delayNode=n,t.nodes.push(n)}},I=function(t,e){t.compressor=c.createDynamicsCompressor(),t.compressor.attack.value=s.a.get(e,"compressor.attack",t.compressor.attack.value),t.compressor.knee.value=s.a.get(e,"compressor.knee",t.compressor.knee.value),t.compressor.ratio.value=s.a.get(e,"compressor.ratio",t.compressor.ratio.value),t.compressor.release.value=s.a.get(e,"compressor.release",t.compressor.release.value),t.compressor.threshold.value=s.a.get(e,"compressor.threshold",t.compressor.threshold.value),t.nodes.push(t.compressor)},U=new i.a(c),z=function(t,e){if(!t.tuna&&!e.tuna)return;let n={};if(t.tuna)for(let e in t.tuna)n[e]=t.tuna[e];if(e.tuna)for(let t in e.tuna)n[t]=e.tuna[t];for(let e in n){let r=new U[e](n[e]);t.nodes.push(r)}}},function(t,e,n){(function(t,r){var i;
2
+ /**
3
+ * @license
4
+ * Lodash <https://lodash.com/>
5
+ * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
6
+ * Released under MIT license <https://lodash.com/license>
7
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
8
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
9
+ */(function(){var a="Expected a function",o="__lodash_placeholder__",u=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],s="[object Arguments]",c="[object Array]",l="[object Boolean]",f="[object Date]",h="[object Error]",p="[object Function]",d="[object GeneratorFunction]",v="[object Map]",g="[object Number]",y="[object Object]",m="[object RegExp]",b="[object Set]",_="[object String]",w="[object Symbol]",x="[object WeakMap]",k="[object ArrayBuffer]",T="[object DataView]",O="[object Float32Array]",A="[object Float64Array]",j="[object Int8Array]",M="[object Int16Array]",S="[object Int32Array]",L="[object Uint8Array]",R="[object Uint16Array]",C="[object Uint32Array]",P=/\b__p \+= '';/g,G=/\b(__p \+=) '' \+/g,F=/(__e\(.*?\)|\b__t\)) \+\n'';/g,q=/&(?:amp|lt|gt|quot|#39);/g,D=/[&<>"']/g,N=RegExp(q.source),E=RegExp(D.source),B=/<%-([\s\S]+?)%>/g,I=/<%([\s\S]+?)%>/g,U=/<%=([\s\S]+?)%>/g,z=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,W=/^\w*$/,V=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Z=/[\\^$.*+?()[\]{}|]/g,Y=RegExp(Z.source),$=/^\s+/,X=/\s/,H=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Q=/\{\n\/\* \[wrapped with (.+)\] \*/,K=/,? & /,J=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,tt=/[()=,{}\[\]\/\s]/,et=/\\(\\)?/g,nt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,rt=/\w*$/,it=/^[-+]0x[0-9a-f]+$/i,at=/^0b[01]+$/i,ot=/^\[object .+?Constructor\]$/,ut=/^0o[0-7]+$/i,st=/^(?:0|[1-9]\d*)$/,ct=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,lt=/($^)/,ft=/['\n\r\u2028\u2029\\]/g,ht="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",pt="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",dt="[\\ud800-\\udfff]",vt="["+pt+"]",gt="["+ht+"]",yt="\\d+",mt="[\\u2700-\\u27bf]",bt="[a-z\\xdf-\\xf6\\xf8-\\xff]",_t="[^\\ud800-\\udfff"+pt+yt+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",wt="\\ud83c[\\udffb-\\udfff]",xt="[^\\ud800-\\udfff]",kt="(?:\\ud83c[\\udde6-\\uddff]){2}",Tt="[\\ud800-\\udbff][\\udc00-\\udfff]",Ot="[A-Z\\xc0-\\xd6\\xd8-\\xde]",At="(?:"+bt+"|"+_t+")",jt="(?:"+Ot+"|"+_t+")",Mt="(?:"+gt+"|"+wt+")"+"?",St="[\\ufe0e\\ufe0f]?"+Mt+("(?:\\u200d(?:"+[xt,kt,Tt].join("|")+")[\\ufe0e\\ufe0f]?"+Mt+")*"),Lt="(?:"+[mt,kt,Tt].join("|")+")"+St,Rt="(?:"+[xt+gt+"?",gt,kt,Tt,dt].join("|")+")",Ct=RegExp("['’]","g"),Pt=RegExp(gt,"g"),Gt=RegExp(wt+"(?="+wt+")|"+Rt+St,"g"),Ft=RegExp([Ot+"?"+bt+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[vt,Ot,"$"].join("|")+")",jt+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[vt,Ot+At,"$"].join("|")+")",Ot+"?"+At+"+(?:['’](?:d|ll|m|re|s|t|ve))?",Ot+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",yt,Lt].join("|"),"g"),qt=RegExp("[\\u200d\\ud800-\\udfff"+ht+"\\ufe0e\\ufe0f]"),Dt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Nt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Et=-1,Bt={};Bt[O]=Bt[A]=Bt[j]=Bt[M]=Bt[S]=Bt[L]=Bt["[object Uint8ClampedArray]"]=Bt[R]=Bt[C]=!0,Bt[s]=Bt[c]=Bt[k]=Bt[l]=Bt[T]=Bt[f]=Bt[h]=Bt[p]=Bt[v]=Bt[g]=Bt[y]=Bt[m]=Bt[b]=Bt[_]=Bt[x]=!1;var It={};It[s]=It[c]=It[k]=It[T]=It[l]=It[f]=It[O]=It[A]=It[j]=It[M]=It[S]=It[v]=It[g]=It[y]=It[m]=It[b]=It[_]=It[w]=It[L]=It["[object Uint8ClampedArray]"]=It[R]=It[C]=!0,It[h]=It[p]=It[x]=!1;var Ut={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},zt=parseFloat,Wt=parseInt,Vt="object"==typeof t&&t&&t.Object===Object&&t,Zt="object"==typeof self&&self&&self.Object===Object&&self,Yt=Vt||Zt||Function("return this")(),$t=e&&!e.nodeType&&e,Xt=$t&&"object"==typeof r&&r&&!r.nodeType&&r,Ht=Xt&&Xt.exports===$t,Qt=Ht&&Vt.process,Kt=function(){try{var t=Xt&&Xt.require&&Xt.require("util").types;return t||Qt&&Qt.binding&&Qt.binding("util")}catch(t){}}(),Jt=Kt&&Kt.isArrayBuffer,te=Kt&&Kt.isDate,ee=Kt&&Kt.isMap,ne=Kt&&Kt.isRegExp,re=Kt&&Kt.isSet,ie=Kt&&Kt.isTypedArray;function ae(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function oe(t,e,n,r){for(var i=-1,a=null==t?0:t.length;++i<a;){var o=t[i];e(r,o,n(o),t)}return r}function ue(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function se(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function ce(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function le(t,e){for(var n=-1,r=null==t?0:t.length,i=0,a=[];++n<r;){var o=t[n];e(o,n,t)&&(a[i++]=o)}return a}function fe(t,e){return!!(null==t?0:t.length)&&we(t,e,0)>-1}function he(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}function pe(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}function de(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function ve(t,e,n,r){var i=-1,a=null==t?0:t.length;for(r&&a&&(n=t[++i]);++i<a;)n=e(n,t[i],i,t);return n}function ge(t,e,n,r){var i=null==t?0:t.length;for(r&&i&&(n=t[--i]);i--;)n=e(n,t[i],i,t);return n}function ye(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var me=Oe("length");function be(t,e,n){var r;return n(t,(function(t,n,i){if(e(t,n,i))return r=n,!1})),r}function _e(t,e,n,r){for(var i=t.length,a=n+(r?1:-1);r?a--:++a<i;)if(e(t[a],a,t))return a;return-1}function we(t,e,n){return e==e?function(t,e,n){var r=n-1,i=t.length;for(;++r<i;)if(t[r]===e)return r;return-1}(t,e,n):_e(t,ke,n)}function xe(t,e,n,r){for(var i=n-1,a=t.length;++i<a;)if(r(t[i],e))return i;return-1}function ke(t){return t!=t}function Te(t,e){var n=null==t?0:t.length;return n?Me(t,e)/n:NaN}function Oe(t){return function(e){return null==e?void 0:e[t]}}function Ae(t){return function(e){return null==t?void 0:t[e]}}function je(t,e,n,r,i){return i(t,(function(t,i,a){n=r?(r=!1,t):e(n,t,i,a)})),n}function Me(t,e){for(var n,r=-1,i=t.length;++r<i;){var a=e(t[r]);void 0!==a&&(n=void 0===n?a:n+a)}return n}function Se(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function Le(t){return t?t.slice(0,$e(t)+1).replace($,""):t}function Re(t){return function(e){return t(e)}}function Ce(t,e){return pe(e,(function(e){return t[e]}))}function Pe(t,e){return t.has(e)}function Ge(t,e){for(var n=-1,r=t.length;++n<r&&we(e,t[n],0)>-1;);return n}function Fe(t,e){for(var n=t.length;n--&&we(e,t[n],0)>-1;);return n}function qe(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}var De=Ae({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),Ne=Ae({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function Ee(t){return"\\"+Ut[t]}function Be(t){return qt.test(t)}function Ie(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function Ue(t,e){return function(n){return t(e(n))}}function ze(t,e){for(var n=-1,r=t.length,i=0,a=[];++n<r;){var u=t[n];u!==e&&u!==o||(t[n]=o,a[i++]=n)}return a}function We(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}function Ve(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=[t,t]})),n}function Ze(t){return Be(t)?function(t){var e=Gt.lastIndex=0;for(;Gt.test(t);)++e;return e}(t):me(t)}function Ye(t){return Be(t)?function(t){return t.match(Gt)||[]}(t):function(t){return t.split("")}(t)}function $e(t){for(var e=t.length;e--&&X.test(t.charAt(e)););return e}var Xe=Ae({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"});var He=function t(e){var n,r=(e=null==e?Yt:He.defaults(Yt.Object(),e,He.pick(Yt,Nt))).Array,i=e.Date,X=e.Error,ht=e.Function,pt=e.Math,dt=e.Object,vt=e.RegExp,gt=e.String,yt=e.TypeError,mt=r.prototype,bt=ht.prototype,_t=dt.prototype,wt=e["__core-js_shared__"],xt=bt.toString,kt=_t.hasOwnProperty,Tt=0,Ot=(n=/[^.]+$/.exec(wt&&wt.keys&&wt.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",At=_t.toString,jt=xt.call(dt),Mt=Yt._,St=vt("^"+xt.call(kt).replace(Z,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Lt=Ht?e.Buffer:void 0,Rt=e.Symbol,Gt=e.Uint8Array,qt=Lt?Lt.allocUnsafe:void 0,Ut=Ue(dt.getPrototypeOf,dt),Vt=dt.create,Zt=_t.propertyIsEnumerable,$t=mt.splice,Xt=Rt?Rt.isConcatSpreadable:void 0,Qt=Rt?Rt.iterator:void 0,Kt=Rt?Rt.toStringTag:void 0,me=function(){try{var t=ta(dt,"defineProperty");return t({},"",{}),t}catch(t){}}(),Ae=e.clearTimeout!==Yt.clearTimeout&&e.clearTimeout,Qe=i&&i.now!==Yt.Date.now&&i.now,Ke=e.setTimeout!==Yt.setTimeout&&e.setTimeout,Je=pt.ceil,tn=pt.floor,en=dt.getOwnPropertySymbols,nn=Lt?Lt.isBuffer:void 0,rn=e.isFinite,an=mt.join,on=Ue(dt.keys,dt),un=pt.max,sn=pt.min,cn=i.now,ln=e.parseInt,fn=pt.random,hn=mt.reverse,pn=ta(e,"DataView"),dn=ta(e,"Map"),vn=ta(e,"Promise"),gn=ta(e,"Set"),yn=ta(e,"WeakMap"),mn=ta(dt,"create"),bn=yn&&new yn,_n={},wn=ja(pn),xn=ja(dn),kn=ja(vn),Tn=ja(gn),On=ja(yn),An=Rt?Rt.prototype:void 0,jn=An?An.valueOf:void 0,Mn=An?An.toString:void 0;function Sn(t){if(Vo(t)&&!Go(t)&&!(t instanceof Pn)){if(t instanceof Cn)return t;if(kt.call(t,"__wrapped__"))return Ma(t)}return new Cn(t)}var Ln=function(){function t(){}return function(e){if(!Wo(e))return{};if(Vt)return Vt(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();function Rn(){}function Cn(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=void 0}function Pn(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Gn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Fn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function qn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Dn(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new qn;++e<n;)this.add(t[e])}function Nn(t){var e=this.__data__=new Fn(t);this.size=e.size}function En(t,e){var n=Go(t),r=!n&&Po(t),i=!n&&!r&&No(t),a=!n&&!r&&!i&&Jo(t),o=n||r||i||a,u=o?Se(t.length,gt):[],s=u.length;for(var c in t)!e&&!kt.call(t,c)||o&&("length"==c||i&&("offset"==c||"parent"==c)||a&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||ua(c,s))||u.push(c);return u}function Bn(t){var e=t.length;return e?t[Dr(0,e-1)]:void 0}function In(t,e){return Ta(mi(t),Hn(e,0,t.length))}function Un(t){return Ta(mi(t))}function zn(t,e,n){(void 0!==n&&!Lo(t[e],n)||void 0===n&&!(e in t))&&$n(t,e,n)}function Wn(t,e,n){var r=t[e];kt.call(t,e)&&Lo(r,n)&&(void 0!==n||e in t)||$n(t,e,n)}function Vn(t,e){for(var n=t.length;n--;)if(Lo(t[n][0],e))return n;return-1}function Zn(t,e,n,r){return er(t,(function(t,i,a){e(r,t,n(t),a)})),r}function Yn(t,e){return t&&bi(e,wu(e),t)}function $n(t,e,n){"__proto__"==e&&me?me(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function Xn(t,e){for(var n=-1,i=e.length,a=r(i),o=null==t;++n<i;)a[n]=o?void 0:gu(t,e[n]);return a}function Hn(t,e,n){return t==t&&(void 0!==n&&(t=t<=n?t:n),void 0!==e&&(t=t>=e?t:e)),t}function Qn(t,e,n,r,i,a){var o,u=1&e,c=2&e,h=4&e;if(n&&(o=i?n(t,r,i,a):n(t)),void 0!==o)return o;if(!Wo(t))return t;var x=Go(t);if(x){if(o=function(t){var e=t.length,n=new t.constructor(e);e&&"string"==typeof t[0]&&kt.call(t,"index")&&(n.index=t.index,n.input=t.input);return n}(t),!u)return mi(t,o)}else{var P=ra(t),G=P==p||P==d;if(No(t))return hi(t,u);if(P==y||P==s||G&&!i){if(o=c||G?{}:aa(t),!u)return c?function(t,e){return bi(t,na(t),e)}(t,function(t,e){return t&&bi(e,xu(e),t)}(o,t)):function(t,e){return bi(t,ea(t),e)}(t,Yn(o,t))}else{if(!It[P])return i?t:{};o=function(t,e,n){var r=t.constructor;switch(e){case k:return pi(t);case l:case f:return new r(+t);case T:return function(t,e){var n=e?pi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case O:case A:case j:case M:case S:case L:case"[object Uint8ClampedArray]":case R:case C:return di(t,n);case v:return new r;case g:case _:return new r(t);case m:return function(t){var e=new t.constructor(t.source,rt.exec(t));return e.lastIndex=t.lastIndex,e}(t);case b:return new r;case w:return i=t,jn?dt(jn.call(i)):{}}var i}(t,P,u)}}a||(a=new Nn);var F=a.get(t);if(F)return F;a.set(t,o),Ho(t)?t.forEach((function(r){o.add(Qn(r,e,n,r,t,a))})):Zo(t)&&t.forEach((function(r,i){o.set(i,Qn(r,e,n,i,t,a))}));var q=x?void 0:(h?c?Yi:Zi:c?xu:wu)(t);return ue(q||t,(function(r,i){q&&(r=t[i=r]),Wn(o,i,Qn(r,e,n,i,t,a))})),o}function Kn(t,e,n){var r=n.length;if(null==t)return!r;for(t=dt(t);r--;){var i=n[r],a=e[i],o=t[i];if(void 0===o&&!(i in t)||!a(o))return!1}return!0}function Jn(t,e,n){if("function"!=typeof t)throw new yt(a);return _a((function(){t.apply(void 0,n)}),e)}function tr(t,e,n,r){var i=-1,a=fe,o=!0,u=t.length,s=[],c=e.length;if(!u)return s;n&&(e=pe(e,Re(n))),r?(a=he,o=!1):e.length>=200&&(a=Pe,o=!1,e=new Dn(e));t:for(;++i<u;){var l=t[i],f=null==n?l:n(l);if(l=r||0!==l?l:0,o&&f==f){for(var h=c;h--;)if(e[h]===f)continue t;s.push(l)}else a(e,f,r)||s.push(l)}return s}Sn.templateSettings={escape:B,evaluate:I,interpolate:U,variable:"",imports:{_:Sn}},Sn.prototype=Rn.prototype,Sn.prototype.constructor=Sn,Cn.prototype=Ln(Rn.prototype),Cn.prototype.constructor=Cn,Pn.prototype=Ln(Rn.prototype),Pn.prototype.constructor=Pn,Gn.prototype.clear=function(){this.__data__=mn?mn(null):{},this.size=0},Gn.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Gn.prototype.get=function(t){var e=this.__data__;if(mn){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return kt.call(e,t)?e[t]:void 0},Gn.prototype.has=function(t){var e=this.__data__;return mn?void 0!==e[t]:kt.call(e,t)},Gn.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=mn&&void 0===e?"__lodash_hash_undefined__":e,this},Fn.prototype.clear=function(){this.__data__=[],this.size=0},Fn.prototype.delete=function(t){var e=this.__data__,n=Vn(e,t);return!(n<0)&&(n==e.length-1?e.pop():$t.call(e,n,1),--this.size,!0)},Fn.prototype.get=function(t){var e=this.__data__,n=Vn(e,t);return n<0?void 0:e[n][1]},Fn.prototype.has=function(t){return Vn(this.__data__,t)>-1},Fn.prototype.set=function(t,e){var n=this.__data__,r=Vn(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},qn.prototype.clear=function(){this.size=0,this.__data__={hash:new Gn,map:new(dn||Fn),string:new Gn}},qn.prototype.delete=function(t){var e=Ki(this,t).delete(t);return this.size-=e?1:0,e},qn.prototype.get=function(t){return Ki(this,t).get(t)},qn.prototype.has=function(t){return Ki(this,t).has(t)},qn.prototype.set=function(t,e){var n=Ki(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},Dn.prototype.add=Dn.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},Dn.prototype.has=function(t){return this.__data__.has(t)},Nn.prototype.clear=function(){this.__data__=new Fn,this.size=0},Nn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Nn.prototype.get=function(t){return this.__data__.get(t)},Nn.prototype.has=function(t){return this.__data__.has(t)},Nn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Fn){var r=n.__data__;if(!dn||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new qn(r)}return n.set(t,e),this.size=n.size,this};var er=xi(cr),nr=xi(lr,!0);function rr(t,e){var n=!0;return er(t,(function(t,r,i){return n=!!e(t,r,i)})),n}function ir(t,e,n){for(var r=-1,i=t.length;++r<i;){var a=t[r],o=e(a);if(null!=o&&(void 0===u?o==o&&!Ko(o):n(o,u)))var u=o,s=a}return s}function ar(t,e){var n=[];return er(t,(function(t,r,i){e(t,r,i)&&n.push(t)})),n}function or(t,e,n,r,i){var a=-1,o=t.length;for(n||(n=oa),i||(i=[]);++a<o;){var u=t[a];e>0&&n(u)?e>1?or(u,e-1,n,r,i):de(i,u):r||(i[i.length]=u)}return i}var ur=ki(),sr=ki(!0);function cr(t,e){return t&&ur(t,e,wu)}function lr(t,e){return t&&sr(t,e,wu)}function fr(t,e){return le(e,(function(e){return Io(t[e])}))}function hr(t,e){for(var n=0,r=(e=si(e,t)).length;null!=t&&n<r;)t=t[Aa(e[n++])];return n&&n==r?t:void 0}function pr(t,e,n){var r=e(t);return Go(t)?r:de(r,n(t))}function dr(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Kt&&Kt in dt(t)?function(t){var e=kt.call(t,Kt),n=t[Kt];try{t[Kt]=void 0;var r=!0}catch(t){}var i=At.call(t);r&&(e?t[Kt]=n:delete t[Kt]);return i}(t):function(t){return At.call(t)}(t)}function vr(t,e){return t>e}function gr(t,e){return null!=t&&kt.call(t,e)}function yr(t,e){return null!=t&&e in dt(t)}function mr(t,e,n){for(var i=n?he:fe,a=t[0].length,o=t.length,u=o,s=r(o),c=1/0,l=[];u--;){var f=t[u];u&&e&&(f=pe(f,Re(e))),c=sn(f.length,c),s[u]=!n&&(e||a>=120&&f.length>=120)?new Dn(u&&f):void 0}f=t[0];var h=-1,p=s[0];t:for(;++h<a&&l.length<c;){var d=f[h],v=e?e(d):d;if(d=n||0!==d?d:0,!(p?Pe(p,v):i(l,v,n))){for(u=o;--u;){var g=s[u];if(!(g?Pe(g,v):i(t[u],v,n)))continue t}p&&p.push(v),l.push(d)}}return l}function br(t,e,n){var r=null==(t=ga(t,e=si(e,t)))?t:t[Aa(Ea(e))];return null==r?void 0:ae(r,t,n)}function _r(t){return Vo(t)&&dr(t)==s}function wr(t,e,n,r,i){return t===e||(null==t||null==e||!Vo(t)&&!Vo(e)?t!=t&&e!=e:function(t,e,n,r,i,a){var o=Go(t),u=Go(e),p=o?c:ra(t),d=u?c:ra(e),x=(p=p==s?y:p)==y,O=(d=d==s?y:d)==y,A=p==d;if(A&&No(t)){if(!No(e))return!1;o=!0,x=!1}if(A&&!x)return a||(a=new Nn),o||Jo(t)?Wi(t,e,n,r,i,a):function(t,e,n,r,i,a,o){switch(n){case T:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case k:return!(t.byteLength!=e.byteLength||!a(new Gt(t),new Gt(e)));case l:case f:case g:return Lo(+t,+e);case h:return t.name==e.name&&t.message==e.message;case m:case _:return t==e+"";case v:var u=Ie;case b:var s=1&r;if(u||(u=We),t.size!=e.size&&!s)return!1;var c=o.get(t);if(c)return c==e;r|=2,o.set(t,e);var p=Wi(u(t),u(e),r,i,a,o);return o.delete(t),p;case w:if(jn)return jn.call(t)==jn.call(e)}return!1}(t,e,p,n,r,i,a);if(!(1&n)){var j=x&&kt.call(t,"__wrapped__"),M=O&&kt.call(e,"__wrapped__");if(j||M){var S=j?t.value():t,L=M?e.value():e;return a||(a=new Nn),i(S,L,n,r,a)}}if(!A)return!1;return a||(a=new Nn),function(t,e,n,r,i,a){var o=1&n,u=Zi(t),s=u.length,c=Zi(e).length;if(s!=c&&!o)return!1;var l=s;for(;l--;){var f=u[l];if(!(o?f in e:kt.call(e,f)))return!1}var h=a.get(t),p=a.get(e);if(h&&p)return h==e&&p==t;var d=!0;a.set(t,e),a.set(e,t);var v=o;for(;++l<s;){f=u[l];var g=t[f],y=e[f];if(r)var m=o?r(y,g,f,e,t,a):r(g,y,f,t,e,a);if(!(void 0===m?g===y||i(g,y,n,r,a):m)){d=!1;break}v||(v="constructor"==f)}if(d&&!v){var b=t.constructor,_=e.constructor;b==_||!("constructor"in t)||!("constructor"in e)||"function"==typeof b&&b instanceof b&&"function"==typeof _&&_ instanceof _||(d=!1)}return a.delete(t),a.delete(e),d}(t,e,n,r,i,a)}(t,e,n,r,wr,i))}function xr(t,e,n,r){var i=n.length,a=i,o=!r;if(null==t)return!a;for(t=dt(t);i--;){var u=n[i];if(o&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++i<a;){var s=(u=n[i])[0],c=t[s],l=u[1];if(o&&u[2]){if(void 0===c&&!(s in t))return!1}else{var f=new Nn;if(r)var h=r(c,l,s,t,e,f);if(!(void 0===h?wr(l,c,3,r,f):h))return!1}}return!0}function kr(t){return!(!Wo(t)||(e=t,Ot&&Ot in e))&&(Io(t)?St:ot).test(ja(t));var e}function Tr(t){return"function"==typeof t?t:null==t?Yu:"object"==typeof t?Go(t)?Lr(t[0],t[1]):Sr(t):ns(t)}function Or(t){if(!ha(t))return on(t);var e=[];for(var n in dt(t))kt.call(t,n)&&"constructor"!=n&&e.push(n);return e}function Ar(t){if(!Wo(t))return function(t){var e=[];if(null!=t)for(var n in dt(t))e.push(n);return e}(t);var e=ha(t),n=[];for(var r in t)("constructor"!=r||!e&&kt.call(t,r))&&n.push(r);return n}function jr(t,e){return t<e}function Mr(t,e){var n=-1,i=qo(t)?r(t.length):[];return er(t,(function(t,r,a){i[++n]=e(t,r,a)})),i}function Sr(t){var e=Ji(t);return 1==e.length&&e[0][2]?da(e[0][0],e[0][1]):function(n){return n===t||xr(n,t,e)}}function Lr(t,e){return ca(t)&&pa(e)?da(Aa(t),e):function(n){var r=gu(n,t);return void 0===r&&r===e?yu(n,t):wr(e,r,3)}}function Rr(t,e,n,r,i){t!==e&&ur(e,(function(a,o){if(i||(i=new Nn),Wo(a))!function(t,e,n,r,i,a,o){var u=ma(t,n),s=ma(e,n),c=o.get(s);if(c)return void zn(t,n,c);var l=a?a(u,s,n+"",t,e,o):void 0,f=void 0===l;if(f){var h=Go(s),p=!h&&No(s),d=!h&&!p&&Jo(s);l=s,h||p||d?Go(u)?l=u:Do(u)?l=mi(u):p?(f=!1,l=hi(s,!0)):d?(f=!1,l=di(s,!0)):l=[]:$o(s)||Po(s)?(l=u,Po(u)?l=uu(u):Wo(u)&&!Io(u)||(l=aa(s))):f=!1}f&&(o.set(s,l),i(l,s,r,a,o),o.delete(s));zn(t,n,l)}(t,e,o,n,Rr,r,i);else{var u=r?r(ma(t,o),a,o+"",t,e,i):void 0;void 0===u&&(u=a),zn(t,o,u)}}),xu)}function Cr(t,e){var n=t.length;if(n)return ua(e+=e<0?n:0,n)?t[e]:void 0}function Pr(t,e,n){e=e.length?pe(e,(function(t){return Go(t)?function(e){return hr(e,1===t.length?t[0]:t)}:t})):[Yu];var r=-1;return e=pe(e,Re(Qi())),function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}(Mr(t,(function(t,n,i){return{criteria:pe(e,(function(e){return e(t)})),index:++r,value:t}})),(function(t,e){return function(t,e,n){var r=-1,i=t.criteria,a=e.criteria,o=i.length,u=n.length;for(;++r<o;){var s=vi(i[r],a[r]);if(s){if(r>=u)return s;var c=n[r];return s*("desc"==c?-1:1)}}return t.index-e.index}(t,e,n)}))}function Gr(t,e,n){for(var r=-1,i=e.length,a={};++r<i;){var o=e[r],u=hr(t,o);n(u,o)&&Ur(a,si(o,t),u)}return a}function Fr(t,e,n,r){var i=r?xe:we,a=-1,o=e.length,u=t;for(t===e&&(e=mi(e)),n&&(u=pe(t,Re(n)));++a<o;)for(var s=0,c=e[a],l=n?n(c):c;(s=i(u,l,s,r))>-1;)u!==t&&$t.call(u,s,1),$t.call(t,s,1);return t}function qr(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==a){var a=i;ua(i)?$t.call(t,i,1):ti(t,i)}}return t}function Dr(t,e){return t+tn(fn()*(e-t+1))}function Nr(t,e){var n="";if(!t||e<1||e>9007199254740991)return n;do{e%2&&(n+=t),(e=tn(e/2))&&(t+=t)}while(e);return n}function Er(t,e){return wa(va(t,e,Yu),t+"")}function Br(t){return Bn(Lu(t))}function Ir(t,e){var n=Lu(t);return Ta(n,Hn(e,0,n.length))}function Ur(t,e,n,r){if(!Wo(t))return t;for(var i=-1,a=(e=si(e,t)).length,o=a-1,u=t;null!=u&&++i<a;){var s=Aa(e[i]),c=n;if("__proto__"===s||"constructor"===s||"prototype"===s)return t;if(i!=o){var l=u[s];void 0===(c=r?r(l,s,u):void 0)&&(c=Wo(l)?l:ua(e[i+1])?[]:{})}Wn(u,s,c),u=u[s]}return t}var zr=bn?function(t,e){return bn.set(t,e),t}:Yu,Wr=me?function(t,e){return me(t,"toString",{configurable:!0,enumerable:!1,value:Wu(e),writable:!0})}:Yu;function Vr(t){return Ta(Lu(t))}function Zr(t,e,n){var i=-1,a=t.length;e<0&&(e=-e>a?0:a+e),(n=n>a?a:n)<0&&(n+=a),a=e>n?0:n-e>>>0,e>>>=0;for(var o=r(a);++i<a;)o[i]=t[i+e];return o}function Yr(t,e){var n;return er(t,(function(t,r,i){return!(n=e(t,r,i))})),!!n}function $r(t,e,n){var r=0,i=null==t?r:t.length;if("number"==typeof e&&e==e&&i<=2147483647){for(;r<i;){var a=r+i>>>1,o=t[a];null!==o&&!Ko(o)&&(n?o<=e:o<e)?r=a+1:i=a}return i}return Xr(t,e,Yu,n)}function Xr(t,e,n,r){var i=0,a=null==t?0:t.length;if(0===a)return 0;for(var o=(e=n(e))!=e,u=null===e,s=Ko(e),c=void 0===e;i<a;){var l=tn((i+a)/2),f=n(t[l]),h=void 0!==f,p=null===f,d=f==f,v=Ko(f);if(o)var g=r||d;else g=c?d&&(r||h):u?d&&h&&(r||!p):s?d&&h&&!p&&(r||!v):!p&&!v&&(r?f<=e:f<e);g?i=l+1:a=l}return sn(a,4294967294)}function Hr(t,e){for(var n=-1,r=t.length,i=0,a=[];++n<r;){var o=t[n],u=e?e(o):o;if(!n||!Lo(u,s)){var s=u;a[i++]=0===o?0:o}}return a}function Qr(t){return"number"==typeof t?t:Ko(t)?NaN:+t}function Kr(t){if("string"==typeof t)return t;if(Go(t))return pe(t,Kr)+"";if(Ko(t))return Mn?Mn.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Jr(t,e,n){var r=-1,i=fe,a=t.length,o=!0,u=[],s=u;if(n)o=!1,i=he;else if(a>=200){var c=e?null:Ni(t);if(c)return We(c);o=!1,i=Pe,s=new Dn}else s=e?[]:u;t:for(;++r<a;){var l=t[r],f=e?e(l):l;if(l=n||0!==l?l:0,o&&f==f){for(var h=s.length;h--;)if(s[h]===f)continue t;e&&s.push(f),u.push(l)}else i(s,f,n)||(s!==u&&s.push(f),u.push(l))}return u}function ti(t,e){return null==(t=ga(t,e=si(e,t)))||delete t[Aa(Ea(e))]}function ei(t,e,n,r){return Ur(t,e,n(hr(t,e)),r)}function ni(t,e,n,r){for(var i=t.length,a=r?i:-1;(r?a--:++a<i)&&e(t[a],a,t););return n?Zr(t,r?0:a,r?a+1:i):Zr(t,r?a+1:0,r?i:a)}function ri(t,e){var n=t;return n instanceof Pn&&(n=n.value()),ve(e,(function(t,e){return e.func.apply(e.thisArg,de([t],e.args))}),n)}function ii(t,e,n){var i=t.length;if(i<2)return i?Jr(t[0]):[];for(var a=-1,o=r(i);++a<i;)for(var u=t[a],s=-1;++s<i;)s!=a&&(o[a]=tr(o[a]||u,t[s],e,n));return Jr(or(o,1),e,n)}function ai(t,e,n){for(var r=-1,i=t.length,a=e.length,o={};++r<i;){var u=r<a?e[r]:void 0;n(o,t[r],u)}return o}function oi(t){return Do(t)?t:[]}function ui(t){return"function"==typeof t?t:Yu}function si(t,e){return Go(t)?t:ca(t,e)?[t]:Oa(su(t))}var ci=Er;function li(t,e,n){var r=t.length;return n=void 0===n?r:n,!e&&n>=r?t:Zr(t,e,n)}var fi=Ae||function(t){return Yt.clearTimeout(t)};function hi(t,e){if(e)return t.slice();var n=t.length,r=qt?qt(n):new t.constructor(n);return t.copy(r),r}function pi(t){var e=new t.constructor(t.byteLength);return new Gt(e).set(new Gt(t)),e}function di(t,e){var n=e?pi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function vi(t,e){if(t!==e){var n=void 0!==t,r=null===t,i=t==t,a=Ko(t),o=void 0!==e,u=null===e,s=e==e,c=Ko(e);if(!u&&!c&&!a&&t>e||a&&o&&s&&!u&&!c||r&&o&&s||!n&&s||!i)return 1;if(!r&&!a&&!c&&t<e||c&&n&&i&&!r&&!a||u&&n&&i||!o&&i||!s)return-1}return 0}function gi(t,e,n,i){for(var a=-1,o=t.length,u=n.length,s=-1,c=e.length,l=un(o-u,0),f=r(c+l),h=!i;++s<c;)f[s]=e[s];for(;++a<u;)(h||a<o)&&(f[n[a]]=t[a]);for(;l--;)f[s++]=t[a++];return f}function yi(t,e,n,i){for(var a=-1,o=t.length,u=-1,s=n.length,c=-1,l=e.length,f=un(o-s,0),h=r(f+l),p=!i;++a<f;)h[a]=t[a];for(var d=a;++c<l;)h[d+c]=e[c];for(;++u<s;)(p||a<o)&&(h[d+n[u]]=t[a++]);return h}function mi(t,e){var n=-1,i=t.length;for(e||(e=r(i));++n<i;)e[n]=t[n];return e}function bi(t,e,n,r){var i=!n;n||(n={});for(var a=-1,o=e.length;++a<o;){var u=e[a],s=r?r(n[u],t[u],u,n,t):void 0;void 0===s&&(s=t[u]),i?$n(n,u,s):Wn(n,u,s)}return n}function _i(t,e){return function(n,r){var i=Go(n)?oe:Zn,a=e?e():{};return i(n,t,Qi(r,2),a)}}function wi(t){return Er((function(e,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a=t.length>3&&"function"==typeof a?(i--,a):void 0,o&&sa(n[0],n[1],o)&&(a=i<3?void 0:a,i=1),e=dt(e);++r<i;){var u=n[r];u&&t(e,u,r,a)}return e}))}function xi(t,e){return function(n,r){if(null==n)return n;if(!qo(n))return t(n,r);for(var i=n.length,a=e?i:-1,o=dt(n);(e?a--:++a<i)&&!1!==r(o[a],a,o););return n}}function ki(t){return function(e,n,r){for(var i=-1,a=dt(e),o=r(e),u=o.length;u--;){var s=o[t?u:++i];if(!1===n(a[s],s,a))break}return e}}function Ti(t){return function(e){var n=Be(e=su(e))?Ye(e):void 0,r=n?n[0]:e.charAt(0),i=n?li(n,1).join(""):e.slice(1);return r[t]()+i}}function Oi(t){return function(e){return ve(Iu(Pu(e).replace(Ct,"")),t,"")}}function Ai(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=Ln(t.prototype),r=t.apply(n,e);return Wo(r)?r:n}}function ji(t){return function(e,n,r){var i=dt(e);if(!qo(e)){var a=Qi(n,3);e=wu(e),n=function(t){return a(i[t],t,i)}}var o=t(e,n,r);return o>-1?i[a?e[o]:o]:void 0}}function Mi(t){return Vi((function(e){var n=e.length,r=n,i=Cn.prototype.thru;for(t&&e.reverse();r--;){var o=e[r];if("function"!=typeof o)throw new yt(a);if(i&&!u&&"wrapper"==Xi(o))var u=new Cn([],!0)}for(r=u?r:n;++r<n;){var s=Xi(o=e[r]),c="wrapper"==s?$i(o):void 0;u=c&&la(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?u[Xi(c[0])].apply(u,c[3]):1==o.length&&la(o)?u[s]():u.thru(o)}return function(){var t=arguments,r=t[0];if(u&&1==t.length&&Go(r))return u.plant(r).value();for(var i=0,a=n?e[i].apply(this,t):r;++i<n;)a=e[i].call(this,a);return a}}))}function Si(t,e,n,i,a,o,u,s,c,l){var f=128&e,h=1&e,p=2&e,d=24&e,v=512&e,g=p?void 0:Ai(t);return function y(){for(var m=arguments.length,b=r(m),_=m;_--;)b[_]=arguments[_];if(d)var w=Hi(y),x=qe(b,w);if(i&&(b=gi(b,i,a,d)),o&&(b=yi(b,o,u,d)),m-=x,d&&m<l){var k=ze(b,w);return qi(t,e,Si,y.placeholder,n,b,k,s,c,l-m)}var T=h?n:this,O=p?T[t]:t;return m=b.length,s?b=ya(b,s):v&&m>1&&b.reverse(),f&&c<m&&(b.length=c),this&&this!==Yt&&this instanceof y&&(O=g||Ai(O)),O.apply(T,b)}}function Li(t,e){return function(n,r){return function(t,e,n,r){return cr(t,(function(t,i,a){e(r,n(t),i,a)})),r}(n,t,e(r),{})}}function Ri(t,e){return function(n,r){var i;if(void 0===n&&void 0===r)return e;if(void 0!==n&&(i=n),void 0!==r){if(void 0===i)return r;"string"==typeof n||"string"==typeof r?(n=Kr(n),r=Kr(r)):(n=Qr(n),r=Qr(r)),i=t(n,r)}return i}}function Ci(t){return Vi((function(e){return e=pe(e,Re(Qi())),Er((function(n){var r=this;return t(e,(function(t){return ae(t,r,n)}))}))}))}function Pi(t,e){var n=(e=void 0===e?" ":Kr(e)).length;if(n<2)return n?Nr(e,t):e;var r=Nr(e,Je(t/Ze(e)));return Be(e)?li(Ye(r),0,t).join(""):r.slice(0,t)}function Gi(t){return function(e,n,i){return i&&"number"!=typeof i&&sa(e,n,i)&&(n=i=void 0),e=ru(e),void 0===n?(n=e,e=0):n=ru(n),function(t,e,n,i){for(var a=-1,o=un(Je((e-t)/(n||1)),0),u=r(o);o--;)u[i?o:++a]=t,t+=n;return u}(e,n,i=void 0===i?e<n?1:-1:ru(i),t)}}function Fi(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=ou(e),n=ou(n)),t(e,n)}}function qi(t,e,n,r,i,a,o,u,s,c){var l=8&e;e|=l?32:64,4&(e&=~(l?64:32))||(e&=-4);var f=[t,e,i,l?a:void 0,l?o:void 0,l?void 0:a,l?void 0:o,u,s,c],h=n.apply(void 0,f);return la(t)&&ba(h,f),h.placeholder=r,xa(h,t,e)}function Di(t){var e=pt[t];return function(t,n){if(t=ou(t),(n=null==n?0:sn(iu(n),292))&&rn(t)){var r=(su(t)+"e").split("e");return+((r=(su(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}var Ni=gn&&1/We(new gn([,-0]))[1]==1/0?function(t){return new gn(t)}:Ku;function Ei(t){return function(e){var n=ra(e);return n==v?Ie(e):n==b?Ve(e):function(t,e){return pe(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function Bi(t,e,n,i,u,s,c,l){var f=2&e;if(!f&&"function"!=typeof t)throw new yt(a);var h=i?i.length:0;if(h||(e&=-97,i=u=void 0),c=void 0===c?c:un(iu(c),0),l=void 0===l?l:iu(l),h-=u?u.length:0,64&e){var p=i,d=u;i=u=void 0}var v=f?void 0:$i(t),g=[t,e,n,i,u,p,d,s,c,l];if(v&&function(t,e){var n=t[1],r=e[1],i=n|r,a=i<131,u=128==r&&8==n||128==r&&256==n&&t[7].length<=e[8]||384==r&&e[7].length<=e[8]&&8==n;if(!a&&!u)return t;1&r&&(t[2]=e[2],i|=1&n?0:4);var s=e[3];if(s){var c=t[3];t[3]=c?gi(c,s,e[4]):s,t[4]=c?ze(t[3],o):e[4]}(s=e[5])&&(c=t[5],t[5]=c?yi(c,s,e[6]):s,t[6]=c?ze(t[5],o):e[6]);(s=e[7])&&(t[7]=s);128&r&&(t[8]=null==t[8]?e[8]:sn(t[8],e[8]));null==t[9]&&(t[9]=e[9]);t[0]=e[0],t[1]=i}(g,v),t=g[0],e=g[1],n=g[2],i=g[3],u=g[4],!(l=g[9]=void 0===g[9]?f?0:t.length:un(g[9]-h,0))&&24&e&&(e&=-25),e&&1!=e)y=8==e||16==e?function(t,e,n){var i=Ai(t);return function a(){for(var o=arguments.length,u=r(o),s=o,c=Hi(a);s--;)u[s]=arguments[s];var l=o<3&&u[0]!==c&&u[o-1]!==c?[]:ze(u,c);if((o-=l.length)<n)return qi(t,e,Si,a.placeholder,void 0,u,l,void 0,void 0,n-o);var f=this&&this!==Yt&&this instanceof a?i:t;return ae(f,this,u)}}(t,e,l):32!=e&&33!=e||u.length?Si.apply(void 0,g):function(t,e,n,i){var a=1&e,o=Ai(t);return function e(){for(var u=-1,s=arguments.length,c=-1,l=i.length,f=r(l+s),h=this&&this!==Yt&&this instanceof e?o:t;++c<l;)f[c]=i[c];for(;s--;)f[c++]=arguments[++u];return ae(h,a?n:this,f)}}(t,e,n,i);else var y=function(t,e,n){var r=1&e,i=Ai(t);return function e(){var a=this&&this!==Yt&&this instanceof e?i:t;return a.apply(r?n:this,arguments)}}(t,e,n);return xa((v?zr:ba)(y,g),t,e)}function Ii(t,e,n,r){return void 0===t||Lo(t,_t[n])&&!kt.call(r,n)?e:t}function Ui(t,e,n,r,i,a){return Wo(t)&&Wo(e)&&(a.set(e,t),Rr(t,e,void 0,Ui,a),a.delete(e)),t}function zi(t){return $o(t)?void 0:t}function Wi(t,e,n,r,i,a){var o=1&n,u=t.length,s=e.length;if(u!=s&&!(o&&s>u))return!1;var c=a.get(t),l=a.get(e);if(c&&l)return c==e&&l==t;var f=-1,h=!0,p=2&n?new Dn:void 0;for(a.set(t,e),a.set(e,t);++f<u;){var d=t[f],v=e[f];if(r)var g=o?r(v,d,f,e,t,a):r(d,v,f,t,e,a);if(void 0!==g){if(g)continue;h=!1;break}if(p){if(!ye(e,(function(t,e){if(!Pe(p,e)&&(d===t||i(d,t,n,r,a)))return p.push(e)}))){h=!1;break}}else if(d!==v&&!i(d,v,n,r,a)){h=!1;break}}return a.delete(t),a.delete(e),h}function Vi(t){return wa(va(t,void 0,Ga),t+"")}function Zi(t){return pr(t,wu,ea)}function Yi(t){return pr(t,xu,na)}var $i=bn?function(t){return bn.get(t)}:Ku;function Xi(t){for(var e=t.name+"",n=_n[e],r=kt.call(_n,e)?n.length:0;r--;){var i=n[r],a=i.func;if(null==a||a==t)return i.name}return e}function Hi(t){return(kt.call(Sn,"placeholder")?Sn:t).placeholder}function Qi(){var t=Sn.iteratee||$u;return t=t===$u?Tr:t,arguments.length?t(arguments[0],arguments[1]):t}function Ki(t,e){var n,r,i=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map}function Ji(t){for(var e=wu(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,pa(i)]}return e}function ta(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return kr(n)?n:void 0}var ea=en?function(t){return null==t?[]:(t=dt(t),le(en(t),(function(e){return Zt.call(t,e)})))}:as,na=en?function(t){for(var e=[];t;)de(e,ea(t)),t=Ut(t);return e}:as,ra=dr;function ia(t,e,n){for(var r=-1,i=(e=si(e,t)).length,a=!1;++r<i;){var o=Aa(e[r]);if(!(a=null!=t&&n(t,o)))break;t=t[o]}return a||++r!=i?a:!!(i=null==t?0:t.length)&&zo(i)&&ua(o,i)&&(Go(t)||Po(t))}function aa(t){return"function"!=typeof t.constructor||ha(t)?{}:Ln(Ut(t))}function oa(t){return Go(t)||Po(t)||!!(Xt&&t&&t[Xt])}function ua(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&st.test(t))&&t>-1&&t%1==0&&t<e}function sa(t,e,n){if(!Wo(n))return!1;var r=typeof e;return!!("number"==r?qo(n)&&ua(e,n.length):"string"==r&&e in n)&&Lo(n[e],t)}function ca(t,e){if(Go(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Ko(t))||(W.test(t)||!z.test(t)||null!=e&&t in dt(e))}function la(t){var e=Xi(t),n=Sn[e];if("function"!=typeof n||!(e in Pn.prototype))return!1;if(t===n)return!0;var r=$i(n);return!!r&&t===r[0]}(pn&&ra(new pn(new ArrayBuffer(1)))!=T||dn&&ra(new dn)!=v||vn&&"[object Promise]"!=ra(vn.resolve())||gn&&ra(new gn)!=b||yn&&ra(new yn)!=x)&&(ra=function(t){var e=dr(t),n=e==y?t.constructor:void 0,r=n?ja(n):"";if(r)switch(r){case wn:return T;case xn:return v;case kn:return"[object Promise]";case Tn:return b;case On:return x}return e});var fa=wt?Io:os;function ha(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||_t)}function pa(t){return t==t&&!Wo(t)}function da(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in dt(n)))}}function va(t,e,n){return e=un(void 0===e?t.length-1:e,0),function(){for(var i=arguments,a=-1,o=un(i.length-e,0),u=r(o);++a<o;)u[a]=i[e+a];a=-1;for(var s=r(e+1);++a<e;)s[a]=i[a];return s[e]=n(u),ae(t,this,s)}}function ga(t,e){return e.length<2?t:hr(t,Zr(e,0,-1))}function ya(t,e){for(var n=t.length,r=sn(e.length,n),i=mi(t);r--;){var a=e[r];t[r]=ua(a,n)?i[a]:void 0}return t}function ma(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var ba=ka(zr),_a=Ke||function(t,e){return Yt.setTimeout(t,e)},wa=ka(Wr);function xa(t,e,n){var r=e+"";return wa(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(H,"{\n/* [wrapped with "+e+"] */\n")}(r,function(t,e){return ue(u,(function(n){var r="_."+n[0];e&n[1]&&!fe(t,r)&&t.push(r)})),t.sort()}(function(t){var e=t.match(Q);return e?e[1].split(K):[]}(r),n)))}function ka(t){var e=0,n=0;return function(){var r=cn(),i=16-(r-n);if(n=r,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function Ta(t,e){var n=-1,r=t.length,i=r-1;for(e=void 0===e?r:e;++n<e;){var a=Dr(n,i),o=t[a];t[a]=t[n],t[n]=o}return t.length=e,t}var Oa=function(t){var e=To(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(V,(function(t,n,r,i){e.push(r?i.replace(et,"$1"):n||t)})),e}));function Aa(t){if("string"==typeof t||Ko(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function ja(t){if(null!=t){try{return xt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Ma(t){if(t instanceof Pn)return t.clone();var e=new Cn(t.__wrapped__,t.__chain__);return e.__actions__=mi(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var Sa=Er((function(t,e){return Do(t)?tr(t,or(e,1,Do,!0)):[]})),La=Er((function(t,e){var n=Ea(e);return Do(n)&&(n=void 0),Do(t)?tr(t,or(e,1,Do,!0),Qi(n,2)):[]})),Ra=Er((function(t,e){var n=Ea(e);return Do(n)&&(n=void 0),Do(t)?tr(t,or(e,1,Do,!0),void 0,n):[]}));function Ca(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:iu(n);return i<0&&(i=un(r+i,0)),_e(t,Qi(e,3),i)}function Pa(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r-1;return void 0!==n&&(i=iu(n),i=n<0?un(r+i,0):sn(i,r-1)),_e(t,Qi(e,3),i,!0)}function Ga(t){return(null==t?0:t.length)?or(t,1):[]}function Fa(t){return t&&t.length?t[0]:void 0}var qa=Er((function(t){var e=pe(t,oi);return e.length&&e[0]===t[0]?mr(e):[]})),Da=Er((function(t){var e=Ea(t),n=pe(t,oi);return e===Ea(n)?e=void 0:n.pop(),n.length&&n[0]===t[0]?mr(n,Qi(e,2)):[]})),Na=Er((function(t){var e=Ea(t),n=pe(t,oi);return(e="function"==typeof e?e:void 0)&&n.pop(),n.length&&n[0]===t[0]?mr(n,void 0,e):[]}));function Ea(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}var Ba=Er(Ia);function Ia(t,e){return t&&t.length&&e&&e.length?Fr(t,e):t}var Ua=Vi((function(t,e){var n=null==t?0:t.length,r=Xn(t,e);return qr(t,pe(e,(function(t){return ua(t,n)?+t:t})).sort(vi)),r}));function za(t){return null==t?t:hn.call(t)}var Wa=Er((function(t){return Jr(or(t,1,Do,!0))})),Va=Er((function(t){var e=Ea(t);return Do(e)&&(e=void 0),Jr(or(t,1,Do,!0),Qi(e,2))})),Za=Er((function(t){var e=Ea(t);return e="function"==typeof e?e:void 0,Jr(or(t,1,Do,!0),void 0,e)}));function Ya(t){if(!t||!t.length)return[];var e=0;return t=le(t,(function(t){if(Do(t))return e=un(t.length,e),!0})),Se(e,(function(e){return pe(t,Oe(e))}))}function $a(t,e){if(!t||!t.length)return[];var n=Ya(t);return null==e?n:pe(n,(function(t){return ae(e,void 0,t)}))}var Xa=Er((function(t,e){return Do(t)?tr(t,e):[]})),Ha=Er((function(t){return ii(le(t,Do))})),Qa=Er((function(t){var e=Ea(t);return Do(e)&&(e=void 0),ii(le(t,Do),Qi(e,2))})),Ka=Er((function(t){var e=Ea(t);return e="function"==typeof e?e:void 0,ii(le(t,Do),void 0,e)})),Ja=Er(Ya);var to=Er((function(t){var e=t.length,n=e>1?t[e-1]:void 0;return n="function"==typeof n?(t.pop(),n):void 0,$a(t,n)}));function eo(t){var e=Sn(t);return e.__chain__=!0,e}function no(t,e){return e(t)}var ro=Vi((function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,i=function(e){return Xn(e,t)};return!(e>1||this.__actions__.length)&&r instanceof Pn&&ua(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:no,args:[i],thisArg:void 0}),new Cn(r,this.__chain__).thru((function(t){return e&&!t.length&&t.push(void 0),t}))):this.thru(i)}));var io=_i((function(t,e,n){kt.call(t,n)?++t[n]:$n(t,n,1)}));var ao=ji(Ca),oo=ji(Pa);function uo(t,e){return(Go(t)?ue:er)(t,Qi(e,3))}function so(t,e){return(Go(t)?se:nr)(t,Qi(e,3))}var co=_i((function(t,e,n){kt.call(t,n)?t[n].push(e):$n(t,n,[e])}));var lo=Er((function(t,e,n){var i=-1,a="function"==typeof e,o=qo(t)?r(t.length):[];return er(t,(function(t){o[++i]=a?ae(e,t,n):br(t,e,n)})),o})),fo=_i((function(t,e,n){$n(t,n,e)}));function ho(t,e){return(Go(t)?pe:Mr)(t,Qi(e,3))}var po=_i((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]}));var vo=Er((function(t,e){if(null==t)return[];var n=e.length;return n>1&&sa(t,e[0],e[1])?e=[]:n>2&&sa(e[0],e[1],e[2])&&(e=[e[0]]),Pr(t,or(e,1),[])})),go=Qe||function(){return Yt.Date.now()};function yo(t,e,n){return e=n?void 0:e,Bi(t,128,void 0,void 0,void 0,void 0,e=t&&null==e?t.length:e)}function mo(t,e){var n;if("function"!=typeof e)throw new yt(a);return t=iu(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=void 0),n}}var bo=Er((function(t,e,n){var r=1;if(n.length){var i=ze(n,Hi(bo));r|=32}return Bi(t,r,e,n,i)})),_o=Er((function(t,e,n){var r=3;if(n.length){var i=ze(n,Hi(_o));r|=32}return Bi(e,r,t,n,i)}));function wo(t,e,n){var r,i,o,u,s,c,l=0,f=!1,h=!1,p=!0;if("function"!=typeof t)throw new yt(a);function d(e){var n=r,a=i;return r=i=void 0,l=e,u=t.apply(a,n)}function v(t){return l=t,s=_a(y,e),f?d(t):u}function g(t){var n=t-c;return void 0===c||n>=e||n<0||h&&t-l>=o}function y(){var t=go();if(g(t))return m(t);s=_a(y,function(t){var n=e-(t-c);return h?sn(n,o-(t-l)):n}(t))}function m(t){return s=void 0,p&&r?d(t):(r=i=void 0,u)}function b(){var t=go(),n=g(t);if(r=arguments,i=this,c=t,n){if(void 0===s)return v(c);if(h)return fi(s),s=_a(y,e),d(c)}return void 0===s&&(s=_a(y,e)),u}return e=ou(e)||0,Wo(n)&&(f=!!n.leading,o=(h="maxWait"in n)?un(ou(n.maxWait)||0,e):o,p="trailing"in n?!!n.trailing:p),b.cancel=function(){void 0!==s&&fi(s),l=0,r=c=i=s=void 0},b.flush=function(){return void 0===s?u:m(go())},b}var xo=Er((function(t,e){return Jn(t,1,e)})),ko=Er((function(t,e,n){return Jn(t,ou(e)||0,n)}));function To(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new yt(a);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=t.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(To.Cache||qn),n}function Oo(t){if("function"!=typeof t)throw new yt(a);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}To.Cache=qn;var Ao=ci((function(t,e){var n=(e=1==e.length&&Go(e[0])?pe(e[0],Re(Qi())):pe(or(e,1),Re(Qi()))).length;return Er((function(r){for(var i=-1,a=sn(r.length,n);++i<a;)r[i]=e[i].call(this,r[i]);return ae(t,this,r)}))})),jo=Er((function(t,e){return Bi(t,32,void 0,e,ze(e,Hi(jo)))})),Mo=Er((function(t,e){return Bi(t,64,void 0,e,ze(e,Hi(Mo)))})),So=Vi((function(t,e){return Bi(t,256,void 0,void 0,void 0,e)}));function Lo(t,e){return t===e||t!=t&&e!=e}var Ro=Fi(vr),Co=Fi((function(t,e){return t>=e})),Po=_r(function(){return arguments}())?_r:function(t){return Vo(t)&&kt.call(t,"callee")&&!Zt.call(t,"callee")},Go=r.isArray,Fo=Jt?Re(Jt):function(t){return Vo(t)&&dr(t)==k};function qo(t){return null!=t&&zo(t.length)&&!Io(t)}function Do(t){return Vo(t)&&qo(t)}var No=nn||os,Eo=te?Re(te):function(t){return Vo(t)&&dr(t)==f};function Bo(t){if(!Vo(t))return!1;var e=dr(t);return e==h||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!$o(t)}function Io(t){if(!Wo(t))return!1;var e=dr(t);return e==p||e==d||"[object AsyncFunction]"==e||"[object Proxy]"==e}function Uo(t){return"number"==typeof t&&t==iu(t)}function zo(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function Wo(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Vo(t){return null!=t&&"object"==typeof t}var Zo=ee?Re(ee):function(t){return Vo(t)&&ra(t)==v};function Yo(t){return"number"==typeof t||Vo(t)&&dr(t)==g}function $o(t){if(!Vo(t)||dr(t)!=y)return!1;var e=Ut(t);if(null===e)return!0;var n=kt.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&xt.call(n)==jt}var Xo=ne?Re(ne):function(t){return Vo(t)&&dr(t)==m};var Ho=re?Re(re):function(t){return Vo(t)&&ra(t)==b};function Qo(t){return"string"==typeof t||!Go(t)&&Vo(t)&&dr(t)==_}function Ko(t){return"symbol"==typeof t||Vo(t)&&dr(t)==w}var Jo=ie?Re(ie):function(t){return Vo(t)&&zo(t.length)&&!!Bt[dr(t)]};var tu=Fi(jr),eu=Fi((function(t,e){return t<=e}));function nu(t){if(!t)return[];if(qo(t))return Qo(t)?Ye(t):mi(t);if(Qt&&t[Qt])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[Qt]());var e=ra(t);return(e==v?Ie:e==b?We:Lu)(t)}function ru(t){return t?(t=ou(t))===1/0||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function iu(t){var e=ru(t),n=e%1;return e==e?n?e-n:e:0}function au(t){return t?Hn(iu(t),0,4294967295):0}function ou(t){if("number"==typeof t)return t;if(Ko(t))return NaN;if(Wo(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Wo(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Le(t);var n=at.test(t);return n||ut.test(t)?Wt(t.slice(2),n?2:8):it.test(t)?NaN:+t}function uu(t){return bi(t,xu(t))}function su(t){return null==t?"":Kr(t)}var cu=wi((function(t,e){if(ha(e)||qo(e))bi(e,wu(e),t);else for(var n in e)kt.call(e,n)&&Wn(t,n,e[n])})),lu=wi((function(t,e){bi(e,xu(e),t)})),fu=wi((function(t,e,n,r){bi(e,xu(e),t,r)})),hu=wi((function(t,e,n,r){bi(e,wu(e),t,r)})),pu=Vi(Xn);var du=Er((function(t,e){t=dt(t);var n=-1,r=e.length,i=r>2?e[2]:void 0;for(i&&sa(e[0],e[1],i)&&(r=1);++n<r;)for(var a=e[n],o=xu(a),u=-1,s=o.length;++u<s;){var c=o[u],l=t[c];(void 0===l||Lo(l,_t[c])&&!kt.call(t,c))&&(t[c]=a[c])}return t})),vu=Er((function(t){return t.push(void 0,Ui),ae(Tu,void 0,t)}));function gu(t,e,n){var r=null==t?void 0:hr(t,e);return void 0===r?n:r}function yu(t,e){return null!=t&&ia(t,e,yr)}var mu=Li((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=At.call(e)),t[e]=n}),Wu(Yu)),bu=Li((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=At.call(e)),kt.call(t,e)?t[e].push(n):t[e]=[n]}),Qi),_u=Er(br);function wu(t){return qo(t)?En(t):Or(t)}function xu(t){return qo(t)?En(t,!0):Ar(t)}var ku=wi((function(t,e,n){Rr(t,e,n)})),Tu=wi((function(t,e,n,r){Rr(t,e,n,r)})),Ou=Vi((function(t,e){var n={};if(null==t)return n;var r=!1;e=pe(e,(function(e){return e=si(e,t),r||(r=e.length>1),e})),bi(t,Yi(t),n),r&&(n=Qn(n,7,zi));for(var i=e.length;i--;)ti(n,e[i]);return n}));var Au=Vi((function(t,e){return null==t?{}:function(t,e){return Gr(t,e,(function(e,n){return yu(t,n)}))}(t,e)}));function ju(t,e){if(null==t)return{};var n=pe(Yi(t),(function(t){return[t]}));return e=Qi(e),Gr(t,n,(function(t,n){return e(t,n[0])}))}var Mu=Ei(wu),Su=Ei(xu);function Lu(t){return null==t?[]:Ce(t,wu(t))}var Ru=Oi((function(t,e,n){return e=e.toLowerCase(),t+(n?Cu(e):e)}));function Cu(t){return Bu(su(t).toLowerCase())}function Pu(t){return(t=su(t))&&t.replace(ct,De).replace(Pt,"")}var Gu=Oi((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),Fu=Oi((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),qu=Ti("toLowerCase");var Du=Oi((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()}));var Nu=Oi((function(t,e,n){return t+(n?" ":"")+Bu(e)}));var Eu=Oi((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),Bu=Ti("toUpperCase");function Iu(t,e,n){return t=su(t),void 0===(e=n?void 0:e)?function(t){return Dt.test(t)}(t)?function(t){return t.match(Ft)||[]}(t):function(t){return t.match(J)||[]}(t):t.match(e)||[]}var Uu=Er((function(t,e){try{return ae(t,void 0,e)}catch(t){return Bo(t)?t:new X(t)}})),zu=Vi((function(t,e){return ue(e,(function(e){e=Aa(e),$n(t,e,bo(t[e],t))})),t}));function Wu(t){return function(){return t}}var Vu=Mi(),Zu=Mi(!0);function Yu(t){return t}function $u(t){return Tr("function"==typeof t?t:Qn(t,1))}var Xu=Er((function(t,e){return function(n){return br(n,t,e)}})),Hu=Er((function(t,e){return function(n){return br(t,n,e)}}));function Qu(t,e,n){var r=wu(e),i=fr(e,r);null!=n||Wo(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=fr(e,wu(e)));var a=!(Wo(n)&&"chain"in n&&!n.chain),o=Io(t);return ue(i,(function(n){var r=e[n];t[n]=r,o&&(t.prototype[n]=function(){var e=this.__chain__;if(a||e){var n=t(this.__wrapped__),i=n.__actions__=mi(this.__actions__);return i.push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,de([this.value()],arguments))})})),t}function Ku(){}var Ju=Ci(pe),ts=Ci(ce),es=Ci(ye);function ns(t){return ca(t)?Oe(Aa(t)):function(t){return function(e){return hr(e,t)}}(t)}var rs=Gi(),is=Gi(!0);function as(){return[]}function os(){return!1}var us=Ri((function(t,e){return t+e}),0),ss=Di("ceil"),cs=Ri((function(t,e){return t/e}),1),ls=Di("floor");var fs,hs=Ri((function(t,e){return t*e}),1),ps=Di("round"),ds=Ri((function(t,e){return t-e}),0);return Sn.after=function(t,e){if("function"!=typeof e)throw new yt(a);return t=iu(t),function(){if(--t<1)return e.apply(this,arguments)}},Sn.ary=yo,Sn.assign=cu,Sn.assignIn=lu,Sn.assignInWith=fu,Sn.assignWith=hu,Sn.at=pu,Sn.before=mo,Sn.bind=bo,Sn.bindAll=zu,Sn.bindKey=_o,Sn.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Go(t)?t:[t]},Sn.chain=eo,Sn.chunk=function(t,e,n){e=(n?sa(t,e,n):void 0===e)?1:un(iu(e),0);var i=null==t?0:t.length;if(!i||e<1)return[];for(var a=0,o=0,u=r(Je(i/e));a<i;)u[o++]=Zr(t,a,a+=e);return u},Sn.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,i=[];++e<n;){var a=t[e];a&&(i[r++]=a)}return i},Sn.concat=function(){var t=arguments.length;if(!t)return[];for(var e=r(t-1),n=arguments[0],i=t;i--;)e[i-1]=arguments[i];return de(Go(n)?mi(n):[n],or(e,1))},Sn.cond=function(t){var e=null==t?0:t.length,n=Qi();return t=e?pe(t,(function(t){if("function"!=typeof t[1])throw new yt(a);return[n(t[0]),t[1]]})):[],Er((function(n){for(var r=-1;++r<e;){var i=t[r];if(ae(i[0],this,n))return ae(i[1],this,n)}}))},Sn.conforms=function(t){return function(t){var e=wu(t);return function(n){return Kn(n,t,e)}}(Qn(t,1))},Sn.constant=Wu,Sn.countBy=io,Sn.create=function(t,e){var n=Ln(t);return null==e?n:Yn(n,e)},Sn.curry=function t(e,n,r){var i=Bi(e,8,void 0,void 0,void 0,void 0,void 0,n=r?void 0:n);return i.placeholder=t.placeholder,i},Sn.curryRight=function t(e,n,r){var i=Bi(e,16,void 0,void 0,void 0,void 0,void 0,n=r?void 0:n);return i.placeholder=t.placeholder,i},Sn.debounce=wo,Sn.defaults=du,Sn.defaultsDeep=vu,Sn.defer=xo,Sn.delay=ko,Sn.difference=Sa,Sn.differenceBy=La,Sn.differenceWith=Ra,Sn.drop=function(t,e,n){var r=null==t?0:t.length;return r?Zr(t,(e=n||void 0===e?1:iu(e))<0?0:e,r):[]},Sn.dropRight=function(t,e,n){var r=null==t?0:t.length;return r?Zr(t,0,(e=r-(e=n||void 0===e?1:iu(e)))<0?0:e):[]},Sn.dropRightWhile=function(t,e){return t&&t.length?ni(t,Qi(e,3),!0,!0):[]},Sn.dropWhile=function(t,e){return t&&t.length?ni(t,Qi(e,3),!0):[]},Sn.fill=function(t,e,n,r){var i=null==t?0:t.length;return i?(n&&"number"!=typeof n&&sa(t,e,n)&&(n=0,r=i),function(t,e,n,r){var i=t.length;for((n=iu(n))<0&&(n=-n>i?0:i+n),(r=void 0===r||r>i?i:iu(r))<0&&(r+=i),r=n>r?0:au(r);n<r;)t[n++]=e;return t}(t,e,n,r)):[]},Sn.filter=function(t,e){return(Go(t)?le:ar)(t,Qi(e,3))},Sn.flatMap=function(t,e){return or(ho(t,e),1)},Sn.flatMapDeep=function(t,e){return or(ho(t,e),1/0)},Sn.flatMapDepth=function(t,e,n){return n=void 0===n?1:iu(n),or(ho(t,e),n)},Sn.flatten=Ga,Sn.flattenDeep=function(t){return(null==t?0:t.length)?or(t,1/0):[]},Sn.flattenDepth=function(t,e){return(null==t?0:t.length)?or(t,e=void 0===e?1:iu(e)):[]},Sn.flip=function(t){return Bi(t,512)},Sn.flow=Vu,Sn.flowRight=Zu,Sn.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var i=t[e];r[i[0]]=i[1]}return r},Sn.functions=function(t){return null==t?[]:fr(t,wu(t))},Sn.functionsIn=function(t){return null==t?[]:fr(t,xu(t))},Sn.groupBy=co,Sn.initial=function(t){return(null==t?0:t.length)?Zr(t,0,-1):[]},Sn.intersection=qa,Sn.intersectionBy=Da,Sn.intersectionWith=Na,Sn.invert=mu,Sn.invertBy=bu,Sn.invokeMap=lo,Sn.iteratee=$u,Sn.keyBy=fo,Sn.keys=wu,Sn.keysIn=xu,Sn.map=ho,Sn.mapKeys=function(t,e){var n={};return e=Qi(e,3),cr(t,(function(t,r,i){$n(n,e(t,r,i),t)})),n},Sn.mapValues=function(t,e){var n={};return e=Qi(e,3),cr(t,(function(t,r,i){$n(n,r,e(t,r,i))})),n},Sn.matches=function(t){return Sr(Qn(t,1))},Sn.matchesProperty=function(t,e){return Lr(t,Qn(e,1))},Sn.memoize=To,Sn.merge=ku,Sn.mergeWith=Tu,Sn.method=Xu,Sn.methodOf=Hu,Sn.mixin=Qu,Sn.negate=Oo,Sn.nthArg=function(t){return t=iu(t),Er((function(e){return Cr(e,t)}))},Sn.omit=Ou,Sn.omitBy=function(t,e){return ju(t,Oo(Qi(e)))},Sn.once=function(t){return mo(2,t)},Sn.orderBy=function(t,e,n,r){return null==t?[]:(Go(e)||(e=null==e?[]:[e]),Go(n=r?void 0:n)||(n=null==n?[]:[n]),Pr(t,e,n))},Sn.over=Ju,Sn.overArgs=Ao,Sn.overEvery=ts,Sn.overSome=es,Sn.partial=jo,Sn.partialRight=Mo,Sn.partition=po,Sn.pick=Au,Sn.pickBy=ju,Sn.property=ns,Sn.propertyOf=function(t){return function(e){return null==t?void 0:hr(t,e)}},Sn.pull=Ba,Sn.pullAll=Ia,Sn.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?Fr(t,e,Qi(n,2)):t},Sn.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?Fr(t,e,void 0,n):t},Sn.pullAt=Ua,Sn.range=rs,Sn.rangeRight=is,Sn.rearg=So,Sn.reject=function(t,e){return(Go(t)?le:ar)(t,Oo(Qi(e,3)))},Sn.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,i=[],a=t.length;for(e=Qi(e,3);++r<a;){var o=t[r];e(o,r,t)&&(n.push(o),i.push(r))}return qr(t,i),n},Sn.rest=function(t,e){if("function"!=typeof t)throw new yt(a);return Er(t,e=void 0===e?e:iu(e))},Sn.reverse=za,Sn.sampleSize=function(t,e,n){return e=(n?sa(t,e,n):void 0===e)?1:iu(e),(Go(t)?In:Ir)(t,e)},Sn.set=function(t,e,n){return null==t?t:Ur(t,e,n)},Sn.setWith=function(t,e,n,r){return r="function"==typeof r?r:void 0,null==t?t:Ur(t,e,n,r)},Sn.shuffle=function(t){return(Go(t)?Un:Vr)(t)},Sn.slice=function(t,e,n){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&sa(t,e,n)?(e=0,n=r):(e=null==e?0:iu(e),n=void 0===n?r:iu(n)),Zr(t,e,n)):[]},Sn.sortBy=vo,Sn.sortedUniq=function(t){return t&&t.length?Hr(t):[]},Sn.sortedUniqBy=function(t,e){return t&&t.length?Hr(t,Qi(e,2)):[]},Sn.split=function(t,e,n){return n&&"number"!=typeof n&&sa(t,e,n)&&(e=n=void 0),(n=void 0===n?4294967295:n>>>0)?(t=su(t))&&("string"==typeof e||null!=e&&!Xo(e))&&!(e=Kr(e))&&Be(t)?li(Ye(t),0,n):t.split(e,n):[]},Sn.spread=function(t,e){if("function"!=typeof t)throw new yt(a);return e=null==e?0:un(iu(e),0),Er((function(n){var r=n[e],i=li(n,0,e);return r&&de(i,r),ae(t,this,i)}))},Sn.tail=function(t){var e=null==t?0:t.length;return e?Zr(t,1,e):[]},Sn.take=function(t,e,n){return t&&t.length?Zr(t,0,(e=n||void 0===e?1:iu(e))<0?0:e):[]},Sn.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?Zr(t,(e=r-(e=n||void 0===e?1:iu(e)))<0?0:e,r):[]},Sn.takeRightWhile=function(t,e){return t&&t.length?ni(t,Qi(e,3),!1,!0):[]},Sn.takeWhile=function(t,e){return t&&t.length?ni(t,Qi(e,3)):[]},Sn.tap=function(t,e){return e(t),t},Sn.throttle=function(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new yt(a);return Wo(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),wo(t,e,{leading:r,maxWait:e,trailing:i})},Sn.thru=no,Sn.toArray=nu,Sn.toPairs=Mu,Sn.toPairsIn=Su,Sn.toPath=function(t){return Go(t)?pe(t,Aa):Ko(t)?[t]:mi(Oa(su(t)))},Sn.toPlainObject=uu,Sn.transform=function(t,e,n){var r=Go(t),i=r||No(t)||Jo(t);if(e=Qi(e,4),null==n){var a=t&&t.constructor;n=i?r?new a:[]:Wo(t)&&Io(a)?Ln(Ut(t)):{}}return(i?ue:cr)(t,(function(t,r,i){return e(n,t,r,i)})),n},Sn.unary=function(t){return yo(t,1)},Sn.union=Wa,Sn.unionBy=Va,Sn.unionWith=Za,Sn.uniq=function(t){return t&&t.length?Jr(t):[]},Sn.uniqBy=function(t,e){return t&&t.length?Jr(t,Qi(e,2)):[]},Sn.uniqWith=function(t,e){return e="function"==typeof e?e:void 0,t&&t.length?Jr(t,void 0,e):[]},Sn.unset=function(t,e){return null==t||ti(t,e)},Sn.unzip=Ya,Sn.unzipWith=$a,Sn.update=function(t,e,n){return null==t?t:ei(t,e,ui(n))},Sn.updateWith=function(t,e,n,r){return r="function"==typeof r?r:void 0,null==t?t:ei(t,e,ui(n),r)},Sn.values=Lu,Sn.valuesIn=function(t){return null==t?[]:Ce(t,xu(t))},Sn.without=Xa,Sn.words=Iu,Sn.wrap=function(t,e){return jo(ui(e),t)},Sn.xor=Ha,Sn.xorBy=Qa,Sn.xorWith=Ka,Sn.zip=Ja,Sn.zipObject=function(t,e){return ai(t||[],e||[],Wn)},Sn.zipObjectDeep=function(t,e){return ai(t||[],e||[],Ur)},Sn.zipWith=to,Sn.entries=Mu,Sn.entriesIn=Su,Sn.extend=lu,Sn.extendWith=fu,Qu(Sn,Sn),Sn.add=us,Sn.attempt=Uu,Sn.camelCase=Ru,Sn.capitalize=Cu,Sn.ceil=ss,Sn.clamp=function(t,e,n){return void 0===n&&(n=e,e=void 0),void 0!==n&&(n=(n=ou(n))==n?n:0),void 0!==e&&(e=(e=ou(e))==e?e:0),Hn(ou(t),e,n)},Sn.clone=function(t){return Qn(t,4)},Sn.cloneDeep=function(t){return Qn(t,5)},Sn.cloneDeepWith=function(t,e){return Qn(t,5,e="function"==typeof e?e:void 0)},Sn.cloneWith=function(t,e){return Qn(t,4,e="function"==typeof e?e:void 0)},Sn.conformsTo=function(t,e){return null==e||Kn(t,e,wu(e))},Sn.deburr=Pu,Sn.defaultTo=function(t,e){return null==t||t!=t?e:t},Sn.divide=cs,Sn.endsWith=function(t,e,n){t=su(t),e=Kr(e);var r=t.length,i=n=void 0===n?r:Hn(iu(n),0,r);return(n-=e.length)>=0&&t.slice(n,i)==e},Sn.eq=Lo,Sn.escape=function(t){return(t=su(t))&&E.test(t)?t.replace(D,Ne):t},Sn.escapeRegExp=function(t){return(t=su(t))&&Y.test(t)?t.replace(Z,"\\$&"):t},Sn.every=function(t,e,n){var r=Go(t)?ce:rr;return n&&sa(t,e,n)&&(e=void 0),r(t,Qi(e,3))},Sn.find=ao,Sn.findIndex=Ca,Sn.findKey=function(t,e){return be(t,Qi(e,3),cr)},Sn.findLast=oo,Sn.findLastIndex=Pa,Sn.findLastKey=function(t,e){return be(t,Qi(e,3),lr)},Sn.floor=ls,Sn.forEach=uo,Sn.forEachRight=so,Sn.forIn=function(t,e){return null==t?t:ur(t,Qi(e,3),xu)},Sn.forInRight=function(t,e){return null==t?t:sr(t,Qi(e,3),xu)},Sn.forOwn=function(t,e){return t&&cr(t,Qi(e,3))},Sn.forOwnRight=function(t,e){return t&&lr(t,Qi(e,3))},Sn.get=gu,Sn.gt=Ro,Sn.gte=Co,Sn.has=function(t,e){return null!=t&&ia(t,e,gr)},Sn.hasIn=yu,Sn.head=Fa,Sn.identity=Yu,Sn.includes=function(t,e,n,r){t=qo(t)?t:Lu(t),n=n&&!r?iu(n):0;var i=t.length;return n<0&&(n=un(i+n,0)),Qo(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&we(t,e,n)>-1},Sn.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:iu(n);return i<0&&(i=un(r+i,0)),we(t,e,i)},Sn.inRange=function(t,e,n){return e=ru(e),void 0===n?(n=e,e=0):n=ru(n),function(t,e,n){return t>=sn(e,n)&&t<un(e,n)}(t=ou(t),e,n)},Sn.invoke=_u,Sn.isArguments=Po,Sn.isArray=Go,Sn.isArrayBuffer=Fo,Sn.isArrayLike=qo,Sn.isArrayLikeObject=Do,Sn.isBoolean=function(t){return!0===t||!1===t||Vo(t)&&dr(t)==l},Sn.isBuffer=No,Sn.isDate=Eo,Sn.isElement=function(t){return Vo(t)&&1===t.nodeType&&!$o(t)},Sn.isEmpty=function(t){if(null==t)return!0;if(qo(t)&&(Go(t)||"string"==typeof t||"function"==typeof t.splice||No(t)||Jo(t)||Po(t)))return!t.length;var e=ra(t);if(e==v||e==b)return!t.size;if(ha(t))return!Or(t).length;for(var n in t)if(kt.call(t,n))return!1;return!0},Sn.isEqual=function(t,e){return wr(t,e)},Sn.isEqualWith=function(t,e,n){var r=(n="function"==typeof n?n:void 0)?n(t,e):void 0;return void 0===r?wr(t,e,void 0,n):!!r},Sn.isError=Bo,Sn.isFinite=function(t){return"number"==typeof t&&rn(t)},Sn.isFunction=Io,Sn.isInteger=Uo,Sn.isLength=zo,Sn.isMap=Zo,Sn.isMatch=function(t,e){return t===e||xr(t,e,Ji(e))},Sn.isMatchWith=function(t,e,n){return n="function"==typeof n?n:void 0,xr(t,e,Ji(e),n)},Sn.isNaN=function(t){return Yo(t)&&t!=+t},Sn.isNative=function(t){if(fa(t))throw new X("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return kr(t)},Sn.isNil=function(t){return null==t},Sn.isNull=function(t){return null===t},Sn.isNumber=Yo,Sn.isObject=Wo,Sn.isObjectLike=Vo,Sn.isPlainObject=$o,Sn.isRegExp=Xo,Sn.isSafeInteger=function(t){return Uo(t)&&t>=-9007199254740991&&t<=9007199254740991},Sn.isSet=Ho,Sn.isString=Qo,Sn.isSymbol=Ko,Sn.isTypedArray=Jo,Sn.isUndefined=function(t){return void 0===t},Sn.isWeakMap=function(t){return Vo(t)&&ra(t)==x},Sn.isWeakSet=function(t){return Vo(t)&&"[object WeakSet]"==dr(t)},Sn.join=function(t,e){return null==t?"":an.call(t,e)},Sn.kebabCase=Gu,Sn.last=Ea,Sn.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r;return void 0!==n&&(i=(i=iu(n))<0?un(r+i,0):sn(i,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,i):_e(t,ke,i,!0)},Sn.lowerCase=Fu,Sn.lowerFirst=qu,Sn.lt=tu,Sn.lte=eu,Sn.max=function(t){return t&&t.length?ir(t,Yu,vr):void 0},Sn.maxBy=function(t,e){return t&&t.length?ir(t,Qi(e,2),vr):void 0},Sn.mean=function(t){return Te(t,Yu)},Sn.meanBy=function(t,e){return Te(t,Qi(e,2))},Sn.min=function(t){return t&&t.length?ir(t,Yu,jr):void 0},Sn.minBy=function(t,e){return t&&t.length?ir(t,Qi(e,2),jr):void 0},Sn.stubArray=as,Sn.stubFalse=os,Sn.stubObject=function(){return{}},Sn.stubString=function(){return""},Sn.stubTrue=function(){return!0},Sn.multiply=hs,Sn.nth=function(t,e){return t&&t.length?Cr(t,iu(e)):void 0},Sn.noConflict=function(){return Yt._===this&&(Yt._=Mt),this},Sn.noop=Ku,Sn.now=go,Sn.pad=function(t,e,n){t=su(t);var r=(e=iu(e))?Ze(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return Pi(tn(i),n)+t+Pi(Je(i),n)},Sn.padEnd=function(t,e,n){t=su(t);var r=(e=iu(e))?Ze(t):0;return e&&r<e?t+Pi(e-r,n):t},Sn.padStart=function(t,e,n){t=su(t);var r=(e=iu(e))?Ze(t):0;return e&&r<e?Pi(e-r,n)+t:t},Sn.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),ln(su(t).replace($,""),e||0)},Sn.random=function(t,e,n){if(n&&"boolean"!=typeof n&&sa(t,e,n)&&(e=n=void 0),void 0===n&&("boolean"==typeof e?(n=e,e=void 0):"boolean"==typeof t&&(n=t,t=void 0)),void 0===t&&void 0===e?(t=0,e=1):(t=ru(t),void 0===e?(e=t,t=0):e=ru(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var i=fn();return sn(t+i*(e-t+zt("1e-"+((i+"").length-1))),e)}return Dr(t,e)},Sn.reduce=function(t,e,n){var r=Go(t)?ve:je,i=arguments.length<3;return r(t,Qi(e,4),n,i,er)},Sn.reduceRight=function(t,e,n){var r=Go(t)?ge:je,i=arguments.length<3;return r(t,Qi(e,4),n,i,nr)},Sn.repeat=function(t,e,n){return e=(n?sa(t,e,n):void 0===e)?1:iu(e),Nr(su(t),e)},Sn.replace=function(){var t=arguments,e=su(t[0]);return t.length<3?e:e.replace(t[1],t[2])},Sn.result=function(t,e,n){var r=-1,i=(e=si(e,t)).length;for(i||(i=1,t=void 0);++r<i;){var a=null==t?void 0:t[Aa(e[r])];void 0===a&&(r=i,a=n),t=Io(a)?a.call(t):a}return t},Sn.round=ps,Sn.runInContext=t,Sn.sample=function(t){return(Go(t)?Bn:Br)(t)},Sn.size=function(t){if(null==t)return 0;if(qo(t))return Qo(t)?Ze(t):t.length;var e=ra(t);return e==v||e==b?t.size:Or(t).length},Sn.snakeCase=Du,Sn.some=function(t,e,n){var r=Go(t)?ye:Yr;return n&&sa(t,e,n)&&(e=void 0),r(t,Qi(e,3))},Sn.sortedIndex=function(t,e){return $r(t,e)},Sn.sortedIndexBy=function(t,e,n){return Xr(t,e,Qi(n,2))},Sn.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=$r(t,e);if(r<n&&Lo(t[r],e))return r}return-1},Sn.sortedLastIndex=function(t,e){return $r(t,e,!0)},Sn.sortedLastIndexBy=function(t,e,n){return Xr(t,e,Qi(n,2),!0)},Sn.sortedLastIndexOf=function(t,e){if(null==t?0:t.length){var n=$r(t,e,!0)-1;if(Lo(t[n],e))return n}return-1},Sn.startCase=Nu,Sn.startsWith=function(t,e,n){return t=su(t),n=null==n?0:Hn(iu(n),0,t.length),e=Kr(e),t.slice(n,n+e.length)==e},Sn.subtract=ds,Sn.sum=function(t){return t&&t.length?Me(t,Yu):0},Sn.sumBy=function(t,e){return t&&t.length?Me(t,Qi(e,2)):0},Sn.template=function(t,e,n){var r=Sn.templateSettings;n&&sa(t,e,n)&&(e=void 0),t=su(t),e=fu({},e,r,Ii);var i,a,o=fu({},e.imports,r.imports,Ii),u=wu(o),s=Ce(o,u),c=0,l=e.interpolate||lt,f="__p += '",h=vt((e.escape||lt).source+"|"+l.source+"|"+(l===U?nt:lt).source+"|"+(e.evaluate||lt).source+"|$","g"),p="//# sourceURL="+(kt.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Et+"]")+"\n";t.replace(h,(function(e,n,r,o,u,s){return r||(r=o),f+=t.slice(c,s).replace(ft,Ee),n&&(i=!0,f+="' +\n__e("+n+") +\n'"),u&&(a=!0,f+="';\n"+u+";\n__p += '"),r&&(f+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),c=s+e.length,e})),f+="';\n";var d=kt.call(e,"variable")&&e.variable;if(d){if(tt.test(d))throw new X("Invalid `variable` option passed into `_.template`")}else f="with (obj) {\n"+f+"\n}\n";f=(a?f.replace(P,""):f).replace(G,"$1").replace(F,"$1;"),f="function("+(d||"obj")+") {\n"+(d?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var v=Uu((function(){return ht(u,p+"return "+f).apply(void 0,s)}));if(v.source=f,Bo(v))throw v;return v},Sn.times=function(t,e){if((t=iu(t))<1||t>9007199254740991)return[];var n=4294967295,r=sn(t,4294967295);t-=4294967295;for(var i=Se(r,e=Qi(e));++n<t;)e(n);return i},Sn.toFinite=ru,Sn.toInteger=iu,Sn.toLength=au,Sn.toLower=function(t){return su(t).toLowerCase()},Sn.toNumber=ou,Sn.toSafeInteger=function(t){return t?Hn(iu(t),-9007199254740991,9007199254740991):0===t?t:0},Sn.toString=su,Sn.toUpper=function(t){return su(t).toUpperCase()},Sn.trim=function(t,e,n){if((t=su(t))&&(n||void 0===e))return Le(t);if(!t||!(e=Kr(e)))return t;var r=Ye(t),i=Ye(e);return li(r,Ge(r,i),Fe(r,i)+1).join("")},Sn.trimEnd=function(t,e,n){if((t=su(t))&&(n||void 0===e))return t.slice(0,$e(t)+1);if(!t||!(e=Kr(e)))return t;var r=Ye(t);return li(r,0,Fe(r,Ye(e))+1).join("")},Sn.trimStart=function(t,e,n){if((t=su(t))&&(n||void 0===e))return t.replace($,"");if(!t||!(e=Kr(e)))return t;var r=Ye(t);return li(r,Ge(r,Ye(e))).join("")},Sn.truncate=function(t,e){var n=30,r="...";if(Wo(e)){var i="separator"in e?e.separator:i;n="length"in e?iu(e.length):n,r="omission"in e?Kr(e.omission):r}var a=(t=su(t)).length;if(Be(t)){var o=Ye(t);a=o.length}if(n>=a)return t;var u=n-Ze(r);if(u<1)return r;var s=o?li(o,0,u).join(""):t.slice(0,u);if(void 0===i)return s+r;if(o&&(u+=s.length-u),Xo(i)){if(t.slice(u).search(i)){var c,l=s;for(i.global||(i=vt(i.source,su(rt.exec(i))+"g")),i.lastIndex=0;c=i.exec(l);)var f=c.index;s=s.slice(0,void 0===f?u:f)}}else if(t.indexOf(Kr(i),u)!=u){var h=s.lastIndexOf(i);h>-1&&(s=s.slice(0,h))}return s+r},Sn.unescape=function(t){return(t=su(t))&&N.test(t)?t.replace(q,Xe):t},Sn.uniqueId=function(t){var e=++Tt;return su(t)+e},Sn.upperCase=Eu,Sn.upperFirst=Bu,Sn.each=uo,Sn.eachRight=so,Sn.first=Fa,Qu(Sn,(fs={},cr(Sn,(function(t,e){kt.call(Sn.prototype,e)||(fs[e]=t)})),fs),{chain:!1}),Sn.VERSION="4.17.21",ue(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){Sn[t].placeholder=Sn})),ue(["drop","take"],(function(t,e){Pn.prototype[t]=function(n){n=void 0===n?1:un(iu(n),0);var r=this.__filtered__&&!e?new Pn(this):this.clone();return r.__filtered__?r.__takeCount__=sn(n,r.__takeCount__):r.__views__.push({size:sn(n,4294967295),type:t+(r.__dir__<0?"Right":"")}),r},Pn.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),ue(["filter","map","takeWhile"],(function(t,e){var n=e+1,r=1==n||3==n;Pn.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:Qi(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}})),ue(["head","last"],(function(t,e){var n="take"+(e?"Right":"");Pn.prototype[t]=function(){return this[n](1).value()[0]}})),ue(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");Pn.prototype[t]=function(){return this.__filtered__?new Pn(this):this[n](1)}})),Pn.prototype.compact=function(){return this.filter(Yu)},Pn.prototype.find=function(t){return this.filter(t).head()},Pn.prototype.findLast=function(t){return this.reverse().find(t)},Pn.prototype.invokeMap=Er((function(t,e){return"function"==typeof t?new Pn(this):this.map((function(n){return br(n,t,e)}))})),Pn.prototype.reject=function(t){return this.filter(Oo(Qi(t)))},Pn.prototype.slice=function(t,e){t=iu(t);var n=this;return n.__filtered__&&(t>0||e<0)?new Pn(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),void 0!==e&&(n=(e=iu(e))<0?n.dropRight(-e):n.take(e-t)),n)},Pn.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Pn.prototype.toArray=function(){return this.take(4294967295)},cr(Pn.prototype,(function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=Sn[r?"take"+("last"==e?"Right":""):e],a=r||/^find/.test(e);i&&(Sn.prototype[e]=function(){var e=this.__wrapped__,o=r?[1]:arguments,u=e instanceof Pn,s=o[0],c=u||Go(e),l=function(t){var e=i.apply(Sn,de([t],o));return r&&f?e[0]:e};c&&n&&"function"==typeof s&&1!=s.length&&(u=c=!1);var f=this.__chain__,h=!!this.__actions__.length,p=a&&!f,d=u&&!h;if(!a&&c){e=d?e:new Pn(this);var v=t.apply(e,o);return v.__actions__.push({func:no,args:[l],thisArg:void 0}),new Cn(v,f)}return p&&d?t.apply(this,o):(v=this.thru(l),p?r?v.value()[0]:v.value():v)})})),ue(["pop","push","shift","sort","splice","unshift"],(function(t){var e=mt[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);Sn.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(Go(i)?i:[],t)}return this[n]((function(n){return e.apply(Go(n)?n:[],t)}))}})),cr(Pn.prototype,(function(t,e){var n=Sn[e];if(n){var r=n.name+"";kt.call(_n,r)||(_n[r]=[]),_n[r].push({name:e,func:n})}})),_n[Si(void 0,2).name]=[{name:"wrapper",func:void 0}],Pn.prototype.clone=function(){var t=new Pn(this.__wrapped__);return t.__actions__=mi(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=mi(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=mi(this.__views__),t},Pn.prototype.reverse=function(){if(this.__filtered__){var t=new Pn(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Pn.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=Go(t),r=e<0,i=n?t.length:0,a=function(t,e,n){var r=-1,i=n.length;for(;++r<i;){var a=n[r],o=a.size;switch(a.type){case"drop":t+=o;break;case"dropRight":e-=o;break;case"take":e=sn(e,t+o);break;case"takeRight":t=un(t,e-o)}}return{start:t,end:e}}(0,i,this.__views__),o=a.start,u=a.end,s=u-o,c=r?u:o-1,l=this.__iteratees__,f=l.length,h=0,p=sn(s,this.__takeCount__);if(!n||!r&&i==s&&p==s)return ri(t,this.__actions__);var d=[];t:for(;s--&&h<p;){for(var v=-1,g=t[c+=e];++v<f;){var y=l[v],m=y.iteratee,b=y.type,_=m(g);if(2==b)g=_;else if(!_){if(1==b)continue t;break t}}d[h++]=g}return d},Sn.prototype.at=ro,Sn.prototype.chain=function(){return eo(this)},Sn.prototype.commit=function(){return new Cn(this.value(),this.__chain__)},Sn.prototype.next=function(){void 0===this.__values__&&(this.__values__=nu(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?void 0:this.__values__[this.__index__++]}},Sn.prototype.plant=function(t){for(var e,n=this;n instanceof Rn;){var r=Ma(n);r.__index__=0,r.__values__=void 0,e?i.__wrapped__=r:e=r;var i=r;n=n.__wrapped__}return i.__wrapped__=t,e},Sn.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Pn){var e=t;return this.__actions__.length&&(e=new Pn(this)),(e=e.reverse()).__actions__.push({func:no,args:[za],thisArg:void 0}),new Cn(e,this.__chain__)}return this.thru(za)},Sn.prototype.toJSON=Sn.prototype.valueOf=Sn.prototype.value=function(){return ri(this.__wrapped__,this.__actions__)},Sn.prototype.first=Sn.prototype.head,Qt&&(Sn.prototype[Qt]=function(){return this}),Sn}();Yt._=He,void 0===(i=function(){return He}.call(e,n,e,r))||(r.exports=i)}).call(this)}).call(this,n(11),n(12)(t))},function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return i}));let r={A0:27.5,"A#0":29.1352,Bb0:29.1352,B0:30.8677,"B#0":32.7032,Cb1:30.8677,C1:32.7032,"C#1":34.6478,Db1:34.6478,D1:36.7081,"D#1":38.8909,Eb1:38.8909,E1:41.2034,Fb1:41.2034,"E#1":43.6535,F1:43.6535,"F#1":46.2493,Gb1:46.2493,G1:48.9994,"G#1":51.9131,Ab1:51.9131,A1:55,"A#1":58.2705,Bb1:58.2705,B1:61.7354,Cb2:61.7354,"B#1":65.4064,C2:65.4064,"C#2":69.2957,Db2:69.2957,D2:73.4162,"D#2":77.7817,Eb2:77.7817,E2:82.4069,Fb2:82.4069,"E#2":87.3071,F2:87.3071,"F#2":92.4986,Gb2:92.4986,G2:97.9989,"G#2":103.826,Ab2:103.826,A2:110,"A#2":116.541,Bb2:116.541,B2:123.471,Cb3:123.471,"B#2":130.813,C3:130.813,"C#3":138.591,Db3:138.591,D3:146.832,"D#3":155.563,Eb3:155.563,E3:164.814,Fb3:164.814,"E#3":174.614,F3:174.614,"F#3":184.997,Gb3:184.997,G3:195.998,"G#3":207.652,Ab3:207.652,A3:220,"A#3":233.082,Bb3:233.082,B3:246.942,Cb4:246.942,"B#3":261.626,C4:261.626,"C#4":277.183,Db4:277.183,D4:293.665,"D#4":311.127,Eb4:311.127,E4:329.628,Fb4:329.628,"E#4":349.228,F4:349.228,"F#4":369.994,Gb4:369.994,G4:391.995,"G#4":415.305,Ab4:415.305,A4:440,"A#4":466.164,Bb4:466.164,B4:493.883,Cb5:493.883,"B#4":523.251,C5:523.251,"C#5":554.365,Db5:554.365,D5:587.33,"D#5":622.254,Eb5:622.254,E5:659.255,Fb5:659.255,"E#5":698.456,F5:698.456,"F#5":739.989,Gb5:739.989,G5:783.991,"G#5":830.609,Ab5:830.609,A5:880,"A#5":932.328,Bb5:932.328,B5:987.767,Cb6:987.767,"B#5":1046.5,C6:1046.5,"C#6":1108.73,Db6:1108.73,D6:1174.66,"D#6":1244.51,Eb6:1244.51,Fb6:1318.51,E6:1318.51,"E#6":1396.91,F6:1396.91,"F#6":1479.98,Gb6:1479.98,G6:1567.98,"G#6":1661.22,Ab6:1661.22,A6:1760,"A#6":1864.66,Bb6:1864.66,B6:1975.53,Cb7:1975.53,"B#6":2093,C7:2093,"C#7":2217.46,Db7:2217.46,D7:2349.32,"D#7":2489.02,Eb7:2489.02,E7:2637.02,Fb7:2637.02,"E#7":2793.83,F7:2793.83,"F#7":2959.96,Gb7:2959.96,G7:3135.96,"G#7":3322.44,Ab7:3322.44,A7:3520,"A#7":3729.31,Bb7:3729.31,B7:3951.07,Cb8:3951.07,"B#7":4186.01,C8:4186.01},i=["C0","C#0","D0","D#0","E0","F0","F#0","G0","G#0","A0","A#0","B0","C1","C#1","D1","D#1","E1","F1","F#1","G1","G#1","A1","A#1","B1","C2","C#2","D2","D#2","E2","F2","F#2","G2","G#2","A2","A#2","B2","C3","C#3","D3","D#3","E3","F3","F#3","G3","G#3","A3","A#3","B3","C4","C#4","D4","D#4","E4","F4","F#4","G4","G#4","A4","A#4","B4","C5","C#5","D5","D#5","E5","F5","F#5","G5","G#5","A5","A#5","B5","C6","C#6","D6","D#6","E6","F6","F#6","G6","G#6","A6","A#6","B6","C7","C#7","D7","D#7","E7","F7","F#7","G7","G#7","A7","A#7","B7","C8"]},function(t,e,n){!function(){var e,n,r=function(t,e){t.value=e},i=Object.create(null,{activate:{writable:!0,value:function(t){t?(this.input.disconnect(),this.input.connect(this.activateNode),this.activateCallback&&this.activateCallback(t)):(this.input.disconnect(),this.input.connect(this.output))}},bypass:{get:function(){return this._bypass},set:function(t){this._lastBypassValue!==t&&(this._bypass=t,this.activate(!t),this._lastBypassValue=t)}},connect:{value:function(t){this.output.connect(t)}},disconnect:{value:function(t){this.output.disconnect(t)}},connectInOrder:{value:function(t){for(var e=t.length-1;e--;){if(!t[e].connect)return console.error("AudioNode.connectInOrder: TypeError: Not an AudioNode.",t[e]);t[e+1].input?t[e].connect(t[e+1].input):t[e].connect(t[e+1])}}},getDefaults:{value:function(){var t={};for(var e in this.defaults)t[e]=this.defaults[e].value;return t}},automate:{value:function(t,n,r,i){var a,o=i?~~(i/1e3):e.currentTime,u=r?~~(r/1e3):0,s=this.defaults[t],c=this[t];c?s.automatable?(r?(a="linearRampToValueAtTime",c.cancelScheduledValues(o),c.setValueAtTime(c.value,o)):a="setValueAtTime",c[a](n,u+o)):c=n:console.error("Invalid Property for "+this.name)}}}),a="float",o="boolean",u="int";function s(t){if(!(this instanceof s))return new s(t);var r="undefined"==typeof window?{}:window;if(r.AudioContext||(r.AudioContext=r.webkitAudioContext),t||(console.log("tuna.js: Missing audio context! Creating a new context for you."),t=r.AudioContext&&new r.AudioContext),!t)throw new Error("Tuna cannot initialize because this environment does not support web audio.");!function(t){if(!0===t.__connectified__)return;var e=t.createGain(),n=Object.getPrototypeOf(Object.getPrototypeOf(e)),r=n.connect;n.connect=function(){var t=arguments[0];return arguments[0]=i.isPrototypeOf?i.isPrototypeOf(t)?t.input:t:t.input||t,r.apply(this,arguments),t},t.__connectified__=!0}(t),e=t,n=this}function c(t){return Math.max(0,Math.round(100*Math.pow(2,t/6))/100)}function l(t,e){var n,r,i,a=0,o=0,u=0;return n=t.toExponential().match(/^.\.?(.*)e(.+)$/),a=parseInt(n[2],10)-(n[1]+"").length,n=e.toExponential().match(/^.\.?(.*)e(.+)$/),(i=parseInt(n[2],10)-(n[1]+"").length)>a&&(a=i),r=t%e,a<-100||a>20?(o=Math.round(Math.log(r)/Math.log(10)),(r/(u=Math.pow(10,o))).toFixed(o-a)*u):parseFloat(r.toFixed(-a))}function f(t){return 0===t?1:Math.abs(t)/t}function h(t){return(Math.exp(t)-Math.exp(-t))/(Math.exp(t)+Math.exp(-t))}function p(t,e){return void 0===t?e:t}t.exports?t.exports=s:window.define("Tuna",(function(){return s})),s.prototype.Bitcrusher=function(t){t||(t=this.getDefaults()),this.bufferSize=t.bufferSize||this.defaults.bufferSize.value,this.input=e.createGain(),this.activateNode=e.createGain(),this.processor=e.createScriptProcessor(this.bufferSize,1,1),this.output=e.createGain(),this.activateNode.connect(this.processor),this.processor.connect(this.output);var n,r,i,a,o,u=0,s=0;this.processor.onaudioprocess=function(t){for(n=t.inputBuffer.getChannelData(0),r=t.outputBuffer.getChannelData(0),i=Math.pow(.5,this.bits),o=n.length,a=0;a<o;a++)(u+=this.normfreq)>=1&&(u-=1,s=i*Math.floor(n[a]/i+.5)),r[a]=s},this.bits=t.bits||this.defaults.bits.value,this.normfreq=p(t.normfreq,this.defaults.normfreq.value),this.bypass=t.bypass||this.defaults.bypass.value},s.prototype.Bitcrusher.prototype=Object.create(i,{name:{value:"Bitcrusher"},defaults:{writable:!0,value:{bits:{value:4,min:1,max:16,automatable:!1,type:u},bufferSize:{value:4096,min:256,max:16384,automatable:!1,type:u},bypass:{value:!1,automatable:!1,type:o},normfreq:{value:.1,min:1e-4,max:1,automatable:!1,type:a}}},bits:{enumerable:!0,get:function(){return this.processor.bits},set:function(t){this.processor.bits=t}},normfreq:{enumerable:!0,get:function(){return this.processor.normfreq},set:function(t){this.processor.normfreq=t}}}),s.prototype.Cabinet=function(t){t||(t=this.getDefaults()),this.input=e.createGain(),this.activateNode=e.createGain(),this.convolver=this.newConvolver(t.impulsePath||"../impulses/impulse_guitar.wav"),this.makeupNode=e.createGain(),this.output=e.createGain(),this.activateNode.connect(this.convolver.input),this.convolver.output.connect(this.makeupNode),this.makeupNode.connect(this.output),this.makeupNode.gain.value=p(t.makeupGain,this.defaults.makeupGain.value),this.bypass=t.bypass||this.defaults.bypass.value},s.prototype.Cabinet.prototype=Object.create(i,{name:{value:"Cabinet"},defaults:{writable:!0,value:{makeupGain:{value:1,min:0,max:20,automatable:!0,type:a},bypass:{value:!1,automatable:!1,type:o}}},makeupGain:{enumerable:!0,get:function(){return this.makeupNode.gain},set:function(t){this.makeupNode.gain.setTargetAtTime(t,e.currentTime,.01)}},newConvolver:{value:function(t){return new n.Convolver({impulse:t,dryLevel:0,wetLevel:1})}}}),s.prototype.Chorus=function(t){t||(t=this.getDefaults()),this.input=e.createGain(),this.attenuator=this.activateNode=e.createGain(),this.splitter=e.createChannelSplitter(2),this.delayL=e.createDelay(),this.delayR=e.createDelay(),this.feedbackGainNodeLR=e.createGain(),this.feedbackGainNodeRL=e.createGain(),this.merger=e.createChannelMerger(2),this.output=e.createGain(),this.lfoL=new n.LFO({target:this.delayL.delayTime,callback:r}),this.lfoR=new n.LFO({target:this.delayR.delayTime,callback:r}),this.input.connect(this.attenuator),this.attenuator.connect(this.output),this.attenuator.connect(this.splitter),this.splitter.connect(this.delayL,0),this.splitter.connect(this.delayR,1),this.delayL.connect(this.feedbackGainNodeLR),this.delayR.connect(this.feedbackGainNodeRL),this.feedbackGainNodeLR.connect(this.delayR),this.feedbackGainNodeRL.connect(this.delayL),this.delayL.connect(this.merger,0,0),this.delayR.connect(this.merger,0,1),this.merger.connect(this.output),this.feedback=p(t.feedback,this.defaults.feedback.value),this.rate=p(t.rate,this.defaults.rate.value),this.delay=p(t.delay,this.defaults.delay.value),this.depth=p(t.depth,this.defaults.depth.value),this.lfoR.phase=Math.PI/2,this.attenuator.gain.value=.6934,this.lfoL.activate(!0),this.lfoR.activate(!0),this.bypass=t.bypass||this.defaults.bypass.value},s.prototype.Chorus.prototype=Object.create(i,{name:{value:"Chorus"},defaults:{writable:!0,value:{feedback:{value:.4,min:0,max:.95,automatable:!1,type:a},delay:{value:.0045,min:0,max:1,automatable:!1,type:a},depth:{value:.7,min:0,max:1,automatable:!1,type:a},rate:{value:1.5,min:0,max:8,automatable:!1,type:a},bypass:{value:!1,automatable:!1,type:o}}},delay:{enumerable:!0,get:function(){return this._delay},set:function(t){this._delay=2*Math.pow(10,t)*2e-4,this.lfoL.offset=this._delay,this.lfoR.offset=this._delay,this._depth=this._depth}},depth:{enumerable:!0,get:function(){return this._depth},set:function(t){this._depth=t,this.lfoL.oscillation=this._depth*this._delay,this.lfoR.oscillation=this._depth*this._delay}},feedback:{enumerable:!0,get:function(){return this._feedback},set:function(t){this._feedback=t,this.feedbackGainNodeLR.gain.setTargetAtTime(this._feedback,e.currentTime,.01),this.feedbackGainNodeRL.gain.setTargetAtTime(this._feedback,e.currentTime,.01)}},rate:{enumerable:!0,get:function(){return this._rate},set:function(t){this._rate=t,this.lfoL.frequency=this._rate,this.lfoR.frequency=this._rate}}}),s.prototype.Compressor=function(t){t||(t=this.getDefaults()),this.input=e.createGain(),this.compNode=this.activateNode=e.createDynamicsCompressor(),this.makeupNode=e.createGain(),this.output=e.createGain(),this.compNode.connect(this.makeupNode),this.makeupNode.connect(this.output),this.automakeup=p(t.automakeup,this.defaults.automakeup.value),this.automakeup?this.makeupNode.gain.value=c(this.computeMakeup()):this.makeupNode.gain.value=c(p(t.makeupGain,this.defaults.makeupGain.value)),this.threshold=p(t.threshold,this.defaults.threshold.value),this.release=p(t.release,this.defaults.release.value),this.attack=p(t.attack,this.defaults.attack.value),this.ratio=t.ratio||this.defaults.ratio.value,this.knee=p(t.knee,this.defaults.knee.value),this.bypass=t.bypass||this.defaults.bypass.value},s.prototype.Compressor.prototype=Object.create(i,{name:{value:"Compressor"},defaults:{writable:!0,value:{threshold:{value:-20,min:-60,max:0,automatable:!0,type:a},release:{value:250,min:10,max:2e3,automatable:!0,type:a},makeupGain:{value:1,min:1,max:100,automatable:!0,type:a},attack:{value:1,min:0,max:1e3,automatable:!0,type:a},ratio:{value:4,min:1,max:50,automatable:!0,type:a},knee:{value:5,min:0,max:40,automatable:!0,type:a},automakeup:{value:!1,automatable:!1,type:o},bypass:{value:!1,automatable:!1,type:o}}},computeMakeup:{value:function(){var t=this.compNode;return-(t.threshold.value-t.threshold.value/t.ratio.value)/4}},automakeup:{enumerable:!0,get:function(){return this._automakeup},set:function(t){this._automakeup=t,this._automakeup&&(this.makeupGain=this.computeMakeup())}},threshold:{enumerable:!0,get:function(){return this.compNode.threshold},set:function(t){this.compNode.threshold.value=t,this._automakeup&&(this.makeupGain=this.computeMakeup())}},ratio:{enumerable:!0,get:function(){return this.compNode.ratio},set:function(t){this.compNode.ratio.value=t,this._automakeup&&(this.makeupGain=this.computeMakeup())}},knee:{enumerable:!0,get:function(){return this.compNode.knee},set:function(t){this.compNode.knee.value=t,this._automakeup&&(this.makeupGain=this.computeMakeup())}},attack:{enumerable:!0,get:function(){return this.compNode.attack},set:function(t){this.compNode.attack.value=t/1e3}},release:{enumerable:!0,get:function(){return this.compNode.release},set:function(t){this.compNode.release.value=t/1e3}},makeupGain:{enumerable:!0,get:function(){return this.makeupNode.gain},set:function(t){this.makeupNode.gain.setTargetAtTime(c(t),e.currentTime,.01)}}}),s.prototype.Convolver=function(t){t||(t=this.getDefaults()),this.input=e.createGain(),this.activateNode=e.createGain(),this.convolver=e.createConvolver(),this.dry=e.createGain(),this.filterLow=e.createBiquadFilter(),this.filterHigh=e.createBiquadFilter(),this.wet=e.createGain(),this.output=e.createGain(),this.activateNode.connect(this.filterLow),this.activateNode.connect(this.dry),this.filterLow.connect(this.filterHigh),this.filterHigh.connect(this.convolver),this.convolver.connect(this.wet),this.wet.connect(this.output),this.dry.connect(this.output),this.dry.gain.value=p(t.dryLevel,this.defaults.dryLevel.value),this.wet.gain.value=p(t.wetLevel,this.defaults.wetLevel.value),this.filterHigh.frequency.value=t.highCut||this.defaults.highCut.value,this.filterLow.frequency.value=t.lowCut||this.defaults.lowCut.value,this.output.gain.value=p(t.level,this.defaults.level.value),this.filterHigh.type="lowpass",this.filterLow.type="highpass",this.buffer=t.impulse||"../impulses/ir_rev_short.wav",this.bypass=t.bypass||this.defaults.bypass.value},s.prototype.Convolver.prototype=Object.create(i,{name:{value:"Convolver"},defaults:{writable:!0,value:{highCut:{value:22050,min:20,max:22050,automatable:!0,type:a},lowCut:{value:20,min:20,max:22050,automatable:!0,type:a},dryLevel:{value:1,min:0,max:1,automatable:!0,type:a},wetLevel:{value:1,min:0,max:1,automatable:!0,type:a},level:{value:1,min:0,max:1,automatable:!0,type:a},bypass:{value:!1,automatable:!1,type:o}}},lowCut:{get:function(){return this.filterLow.frequency},set:function(t){this.filterLow.frequency.setTargetAtTime(t,e.currentTime,.01)}},highCut:{get:function(){return this.filterHigh.frequency},set:function(t){this.filterHigh.frequency.setTargetAtTime(t,e.currentTime,.01)}},level:{get:function(){return this.output.gain},set:function(t){this.output.gain.setTargetAtTime(t,e.currentTime,.01)}},dryLevel:{get:function(){return this.dry.gain},set:function(t){this.dry.gain.setTargetAtTime(t,e.currentTime,.01)}},wetLevel:{get:function(){return this.wet.gain},set:function(t){this.wet.gain.setTargetAtTime(t,e.currentTime,.01)}},buffer:{enumerable:!1,get:function(){return this.convolver.buffer},set:function(t){var n=this.convolver,r=new XMLHttpRequest;t?(r.open("GET",t,!0),r.responseType="arraybuffer",r.onreadystatechange=function(){4===r.readyState&&(r.status<300&&r.status>199||302===r.status)&&e.decodeAudioData(r.response,(function(t){n.buffer=t}),(function(t){t&&console.log("Tuna.Convolver.setBuffer: Error decoding data"+t)}))},r.send(null)):console.log("Tuna.Convolver.setBuffer: Missing impulse path!")}}}),s.prototype.Delay=function(t){t||(t=this.getDefaults()),this.input=e.createGain(),this.activateNode=e.createGain(),this.dry=e.createGain(),this.wet=e.createGain(),this.filter=e.createBiquadFilter(),this.delay=e.createDelay(10),this.feedbackNode=e.createGain(),this.output=e.createGain(),this.activateNode.connect(this.delay),this.activateNode.connect(this.dry),this.delay.connect(this.filter),this.filter.connect(this.feedbackNode),this.feedbackNode.connect(this.delay),this.feedbackNode.connect(this.wet),this.wet.connect(this.output),this.dry.connect(this.output),this.delayTime=t.delayTime||this.defaults.delayTime.value,this.feedbackNode.gain.value=p(t.feedback,this.defaults.feedback.value),this.wet.gain.value=p(t.wetLevel,this.defaults.wetLevel.value),this.dry.gain.value=p(t.dryLevel,this.defaults.dryLevel.value),this.filter.frequency.value=t.cutoff||this.defaults.cutoff.value,this.filter.type="lowpass",this.bypass=t.bypass||this.defaults.bypass.value},s.prototype.Delay.prototype=Object.create(i,{name:{value:"Delay"},defaults:{writable:!0,value:{delayTime:{value:100,min:20,max:1e3,automatable:!1,type:a},feedback:{value:.45,min:0,max:.9,automatable:!0,type:a},cutoff:{value:2e4,min:20,max:2e4,automatable:!0,type:a},wetLevel:{value:.5,min:0,max:1,automatable:!0,type:a},dryLevel:{value:1,min:0,max:1,automatable:!0,type:a},bypass:{value:!1,automatable:!1,type:o}}},delayTime:{enumerable:!0,get:function(){return this.delay.delayTime},set:function(t){this.delay.delayTime.value=t/1e3}},wetLevel:{enumerable:!0,get:function(){return this.wet.gain},set:function(t){this.wet.gain.setTargetAtTime(t,e.currentTime,.01)}},dryLevel:{enumerable:!0,get:function(){return this.dry.gain},set:function(t){this.dry.gain.setTargetAtTime(t,e.currentTime,.01)}},feedback:{enumerable:!0,get:function(){return this.feedbackNode.gain},set:function(t){this.feedbackNode.gain.setTargetAtTime(t,e.currentTime,.01)}},cutoff:{enumerable:!0,get:function(){return this.filter.frequency},set:function(t){this.filter.frequency.setTargetAtTime(t,e.currentTime,.01)}}}),s.prototype.Filter=function(t){t||(t=this.getDefaults()),this.input=e.createGain(),this.activateNode=e.createGain(),this.filter=e.createBiquadFilter(),this.output=e.createGain(),this.activateNode.connect(this.filter),this.filter.connect(this.output),this.filter.frequency.value=t.frequency||this.defaults.frequency.value,this.Q=t.resonance||this.defaults.Q.value,this.filterType=p(t.filterType,this.defaults.filterType.value),this.filter.gain.value=p(t.gain,this.defaults.gain.value),this.bypass=t.bypass||this.defaults.bypass.value},s.prototype.Filter.prototype=Object.create(i,{name:{value:"Filter"},defaults:{writable:!0,value:{frequency:{value:800,min:20,max:22050,automatable:!0,type:a},Q:{value:1,min:.001,max:100,automatable:!0,type:a},gain:{value:0,min:-40,max:40,automatable:!0,type:a},bypass:{value:!1,automatable:!1,type:o},filterType:{value:"lowpass",automatable:!1,type:"string"}}},filterType:{enumerable:!0,get:function(){return this.filter.type},set:function(t){this.filter.type=t}},Q:{enumerable:!0,get:function(){return this.filter.Q},set:function(t){this.filter.Q.value=t}},gain:{enumerable:!0,get:function(){return this.filter.gain},set:function(t){this.filter.gain.setTargetAtTime(t,e.currentTime,.01)}},frequency:{enumerable:!0,get:function(){return this.filter.frequency},set:function(t){this.filter.frequency.setTargetAtTime(t,e.currentTime,.01)}}}),s.prototype.Gain=function(t){t||(t=this.getDefaults()),this.input=e.createGain(),this.activateNode=e.createGain(),this.gainNode=e.createGain(),this.output=e.createGain(),this.activateNode.connect(this.gainNode),this.gainNode.connect(this.output),this.gainNode.gain.value=p(t.gain,this.defaults.gain.value),this.bypass=t.bypass||this.defaults.bypass.value},s.prototype.Gain.prototype=Object.create(i,{name:{value:"Gain"},defaults:{writable:!0,value:{bypass:{value:!1,automatable:!1,type:o},gain:{value:1,automatable:!0,type:a}}},gain:{enumerable:!0,get:function(){return this.gainNode.gain},set:function(t){this.gainNode.gain.setTargetAtTime(t,e.currentTime,.01)}}}),s.prototype.MoogFilter=function(t){var n,r,i,a,o,u,s,c,l,f,h,d,v,g,y;t||(t=this.getDefaults()),this.bufferSize=t.bufferSize||this.defaults.bufferSize.value,this.input=e.createGain(),this.activateNode=e.createGain(),this.processor=e.createScriptProcessor(this.bufferSize,1,1),this.output=e.createGain(),this.activateNode.connect(this.processor),this.processor.connect(this.output),n=r=i=a=o=u=s=c=0,this.processor.onaudioprocess=function(t){for(l=t.inputBuffer.getChannelData(0),f=t.outputBuffer.getChannelData(0),h=1.16*this.cutoff,y=h*h*.35013*(h*h),d=this.resonance*(1-.15*h*h),g=l.length,v=0;v<g;v++)l[v]-=c*d,l[v]*=y,o=l[v]+.3*n+(1-h)*o,n=l[v],u=o+.3*r+(1-h)*u,r=o,s=u+.3*i+(1-h)*s,i=u,c=s+.3*a+(1-h)*c,a=s,f[v]=c},this.cutoff=p(t.cutoff,this.defaults.cutoff.value),this.resonance=p(t.resonance,this.defaults.resonance.value),this.bypass=t.bypass||this.defaults.bypass.value},s.prototype.MoogFilter.prototype=Object.create(i,{name:{value:"MoogFilter"},defaults:{writable:!0,value:{bufferSize:{value:4096,min:256,max:16384,automatable:!1,type:u},bypass:{value:!1,automatable:!1,type:o},cutoff:{value:.065,min:1e-4,max:1,automatable:!1,type:a},resonance:{value:3.5,min:0,max:4,automatable:!1,type:a}}},cutoff:{enumerable:!0,get:function(){return this.processor.cutoff},set:function(t){this.processor.cutoff=t}},resonance:{enumerable:!0,get:function(){return this.processor.resonance},set:function(t){this.processor.resonance=t}}}),s.prototype.Overdrive=function(t){t||(t=this.getDefaults()),this.input=e.createGain(),this.activateNode=e.createGain(),this.inputDrive=e.createGain(),this.waveshaper=e.createWaveShaper(),this.outputDrive=e.createGain(),this.output=e.createGain(),this.activateNode.connect(this.inputDrive),this.inputDrive.connect(this.waveshaper),this.waveshaper.connect(this.outputDrive),this.outputDrive.connect(this.output),this.ws_table=new Float32Array(this.k_nSamples),this.drive=p(t.drive,this.defaults.drive.value),this.outputGain=p(t.outputGain,this.defaults.outputGain.value),this.curveAmount=p(t.curveAmount,this.defaults.curveAmount.value),this.algorithmIndex=p(t.algorithmIndex,this.defaults.algorithmIndex.value),this.bypass=t.bypass||this.defaults.bypass.value},s.prototype.Overdrive.prototype=Object.create(i,{name:{value:"Overdrive"},defaults:{writable:!0,value:{drive:{value:.197,min:0,max:1,automatable:!0,type:a,scaled:!0},outputGain:{value:-9.154,min:-46,max:0,automatable:!0,type:a,scaled:!0},curveAmount:{value:.979,min:0,max:1,automatable:!1,type:a},algorithmIndex:{value:0,min:0,max:5,automatable:!1,type:u},bypass:{value:!1,automatable:!1,type:o}}},k_nSamples:{value:8192},drive:{get:function(){return this.inputDrive.gain},set:function(t){this.inputDrive.gain.value=t}},curveAmount:{get:function(){return this._curveAmount},set:function(t){this._curveAmount=t,void 0===this._algorithmIndex&&(this._algorithmIndex=0),this.waveshaperAlgorithms[this._algorithmIndex](this._curveAmount,this.k_nSamples,this.ws_table),this.waveshaper.curve=this.ws_table}},outputGain:{get:function(){return this.outputDrive.gain},set:function(t){this._outputGain=c(t),this.outputDrive.gain.setValueAtTime(this._outputGain,e.currentTime,.01)}},algorithmIndex:{get:function(){return this._algorithmIndex},set:function(t){this._algorithmIndex=t,this.curveAmount=this._curveAmount}},waveshaperAlgorithms:{value:[function(t,e,n){var r,i,a=2*(t=Math.min(t,.9999))/(1-t);for(r=0;r<e;r++)i=2*r/e-1,n[r]=(1+a)*i/(1+a*Math.abs(i))},function(t,e,n){var r,i,a;for(r=0;r<e;r++)i=2*r/e-1,a=(.5*Math.pow(i+1.4,2)-1)*(a>=0?5.8:1.2),n[r]=h(a)},function(t,e,n){var r,i,a,o=1-t;for(r=0;r<e;r++)a=(i=2*r/e-1)<0?-Math.pow(Math.abs(i),o+.04):Math.pow(i,o),n[r]=h(2*a)},function(t,e,n){var r,i,a,o,u=1-t>.99?.99:1-t;for(r=0;r<e;r++)i=2*r/e-1,(o=Math.abs(i))<u?a=o:o>u?a=u+(o-u)/(1+Math.pow((o-u)/(1-u),2)):o>1&&(a=o),n[r]=f(i)*a*(1/((u+1)/2))},function(t,e,n){var r,i;for(r=0;r<e;r++)i=2*r/e-1,n[r]=i<-.08905?-3/4*(1-Math.pow(1-(Math.abs(i)-.032857),12)+1/3*(Math.abs(i)-.032847))+.01:i>=-.08905&&i<.320018?i*i*-6.153+3.9375*i:.630035},function(t,e,n){var r,i,a=2+Math.round(14*t),o=Math.round(Math.pow(2,a-1));for(r=0;r<e;r++)i=2*r/e-1,n[r]=Math.round(i*o)/o}]}}),s.prototype.Panner=function(t){t||(t=this.getDefaults()),this.input=e.createGain(),this.activateNode=e.createGain(),this.panner=e.createStereoPanner(),this.output=e.createGain(),this.activateNode.connect(this.panner),this.panner.connect(this.output),this.pan=p(t.pan,this.defaults.pan.value),this.bypass=t.bypass||this.defaults.bypass.value},s.prototype.Panner.prototype=Object.create(i,{name:{value:"Panner"},defaults:{writable:!0,value:{bypass:{value:!1,automatable:!1,type:o},pan:{value:0,min:-1,max:1,automatable:!0,type:a}}},pan:{enumerable:!0,get:function(){return this.panner.pan},set:function(t){this.panner.pan.value=t}}}),s.prototype.Phaser=function(t){t||(t=this.getDefaults()),this.input=e.createGain(),this.splitter=this.activateNode=e.createChannelSplitter(2),this.filtersL=[],this.filtersR=[],this.feedbackGainNodeL=e.createGain(),this.feedbackGainNodeR=e.createGain(),this.merger=e.createChannelMerger(2),this.filteredSignal=e.createGain(),this.output=e.createGain(),this.lfoL=new n.LFO({target:this.filtersL,callback:this.callback}),this.lfoR=new n.LFO({target:this.filtersR,callback:this.callback});for(var r=this.stage;r--;)this.filtersL[r]=e.createBiquadFilter(),this.filtersR[r]=e.createBiquadFilter(),this.filtersL[r].type="allpass",this.filtersR[r].type="allpass";this.input.connect(this.splitter),this.input.connect(this.output),this.splitter.connect(this.filtersL[0],0,0),this.splitter.connect(this.filtersR[0],1,0),this.connectInOrder(this.filtersL),this.connectInOrder(this.filtersR),this.filtersL[this.stage-1].connect(this.feedbackGainNodeL),this.filtersL[this.stage-1].connect(this.merger,0,0),this.filtersR[this.stage-1].connect(this.feedbackGainNodeR),this.filtersR[this.stage-1].connect(this.merger,0,1),this.feedbackGainNodeL.connect(this.filtersL[0]),this.feedbackGainNodeR.connect(this.filtersR[0]),this.merger.connect(this.output),this.rate=p(t.rate,this.defaults.rate.value),this.baseModulationFrequency=t.baseModulationFrequency||this.defaults.baseModulationFrequency.value,this.depth=p(t.depth,this.defaults.depth.value),this.feedback=p(t.feedback,this.defaults.feedback.value),this.stereoPhase=p(t.stereoPhase,this.defaults.stereoPhase.value),this.lfoL.activate(!0),this.lfoR.activate(!0),this.bypass=t.bypass||this.defaults.bypass.value},s.prototype.Phaser.prototype=Object.create(i,{name:{value:"Phaser"},stage:{value:4},defaults:{writable:!0,value:{rate:{value:.1,min:0,max:8,automatable:!1,type:a},depth:{value:.6,min:0,max:1,automatable:!1,type:a},feedback:{value:.7,min:0,max:1,automatable:!1,type:a},stereoPhase:{value:40,min:0,max:180,automatable:!1,type:a},baseModulationFrequency:{value:700,min:500,max:1500,automatable:!1,type:a},bypass:{value:!1,automatable:!1,type:o}}},callback:{value:function(t,e){for(var n=0;n<4;n++)t[n].frequency.value=e}},depth:{get:function(){return this._depth},set:function(t){this._depth=t,this.lfoL.oscillation=this._baseModulationFrequency*this._depth,this.lfoR.oscillation=this._baseModulationFrequency*this._depth}},rate:{get:function(){return this._rate},set:function(t){this._rate=t,this.lfoL.frequency=this._rate,this.lfoR.frequency=this._rate}},baseModulationFrequency:{enumerable:!0,get:function(){return this._baseModulationFrequency},set:function(t){this._baseModulationFrequency=t,this.lfoL.offset=this._baseModulationFrequency,this.lfoR.offset=this._baseModulationFrequency,this.depth=this._depth}},feedback:{get:function(){return this._feedback},set:function(t){this._feedback=t,this.feedbackGainNodeL.gain.setTargetAtTime(this._feedback,e.currentTime,.01),this.feedbackGainNodeR.gain.setTargetAtTime(this._feedback,e.currentTime,.01)}},stereoPhase:{get:function(){return this._stereoPhase},set:function(t){this._stereoPhase=t;var e=this.lfoL._phase+this._stereoPhase*Math.PI/180;e=l(e,2*Math.PI),this.lfoR._phase=e}}}),s.prototype.PingPongDelay=function(t){t||(t=this.getDefaults()),this.input=e.createGain(),this.wet=e.createGain(),this.stereoToMonoMix=e.createGain(),this.feedbackLevel=e.createGain(),this.output=e.createGain(),this.delayLeft=e.createDelay(10),this.delayRight=e.createDelay(10),this.activateNode=e.createGain(),this.splitter=e.createChannelSplitter(2),this.merger=e.createChannelMerger(2),this.activateNode.connect(this.splitter),this.splitter.connect(this.stereoToMonoMix,0,0),this.splitter.connect(this.stereoToMonoMix,1,0),this.stereoToMonoMix.gain.value=.5,this.stereoToMonoMix.connect(this.wet),this.wet.connect(this.delayLeft),this.feedbackLevel.connect(this.wet),this.delayLeft.connect(this.delayRight),this.delayRight.connect(this.feedbackLevel),this.delayLeft.connect(this.merger,0,0),this.delayRight.connect(this.merger,0,1),this.merger.connect(this.output),this.activateNode.connect(this.output),this.delayTimeLeft=void 0!==t.delayTimeLeft?t.delayTimeLeft:this.defaults.delayTimeLeft.value,this.delayTimeRight=void 0!==t.delayTimeRight?t.delayTimeRight:this.defaults.delayTimeRight.value,this.feedbackLevel.gain.value=void 0!==t.feedback?t.feedback:this.defaults.feedback.value,this.wet.gain.value=void 0!==t.wetLevel?t.wetLevel:this.defaults.wetLevel.value,this.bypass=t.bypass||this.defaults.bypass.value},s.prototype.PingPongDelay.prototype=Object.create(i,{name:{value:"PingPongDelay"},delayTimeLeft:{enumerable:!0,get:function(){return this._delayTimeLeft},set:function(t){this._delayTimeLeft=t,this.delayLeft.delayTime.value=t/1e3}},delayTimeRight:{enumerable:!0,get:function(){return this._delayTimeRight},set:function(t){this._delayTimeRight=t,this.delayRight.delayTime.value=t/1e3}},wetLevel:{enumerable:!0,get:function(){return this.wet.gain},set:function(t){this.wet.gain.setTargetAtTime(t,e.currentTime,.01)}},feedback:{enumerable:!0,get:function(){return this.feedbackLevel.gain},set:function(t){this.feedbackLevel.gain.setTargetAtTime(t,e.currentTime,.01)}},defaults:{writable:!0,value:{delayTimeLeft:{value:200,min:1,max:1e4,automatable:!1,type:u},delayTimeRight:{value:400,min:1,max:1e4,automatable:!1,type:u},feedback:{value:.3,min:0,max:1,automatable:!0,type:a},wetLevel:{value:.5,min:0,max:1,automatable:!0,type:a},bypass:{value:!1,automatable:!1,type:o}}}}),s.prototype.Tremolo=function(t){t||(t=this.getDefaults()),this.input=e.createGain(),this.splitter=this.activateNode=e.createChannelSplitter(2),this.amplitudeL=e.createGain(),this.amplitudeR=e.createGain(),this.merger=e.createChannelMerger(2),this.output=e.createGain(),this.lfoL=new n.LFO({target:this.amplitudeL.gain,callback:r}),this.lfoR=new n.LFO({target:this.amplitudeR.gain,callback:r}),this.input.connect(this.splitter),this.splitter.connect(this.amplitudeL,0),this.splitter.connect(this.amplitudeR,1),this.amplitudeL.connect(this.merger,0,0),this.amplitudeR.connect(this.merger,0,1),this.merger.connect(this.output),this.rate=t.rate||this.defaults.rate.value,this.intensity=p(t.intensity,this.defaults.intensity.value),this.stereoPhase=p(t.stereoPhase,this.defaults.stereoPhase.value),this.lfoL.offset=1-this.intensity/2,this.lfoR.offset=1-this.intensity/2,this.lfoL.phase=this.stereoPhase*Math.PI/180,this.lfoL.activate(!0),this.lfoR.activate(!0),this.bypass=t.bypass||this.defaults.bypass.value},s.prototype.Tremolo.prototype=Object.create(i,{name:{value:"Tremolo"},defaults:{writable:!0,value:{intensity:{value:.3,min:0,max:1,automatable:!1,type:a},stereoPhase:{value:0,min:0,max:180,automatable:!1,type:a},rate:{value:5,min:.1,max:11,automatable:!1,type:a},bypass:{value:!1,automatable:!1,type:o}}},intensity:{enumerable:!0,get:function(){return this._intensity},set:function(t){this._intensity=t,this.lfoL.offset=1-this._intensity/2,this.lfoR.offset=1-this._intensity/2,this.lfoL.oscillation=this._intensity,this.lfoR.oscillation=this._intensity}},rate:{enumerable:!0,get:function(){return this._rate},set:function(t){this._rate=t,this.lfoL.frequency=this._rate,this.lfoR.frequency=this._rate}},stereoPhase:{enumerable:!0,get:function(){return this._stereoPhase},set:function(t){this._stereoPhase=t;var e=this.lfoL._phase+this._stereoPhase*Math.PI/180;e=l(e,2*Math.PI),this.lfoR.phase=e}}}),s.prototype.WahWah=function(t){t||(t=this.getDefaults()),this.input=e.createGain(),this.activateNode=e.createGain(),this.envelopeFollower=new n.EnvelopeFollower({target:this,callback:function(t,e){t.sweep=e}}),this.filterBp=e.createBiquadFilter(),this.filterPeaking=e.createBiquadFilter(),this.output=e.createGain(),this.activateNode.connect(this.filterBp),this.filterBp.connect(this.filterPeaking),this.filterPeaking.connect(this.output),this.init(),this.automode=p(t.automode,this.defaults.automode.value),this.resonance=t.resonance||this.defaults.resonance.value,this.sensitivity=p(t.sensitivity,this.defaults.sensitivity.value),this.baseFrequency=p(t.baseFrequency,this.defaults.baseFrequency.value),this.excursionOctaves=t.excursionOctaves||this.defaults.excursionOctaves.value,this.sweep=p(t.sweep,this.defaults.sweep.value),this.activateNode.gain.value=2,this.envelopeFollower.activate(!0),this.bypass=t.bypass||this.defaults.bypass.value},s.prototype.WahWah.prototype=Object.create(i,{name:{value:"WahWah"},defaults:{writable:!0,value:{automode:{value:!0,automatable:!1,type:o},baseFrequency:{value:.153,min:0,max:1,automatable:!1,type:a},excursionOctaves:{value:3.3,min:1,max:6,automatable:!1,type:a},sweep:{value:.35,min:0,max:1,automatable:!1,type:a},resonance:{value:19,min:1,max:100,automatable:!1,type:a},sensitivity:{value:-.5,min:-1,max:1,automatable:!1,type:a},bypass:{value:!1,automatable:!1,type:o}}},automode:{get:function(){return this._automode},set:function(t){this._automode=t,t?(this.activateNode.connect(this.envelopeFollower.input),this.envelopeFollower.activate(!0)):(this.envelopeFollower.activate(!1),this.activateNode.disconnect(),this.activateNode.connect(this.filterBp))}},filterFreqTimeout:{writable:!0,value:0},setFilterFreq:{value:function(){try{this.filterBp.frequency.value=Math.min(22050,this._baseFrequency+this._excursionFrequency*this._sweep),this.filterPeaking.frequency.value=Math.min(22050,this._baseFrequency+this._excursionFrequency*this._sweep)}catch(t){clearTimeout(this.filterFreqTimeout),this.filterFreqTimeout=setTimeout(function(){this.setFilterFreq()}.bind(this),0)}}},sweep:{enumerable:!0,get:function(){return this._sweep},set:function(t){this._sweep=Math.pow(t>1?1:t<0?0:t,this._sensitivity),this.setFilterFreq()}},baseFrequency:{enumerable:!0,get:function(){return this._baseFrequency},set:function(t){this._baseFrequency=50*Math.pow(10,2*t),this._excursionFrequency=Math.min(e.sampleRate/2,this.baseFrequency*Math.pow(2,this._excursionOctaves)),this.setFilterFreq()}},excursionOctaves:{enumerable:!0,get:function(){return this._excursionOctaves},set:function(t){this._excursionOctaves=t,this._excursionFrequency=Math.min(e.sampleRate/2,this.baseFrequency*Math.pow(2,this._excursionOctaves)),this.setFilterFreq()}},sensitivity:{enumerable:!0,get:function(){return this._sensitivity},set:function(t){this._sensitivity=Math.pow(10,t)}},resonance:{enumerable:!0,get:function(){return this._resonance},set:function(t){this._resonance=t,this.filterPeaking.Q.value=this._resonance}},init:{value:function(){this.output.gain.value=1,this.filterPeaking.type="peaking",this.filterBp.type="bandpass",this.filterPeaking.frequency.value=100,this.filterPeaking.gain.value=20,this.filterPeaking.Q.value=5,this.filterBp.frequency.value=100,this.filterBp.Q.value=1}}}),s.prototype.EnvelopeFollower=function(t){t||(t=this.getDefaults()),this.input=e.createGain(),this.jsNode=this.output=e.createScriptProcessor(this.buffersize,1,1),this.input.connect(this.output),this.attackTime=p(t.attackTime,this.defaults.attackTime.value),this.releaseTime=p(t.releaseTime,this.defaults.releaseTime.value),this._envelope=0,this.target=t.target||{},this.callback=t.callback||function(){},this.bypass=t.bypass||this.defaults.bypass.value},s.prototype.EnvelopeFollower.prototype=Object.create(i,{name:{value:"EnvelopeFollower"},defaults:{value:{attackTime:{value:.003,min:0,max:.5,automatable:!1,type:a},releaseTime:{value:.5,min:0,max:.5,automatable:!1,type:a},bypass:{value:!1,automatable:!1,type:o}}},buffersize:{value:256},envelope:{value:0},sampleRate:{value:44100},attackTime:{enumerable:!0,get:function(){return this._attackTime},set:function(t){this._attackTime=t,this._attackC=Math.exp(-1/this._attackTime*this.sampleRate/this.buffersize)}},releaseTime:{enumerable:!0,get:function(){return this._releaseTime},set:function(t){this._releaseTime=t,this._releaseC=Math.exp(-1/this._releaseTime*this.sampleRate/this.buffersize)}},callback:{get:function(){return this._callback},set:function(t){"function"==typeof t?this._callback=t:console.error("tuna.js: "+this.name+": Callback must be a function!")}},target:{get:function(){return this._target},set:function(t){this._target=t}},activate:{value:function(t){this.activated=t,t?(this.jsNode.connect(e.destination),this.jsNode.onaudioprocess=this.returnCompute(this)):(this.jsNode.disconnect(),this.jsNode.onaudioprocess=null),this.activateCallback&&this.activateCallback(t)}},returnCompute:{value:function(t){return function(e){t.compute(e)}}},compute:{value:function(t){var e,n,r,i,a=t.inputBuffer.getChannelData(0).length,o=t.inputBuffer.numberOfChannels;for(n=r=i=0,n=0;n<o;++n)for(i=0;i<a;++i)r+=(e=t.inputBuffer.getChannelData(n)[i])*e;r=Math.sqrt(r/o),this._envelope<r?(this._envelope*=this._attackC,this._envelope+=(1-this._attackC)*r):(this._envelope*=this._releaseC,this._envelope+=(1-this._releaseC)*r),this._callback(this._target,this._envelope)}}}),s.prototype.LFO=function(t){t||(t=this.getDefaults()),this.input=e.createGain(),this.output=e.createScriptProcessor(256,1,1),this.activateNode=e.destination,this.frequency=p(t.frequency,this.defaults.frequency.value),this.offset=p(t.offset,this.defaults.offset.value),this.oscillation=p(t.oscillation,this.defaults.oscillation.value),this.phase=p(t.phase,this.defaults.phase.value),this.target=t.target||{},this.output.onaudioprocess=this.callback(t.callback||function(){}),this.bypass=t.bypass||this.defaults.bypass.value},s.prototype.LFO.prototype=Object.create(i,{name:{value:"LFO"},bufferSize:{value:256},sampleRate:{value:44100},defaults:{value:{frequency:{value:1,min:0,max:20,automatable:!1,type:a},offset:{value:.85,min:0,max:22049,automatable:!1,type:a},oscillation:{value:.3,min:-22050,max:22050,automatable:!1,type:a},phase:{value:0,min:0,max:2*Math.PI,automatable:!1,type:a},bypass:{value:!1,automatable:!1,type:o}}},frequency:{get:function(){return this._frequency},set:function(t){this._frequency=t,this._phaseInc=2*Math.PI*this._frequency*this.bufferSize/this.sampleRate}},offset:{get:function(){return this._offset},set:function(t){this._offset=t}},oscillation:{get:function(){return this._oscillation},set:function(t){this._oscillation=t}},phase:{get:function(){return this._phase},set:function(t){this._phase=t}},target:{get:function(){return this._target},set:function(t){this._target=t}},activate:{value:function(t){t?(this.output.connect(e.destination),this.activateCallback&&this.activateCallback(t)):this.output.disconnect()}},callback:{value:function(t){var e=this;return function(){e._phase+=e._phaseInc,e._phase>2*Math.PI&&(e._phase=0),t(e._target,e._offset+e._oscillation*Math.sin(e._phase))}}}}),s.toString=s.prototype.toString=function(){return"Please visit https://github.com/Theodeus/tuna/wiki for instructions on how to use Tuna.js"}}()},function(t,e,n){"use strict";n.d(e,"d",(function(){return s})),n.d(e,"a",(function(){return a})),n.d(e,"c",(function(){return o})),n.d(e,"b",(function(){return u}));var r=n(0),i=n(2);let a=function(t,e,n,r){e=e||0,navigator.requestMIDIAccess().then((function(){u[e]?(u[e].onmidimessage=t,"function"==typeof n&&n()):"function"==typeof r&&r()}))},o={play:function(){Object(r.logMessage)("playing midi")},stop:function(){Object(r.logMessage)("stopping midi")}},u=[],s=function(t){Object(r.logMessage)(t.receivedTime,t.data,2),144===t.data[0]?0===t.data[2]?(Object(r.logMessage)("Playing note: ",2),Object(r.logMessage)(i.b[t.data[1]-12],2),o.stop(i.b[t.data[1]-12])):t.data[2]>0&&(Object(r.logMessage)("Stopping note: ",2),Object(r.logMessage)(i.b[t.data[1]-12],2),o.play({pitch:i.b[t.data[1]-12],label:i.b[t.data[1]-12]})):176===t.data[0]?(Object(r.logMessage)("controller"),46==t.data[1]&&(127==t.data[2]?o.pedalMod=!0:0==t.data[2]&&(o.pedalMod=!1))):224===t.data[0]&&Object(r.logMessage)("pitch bend")};!async function(){if(navigator&&navigator.requestMIDIAccess)try{!function(t){u=[];for(var e=t.inputs.values(),n=e.next();!n.done;n=e.next())u.push(n.value);Object(r.logMessage)("MIDI inputs: "),Object(r.logMessage)(u);for(var i=0;i<u.length;i++)u[i].onmidimessage=s}(await navigator.requestMIDIAccess())}catch(t){!function(t){Object(r.logMessage)("Failed to get MIDI access",t)}()}}()},function(t,e,n){"use strict";var r=n(0),i=n(2);let a=new Uint8Array(2048),o=function(t){let e,n=t.inputBuffer.getChannelData(0),r=n.length,i=0;for(let t=0;t<r;t++)e=n[t],Math.abs(e)>=this.clipLevel&&(this.clipping=!0,this.lastClip=window.performance.now()),i+=e*e;let a=Math.sqrt(i/r);this.volume=Math.max(a,this.volume*this.averaging)};class u{constructor(t){t||(t={}),this.isSetUp=!1,this.playable=1,t.reverb?this.reverb=Object(r.constructReverb)(this,t):this.setUp(t)}setUp(t){this.wads=[],this.input=r.context.createAnalyser(),this.input.fftSize=2048,this.nodes=[this.input],this.destination=t.destination||r.context.destination,this.volume=t.volume||1,this.gain=r.context.createGain(),this.gain.gain.value=this.volume,this.output=r.context.createAnalyser(),this.tuna=t.tuna||null,this.audioMeter=null,this.recorder=null,t.audioMeter&&(this.audioMeter=function(t,e,n,r){let i=t.createScriptProcessor(512);return i.onaudioprocess=o,i.clipping=!1,i.lastClip=0,i.volume=0,i.clipLevel=e||.98,i.averaging=n||.95,i.clipLag=r||750,i.connect(t.destination),i.checkClipping=function(){return!!this.clipping&&(this.lastClip+this.clipLag<window.performance.now()&&(this.clipping=!1),this.clipping)},i.shutdown=function(){this.disconnect(),this.onaudioprocess=null},i}(r.context,t.audioMeter.clipLevel,t.audioMeter.averaging,t.audioMeter.clipLag),this.output.connect(this.audioMeter)),Object(r.constructFilter)(this,t),this.filter&&Object(r.createFilters)(this,t),this.reverb&&Object(r.setUpReverbOnPlay)(this,t),this.constructExternalFx(t,r.context),this.panning=Object(r.constructPanning)(t),Object(r.setUpPanningOnPlay)(this,t),t.compressor&&Object(r.constructCompressor)(this,t),t.recorder&&function(t,e){t.recorder={},t.recorder.mediaStreamDestination=r.context.createMediaStreamDestination(),t.output.connect(t.recorder.mediaStreamDestination),t.recorder.mediaRecorder=new MediaRecorder(t.recorder.mediaStreamDestination.stream,e.recorder.options||{mimeType:"audio/webm"}),t.recorder.chunks=[],t.recorder.mediaRecorder.ondataavailable=function(e){t.recorder.chunks.push(e.data)},t.recorder.mediaRecorder.onstop=e.recorder.onstop||function(t){let e=new Blob(this.recorder.chunks,{type:"audio/webm;codecs=opus"});window.open(URL.createObjectURL(e))},t.recorder.mediaRecorder.onstop=t.recorder.mediaRecorder.onstop.bind(t);for(let e of["start","stop","pause","resume","requestData"])t.recorder[e]=t.recorder.mediaRecorder[e].bind(t.recorder.mediaRecorder)}(this,t),Object(r.constructDelay)(this,t),Object(r.setUpDelayOnPlay)(this,t),Object(r.setUpTunaOnPlay)(this,t),this.nodes.push(this.gain),this.nodes.push(this.output),Object(r.plugEmIn)(this,t),this.isSetUp=!0,t.callback&&t.callback(this)}updatePitch(){this.input.getByteTimeDomainData(a);let t=function(t,e){let n=-1,r=0,i=0,a=!1;if(t.length<1996)return-1;for(let e=0;e<1e3;e++){let n=(t[e]-128)/128;i+=n*n}if(i=Math.sqrt(i/1e3),i<.01)return-1;let o=1;for(let i=4;i<=1e3;i++){let u=0;for(let e=0;e<1e3;e++)u+=Math.abs((t[e]-128)/128-(t[e+i]-128)/128);if(u=1-u/1e3,u>.9&&u>o)a=!0;else if(a)return e/n;o=u,u>r&&(r=u,n=i)}return r>.01?e/n:-1}(a,r.context.sampleRate);if(-1!==t&&11025!==t&&12e3!==t){let e=t;this.pitch=Math.floor(e);let n=function(t){let e=Math.log(t/440)/Math.log(2)*12;return Math.round(e)+69}(e);this.noteName=i.b[n-12]}let e=this;e.rafID=window.requestAnimationFrame((function(){e.updatePitch()}))}stopUpdatingPitch(){cancelAnimationFrame(this.rafID)}setVolume(t){return this.isSetUp?this.gain.gain.value=t:Object(r.logMessage)("This PolyWad is not set up yet."),this}setPitch(t){this.wads.forEach((function(e){return t in i.a?(e.soundSource&&(e.soundSource.frequency.value=i.a[t]),e.pitch=i.a[t]):(e.soundSource&&(e.soundSource.frequency.value=t),e.pitch=t),this}))}setPanning(t,e){Wad.prototype.setPanning.call(this,t,e)}play(t){if(this.isSetUp)if(this.playable<1)this.playOnLoad=!0,this.playOnLoadArg=t;else{t&&t.volume&&(this.gain.gain.value=t.volume,t.volume=void 0);for(var e=0;e<this.wads.length;e++)this.wads[e].play(t)}else Object(r.logMessage)("This PolyWad is not set up yet.");return this}stop(t){if(this.isSetUp)for(let e=0;e<this.wads.length;e++)this.wads[e].stop(t)}add(t){return this.isSetUp?(t.destination=this.input,this.wads.push(t),t instanceof u&&(t.output.disconnect(0),t.output.connect(this.input))):Object(r.logMessage)("This PolyWad is not set up yet."),this}remove(t){if(this.isSetUp)for(let e=0;e<this.wads.length;e++)this.wads[e]===t&&(this.wads[e].destination=r.context.destination,this.wads.splice(e,1),t instanceof u&&(t.output.disconnect(0),t.output.connect(r.context.destination)));return this}constructExternalFx(t,e){}}e.a=u},function(t,e,n){"use strict";function r(t,e){if(n=t,!(null!=(r=e)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r))throw new TypeError("Cannot call a class as a function");var n,r}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var a,o,u,s=function(){function t(e,n){r(this,t),this.Wad=n,e=Object.assign({},t.defaultArgs,e),this.files=e.files,this.sounds=this.files.map((function(t){return t.play?t:new n({source:t})})),this.randomSounds=this.sounds.slice(),this.random=e.random,this.randomPlaysBeforeRepeat=this.sounds.length>3&&e.randomPlaysBeforeRepeat<this.sounds.length-1?e.randomPlaysBeforeRepeat:0,this.index=0,this.waitingSounds=[]}var e,n,a;return e=t,(n=[{key:"play",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.sounds.length)return 0;if(this.random){var n=Math.floor(Math.random()*this.randomSounds.length),r=this.randomSounds[n];return this.index=this.sounds.indexOf(r),this.waitingSounds=this.waitingSounds.filter((function(e){return e.plays-=1,!(e.plays<1)||(t.randomSounds.push(e.sound),null)})),this.randomPlaysBeforeRepeat&&(this.randomSounds.splice(n,1),this.waitingSounds.push({plays:this.randomPlaysBeforeRepeat,sound:r})),r.play(e)}var i=this.sounds[this.index]?this.sounds[this.index].play(e):void 0;return this.index+=1,this.index>=this.sounds.length&&(this.index=0),i}},{key:"add",value:function(t){return t.play||(t=new this.Wad({source:t})),this.sounds.push(t),this.randomSounds.push(t),this}},{key:"remove",value:function(t){var e=this.sounds.indexOf(t);if(-1===e)throw new Error("That sound does not exist: ".concat(t));this.sounds.splice(e,1);var n=this.randomSounds.indexOf(t);return-1===n?this.waitingSounds=this.waitingSounds.filter((function(e){return e.sound!==t})):this.randomSounds.splice(n,1),this}}])&&i(e.prototype,n),a&&i(e,a),t}();u={files:[],random:!1,randomPlaysBeforeRepeat:0},(o="defaultArgs")in(a=s)?Object.defineProperty(a,o,{value:u,enumerable:!0,configurable:!0,writable:!0}):a[o]=u,e.a=s},function(t,e,n){"use strict";e.a={hiHatClosed:{source:"noise",env:{attack:.001,decay:.008,sustain:.2,hold:.03,release:.01},filter:{type:"highpass",frequency:400,q:1}},snare:{source:"noise",env:{attack:.001,decay:.01,sustain:.2,hold:.03,release:.02},filter:{type:"bandpass",frequency:300,q:.18}},hiHatOpen:{source:"noise",env:{attack:.001,decay:.008,sustain:.2,hold:.43,release:.01},filter:{type:"highpass",frequency:100,q:.2}},ghost:{source:"square",volume:.3,env:{attack:.01,decay:.002,sustain:.5,hold:2.5,release:.3},filter:{type:"lowpass",frequency:600,q:7,env:{attack:.7,frequency:1600}},vibrato:{attack:8,speed:8,magnitude:100}},piano:{source:"square",volume:1.4,env:{attack:.01,decay:.005,sustain:.2,hold:.015,release:.3},filter:{type:"lowpass",frequency:1200,q:8.5,env:{attack:.2,frequency:600}}}}},function(t,e,n){"use strict";var r=n(3),i=n.n(r);class a{constructor(t,e){this._setFunc=e,this.AudioParamautomationRate="a-rate",this.defaultValue=t,this.maxValue=34028234663852886e22,this.minValue=-34028234663852886e22,this._value=this.defaultValue}get value(){return this._value}set value(t){this._setFunc(t),this._value=t}}var o=n(0),u=n(1),s=n.n(u);class c{static stopAll(t){for(var e=0;e<c.allWads.length;e++)c.allWads[e].stop(t)}static setVolume(t){for(var e=0;e<c.allWads.length;e++)c.allWads[e].setVolume(t)}constructor(t){if(this.source=t.source,this.useCache=s.a.get(t,"useCache",!0),this.destination=t.destination||o.context.destination,this.volume=s.a.get(t,"volume",1),this.defaultVolume=this.volume,this.playable=1,this.pitch=c.pitches[t.pitch]||t.pitch||440,this.gain=[],this.detune=t.detune||0,this.offset=t.offset||0,this.loop=t.loop||!1,this.tuna=t.tuna||null,this.rate=t.rate||1,this.sprite=t.sprite||null,this.env=Object(o.constructEnv)(t),this.defaultEnv=Object(o.constructEnv)(t),this.userSetHold=!(!t.env||!t.env.hold),this.filter=Object(o.constructFilter)(t),this.vibrato=Object(o.constructVibrato)(t),this.tremolo=Object(o.constructTremolo)(t),this.panning=Object(o.constructPanning)(t),this.delay=Object(o.constructDelay)(t),this.reverb=Object(o.constructReverb)(this,t),this.duration=(this.env.attack+this.env.decay+this.env.hold+this.env.release)*(1/this.rate)*1e3,this.constructExternalFx(t,o.context),"noise"===this.source)this.decodedBuffer=o.noiseBuffer;else if("mic"===this.source)Object(o.getConsent)(this,t);else if(this.source in{sine:0,sawtooth:0,square:0,triangle:0})t.callback&&t.callback(this);else if(Object(o.requestAudioFile)(this,t.callback),this.sprite){var e=this;for(var n in this.sprite)this[n]={sprite:this.sprite[n],play:function(t){return(t=t||{}).env=t.env||{},t.env.hold=this.sprite[1]-this.sprite[0],t.offset=this.sprite[0],e.play(t)}}}c.allWads.push(this)}play(t){if(t=t||{arg:null},this.playable<1)this.playOnLoad=!0,this.playOnLoadArg=t;else if("mic"===this.source)o.permissionsGranted.micConsent?(null===t.arg||(this.filter=Object(o.constructFilter)(t),this.vibrato=Object(o.constructVibrato)(t),this.tremolo=Object(o.constructTremolo)(t),this.reverb=Object(o.constructReverb)(t),this.panning=Object(o.constructPanning)(t),this.delay=Object(o.constructDelay)(t),this.constructExternalFx(t,o.context),Object(o.setUpMic)(this,t)),Object(o.plugEmIn)(this,t)):(Object(o.logMessage)("You have not given your browser permission to use your microphone."),Object(o.getConsent)(this,t).then(()=>{this.play(t)}));else{this.nodes=[],t.wait||(t.wait=0),t.volume?this.volume=t.volume:this.volume=this.defaultVolume,t.offset=t.offset||this.offset||0,this.source in{sine:0,sawtooth:0,square:0,triangle:0}?Object(o.setUpOscillator)(this,t):(this.soundSource=o.context.createBufferSource(),this.soundSource.buffer=this.decodedBuffer,("noise"===this.source||this.loop||t.loop)&&(this.soundSource.loop=!0)),this.soundSource.detune&&(this.soundSource.detune.value=t.detune||this.detune),void 0===t.wait&&(t.wait=0),void 0===t.exactTime&&(t.exactTime=o.context.currentTime+t.wait),this.lastPlayedTime=t.exactTime-t.offset,this.nodes.push(this.soundSource),Object(o.setUpEnvOnPlay)(this,t),this.soundSource.playbackRate&&(this.soundSource.playbackRate.value=t.rate||this.rate,this.env.hold=this.env.hold*(1/this.soundSource.playbackRate.value)),Object(o.setUpFilterOnPlay)(this,t),Object(o.setUpTunaOnPlay)(this,t),this.setUpExternalFxOnPlay(t,o.context),this.gain.unshift(o.context.createGain()),this.gain[0].label=t.label,this.gain[0].soundSource=this.soundSource,this.nodes.push(this.gain[0]),this.gain.length>15&&(this.gain.length=15),this.reverb&&Object(o.setUpReverbOnPlay)(this,t),Object(o.setUpPanningOnPlay)(this,t),Object(o.setUpDelayOnPlay)(this,t),Object(o.plugEmIn)(this,t),this.filter&&this.filter[0].env&&Object(o.filterEnv)(this,t),Object(o.playEnv)(this,t),this.vibrato&&Object(o.setUpVibratoOnPlay)(this,t,c),this.tremolo&&Object(o.setUpTremoloOnPlay)(this,t,c);var e=this;if(this.soundSource.onended=function(t){e.playPromiseResolve(e)},!t.unpause)return this.playPromise=new Promise((function(t,n){e.playPromiseResolve=t})),this.playPromise}t.callback&&t.callback(this)}setVolume(t,e,n){if(e=e||.01,n){if(this.gain.length>0)for(let e=0;e<this.gain.length;e++)this.gain[e].label===n&&this.gain[e].gain.setValueAtTime(t,o.context.currentTime)}else this.defaultVolume=t,this.gain.length>0&&this.gain[0].gain.setValueAtTime(t,o.context.currentTime);return this}reverse(){this.decodedBuffer?(Array.prototype.reverse.call(this.decodedBuffer.getChannelData(0)),Array.prototype.reverse.call(this.decodedBuffer.getChannelData(1))):Object(o.logMessage)("You tried to reverse something that isn't reversible")}setRate(t){var e;return e=t&&t>0?t:0,this.soundSource?this.soundSource.playbackRate.value=e:Object(o.logMessage)("Sorry, but the wad does not contain a soundSource!"),this}setPitch(t,e,n){if(e=e||.01,n)for(let r=0;r<this.gain.length;r++)this.gain[r].label===n&&(t in c.pitches?this.gain[r].soundSource.frequency.setTargetAtTime(c.pitches[t],o.context.currentTime,e):this.soundSource.frequency.settargetAtTime(t,o.context.currentTime,e));else t in c.pitches?(this.soundSource&&(this.soundSource.frequency.value=c.pitches[t]),this.pitch=c.pitches[t]):(this.soundSource&&(this.soundSource.frequency.value=t),this.pitch=t);return this}setDetune(t,e,n){if(e=e||.01,n)for(let r=0;r<this.gain.length;r++)this.gain[r].label===n&&this.gain[r].soundSource.detune.setTargetAtTime(t,o.context.currentTime,e);else this.soundSource.detune.setTargetAtTime(t,o.context.currentTime,e);return this}setPanning(t,e){return e=e||.01,"number"!=typeof t||o.context.createStereoPanner||(t=[t,0,0]),this.panning.location=t,s.a.isArray(t)&&"3d"===this.panning.type&&this.panning.node?this.panning.node.setPosition(t[0],t[1],t[2]):"number"==typeof t&&"stereo"===this.panning.type&&this.panning.node&&this.panning.node.pan.setTargetAtTime(t,o.context.currentTime,e),s.a.isArray(t)?this.panning.type="3d":"number"==typeof t&&(this.panning.type="stereo"),this}setReverb(t){var e;return e=t&&t>0&&t<1?t:t>=1?1:0,this.reverb?(this.reverb.wet=e,this.reverb.node&&(this.reverb.node.wet.gain.value=e)):Object(o.logMessage)("Sorry, but the wad does not contain Reverb!"),this}setDelay(t,e,n){var r,i,a;return r=t&&t>0?t:0,i=e&&e>0&&e<1?e:e>=1?1:0,a=n&&n>0&&n<1?n:n>=1?1:0,this.delay?(this.delay.delayTime=r,this.delay.wet=i,this.delay.feedback=a,this.delay.delayNode&&(this.delay.delayNode.delayNode.delayTime.value=r,this.delay.delayNode.wetNode.gain.value=i,this.delay.delayNode.feedbackNode.gain.value=a)):Object(o.logMessage)("Sorry, but the wad does not contain delay!",2),this}pause(t){this.pauseTime=o.context.currentTime,this.soundSource.onended=null,this.stop(t)}unpause(t){(t=t||{}).unpause=!0,this.pauseTime&&null!=this.lastPlayedTime?t.offset=this.pauseTime-this.lastPlayedTime:Object(o.logMessage)("You tried to unpause a wad that was not played and paused, so it just played normally instead.",2),this.play(t)}stop(t){if("mic"!==this.source){if(!this.gain||!this.gain.length)return Object(o.logMessage)("You tried to stop a Wad that never played. ",2),void Object(o.logMessage)(this,2);if(t)for(var e=0;e<this.gain.length;e++)this.gain[e].label===t&&(this.gain[e].gain.cancelScheduledValues(o.context.currentTime),this.gain[e].gain.setValueAtTime(this.gain[e].gain.value,o.context.currentTime),this.gain[e].gain.linearRampToValueAtTime(1e-4,o.context.currentTime+this.env.release));else if(!t){this.gain[0].gain.cancelScheduledValues(o.context.currentTime),this.gain[0].gain.setValueAtTime(this.gain[0].gain.value,o.context.currentTime),this.gain[0].gain.linearRampToValueAtTime(1e-4,o.context.currentTime+this.env.release);try{this.soundSource.stop(o.context.currentTime+this.env.release)}catch(t){Object(o.logMessage)(t,2);var n=this;setTimeout((function(){n.soundSource.dispatchEvent(new Event("ended")),n.soundSource.onended=null}),1e3*this.env.release)}}}else o.permissionsGranted.micConsent?this.mediaStreamSource.disconnect(0):Object(o.logMessage)("You have not given your browser permission to use your microphone.");this.tremolo&&this.tremolo.wad.stop()}constructExternalFx(t,e){}setUpExternalFxOnPlay(t,e){}}c.Poly=class{constructor(t){}add(t){}remove(t){}play(t){}stop(t){}setVolume(t){}setPitch(t){}setPanning(t){}},c.allWads=[],c.audioContext=o.context,c.listener=new class{constructor(t){this._listener=t.listener,window.listener=this._listener,this.positionX=this._listener.positionX||new a(0,t=>this._listener.setPosition(t,this.positionY.value,this.positionZ.value)),this.positionY=this._listener.positionY||new a(0,t=>this._listener.setPosition(this.positionX.value,t,this.positionZ.value)),this.positionZ=this._listener.positionZ||new a(0,t=>this._listener.setPosition(this.positionX.value,this.positionY.value,t)),this.forwardX=this._listener.forwardX||new a(0,t=>this._listener.setOrientation(t,this.forwardY.value,this.forwardZ.value,this.upX.value,this.upY.value,this.upZ.value)),this.forwardY=this._listener.ForwardY||new a(0,t=>this._listener.setOrientation(this.forwardX.value,t,this.forwardZ.value,this.upX.value,this.upY.value,this.upZ.value)),this.forwardZ=this._listener.forwardZ||new a(-1,t=>this._listener.setOrientation(this.forwardX.value,this.forwardY.value,t,this.upX.value,this.upY.value,this.upZ.value)),this.upX=this._listener.upZ||new a(0,t=>this._listener.setOrientation(this.forwardX.value,this.forwardY.value,this.forwardZ.value,t,this.upY.value,this.upZ.value)),this.upY=this._listener.upY||new a(1,t=>this._listener.setOrientation(this.forwardX.value,this.forwardY.value,this.forwardZ.value,this.upX.value,t,this.upZ.value)),this.upZ=this._listener.upZ||new a(0,t=>this._listener.setOrientation(this.forwardX.value,this.forwardY.value,this.forwardZ.value,this.upX.value,this.upY.value,t))}setPosition(t,e,n){this.positionX.value=t,this.positionY.value=e,this.positionZ.value=n}getPosition(){return[this.positionX.value,this.positionY.value,this.positionZ.value]}setOrientation(t,e,n,r,i,a){this.forwardX.value=t,this.forwardY.value=e,this.forwardZ.value=n,this.upX.value=r,this.upY.value=i,this.upZ.value=a}getOrientation(){return[this.forwardX.value,this.forwardY.value,this.forwardZ.value,this.upX.value,this.upY.value,this.upZ.value]}}(o.context),null!=typeof i.a&&(c.tuna=new i.a(c.audioContext));e.a=c},function(t,e,n){"use strict";n.r(e),function(t){var r=n(6),i=n(5),a=n(7),o=n(2),u=n(4),s=n(8),c=n(0);let l=s.a;l.Poly=i.a,l.SoundIterator=function(t){return new r.a(t,l)},l.pitches=o.a,l.pitchesArray=o.b,l.midiMap=u.d,l.assignMidiMap=u.a,l.midiInstrument=u.c,l.midiInputs=u.b,l.presets=a.a,l._common=c,l.logs=c.logStats,t.exports&&(t.exports=l),e.default=l}.call(this,n(10)(t))},function(t,e){t.exports=function(t){if(!t.webpackPolyfill){var e=Object.create(t);e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),Object.defineProperty(e,"exports",{enumerable:!0}),e.webpackPolyfill=1}return e}},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}}]).default}));
@@ -23,7 +23,7 @@ b.color(:black)
23
23
  circle({ id: :circle_123, color: :cyan, left: 233 })
24
24
 
25
25
 
26
- # big perfomrance problem plus params as left is not interpreted
26
+ # big performance problem plus params as left is not interpreted
27
27
 
28
28
  i = 0
29
29
  while i < 16
@@ -33,4 +33,26 @@ while i < 16
33
33
  b.left((33 + 10) * i)
34
34
  i += 1
35
35
  # b.drag(true)
36
- end
36
+ end
37
+
38
+
39
+ # .color (return the color itself instead of the box ) and .red retrun itself too so it's impossible to set green and blue
40
+ # another problem : when steeing .red it reset the whole color object and remove green an blue components
41
+ box({id: :mybox})
42
+ grab(:my_box).smooth(6).color(:black).red(0.6).green(0.6).blue(0.6)
43
+
44
+ # color can't be changed easily
45
+
46
+ b=box
47
+ b.color.red(1)
48
+
49
+ # box in box doesn't work( incorrect node tree error)
50
+ b=box({id: :mybox, width: 666, height: 555})
51
+
52
+ b.box()
53
+
54
+ # atome i, atome using preset doesn't work
55
+
56
+ b=box
57
+ c=b.box
58
+ c.left(200)
@@ -0,0 +1,178 @@
1
+ # frozen_string_literal: true
2
+
3
+ box({id: :mybox})
4
+
5
+
6
+ # `
7
+ # function BufferLoader(context, urlList, callback) {
8
+ # this.context = context;
9
+ # this.urlList = urlList;
10
+ # this.onload = callback;
11
+ # this.bufferList = new Array();
12
+ # this.loadCount = 0;
13
+ # }
14
+ #
15
+ # BufferLoader.prototype.loadBuffer = function(url, index) {
16
+ # // Load buffer asynchronously
17
+ # var request = new XMLHttpRequest();
18
+ # request.open("GET", url, true);
19
+ # request.responseType = "arraybuffer";
20
+ #
21
+ # var loader = this;
22
+ #
23
+ # request.onload = function() {
24
+ # // Asynchronously decode the audio file data in request.response
25
+ # loader.context.decodeAudioData(
26
+ # request.response,
27
+ # function(buffer) {
28
+ # if (!buffer) {
29
+ # alert('error decoding file data: ' + url);
30
+ # return;
31
+ # }
32
+ # loader.bufferList[index] = buffer;
33
+ # if (++loader.loadCount == loader.urlList.length)
34
+ # loader.onload(loader.bufferList);
35
+ # },
36
+ # function(error) {
37
+ # console.error('decodeAudioData error', error);
38
+ # }
39
+ # );
40
+ # }
41
+ #
42
+ # request.onerror = function() {
43
+ # alert('BufferLoader: XHR error');
44
+ # }
45
+ #
46
+ # request.send();
47
+ # }
48
+ #
49
+ # BufferLoader.prototype.load = function() {
50
+ # for (var i = 0; i < this.urlList.length; ++i)
51
+ # this.loadBuffer(this.urlList[i], i);
52
+ # }
53
+ #
54
+ #
55
+ # window.onload = init;
56
+ # var context;
57
+ # var bufferLoader;
58
+ #
59
+ # function init() {
60
+ # context = new AudioContext();
61
+ #
62
+ # bufferLoader = new BufferLoader(
63
+ # context,
64
+ # [
65
+ # 'medias/audios/snare.wav',
66
+ # 'medias/audios/cowbell.wav',
67
+ # ],
68
+ # finishedLoading
69
+ # );
70
+ #
71
+ # bufferLoader.load();
72
+ # }
73
+ #
74
+ # function finishedLoading(bufferList) {
75
+ # // Create two sources and play them both together.
76
+ # var source1 = context.createBufferSource();
77
+ # var source2 = context.createBufferSource();
78
+ # source1.buffer = bufferList[0];
79
+ # source2.buffer = bufferList[1];
80
+ #
81
+ # source1.connect(context.destination);
82
+ # source2.connect(context.destination);
83
+ # source1.noteOn(0);
84
+ # source2.noteOn(0);
85
+ # }
86
+ # `
87
+ #
88
+ #
89
+ #
90
+ `
91
+ const el = document.getElementById("mybox")
92
+ function modifyText(){
93
+ var audio = new Audio('medias/audios/snare.wav');
94
+ audio.play(2);
95
+ }
96
+ el.addEventListener("mousedown", modifyText, false);
97
+ `
98
+ b=box({left: 160})
99
+ b2=box({left: 333})
100
+ b.touch(:down) do
101
+ `
102
+ var audio = new Audio('medias/audios/Binrpilot.mp3');
103
+ audio.currentTime=12
104
+ audio.play(2);
105
+ console.log('ok')
106
+ `
107
+ end
108
+
109
+
110
+ b2.touch(:down) do
111
+ # `
112
+ # let bell= new Audio('medias/audios/snare.wav');
113
+ #
114
+ # `
115
+ end
116
+ # generator = Genesis.generator
117
+
118
+ # b.touch(:double) do
119
+ # # alert :kool
120
+ # #
121
+ # `
122
+ # let bell = new Audio('medias/audios/snare.wav');
123
+ # bell.play();
124
+ # `
125
+ #
126
+ # b.color(:red)
127
+ #
128
+ # # `
129
+ # # var audio = new Audio('medias/audios/snare.wav');
130
+ # # //audio.play();
131
+ # # //let bell = new Wad({sin : audio});
132
+ # # let bell = audio
133
+ # # //bell.play();
134
+ # # //bell.stop();
135
+ # #
136
+ # # //////
137
+ # #
138
+ # # var helloWorld = new Wad({
139
+ # # // source: 'medias/audios/snare.wav',
140
+ # # var audio = new Audio('medias/audios/snare.wav'),
141
+ # # source: 'medias/audios/snare.wav',
142
+ # # // add a key for each sprite
143
+ # # sprite: {
144
+ # # hello : [0, .4], // the start and end time, in seconds
145
+ # # world : [.4,1]
146
+ # # }
147
+ # # });
148
+ # #
149
+ # # // for each key on the sprite object in the constructor above, the wad that is created will have a key of the same name, with a play() method.
150
+ # # helloWorld.hello.play();
151
+ # # helloWorld.world.play();
152
+ # #
153
+ # # // you can still play the entire clip normally, if you want.
154
+ # # helloWorld.play();
155
+ # #
156
+ # # // if you hear clicks or pops from starting and stopping playback in the middle of the clip, you can try adding some attack and release to the envelope.
157
+ # # helloWorld.hello.play({env:{attack: .1, release:.02}})
158
+ # # `
159
+ # end
160
+ # b=box
161
+ # b.touch(:down) do
162
+ # `
163
+ # Wad.audioContext
164
+ # `
165
+ # end
166
+
167
+
168
+
169
+ # `
170
+ # //let saw = new Wad({source : 'sawtooth'});
171
+ # let saw = new Wad({
172
+ # source : 'sawtooth',
173
+ # panning : [0, 1, 10],
174
+ # panningModel : 'HRTF',
175
+ # rolloffFactor : 3 // other properties of the panner node can be specified in the constructor, or on play()
176
+ # })
177
+ # saw.play();
178
+ #`