From a4523ded413162d84c08fde1f772290d76c45eb9 Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Sat, 11 Dec 2021 21:56:11 -0800 Subject: [PATCH] Run build --- dist/waveform-playlist/js/waveform-playlist.js | 2 ++ dist/waveform-playlist/js/waveform-playlist.js.LICENSE.txt | 6 ++++++ 2 files changed, 8 insertions(+) create mode 100644 dist/waveform-playlist/js/waveform-playlist.js create mode 100644 dist/waveform-playlist/js/waveform-playlist.js.LICENSE.txt diff --git a/dist/waveform-playlist/js/waveform-playlist.js b/dist/waveform-playlist/js/waveform-playlist.js new file mode 100644 index 00000000..3a4bcf76 --- /dev/null +++ b/dist/waveform-playlist/js/waveform-playlist.js @@ -0,0 +1,2 @@ +/*! For license information please see waveform-playlist.js.LICENSE.txt */ +var WaveformPlaylist;(()=>{var t={8098:t=>{var e,n,r;t.exports=(n=String.prototype.split,r=/()??/.exec("")[1]===e,function(t,i,o){if("[object RegExp]"!==Object.prototype.toString.call(i))return n.call(t,i,o);var a,s,u,c,l=[],f=(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.extended?"x":"")+(i.sticky?"y":""),h=0;for(i=new RegExp(i.source,f+"g"),t+="",r||(a=new RegExp("^"+i.source+"$(?!\\s)",f)),o=o===e?-1>>>0:o>>>0;(s=i.exec(t))&&!((u=s.index+s[0].length)>h&&(l.push(t.slice(h,s.index)),!r&&s.length>1&&s[0].replace(a,(function(){for(var t=1;t1&&s.index=o));)i.lastIndex===s.index&&i.lastIndex++;return h===t.length?!c&&i.test("")||l.push(""):l.push(t.slice(h)),l.length>o?l.slice(0,o):l})},7296:(t,e,n)=>{"use strict";var r=n(1102),i=n(2307),o=n(4339),a=n(3957),s=n(3246);(t.exports=function(t,e){var n,i,u,c,l;return arguments.length<2||"string"!=typeof t?(c=e,e=t,t=null):c=arguments[2],r(t)?(n=s.call(t,"c"),i=s.call(t,"e"),u=s.call(t,"w")):(n=u=!0,i=!1),l={value:e,configurable:n,enumerable:i,writable:u},c?o(a(c),l):l}).gs=function(t,e,n){var u,c,l,f;return"string"!=typeof t?(l=n,n=e,e=t,t=null):l=arguments[3],r(e)?i(e)?r(n)?i(n)||(l=n,n=void 0):n=void 0:(l=e,e=n=void 0):e=void 0,r(t)?(u=s.call(t,"c"),c=s.call(t,"e")):(u=!0,c=!1),f={get:e,set:n,configurable:u,enumerable:c},l?o(a(l),f):f}},817:t=>{"use strict";t.exports=function(){}},4339:(t,e,n)=>{"use strict";t.exports=n(1994)()?Object.assign:n(963)},1994:t=>{"use strict";t.exports=function(){var t,e=Object.assign;return"function"==typeof e&&(e(t={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),t.foo+t.bar+t.trzy==="razdwatrzy")}},963:(t,e,n)=>{"use strict";var r=n(3450),i=n(1836),o=Math.max;t.exports=function(t,e){var n,a,s,u=o(arguments.length,2);for(t=Object(i(t)),s=function(r){try{t[r]=e[r]}catch(t){n||(n=t)}},a=1;a{"use strict";var r=n(817)();t.exports=function(t){return t!==r&&null!==t}},3450:(t,e,n)=>{"use strict";t.exports=n(3446)()?Object.keys:n(9177)},3446:t=>{"use strict";t.exports=function(){try{return Object.keys("primitive"),!0}catch(t){return!1}}},9177:(t,e,n)=>{"use strict";var r=n(8349),i=Object.keys;t.exports=function(t){return i(r(t)?Object(t):t)}},3957:(t,e,n)=>{"use strict";var r=n(8349),i=Array.prototype.forEach,o=Object.create,a=function(t,e){var n;for(n in t)e[n]=t[n]};t.exports=function(t){var e=o(null);return i.call(arguments,(function(t){r(t)&&a(Object(t),e)})),e}},79:t=>{"use strict";t.exports=function(t){if("function"!=typeof t)throw new TypeError(t+" is not a function");return t}},1836:(t,e,n)=>{"use strict";var r=n(8349);t.exports=function(t){if(!r(t))throw new TypeError("Cannot use null or undefined");return t}},3246:(t,e,n)=>{"use strict";t.exports=n(8711)()?String.prototype.contains:n(2370)},8711:t=>{"use strict";var e="razdwatrzy";t.exports=function(){return"function"==typeof e.contains&&!0===e.contains("dwa")&&!1===e.contains("foo")}},2370:t=>{"use strict";var e=String.prototype.indexOf;t.exports=function(t){return e.call(this,t,arguments[1])>-1}},9401:(t,e,n)=>{"use strict";n(8625)("ev-store","7");var r="__EV_STORE_KEY@7";t.exports=function(t){var e=t[r];return e||(e=t[r]={}),e}},8709:(t,e,n)=>{"use strict";var r,i,o,a,s,u,c,l=n(7296),f=n(79),h=Function.prototype.apply,p=Function.prototype.call,d=Object.create,v=Object.defineProperty,y=Object.defineProperties,m=Object.prototype.hasOwnProperty,g={configurable:!0,enumerable:!1,writable:!0};i=function(t,e){var n,i;return f(e),i=this,r.call(this,t,n=function(){o.call(i,t,n),h.call(e,this,arguments)}),n.__eeOnceListener__=e,this},s={on:r=function(t,e){var n;return f(e),m.call(this,"__ee__")?n=this.__ee__:(n=g.value=d(null),v(this,"__ee__",g),g.value=null),n[t]?"object"==typeof n[t]?n[t].push(e):n[t]=[n[t],e]:n[t]=e,this},once:i,off:o=function(t,e){var n,r,i,o;if(f(e),!m.call(this,"__ee__"))return this;if(!(n=this.__ee__)[t])return this;if("object"==typeof(r=n[t]))for(o=0;i=r[o];++o)i!==e&&i.__eeOnceListener__!==e||(2===r.length?n[t]=r[o?0:1]:r.splice(o,1));else r!==e&&r.__eeOnceListener__!==e||delete n[t];return this},emit:a=function(t){var e,n,r,i,o;if(m.call(this,"__ee__")&&(i=this.__ee__[t]))if("object"==typeof i){for(n=arguments.length,o=new Array(n-1),e=1;e{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.linear=function(t,e){var n,r,i=new Float32Array(t),o=t-1;for(n=0;n0?r:1-r;return i},e.exponential=function(t,e){var n,r,i=new Float32Array(t),o=t-1;for(n=0;n0?n:t-1-n]=Math.exp(2*r-1)/Math.exp(1);return i},e.sCurve=function(t,e){var n,r=new Float32Array(t),i=e>0?Math.PI/2:-Math.PI/2;for(n=0;n0?r:t-1-r]=Math.log(1+e*o)/Math.log(1+e);return i}},9304:(t,e,n)=>{"use strict";e.h7=e.Y1=e.Hp=e.Jl=e.t$=e._h=void 0,e.L7=function(t,e,n,r){switch(e){case i:u.call(t,n,r);break;case o:l.call(t,n,r);break;case a:h.call(t,n,r);break;case s:d.call(t,n,r);break;default:throw new Error("Unsupported Fade type")}},e.Mt=function(t,e,n,r){switch(e){case i:c.call(t,n,r);break;case o:f.call(t,n,r);break;case a:p.call(t,n,r);break;case s:v.call(t,n,r);break;default:throw new Error("Unsupported Fade type")}};var r=n(4571),i=e._h="sCurve",o=e.t$="linear",a=e.Jl="exponential",s=e.Hp="logarithmic";function u(t,e){var n=(0,r.sCurve)(1e4,1);this.setValueCurveAtTime(n,t,e)}function c(t,e){var n=(0,r.sCurve)(1e4,-1);this.setValueCurveAtTime(n,t,e)}function l(t,e){this.linearRampToValueAtTime(0,t),this.linearRampToValueAtTime(1,t+e)}function f(t,e){this.linearRampToValueAtTime(1,t),this.linearRampToValueAtTime(0,t+e)}function h(t,e){this.exponentialRampToValueAtTime(.01,t),this.exponentialRampToValueAtTime(1,t+e)}function p(t,e){this.exponentialRampToValueAtTime(1,t),this.exponentialRampToValueAtTime(.01,t+e)}function d(t,e){var n=(0,r.logarithmic)(1e4,10,1);this.setValueCurveAtTime(n,t,e)}function v(t,e){var n=(0,r.logarithmic)(1e4,10,-1);this.setValueCurveAtTime(n,t,e)}e.Y1="FadeIn",e.h7="FadeOut"},474:(t,e,n)=>{var r,i=void 0!==n.g?n.g:"undefined"!=typeof window?window:{},o=n(444);"undefined"!=typeof document?r=document:(r=i["__GLOBAL_DOCUMENT_CACHE@4"])||(r=i["__GLOBAL_DOCUMENT_CACHE@4"]=o),t.exports=r},7051:(t,e,n)=>{"use strict";var r="undefined"!=typeof window?window:void 0!==n.g?n.g:{};t.exports=function(t,e){return t in r?r[t]:(r[t]=e,e)}},8625:(t,e,n)=>{"use strict";var r=n(7051);t.exports=function(t,e,n){var i="__INDIVIDUAL_ONE_VERSION_"+t,o=r(i+"_ENFORCE_SINGLETON",e);if(o!==e)throw new Error("Can only have one copy of "+t+".\nYou already have version "+o+" installed.\nThis means you cannot install version "+e);return r(i,n)}},1072:(t,e,n)=>{var r=!!(n.g===n.g.window&&n.g.URL&&n.g.Blob&&n.g.Worker);function i(t,e){var i,o=this;if(e=e||{},r)return i=t.toString().trim().match(/^function\s*\w*\s*\([\w\s,]*\)\s*{([\w\W]*?)}$/)[1],new n.g.Worker(n.g.URL.createObjectURL(new n.g.Blob([i],{type:"text/javascript"})));this.self=e,this.self.postMessage=function(t){setTimeout((function(){o.onmessage({data:t})}),0)},setTimeout(t.bind(e,e),0)}i.prototype.postMessage=function(t){var e=this;setTimeout((function(){e.self.onmessage({data:t})}),0)},t.exports=i},4436:t=>{"use strict";t.exports=function(t){return"object"==typeof t&&null!==t}},2473:t=>{var e=9007199254740991,n=/^(?:0|[1-9]\d*)$/;function r(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)}var i,o,a=Object.prototype,s=a.hasOwnProperty,u=a.toString,c=a.propertyIsEnumerable,l=(i=Object.keys,o=Object,function(t){return i(o(t))}),f=Math.max,h=!c.call({valueOf:1},"valueOf");function p(t,e,n){var r=t[e];s.call(t,e)&&y(r,n)&&(void 0!==n||e in t)||(t[e]=n)}function d(t,r){return!!(r=null==r?e:r)&&("number"==typeof t||n.test(t))&&t>-1&&t%1==0&&t-1&&t%1==0&&t<=e}(t.length)&&!function(t){var e=b(t)?u.call(t):"";return"[object Function]"==e||"[object GeneratorFunction]"==e}(t)}function b(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}var k,w=(k=function(t,e){if(h||v(e)||g(e))!function(t,e,n,r){n||(n={});for(var i=-1,o=e.length;++i1?e[r-1]:void 0,o=r>2?e[2]:void 0;for(i=k.length>3&&"function"==typeof i?(r--,i):void 0,o&&function(t,e,n){if(!b(n))return!1;var r=typeof e;return!!("number"==r?g(n)&&d(e,n.length):"string"==r&&e in n)&&y(n[e],t)}(e[0],e[1],o)&&(i=r<3?void 0:i,r=1),t=Object(t);++n{t=n.nmd(t);var r="__lodash_hash_undefined__",i=9007199254740991,o="[object Arguments]",a="[object Function]",s="[object Object]",u=/^\[object .+?Constructor\]$/,c=/^(?:0|[1-9]\d*)$/,l={};l["[object Float32Array]"]=l["[object Float64Array]"]=l["[object Int8Array]"]=l["[object Int16Array]"]=l["[object Int32Array]"]=l["[object Uint8Array]"]=l["[object Uint8ClampedArray]"]=l["[object Uint16Array]"]=l["[object Uint32Array]"]=!0,l[o]=l["[object Array]"]=l["[object ArrayBuffer]"]=l["[object Boolean]"]=l["[object DataView]"]=l["[object Date]"]=l["[object Error]"]=l[a]=l["[object Map]"]=l["[object Number]"]=l[s]=l["[object RegExp]"]=l["[object Set]"]=l["[object String]"]=l["[object WeakMap]"]=!1;var f="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,h="object"==typeof self&&self&&self.Object===Object&&self,p=f||h||Function("return this")(),d=e&&!e.nodeType&&e,v=d&&t&&!t.nodeType&&t,y=v&&v.exports===d,m=y&&f.process,g=function(){try{return v&&v.require&&v.require("util").types||m&&m.binding&&m.binding("util")}catch(t){}}(),b=g&&g.isTypedArray;function k(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)}var w,P,x,T=Array.prototype,S=Function.prototype,O=Object.prototype,_=p["__core-js_shared__"],E=S.toString,R=O.hasOwnProperty,j=(w=/[^.]+$/.exec(_&&_.keys&&_.keys.IE_PROTO||""))?"Symbol(src)_1."+w:"",C=O.toString,A=E.call(Object),L=RegExp("^"+E.call(R).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),M=y?p.Buffer:void 0,I=p.Symbol,F=p.Uint8Array,G=(M&&M.allocUnsafe,P=Object.getPrototypeOf,x=Object,function(t){return P(x(t))}),D=Object.create,z=O.propertyIsEnumerable,V=T.splice,N=I?I.toStringTag:void 0,W=function(){try{var t=ct(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),U=M?M.isBuffer:void 0,q=Math.max,B=Date.now,H=ct(p,"Map"),X=ct(Object,"create"),$=function(){function t(){}return function(e){if(!wt(e))return{};if(D)return D(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();function Y(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e-1},Z.prototype.set=function(t,e){var n=this.__data__,r=et(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},J.prototype.clear=function(){this.size=0,this.__data__={hash:new Y,map:new(H||Z),string:new Y}},J.prototype.delete=function(t){var e=ut(this,t).delete(t);return this.size-=e?1:0,e},J.prototype.get=function(t){return ut(this,t).get(t)},J.prototype.has=function(t){return ut(this,t).has(t)},J.prototype.set=function(t,e){var n=ut(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},K.prototype.clear=function(){this.__data__=new Z,this.size=0},K.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},K.prototype.get=function(t){return this.__data__.get(t)},K.prototype.has=function(t){return this.__data__.has(t)},K.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Z){var r=n.__data__;if(!H||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new J(r)}return n.set(t,e),this.size=n.size,this};function rt(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":N&&N in Object(t)?function(t){var e=R.call(t,N),n=t[N];try{t[N]=void 0;var r=!0}catch(t){}var i=C.call(t);return r&&(e?t[N]=n:delete t[N]),i}(t):function(t){return C.call(t)}(t)}function it(t){return Pt(t)&&rt(t)==o}function ot(t,e,n,r,i){t!==e&&function(t,e,n){for(var r=-1,i=Object(t),o=n(t),a=o.length;a--;){var s=o[++r];if(!1===e(i[s],s,i))break}}(e,(function(o,a){if(i||(i=new K),wt(o))!function(t,e,n,r,i,o,a){var u=ht(t,n),c=ht(e,n),l=a.get(c);if(l)Q(t,n,l);else{var f,h,p,d,v,y=o?o(u,c,n+"",t,e,a):void 0,m=void 0===y;if(m){var g=yt(c),b=!g&>(c),k=!g&&!b&&xt(c);y=c,g||b||k?yt(u)?y=u:Pt(v=u)&&mt(v)?y=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n-1&&t%1==0&&t0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(W?function(t,e){return W(t,"toString",{configurable:!0,enumerable:!1,value:(n=e,function(){return n}),writable:!0});var n}:Et);function dt(t,e){return t===e||t!=t&&e!=e}var vt=it(function(){return arguments}())?it:function(t){return Pt(t)&&R.call(t,"callee")&&!z.call(t,"callee")},yt=Array.isArray;function mt(t){return null!=t&&kt(t.length)&&!bt(t)}var gt=U||function(){return!1};function bt(t){if(!wt(t))return!1;var e=rt(t);return e==a||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}function kt(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=i}function wt(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Pt(t){return null!=t&&"object"==typeof t}var xt=b?function(t){return function(e){return t(e)}}(b):function(t){return Pt(t)&&kt(t.length)&&!!l[rt(t)]},Tt=at((function(t){return t.push(void 0,st),k(_t,void 0,t)}));function St(t){return mt(t)?function(t,e){var n=yt(t),r=!n&&vt(t),i=!n&&!r&>(t),o=!n&&!r&&!i&&xt(t),a=n||r||i||o,s=a?function(t,e){for(var n=-1,r=Array(t);++n1?e[r-1]:void 0,o=r>2?e[2]:void 0;for(i=Ot.length>3&&"function"==typeof i?(r--,i):void 0,o&&function(t,e,n){if(!wt(n))return!1;var r=typeof e;return!!("number"==r?mt(n)&<(e,n.length):"string"==r&&e in n)&&dt(n[e],t)}(e[0],e[1],o)&&(i=r<3?void 0:i,r=1),t=Object(t);++n{var e,n,r=9007199254740991,i=/^(?:0|[1-9]\d*)$/,o=Object.prototype,a=o.hasOwnProperty,s=o.toString,u=o.propertyIsEnumerable,c=(e=Object.keys,n=Object,function(t){return e(n(t))});function l(t,e){return!!(e=null==e?r:e)&&("number"==typeof t||i.test(t))&&t>-1&&t%1==0&&t-1&&t%1==0&&t<=r}(t.length)&&!function(t){var e=function(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}(t)?s.call(t):"";return"[object Function]"==e||"[object GeneratorFunction]"==e}(t)}function p(t){return h(t)?function(t,e){var n=f(t)||function(t){return function(t){return function(t){return!!t&&"object"==typeof t}(t)&&h(t)}(t)&&a.call(t,"callee")&&(!u.call(t,"callee")||"[object Arguments]"==s.call(t))}(t)?function(t,e){for(var n=-1,r=Array(t);++n{"use strict";var r=n(9666);t.exports=function(t){if("function"!=typeof t)return!1;if(!hasOwnProperty.call(t,"length"))return!1;try{if("number"!=typeof t.length)return!1;if("function"!=typeof t.call)return!1;if("function"!=typeof t.apply)return!1}catch(t){return!1}return!r(t)}},4617:(t,e,n)=>{"use strict";var r=n(1102),i={object:!0,function:!0,undefined:!0};t.exports=function(t){return!!r(t)&&hasOwnProperty.call(i,typeof t)}},2307:(t,e,n)=>{"use strict";var r=n(5111),i=/^\s*class[\s{/}]/,o=Function.prototype.toString;t.exports=function(t){return!!r(t)&&!i.test(o.call(t))}},9666:(t,e,n)=>{"use strict";var r=n(4617);t.exports=function(t){if(!r(t))return!1;try{return!!t.constructor&&t.constructor.prototype===t}catch(t){return!1}}},1102:t=>{"use strict";t.exports=function(t){return null!=t}},1583:(t,e,n)=>{var r=n(5556);t.exports=r},3132:(t,e,n)=>{var r=n(7382);t.exports=r},542:(t,e,n)=>{var r=n(3123);t.exports=r},44:(t,e,n)=>{var r=n(2446);t.exports=r},8554:(t,e,n)=>{var r=n(4436),i=n(4270);function o(t,e,n,r){if(r){var o=r[e];if(i(o))o.unhook&&o.unhook(t,e,n);else if("attributes"===e)for(var a in o)t.removeAttribute(a);else if("style"===e)for(var s in o)t.style[s]="";else t[e]="string"==typeof o?"":null}}function a(t,e,n,i,o){var a=n?n[i]:void 0;if("attributes"!==i)if(a&&r(a)&&s(a)!==s(o))t[i]=o;else{r(t[i])||(t[i]={});var u="style"===i?"":void 0;for(var c in o){var l=o[c];t[i][c]=void 0===l?u:l}}else for(var f in o){var h=o[f];void 0===h?t.removeAttribute(f):t.setAttribute(f,h)}}function s(t){return Object.getPrototypeOf?Object.getPrototypeOf(t):t.__proto__?t.__proto__:t.constructor?t.constructor.prototype:void 0}t.exports=function(t,e,n){for(var s in e){var u=e[s];void 0===u?o(t,s,u,n):i(u)?(o(t,s,u,n),u.hook&&u.hook(t,s,n?n[s]:void 0)):r(u)?a(t,0,n,s,u):t[s]=u}}},5556:(t,e,n)=>{var r=n(474),i=n(8554),o=n(9683),a=n(2592),s=n(7127),u=n(1575);t.exports=function t(e,n){var c=n&&n.document||r,l=n?n.warn:null;if(e=u(e).a,s(e))return e.init();if(a(e))return c.createTextNode(e.text);if(!o(e))return l&&l("Item is not a valid virtual dom node",e),null;var f=null===e.namespace?c.createElement(e.tagName):c.createElementNS(e.namespace,e.tagName),h=e.properties;i(f,h);for(var p=e.children,d=0;d{var e={};function n(t,i,o,a,s){if(a=a||{},t){r(o,s,s)&&(a[s]=t);var u=i.children;if(u)for(var c=t.childNodes,l=0;l>0],o===a)return i>=e&&i<=n;if(in))return!0;a=r-1}}return!1}function i(t,e){return t>e?1:-1}t.exports=function(t,e,r,o){return r&&0!==r.length?(r.sort(i),n(t,e,r,o,0)):{}}},4345:(t,e,n)=>{var r=n(8554),i=n(7127),o=n(8248),a=n(9243);function s(t,e){"function"==typeof e.destroy&&i(e)&&e.destroy(t)}t.exports=function(t,e,n){var i,u,c=t.type,l=t.vNode,f=t.patch;switch(c){case o.REMOVE:return function(t,e){var n=t.parentNode;return n&&n.removeChild(t),s(t,e),null}(e,l);case o.INSERT:return function(t,e,n){var r=n.render(e,n);return t&&t.appendChild(r),t}(e,f,n);case o.VTEXT:return function(t,e,n,r){var i;if(3===t.nodeType)t.replaceData(0,t.length,n.text),i=t;else{var o=t.parentNode;i=r.render(n,r),o&&i!==t&&o.replaceChild(i,t)}return i}(e,0,f,n);case o.WIDGET:return function(t,e,n,r){var i,o=a(e,n);i=o?n.update(e,t)||t:r.render(n,r);var u=t.parentNode;return u&&i!==t&&u.replaceChild(i,t),o||s(t,e),i}(e,l,f,n);case o.VNODE:return function(t,e,n,r){var i=t.parentNode,o=r.render(n,r);return i&&o!==t&&i.replaceChild(o,t),o}(e,0,f,n);case o.ORDER:return function(t,e){for(var n,r,i,o=t.childNodes,a={},s=0;s=u++?null:o[i.to])}(e,f),e;case o.PROPS:return r(e,f,l.properties),e;case o.THUNK:return i=e,u=n.patch(e,f,n),i&&u&&i!==u&&i.parentNode&&i.parentNode.replaceChild(u,i),u;default:return e}}},2446:(t,e,n)=>{var r=n(474),i=n(8722),o=n(5556),a=n(476),s=n(4345);function u(t,e,n){var i=function(t){var e=[];for(var n in t)"a"!==n&&e.push(Number(n));return e}(e);if(0===i.length)return t;var o=a(t,e.a,i),s=t.ownerDocument;n.document||s===r||(n.document=s);for(var u=0;u{var r=n(7127);t.exports=function(t,e){return!(!r(t)||!r(e))&&("name"in t&&"name"in e?t.id===e.id:t.init===e.init)}},2796:(t,e,n)=>{"use strict";var r=n(9401);function i(t){if(!(this instanceof i))return new i(t);this.value=t}t.exports=i,i.prototype.hook=function(t,e){r(t)[e.substr(3)]=this.value},i.prototype.unhook=function(t,e){r(t)[e.substr(3)]=void 0}},3726:t=>{"use strict";function e(t){if(!(this instanceof e))return new e(t);this.value=t}t.exports=e,e.prototype.hook=function(t,e){t[e]!==this.value&&(t[e]=this.value)}},3123:(t,e,n)=>{"use strict";var r=n(8722),i=n(9327),o=n(6181),a=n(9683),s=n(2592),u=n(7127),c=n(4270),l=n(5483),f=n(7303),h=n(3726),p=n(2796);function d(t,e,n,i){if("string"==typeof t)e.push(new o(t));else if("number"==typeof t)e.push(new o(String(t)));else if(v(t))e.push(t);else{if(!r(t)){if(null==t)return;throw s={foreignObject:t,parentVnode:{tagName:n,properties:i}},(u=new Error).type="virtual-hyperscript.unexpected.virtual-element",u.message="Unexpected virtual child passed to h().\nExpected a VNode / Vthunk / VWidget / string but:\ngot:\n"+y(s.foreignObject)+".\nThe parent vnode is:\n"+y(s.parentVnode),u.foreignObject=s.foreignObject,u.parentVnode=s.parentVnode,u}for(var a=0;a{"use strict";var r=n(8098),i=/([\.#]?[a-zA-Z0-9\u007F-\uFFFF_:-]+)/,o=/^\.|#/;t.exports=function(t,e){if(!t)return"DIV";var n,a,s,u,c=!e.hasOwnProperty("id"),l=r(t,i),f=null;for(o.test(l[1])&&(f="DIV"),u=0;u{var r=n(9683),i=n(2592),o=n(7127),a=n(5483);function s(t,e){var n=t.vnode;if(n||(n=t.vnode=t.render(e)),!(r(n)||i(n)||o(n)))throw new Error("thunk did not return a valid node");return n}t.exports=function(t,e){var n=t,r=e;return a(e)&&(r=s(e,t)),a(t)&&(n=s(t,null)),{a:n,b:r}}},5483:t=>{t.exports=function(t){return t&&"Thunk"===t.type}},4270:t=>{t.exports=function(t){return t&&("function"==typeof t.hook&&!t.hasOwnProperty("hook")||"function"==typeof t.unhook&&!t.hasOwnProperty("unhook"))}},9683:(t,e,n)=>{var r=n(9289);t.exports=function(t){return t&&"VirtualNode"===t.type&&t.version===r}},2592:(t,e,n)=>{var r=n(9289);t.exports=function(t){return t&&"VirtualText"===t.type&&t.version===r}},7127:t=>{t.exports=function(t){return t&&"Widget"===t.type}},9289:t=>{t.exports="2"},9327:(t,e,n)=>{var r=n(9289),i=n(9683),o=n(7127),a=n(5483),s=n(4270);t.exports=l;var u={},c=[];function l(t,e,n,r,l){this.tagName=t,this.properties=e||u,this.children=n||c,this.key=null!=r?String(r):void 0,this.namespace="string"==typeof l?l:null;var f,h=n&&n.length||0,p=0,d=!1,v=!1,y=!1;for(var m in e)if(e.hasOwnProperty(m)){var g=e[m];s(g)&&g.unhook&&(f||(f={}),f[m]=g)}for(var b=0;b{var r=n(9289);function i(t,e,n){this.type=Number(t),this.vNode=e,this.patch=n}i.NONE=0,i.VTEXT=1,i.VNODE=2,i.WIDGET=3,i.PROPS=4,i.ORDER=5,i.INSERT=6,i.REMOVE=7,i.THUNK=8,t.exports=i,i.prototype.version=r,i.prototype.type="VirtualPatch"},6181:(t,e,n)=>{var r=n(9289);function i(t){this.text=String(t)}t.exports=i,i.prototype.version=r,i.prototype.type="VirtualText"},2416:(t,e,n)=>{var r=n(4436),i=n(4270);function o(t){return Object.getPrototypeOf?Object.getPrototypeOf(t):t.__proto__?t.__proto__:t.constructor?t.constructor.prototype:void 0}t.exports=function t(e,n){var a;for(var s in e){s in n||((a=a||{})[s]=void 0);var u=e[s],c=n[s];if(u!==c)if(r(u)&&r(c))if(o(c)!==o(u))(a=a||{})[s]=c;else if(i(c))(a=a||{})[s]=c;else{var l=t(u,c);l&&((a=a||{})[s]=l)}else(a=a||{})[s]=c}for(var f in n)f in e||((a=a||{})[f]=n[f]);return a}},7382:(t,e,n)=>{var r=n(8722),i=n(8248),o=n(9683),a=n(2592),s=n(7127),u=n(5483),c=n(1575),l=n(2416);function f(t,e){var n={a:t};return h(t,e,n,0),n}function h(t,e,n,r){if(t!==e){var c=n[r],f=!1;if(u(t)||u(e))v(t,e,n,r);else if(null==e)s(t)||(p(t,n,r),c=n[r]),c=b(c,new i(i.REMOVE,t,e));else if(o(e))if(o(t))if(t.tagName===e.tagName&&t.namespace===e.namespace&&t.key===e.key){var d=l(t.properties,e.properties);d&&(c=b(c,new i(i.PROPS,t,d))),c=function(t,e,n,r,a){for(var s=t.children,u=function(t,e){var n=g(e),r=n.keys,i=n.free;if(i.length===e.length)return{children:e,moves:null};var o=g(t),a=o.keys;if(o.free.length===t.length)return{children:e,moves:null};for(var s=[],u=0,c=i.length,l=0,f=0;f=i.length?e.length:i[u],v=0;v=d&&s.push(y)}for(var b,k=s.slice(),w=0,P=[],x=[],T=0;Tf?l:f,d=0;d{"use strict";function e(t){for(var e,n=1/0,r=-1/0,i=0,o=t.length;i(e=t[i])&&(n=e),rh?h:(a+1)*r,l=n((f=e(t.subarray(s,u))).min,o),c=n(f.max,o),d[2*a]=l,d[2*a+1]=c;return d}function i(t,e){return new(new Function(`return Int${t}Array`)())(e)}function o(t,e){return"number"==typeof t?t:e}t.exports=function(t,e,n,a,s,u){if(e=o(e,1e3),u=o(u,16),null==n&&(n=!0),[8,16,32].indexOf(u)<0)throw new Error("Invalid number of bits specified for peaks.");var c,l,f=t.numberOfChannels,h=[];if(a=o(a,0),s=o(s,t.length),void 0===t.subarray)for(c=0;c1&&(h=function(t,e){var n,r,o=t.length,a=1/o,s=t[0].length/2,u=0,c=0,l=i(e,2*s);for(c=0;c{var e=Array.isArray,n=Object.prototype.toString;t.exports=e||function(t){return"[object Array]"===n.call(t)}},444:()=>{}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={id:r,loaded:!1,exports:{}};return t[r](o,o.exports,n),o.loaded=!0,o.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nmd=t=>(t.paths=[],t.children||(t.children=[]),t);var r={};(()=>{"use strict";n.r(r),n.d(r,{default:()=>$t,init:()=>Xt});var t=n(6146),e=n.n(t),i=n(1583),o=n.n(i),a=n(8709),s=n.n(a),u=n(542),c=n.n(u),l=n(3132),f=n.n(l),h=n(44),p=n.n(h),d=n(1072),v=n.n(d);function y(t,e){return Math.ceil(t*e)}function m(t,e,n){return t*e/n}function g(t,e,n){return Math.ceil(t*n/e)}function b(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function k(t,e){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:s()();b(this,t),this.src=e,this.ac=n,this.audioRequestState=0,this.ee=r}var e,n;return e=t,(n=[{key:"setStateChange",value:function(t){this.audioRequestState=t,this.ee.emit("audiorequeststatechange",this.audioRequestState,this.src)}},{key:"fileProgress",value:function(t){var e=0;0===this.audioRequestState&&this.setStateChange(1),t.lengthComputable&&(e=t.loaded/t.total*100),this.ee.emit("loadprogress",e,this.src)}},{key:"fileLoad",value:function(t){var e=this,n=t.target.response||t.target.result;return this.setStateChange(2),new Promise((function(t,r){e.ac.decodeAudioData(n,(function(n){e.audioBuffer=n,e.setStateChange(3),t(n)}),(function(t){r(null===t?Error("MediaDecodeAudioDataUnknownContentType"):t)}))}))}}])&&k(e.prototype,n),t}();function P(t){return(P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function x(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function T(t,e){for(var n=0;n=e.scrollLeft+o)&&(e.scrollLeft=Math.min(a,e.duration-o))}var s=g(e.scrollLeft,e.samplesPerPixel,e.sampleRate);n.scrollLeft=s}}}])&&X(e.prototype,n),t}();function Y(t,e){for(var n=0;n4&&void 0!==arguments[4]?arguments[4]:0,a=arguments.length>5?arguments[5]:void 0;J(this,t),this.duration=e,this.offset=n,this.samplesPerPixel=r,this.sampleRate=i,this.marginLeft=o,this.colors=a,this.timeinfo={2e4:{marker:3e4,bigStep:1e4,smallStep:5e3,secondStep:5},12e3:{marker:15e3,bigStep:5e3,smallStep:1e3,secondStep:1},1e4:{marker:1e4,bigStep:5e3,smallStep:1e3,secondStep:1},5e3:{marker:5e3,bigStep:1e3,smallStep:500,secondStep:.5},2500:{marker:2e3,bigStep:1e3,smallStep:500,secondStep:.5},1500:{marker:2e3,bigStep:1e3,smallStep:200,secondStep:.2},700:{marker:1e3,bigStep:500,smallStep:100,secondStep:.1}}}var e,n,r;return e=t,r=[{key:"formatTime",value:function(t){var e=t/1e3,n=e%60,r=(e-n)/60;return n<10&&(n="0".concat(n)),"".concat(r,":").concat(n)}}],(n=[{key:"getScaleInfo",value:function(t){var e=Object.keys(this.timeinfo).map((function(t){return parseInt(t,10)}));e=e.sort((function(t,e){return t-e}));for(var n=0;n=r&&(i.marker&&u%i.marker==0?(a.push(c()("div.time",{attributes:{style:"position: absolute; left: ".concat(h,"px;")}},[t.formatTime(u)])),o[h]=10):i.bigStep&&u%i.bigStep==0?o[h]=5:i.smallStep&&u%i.smallStep==0&&(o[h]=2)),u+=1e3*i.secondStep}return c()("div.playlist-time-scale",{attributes:{style:"position: relative; left: 0; right: 0; margin-left: ".concat(this.marginLeft,"px;")}},[a,c()("canvas",{attributes:{width:e,height:30,style:"position: absolute; left: 0; right: 0; top: 0; bottom: 0;"},hook:new Z(o,this.offset,this.samplesPerPixel,this.duration,this.colors)})])}}])&&K(e.prototype,n),r&&K(e,r),t}();var tt,et=n(2473),nt=n.n(et),rt=n(9052),it=n.n(rt),ot=new Uint8Array(16);function at(){if(!tt&&!(tt="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return tt(ot)}const st=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,ut=function(t){return"string"==typeof t&&st.test(t)};for(var ct=[],lt=0;lt<256;++lt)ct.push((lt+256).toString(16).substr(1));const ft=function(t,e,n){var r=(t=t||{}).random||(t.rng||at)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,e){n=n||0;for(var i=0;i<16;++i)e[n+i]=r[i];return e}return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(ct[t[e+0]]+ct[t[e+1]]+ct[t[e+2]]+ct[t[e+3]]+"-"+ct[t[e+4]]+ct[t[e+5]]+"-"+ct[t[e+6]]+ct[t[e+7]]+"-"+ct[t[e+8]]+ct[t[e+9]]+"-"+ct[t[e+10]]+ct[t[e+11]]+ct[t[e+12]]+ct[t[e+13]]+ct[t[e+14]]+ct[t[e+15]]).toLowerCase();if(!ut(n))throw TypeError("Stringified UUID is invalid");return n}(r)};var ht=n(6385),pt=n.n(ht),dt=n(9304);function vt(t,e){for(var n=0;nthis.track.getStartTime()&&ethis.track.getStartTime()&&e=t||n<=e&&r>=e){var o=tr?r:e;this.setCues(o+i,a+i),t>n&&this.setStartTime(t)}}},{key:"setStartTime",value:function(t){this.startTime=t,this.endTime=t+this.duration}},{key:"setPlayout",value:function(t){this.playout=t}},{key:"setOfflinePlayout",value:function(t){this.offlinePlayout=t}},{key:"setEnabledStates",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e={cursor:!0,fadein:!0,fadeout:!0,select:!0,shift:!0};this.enabledStates=nt()({},e,t)}},{key:"setFadeIn",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"logarithmic";if(t>this.duration)throw new Error("Invalid Fade In");var n={shape:e,start:0,end:t};this.fadeIn&&(this.removeFade(this.fadeIn),this.fadeIn=void 0),this.fadeIn=this.saveFade(dt.Y1,n.shape,n.start,n.end)}},{key:"setFadeOut",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"logarithmic";if(t>this.duration)throw new Error("Invalid Fade Out");var n={shape:e,start:this.duration-t,end:this.duration};this.fadeOut&&(this.removeFade(this.fadeOut),this.fadeOut=void 0),this.fadeOut=this.saveFade(dt.h7,n.shape,n.start,n.end)}},{key:"saveFade",value:function(t,e,n,r){var i=ft();return this.fades[i]={type:t,shape:e,start:n,end:r},i}},{key:"removeFade",value:function(t){delete this.fades[t]}},{key:"setBuffer",value:function(t){this.buffer=t}},{key:"setPeakData",value:function(t){this.peakData=t}},{key:"calculatePeaks",value:function(t,e){var n=y(this.cueIn,e),r=y(this.cueOut,e);this.setPeaks(pt()(this.buffer,t,this.peakData.mono,n,r))}},{key:"setPeaks",value:function(t){this.peaks=t}},{key:"setState",value:function(t){if(this.state=t,this.state&&this.enabledStates[this.state]){var e=kt[this.state];this.stateObj=new e(this)}else this.stateObj=void 0}},{key:"getStartTime",value:function(){return this.startTime}},{key:"getEndTime",value:function(){return this.endTime}},{key:"getDuration",value:function(){return this.duration}},{key:"isPlaying",value:function(){return this.playout.isPlaying()}},{key:"setShouldPlay",value:function(t){this.playout.setShouldPlay(t)}},{key:"setGainLevel",value:function(t){this.gain=t,this.playout.setVolumeGainLevel(t)}},{key:"setMasterGainLevel",value:function(t){this.playout.setMasterGainLevel(t)}},{key:"setStereoPanValue",value:function(t){this.stereoPan=t,this.playout.setStereoPanValue(t)}},{key:"schedulePlay",value:function(t,e,n,r){var i,o,a=t,s=n?n-e:void 0,u=nt()({},{shouldPlay:!0,masterGain:1,isOffline:!1},r),c=u.isOffline?this.offlinePlayout:this.playout;if(this.endTime<=e||s&&e+s=e?(i=0,a+=this.startTime-e,n?(s-=this.startTime-e,o=Math.min(s,this.duration)):o=this.duration):(i=e-this.startTime,o=n?Math.min(s,this.duration-i):this.duration-i),i+=this.cueIn;var l=e-this.startTime,f=c.setUpSource();return it()(this.fades,(function(e){var n,r;if(le.start&&l0&&void 0!==arguments[0]?arguments[0]:0;this.playout.stop(t)}},{key:"renderOverlay",value:function(t){var e=this,n=g(t.playlistLength,t.resolution,t.sampleRate),r={attributes:{style:"position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: ".concat(n,"px; z-index: 9;")}},i="";if(this.stateObj){this.stateObj.setup(t.resolution,t.sampleRate);var o=kt[this.state];o.getEvents().forEach((function(t){r["on".concat(t)]=e.stateObj[t].bind(e.stateObj)})),i=o.getClass()}return c()("div.playlist-overlay".concat(i),r)}},{key:"renderControls",value:function(t){var e=this,n=t.muted?".active":"",r=t.soloed?".active":"",i=t.collapsed,o=this.peaks.data.length,a=t.controls.widgets,s=c()("button.btn.btn-danger.btn-xs.track-remove",{attributes:{type:"button",title:"Remove track"},onclick:function(){e.ee.emit("removeTrack",e)}},[c()("i.fas.fa-times")]),u=c()("span",[this.name]),l=c()("button.btn.btn-info.btn-xs.track-collapse",{attributes:{type:"button",title:i?"Expand track":"Collapse track"},onclick:function(){e.ee.emit("changeTrackView",e,{collapsed:!i})}},[c()("i.fas.".concat(i?"fa-caret-down":"fa-caret-up"))]),f=[];a.remove&&f.push(s),f.push(u),a.collapse&&f.push(l);var h=[c()("div.track-header",f)];return i||(a.muteOrSolo&&h.push(c()("div.btn-group",[c()("button.btn.btn-outline-dark.btn-xs.btn-mute".concat(n),{attributes:{type:"button"},onclick:function(){e.ee.emit("mute",e)}},["Mute"]),c()("button.btn.btn-outline-dark.btn-xs.btn-solo".concat(r),{onclick:function(){e.ee.emit("solo",e)}},["Solo"])])),a.volume&&h.push(c()("label.volume",[c()("input.volume-slider",{attributes:{"aria-label":"Track volume control",type:"range",min:0,max:100,value:100},hook:new _t(this.gain),oninput:function(t){e.ee.emit("volumechange",t.target.value,e)}})])),a.stereoPan&&h.push(c()("label.stereopan",[c()("input.stereopan-slider",{attributes:{"aria-label":"Track stereo pan control",type:"range",min:-100,max:100,value:100},hook:new Rt(this.stereoPan),oninput:function(t){e.ee.emit("stereopan",t.target.value/100,e)}})]))),c()("div.controls",{attributes:{style:"height: ".concat(o*t.height,"px; width: ").concat(t.controls.width,"px; position: absolute; left: 0; z-index: 10;")}},h)}},{key:"render",value:function(t){var e=this,n=this.peaks.length,r=g(t.playbackSeconds,t.resolution,t.sampleRate),i=g(this.startTime,t.resolution,t.sampleRate),o=g(this.endTime,t.resolution,t.sampleRate),a=0,s=this.peaks.data.length,u=Math.floor(window.devicePixelRatio);r>0&&r>i&&(a=r0;){var h=Math.min(l,1e3),p=e.waveOutlineColor?e.waveOutlineColor:t.colors.waveOutlineColor;o.push(c()("canvas",{attributes:{width:h*u,height:t.height*u,style:"float: left; position: relative; margin: 0; padding: 0; z-index: 3; width: ".concat(h,"px; height: ").concat(t.height,"px;")},hook:new Pt(f,s,e.peaks.bits,p,u,t.height,t.barWidth,t.barGap)})),l-=h,s+=1e3}if(e.fadeIn){var d=e.fades[e.fadeIn],v=g(d.end-d.start,t.resolution,t.sampleRate);o.push(c()("div.wp-fade.wp-fadein",{attributes:{style:"position: absolute; height: ".concat(t.height,"px; width: ").concat(v,"px; top: 0; left: 0; z-index: 4;")}},[c()("canvas",{attributes:{width:v,height:t.height},hook:new St(d.type,d.shape,d.end-d.start,t.resolution)})]))}if(e.fadeOut){var y=e.fades[e.fadeOut],m=g(y.end-y.start,t.resolution,t.sampleRate);o.push(c()("div.wp-fade.wp-fadeout",{attributes:{style:"position: absolute; height: ".concat(t.height,"px; width: ").concat(m,"px; top: 0; right: 0; z-index: 4;")}},[c()("canvas",{attributes:{width:m,height:t.height},hook:new St(y.type,y.shape,y.end-y.start,t.resolution)})]))}return c()("div.channel.channel-".concat(r),{attributes:{style:"height: ".concat(t.height,"px; width: ").concat(n,"px; top: ").concat(r*t.height,"px; left: ").concat(i,"px; position: absolute; margin: 0; padding: 0; z-index: 1;")}},o)}));if(l.push(f),l.push(this.renderOverlay(t)),!0===t.isActive){var h=g(t.timeSelection.start,t.resolution,t.sampleRate),p=g(t.timeSelection.end,t.resolution,t.sampleRate)-h+1,d=p>1?".segment":".point";l.push(c()("div.selection".concat(d),{attributes:{style:"position: absolute; width: ".concat(p,"px; bottom: 0; top: 0; left: ").concat(h,"px; z-index: 4;")}}))}var v=c()("div.waveform",{attributes:{style:"height: ".concat(s*t.height,"px; position: relative;")}},l),y=[],m=0;t.controls.show&&(y.push(this.renderControls(t)),m=t.controls.width),y.push(v);var b=t.shouldPlay?"":".silent",k=void 0===this.customClass?"":".".concat(this.customClass);return c()("div.channel-wrapper".concat(b).concat(k),{attributes:{style:"margin-left: ".concat(m,"px; height: ").concat(t.height*s,"px;")}},y)}},{key:"getTrackDetails",value:function(){var t={src:this.src,start:this.startTime,end:this.endTime,name:this.name,customClass:this.customClass,cuein:this.cueIn,cueout:this.cueOut,stereoPan:this.stereoPan,gain:this.gain};if(this.fadeIn){var e=this.fades[this.fadeIn];t.fadeIn={shape:e.shape,duration:e.end-e.start}}if(this.fadeOut){var n=this.fades[this.fadeOut];t.fadeOut={shape:n.shape,duration:n.end-n.start}}return t}}])&&jt(e.prototype,n),t}();function At(t,e){for(var n=0;n3&&void 0!==arguments[3]?arguments[3]:"logarithmic";if(t===dt.Y1)(0,dt.L7)(this.fadeGain.gain,r,e,n);else{if(t!==dt.h7)throw new Error("Unsupported fade type");(0,dt.Mt)(this.fadeGain.gain,r,e,n)}}},{key:"applyFadeIn",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"logarithmic";this.applyFade(dt.Y1,t,e,n)}},{key:"applyFadeOut",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"logarithmic";this.applyFade(dt.h7,t,e,n)}},{key:"isPlaying",value:function(){return void 0!==this.source}},{key:"getDuration",value:function(){return this.buffer.duration}},{key:"setAudioContext",value:function(t){this.ac=t,this.ac.createStereoPanner=t.createStereoPanner||t.createPanner,this.destination=this.ac.destination}},{key:"setUpSource",value:function(){var t=this;this.source=this.ac.createBufferSource(),this.source.buffer=this.buffer;var e=new Promise((function(e){t.source.onended=function(){t.source.disconnect(),t.fadeGain.disconnect(),t.volumeGain.disconnect(),t.shouldPlayGain.disconnect(),t.panner.disconnect(),t.masterGain.disconnect(),t.source=void 0,t.fadeGain=void 0,t.volumeGain=void 0,t.shouldPlayGain=void 0,t.panner=void 0,t.masterGain=void 0,e()}}));return this.fadeGain=this.ac.createGain(),this.volumeGain=this.ac.createGain(),this.shouldPlayGain=this.ac.createGain(),this.masterGain=this.ac.createGain(),this.panner=this.ac.createStereoPanner(),this.source.connect(this.fadeGain),this.fadeGain.connect(this.volumeGain),this.volumeGain.connect(this.shouldPlayGain),this.shouldPlayGain.connect(this.masterGain),this.masterGain.connect(this.panner),this.panner.connect(this.destination),e}},{key:"setVolumeGainLevel",value:function(t){this.volumeGain&&(this.volumeGain.gain.value=t)}},{key:"setShouldPlay",value:function(t){this.shouldPlayGain&&(this.shouldPlayGain.gain.value=t?1:0)}},{key:"setMasterGainLevel",value:function(t){this.masterGain&&(this.masterGain.gain.value=t)}},{key:"setStereoPanValue",value:function(t){var e=void 0===t?0:t;this.panner&&(void 0!==this.panner.pan?this.panner.pan.value=e:(this.panner.panningModel="equalpower",this.panner.setPosition(e,0,1-Math.abs(e))))}},{key:"play",value:function(t,e,n){this.source.start(t,e,n)}},{key:"stop",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.source&&this.source.stop(t)}}])&&At(e.prototype,n),t}();function Mt(t){return{id:t.id||ft(),start:Number(t.begin)||0,end:Number(t.end)||0,lines:t.lines||[""],lang:t.language||"en"}}function It(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ft(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{};It(this,t),this.playlist=e,this.data=r,this.active=!1,this.ondragover=function(t){n.active&&(t.preventDefault(),n.emitDrag(t.clientX))}}var e,n,r;return e=t,r=[{key:"getClass",value:function(){return".shift"}},{key:"getEvents",value:function(){return["dragstart","dragend"]}}],(n=[{key:"emitDrag",value:function(t){var e=t-this.prevX;if(e){var n=m(e,this.playlist.samplesPerPixel,this.playlist.sampleRate);this.prevX=t,this.playlist.ee.emit("dragged",n,this.data)}}},{key:"complete",value:function(){this.active=!1,document.removeEventListener("dragover",this.ondragover)}},{key:"dragstart",value:function(t){var e=t;this.active=!0,this.prevX=t.clientX,e.dataTransfer.dropEffect="move",e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text/plain",""),document.addEventListener("dragover",this.ondragover)}},{key:"dragend",value:function(t){this.active&&(t.preventDefault(),this.complete())}}])&&Ft(e.prototype,n),r&&Ft(e,r),t}(),Dt=function(){};Dt.prototype.hook=function(t){var e=t.querySelector(".current");if(e){var n=t.getBoundingClientRect(),r=e.getBoundingClientRect().top-n.top;t.scrollTop+=r}};const zt=Dt;function Vt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Nt(t,e){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:[],i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],a=arguments.length>5&&void 0!==arguments[5]&&arguments[5],s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0;Vt(this,t),this.playlist=e,this.marginLeft=s,this.resizeHandlers=[],this.editable=i,this.annotations=n.map((function(t){return Mt(t)})),this.setupInteractions(),this.controls=r,this.setupEE(e.ee),this.playlist.isContinuousPlay=a,this.playlist.linkEndpoints=o,this.length=this.annotations.length}var e,n;return e=t,(n=[{key:"setupInteractions",value:function(){var t=this;this.annotations.forEach((function(e,n){var r=new Gt(t.playlist,{direction:"left",index:n}),i=new Gt(t.playlist,{direction:"right",index:n});t.resizeHandlers.push(r),t.resizeHandlers.push(i)}))}},{key:"setupEE",value:function(t){var e=this;return t.on("dragged",(function(t,n){var r=n.index,i=e.annotations,o=i[r];if("left"===n.direction){var a=o.start;o.start+=t,o.start<0&&(o.start=0),r&&i[r-1].end>o.start&&(i[r-1].end=o.start),e.playlist.linkEndpoints&&r&&i[r-1].end===a&&(i[r-1].end=o.start)}else{var s=o.end;o.end+=t,o.end>e.playlist.duration&&(o.end=e.playlist.duration),r=e.start&&t.playlist.playbackSeconds<=e.end&&(a=".current");var s={attributes:{contenteditable:!0},oninput:function(t){e.lines=[t.target.innerText]},onkeypress:function(t){13!==t.which&&13!==t.keyCode||(t.target.blur(),t.preventDefault())}},u=t.editable?s:{};return c()("div.annotation".concat(a),[c()("span.annotation-id",[e.id]),c()("span.annotation-start",[i]),c()("span.annotation-end",[o]),c()("span.annotation-lines",u,[e.lines]),c()("span.annotation-actions",t.renderControls(e,n))])})));return c()("div.annotations",[n,r])}}])&&Nt(e.prototype,n),t}();function Ut(){function t(t){for(var e,n=1/0,r=-1/0,i=0;i(e=t[i])&&(n=e),rl?l:(p+1)*r,u=e((c=t(n.subarray(o,a))).min,i),s=e(c.max,i),h[2*p]=u,h[2*p+1]=s;return h}onmessage=function(t){var e=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e4,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:8;if([8,16,32].indexOf(r)<0)throw new Error("Invalid number of bits specified for peaks.");var i=[],o=0,a=t.length;i.push(n(t.subarray(o,a),e,r));var s=i[0].length/2;return{bits:r,length:s,data:i}}(t.data.samples,t.data.samplesPerPixel);postMessage(e)}}function qt(){var t,e=0,n=[],r=[];function i(t,e,n){for(var r=0;r1&&void 0!==arguments[1]&&arguments[1],r=new ArrayBuffer(44+2*e.length),a=new DataView(r);return i(a,0,"RIFF"),a.setUint32(4,32+2*e.length,!0),i(a,8,"WAVE"),i(a,12,"fmt "),a.setUint32(16,16,!0),a.setUint16(20,1,!0),a.setUint16(22,n?1:2,!0),a.setUint32(24,t,!0),a.setUint32(28,4*t,!0),a.setUint16(32,4,!0),a.setUint16(34,16,!0),i(a,36,"data"),a.setUint32(40,2*e.length,!0),o(a,44,e),a}(function(t,e){for(var n=t.length+e.length,r=new Float32Array(n),i=0,o=0;i0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1?arguments[1]:void 0;this.timeSelection={start:t,end:void 0===e?t:e},this.cursor=t}},{key:"startOfflineRender",value:function(t){var e=this;if(!this.isRendering){this.isRendering=!0,this.offlineAudioContext=new OfflineAudioContext(2,44100*this.duration,44100);var n=this.offlineAudioContext.currentTime;this.tracks.forEach((function(t){t.setOfflinePlayout(new Lt(e.offlineAudioContext,t.buffer)),t.schedulePlay(n,0,0,{shouldPlay:e.shouldTrackPlay(t),masterGain:1,isOffline:!0})})),this.offlineAudioContext.startRendering().then((function(n){if("buffer"===t)return e.ee.emit("audiorenderingfinished",t,n),void(e.isRendering=!1);"wav"===t&&(e.exportWorker.postMessage({command:"init",config:{sampleRate:44100}}),e.exportWorker.onmessage=function(n){e.ee.emit("audiorenderingfinished",t,n.data),e.isRendering=!1,e.exportWorker.postMessage({command:"clear"})},e.exportWorker.postMessage({command:"record",buffer:[n.getChannelData(0),n.getChannelData(1)]}),e.exportWorker.postMessage({command:"exportWAV",type:"audio/wav"}))})).catch((function(t){throw t}))}}},{key:"getTimeSelection",value:function(){return this.timeSelection}},{key:"setState",value:function(t){this.state=t,this.tracks.forEach((function(e){e.setState(t)}))}},{key:"getState",value:function(){return this.state}},{key:"setZoomIndex",value:function(t){this.zoomIndex=t}},{key:"setZoomLevels",value:function(t){this.zoomLevels=t}},{key:"setZoom",value:function(t){var e=this;this.samplesPerPixel=t,this.zoomIndex=this.zoomLevels.indexOf(t),this.tracks.forEach((function(n){n.calculatePeaks(t,e.sampleRate)}))}},{key:"muteTrack",value:function(t){var e=this.mutedTracks.indexOf(t);e>-1?this.mutedTracks.splice(e,1):this.mutedTracks.push(t)}},{key:"soloTrack",value:function(t){var e=this.soloedTracks.indexOf(t);e>-1?this.soloedTracks.splice(e,1):this.exclSolo?this.soloedTracks=[t]:this.soloedTracks.push(t)}},{key:"collapseTrack",value:function(t,e){if(e.collapsed)this.collapsedTracks.push(t);else{var n=this.collapsedTracks.indexOf(t);n>-1&&this.collapsedTracks.splice(n,1)}}},{key:"removeTrack",value:function(t){t.isPlaying()&&t.scheduleStop(),[this.mutedTracks,this.soloedTracks,this.collapsedTracks,this.tracks].forEach((function(e){var n=e.indexOf(t);n>-1&&e.splice(n,1)}))}},{key:"adjustTrackPlayout",value:function(){var t=this;this.tracks.forEach((function(e){e.setShouldPlay(t.shouldTrackPlay(e))}))}},{key:"adjustDuration",value:function(){this.duration=this.tracks.reduce((function(t,e){return Math.max(t,e.getEndTime())}),0)}},{key:"shouldTrackPlay",value:function(t){var e;return this.soloedTracks.length>0?(e=!1,this.soloedTracks.indexOf(t)>-1&&(e=!0)):(e=!0,this.mutedTracks.indexOf(t)>-1&&(e=!1)),e}},{key:"isPlaying",value:function(){return this.tracks.reduce((function(t,e){return t||e.isPlaying()}),!1)}},{key:"getCurrentTime",value:function(){return(this.lastSeeked||this.pausedAt||this.cursor)+this.getElapsedTime()}},{key:"getElapsedTime",value:function(){return this.ac.currentTime-this.lastPlay}},{key:"setMasterGain",value:function(t){this.ee.emit("mastervolumechange",t)}},{key:"restartPlayFrom",value:function(t,e){return this.stopAnimation(),this.tracks.forEach((function(t){t.scheduleStop()})),Promise.all(this.playoutPromises).then(this.play.bind(this,t,e))}},{key:"play",value:function(t,e){var n=this;clearTimeout(this.resetDrawTimer);var r=this.ac.currentTime,i=this.getTimeSelection(),o=[],a=t||this.pausedAt||this.cursor,s=e;return!s&&i.end!==i.start&&i.end>a&&(s=i.end),this.isPlaying()?this.restartPlayFrom(a,s):(this.tracks.forEach((function(t){t.setState("cursor"),o.push(t.schedulePlay(r,a,s,{shouldPlay:n.shouldTrackPlay(t),masterGain:n.masterGain}))})),this.lastPlay=r,this.playoutPromises=o,this.startAnimation(a),Promise.all(this.playoutPromises))}},{key:"pause",value:function(){return this.isPlaying()?(this.pausedAt=this.getCurrentTime(),this.playbackReset()):Promise.all(this.playoutPromises)}},{key:"stop",value:function(){return this.mediaRecorder&&"recording"===this.mediaRecorder.state&&this.mediaRecorder.stop(),this.pausedAt=void 0,this.playbackSeconds=0,this.playbackReset()}},{key:"playbackReset",value:function(){var t=this;return this.lastSeeked=void 0,this.stopAnimation(),this.tracks.forEach((function(e){e.scheduleStop(),e.setState(t.getState())})),this.drawRequest(),Promise.all(this.playoutPromises)}},{key:"rewind",value:function(){var t=this;return this.stop().then((function(){t.scrollLeft=0,t.ee.emit("select",0,0)}))}},{key:"fastForward",value:function(){var t=this;return this.stop().then((function(){t.viewDuration=(this.isSegmentSelection()?r.end:this.duration)&&this.ee.emit("finished"),this.stopAnimation(),this.resetDrawTimer=setTimeout((function(){e.pausedAt=void 0,e.lastSeeked=void 0,e.setState(e.getState()),e.playbackSeconds=0,e.draw(e.render())}),0)}},{key:"drawRequest",value:function(){var t=this;window.requestAnimationFrame((function(){t.draw(t.render())}))}},{key:"draw",value:function(t){var e=f()(this.tree,t);this.rootNode=p()(this.rootNode,e),this.tree=t,this.viewDuration=m(this.rootNode.clientWidth-this.controls.width,this.samplesPerPixel,this.sampleRate)}},{key:"getTrackRenderData",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n={height:this.waveHeight,resolution:this.samplesPerPixel,sampleRate:this.sampleRate,controls:this.controls,isActive:!1,timeSelection:this.getTimeSelection(),playlistLength:this.duration,playbackSeconds:this.playbackSeconds,colors:this.colors,barWidth:this.barWidth,barGap:this.barGap};return e()({},t,n)}},{key:"isActiveTrack",value:function(t){var e=this.getActiveTrack();return!this.isSegmentSelection()||e===t}},{key:"renderAnnotations",value:function(){return this.annotationList.render()}},{key:"renderTimeScale",value:function(){var t=this.controls.show?this.controls.width:0;return new Q(this.duration,this.scrollLeft,this.samplesPerPixel,this.sampleRate,t,this.colors).render()}},{key:"renderTrackSection",value:function(){var t=this,e=this.tracks.map((function(e){var n=t.collapsedTracks.indexOf(e)>-1;return e.render(t.getTrackRenderData({isActive:t.isActiveTrack(e),shouldPlay:t.shouldTrackPlay(e),soloed:t.soloedTracks.indexOf(e)>-1,muted:t.mutedTracks.indexOf(e)>-1,collapsed:n,height:n?t.collapsedWaveHeight:t.waveHeight,barGap:t.barGap,barWidth:t.barWidth}))}));return c()("div.playlist-tracks",{attributes:{style:"overflow: auto;"},onscroll:function(e){t.scrollLeft=m(e.target.scrollLeft,t.samplesPerPixel,t.sampleRate),t.ee.emit("scroll")},hook:new $(this)},e)}},{key:"render",value:function(){var t=[];return this.showTimescale&&t.push(this.renderTimeScale()),t.push(this.renderTrackSection()),this.annotationList.length&&t.push(this.renderAnnotations()),c()("div.playlist",{attributes:{style:"overflow: hidden; position: relative;"}},t)}},{key:"getInfo",value:function(){var t=[];return this.tracks.forEach((function(e){t.push(e.getTrackDetails())})),t}}])&&Bt(n.prototype,r),t}();function Xt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s()();if(void 0===t.container)throw new Error("DOM element container must be given.");window.OfflineAudioContext=window.OfflineAudioContext||window.webkitOfflineAudioContext,window.AudioContext=window.AudioContext||window.webkitAudioContext;var r=new window.AudioContext,i={ac:r,sampleRate:r.sampleRate,samplesPerPixel:4096,mono:!0,fadeType:"logarithmic",exclSolo:!1,timescale:!1,controls:{show:!1,width:150,widgets:{muteOrSolo:!0,volume:!0,stereoPan:!0,collapse:!0,remove:!0}},colors:{waveOutlineColor:"white",timeColor:"grey",fadeColor:"black"},seekStyle:"line",waveHeight:128,collapsedWaveHeight:30,barWidth:1,barGap:0,state:"cursor",zoomLevels:[512,1024,2048,4096],annotationList:{annotations:[],controls:[],editable:!1,linkEndpoints:!1,isContinuousPlay:!1},isAutomaticScroll:!1},a=e()({},t,i),u=a.zoomLevels.indexOf(a.samplesPerPixel);if(-1===u)throw new Error("initial samplesPerPixel must be included in array zoomLevels");var c=new Ht;c.setSampleRate(a.sampleRate),c.setSamplesPerPixel(a.samplesPerPixel),c.setAudioContext(a.ac),c.setEventEmitter(n),c.setUpEventEmitter(),c.setTimeSelection(0,0),c.setState(a.state),c.setControlOptions(a.controls),c.setWaveHeight(a.waveHeight),c.setCollapsedWaveHeight(a.collapsedWaveHeight),c.setColors(a.colors),c.setZoomLevels(a.zoomLevels),c.setZoomIndex(u),c.setMono(a.mono),c.setExclSolo(a.exclSolo),c.setShowTimeScale(a.timescale),c.setSeekStyle(a.seekStyle),c.setAnnotations(a.annotationList),c.setBarGap(a.barGap),c.setBarWidth(a.barWidth),c.isAutomaticScroll=a.isAutomaticScroll,c.isContinuousPlay=a.isContinuousPlay,c.linkedEndpoints=a.linkedEndpoints;var l=c.render(),f=o()(l);return a.container.appendChild(f),c.tree=l,c.rootNode=f,c}function $t(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s()();return Xt(t,e)}})(),WaveformPlaylist=r})(); \ No newline at end of file diff --git a/dist/waveform-playlist/js/waveform-playlist.js.LICENSE.txt b/dist/waveform-playlist/js/waveform-playlist.js.LICENSE.txt new file mode 100644 index 00000000..dba0e89b --- /dev/null +++ b/dist/waveform-playlist/js/waveform-playlist.js.LICENSE.txt @@ -0,0 +1,6 @@ +/*! + * Cross-Browser Split 1.1.1 + * Copyright 2007-2012 Steven Levithan + * Available under the MIT License + * ECMAScript compliant, uniform cross-browser split method + */