bottom-sheet
Version:
Bottom Sheet implemented as a Vanilla Web Component
1 lines • 41.8 kB
JavaScript
var __awaiter=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function u(t){try{s(r.next(t))}catch(t){i(t)}}function a(t){try{s(r.throw(t))}catch(t){i(t)}}function s(t){t.done?o(t.value):new n(function(e){e(t.value)}).then(u,a)}s((r=r.apply(t,e||[])).next())})},__generator=this&&this.__generator||function(t,e){var n,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=(o=u.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=e.call(t,u)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}};BottomSheet.loadBundle("yjkhosf5",["exports"],function(t){var e=window.BottomSheet.h,n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function r(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var o=function(){return(o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function i(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&(n[r[o]]=t[r[o]])}return n}var u,a=function(){return(a=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},s=function(t,e){return function(n){return Math.max(Math.min(n,e),t)}},c=function(t){return function(e){return"string"==typeof e&&0===e.indexOf(t)}},f=function(t){return t%1?Number(t.toFixed(5)):t},p={test:function(t){return"number"==typeof t},parse:parseFloat,transform:function(t){return t}},l=a({},p,{transform:s(0,1)}),d=a({},p,{default:1}),h=function(t){return{test:function(e){return"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length},parse:parseFloat,transform:function(e){return""+e+t}}},v=h("deg"),g=h("%"),m=h("px"),y=h("vh"),b=h("vw"),w=s(0,255),O=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))$/i,P=function(t){return void 0!==t.red},x=function(t){return void 0!==t.hue},S=function(t){var e=t.length;return function(n){if("string"!=typeof n)return n;for(var r,o={},i=function(t){return"string"==typeof t?t.split(/,\s*/):[t]}((r=n).substring(r.indexOf("(")+1,r.lastIndexOf(")"))),u=0;u<e;u++)o[t[u]]=void 0!==i[u]?parseFloat(i[u]):1;return o}},M=a({},p,{transform:function(t){return Math.round(w(t))}}),C=c("rgb"),k={test:function(t){return"string"==typeof t?C(t):P(t)},parse:S(["red","green","blue","alpha"]),transform:function(t){var e=t.green,n=t.blue,r=t.alpha;return function(t){var e=t.alpha;return"rgba("+t.red+", "+t.green+", "+t.blue+", "+(void 0===e?1:e)+")"}({red:M.transform(t.red),green:M.transform(e),blue:M.transform(n),alpha:f(r)})}},j=c("hsl"),B={test:function(t){return"string"==typeof t?j(t):x(t)},parse:S(["hue","saturation","lightness","alpha"]),transform:function(t){var e=t.saturation,n=t.lightness,r=t.alpha;return function(t){var e=t.alpha;return"hsla("+t.hue+", "+t.saturation+", "+t.lightness+", "+(void 0===e?1:e)+")"}({hue:Math.round(t.hue),saturation:g.transform(f(e)),lightness:g.transform(f(n)),alpha:f(r)})}},E=a({},k,{test:c("#"),parse:function(t){var e="",n="",r="";return t.length>4?(e=t.substr(1,2),n=t.substr(3,2),r=t.substr(5,2)):(e=t.substr(1,1),n=t.substr(2,1),r=t.substr(3,1),e+=e,n+=n,r+=r),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:1}}}),R={test:function(t){return"string"==typeof t&&O.test(t)||k.test(t)||B.test(t)||E.test(t)},parse:function(t){return k.test(t)?k.parse(t):B.test(t)?B.parse(t):E.test(t)?E.parse(t):t},transform:function(t){return P(t)?k.transform(t):x(t)?B.transform(t):t}},_=/(-)?(\d[\d\.]*)/g,L=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,T=function(t){var e=t,n=[],r=e.match(L);r&&(e=e.replace(L,"${c}"),n.push.apply(n,r.map(R.parse)));var o=e.match(_);return o&&n.push.apply(n,o.map(p.parse)),n},Y=function(t){var e=t,n=0,r=t.match(L),o=r?r.length:0;if(r)for(var i=0;i<o;i++)e=e.replace(r[i],"${c}"),n++;var u=e.match(_),a=u?u.length:0;if(u)for(i=0;i<a;i++)e=e.replace(u[i],"${n}"),n++;return function(t){for(var r=e,i=0;i<n;i++)r=r.replace(i<o?"${c}":"${n}",i<o?R.transform(t[i]):f(t[i]));return r}},A=0,V="undefined"!=typeof window&&void 0!==window.requestAnimationFrame?function(t){return window.requestAnimationFrame(t)}:function(t){var e=Date.now(),n=Math.max(0,16.7-(e-A));A=e+n,setTimeout(function(){return t(A)},n)};!function(t){t.Read="read",t.Update="update",t.Render="render",t.PostRender="postRender",t.FixedUpdate="fixedUpdate"}(u||(u={}));var D=1/60*1e3,X=!0,H=!1,F=!1,z={delta:0,timestamp:0},W=[u.Read,u.Update,u.Render,u.PostRender],q=function(t){return H=t},I=W.reduce(function(t,e){var n,r,o,i,u,a,s,c,f,p=(n=q,r=[],o=[],i=0,u=!1,a=0,s=new WeakSet,c=new WeakSet,f={cancel:function(t){var e=o.indexOf(t);s.add(t),-1!==e&&o.splice(e,1)},process:function(t){var e,p;if(u=!0,r=(e=[o,r])[0],(o=e[1]).length=0,i=r.length)for(a=0;a<i;a++)(p=r[a])(t),!0!==c.has(p)||s.has(p)||(f.schedule(p),n(!0));u=!1},schedule:function(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=!1);var a=n&&u,f=a?r:o;s.delete(t),e&&c.add(t),-1===f.indexOf(t)&&(f.push(t),a&&(i=r.length))}});return t.sync[e]=function(t,e,n){return void 0===e&&(e=!1),void 0===n&&(n=!1),H||K(),p.schedule(t,e,n),t},t.cancelSync[e]=function(t){return p.cancel(t)},t.steps[e]=p,t},{steps:{},sync:{},cancelSync:{}}),U=I.steps,Z=I.sync,$=I.cancelSync,N=function(t){return U[t].process(z)},G=function(t){H=!1,z.delta=X?D:Math.max(Math.min(t-z.timestamp,40),1),X||(D=z.delta),z.timestamp=t,F=!0,W.forEach(N),F=!1,H&&(X=!1,V(G))},K=function(){H=!0,X=!0,F||V(G)},J=function(t){return t},Q=function(t){return function(e){return 1-t(1-e)}}(function(t){return function(t){return Math.pow(t,2)}}()),tt=8,et=.001,nt=1e-7,rt=10,ot=11,it=1/(ot-1),ut="undefined"!=typeof Float32Array,at=function(t,e){return 1-3*e+3*t},st=function(t,e){return 3*e-6*t},ct=function(t){return 3*t},ft=function(t,e,n){return 3*at(e,n)*t*t+2*st(e,n)*t+ct(e)},pt=function(t,e,n){return((at(e,n)*t+st(e,n))*t+ct(e))*t};function lt(t,e,n,r){var o=ut?new Float32Array(ot):new Array(ot);return function(){for(var e=0;e<ot;++e)o[e]=pt(e*it,t,n)}(),function(i){return t===e&&n===r?i:0===i?0:1===i?1:pt(function(e){for(var r,i,u=0,a=1,s=ot-1;a!==s&&o[a]<=e;++a)u+=it;return(i=ft(r=u+(e-o[--a])/(o[a+1]-o[a])*it,t,n))>=et?function(e,r){for(var o=0,i=0;o<tt;++o){if(0===(i=ft(r,t,n)))return r;r-=(pt(r,t,n)-e)/i}return r}(e,r):0===i?r:function(e,r,o){var i,u,a=0;do{(i=pt(u=r+(o-r)/2,t,n)-e)>0?o=u:r=u}while(Math.abs(i)>nt&&++a<rt);return u}(e,u,u+it)}(i),e,r)}}var dt,ht={x:0,y:0,z:0},vt=function(t){return"number"==typeof t},gt=function(t){return 180*t/Math.PI},mt=function(t,e){return void 0===e&&(e=ht),gt(Math.atan2(e.y-t.y,e.x-t.x))},yt=function(t,e){var n=!0;return void 0===e&&(e=t,n=!1),function(r){return n?r-t+e:(t=r,n=!0,e)}},bt=function(t){return function(e,n,r){return void 0!==r?t(e,n,r):function(r){return t(e,n,r)}}},wt=bt(function(t,e,n){return Math.min(Math.max(n,t),e)}),Ot=function(t){return t*Math.PI/180},Pt=function(t){return t.hasOwnProperty("x")&&t.hasOwnProperty("y")},xt=function(t){return Pt(t)&&t.hasOwnProperty("z")},St=function(t,e){return Math.abs(t-e)},Mt=function(t,e){if(void 0===e&&(e=ht),vt(t)&&vt(e))return St(t,e);if(Pt(t)&&Pt(e)){var n=St(t.x,e.x),r=St(t.y,e.y),o=xt(t)&&xt(e)?St(t.z,e.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(o,2))}return 0},Ct=function(t,e,n){var r=e-t;return 0===r?1:(n-t)/r},kt=function(t,e,n){return-n*t+n*e+t},jt=function(){return(jt=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Bt=function(t,e,n){var r=t*t;return Math.sqrt(n*(e*e-r)+r)},Et=[E,k,B],Rt=function(t){return Et.find(function(e){return e.test(t)})},_t=function(t,e){var n=Rt(t),r=Rt(e),o=n.parse(t),i=r.parse(e),u=jt({},o),a=n===B?kt:Bt;return function(t){for(var e in u)"alpha"!==e&&(u[e]=a(o[e],i[e],t));return u.alpha=kt(o.alpha,i.alpha,t),n.transform(u)}},Lt=function(t,e){return function(n){return e(t(n))}},Tt=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.reduce(Lt)},Yt=function(t,e){var n=t.slice(),r=n.length,o=t.map(function(t,n){var r=e[n];return vt(t)?function(e){return kt(t,r,e)}:R.test(t)?_t(t,r):At(t,r)});return function(t){for(var e=0;e<r;e++)n[e]=o[e](t);return n}},At=function(t,e){var n=Y(t);return n(t),Y(e)(t),Tt(Yt(T(t),T(e)),n)},Vt=(bt(kt),function(t,e,n,r){return void 0===r&&(r=0),o=t+n*(e-t)/Math.max(r,n),void 0===i&&(i=2),i=Math.pow(10,i),Math.round(o*i)/i;var o,i}),Dt=function(t){return t},Xt=function(t){return void 0===t&&(t=Dt),bt(function(e,n,r){var o=n-r,i=-(0-e+1)*(0-t(Math.abs(o)));return o<=0?n+i:n-i})},Ht=(Xt(),Xt(Math.sqrt),function(t,e){return e?t*(1e3/e):0}),Ft=(bt(function(t,e,n){var r=e-t;return((n-t)%r+r)%r+t}),wt(0,1),function(){return(Ft=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)}),zt=function(t){var e=t.onRead,n=t.onRender,r=t.uncachedValues,o=void 0===r?new Set:r,i=t.useCache,u=void 0===i||i;return function(t){var r={},i=[],a=!1,s=function(t,e){var n=r[t];r[t]=e,r[t]!==n&&(-1===i.indexOf(t)&&i.push(t),a||(a=!0,Z.render(c)))};function c(e){return void 0===e&&(e=!1),(!0===e||a)&&(n(r,t,i),a=!1,i.length=0),this}return{get:function(n){return n?u&&!o.has(n)&&void 0!==r[n]?r[n]:e(n,t):r},set:function(t,e){if("string"==typeof t){if(void 0===e)return function(e){return s(t,e)};s(t,e)}else for(var n in t)t.hasOwnProperty(n)&&s(n,t[n]);return this},render:c}}},Wt=/([a-z])([A-Z])/g,qt=function(t){return t.replace(Wt,"$1-$2").toLowerCase()},It=new Map,Ut=new Map,Zt=["Webkit","Moz","O","ms",""],$t=Zt.length,Nt="undefined"!=typeof document,Gt=function(t,e){return Ut.set(t,qt(e))},Kt=function(t,e){void 0===e&&(e=!1);var n=e?Ut:It;return n.has(t)||(Nt?function(t){dt=dt||document.createElement("div");for(var e=0;e<$t;e++){var n=Zt[e],r=""===n,o=r?t:n+t.charAt(0).toUpperCase()+t.slice(1);(o in dt.style||r)&&(It.set(t,o),Gt(t,(r?"":"-")+qt(o)))}}(t):function(t){Gt(t,t)}(t)),n.get(t)||t},Jt=["","X","Y","Z"],Qt=["scale","rotate","skew","transformPerspective"].reduce(function(t,e){return Jt.reduce(function(t,n){return t.push(e+n),t},t)},["x","y","z"]),te=Qt.reduce(function(t,e){return t[e]=!0,t},{}),ee=function(t){return!0===te[t]},ne=function(t,e){return Qt.indexOf(t)-Qt.indexOf(e)},re=function(t){return"originX"===t||"originY"===t},oe={color:R,backgroundColor:R,outlineColor:R,fill:R,stroke:R,borderColor:R,borderTopColor:R,borderRightColor:R,borderBottomColor:R,borderLeftColor:R,borderWidth:m,borderTopWidth:m,borderRightWidth:m,borderBottomWidth:m,borderLeftWidth:m,borderRadius:m,borderTopLeftRadius:m,borderTopRightRadius:m,borderBottomRightRadius:m,borderBottomLeftRadius:m,width:m,maxWidth:m,height:m,maxHeight:m,top:m,right:m,bottom:m,left:m,padding:m,paddingTop:m,paddingRight:m,paddingBottom:m,paddingLeft:m,margin:m,marginTop:m,marginRight:m,marginBottom:m,marginLeft:m,rotate:v,rotateX:v,rotateY:v,rotateZ:v,scale:d,scaleX:d,scaleY:d,scaleZ:d,skew:v,skewX:v,skewY:v,distance:m,x:m,y:m,z:m,perspective:m,opacity:l,originX:g,originY:g,originZ:m},ie=function(t){return oe[t]},ue=new Set(["scrollLeft","scrollTop"]),ae=new Set(["scrollLeft","scrollTop","transform"]),se={x:"translateX",y:"translateY",z:"translateZ"},ce=function(t){return"function"==typeof t},fe=function(t){void 0===t&&(t=!0);var e={},n={},r={},o=[];return function(i){return o.length=0,function(t,e,n,r,o,i,u){void 0===e&&(e=!0),void 0===n&&(n={}),void 0===r&&(r={}),void 0===o&&(o={}),void 0===i&&(i=[]),void 0===u&&(u=!1);var a=!0,s=!1,c=!1;for(var f in t){var p=t[f],l=ie(f),d="number"==typeof p&&l?l.transform(p):p;ee(f)?(s=!0,r[f]=d,i.push(f),a&&(l.default&&p!==l.default||!l.default&&0!==p)&&(a=!1)):re(f)?(o[f]=d,c=!0):ae.has(f)&&ce(d)||(n[Kt(f,u)]=d)}if(a)s&&(n.transform="none");else{var h="";if(ce(t.transform))h=t.transform(r);else{var v=!1;i.sort(ne);for(var g=i.length,m=0;m<g;m++)h+=(se[f=i[m]]||f)+"("+r[f]+") ",v="z"===f||v;!v&&e?h+="translateZ(0)":h=h.trim()}n.transform=h}c&&(n.transformOrigin=(o.originX||0)+" "+(o.originY||0)+" "+(o.originZ||0))}(i,t,e,n,r,o,!0),e}},pe=zt({onRead:function(t,e){var n=e.element,r=e.preparseOutput,o=ie(t);if(ee(t))return o&&o.default||0;if(ue.has(t))return n[t];var i=window.getComputedStyle(n,null).getPropertyValue(Kt(t,!0))||0;return r&&o&&o.parse?o.parse(i):i},onRender:function(t,e,n){var r=e.element;Object.assign(r.style,(0,e.buildStyles)(t)),-1!==n.indexOf("scrollLeft")&&(r.scrollLeft=t.scrollLeft),-1!==n.indexOf("scrollTop")&&(r.scrollTop=t.scrollTop)},uncachedValues:ue}),le=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues"]),de=function(t,e){return t/100*e+"px"},he=Ft({},p,{transform:Math.round}),ve={fill:R,stroke:R,scale:d,scaleX:d,scaleY:d,opacity:l,fillOpacity:l,strokeOpacity:l,numOctaves:he},ge=zt({onRead:function(t,e){var n=e.element;if(ee(t)){var r=function(t){return ve[t]}(t);return r?r.default:0}return n.getAttribute(t)},onRender:function(t,e){!function(t,e){for(var n in e)e.hasOwnProperty(n)&&t.setAttribute(n,e[n])}(e.element,function(t,e,n,r){var o=!1,i=!1,u={},a=n?{pathLength:"0",pathSpacing:""+r}:void 0,s=void 0!==t.scale?t.scale||1e-7:t.scaleX||1,c=void 0!==t.scaleY?t.scaleY||1e-7:s||1,f=e.width*((t.originX||50)/100)+e.x,p=e.height*((t.originY||50)/100)+e.y,l={translate:"translate("+t.x+", "+t.y+") ",scale:"translate("+1*s*-f+", "+1*c*-p+") scale("+s+", "+c+") translate("+f/s+", "+p/c+") ",rotate:"rotate("+t.rotate+", "+f+", "+p+") ",skewX:"skewX("+t.skewX+") ",skewY:"skewY("+t.skewY+") "};for(var d in t)if(t.hasOwnProperty(d)){var h=t[d];ee(d)?o=!0:!n||"pathLength"!==d&&"pathSpacing"!==d||"number"!=typeof h?n&&"pathOffset"===d?u["stroke-dashoffset"]=de(-h,r):u[le.has(d)?d:qt(d)]=h:(i=!0,a[d]=de(h,r))}if(i&&(u["stroke-dasharray"]=a.pathLength+" "+a.pathSpacing),o)for(var d in u.transform="",l)l.hasOwnProperty(d)&&(u.transform+=l[d].replace(/undefined/g,"scale"===d?"1":"0"));return u}(t,e.dimensions,e.isPath,e.pathLength))}}),me=zt({useCache:!1,onRead:function(t){return"scrollTop"===t?window.pageYOffset:window.pageXOffset},onRender:function(t){var e=t.scrollTop,n=t.scrollLeft;return window.scrollTo(void 0===n?0:n,void 0===e?0:e)}}),ye=new WeakMap,be=function(t,e){var n;return t instanceof HTMLElement?n=function(t,e){void 0===e&&(e={});var n=e.enableHardwareAcceleration,r=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&(n[r[o]]=t[r[o]])}return n}(e,["enableHardwareAcceleration"]);return pe(Ft({element:t,buildStyles:fe(n),preparseOutput:!0},r))}(t,e):t instanceof SVGElement?n=function(t){var e=function(t){try{return function(t){return"function"==typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}(t)}catch(t){return{x:0,y:0,width:0,height:0}}}(t),n={element:t,dimensions:e,isPath:!1};return"path"===t.tagName&&(n.isPath=!0,n.pathLength=t.getTotalLength()),ge(n)}(t):t===window&&(n=me(t)),ye.set(t,n),n},we=function(){function t(t){void 0===t&&(t={}),this.props=t}return t.prototype.applyMiddleware=function(t){return this.create(o({},this.props,{middleware:this.props.middleware?[t].concat(this.props.middleware):[t]}))},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=1===t.length?t[0]:Tt.apply(void 0,t);return this.applyMiddleware(function(t){return function(e){return t(n(e))}})},t.prototype.while=function(t){return this.applyMiddleware(function(e,n){return function(r){return t(r)?e(r):n()}})},t.prototype.filter=function(t){return this.applyMiddleware(function(e){return function(n){return t(n)&&e(n)}})},t}(),Oe=function(){return function(t,e){var n=t.middleware,r=t.onComplete,o=this;this.isActive=!0,this.update=function(t){o.observer.update&&o.updateObserver(t)},this.complete=function(){o.observer.complete&&o.isActive&&o.observer.complete(),o.onComplete&&o.onComplete(),o.isActive=!1},this.error=function(t){o.observer.error&&o.isActive&&o.observer.error(t),o.isActive=!1},this.observer=e,this.updateObserver=function(t){return e.update(t)},this.onComplete=r,e.update&&n&&n.length&&n.forEach(function(t){return o.updateObserver=t(o.updateObserver,o.complete)})}}(),Pe=function(t,e,n){return new Oe({middleware:e.middleware,onComplete:n},"function"==typeof t?{update:t}:t)},xe=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.create=function(t){return new e(t)},e.prototype.start=function(t){void 0===t&&(t={});var e=!1,n={stop:function(){}},r=this.props,u=r.init,a=i(r,["init"]),s=u(Pe(t,a,function(){e=!0,n.stop()}));return n=s?o({},n,s):n,t.registerParent&&t.registerParent(n),e&&n.stop(),n},e}(we),Se=function(t){return new xe({init:t})},Me=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.subscribers=[],e}return r(e,t),e.prototype.complete=function(){this.subscribers.forEach(function(t){return t.complete()})},e.prototype.error=function(t){this.subscribers.forEach(function(e){return e.error(t)})},e.prototype.update=function(t){for(var e=0;e<this.subscribers.length;e++)this.subscribers[e].update(t)},e.prototype.subscribe=function(t){var e=this,n=Pe(t,this.props);return this.subscribers.push(n),{unsubscribe:function(){var t=e.subscribers.indexOf(n);-1!==t&&e.subscribers.splice(t,1)}}},e.prototype.stop=function(){this.parent&&this.parent.stop()},e.prototype.registerParent=function(t){this.stop(),this.parent=t},e}(we),Ce=Object.freeze({angle:mt,degreesToRadians:Ot,distance:Mt,isPoint3D:xt,isPoint:Pt,dilate:kt,getValueFromProgress:kt,pointFromAngleAndDistance:function(t,e,n){return e=Ot(e),{x:n*Math.cos(e)+t.x,y:n*Math.sin(e)+t.y}},getProgressFromValue:Ct,radiansToDegrees:gt,smooth:Vt,speedPerFrame:function(t,e){return vt(t)?t/(1e3/e):0},speedPerSecond:Ht,stepProgress:function(t,e){var n=1/(t-1),r=1/(2*(t-1)),o=Math.min(e,1);return Math.floor((o/r+1)/2)*n}}),ke=function(t){return Array.isArray(t)},je=function(t){var e=typeof t;return"string"===e||"number"===e},Be=function(t){function e(e){var n=t.call(this,e)||this;return n.scheduleVelocityCheck=function(){return Z.postRender(n.velocityCheck)},n.velocityCheck=function(t){t.timestamp!==n.lastUpdated&&(n.prev=n.current)},n.prev=n.current=e.value||0,je(n.current)?(n.updateCurrent=function(t){return n.current=t},n.getVelocityOfCurrent=function(){return n.getSingleVelocity(n.current,n.prev)}):ke(n.current)?(n.updateCurrent=function(t){return n.current=t.slice()},n.getVelocityOfCurrent=function(){return n.getListVelocity()}):(n.updateCurrent=function(t){for(var e in n.current={},t)t.hasOwnProperty(e)&&(n.current[e]=t[e])},n.getVelocityOfCurrent=function(){return n.getMapVelocity()}),e.initialSubscription&&n.subscribe(e.initialSubscription),n}return r(e,t),e.prototype.create=function(t){return new e(t)},e.prototype.get=function(){return this.current},e.prototype.getVelocity=function(){return this.getVelocityOfCurrent()},e.prototype.update=function(e){t.prototype.update.call(this,e),this.prev=this.current,this.updateCurrent(e);var n=z.timestamp;this.timeDelta=z.delta,this.lastUpdated=n,Z.postRender(this.scheduleVelocityCheck)},e.prototype.subscribe=function(e){var n=t.prototype.subscribe.call(this,e);return this.subscribers[this.subscribers.length-1].update(this.current),n},e.prototype.getSingleVelocity=function(t,e){return"number"==typeof t&&"number"==typeof e?Ht(t-e,this.timeDelta):Ht(parseFloat(t)-parseFloat(e),this.timeDelta)||0},e.prototype.getListVelocity=function(){var t=this;return this.current.map(function(e,n){return t.getSingleVelocity(e,t.prev[n])})},e.prototype.getMapVelocity=function(){var t={};for(var e in this.current)this.current.hasOwnProperty(e)&&(t[e]=this.getSingleVelocity(this.current[e],this.prev[e]));return t},e}(Me),Ee=function(t,e){return new Be({value:t,initialSubscription:e})},Re=function(t){var e=t.getCount,n=t.getFirst,r=t.getOutput,o=t.mapApi,i=t.setProp,u=t.startActions;return function(t){return Se(function(a){var s=a.update,c=a.complete,f=a.error,p=e(t),l=r(),d=function(){return s(l)},h=0,v=u(t,function(t,e){var n=!1;return t.start({complete:function(){n||(n=!0,++h===p&&Z.update(c))},error:f,update:function(t){i(l,e,t),Z.update(d,!1,!0)}})});return Object.keys(n(v)).reduce(function(t,e){return t[e]=o(v,e),t},{})})}},_e=Re({getOutput:function(){return{}},getCount:function(t){return Object.keys(t).length},getFirst:function(t){return t[Object.keys(t)[0]]},mapApi:function(t,e){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return Object.keys(t).reduce(function(r,o){var i;return t[o][e]&&(r[o]=n[0]&&void 0!==n[0][o]?t[o][e](n[0][o]):(i=t[o])[e].apply(i,n)),r},{})}},setProp:function(t,e,n){return t[e]=n},startActions:function(t,e){return Object.keys(t).reduce(function(n,r){return n[r]=e(t[r],r),n},{})}}),Le=Re({getOutput:function(){return[]},getCount:function(t){return t.length},getFirst:function(t){return t[0]},mapApi:function(t,e){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return t.map(function(t,r){if(t[e])return Array.isArray(n[0])?t[e](n[0][r]):t[e].apply(t,n)})}},setProp:function(t,e,n){return t[e]=n},startActions:function(t,e){return t.map(function(t,n){return e(t,n)})}}),Te=[m,g,v,y,b],Ye=function(t){return Te.find(function(e){return e.test(t)})},Ae=function(t,e){return t(e)},Ve=function(t,e,n){var r=e[n[0]].map(function(r,i){var u=n.reduce(function(t){return function(e,n){return e[n]=e[n][t],e}}(i),o({},e));return We(r)(t,u)});return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Le(t)}.apply(void 0,r)},De=function(t,e,n){var r=n[0],i=Object.keys(e[r]).reduce(function(i,u){var a=n.reduce(function(t){return function(e,n){return e[n]=e[n][t],e}}(u),o({},e));return i[u]=We(e[r][u])(t,a),i},{});return _e(i)},Xe=function(t,e){var n=e.from,r=e.to,u=i(e,["from","to"]),a=Ye(n)||Ye(r),s=a.transform,c=a.parse;return t(o({},u,{from:"string"==typeof n?c(n):n,to:"string"==typeof r?c(r):r})).pipe(s)},He=function(t,e){var n=e.from,r=e.to,u=i(e,["from","to"]);return t(o({},u,{from:0,to:1})).pipe(_t(n,r),R.transform)},Fe=function(t,e){var n=e.from,r=e.to,u=i(e,["from","to"]),a=Y(n);return a(n),Y(r)(n),t(o({},u,{from:0,to:1})).pipe(Yt(T(n),T(r)),a)},ze=function(t,e){var n=function(t){var e=Object.keys(t),n=function(e,n){return void 0!==e&&!t[n](e)};return{getVectorKeys:function(t){return e.reduce(function(e,r){return n(t[r],r)&&e.push(r),e},[])},testVectorProps:function(t){return t&&e.some(function(e){return n(t[e],e)})}}}(e),r=n.testVectorProps,o=n.getVectorKeys;return function(e){if(!r(e))return t(e);var n=o(e);return We(e[n[0]])(t,e,n)}},We=function(t){var e=Ae;return"number"==typeof t?e=Ae:Array.isArray(t)?e=Ve:function(t){return Boolean(Ye(t))}(t)?e=Xe:R.test(t)?e=He:function(t){if("string"!=typeof t||!isNaN(t))return!1;var e=0,n=t.match(_),r=t.match(L);return n&&(e+=n.length),r&&(e+=r.length),e>0}(t)?e=Fe:"object"==typeof t&&(e=De),e},qe=ze(function(t){return void 0===t&&(t={}),Se(function(e){var n=e.complete,r=e.update,o=t.velocity,i=t.from,u=t.power,a=t.timeConstant,s=void 0===a?350:a,c=t.restDelta,f=void 0===c?.5:c,p=t.modifyTarget,l=0,d=(void 0===u?.8:u)*(void 0===o?0:o),h=Math.round((void 0===i?0:i)+d),v=void 0===p?h:p(h),g=Z.update(function(t){var e=-d*Math.exp(-(l+=t.delta)/s),o=e>f||e<-f;r(o?v+e:v),o||($.update(g),n())},!0);return{stop:function(){return $.update(g)}}})},{from:p.test,modifyTarget:function(t){return"function"==typeof t},velocity:p.test}),Ie=ze(function(t){return void 0===t&&(t={}),Se(function(e){var n=e.update,r=e.complete,o=t.velocity,i=void 0===o?0:o,u=t.from,a=void 0===u?0:u,s=t.to,c=void 0===s?0:s,f=t.stiffness,p=void 0===f?100:f,l=t.damping,d=void 0===l?10:l,h=t.mass,v=void 0===h?1:h,g=t.restSpeed,m=void 0===g?.01:g,y=t.restDelta,b=void 0===y?.01:y,w=i?-i/1e3:0,O=0,P=c-a,x=a,S=x,M=Z.update(function(t){var e=t.delta;O+=e;var o=d/(2*Math.sqrt(p*v)),u=Math.sqrt(p/v)/1e3;if(S=x,o<1){var a=Math.exp(-o*u*O),s=u*Math.sqrt(1-o*o);x=c-a*((w+o*u*P)/s*Math.sin(s*O)+P*Math.cos(s*O))}else a=Math.exp(-u*O),x=c-a*(P+(w+u*P)*O);i=Ht(x-S,e);var f=Math.abs(i)<=m,l=Math.abs(c-x)<=b;f&&l?(n(x=c),$.update(M),r()):n(x)},!0);return{stop:function(){return $.update(M)}}})},{from:p.test,to:p.test,stiffness:p.test,damping:p.test,mass:p.test,velocity:p.test}),Ue=ze(function(t){var e=t.from,n=void 0===e?0:e,r=t.velocity,i=void 0===r?0:r,u=t.min,a=t.max,s=t.power,c=void 0===s?.8:s,f=t.timeConstant,p=void 0===f?700:f,l=t.bounceStiffness,d=void 0===l?500:l,h=t.bounceDamping,v=void 0===h?10:h,g=t.restDelta,m=void 0===g?1:g,y=t.modifyTarget;return Se(function(t){var e,r=t.update,s=t.complete,f=Ee(n),l=!1,h=function(t){return void 0!==u&&t<=u},g=function(t){return void 0!==a&&t>=a},b=function(t){return h(t)||g(t)},w=function(t,e){return h(t)&&e<0||g(t)&&e>0},O=function(t,n){e&&e.stop(),e=t.start({update:function(t){return f.update(t)},complete:function(){s(),n&&n()}})},P=function(t){l=!0,O(Ie(o({},t,{to:h(t.from)?u:a,stiffness:d,damping:v,restDelta:m})))};if(f.subscribe(function(t){r(t);var n=f.getVelocity();e&&!l&&w(t,n)&&P({from:t,velocity:n})}),b(n)&&0===i||w(n,i))P({from:n,velocity:i});else{var x=qe({from:n,velocity:i,timeConstant:p,power:c,restDelta:b(n)?20:m,modifyTarget:y});O(x,function(){var t=f.get();b(t)&&P({from:t,velocity:f.getVelocity()})})}return{stop:function(){return e&&e.stop()}}})},{from:p.test,velocity:p.test,min:p.test,max:p.test,damping:p.test,stiffness:p.test,modifyTarget:function(t){return"function"==typeof t}}),Ze=ze(function(t){var e=t.from,n=void 0===e?0:e,r=t.to,o=void 0===r?1:r,i=t.ease,u=void 0===i?J:i;return Se(function(t){var e=t.update;return{seek:function(t){return e(t)}}}).pipe(u,function(t){return kt(n,o,t)})},{ease:function(t){return"function"==typeof t},from:p.test,to:p.test}),$e=wt(0,1),Ne=function(t,e,n){return Se(function(r){var o=r.update,i=e.split(" ").map(function(e){return t.addEventListener(e,o,n),e});return{stop:function(){return i.forEach(function(e){return t.removeEventListener(e,o,n)})}}})},Ge=function(){return{clientX:0,clientY:0,pageX:0,pageY:0,x:0,y:0}},Ke=function(t,e){return void 0===e&&(e={clientX:0,clientY:0,pageX:0,pageY:0,x:0,y:0}),e.clientX=e.x=t.clientX,e.clientY=e.y=t.clientY,e.pageX=t.pageX,e.pageY=t.pageY,e},Je=[Ge()],Qe=!1;"undefined"!=typeof document&&Ne(document,"touchstart touchmove",{passive:!0,capture:!0}).start(function(t){var e=t.touches;Qe=!0;var n=e.length;Je.length=0;for(var r=0;r<n;r++)Je.push(Ke(e[r]))});var tn=Ge(),en=!1;"undefined"!=typeof document&&Ne(document,"mousedown mousemove",!0).start(function(t){en=!0,Ke(t,tn)});var nn=function(t){return t[0]},rn=function(t){return void 0===t&&(t={}),Qe?(e=t,n=void 0===e?{}:e,r=n.preventDefault,o=void 0===r||r,i=n.scale,u=void 0===i?1:i,a=n.rotate,s=void 0===a?0:a,Se(function(t){var e=t.update,n={touches:Je,scale:u,rotate:s},r=0,i=0,a=Je.length>1;if(a){var c=Je[0],f=Je[1];r=Mt(c,f),i=mt(c,f)}var p=function(){if(a){var t=Je[0],o=Je[1],c=Mt(t,o),f=mt(t,o);n.scale=u*(c/r),n.rotate=s+(f-i)}e(n)},l=Ne(document,"touchmove",{passive:!o}).start(function(t){(o||t.touches.length>1)&&t.preventDefault(),Z.update(p)});return Qe&&Z.update(p),{stop:function(){$.update(p),l.stop()}}})).pipe(function(t){return t.touches},nn):function(e){var n=(void 0===t?{}:t).preventDefault,r=void 0===n||n;return Se(function(t){var e=t.update,n=function(){return e(tn)},o=Ne(document,"mousemove").start(function(t){r&&t.preventDefault(),Z.update(n)});return en&&Z.update(n),{stop:function(){$.update(n),o.stop()}}})}();var e,n,r,o,i,u,a,s},on=!1;if("undefined"!=typeof window){var un={get passive(){on=!0}};window.addEventListener("testPassive",null,un),window.removeEventListener("testPassive",null,un)}var an,sn,cn="undefined"!=typeof window&&window.navigator&&window.navigator.platform&&/iP(ad|hone|od)/.test(window.navigator.platform),fn=[],pn=!1,ln=-1,dn=function(t){return fn.some(function(e){return!(!e.options.allowTouchMove||!e.options.allowTouchMove(t))})},hn=function(t){var e=t||window.event;return!!dn(e.target)||e.touches.length>1||(e.preventDefault&&e.preventDefault(),!1)},vn=function(){setTimeout(function(){void 0!==sn&&(document.body.style.paddingRight=sn,sn=void 0),void 0!==an&&(document.body.style.overflow=an,an=void 0)})},gn=Ce.getValueFromProgress,mn=function(){function t(){var t=this;this.subscriptions=[],this.dragging=!1,this.progress=0,this.arrow=!1,this.initialPosition="bottom",this.onValueChange=function(e){t.progress=1-e/t.boundaryHeight,t._screen.progress=t.progress},this.boundaryHeight=0,this.setBoundariesHeight=function(){t.boundaryHeight=t.containerEl.getBoundingClientRect().height-t.sheetEl.getBoundingClientRect().height}}return t.prototype.draggingChanged=function(){(this.dragging?function(t,e){if(cn){if(!t)return void console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");t&&!fn.some(function(e){return e.targetElement===t})&&(fn=fn.concat([{targetElement:t,options:e||{}}]),t.ontouchstart=function(t){1===t.targetTouches.length&&(ln=t.targetTouches[0].clientY)},t.ontouchmove=function(e){1===e.targetTouches.length&&function(t,e){var n=t.targetTouches[0].clientY-ln;!dn(t.target)&&(e&&0===e.scrollTop&&n>0?hn(t):function(t){return!!t&&t.scrollHeight-t.scrollTop<=t.clientHeight}(e)&&n<0?hn(t):t.stopPropagation())}(e,t)},pn||(document.addEventListener("touchmove",hn,on?{passive:!1}:void 0),pn=!0))}else!function(t){setTimeout(function(){if(void 0===sn){var e=window.innerWidth-document.documentElement.clientWidth;t&&!0===t.reserveScrollBarGap&&e>0&&(sn=document.body.style.paddingRight,document.body.style.paddingRight=e+"px")}void 0===an&&(an=document.body.style.overflow,document.body.style.overflow="hidden")})}(e),fn=fn.concat([{targetElement:t,options:e||{}}])}:function(t){if(cn){if(!t)return void console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.");t.ontouchstart=null,t.ontouchmove=null,fn=fn.filter(function(e){return e.targetElement!==t}),pn&&0===fn.length&&(document.removeEventListener("touchmove",hn,on?{passive:!1}:void 0),pn=!1)}else 1===fn.length&&fn[0].targetElement===t?(vn(),fn=[]):fn=fn.filter(function(e){return e.targetElement!==t})})(this.containerEl)},t.prototype.animateSheet=function(t,e){return __awaiter(this,void 0,void 0,function(){var n,r,o=this;return __generator(this,function(i){return(r=(n=this.sheetY).get())===t?[2,Promise.resolve()]:[2,new Promise(function(i){var u,a=Object.assign({from:r,to:t},e),s=o.sheetY.subscribe(function(t){if(t===a.to)return i(),void s.unsubscribe()});(u=a,void 0===u&&(u={}),Se(function(t){var e,n=t.update,r=t.complete,o=u.duration,i=void 0===o?300:o,a=u.ease,s=void 0===a?Q:a,c=u.flip,f=void 0===c?0:c,p=u.loop,l=void 0===p?0:p,d=u.yoyo,h=void 0===d?0:d,v=u.from,g=void 0===v?0:v,m=u.to,y=void 0===m?1:m,b=u.elapsed,w=void 0===b?0:b,O=u.playDirection,P=void 0===O?1:O,x=u.flipCount,S=void 0===x?0:x,M=u.yoyoCount,C=void 0===M?0:M,k=u.loopCount,j=void 0===k?0:k,B=Ze({from:g,to:y,ease:s}).start(n),E=0,R=!1,_=function(){return P*=-1},L=function(){E=$e(Ct(0,i,w)),B.seek(E)},T=function(){R=!0,e=Z.update(function(t){w+=t.delta*P,L(),function(){var t,e=1===P?R&&w>=i:R&&w<=0;if(!e)return!1;if(e&&!l&&!f&&!h)return!0;var r=!1;return l&&j<l?(w=0,j++,r=!0):f&&S<f?(w=i-w,B=Ze({from:g=(t=[y,g])[0],to:y=t[1],ease:s}).start(n),S++,r=!0):h&&C<h&&(_(),C++,r=!0),!r}()&&r&&($.update(e),Z.update(r,!1,!0))},!0)},Y=function(){R=!1,e&&$.update(e)};return T(),{isActive:function(){return R},getElapsed:function(){return wt(0,i,w)},getProgress:function(){return E},stop:function(){Y()},pause:function(){return Y(),this},resume:function(){return R||T(),this},seek:function(t){return w=kt(0,i,t),Z.update(L,!1,!0),this},reverse:function(){return _(),this}}})).start(n)})]})})},t.prototype.open=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.animateSheet(0,{ease:lt(.23,1,.32,1)})]})})},t.prototype.close=function(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(t){return[2,this.animateSheet(this.boundaryHeight,{ease:lt(.23,1,.32,1)})]})})},t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,function(){var t;return __generator(this,function(e){switch(e.label){case 0:return t=this,[4,this.screen.componentOnReady()];case 1:return t._screen=e.sent(),[2]}})})},t.prototype.componentDidLoad=function(){var t,e=this;this._screen.connectedBottomSheet=this.element,this.setBoundariesHeight(),this.sheetStyler=function(t,e){return ye.has(t)?ye.get(t):be(t,e)}("string"==typeof(t=this.sheetEl)?document.querySelector(t):t,void 0),this.sheetY=Ee("bottom"===this.initialPosition?this.boundaryHeight:0,function(t){return e.sheetStyler.set("y",t)}),this.subscriptions=this.subscriptions.concat([this.sheetY.subscribe(this.onValueChange)]),Ne(this.sheetEl,"mousedown touchstart").start(function(){e.dragging=!0;var t=e.boundaryHeight;e.pointer=function(t){void 0===t&&(t={});var e=t.x,n=t.y,r=i(t,["x","y"]);if(void 0!==e||void 0!==n){var o=yt(e||0),u=yt(n||0),a={x:0,y:0};return rn(r).pipe(function(t){return a.x=o(t.x),a.y=u(t.y),a})}return rn(r)}({y:e.sheetY.get()}).pipe(function(t){return t.y},function(e){return e<0?gn(0,e,.2):e>t?gn(t,e,.2):e}),e.pointer.start(e.sheetY)}),Ne(document,"mouseup touchend").start(function(){e.dragging=!1,e.intertia=Ue({min:0,max:e.boundaryHeight,from:e.sheetY.get(),velocity:e.sheetY.getVelocity(),power:.2,bounceStiffness:400,bounceDamping:22.5}),e.intertia.start(e.sheetY)})},t.prototype.componentDidUnload=function(){for(var t=0,e=this.subscriptions;t<e.length;t++)e[t].unsubscribe();this.subscriptions=void 0,cn?(fn.forEach(function(t){t.targetElement.ontouchstart=null,t.targetElement.ontouchmove=null}),pn&&(document.removeEventListener("touchmove",hn,on?{passive:!1}:void 0),pn=!1),fn=[],ln=-1):(vn(),fn=[])},t.prototype.resizeHandler=function(){console.log("resize"),this.setBoundariesHeight()},t.prototype.hostData=function(){return{class:{"is-dragging":this.dragging,"is-closed":this.progress<=.09,"is-open":this.progress>=.99},style:{"--progress":""+this.progress}}},t.prototype.render=function(){var t=this;return e("div",{class:"container",ref:function(e){return t.containerEl=e}},e("div",{class:"sheet",ref:function(e){return t.sheetEl=e}},e("div",{class:"sheet-header"},this.arrow&&e("bottom-sheet-indicator",null),e("slot",{name:"sheet-header"})),e("div",{class:"sheet-content"},e("slot",null))))},Object.defineProperty(t,"is",{get:function(){return"bottom-sheet"},enumerable:!0,configurable:!0}),Object.defineProperty(t,"encapsulation",{get:function(){return"shadow"},enumerable:!0,configurable:!0}),Object.defineProperty(t,"properties",{get:function(){return{arrow:{type:Boolean,attr:"arrow"},close:{method:!0},dragging:{state:!0,watchCallbacks:["draggingChanged"]},element:{elementRef:!0},initialPosition:{type:String,attr:"initial-position"},open:{method:!0},progress:{state:!0},screen:{connect:"bottom-sheet-screen"}}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"listeners",{get:function(){return[{name:"window:resize",method:"resizeHandler",passive:!0}]},enumerable:!0,configurable:!0}),Object.defineProperty(t,"style",{get:function(){return"*{-webkit-box-sizing:border-box;box-sizing:border-box}:host{--snap-top-offset:15vh;--snap-bottom-height:64px;--sheet-max-width:none;--sheet-box-shadow:0 -2px 4px 0 rgba(0,0,0,0.03),0 -6px 12px 0 rgba(0,0,0,0.03);--sheet-box-shadow-closed:var(--sheet-box-shadow);--sheet-box-shadow-open:var(--sheet-box-shadow);--sheet-background-color:#fff;--sheet-border-radius:8px;--sheet-content-padding:12px;--sheet-content-padding-top:var(--sheet-content-padding);--sheet-content-padding-right:var(--sheet-content-padding);--sheet-content-padding-bottom:var(--sheet-content-padding);--sheet-content-padding-left:var(--sheet-content-padding);--sheet-indicator-size:24px;--sheet-indicator-color:rgba(0,0,0,0.54);--sheet-z-index:9;display:block;position:fixed;top:var(--snap-top-offset);right:0;bottom:calc(-100vh + calc(var(--snap-top-offset) - var(--snap-bottom-height)));left:0;pointer-events:none;z-index:var(--sheet-z-index)}.container{height:100%;margin:0 auto;max-width:var(--sheet-max-width)}.sheet{pointer-events:all;display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;background:var(--sheet-background-color);height:calc(calc(100vh + calc(var(--snap-bottom-height) * 2)) - var(--snap-top-offset));padding-bottom:var(--snap-bottom-height);overflow:hidden;border-top-left-radius:var(--sheet-border-radius);border-top-right-radius:var(--sheet-border-radius);-webkit-box-shadow:var(--sheet-box-shadow);box-shadow:var(--sheet-box-shadow)}:host(.is-closed) .sheet{-webkit-box-shadow:var(--sheet-box-shadow-closed);box-shadow:var(--sheet-box-shadow-closed)}:host(.is-open) .sheet{-webkit-box-shadow:var(--sheet-box-shadow-open);box-shadow:var(--sheet-box-shadow-open)}.sheet-header{padding:var(--sheet-content-padding-top) var(--sheet-content-padding-right) 0 var(--sheet-content-padding-left)}.sheet-content{-ms-flex-positive:1;flex-grow:1;margin-bottom:var(--snap-bottom-height);padding:0 var(--sheet-content-padding-right) var(--sheet-content-padding-bottom) var(--sheet-content-padding-left)}h1{margin:0}"},enumerable:!0,configurable:!0}),t}(),yn=function(){function t(){}return t.prototype.render=function(){return e("div",null,e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},e("path",{d:"M256 294.1L383 167c9.4-9.4 24.6-9.4 33.9 0s9.3 24.6 0 34L273 345c-9.1 9.1-23.7 9.3-33.1.7L95 201.1c-4.7-4.7-7-10.9-7-17s2.3-12.3 7-17c9.4-9.4 24.6-9.4 33.9 0l127.1 127z"})))},Object.defineProperty(t,"is",{get:function(){return"bottom-sheet-indicator"},enumerable:!0,configurable:!0}),Object.defineProperty(t,"encapsulation",{get:function(){return"shadow"},enumerable:!0,configurable:!0}),Object.defineProperty(t,"style",{get:function(){return":host{display:block}div{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;margin:0 auto var(--sheet-content-padding-bottom) auto;-webkit-transform:rotate(calc(var(--progress) * -180deg));transform:rotate(calc(var(--progress) * -180deg));color:var(--sheet-indicator-color)}div,svg{width:var(--sheet-indicator-size);height:var(--sheet-indicator-size)}svg{fill:currentColor}"},enumerable:!0,configurable:!0}),t}(),bn=function(){function t(){this.enabled=!1,this.progress=0}return t.prototype.connectedBottomSheetChanged=function(){console.log("connectedBottomSheet changed to ",this.connectedBottomSheet)},t.prototype.componentDidLoad=function(){this.connectedBottomSheetChanged()},t.prototype.progressChanged=function(){this.enabled=this.progress>0,console.log(this.enabled,this.progress)},t.prototype.enable=function(){this.enabled=!0},t.prototype.disable=function(){this.enabled=!1},t.prototype.clickHandler=function(){this.connectedBottomSheet.close()},t.prototype.hostData=function(){return{style:{pointerEvents:this.enabled?"all":"none",opacity:""+this.progress}}},Object.defineProperty(t,"is",{get:function(){return"bottom-sheet-screen"},enumerable:!0,configurable:!0}),Object.defineProperty(t,"encapsulation",{get:function(){return"shadow"},enumerable:!0,configurable:!0}),Object.defineProperty(t,"properties",{get:function(){return{connectedBottomSheet:{type:"Any",attr:"connected-bottom-sheet",watchCallbacks:["connectedBottomSheetChanged"]},disable:{method:!0},enable:{method:!0},enabled:{state:!0},progress:{type:Number,attr:"progress",watchCallbacks:["progressChanged"]}}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"listeners",{get:function(){return[{name:"click",method:"clickHandler"}]},enumerable:!0,configurable:!0}),Object.defineProperty(t,"style",{get:function(){return":host{display:block;position:absolute;top:0;right:0;bottom:0;left:0;z-index:calc(var(--sheet-z-index, 9) - 1);background-color:var(--sheet-screen-background,rgba(0,0,0,.4))}"},enumerable:!0,configurable:!0}),t}();t.BottomSheet=mn,t.BottomSheetIndicator=yn,t.BottomSheetScreen=bn,Object.defineProperty(t,"__esModule",{value:!0})});