@vendorflow/components 4.0.3 → 4.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.umd.js CHANGED
@@ -1,4 +1,4 @@
1
- (function(Xt,U){typeof exports=="object"&&typeof module<"u"?U(exports,require("@emotion/react"),require("@mui/material"),require("react"),require("react/jsx-runtime"),require("@emotion/styled"),require("react-dom"),require("@mui/x-date-pickers"),require("@mui/styles")):typeof define=="function"&&define.amd?define(["exports","@emotion/react","@mui/material","react","react/jsx-runtime","@emotion/styled","react-dom","@mui/x-date-pickers","@mui/styles"],U):(Xt=typeof globalThis<"u"?globalThis:Xt||self,U(Xt.Components={},Xt.react,Xt.material,Xt.React,Xt.require$$2$1,Xt.emStyled,Xt.ReactDOM,Xt.xDatePickers,Xt.styles))})(this,function(Xt,U,Se,X,zt,ty,Vu,Uu,ny){"use strict";var Sf=document.createElement("style");Sf.textContent=`.rhap_container{box-sizing:border-box;display:flex;flex-direction:column;line-height:1;font-family:inherit;width:100%;padding:10px 15px;background-color:#fff;box-shadow:0 0 3px #0003}.rhap_container:focus:not(:focus-visible){outline:0}.rhap_container svg{vertical-align:initial}.rhap_header{margin-bottom:10px}.rhap_footer{margin-top:5px}.rhap_main{display:flex;flex-direction:column;flex:1 1 auto}.rhap_stacked .rhap_controls-section{margin-top:8px}.rhap_horizontal{flex-direction:row}.rhap_horizontal .rhap_controls-section{margin-left:8px}.rhap_horizontal-reverse{flex-direction:row-reverse}.rhap_horizontal-reverse .rhap_controls-section{margin-right:8px}.rhap_stacked-reverse{flex-direction:column-reverse}.rhap_stacked-reverse .rhap_controls-section{margin-bottom:8px}.rhap_progress-section{display:flex;flex:3 1 auto;align-items:center}.rhap_progress-container{display:flex;align-items:center;height:20px;flex:1 0 auto;align-self:center;margin:0 calc(10px + 1%);cursor:pointer;user-select:none;-webkit-user-select:none}.rhap_progress-container:focus:not(:focus-visible){outline:0}.rhap_time{color:#333;font-size:16px;user-select:none;-webkit-user-select:none}.rhap_progress-bar{box-sizing:border-box;position:relative;z-index:0;width:100%;height:5px;background-color:#ddd;border-radius:2px}.rhap_progress-filled{height:100%;position:absolute;z-index:2;background-color:#868686;border-radius:2px}.rhap_progress-bar-show-download{background-color:#dddddd80}.rhap_download-progress{height:100%;position:absolute;z-index:1;background-color:#ddd;border-radius:2px}.rhap_progress-indicator{box-sizing:border-box;position:absolute;z-index:3;width:20px;height:20px;margin-left:-10px;top:-8px;background:#868686;border-radius:50px;box-shadow:#86868680 0 0 5px}.rhap_controls-section{display:flex;flex:1 1 auto;justify-content:space-between;align-items:center}.rhap_additional-controls{display:flex;flex:1 0 auto;align-items:center}.rhap_repeat-button{font-size:26px;width:26px;height:26px;color:#868686;margin-right:6px}.rhap_main-controls{flex:0 1 auto;display:flex;justify-content:center;align-items:center}.rhap_main-controls-button{margin:0 3px;color:#868686;font-size:35px;width:35px;height:35px}.rhap_play-pause-button{font-size:40px;width:40px;height:40px}.rhap_volume-controls{display:flex;flex:1 0 auto;justify-content:flex-end;align-items:center}.rhap_volume-button{flex:0 0 26px;font-size:26px;width:26px;height:26px;color:#868686;margin-right:6px}.rhap_volume-container{display:flex;align-items:center;flex:0 1 100px;user-select:none;-webkit-user-select:none}.rhap_volume-bar-area{display:flex;align-items:center;width:100%;height:14px;cursor:pointer}.rhap_volume-bar-area:focus:not(:focus-visible){outline:0}.rhap_volume-bar{box-sizing:border-box;position:relative;width:100%;height:4px;background:#ddd;border-radius:2px}.rhap_volume-indicator{box-sizing:border-box;position:absolute;width:12px;height:12px;margin-left:-6px;left:0;top:-4px;background:#868686;opacity:.9;border-radius:50px;box-shadow:#86868680 0 0 3px;cursor:pointer}.rhap_volume-indicator:hover{opacity:.9}.rhap_volume-filled{height:100%;position:absolute;z-index:2;background-color:#868686;border-radius:2px}.rhap_button-clear{background-color:transparent;border:none;padding:0;overflow:hidden;cursor:pointer}.rhap_button-clear:hover{opacity:.9;transition-duration:.2s}.rhap_button-clear:active{opacity:.95}.rhap_button-clear:focus:not(:focus-visible){outline:0}
1
+ (function(Xt,U){typeof exports=="object"&&typeof module<"u"?U(exports,require("@emotion/react"),require("@mui/material"),require("react"),require("react/jsx-runtime"),require("@emotion/styled"),require("react-dom"),require("@mui/x-date-pickers"),require("@mui/styles")):typeof define=="function"&&define.amd?define(["exports","@emotion/react","@mui/material","react","react/jsx-runtime","@emotion/styled","react-dom","@mui/x-date-pickers","@mui/styles"],U):(Xt=typeof globalThis<"u"?globalThis:Xt||self,U(Xt.Components={},Xt.react,Xt.material,Xt.React,Xt.require$$2$1,Xt.styled,Xt.ReactDOM,Xt.xDatePickers,Xt.styles))})(this,function(Xt,U,Se,X,zt,ty,Vu,Uu,ny){"use strict";var Sf=document.createElement("style");Sf.textContent=`.rhap_container{box-sizing:border-box;display:flex;flex-direction:column;line-height:1;font-family:inherit;width:100%;padding:10px 15px;background-color:#fff;box-shadow:0 0 3px #0003}.rhap_container:focus:not(:focus-visible){outline:0}.rhap_container svg{vertical-align:initial}.rhap_header{margin-bottom:10px}.rhap_footer{margin-top:5px}.rhap_main{display:flex;flex-direction:column;flex:1 1 auto}.rhap_stacked .rhap_controls-section{margin-top:8px}.rhap_horizontal{flex-direction:row}.rhap_horizontal .rhap_controls-section{margin-left:8px}.rhap_horizontal-reverse{flex-direction:row-reverse}.rhap_horizontal-reverse .rhap_controls-section{margin-right:8px}.rhap_stacked-reverse{flex-direction:column-reverse}.rhap_stacked-reverse .rhap_controls-section{margin-bottom:8px}.rhap_progress-section{display:flex;flex:3 1 auto;align-items:center}.rhap_progress-container{display:flex;align-items:center;height:20px;flex:1 0 auto;align-self:center;margin:0 calc(10px + 1%);cursor:pointer;user-select:none;-webkit-user-select:none}.rhap_progress-container:focus:not(:focus-visible){outline:0}.rhap_time{color:#333;font-size:16px;user-select:none;-webkit-user-select:none}.rhap_progress-bar{box-sizing:border-box;position:relative;z-index:0;width:100%;height:5px;background-color:#ddd;border-radius:2px}.rhap_progress-filled{height:100%;position:absolute;z-index:2;background-color:#868686;border-radius:2px}.rhap_progress-bar-show-download{background-color:#dddddd80}.rhap_download-progress{height:100%;position:absolute;z-index:1;background-color:#ddd;border-radius:2px}.rhap_progress-indicator{box-sizing:border-box;position:absolute;z-index:3;width:20px;height:20px;margin-left:-10px;top:-8px;background:#868686;border-radius:50px;box-shadow:#86868680 0 0 5px}.rhap_controls-section{display:flex;flex:1 1 auto;justify-content:space-between;align-items:center}.rhap_additional-controls{display:flex;flex:1 0 auto;align-items:center}.rhap_repeat-button{font-size:26px;width:26px;height:26px;color:#868686;margin-right:6px}.rhap_main-controls{flex:0 1 auto;display:flex;justify-content:center;align-items:center}.rhap_main-controls-button{margin:0 3px;color:#868686;font-size:35px;width:35px;height:35px}.rhap_play-pause-button{font-size:40px;width:40px;height:40px}.rhap_volume-controls{display:flex;flex:1 0 auto;justify-content:flex-end;align-items:center}.rhap_volume-button{flex:0 0 26px;font-size:26px;width:26px;height:26px;color:#868686;margin-right:6px}.rhap_volume-container{display:flex;align-items:center;flex:0 1 100px;user-select:none;-webkit-user-select:none}.rhap_volume-bar-area{display:flex;align-items:center;width:100%;height:14px;cursor:pointer}.rhap_volume-bar-area:focus:not(:focus-visible){outline:0}.rhap_volume-bar{box-sizing:border-box;position:relative;width:100%;height:4px;background:#ddd;border-radius:2px}.rhap_volume-indicator{box-sizing:border-box;position:absolute;width:12px;height:12px;margin-left:-6px;left:0;top:-4px;background:#868686;opacity:.9;border-radius:50px;box-shadow:#86868680 0 0 3px;cursor:pointer}.rhap_volume-indicator:hover{opacity:.9}.rhap_volume-filled{height:100%;position:absolute;z-index:2;background-color:#868686;border-radius:2px}.rhap_button-clear{background-color:transparent;border:none;padding:0;overflow:hidden;cursor:pointer}.rhap_button-clear:hover{opacity:.9;transition-duration:.2s}.rhap_button-clear:active{opacity:.95}.rhap_button-clear:focus:not(:focus-visible){outline:0}
2
2
  /*$vite$:1*/`,document.head.appendChild(Sf);function _f(t){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const e=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(o,n,e.get?e:{enumerable:!0,get:()=>t[n]})}}return o.default=t,Object.freeze(o)}const Ge=_f(X),ry=_f(Vu);function an(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")}function xo(t){"@babel/helpers - typeof";return xo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},xo(t)}function oy(t,o){if(xo(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var e=n.call(t,o||"default");if(xo(e)!="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(t)}function Cf(t){var o=oy(t,"string");return xo(o)=="symbol"?o:o+""}function Rf(t,o){for(var n=0;n<o.length;n++){var e=o[n];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(t,Cf(e.key),e)}}function dn(t,o,n){return o&&Rf(t.prototype,o),n&&Rf(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function ee(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ku(t,o){return Ku=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,e){return n.__proto__=e,n},Ku(t,o)}function kn(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(o&&o.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),o&&Ku(t,o)}function Dn(t,o){if(o&&(xo(o)=="object"||typeof o=="function"))return o;if(o!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ee(t)}function un(t){return un=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(o){return o.__proto__||Object.getPrototypeOf(o)},un(t)}function j(t,o,n){return(o=Cf(o))in t?Object.defineProperty(t,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[o]=n,t}const Ys=/^[a-z0-9]+(-[a-z0-9]+)*$/,ya=(t,o,n,e="")=>{const s=t.split(":");if(t.slice(0,1)==="@"){if(s.length<2||s.length>3)return null;e=s.shift().slice(1)}if(s.length>3||!s.length)return null;if(s.length>1){const c=s.pop(),p=s.pop(),d={provider:s.length>0?s[0]:e,prefix:p,name:c};return o&&!ba(d)?null:d}const a=s[0],l=a.split("-");if(l.length>1){const c={provider:e,prefix:l.shift(),name:l.join("-")};return o&&!ba(c)?null:c}if(n&&e===""){const c={provider:e,prefix:"",name:a};return o&&!ba(c,n)?null:c}return null},ba=(t,o)=>t?!!((t.provider===""||t.provider.match(Ys))&&(o&&t.prefix===""||t.prefix.match(Ys))&&t.name.match(Ys)):!1,xf=Object.freeze({left:0,top:0,width:16,height:16}),wa=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Yu=Object.freeze({...xf,...wa}),Xu=Object.freeze({...Yu,body:"",hidden:!1});function iy(t,o){const n={};!t.hFlip!=!o.hFlip&&(n.hFlip=!0),!t.vFlip!=!o.vFlip&&(n.vFlip=!0);const e=((t.rotate||0)+(o.rotate||0))%4;return e&&(n.rotate=e),n}function Tf(t,o){const n=iy(t,o);for(const e in Xu)e in wa?e in t&&!(e in n)&&(n[e]=wa[e]):e in o?n[e]=o[e]:e in t&&(n[e]=t[e]);return n}function sy(t,o){const n=t.icons,e=t.aliases||Object.create(null),s=Object.create(null);function a(l){if(n[l])return s[l]=[];if(!(l in s)){s[l]=null;const c=e[l]&&e[l].parent,p=c&&a(c);p&&(s[l]=[c].concat(p))}return s[l]}return Object.keys(n).concat(Object.keys(e)).forEach(a),s}function ly(t,o,n){const e=t.icons,s=t.aliases||Object.create(null);let a={};function l(c){a=Tf(e[c]||s[c],a)}return l(o),n.forEach(l),Tf(t,a)}function Ef(t,o){const n=[];if(typeof t!="object"||typeof t.icons!="object")return n;t.not_found instanceof Array&&t.not_found.forEach(s=>{o(s,null),n.push(s)});const e=sy(t);for(const s in e){const a=e[s];a&&(o(s,ly(t,s,a)),n.push(s))}return n}const ay={provider:"",aliases:{},not_found:{},...xf};function Ju(t,o){for(const n in o)if(n in t&&typeof t[n]!=typeof o[n])return!1;return!0}function Pf(t){if(typeof t!="object"||t===null)return null;const o=t;if(typeof o.prefix!="string"||!t.icons||typeof t.icons!="object"||!Ju(t,ay))return null;const n=o.icons;for(const s in n){const a=n[s];if(!s.match(Ys)||typeof a.body!="string"||!Ju(a,Xu))return null}const e=o.aliases||Object.create(null);for(const s in e){const a=e[s],l=a.parent;if(!s.match(Ys)||typeof l!="string"||!n[l]&&!e[l]||!Ju(a,Xu))return null}return o}const If=Object.create(null);function uy(t,o){return{provider:t,prefix:o,icons:Object.create(null),missing:new Set}}function Zo(t,o){const n=If[t]||(If[t]=Object.create(null));return n[o]||(n[o]=uy(t,o))}function Zu(t,o){return Pf(o)?Ef(o,(n,e)=>{e?t.icons[n]=e:t.missing.add(n)}):[]}function cy(t,o,n){try{if(typeof n.body=="string")return t.icons[o]={...n},!0}catch{}return!1}let Xs=!1;function Of(t){return typeof t=="boolean"&&(Xs=t),Xs}function dy(t){const o=typeof t=="string"?ya(t,!0,Xs):t;if(o){const n=Zo(o.provider,o.prefix),e=o.name;return n.icons[e]||(n.missing.has(e)?null:void 0)}}function fy(t,o){const n=ya(t,!0,Xs);if(!n)return!1;const e=Zo(n.provider,n.prefix);return cy(e,n.name,o)}function py(t,o){if(typeof t!="object")return!1;if(typeof o!="string"&&(o=t.provider||""),Xs&&!o&&!t.prefix){let s=!1;return Pf(t)&&(t.prefix="",Ef(t,(a,l)=>{l&&fy(a,l)&&(s=!0)})),s}const n=t.prefix;if(!ba({provider:o,prefix:n,name:"a"}))return!1;const e=Zo(o,n);return!!Zu(e,t)}const Af=Object.freeze({width:null,height:null}),Mf=Object.freeze({...Af,...wa}),hy=/(-?[0-9.]*[0-9]+[0-9.]*)/g,gy=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function zf(t,o,n){if(o===1)return t;if(n=n||100,typeof t=="number")return Math.ceil(t*o*n)/n;if(typeof t!="string")return t;const e=t.split(hy);if(e===null||!e.length)return t;const s=[];let a=e.shift(),l=gy.test(a);for(;;){if(l){const c=parseFloat(a);isNaN(c)?s.push(a):s.push(Math.ceil(c*o*n)/n)}else s.push(a);if(a=e.shift(),a===void 0)return s.join("");l=!l}}const my=t=>t==="unset"||t==="undefined"||t==="none";function vy(t,o){const n={...Yu,...t},e={...Mf,...o},s={left:n.left,top:n.top,width:n.width,height:n.height};let a=n.body;[n,e].forEach(O=>{const _=[],F=O.hFlip,G=O.vFlip;let V=O.rotate;F?G?V+=2:(_.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),_.push("scale(-1 1)"),s.top=s.left=0):G&&(_.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),_.push("scale(1 -1)"),s.top=s.left=0);let J;switch(V<0&&(V-=Math.floor(V/4)*4),V=V%4,V){case 1:J=s.height/2+s.top,_.unshift("rotate(90 "+J.toString()+" "+J.toString()+")");break;case 2:_.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:J=s.width/2+s.left,_.unshift("rotate(-90 "+J.toString()+" "+J.toString()+")");break}V%2===1&&(s.left!==s.top&&(J=s.left,s.left=s.top,s.top=J),s.width!==s.height&&(J=s.width,s.width=s.height,s.height=J)),_.length&&(a='<g transform="'+_.join(" ")+'">'+a+"</g>")});const l=e.width,c=e.height,p=s.width,d=s.height;let y,g;l===null?(g=c===null?"1em":c==="auto"?d:c,y=zf(g,p/d)):(y=l==="auto"?p:l,g=c===null?zf(y,d/p):c==="auto"?d:c);const w={},E=(O,_)=>{my(_)||(w[O]=_.toString())};return E("width",y),E("height",g),w.viewBox=s.left.toString()+" "+s.top.toString()+" "+p.toString()+" "+d.toString(),{attributes:w,body:a}}const yy=/\sid="(\S+)"/g,by="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let wy=0;function Sy(t,o=by){const n=[];let e;for(;e=yy.exec(t);)n.push(e[1]);if(!n.length)return t;const s="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(a=>{const l=typeof o=="function"?o(a):o+(wy++).toString(),c=a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+c+')([")]|\\.[a-z])',"g"),"$1"+l+s+"$3")}),t=t.replace(new RegExp(s,"g"),""),t}const Qu=Object.create(null);function _y(t,o){Qu[t]=o}function ec(t){return Qu[t]||Qu[""]}function tc(t){let o;if(typeof t.resources=="string")o=[t.resources];else if(o=t.resources,!(o instanceof Array)||!o.length)return null;return{resources:o,path:t.path||"/",maxURL:t.maxURL||500,rotate:t.rotate||750,timeout:t.timeout||5e3,random:t.random===!0,index:t.index||0,dataAfterTimeout:t.dataAfterTimeout!==!1}}const nc=Object.create(null),Js=["https://api.simplesvg.com","https://api.unisvg.com"],Sa=[];for(;Js.length>0;)Js.length===1||Math.random()>.5?Sa.push(Js.shift()):Sa.push(Js.pop());nc[""]=tc({resources:["https://api.iconify.design"].concat(Sa)});function Cy(t,o){const n=tc(o);return n===null?!1:(nc[t]=n,!0)}function rc(t){return nc[t]}let Lf=(()=>{let t;try{if(t=fetch,typeof t=="function")return t}catch{}})();function Ry(t,o){const n=rc(t);if(!n)return 0;let e;if(!n.maxURL)e=0;else{let s=0;n.resources.forEach(l=>{s=Math.max(s,l.length)});const a=o+".json?icons=";e=n.maxURL-s-n.path.length-a.length}return e}function xy(t){return t===404}const Ty=(t,o,n)=>{const e=[],s=Ry(t,o),a="icons";let l={type:a,provider:t,prefix:o,icons:[]},c=0;return n.forEach((p,d)=>{c+=p.length+1,c>=s&&d>0&&(e.push(l),l={type:a,provider:t,prefix:o,icons:[]},c=p.length),l.icons.push(p)}),e.push(l),e};function Ey(t){if(typeof t=="string"){const o=rc(t);if(o)return o.path}return"/"}const Py={prepare:Ty,send:(t,o,n)=>{if(!Lf){n("abort",424);return}let e=Ey(o.provider);switch(o.type){case"icons":{const a=o.prefix,c=o.icons.join(","),p=new URLSearchParams({icons:c});e+=a+".json?"+p.toString();break}case"custom":{const a=o.uri;e+=a.slice(0,1)==="/"?a.slice(1):a;break}default:n("abort",400);return}let s=503;Lf(t+e).then(a=>{const l=a.status;if(l!==200){setTimeout(()=>{n(xy(l)?"abort":"next",l)});return}return s=501,a.json()}).then(a=>{if(typeof a!="object"||a===null){setTimeout(()=>{a===404?n("abort",a):n("next",s)});return}setTimeout(()=>{n("success",a)})}).catch(()=>{n("next",s)})}};function Iy(t){const o={loaded:[],missing:[],pending:[]},n=Object.create(null);t.sort((s,a)=>s.provider!==a.provider?s.provider.localeCompare(a.provider):s.prefix!==a.prefix?s.prefix.localeCompare(a.prefix):s.name.localeCompare(a.name));let e={provider:"",prefix:"",name:""};return t.forEach(s=>{if(e.name===s.name&&e.prefix===s.prefix&&e.provider===s.provider)return;e=s;const a=s.provider,l=s.prefix,c=s.name,p=n[a]||(n[a]=Object.create(null)),d=p[l]||(p[l]=Zo(a,l));let y;c in d.icons?y=o.loaded:l===""||d.missing.has(c)?y=o.missing:y=o.pending;const g={provider:a,prefix:l,name:c};y.push(g)}),o}function kf(t,o){t.forEach(n=>{const e=n.loaderCallbacks;e&&(n.loaderCallbacks=e.filter(s=>s.id!==o))})}function Oy(t){t.pendingCallbacksFlag||(t.pendingCallbacksFlag=!0,setTimeout(()=>{t.pendingCallbacksFlag=!1;const o=t.loaderCallbacks?t.loaderCallbacks.slice(0):[];if(!o.length)return;let n=!1;const e=t.provider,s=t.prefix;o.forEach(a=>{const l=a.icons,c=l.pending.length;l.pending=l.pending.filter(p=>{if(p.prefix!==s)return!0;const d=p.name;if(t.icons[d])l.loaded.push({provider:e,prefix:s,name:d});else if(t.missing.has(d))l.missing.push({provider:e,prefix:s,name:d});else return n=!0,!0;return!1}),l.pending.length!==c&&(n||kf([t],a.id),a.callback(l.loaded.slice(0),l.missing.slice(0),l.pending.slice(0),a.abort))})}))}let Ay=0;function My(t,o,n){const e=Ay++,s=kf.bind(null,n,e);if(!o.pending.length)return s;const a={id:e,icons:o,callback:t,abort:s};return n.forEach(l=>{(l.loaderCallbacks||(l.loaderCallbacks=[])).push(a)}),s}function zy(t,o=!0,n=!1){const e=[];return t.forEach(s=>{const a=typeof s=="string"?ya(s,o,n):s;a&&e.push(a)}),e}var Ly={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function ky(t,o,n,e){const s=t.resources.length,a=t.random?Math.floor(Math.random()*s):t.index;let l;if(t.random){let te=t.resources.slice(0);for(l=[];te.length>1;){const z=Math.floor(Math.random()*te.length);l.push(te[z]),te=te.slice(0,z).concat(te.slice(z+1))}l=l.concat(te)}else l=t.resources.slice(a).concat(t.resources.slice(0,a));const c=Date.now();let p="pending",d=0,y,g=null,w=[],E=[];typeof e=="function"&&E.push(e);function O(){g&&(clearTimeout(g),g=null)}function _(){p==="pending"&&(p="aborted"),O(),w.forEach(te=>{te.status==="pending"&&(te.status="aborted")}),w=[]}function F(te,z){z&&(E=[]),typeof te=="function"&&E.push(te)}function G(){return{startTime:c,payload:o,status:p,queriesSent:d,queriesPending:w.length,subscribe:F,abort:_}}function V(){p="failed",E.forEach(te=>{te(void 0,y)})}function J(){w.forEach(te=>{te.status==="pending"&&(te.status="aborted")}),w=[]}function ue(te,z,N){const Z=z!=="success";switch(w=w.filter(oe=>oe!==te),p){case"pending":break;case"failed":if(Z||!t.dataAfterTimeout)return;break;default:return}if(z==="abort"){y=N,V();return}if(Z){y=N,w.length||(l.length?K():V());return}if(O(),J(),!t.random){const oe=t.resources.indexOf(te.resource);oe!==-1&&oe!==t.index&&(t.index=oe)}p="completed",E.forEach(oe=>{oe(N)})}function K(){if(p!=="pending")return;O();const te=l.shift();if(te===void 0){if(w.length){g=setTimeout(()=>{O(),p==="pending"&&(J(),V())},t.timeout);return}V();return}const z={status:"pending",resource:te,callback:(N,Z)=>{ue(z,N,Z)}};w.push(z),d++,g=setTimeout(K,t.rotate),n(te,o,z.callback)}return setTimeout(K),G}function Df(t){const o={...Ly,...t};let n=[];function e(){n=n.filter(c=>c().status==="pending")}function s(c,p,d){const y=ky(o,c,p,(g,w)=>{e(),d&&d(g,w)});return n.push(y),y}function a(c){return n.find(p=>c(p))||null}return{query:s,find:a,setIndex:c=>{o.index=c},getIndex:()=>o.index,cleanup:e}}function Ff(){}const oc=Object.create(null);function Dy(t){if(!oc[t]){const o=rc(t);if(!o)return;const n=Df(o),e={config:o,redundancy:n};oc[t]=e}return oc[t]}function Fy(t,o,n){let e,s;if(typeof t=="string"){const a=ec(t);if(!a)return n(void 0,424),Ff;s=a.send;const l=Dy(t);l&&(e=l.redundancy)}else{const a=tc(t);if(a){e=Df(a);const l=t.resources?t.resources[0]:"",c=ec(l);c&&(s=c.send)}}return!e||!s?(n(void 0,424),Ff):e.query(o,s,n)().abort}const Nf="iconify2",Zs="iconify",Bf=Zs+"-count",Gf=Zs+"-version",Wf=36e5,Ny=168;function ic(t,o){try{return t.getItem(o)}catch{}}function sc(t,o,n){try{return t.setItem(o,n),!0}catch{}}function Hf(t,o){try{t.removeItem(o)}catch{}}function lc(t,o){return sc(t,Bf,o.toString())}function ac(t){return parseInt(ic(t,Bf))||0}const _a={local:!0,session:!0},jf={local:new Set,session:new Set};let uc=!1;function By(t){uc=t}let Ca=typeof window>"u"?{}:window;function $f(t){const o=t+"Storage";try{if(Ca&&Ca[o]&&typeof Ca[o].length=="number")return Ca[o]}catch{}_a[t]=!1}function qf(t,o){const n=$f(t);if(!n)return;const e=ic(n,Gf);if(e!==Nf){if(e){const c=ac(n);for(let p=0;p<c;p++)Hf(n,Zs+p.toString())}sc(n,Gf,Nf),lc(n,0);return}const s=Math.floor(Date.now()/Wf)-Ny,a=c=>{const p=Zs+c.toString(),d=ic(n,p);if(typeof d=="string"){try{const y=JSON.parse(d);if(typeof y=="object"&&typeof y.cached=="number"&&y.cached>s&&typeof y.provider=="string"&&typeof y.data=="object"&&typeof y.data.prefix=="string"&&o(y,c))return!0}catch{}Hf(n,p)}};let l=ac(n);for(let c=l-1;c>=0;c--)a(c)||(c===l-1?(l--,lc(n,l)):jf[t].add(c))}function Vf(){if(!uc){By(!0);for(const t in _a)qf(t,o=>{const n=o.data,e=o.provider,s=n.prefix,a=Zo(e,s);if(!Zu(a,n).length)return!1;const l=n.lastModified||-1;return a.lastModifiedCached=a.lastModifiedCached?Math.min(a.lastModifiedCached,l):l,!0})}}function Gy(t,o){const n=t.lastModifiedCached;if(n&&n>=o)return n===o;if(t.lastModifiedCached=o,n)for(const e in _a)qf(e,s=>{const a=s.data;return s.provider!==t.provider||a.prefix!==t.prefix||a.lastModified===o});return!0}function Wy(t,o){uc||Vf();function n(e){let s;if(!_a[e]||!(s=$f(e)))return;const a=jf[e];let l;if(a.size)a.delete(l=Array.from(a).shift());else if(l=ac(s),!lc(s,l+1))return;const c={cached:Math.floor(Date.now()/Wf),provider:t.provider,data:o};return sc(s,Zs+l.toString(),JSON.stringify(c))}o.lastModified&&!Gy(t,o.lastModified)||Object.keys(o.icons).length&&(o.not_found&&(o=Object.assign({},o),delete o.not_found),n("local")||n("session"))}function Uf(){}function Hy(t){t.iconsLoaderFlag||(t.iconsLoaderFlag=!0,setTimeout(()=>{t.iconsLoaderFlag=!1,Oy(t)}))}function jy(t,o){t.iconsToLoad?t.iconsToLoad=t.iconsToLoad.concat(o).sort():t.iconsToLoad=o,t.iconsQueueFlag||(t.iconsQueueFlag=!0,setTimeout(()=>{t.iconsQueueFlag=!1;const{provider:n,prefix:e}=t,s=t.iconsToLoad;delete t.iconsToLoad;let a;if(!s||!(a=ec(n)))return;a.prepare(n,e,s).forEach(c=>{Fy(n,c,p=>{if(typeof p!="object")c.icons.forEach(d=>{t.missing.add(d)});else try{const d=Zu(t,p);if(!d.length)return;const y=t.pendingIcons;y&&d.forEach(g=>{y.delete(g)}),Wy(t,p)}catch(d){console.error(d)}Hy(t)})})}))}const $y=(t,o)=>{const n=zy(t,!0,Of()),e=Iy(n);if(!e.pending.length){let p=!0;return o&&setTimeout(()=>{p&&o(e.loaded,e.missing,e.pending,Uf)}),()=>{p=!1}}const s=Object.create(null),a=[];let l,c;return e.pending.forEach(p=>{const{provider:d,prefix:y}=p;if(y===c&&d===l)return;l=d,c=y,a.push(Zo(d,y));const g=s[d]||(s[d]=Object.create(null));g[y]||(g[y]=[])}),e.pending.forEach(p=>{const{provider:d,prefix:y,name:g}=p,w=Zo(d,y),E=w.pendingIcons||(w.pendingIcons=new Set);E.has(g)||(E.add(g),s[d][y].push(g))}),a.forEach(p=>{const{provider:d,prefix:y}=p;s[d][y].length&&jy(p,s[d][y])}),o?My(o,e,a):Uf};function qy(t,o){const n={...t};for(const e in o){const s=o[e],a=typeof s;e in Af?(s===null||s&&(a==="string"||a==="number"))&&(n[e]=s):a===typeof n[e]&&(n[e]=e==="rotate"?s%4:s)}return n}const Vy=/[\s,]+/;function Uy(t,o){o.split(Vy).forEach(n=>{switch(n.trim()){case"horizontal":t.hFlip=!0;break;case"vertical":t.vFlip=!0;break}})}function Ky(t,o=0){const n=t.replace(/^-?[0-9.]*/,"");function e(s){for(;s<0;)s+=4;return s%4}if(n===""){const s=parseInt(t);return isNaN(s)?0:e(s)}else if(n!==t){let s=0;switch(n){case"%":s=25;break;case"deg":s=90}if(s){let a=parseFloat(t.slice(0,t.length-n.length));return isNaN(a)?0:(a=a/s,a%1===0?e(a):0)}}return o}function Yy(t,o){let n=t.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const e in o)n+=" "+e+'="'+o[e]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+t+"</svg>"}function Xy(t){return t.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Jy(t){return"data:image/svg+xml,"+Xy(t)}function Zy(t){return'url("'+Jy(t)+'")'}let Qs;function Qy(){try{Qs=window.trustedTypes.createPolicy("iconify",{createHTML:t=>t})}catch{Qs=null}}function eb(t){return Qs===void 0&&Qy(),Qs?Qs.createHTML(t):t}const Kf={...Mf,inline:!1},tb={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},nb={display:"inline-block"},cc={backgroundColor:"currentColor"},Yf={backgroundColor:"transparent"},Xf={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},Jf={WebkitMask:cc,mask:cc,background:Yf};for(const t in Jf){const o=Jf[t];for(const n in Xf)o[t+n]=Xf[n]}const rb={...Kf,inline:!0};function Zf(t){return t+(t.match(/^[-0-9.]+$/)?"px":"")}const ob=(t,o,n,e)=>{const s=n?rb:Kf,a=qy(s,o),l=o.mode||"svg",c={},p=o.style||{},d={...l==="svg"?tb:{},ref:e};for(let G in o){const V=o[G];if(V!==void 0)switch(G){case"icon":case"style":case"children":case"onLoad":case"mode":case"_ref":case"_inline":break;case"inline":case"hFlip":case"vFlip":a[G]=V===!0||V==="true"||V===1;break;case"flip":typeof V=="string"&&Uy(a,V);break;case"color":c.color=V;break;case"rotate":typeof V=="string"?a[G]=Ky(V):typeof V=="number"&&(a[G]=V);break;case"ariaHidden":case"aria-hidden":V!==!0&&V!=="true"&&delete d["aria-hidden"];break;default:s[G]===void 0&&(d[G]=V)}}const y=vy(t,a),g=y.attributes;if(a.inline&&(c.verticalAlign="-0.125em"),l==="svg"){d.style={...c,...p},Object.assign(d,g);let G=0,V=o.id;return typeof V=="string"&&(V=V.replace(/-/g,"_")),d.dangerouslySetInnerHTML={__html:eb(Sy(y.body,V?()=>V+"ID"+G++:"iconifyReact"))},X.createElement("svg",d)}const{body:w,width:E,height:O}=t,_=l==="mask"||(l==="bg"?!1:w.indexOf("currentColor")!==-1),F=Yy(w,{...g,width:E+"",height:O+""});return d.style={...c,"--svg":Zy(F),width:Zf(g.width),height:Zf(g.height),...nb,..._?cc:Yf,...p},X.createElement("span",d)};if(Of(!0),_y("",Py),typeof document<"u"&&typeof window<"u"){Vf();const t=window;if(t.IconifyPreload!==void 0){const o=t.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof o=="object"&&o!==null&&(o instanceof Array?o:[o]).forEach(e=>{try{(typeof e!="object"||e===null||e instanceof Array||typeof e.icons!="object"||typeof e.prefix!="string"||!py(e))&&console.error(n)}catch{console.error(n)}})}if(t.IconifyProviders!==void 0){const o=t.IconifyProviders;if(typeof o=="object"&&o!==null)for(let n in o){const e="IconifyProviders["+n+"] is invalid.";try{const s=o[n];if(typeof s!="object"||!s||s.resources===void 0)continue;Cy(n,s)||console.error(e)}catch{console.error(e)}}}}class Qf extends X.Component{constructor(o){super(o),this.state={icon:null}}_abortLoading(){this._loading&&(this._loading.abort(),this._loading=null)}_setData(o){this.state.icon!==o&&this.setState({icon:o})}_checkIcon(o){const n=this.state,e=this.props.icon;if(typeof e=="object"&&e!==null&&typeof e.body=="string"){this._icon="",this._abortLoading(),(o||n.icon===null)&&this._setData({data:e});return}let s;if(typeof e!="string"||(s=ya(e,!1,!0))===null){this._abortLoading(),this._setData(null);return}const a=dy(s);if(!a){(!this._loading||this._loading.name!==e)&&(this._abortLoading(),this._icon="",this._setData(null),a!==null&&(this._loading={name:e,abort:$y([s],this._checkIcon.bind(this,!1))}));return}if(this._icon!==e||n.icon===null){this._abortLoading(),this._icon=e;const l=["iconify"];s.prefix!==""&&l.push("iconify--"+s.prefix),s.provider!==""&&l.push("iconify--"+s.provider),this._setData({data:a,classes:l}),this.props.onLoad&&this.props.onLoad(e)}}componentDidMount(){this._checkIcon(!1)}componentDidUpdate(o){o.icon!==this.props.icon&&this._checkIcon(!0)}componentWillUnmount(){this._abortLoading()}render(){const o=this.props,n=this.state.icon;if(n===null)return o.children?o.children:X.createElement("span",{});let e=o;return n.classes&&(e={...o,className:(typeof o.className=="string"?o.className+" ":"")+n.classes.join(" ")}),ob({...Yu,...n.data},e,o._inline,o._ref)}}const Nr=X.forwardRef(function(o,n){const e={...o,_ref:n,_inline:!1};return X.createElement(Qf,e)});X.forwardRef(function(o,n){const e={...o,_ref:n,_inline:!0};return X.createElement(Qf,e)});function Lt(){return Lt=Object.assign?Object.assign.bind():function(t){for(var o=1;o<arguments.length;o++){var n=arguments[o];for(var e in n)({}).hasOwnProperty.call(n,e)&&(t[e]=n[e])}return t},Lt.apply(null,arguments)}var ib=function(o){switch(o){case"stacked":return"rhap_stacked";case"stacked-reverse":return"rhap_stacked-reverse";case"horizontal":return"rhap_horizontal";case"horizontal-reverse":return"rhap_horizontal-reverse";default:return"rhap_stacked"}},ep=function(o){return o instanceof MouseEvent?o.clientX:o.touches[0].clientX},dc=function(o){return o>9?o.toString():"0".concat(o)},ji=function(o,n,e){if(!isFinite(o))return null;var s=Math.floor(o/60),a=dc(s),l=dc(Math.floor(o%60)),c=dc(Math.floor(s%60)),p=Math.floor(s/60),d="".concat(a,":").concat(l),y="".concat(p,":").concat(c,":").concat(l);if(e==="auto")return n>=3600?y:d;if(e==="mm:ss")return d;if(e==="hh:mm:ss")return y};function tp(t,o){var n=!1;return function(e){n||(t(e),n=!0,setTimeout(function(){return n=!1},o))}}function sb(t){var o=lb();return function(){var e=un(t),s;if(o){var a=un(this).constructor;s=Reflect.construct(e,arguments,a)}else s=e.apply(this,arguments);return Dn(this,s)}}function lb(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var ab=function(t){kn(n,t);var o=sb(n);function n(){var e;an(this,n);for(var s=arguments.length,a=new Array(s),l=0;l<s;l++)a[l]=arguments[l];return e=o.call.apply(o,[this].concat(a)),j(ee(e),"audio",void 0),j(ee(e),"timeOnMouseMove",0),j(ee(e),"hasAddedAudioEventListener",!1),j(ee(e),"downloadProgressAnimationTimer",void 0),j(ee(e),"state",{isDraggingProgress:!1,currentTimePos:"0%",hasDownloadProgressAnimation:!1,downloadProgressArr:[],waitingForSeekCallback:!1}),j(ee(e),"getCurrentProgress",function(c){var p=e.props,d=p.audio,y=p.progressBar,g=d.src.indexOf("blob:")!==0&&typeof e.props.srcDuration>"u";if(g&&(!d.src||!isFinite(d.currentTime)||!y.current))return{currentTime:0,currentTimePos:"0%"};var w=y.current.getBoundingClientRect(),E=w.width,O=ep(c)-w.left;O<0?O=0:O>E&&(O=E);var _=e.getDuration(),F=_*O/E;return{currentTime:F,currentTimePos:"".concat((O/E*100).toFixed(2),"%")}}),j(ee(e),"handleContextMenu",function(c){c.preventDefault()}),j(ee(e),"handleMouseDownOrTouchStartProgressBar",function(c){c.stopPropagation();var p=e.getCurrentProgress(c.nativeEvent),d=p.currentTime,y=p.currentTimePos;isFinite(d)&&(e.timeOnMouseMove=d,e.setState({isDraggingProgress:!0,currentTimePos:y}),c.nativeEvent instanceof MouseEvent?(window.addEventListener("mousemove",e.handleWindowMouseOrTouchMove),window.addEventListener("mouseup",e.handleWindowMouseOrTouchUp)):(window.addEventListener("touchmove",e.handleWindowMouseOrTouchMove),window.addEventListener("touchend",e.handleWindowMouseOrTouchUp)))}),j(ee(e),"handleWindowMouseOrTouchMove",function(c){c instanceof MouseEvent&&c.preventDefault(),c.stopPropagation();var p=window.getSelection();p&&p.type==="Range"&&p.empty();var d=e.state.isDraggingProgress;if(d){var y=e.getCurrentProgress(c),g=y.currentTime,w=y.currentTimePos;e.timeOnMouseMove=g,e.setState({currentTimePos:w})}}),j(ee(e),"handleWindowMouseOrTouchUp",function(c){c.stopPropagation();var p=e.timeOnMouseMove,d=e.props,y=d.audio,g=d.onChangeCurrentTimeError,w=d.onSeek;if(w)e.setState({isDraggingProgress:!1,waitingForSeekCallback:!0},function(){w(y,p).then(function(){return e.setState({waitingForSeekCallback:!1})},function(O){throw new Error(O)})});else{var E={isDraggingProgress:!1};if(y.readyState===y.HAVE_NOTHING||y.readyState===y.HAVE_METADATA||!isFinite(p))try{y.load()}catch(O){return E.currentTimePos="0%",g&&g(O)}y.currentTime=p,e.setState(E)}c instanceof MouseEvent?(window.removeEventListener("mousemove",e.handleWindowMouseOrTouchMove),window.removeEventListener("mouseup",e.handleWindowMouseOrTouchUp)):(window.removeEventListener("touchmove",e.handleWindowMouseOrTouchMove),window.removeEventListener("touchend",e.handleWindowMouseOrTouchUp))}),j(ee(e),"handleAudioTimeUpdate",tp(function(c){var p=e.state.isDraggingProgress,d=c.target;if(!(p||e.state.waitingForSeekCallback===!0)){var y=d.currentTime,g=e.getDuration();e.setState({currentTimePos:"".concat((y/g*100||0).toFixed(2),"%")})}},e.props.progressUpdateInterval)),j(ee(e),"handleAudioDownloadProgressUpdate",function(c){for(var p=c.target,d=e.getDuration(),y=[],g=0;g<p.buffered.length;g++){var w=p.buffered.start(g),E=p.buffered.end(g);y.push({left:"".concat(Math.round(100/d*w)||0,"%"),width:"".concat(Math.round(100/d*(E-w))||0,"%")})}clearTimeout(e.downloadProgressAnimationTimer),e.setState({downloadProgressArr:y,hasDownloadProgressAnimation:!0}),e.downloadProgressAnimationTimer=setTimeout(function(){e.setState({hasDownloadProgressAnimation:!1})},200)}),e}return dn(n,[{key:"getDuration",value:function(){var s=this.props,a=s.audio,l=s.srcDuration;return typeof l>"u"?a.duration:l}},{key:"initialize",value:function(){var s=this.props.audio;s&&!this.hasAddedAudioEventListener&&(this.audio=s,this.hasAddedAudioEventListener=!0,s.addEventListener("timeupdate",this.handleAudioTimeUpdate),s.addEventListener("progress",this.handleAudioDownloadProgressUpdate))}},{key:"componentDidMount",value:function(){this.initialize()}},{key:"componentDidUpdate",value:function(){this.initialize()}},{key:"componentWillUnmount",value:function(){this.audio&&this.hasAddedAudioEventListener&&(this.audio.removeEventListener("timeupdate",this.handleAudioTimeUpdate),this.audio.removeEventListener("progress",this.handleAudioDownloadProgressUpdate)),clearTimeout(this.downloadProgressAnimationTimer)}},{key:"render",value:function(){var s=this.props,a=s.showDownloadProgress,l=s.showFilledProgress,c=s.progressBar,p=s.i18nProgressBar,d=this.state,y=d.currentTimePos,g=d.downloadProgressArr,w=d.hasDownloadProgressAnimation;return X.createElement("div",{className:"rhap_progress-container",ref:c,"aria-label":p,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Number(y.split("%")[0]),tabIndex:0,onMouseDown:this.handleMouseDownOrTouchStartProgressBar,onTouchStart:this.handleMouseDownOrTouchStartProgressBar,onContextMenu:this.handleContextMenu},X.createElement("div",{className:"rhap_progress-bar ".concat(a?"rhap_progress-bar-show-download":"")},X.createElement("div",{className:"rhap_progress-indicator",style:{left:y}}),l&&X.createElement("div",{className:"rhap_progress-filled",style:{width:y}}),a&&g.map(function(E,O){var _=E.left,F=E.width;return X.createElement("div",{key:O,className:"rhap_download-progress",style:{left:_,width:F,transitionDuration:w?".2s":"0s"}})})))}}]),n}(X.Component),ub=function(o,n){return X.createElement(ab,Lt({},o,{progressBar:n}))};const cb=X.forwardRef(ub);function db(t){var o=fb();return function(){var e=un(t),s;if(o){var a=un(this).constructor;s=Reflect.construct(e,arguments,a)}else s=e.apply(this,arguments);return Dn(this,s)}}function fb(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var np=function(t){kn(n,t);var o=db(n);function n(e){var s;an(this,n),s=o.call(this,e),j(ee(s),"audio",void 0),j(ee(s),"hasAddedAudioEventListener",!1),j(ee(s),"state",{currentTime:s.props.defaultCurrentTime}),j(ee(s),"handleAudioCurrentTimeChange",function(y){var g=y.target,w=s.props,E=w.isLeftTime,O=w.timeFormat,_=w.defaultCurrentTime;s.setState({currentTime:ji(E?g.duration-g.currentTime:g.currentTime,g.duration,O)||_})}),j(ee(s),"addAudioEventListeners",function(){var y=s.props.audio;y&&!s.hasAddedAudioEventListener&&(s.audio=y,s.hasAddedAudioEventListener=!0,y.addEventListener("timeupdate",s.handleAudioCurrentTimeChange),y.addEventListener("loadedmetadata",s.handleAudioCurrentTimeChange))});var a=e.audio,l=e.defaultCurrentTime,c=e.isLeftTime,p=e.timeFormat,d=l;return a&&(d=ji(c?a.duration-a.currentTime:a.currentTime,a.duration,p)),s.state={currentTime:d},s}return dn(n,[{key:"componentDidMount",value:function(){this.addAudioEventListeners()}},{key:"componentDidUpdate",value:function(){this.addAudioEventListeners()}},{key:"componentWillUnmount",value:function(){this.audio&&this.hasAddedAudioEventListener&&(this.audio.removeEventListener("timeupdate",this.handleAudioCurrentTimeChange),this.audio.removeEventListener("loadedmetadata",this.handleAudioCurrentTimeChange))}},{key:"render",value:function(){return this.state.currentTime}}]),n}(X.PureComponent);function pb(t){var o=hb();return function(){var e=un(t),s;if(o){var a=un(this).constructor;s=Reflect.construct(e,arguments,a)}else s=e.apply(this,arguments);return Dn(this,s)}}function hb(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var gb=function(t){kn(n,t);var o=pb(n);function n(e){var s;an(this,n),s=o.call(this,e),j(ee(s),"audio",void 0),j(ee(s),"hasAddedAudioEventListener",!1),j(ee(s),"state",{duration:s.props.audio?ji(s.props.audio.duration,s.props.audio.duration,s.props.timeFormat):s.props.defaultDuration}),j(ee(s),"handleAudioDurationChange",function(p){var d=p.target,y=s.props,g=y.timeFormat,w=y.defaultDuration;s.setState({duration:ji(d.duration,d.duration,g)||w})}),j(ee(s),"addAudioEventListeners",function(){var p=s.props.audio;p&&!s.hasAddedAudioEventListener&&(s.audio=p,s.hasAddedAudioEventListener=!0,p.addEventListener("durationchange",s.handleAudioDurationChange),p.addEventListener("abort",s.handleAudioDurationChange))});var a=e.audio,l=e.timeFormat,c=e.defaultDuration;return s.state={duration:a?ji(a.duration,a.duration,l):c},s}return dn(n,[{key:"componentDidMount",value:function(){this.addAudioEventListeners()}},{key:"componentDidUpdate",value:function(){this.addAudioEventListeners()}},{key:"componentWillUnmount",value:function(){this.audio&&this.hasAddedAudioEventListener&&(this.audio.removeEventListener("durationchange",this.handleAudioDurationChange),this.audio.removeEventListener("abort",this.handleAudioDurationChange))}},{key:"render",value:function(){return this.state.duration}}]),n}(X.PureComponent);function mb(t){var o=vb();return function(){var e=un(t),s;if(o){var a=un(this).constructor;s=Reflect.construct(e,arguments,a)}else s=e.apply(this,arguments);return Dn(this,s)}}function vb(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var yb=function(t){kn(n,t);var o=mb(n);function n(){var e;an(this,n);for(var s=arguments.length,a=new Array(s),l=0;l<s;l++)a[l]=arguments[l];return e=o.call.apply(o,[this].concat(a)),j(ee(e),"audio",void 0),j(ee(e),"hasAddedAudioEventListener",!1),j(ee(e),"volumeBar",X.createRef()),j(ee(e),"volumeAnimationTimer",0),j(ee(e),"lastVolume",e.props.volume),j(ee(e),"state",{currentVolumePos:"".concat((e.lastVolume/1*100||0).toFixed(2),"%"),hasVolumeAnimation:!1,isDraggingVolume:!1}),j(ee(e),"getCurrentVolume",function(c){var p=e.props.audio;if(!e.volumeBar.current)return{currentVolume:p.volume,currentVolumePos:e.state.currentVolumePos};var d=e.volumeBar.current.getBoundingClientRect(),y=d.width,g=ep(c)-d.left,w,E;return g<0?(w=0,E="0%"):g>d.width?(w=1,E="100%"):(w=g/y,E="".concat(g/y*100,"%")),{currentVolume:w,currentVolumePos:E}}),j(ee(e),"handleContextMenu",function(c){c.preventDefault()}),j(ee(e),"handleClickVolumeButton",function(){var c=e.props.audio;c.volume>0?(e.lastVolume=c.volume,c.volume=0):c.volume=e.lastVolume}),j(ee(e),"handleVolumnControlMouseOrTouchDown",function(c){c.stopPropagation();var p=e.props.audio,d=e.getCurrentVolume(c.nativeEvent),y=d.currentVolume,g=d.currentVolumePos;p.volume=y,e.setState({isDraggingVolume:!0,currentVolumePos:g}),c.nativeEvent instanceof MouseEvent?(window.addEventListener("mousemove",e.handleWindowMouseOrTouchMove),window.addEventListener("mouseup",e.handleWindowMouseOrTouchUp)):(window.addEventListener("touchmove",e.handleWindowMouseOrTouchMove),window.addEventListener("touchend",e.handleWindowMouseOrTouchUp))}),j(ee(e),"handleWindowMouseOrTouchMove",function(c){c instanceof MouseEvent&&c.preventDefault(),c.stopPropagation();var p=e.props.audio,d=window.getSelection();d&&d.type==="Range"&&d.empty();var y=e.state.isDraggingVolume;if(y){var g=e.getCurrentVolume(c),w=g.currentVolume,E=g.currentVolumePos;p.volume=w,e.setState({currentVolumePos:E})}}),j(ee(e),"handleWindowMouseOrTouchUp",function(c){c.stopPropagation(),e.setState({isDraggingVolume:!1}),c instanceof MouseEvent?(window.removeEventListener("mousemove",e.handleWindowMouseOrTouchMove),window.removeEventListener("mouseup",e.handleWindowMouseOrTouchUp)):(window.removeEventListener("touchmove",e.handleWindowMouseOrTouchMove),window.removeEventListener("touchend",e.handleWindowMouseOrTouchUp))}),j(ee(e),"handleAudioVolumeChange",function(c){var p=e.state.isDraggingVolume,d=c.target,y=d.volume;(e.lastVolume>0&&y===0||e.lastVolume===0&&y>0)&&e.props.onMuteChange(),e.lastVolume=y,!p&&(e.setState({hasVolumeAnimation:!0,currentVolumePos:"".concat((y/1*100||0).toFixed(2),"%")}),clearTimeout(e.volumeAnimationTimer),e.volumeAnimationTimer=setTimeout(function(){e.setState({hasVolumeAnimation:!1})},100))}),e}return dn(n,[{key:"componentDidUpdate",value:function(){var s=this.props.audio;s&&!this.hasAddedAudioEventListener&&(this.audio=s,this.hasAddedAudioEventListener=!0,s.addEventListener("volumechange",this.handleAudioVolumeChange))}},{key:"componentWillUnmount",value:function(){this.audio&&this.hasAddedAudioEventListener&&this.audio.removeEventListener("volumechange",this.handleAudioVolumeChange),clearTimeout(this.volumeAnimationTimer)}},{key:"render",value:function(){var s=this.props,a=s.audio,l=s.showFilledVolume,c=s.i18nVolumeControl,p=this.state,d=p.currentVolumePos,y=p.hasVolumeAnimation,g=a||{},w=g.volume;return X.createElement("div",{ref:this.volumeBar,onMouseDown:this.handleVolumnControlMouseOrTouchDown,onTouchStart:this.handleVolumnControlMouseOrTouchDown,onContextMenu:this.handleContextMenu,role:"progressbar","aria-label":c,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Number((w*100).toFixed(0)),tabIndex:0,className:"rhap_volume-bar-area"},X.createElement("div",{className:"rhap_volume-bar"},X.createElement("div",{className:"rhap_volume-indicator",style:{left:d,transitionDuration:y?".1s":"0s"}}),l&&X.createElement("div",{className:"rhap_volume-filled",style:{width:d}})))}}]),n}(X.Component),fn;(function(t){t.CURRENT_TIME="CURRENT_TIME",t.CURRENT_LEFT_TIME="CURRENT_LEFT_TIME",t.PROGRESS_BAR="PROGRESS_BAR",t.DURATION="DURATION",t.ADDITIONAL_CONTROLS="ADDITIONAL_CONTROLS",t.MAIN_CONTROLS="MAIN_CONTROLS",t.VOLUME_CONTROLS="VOLUME_CONTROLS",t.LOOP="LOOP",t.VOLUME="VOLUME"})(fn||(fn={}));function bb(t){var o=wb();return function(){var e=un(t),s;if(o){var a=un(this).constructor;s=Reflect.construct(e,arguments,a)}else s=e.apply(this,arguments);return Dn(this,s)}}function wb(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var rp=function(t){kn(n,t);var o=bb(n);function n(){var e;an(this,n);for(var s=arguments.length,a=new Array(s),l=0;l<s;l++)a[l]=arguments[l];return e=o.call.apply(o,[this].concat(a)),j(ee(e),"audio",X.createRef()),j(ee(e),"progressBar",X.createRef()),j(ee(e),"container",X.createRef()),j(ee(e),"lastVolume",e.props.volume),j(ee(e),"listenTracker",void 0),j(ee(e),"volumeAnimationTimer",void 0),j(ee(e),"downloadProgressAnimationTimer",void 0),j(ee(e),"togglePlay",function(c){c.stopPropagation();var p=e.audio.current;(p.paused||p.ended)&&p.src?e.playAudioPromise():p.paused||p.pause()}),j(ee(e),"playAudioPromise",function(){e.audio.current.error&&e.audio.current.load();var c=e.audio.current.play();c?c.then(null).catch(function(p){var d=e.props.onPlayError;d&&d(new Error(p))}):e.forceUpdate()}),j(ee(e),"isPlaying",function(){var c=e.audio.current;return c?!c.paused&&!c.ended:!1}),j(ee(e),"handlePlay",function(c){e.forceUpdate(),e.props.onPlay&&e.props.onPlay(c)}),j(ee(e),"handlePause",function(c){e.audio&&(e.forceUpdate(),e.props.onPause&&e.props.onPause(c))}),j(ee(e),"handleEnded",function(c){e.audio&&(e.forceUpdate(),e.props.onEnded&&e.props.onEnded(c))}),j(ee(e),"handleAbort",function(c){e.props.onAbort&&e.props.onAbort(c)}),j(ee(e),"handleClickVolumeButton",function(){var c=e.audio.current;c.volume>0?(e.lastVolume=c.volume,c.volume=0):c.volume=e.lastVolume}),j(ee(e),"handleMuteChange",function(){e.forceUpdate()}),j(ee(e),"handleClickLoopButton",function(){e.audio.current.loop=!e.audio.current.loop,e.forceUpdate()}),j(ee(e),"handleClickRewind",function(){var c=e.props,p=c.progressJumpSteps,d=c.progressJumpStep,y=p.backward||d;e.setJumpTime(-y)}),j(ee(e),"handleClickForward",function(){var c=e.props,p=c.progressJumpSteps,d=c.progressJumpStep,y=p.forward||d;e.setJumpTime(y)}),j(ee(e),"setJumpTime",function(c){var p=e.audio.current,d=p.duration,y=p.currentTime;if(p.readyState===p.HAVE_NOTHING||p.readyState===p.HAVE_METADATA||!isFinite(d)||!isFinite(y))try{p.load()}catch(w){return e.props.onChangeCurrentTimeError&&e.props.onChangeCurrentTimeError(w)}var g=y+c/1e3;g<0?(p.currentTime=0,g=0):g>d?(p.currentTime=d,g=d):p.currentTime=g}),j(ee(e),"setJumpVolume",function(c){var p=e.audio.current.volume+c;p<0?p=0:p>1&&(p=1),e.audio.current.volume=p}),j(ee(e),"handleKeyDown",function(c){if(e.props.hasDefaultKeyBindings)switch(c.key){case" ":(c.target===e.container.current||c.target===e.progressBar.current)&&(c.preventDefault(),e.togglePlay(c));break;case"ArrowLeft":e.handleClickRewind();break;case"ArrowRight":e.handleClickForward();break;case"ArrowUp":c.preventDefault(),e.setJumpVolume(e.props.volumeJumpStep);break;case"ArrowDown":c.preventDefault(),e.setJumpVolume(-e.props.volumeJumpStep);break;case"l":e.handleClickLoopButton();break;case"m":e.handleClickVolumeButton();break}}),j(ee(e),"renderUIModules",function(c){return c.map(function(p,d){return e.renderUIModule(p,d)})}),j(ee(e),"renderUIModule",function(c,p){var d=e.props,y=d.defaultCurrentTime,g=d.progressUpdateInterval,w=d.showDownloadProgress,E=d.showFilledProgress,O=d.showFilledVolume,_=d.defaultDuration,F=d.customIcons,G=d.showSkipControls,V=d.onClickPrevious,J=d.onClickNext,ue=d.onChangeCurrentTimeError,K=d.showJumpControls,te=d.customAdditionalControls,z=d.customVolumeControls,N=d.muted,Z=d.timeFormat,oe=d.volume,be=d.loop,_e=d.mse,Ce=d.i18nAriaLabels;switch(c){case fn.CURRENT_TIME:return X.createElement("div",{key:p,id:"rhap_current-time",className:"rhap_time rhap_current-time"},X.createElement(np,{audio:e.audio.current,isLeftTime:!1,defaultCurrentTime:y,timeFormat:Z}));case fn.CURRENT_LEFT_TIME:return X.createElement("div",{key:p,id:"rhap_current-left-time",className:"rhap_time rhap_current-left-time"},X.createElement(np,{audio:e.audio.current,isLeftTime:!0,defaultCurrentTime:y,timeFormat:Z}));case fn.PROGRESS_BAR:return X.createElement(cb,{key:p,ref:e.progressBar,audio:e.audio.current,progressUpdateInterval:g,showDownloadProgress:w,showFilledProgress:E,onSeek:_e&&_e.onSeek,onChangeCurrentTimeError:ue,srcDuration:_e&&_e.srcDuration,i18nProgressBar:Ce.progressControl});case fn.DURATION:return X.createElement("div",{key:p,className:"rhap_time rhap_total-time"},_e&&_e.srcDuration?ji(_e.srcDuration,_e.srcDuration,e.props.timeFormat):X.createElement(gb,{audio:e.audio.current,defaultDuration:_,timeFormat:Z}));case fn.ADDITIONAL_CONTROLS:return X.createElement("div",{key:p,className:"rhap_additional-controls"},e.renderUIModules(te));case fn.MAIN_CONTROLS:{var Ye=e.isPlaying(),Ue;return Ye?Ue=F.pause?F.pause:X.createElement(Nr,{icon:"mdi:pause-circle"}):Ue=F.play?F.play:X.createElement(Nr,{icon:"mdi:play-circle"}),X.createElement("div",{key:p,className:"rhap_main-controls"},G&&X.createElement("button",{"aria-label":Ce.previous,className:"rhap_button-clear rhap_main-controls-button rhap_skip-button",type:"button",onClick:V},F.previous?F.previous:X.createElement(Nr,{icon:"mdi:skip-previous"})),K&&X.createElement("button",{"aria-label":Ce.rewind,className:"rhap_button-clear rhap_main-controls-button rhap_rewind-button",type:"button",onClick:e.handleClickRewind},F.rewind?F.rewind:X.createElement(Nr,{icon:"mdi:rewind"})),X.createElement("button",{"aria-label":Ye?Ce.pause:Ce.play,className:"rhap_button-clear rhap_main-controls-button rhap_play-pause-button",type:"button",onClick:e.togglePlay},Ue),K&&X.createElement("button",{"aria-label":Ce.forward,className:"rhap_button-clear rhap_main-controls-button rhap_forward-button",type:"button",onClick:e.handleClickForward},F.forward?F.forward:X.createElement(Nr,{icon:"mdi:fast-forward"})),G&&X.createElement("button",{"aria-label":Ce.next,className:"rhap_button-clear rhap_main-controls-button rhap_skip-button",type:"button",onClick:J},F.next?F.next:X.createElement(Nr,{icon:"mdi:skip-next"})))}case fn.VOLUME_CONTROLS:return X.createElement("div",{key:p,className:"rhap_volume-controls"},e.renderUIModules(z));case fn.LOOP:{var ot=e.audio.current?e.audio.current.loop:be,nt;return ot?nt=F.loop?F.loop:X.createElement(Nr,{icon:"mdi:repeat"}):nt=F.loopOff?F.loopOff:X.createElement(Nr,{icon:"mdi:repeat-off"}),X.createElement("button",{key:p,"aria-label":ot?Ce.loop:Ce.loopOff,className:"rhap_button-clear rhap_repeat-button",type:"button",onClick:e.handleClickLoopButton},nt)}case fn.VOLUME:{var $t=e.audio.current||{},on=$t.volume,me=on===void 0?N?0:oe:on,Oe;return me?Oe=F.volume?F.volume:X.createElement(Nr,{icon:"mdi:volume-high"}):Oe=F.volume?F.volumeMute:X.createElement(Nr,{icon:"mdi:volume-mute"}),X.createElement("div",{key:p,className:"rhap_volume-container"},X.createElement("button",{"aria-label":me?Ce.volume:Ce.volumeMute,onClick:e.handleClickVolumeButton,type:"button",className:"rhap_button-clear rhap_volume-button"},Oe),X.createElement(yb,{audio:e.audio.current,volume:me,onMuteChange:e.handleMuteChange,showFilledVolume:O,i18nVolumeControl:Ce.volumeControl}))}default:return X.isValidElement(c)?c.key?c:X.cloneElement(c,{key:p}):null}}),e}return dn(n,[{key:"componentDidMount",value:function(){var s=this;this.forceUpdate();var a=this.audio.current;this.props.muted?a.volume=0:a.volume=this.lastVolume,a.addEventListener("error",function(l){var c=l.target;if(c.error&&c.currentTime===c.duration)return s.props.onEnded&&s.props.onEnded(l);s.props.onError&&s.props.onError(l)}),a.addEventListener("canplay",function(l){s.props.onCanPlay&&s.props.onCanPlay(l)}),a.addEventListener("canplaythrough",function(l){s.props.onCanPlayThrough&&s.props.onCanPlayThrough(l)}),a.addEventListener("play",this.handlePlay),a.addEventListener("abort",this.handleAbort),a.addEventListener("ended",this.handleEnded),a.addEventListener("playing",function(l){s.props.onPlaying&&s.props.onPlaying(l)}),a.addEventListener("seeking",function(l){s.props.onSeeking&&s.props.onSeeking(l)}),a.addEventListener("seeked",function(l){s.props.onSeeked&&s.props.onSeeked(l)}),a.addEventListener("waiting",function(l){s.props.onWaiting&&s.props.onWaiting(l)}),a.addEventListener("emptied",function(l){s.props.onEmptied&&s.props.onEmptied(l)}),a.addEventListener("stalled",function(l){s.props.onStalled&&s.props.onStalled(l)}),a.addEventListener("suspend",function(l){s.props.onSuspend&&s.props.onSuspend(l)}),a.addEventListener("loadstart",function(l){s.props.onLoadStart&&s.props.onLoadStart(l)}),a.addEventListener("loadedmetadata",function(l){s.props.onLoadedMetaData&&s.props.onLoadedMetaData(l)}),a.addEventListener("loadeddata",function(l){s.props.onLoadedData&&s.props.onLoadedData(l)}),a.addEventListener("pause",this.handlePause),a.addEventListener("timeupdate",tp(function(l){s.props.onListen&&s.props.onListen(l)},this.props.listenInterval)),a.addEventListener("volumechange",function(l){s.props.onVolumeChange&&s.props.onVolumeChange(l)}),a.addEventListener("encrypted",function(l){var c=s.props.mse;c&&c.onEcrypted&&c.onEcrypted(l)})}},{key:"componentDidUpdate",value:function(s){var a=this.props,l=a.src,c=a.autoPlayAfterSrcChange;s.src!==l&&(c?this.playAudioPromise():this.forceUpdate())}},{key:"render",value:function(){var s=this.props,a=s.className,l=s.src,c=s.loop,p=s.preload,d=s.autoPlay,y=s.crossOrigin,g=s.mediaGroup,w=s.header,E=s.footer,O=s.layout,_=s.customProgressBarSection,F=s.customControlsSection,G=s.children,V=s.style,J=s.i18nAriaLabels,ue=this.audio.current?this.audio.current.loop:c,K=ue?"rhap_loop--on":"rhap_loop--off",te=this.isPlaying()?"rhap_play-status--playing":"rhap_play-status--paused";return X.createElement("div",{role:"group",tabIndex:0,"aria-label":J.player,className:"rhap_container ".concat(K," ").concat(te," ").concat(a),onKeyDown:this.handleKeyDown,ref:this.container,style:V},X.createElement("audio",{src:l,controls:!1,loop:ue,autoPlay:d,preload:p,crossOrigin:y,mediaGroup:g,ref:this.audio},G),w&&X.createElement("div",{className:"rhap_header"},w),X.createElement("div",{className:"rhap_main ".concat(ib(O))},X.createElement("div",{className:"rhap_progress-section"},this.renderUIModules(_)),X.createElement("div",{className:"rhap_controls-section"},this.renderUIModules(F))),E&&X.createElement("div",{className:"rhap_footer"},E))}}]),n}(X.Component);j(rp,"defaultProps",{autoPlay:!1,autoPlayAfterSrcChange:!0,listenInterval:1e3,progressJumpStep:5e3,progressJumpSteps:{},volumeJumpStep:.1,loop:!1,muted:!1,preload:"auto",progressUpdateInterval:20,defaultCurrentTime:"--:--",defaultDuration:"--:--",timeFormat:"auto",volume:1,className:"",showJumpControls:!0,showSkipControls:!1,showDownloadProgress:!0,showFilledProgress:!0,showFilledVolume:!1,customIcons:{},customProgressBarSection:[fn.CURRENT_TIME,fn.PROGRESS_BAR,fn.DURATION],customControlsSection:[fn.ADDITIONAL_CONTROLS,fn.MAIN_CONTROLS,fn.VOLUME_CONTROLS],customAdditionalControls:[fn.LOOP],customVolumeControls:[fn.VOLUME],layout:"stacked",hasDefaultKeyBindings:!0,i18nAriaLabels:{player:"Audio player",progressControl:"Audio progress control",volumeControl:"Volume control",play:"Play",pause:"Pause",rewind:"Rewind",forward:"Forward",previous:"Previous",next:"Skip",loop:"Disable loop",loopOff:"Enable loop",volume:"Mute",volumeMute:"Unmute"}});const fc=768;function Sb({crossOrigin:t,src:o,onError:n}){const e=X.createRef(),[s,a]=X.useState(1),l=_b();X.useEffect(()=>{e.current.audio.current.playbackRate=s},[s]);const c=X.useMemo(()=>U.jsx(ip,{key:"plaback-rate",color:"primary",id:"playback-rate-options",buttonRenderer:U.jsx(Se.Button,null,`${s}x`),menuItems:[{content:"0.75x",onClick:()=>a(.75),type:"MenuItem"},{content:"1x",onClick:()=>a(1),type:"MenuItem"},{content:"1.5x",onClick:()=>a(1.5),type:"MenuItem"},{content:"2x",onClick:()=>a(2),type:"MenuItem"}]}),[s]);return U.jsx("div",{css:p=>{var d,y,g,w;return U.css`
3
3
  .rhap_main-controls-button {
4
4
  color: ${((y=(d=p==null?void 0:p.palette)==null?void 0:d.primary)==null?void 0:y.main)||"hsl(321, 53%, 31%)"};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vendorflow/components",
3
- "version": "4.0.3",
3
+ "version": "4.0.4",
4
4
  "description": "React components for vendorflow",
5
5
  "type": "module",
6
6
  "main": "lib/index.umd.js",
package/lib/App.d.ts DELETED
@@ -1,3 +0,0 @@
1
- import './App.css';
2
- declare function App(): import("react/jsx-runtime").JSX.Element;
3
- export default App;
package/lib/main.d.ts DELETED
@@ -1,3 +0,0 @@
1
- import './index.css';
2
- declare const _default: {};
3
- export default _default;