/* * version 2.0.2 - light / variant 2 (Furniture, Insurance, Pension, Planning department) */ var __defProp=Object.defineProperty,__defNormalProp=(n,e,t)=>e in n?__defProp(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,__publicField=(n,e,t)=>__defNormalProp(n,"symbol"!=typeof e?e+"":e,t);!function(){"use strict";var n,e,t,r,o,i,l,a,_,s,u,c="undefined"!=typeof document?document.currentScript:null,d={},f=[],p=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,h=Array.isArray;function v(n,e){for(var t in e)n[t]=e[t];return n}function m(n){n&&n.parentNode&&n.parentNode.removeChild(n)}function y(e,t,r){var o,i,l,a={};for(l in t)"key"==l?o=t[l]:"ref"==l?i=t[l]:a[l]=t[l];if(arguments.length>2&&(a.children=arguments.length>3?n.call(arguments,2):r),"function"==typeof e&&null!=e.defaultProps)for(l in e.defaultProps)void 0===a[l]&&(a[l]=e.defaultProps[l]);return g(e,a,o,i,null)}function g(n,r,o,i,l){var a={type:n,props:r,key:o,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==l?++t:l,__i:-1,__u:0};return null==l&&null!=e.vnode&&e.vnode(a),a}function b(n){return n.children}function x(n,e){this.props=n,this.context=e}function C(n,e){if(null==e)return n.__?C(n.__,n.__i+1):null;for(var t;eu&&r.sort(l),n=r.shift(),u=r.length,n.__d&&(o=void 0,i=void 0,a=(i=(t=n).__v).__e,_=[],s=[],t.__P&&((o=v({},i)).__v=i.__v+1,e.vnode&&e.vnode(o),T(t.__P,o,i,t.__n,t.__P.namespaceURI,32&i.__u?[a]:null,_,null==a?C(i):a,!!(32&i.__u),s),o.__v=i.__v,o.__.__k[o.__i]=o,L(_,o,s),i.__e=i.__=null,o.__e!=a&&w(o)));N.__r=0}function P(n,e,t,r,o,i,l,a,_,s,u){var c,p,v,m,y,x,w,k=r&&r.__k||f,N=e.length;for(_=function(n,e,t,r,o){var i,l,a,_,s,u=t.length,c=u,d=0;for(n.__k=new Array(o),i=0;i0?l=n.__k[i]=g(l.type,l.props,l.key,l.ref?l.ref:null,l.__v):n.__k[i]=l,_=i+d,l.__=n,l.__b=n.__b+1,a=null,-1!=(s=l.__i=H(l,t,_,c))&&(c--,(a=t[s])&&(a.__u|=2)),null==a||null==a.__v?(-1==s&&(o>u?d--:o_?d--:d++,l.__u|=4))):n.__k[i]=null;if(c)for(i=0;i(u?1:0))for(o=t-1,i=t+1;o>=0||i=0?o--:i++])&&!(2&s.__u)&&a==s.key&&_==s.type)return l;return-1}function D(n,e,t){"-"==e[0]?n.setProperty(e,null==t?"":t):n[e]=null==t?"":"number"!=typeof t||p.test(e)?t:t+"px"}function M(n,e,t,r,o){var i,l;n:if("style"==e)if("string"==typeof t)n.style.cssText=t;else{if("string"==typeof r&&(n.style.cssText=r=""),r)for(e in r)t&&e in t||D(n.style,e,"");if(t)for(e in t)r&&t[e]==r[e]||D(n.style,e,t[e])}else if("o"==e[0]&&"n"==e[1])i=e!=(e=e.replace(a,"$1")),l=e.toLowerCase(),e=l in n||"onFocusOut"==e||"onFocusIn"==e?l.slice(2):e.slice(2),n.l||(n.l={}),n.l[e+i]=t,t?r?t.u=r.u:(t.u=_,n.addEventListener(e,i?u:s,i)):n.removeEventListener(e,i?u:s,i);else{if("http://www.w3.org/2000/svg"==o)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=e&&"height"!=e&&"href"!=e&&"list"!=e&&"form"!=e&&"tabIndex"!=e&&"download"!=e&&"rowSpan"!=e&&"colSpan"!=e&&"role"!=e&&"popover"!=e&&e in n)try{n[e]=null==t?"":t;break n}catch(c){}"function"==typeof t||(null==t||!1===t&&"-"!=e[4]?n.removeAttribute(e):n.setAttribute(e,"popover"==e&&1==t?"":t))}}function A(n){return function(t){if(this.l){var r=this.l[t.type+n];if(null==t.t)t.t=_++;else if(t.t0?n:h(n)?n.map(F):v({},n)}function $(n,t,r){try{if("function"==typeof n){var o="function"==typeof n.__u;o&&n.__u(),o&&null==t||(n.__u=n(t))}else n.current=t}catch(i){e.__e(i,r)}}function U(n,t,r){var o,i;if(e.unmount&&e.unmount(n),(o=n.ref)&&(o.current&&o.current!=n.__e||$(o,null,t)),null!=(o=n.__c)){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(l){e.__e(l,t)}o.base=o.__P=null}if(o=n.__k)for(i=0;i=t.__.length&&t.__.push({}),t.__[n]}function rn(n){return q=1,function(n,e,t){var r=tn(W++,2);if(r.t=n,!r.__c&&(r.__=[t?t(e):fn(void 0,e),function(n){var e=r.__N?r.__N[0]:r.__[0],t=r.t(e,n);e!==t&&(r.__N=[t,r.__[1]],r.__c.setState({}))}],r.__c=I,!I.__f)){var o=function(n,e,t){if(!r.__c.__H)return!0;var o=r.__c.__H.__.filter(function(n){return!!n.__c});if(o.every(function(n){return!n.__N}))return!i||i.call(this,n,e,t);var l=r.__c.props!==n;return o.forEach(function(n){if(n.__N){var e=n.__[0];n.__=n.__N,n.__N=void 0,e!==n.__[0]&&(l=!0)}}),i&&i.call(this,n,e,t)||l};I.__f=!0;var i=I.shouldComponentUpdate,l=I.componentWillUpdate;I.componentWillUpdate=function(n,e,t){if(this.__e){var r=i;i=void 0,o(n,e,t),i=r}l&&l.call(this,n,e,t)},I.shouldComponentUpdate=o}return r.__N||r.__}(fn,n)}function on(n,e){var t=tn(W++,3);!J.__s&&dn(t.__H,e)&&(t.__=n,t.u=e,I.__H.__h.push(t))}function ln(n){return q=5,function(n,e){var t=tn(W++,7);return dn(t.__H,e)&&(t.__=n(),t.__H=e,t.__h=n),t.__}(function(){return{current:n}},[])}function an(){for(var n;n=G.shift();)if(n.__P&&n.__H)try{n.__H.__h.forEach(un),n.__H.__h.forEach(cn),n.__H.__h=[]}catch(e){n.__H.__h=[],J.__e(e,n.__v)}}J.__b=function(n){I=null,K&&K(n)},J.__=function(n,e){n&&e.__k&&e.__k.__m&&(n.__m=e.__k.__m),en&&en(n,e)},J.__r=function(n){Q&&Q(n),W=0;var e=(I=n.__c).__H;e&&(Z===I?(e.__h=[],I.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(e.__h.forEach(un),e.__h.forEach(cn),e.__h=[],W=0)),Z=I},J.diffed=function(n){X&&X(n);var e=n.__c;e&&e.__H&&(e.__H.__h.length&&(1!==G.push(e)&&j===J.requestAnimationFrame||((j=J.requestAnimationFrame)||sn)(an)),e.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),Z=I=null},J.__c=function(n,e){e.some(function(n){try{n.__h.forEach(un),n.__h=n.__h.filter(function(n){return!n.__||cn(n)})}catch(t){e.some(function(n){n.__h&&(n.__h=[])}),e=[],J.__e(t,n.__v)}}),Y&&Y(n,e)},J.unmount=function(n){nn&&nn(n);var e,t=n.__c;t&&t.__H&&(t.__H.__.forEach(function(n){try{un(n)}catch(t){e=t}}),t.__H=void 0,e&&J.__e(e,t.__v))};var _n="function"==typeof requestAnimationFrame;function sn(n){var e,t=function(){clearTimeout(r),_n&&cancelAnimationFrame(e),setTimeout(n)},r=setTimeout(t,35);_n&&(e=requestAnimationFrame(t))}function un(n){var e=I,t=n.__c;"function"==typeof t&&(n.__c=void 0,t()),I=e}function cn(n){var e=I;n.__c=n.__(),I=e}function dn(n,e){return!n||n.length!==e.length||e.some(function(e,t){return e!==n[t]})}function fn(n,e){return"function"==typeof e?e(n):e}function pn(n,e){for(var t in n)if("__source"!==t&&!(t in e))return!0;for(var r in e)if("__source"!==r&&n[r]!==e[r])return!0;return!1}function hn(n,e){this.props=n,this.context=e}(hn.prototype=new x).isPureReactComponent=!0,hn.prototype.shouldComponentUpdate=function(n,e){return pn(this.props,n)||pn(this.state,e)};var vn=e.__b;e.__b=function(n){n.type&&n.type.__f&&n.ref&&(n.props.ref=n.ref,n.ref=null),vn&&vn(n)};var mn=e.__e;e.__e=function(n,e,t,r){if(n.then)for(var o,i=e;i=i.__;)if((o=i.__c)&&o.__c)return null==e.__e&&(e.__e=t.__e,e.__k=t.__k),o.__c(n,e);mn(n,e,t,r)};var yn=e.unmount;function gn(n,e,t){return n&&(n.__c&&n.__c.__H&&(n.__c.__H.__.forEach(function(n){"function"==typeof n.__c&&n.__c()}),n.__c.__H=null),null!=(n=function(n,e){for(var t in e)n[t]=e[t];return n}({},n)).__c&&(n.__c.__P===t&&(n.__c.__P=e),n.__c.__e=!0,n.__c=null),n.__k=n.__k&&n.__k.map(function(n){return gn(n,e,t)})),n}function bn(n,e,t){return n&&t&&(n.__v=null,n.__k=n.__k&&n.__k.map(function(n){return bn(n,e,t)}),n.__c&&n.__c.__P===e&&(n.__e&&t.appendChild(n.__e),n.__c.__e=!0,n.__c.__P=t)),n}function xn(){this.__u=0,this.o=null,this.__b=null}function Cn(n){if(!n.__)return null;var e=n.__.__c;return e&&e.__a&&e.__a(n)}function wn(){this.i=null,this.l=null}e.unmount=function(n){var e=n.__c;e&&(e.__z=!0),e&&e.__R&&e.__R(),e&&32&n.__u&&(n.type=null),yn&&yn(n)},(xn.prototype=new x).__c=function(n,e){var t=e.__c,r=this;null==r.o&&(r.o=[]),r.o.push(t);var o=Cn(r.__v),i=!1,l=function(){i||r.__z||(i=!0,t.__R=null,o?o(_):_())};t.__R=l;var a=t.__P;t.__P=null;var _=function(){if(! --r.__u){if(r.state.__a){var n=r.state.__a;r.__v.__k[0]=bn(n,n.__c.__P,n.__c.__O)}var e;for(r.setState({__a:r.__b=null});e=r.o.pop();)e.__P=a,e.forceUpdate()}};r.__u++||32&e.__u||r.setState({__a:r.__b=r.__v.__k[0]}),n.then(l,l)},xn.prototype.componentWillUnmount=function(){this.o=[]},xn.prototype.render=function(n,e){if(this.__b){if(this.__v.__k){var t=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=gn(this.__b,t,r.__O=r.__P)}this.__b=null}var o=e.__a&&y(b,null,n.fallback);return o&&(o.__u&=-33),[y(b,null,e.__a?null:n.children),o]};var kn=function(n,e,t){if(++t[1]===t[0]&&n.l.delete(e),n.props.revealOrder&&("t"!==n.props.revealOrder[0]||!n.l.size))for(t=n.i;t;){for(;t.length>3;)t.pop()();if(t[1]{const o=ln(null),i=ln(null),l=ln(),a=ln([]),_=ln([]);return on(()=>{const r=i.current,s=o.current;if(!r||!s)return;const u=r.getContext("2d");if(!u)return;const c=()=>{const n=s.clientWidth,e=s.clientHeight,t=window.devicePixelRatio||1;return r.width=n*t,r.height=e*t,u.scale(t,t),r.style.width=`${n}px`,r.style.height=`${e}px`,{width:n,height:e}};let{width:d,height:f}=c();const p=()=>{u.clearRect(0,0,d,f);const r=f/1.9,o=u.createLinearGradient(0,0,d,0);o.addColorStop(0,"#00CED1"),o.addColorStop(.33,"#7FE5A8"),o.addColorStop(.66,"#FFD700"),o.addColorStop(1,"#FFA500");const i=n.current;let s=null,c=null;i&&i.analyserNoisy&&t&&i.timeDomainNoisy&&(i.analyserNoisy.getFloatTimeDomainData(i.timeDomainNoisy),s=i.timeDomainNoisy),i&&i.analyserClean&&t&&i.timeDomainClean&&(i.analyserClean.getFloatTimeDomainData(i.timeDomainClean),c=i.timeDomainClean);const h=Math.floor(d/10);if(s||!t)for(let n=0;n{const n=c();d=n.width,f=n.height});return n.observe(h),()=>{l.current&&cancelAnimationFrame(l.current),n.disconnect()}}return()=>{l.current&&cancelAnimationFrame(l.current)}},[t,e,n]),V("div",{ref:o,className:`soundwave ${r}`,children:V("canvas",{ref:i,className:"soundwave__canvas"})})},Bn=({currentScene:n,onSceneChange:e,disabled:t=!1})=>V("div",{className:"sceneButtons",role:"group","aria-label":"Scenes",children:[{id:"furniture",label:"Furniture"},{id:"insurance",label:"Insurance"},{id:"pension",label:"Pension"},{id:"planning",label:"Planning department"}].map(r=>V("button",{className:"sceneButtons__btn","data-scene":r.id,"aria-pressed":n===r.id,disabled:t,onClick:()=>e(r.id),children:r.label},r.id))}),zn=({isPlaying:n,onPlayPause:e,currentTime:t,duration:r})=>{const o=n=>{if(!n||!isFinite(n))return"0:00";return`${Math.floor(n/60)}:${Math.floor(n%60).toString().padStart(2,"0")}`};return V("div",{className:"transport",children:[V("button",{className:"transport__play",id:"play","aria-label":"Play/Pause","aria-pressed":n,onClick:e,children:[V("svg",{className:"transport__icon",viewBox:"0 0 24 24","aria-hidden":"true",style:{display:n?"none":"block"},children:V("path",{d:"M8 5v14l11-7z"})}),V("svg",{className:"transport__icon",viewBox:"0 0 24 24","aria-hidden":"true",style:{display:n?"block":"none"},children:V("path",{d:"M6 5h4v14H6zM14 5h4v14h-4z"})})]}),V("div",{className:"transport__time","aria-live":"polite",children:[o(t)," / ",o(r)]})]})},Vn=({sharpiEnabled:n,onToggle:e})=>V("div",{className:"pill",role:"group","aria-label":"Sharpi toggle",children:[V("button",{className:"pill__button","aria-pressed":!n,onClick:()=>e(!1),children:"OFF"}),V("button",{className:"pill__button","aria-pressed":n,onClick:()=>e(!0),children:"ON"})]});function Wn(){const n=ln(null),e=ln(null),t=ln({}),[r,o]=rn(!1),[i,l]=rn(0),[a,_]=rn(0),[s,u]=rn(!1),c=()=>{const n=t.current;n.gainNoisy&&n.gainClean&&(s?(n.gainNoisy.gain.value=0,n.gainClean.gain.value=1):(n.gainNoisy.gain.value=1,n.gainClean.gain.value=0))};return on(()=>{c()},[s]),on(()=>{const e=()=>{n.current&&l(n.current.currentTime)},t=()=>{n.current&&_(n.current.duration)},r=()=>{o(!1)},i=n.current;if(i)return i.addEventListener("timeupdate",e),i.addEventListener("loadedmetadata",t),i.addEventListener("ended",r),()=>{i.removeEventListener("timeupdate",e),i.removeEventListener("loadedmetadata",t),i.removeEventListener("ended",r)}},[]),{audioNoisyRef:n,audioCleanRef:e,audioContextRefsRef:t,isPlaying:r,togglePlayPause:async()=>{if(n.current&&e.current)try{await(async()=>{const n=t.current;if(!n.audioCtx){const e=window.AudioContext||window.webkitAudioContext;n.audioCtx=new e}"suspended"===n.audioCtx.state&&await n.audioCtx.resume()})(),(()=>{const r=t.current;r.audioCtx&&(!r.sourceNoisy&&n.current&&(r.sourceNoisy=r.audioCtx.createMediaElementSource(n.current),r.gainNoisy=r.audioCtx.createGain(),r.sourceNoisy.connect(r.gainNoisy),r.gainNoisy.connect(r.audioCtx.destination),r.analyserNoisy=r.audioCtx.createAnalyser(),r.analyserNoisy.fftSize=2048,r.analyserNoisy.smoothingTimeConstant=.7,r.timeDomainNoisy=new Float32Array(r.analyserNoisy.fftSize),r.sourceNoisy.connect(r.analyserNoisy)),!r.sourceClean&&e.current&&(r.sourceClean=r.audioCtx.createMediaElementSource(e.current),r.gainClean=r.audioCtx.createGain(),r.sourceClean.connect(r.gainClean),r.gainClean.connect(r.audioCtx.destination),r.analyserClean=r.audioCtx.createAnalyser(),r.analyserClean.fftSize=2048,r.analyserClean.smoothingTimeConstant=.7,r.timeDomainClean=new Float32Array(r.analyserClean.fftSize),r.sourceClean.connect(r.analyserClean)),c())})();const r=n.current.ended||e.current.ended;n.current.paused||r?(r?(n.current.currentTime=0,e.current.currentTime=0):e.current.currentTime=n.current.currentTime,await Promise.all([n.current.play(),e.current.play()]),c(),o(!0)):(n.current.pause(),e.current.pause(),o(!1))}catch(r){console.error("Play/pause failed:",r),o(!1)}},currentTime:i,duration:a,sharpiEnabled:s,setSharpiEnabled:u}}const In=({assetPath:n})=>{const[e,t]=rn("furniture"),{audioNoisyRef:r,audioCleanRef:o,audioContextRefsRef:i,isPlaying:l,togglePlayPause:a,currentTime:_,duration:s,sharpiEnabled:u,setSharpiEnabled:c}=Wn();!function(n,e,t,r){const[o,i]=rn({noisy:null,clean:null}),[l,a]=rn(!1),[_,s]=rn(null);on(()=>{n&&e?(async()=>{a(!0),s(null);try{const fm={furniture:["furniture_noise.wav","furniture_clean.wav"],insurance:["Insurance_noise.wav","insurance_clean.wav"],pension:["Pension_noise.wav","Pension_clean.wav"],planning:["PlanningDepartment_noise.wav","PlanningDepartment_clean.wav"]}[e]||["",""],o=n.endsWith("/")?n:n+"/",l=`${o}audio/${fm[0]}`,a=`${o}audio/${fm[1]}`;i({noisy:l,clean:a}),(null==t?void 0:t.current)&&(null==r?void 0:r.current)&&(t.current.src=l,r.current.src=a,t.current.load(),r.current.load(),t.current.currentTime=0,r.current.currentTime=0,t.current.pause(),r.current.pause())}catch(o){const n=o instanceof Error?o.message:"Unknown error";s(n),console.error("Error loading scene:",o)}finally{a(!1)}})():i({noisy:null,clean:null})},[n,e,t,r])}(n,e,r,o);return V("div",{className:"app-card",children:[V("div",{className:"app-header",children:[V("div",{className:"app-brand","aria-label":"Sharpi brand",children:V("svg",{width:"112",height:"23",viewBox:"0 0 112 23",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:V("g",{children:[V("path",{d:"M9.34539 22.9288C6.63674 22.9288 4.30461 22.1481 2.6 20.6697C1.10706 19.3759 0.18732 17.6169 0 15.6974L6.04482 15.2434C6.41758 16.9673 7.5902 17.951 9.2817 17.951C10.9732 17.951 11.7094 17.1186 11.7094 16.2936C11.7094 14.854 9.83428 14.1914 7.66138 13.4255C4.44322 12.294 0.438328 10.8802 0.438328 6.43956C0.438328 2.52858 3.81945 0 9.05314 0C14.2869 0 17.3571 3.54185 17.7167 6.94158L11.7112 7.39377C11.4303 5.89693 10.4 4.97409 8.98759 4.97409C7.8955 4.97409 6.72104 5.50196 6.72104 6.66289C6.72104 8.07848 8.56425 8.67839 10.6978 9.37418C13.9478 10.4336 17.992 11.7514 17.992 16.3601C17.992 19.6287 15.319 22.9288 9.34539 22.9288Z",fill:"#1A2024"}),V("path",{d:"M57.6081 22.4804L56.3418 18.3516H48.9183L47.652 22.4804H41.4648L49.6432 0.448551H55.8454L64.0238 22.4822H57.6099L57.6081 22.4804ZM50.1658 13.5363H55.0961L52.631 5.89329L50.1658 13.5363Z",fill:"#1A2024"}),V("path",{d:"M77.4495 22.4804L73.2927 15.3431H71.0805V22.4804H65.0244V0.448551H75.2315C80.0551 0.448551 83.4251 3.5179 83.4251 7.91246C83.4251 10.5389 81.9356 12.7888 79.3378 14.0844L79.1592 14.173L84.161 22.4804H77.4533H77.4495ZM70.852 10.657H74.353C76.05 10.657 77.2358 9.55513 77.2358 7.97704C77.2358 6.399 76.05 5.2953 74.353 5.2953H70.852V10.657Z",fill:"#1A2024"}),V("path",{d:"M86.043 22.4804V0.448551H95.5031C100.637 0.448551 104.086 3.58989 104.086 8.265C104.086 12.9401 100.637 16.0482 95.5031 16.0482H92.099V22.4804H86.043ZM91.8725 11.0722H94.8862C96.6787 11.0722 97.9324 9.91689 97.9324 8.26317C97.9324 6.60941 96.7089 5.42264 94.8862 5.42264H91.8725V11.0722Z",fill:"#1A2024"}),V("path",{d:"M112 0.448551H105.944V22.4822H112V0.448551Z",fill:"#1A2024"}),V("path",{d:"M20.377 0.448624H26.433V8.38502H32.1706L20.377 20.0571V0.448624Z",fill:"#1A2024"}),V("path",{d:"M34.376 0.448624H40.1885L34.376 6.20159V0.448624Z",fill:"#1A2024"}),V("path",{d:"M34.3758 22.4804V14.0328H29.1758L40.4338 2.89047V22.4804H34.3758Z",fill:"#1A2024"}),V("path",{d:"M20.6416 22.4804L26.4335 16.746V22.4804H20.6416Z",fill:"#1A2024"})]})})}),V(Vn,{sharpiEnabled:u,onToggle:c})]}),V("div",{className:"grid-layout",children:[V(Bn,{currentScene:e,onSceneChange:n=>{t(n),r.current&&o.current&&(r.current.currentTime=0,o.current.currentTime=0,setTimeout(()=>{a()},0))}}),V("div",{className:"soundwave-layout",children:V(On,{audioContextRefsRef:i,showClean:u,isPlaying:l})})]}),V(zn,{isPlaying:l,onPlayPause:a,currentTime:_,duration:s}),V("audio",{ref:r,crossOrigin:"anonymous",style:{display:"none"}}),V("audio",{ref:o,crossOrigin:"anonymous",style:{display:"none"}})]})};class Zn extends HTMLElement{constructor(){super(),__publicField(this,"_container",null),this.attachShadow({mode:"open"})}static get observedAttributes(){return["assetPath"]}connectedCallback(){this.render()}attributeChangedCallback(n,e,t){"assetPath"===n&&e!==t&&this.render()}disconnectedCallback(){this._container&&this.shadowRoot&&(B(null,this._container),this._container=null)}render(){const n=void 0!=={url:c&&"SCRIPT"===c.tagName.toUpperCase()&&c.src||new URL("sharpi-player-2.js",document.baseURI).href}?"/sharpi-player-2/":"",e=this.getAttribute("assetPath")||n,t=this.shadowRoot;if(t){if(!this._container){const n=document.createElement("style");n.textContent='/* CSS Custom Properties for Shadow DOM */\n:host {\n /* Core Colors (light mode - augmentedhearing.io brand) */\n --color-accent: #D9EB52;\n --color-text: #1A2024;\n --color-text-muted: #5B6770;\n --color-bg: #FFFFFF;\n --color-bg-raised: #EBF3F5;\n --color-border: #C9D6DA;\n --color-border-light: #E2EAEC;\n\n /* States */\n --state-hover: #E3EEF0;\n --state-pressed: #D9EB52;\n --state-pressed-hover: #CFE23F;\n --state-disabled: #AEB9BE;\n --state-focus: #D9EB52;\n\n display: block;\n width: 100%;\n}\n\n/* Global Reset */\n* {\n box-sizing: border-box;\n}\n\n/* App Component Styles */\n.app-card {\n width: 100%;\n border-radius: 22px;\n padding: 16px 16px 32px;\n background: var(--color-bg);\n border: 1px solid var(--color-border-light);\n margin: 0 auto;\n display: flex;\n gap: 40px;\n flex-direction: column;\n container-type: inline-size;\n box-shadow: 0 1px 2px rgba(26, 32, 36, 0.06), 0 12px 32px rgba(26, 32, 36, 0.06);\n}\n\n.app-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 20px;\n flex-wrap: wrap;\n}\n\n.app-brand {\n flex: 0 0 auto;\n text-align: center;\n font-size: 32px;\n font-weight: 700;\n font-family: "TT Commons Pro", "Inter", system-ui, sans-serif;\n letter-spacing: 0.25px;\n color: var(--color-text);\n text-transform: uppercase;\n}\n\n/* SoundWave Component Styles */\n.soundwave-layout {\n border: 1px solid #D5DEE1;\n border-radius: 24px;\n}\n\n.grid-layout {\n display: grid;\n grid-template-columns: minmax(280px, 400px) 1fr;\n flex-wrap: wrap;\n gap: 40px;\n\n .sceneButtons {\n display: grid;\n grid-template-columns: 1fr;\n gap: 16px;\n width: 100%;\n }\n\n .soundwave-layout {\n padding: 16px;\n flex: 1 1 400px;\n min-width: 0; /* Critical: allows flex items to shrink below their content size */\n max-width: 100%;\n\n .soundwave {\n height: 100%;\n }\n\n .soundwave__canvas {\n display: block;\n height: 100%;\n }\n }\n @container (max-width: 900px) {\n grid-template-columns: minmax(240px, 240px) 1fr;\n }\n @container (max-width: 640px) {\n grid-template-columns: 1fr;\n .soundwave-layout {\n height: 240px;\n }\n }\n}\n\n/* SceneButtons Component Styles */\n.sceneButtons {\n .sceneButtons__btn {\n height: 48px;\n border: 2px solid transparent;\n background: var(--color-bg-raised);\n color: var(--color-text);\n border-radius: 36px;\n padding: 0 16px;\n font-weight: 500;\n font-family: "TT Commons Pro", "Inter", system-ui, sans-serif;\n cursor: pointer;\n transition:\n border-color 0.15s,\n background 0.15s,\n transform 0.08s,\n box-shadow 0.15s;\n\n font-size: 18px;\n text-align: center;\n display: flex;\n align-items: center;\n justify-content: center;\n\n &:hover {\n background: var(--state-hover);\n border-color: var(--state-focus);\n }\n\n &:focus-visible {\n outline: 2px solid var(--state-focus);\n outline-offset: -6px;\n }\n\n &[aria-pressed="true"] {\n background: #F2F7CE;\n border-color: var(--state-focus);\n }\n\n &:disabled {\n background: var(--color-bg);\n color: var(--state-disabled);\n cursor: not-allowed;\n border-color: transparent;\n }\n }\n}\n\n/* Transport Component Styles */\n.transport {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 16px;\n\n .transport__play {\n width: 64px;\n height: 64px;\n border-radius: 50%;\n border: 0;\n cursor: pointer;\n background: #1A2024;\n display: grid;\n place-items: center;\n transition: background 0.2s ease;\n\n &:hover {\n background: #2A3236;\n }\n\n &:focus-visible {\n outline: 2px solid #1A2024;\n outline-offset: 2px;\n }\n\n &[aria-pressed="true"] {\n background: var(--state-pressed);\n\n &:hover {\n background: var(--state-pressed-hover);\n }\n\n &:focus-visible {\n outline: 2px solid var(--state-focus);\n outline-offset: 2px;\n }\n }\n }\n\n .transport__icon {\n width: 24px;\n height: 24px;\n fill: #FFFFFF;\n }\n\n .transport__play[aria-pressed="true"] .transport__icon {\n fill: #1A2024;\n }\n\n .transport__time {\n min-width: 110px;\n text-align: left;\n font-weight: 500;\n font-family: "TT Commons Pro", "Inter", system-ui, sans-serif;\n letter-spacing: 0.3px;\n color: var(--color-text-muted);\n font-size: 15px;\n }\n}\n\n/* SharpiToggle Component Styles */\n.pill {\n flex-shrink: 0;\n display: inline-flex;\n background: var(--color-bg);\n border: 1px solid var(--color-border);\n border-radius: 999px;\n padding: 4px;\n\n .pill__button {\n padding: 8px 16px;\n border-radius: 24px;\n border: 1px solid transparent;\n background: transparent;\n font-weight: 800;\n color: var(--color-text-muted);\n cursor: pointer;\n transition:\n background 0.12s,\n color 0.12s,\n transform 0.08s;\n font-size: 14px;\n\n &[aria-pressed="true"] {\n background: var(--color-bg-raised);\n color: var(--color-text);\n border-color: var(--color-border);\n outline: 0;\n }\n\n &[aria-pressed="false"] {\n color: var(--color-text-muted);\n border-color: transparent;\n }\n\n &:focus-visible {\n outline: 2px solid var(--color-text-muted);\n outline-offset: -3px;\n color: var(--color-text);\n }\n\n &:nth-child(2)[aria-pressed="true"] {\n color: #1A2024;\n background: var(--state-pressed);\n border-color: var(--state-pressed);\n outline: 0;\n\n &:focus-visible {\n outline: 2px solid var(--state-focus);\n outline-offset: 2px;\n }\n }\n }\n}\n',t.appendChild(n),this._container=document.createElement("div"),t.appendChild(this._container)}B(y(In,{assetPath:e}),this._container)}}}customElements.get("sharpi-player-2")||customElements.define("sharpi-player-2",Zn)}();