diff --git a/README.md b/README.md index 4355069..a529d90 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ## Welcome to GitHub Pages -You can use the [editor on GitHub](https://github.com/HiltonWS/hiltonws.github.io/edit/master/README.md) to maintain and preview the content for your website in Markdown files. +You can use the [editor on GitHub](https://github.com/HiltonWS/hiltonws.github.io/edit/1.1.1/README.md) to maintain and preview the content for your website in Markdown files. Whenever you commit to this repository, GitHub Pages will run [Jekyll](https://jekyllrb.com/) to rebuild the pages in your site, from the content in your Markdown files. diff --git a/smile/404.html b/smile/404.html index d0af8a7..69ff08a 100644 --- a/smile/404.html +++ b/smile/404.html @@ -1 +1 @@ -

404 - Page Not Found

\ No newline at end of file +

404 - Page Not Found

\ No newline at end of file diff --git a/smile/500.html b/smile/500.html index 11e6742..cb9d409 100644 --- a/smile/500.html +++ b/smile/500.html @@ -1 +1 @@ -

500 - Internal error

\ No newline at end of file +

500 - Internal error

\ No newline at end of file diff --git a/smile/index.html b/smile/index.html index 82d3871..fd15522 100644 --- a/smile/index.html +++ b/smile/index.html @@ -1 +1 @@ -Smile

Smile

← Back to home
\ No newline at end of file +Smile

Smile

← Back to home
\ No newline at end of file diff --git a/smile/static/chunks/3ef630e34cd10ba68f9d468ac363ff81c534e1e9.0dd835c32f8e6b3bdd7e.js b/smile/static/chunks/3ef630e34cd10ba68f9d468ac363ff81c534e1e9.0dd835c32f8e6b3bdd7e.js index 4af9812..1a5f551 100644 --- a/smile/static/chunks/3ef630e34cd10ba68f9d468ac363ff81c534e1e9.0dd835c32f8e6b3bdd7e.js +++ b/smile/static/chunks/3ef630e34cd10ba68f9d468ac363ff81c534e1e9.0dd835c32f8e6b3bdd7e.js @@ -1 +1 @@ -(window.webpackJsonp_N_E=window.webpackJsonp_N_E||[]).push([[2],{"/XDo":function(t,e,r){"use strict";e.__esModule=!0,e.getRouteMatcher=function(t){var e=t.re,r=t.groups;return function(t){var n=e.exec(t);if(!n)return!1;var o=function(t){try{return decodeURIComponent(t)}catch(r){var e=new Error("failed to decode param");throw e.code="DECODE_FAILED",e}},a={};return Object.keys(r).forEach((function(t){var e=r[t],i=n[e.pos];void 0!==i&&(a[t]=~i.indexOf("/")?i.split("/").map((function(t){return o(t)})):e.repeat?[o(i)]:o(i))})),a}}},"29pC":function(t,e,r){"use strict";var n=r("J4zp");function o(t){return"string"===typeof t||"number"===typeof t&&!isNaN(t)||"boolean"===typeof t?String(t):""}e.__esModule=!0,e.searchParamsToUrlQuery=function(t){var e={};return t.forEach((function(t,r){"undefined"===typeof e[r]?e[r]=t:Array.isArray(e[r])?e[r].push(t):e[r]=[e[r],t]})),e},e.urlQueryToSearchParams=function(t){var e=new URLSearchParams;return Object.entries(t).forEach((function(t){var r=n(t,2),a=r[0],i=r[1];Array.isArray(i)?i.forEach((function(t){return e.append(a,o(t))})):e.set(a,o(i))})),e},e.assign=function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n>>0,1)},emit:function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o1&&void 0!==arguments[1]?arguments[1]:"",r="/"===t?"/index":/^\/index(\/|$)/.test(t)?"/index".concat(t):"".concat(t);return r+e}},J4zp:function(t,e,r){var n=r("wTVA"),o=r("m0LI"),a=r("ZhPi"),i=r("wkBT");t.exports=function(t,e){return n(t)||o(t,e)||a(t,e)||i()}},R3d8:function(t,e,r){"use strict";function n(t){return t.replace(/\\/g,"/")}e.__esModule=!0,e.normalizePathSep=n,e.denormalizePagePath=function(t){(t=n(t)).startsWith("/index/")?t=t.slice(6):"/index"===t&&(t="/");return t}},SksO:function(t,e){function r(e,n){return t.exports=r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},r(e,n)}t.exports=r},TTnN:function(t,e,r){"use strict";var n=r("o0o1"),o=r("yXPU"),a=r("lwsE"),i=r("W8MJ"),s=r("J4zp");e.__esModule=!0,e.getDomainLocale=function(t,e,r,n){0;return!1},e.addLocale=_,e.delLocale=x,e.hasBasePath=k,e.addBasePath=S,e.delBasePath=E,e.isLocalURL=R,e.interpolateAs=L,e.resolveHref=O,e.default=void 0;var u=r("vuub"),c=r("pqeP"),l=r("R3d8"),f=(r("Ew7H"),w(r("Dg51"))),h=r("n3/+"),p=r("YKD2"),d=r("AO3j"),v=r("29pC"),y=w(r("lpVY")),m=r("/XDo"),g=r("99D5");function w(t){return t&&t.__esModule?t:{default:t}}function b(){return Object.assign(new Error("Route Cancelled"),{cancelled:!0})}function _(t,e,r){return t}function x(t,e){return t}function P(t){var e=t.indexOf("?"),r=t.indexOf("#");return(e>-1||r>-1)&&(t=t.substring(0,e>-1?e:r)),t}function k(t){return""===(t=P(t))||t.startsWith("/")}function S(t){return function(t,e){return e&&t.startsWith("/")?"/"===t?(0,u.normalizePathTrailingSlash)(e):"".concat(e).concat("/"===P(t)?t.substring(1):t):t}(t,"")}function E(t){return(t=t.slice("".length)).startsWith("/")||(t="/".concat(t)),t}function R(t){if(t.startsWith("/")||t.startsWith("#"))return!0;try{var e=(0,h.getLocationOrigin)(),r=new URL(t,e);return r.origin===e&&k(r.pathname)}catch(n){return!1}}function L(t,e,r){var n="",o=(0,g.getRouteRegex)(t),a=o.groups,i=(e!==t?(0,m.getRouteMatcher)(o)(e):"")||r;n=t;var s=Object.keys(a);return s.every((function(t){var e=i[t]||"",r=a[t],o=r.repeat,s=r.optional,u="[".concat(o?"...":"").concat(t,"]");return s&&(u="".concat(e?"":"/","[").concat(u,"]")),o&&!Array.isArray(e)&&(e=[e]),(s||t in i)&&(n=n.replace(u,o?e.map((function(t){return encodeURIComponent(t)})).join("/"):encodeURIComponent(e))||"/")}))||(n=""),{params:s,result:n}}function C(t,e){var r={};return Object.keys(t).forEach((function(n){e.includes(n)||(r[n]=t[n])})),r}function O(t,e,r){var n=new URL(t,"http://n"),o="string"===typeof e?e:(0,h.formatWithValidation)(e);if(!R(o))return r?[o]:o;try{var a=new URL(o,n);a.pathname=(0,u.normalizePathTrailingSlash)(a.pathname);var i="";if((0,p.isDynamicRoute)(a.pathname)&&a.searchParams&&r){var s=(0,v.searchParamsToUrlQuery)(a.searchParams),c=L(a.pathname,a.pathname,s),l=c.result,f=c.params;l&&(i=(0,h.formatWithValidation)({pathname:l,hash:a.hash,query:C(s,f)}))}var d=a.origin===n.origin?a.href.slice(a.origin.length):a.href;return r?[d,i||d]:d}catch(y){return r?[o]:o}}function T(t){var e=(0,h.getLocationOrigin)();return t.startsWith(e)?t.substring(e.length):t}function j(t,e,r){var n=O(t.pathname,e,!0),o=s(n,2),a=o[0],i=o[1],u=(0,h.getLocationOrigin)(),c=a.startsWith(u),l=i&&i.startsWith(u);a=T(a),i=i?T(i):i;var f=c?a:S(a),p=r?T(O(t.pathname,r)):i||a;return{url:f,as:l?p:S(p)}}function A(t,e){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=t.pathname,o=(0,u.removePathTrailingSlash)((0,l.denormalizePagePath)(r?E(n):n));return"/404"===o||"/_error"===o||(e.includes(o)||e.some((function(e){if((0,p.isDynamicRoute)(e)&&(0,g.getRouteRegex)(e).re.test(o))return t.pathname=r?S(e):e,!0})),t.pathname=(0,u.removePathTrailingSlash)(t.pathname)),t}var I=Symbol("SSG_DATA_NOT_FOUND");function D(t,e){return fetch(t,{credentials:"same-origin"}).then((function(r){if(!r.ok){if(e>1&&r.status>=500)return D(t,e-1);if(404===r.status)return r.json().then((function(t){if(t.notFound)return{notFound:I};throw new Error("Failed to load static props")}));throw new Error("Failed to load static props")}return r.json()}))}function N(t,e){return D(t,e?3:1).catch((function(t){throw e||(0,c.markAssetError)(t),t}))}var M=function(){function t(e,r,n,o){var i=this,s=o.initialProps,c=o.pageLoader,l=o.App,f=o.wrapApp,v=o.Component,y=o.err,m=o.subscription,g=o.isFallback,w=o.locale,b=(o.locales,o.defaultLocale,o.domainLocales,o.isPreview);a(this,t),this.route=void 0,this.pathname=void 0,this.query=void 0,this.asPath=void 0,this.basePath=void 0,this.components=void 0,this.sdc={},this.sdr={},this.sub=void 0,this.clc=void 0,this.pageLoader=void 0,this._bps=void 0,this.events=void 0,this._wrapApp=void 0,this.isSsr=void 0,this.isFallback=void 0,this._inFlightRoute=void 0,this._shallow=void 0,this.locale=void 0,this.locales=void 0,this.defaultLocale=void 0,this.domainLocales=void 0,this.isReady=void 0,this.isPreview=void 0,this.isLocaleDomain=void 0,this._idx=0,this.onPopState=function(t){var e=t.state;if(e){if(e.__N){var r=e.url,n=e.as,o=e.options,a=e.idx;i._idx=a;var s=(0,d.parseRelativeUrl)(r).pathname;i.isSsr&&n===i.asPath&&s===i.pathname||i._bps&&!i._bps(e)||i.change("replaceState",r,n,Object.assign({},o,{shallow:o.shallow&&i._shallow,locale:o.locale||i.defaultLocale}),undefined)}}else{var u=i.pathname,c=i.query;i.changeState("replaceState",(0,h.formatWithValidation)({pathname:S(u),query:c}),(0,h.getURL)())}},this.route=(0,u.removePathTrailingSlash)(e),this.components={},"/_error"!==e&&(this.components[this.route]={Component:v,initial:!0,props:s,err:y,__N_SSG:s&&s.__N_SSG,__N_SSP:s&&s.__N_SSP}),this.components["/_app"]={Component:l,styleSheets:[]},this.events=t.events,this.pageLoader=c,this.pathname=e,this.query=r;var _=(0,p.isDynamicRoute)(e)&&self.__NEXT_DATA__.autoExport;this.asPath=_?e:n,this.basePath="",this.sub=m,this.clc=null,this._wrapApp=f,this.isSsr=!0,this.isFallback=g,this.isReady=!(!self.__NEXT_DATA__.gssp&&!self.__NEXT_DATA__.gip&&(_||self.location.search)),this.isPreview=!!b,this.isLocaleDomain=!1,"//"!==n.substr(0,2)&&this.changeState("replaceState",(0,h.formatWithValidation)({pathname:S(e),query:r}),(0,h.getURL)(),{locale:w}),window.addEventListener("popstate",this.onPopState)}return i(t,[{key:"reload",value:function(){window.location.reload()}},{key:"back",value:function(){window.history.back()}},{key:"push",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};var n=j(this,t,e);return t=n.url,e=n.as,this.change("pushState",t,e,r)}},{key:"replace",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=j(this,t,e);return t=n.url,e=n.as,this.change("replaceState",t,e,r)}},{key:"change",value:function(){var e=o(n.mark((function e(r,o,a,i,s){var l,f,v,y,w,b,P,O,T,D,N,M,U,W,F,q,G,B,V,z,H,X,J,Y,$,Q,K,Z,tt,et,rt,nt,ot,at,it;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(R(o)){e.next=3;break}return window.location.href=o,e.abrupt("return",!1);case 3:i._h&&(this.isReady=!0),i.scroll=!(null!=(l=i.scroll)&&!l),f=i.locale!==this.locale,e.next=18;break;case 18:if(i._h||(this.isSsr=!1),h.ST&&performance.mark("routeChange"),v=i.shallow,y={shallow:void 0!==v&&v},this._inFlightRoute&&this.abortComponentLoad(this._inFlightRoute,y),a=S(_(k(a)?E(a):a,i.locale,this.defaultLocale)),w=x(k(a)?E(a):a,this.locale),this._inFlightRoute=a,i._h||!this.onlyAHashChange(w)){e.next=34;break}return this.asPath=w,t.events.emit("hashChangeStart",a,y),this.changeState(r,o,a,i),this.scrollToHash(w),this.notify(this.components[this.route],null),t.events.emit("hashChangeComplete",a,y),e.abrupt("return",!0);case 34:return b=(0,d.parseRelativeUrl)(o),O=(P=b).pathname,T=P.query,e.prev=36,e.next=39,this.pageLoader.getPageList();case 39:return D=e.sent,e.next=42,(0,c.getClientBuildManifest)();case 42:N=e.sent,N.__rewrites,e.next=50;break;case 46:return e.prev=46,e.t0=e.catch(36),window.location.href=a,e.abrupt("return",!1);case 50:if((b=A(b,D)).pathname!==O&&(O=b.pathname,o=(0,h.formatWithValidation)(b)),O=O?(0,u.removePathTrailingSlash)(E(O)):O,this.urlIsNew(w)||f||(r="replaceState"),M=(0,u.removePathTrailingSlash)(O),U=a,R(a)){e.next=62;break}e.next=60;break;case 60:return window.location.href=a,e.abrupt("return",!1);case 62:if(U=x(E(U),this.locale),!(0,p.isDynamicRoute)(M)){e.next=78;break}if(W=(0,d.parseRelativeUrl)(U),F=W.pathname,q=(0,g.getRouteRegex)(M),G=(0,m.getRouteMatcher)(q)(F),V=(B=M===F)?L(M,F,T):{},G&&(!B||V.result)){e.next=77;break}if(!((z=Object.keys(q.groups).filter((function(t){return!T[t]}))).length>0)){e.next=75;break}throw new Error((B?"The provided `href` (".concat(o,") value is missing query values (").concat(z.join(", "),") to be interpolated properly. "):"The provided `as` value (".concat(F,") is incompatible with the `href` value (").concat(M,"). "))+"Read more: https://err.sh/vercel/next.js/".concat(B?"href-interpolation-failed":"incompatible-href-as"));case 75:e.next=78;break;case 77:B?a=(0,h.formatWithValidation)(Object.assign({},W,{pathname:V.result,query:C(T,V.params)})):Object.assign(T,G);case 78:return t.events.emit("routeChangeStart",a,y),e.prev=79,e.next=82,this.getRouteInfo(M,O,T,a,U,y);case 82:if(J=e.sent,$=(Y=J).error,Q=Y.props,K=Y.__N_SSG,Z=Y.__N_SSP,!K&&!Z||!Q){e.next=109;break}if(!Q.pageProps||!Q.pageProps.__N_REDIRECT){e.next=95;break}if(!(tt=Q.pageProps.__N_REDIRECT).startsWith("/")){e.next=93;break}if(A(et=(0,d.parseRelativeUrl)(tt),D,!1),!D.includes(et.pathname)){e.next=93;break}return rt=j(this,tt,tt),nt=rt.url,ot=rt.as,e.abrupt("return",this.change(r,nt,ot,i));case 93:return window.location.href=tt,e.abrupt("return",new Promise((function(){})));case 95:if(this.isPreview=!!Q.__N_PREVIEW,Q.notFound!==I){e.next=109;break}return e.prev=97,e.next=100,this.fetchComponent("/404");case 100:at="/404",e.next=106;break;case 103:e.prev=103,e.t1=e.catch(97),at="/_error";case 106:return e.next=108,this.getRouteInfo(at,at,T,a,U,{shallow:!1});case 108:J=e.sent;case 109:return t.events.emit("beforeHistoryChange",a,y),this.changeState(r,o,a,i),it=i.shallow&&this.route===M,i._h&&"/_error"===O&&500===(null==(H=self.__NEXT_DATA__.props)||null==(X=H.pageProps)?void 0:X.statusCode)&&null!=Q&&Q.pageProps&&(Q.pageProps.statusCode=500),e.next=116,this.set(M,O,T,w,J,s||(it||!i.scroll?null:{x:0,y:0})).catch((function(t){if(!t.cancelled)throw t;$=$||t}));case 116:if(!$){e.next=119;break}throw t.events.emit("routeChangeError",$,w,y),$;case 119:return t.events.emit("routeChangeComplete",a,y),e.abrupt("return",!0);case 124:if(e.prev=124,e.t2=e.catch(79),!e.t2.cancelled){e.next=128;break}return e.abrupt("return",!1);case 128:throw e.t2;case 129:case"end":return e.stop()}}),e,this,[[36,46],[79,124],[97,103]])})));return function(t,r,n,o,a){return e.apply(this,arguments)}}()},{key:"changeState",value:function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};"pushState"===t&&(0,h.getURL)()===r||(this._shallow=n.shallow,window.history[t]({url:e,as:r,options:n,__N:!0,idx:this._idx="pushState"!==t?this._idx:this._idx+1},"",r))}},{key:"handleRouteInfoError",value:function(){var e=o(n.mark((function e(r,o,a,i,s,u){var l,f,h,p;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!r.cancelled){e.next=2;break}throw r;case 2:if(!(0,c.isAssetError)(r)&&!u){e.next=6;break}throw t.events.emit("routeChangeError",r,i,s),window.location.href=i,b();case 6:if(e.prev=6,"undefined"!==typeof l&&"undefined"!==typeof f){e.next=14;break}return e.next=11,this.fetchComponent("/_error");case 11:h=e.sent,l=h.page,f=h.styleSheets;case 14:if((p={props:undefined,Component:l,styleSheets:f,err:r,error:r}).props){e.next=26;break}return e.prev=16,e.next=19,this.getInitialProps(l,{err:r,pathname:o,query:a});case 19:p.props=e.sent,e.next=26;break;case 22:e.prev=22,e.t0=e.catch(16),console.error("Error in error page `getInitialProps`: ",e.t0),p.props={};case 26:return e.abrupt("return",p);case 29:return e.prev=29,e.t1=e.catch(6),e.abrupt("return",this.handleRouteInfoError(e.t1,o,a,i,s,!0));case 32:case"end":return e.stop()}}),e,this,[[6,29],[16,22]])})));return function(t,r,n,o,a,i){return e.apply(this,arguments)}}()},{key:"getRouteInfo",value:function(){var t=o(n.mark((function t(e,r,o,a,i,s){var u,c,l,f,p,d,v,y,m=this;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,u=this.components[e],!s.shallow||!u||this.route!==e){t.next=4;break}return t.abrupt("return",u);case 4:if(!(c=u&&"initial"in u?void 0:u)){t.next=9;break}t.t0=c,t.next=12;break;case 9:return t.next=11,this.fetchComponent(e).then((function(t){return{Component:t.page,styleSheets:t.styleSheets,__N_SSG:t.mod.__N_SSG,__N_SSP:t.mod.__N_SSP}}));case 11:t.t0=t.sent;case 12:l=t.t0,f=l.Component,p=l.__N_SSG,d=l.__N_SSP,t.next=18;break;case 18:return(p||d)&&(v=this.pageLoader.getDataHref((0,h.formatWithValidation)({pathname:r,query:o}),i,p,this.locale)),t.next=21,this._getData((function(){return p?m._getStaticData(v):d?m._getServerData(v):m.getInitialProps(f,{pathname:r,query:o,asPath:a})}));case 21:return y=t.sent,l.props=y,this.components[e]=l,t.abrupt("return",l);case 27:return t.prev=27,t.t1=t.catch(0),t.abrupt("return",this.handleRouteInfoError(t.t1,r,o,a,s));case 30:case"end":return t.stop()}}),t,this,[[0,27]])})));return function(e,r,n,o,a,i){return t.apply(this,arguments)}}()},{key:"set",value:function(t,e,r,n,o,a){return this.isFallback=!1,this.route=t,this.pathname=e,this.query=r,this.asPath=n,this.notify(o,a)}},{key:"beforePopState",value:function(t){this._bps=t}},{key:"onlyAHashChange",value:function(t){if(!this.asPath)return!1;var e=this.asPath.split("#"),r=s(e,2),n=r[0],o=r[1],a=t.split("#"),i=s(a,2),u=i[0],c=i[1];return!(!c||n!==u||o!==c)||n===u&&o!==c}},{key:"scrollToHash",value:function(t){var e=t.split("#"),r=s(e,2)[1];if(""!==r&&"top"!==r){var n=document.getElementById(r);if(n)n.scrollIntoView();else{var o=document.getElementsByName(r)[0];o&&o.scrollIntoView()}}else window.scrollTo(0,0)}},{key:"urlIsNew",value:function(t){return this.asPath!==t}},{key:"prefetch",value:function(){var t=o(n.mark((function t(e){var r,o,a,i,s,c,l,f,p,v,m=this,g=arguments;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=g.length>1&&void 0!==g[1]?g[1]:e,o=g.length>2&&void 0!==g[2]?g[2]:{},a=(0,d.parseRelativeUrl)(e),i=a.pathname,t.next=7,this.pageLoader.getPageList();case 7:s=t.sent,(a=A(a,s,!1)).pathname!==i&&(i=a.pathname,e=(0,h.formatWithValidation)(a)),c=(0,u.removePathTrailingSlash)(i),l=r,t.next=19;break;case 15:p=t.sent,f=p.__rewrites,(v=(0,y.default)(S(_(E(r),this.locale)),s,f,a.query,(function(t){return A({pathname:t},s).pathname}),this.locales)).matchedPage&&v.resolvedHref&&(c=v.resolvedHref,i=v.resolvedHref,a.pathname=i,e=(0,h.formatWithValidation)(a),l=v.asPath);case 19:t.next=21;break;case 21:return t.next=23,Promise.all([this.pageLoader._isSsg(e).then((function(t){return!!t&&m._getStaticData(m.pageLoader.getDataHref(e,l,!0,"undefined"!==typeof o.locale?o.locale:m.locale))})),this.pageLoader[o.priority?"loadPage":"prefetch"](c)]);case 23:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"fetchComponent",value:function(){var t=o(n.mark((function t(e){var r,o,a,i;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=!1,o=this.clc=function(){r=!0},t.next=4,this.pageLoader.loadPage(e);case 4:if(a=t.sent,!r){t.next=9;break}throw(i=new Error('Abort fetching component for route: "'.concat(e,'"'))).cancelled=!0,i;case 9:return o===this.clc&&(this.clc=null),t.abrupt("return",a);case 11:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"_getData",value:function(t){var e=this,r=!1,n=function(){r=!0};return this.clc=n,t().then((function(t){if(n===e.clc&&(e.clc=null),r){var o=new Error("Loading initial props cancelled");throw o.cancelled=!0,o}return t}))}},{key:"_getStaticData",value:function(t){var e=this,r=new URL(t,window.location.href).href;return!this.isPreview&&this.sdc[r]?Promise.resolve(this.sdc[r]):N(t,this.isSsr).then((function(t){return e.sdc[r]=t,t}))}},{key:"_getServerData",value:function(t){var e=this,r=new URL(t,window.location.href).href;return this.sdr[r]?this.sdr[r]:this.sdr[r]=N(t,this.isSsr).then((function(t){return delete e.sdr[r],t})).catch((function(t){throw delete e.sdr[r],t}))}},{key:"getInitialProps",value:function(t,e){var r=this.components["/_app"].Component,n=this._wrapApp(r);return e.AppTree=n,(0,h.loadGetInitialProps)(r,{AppTree:n,Component:t,router:this,ctx:e})}},{key:"abortComponentLoad",value:function(e,r){this.clc&&(t.events.emit("routeChangeError",b(),e,r),this.clc(),this.clc=null)}},{key:"notify",value:function(t,e){return this.sub(t,this.components["/_app"].Component,e)}}]),t}();e.default=M,M.events=(0,f.default)()},TTt4:function(t,e,r){var n=r("ekFS");function o(){if("function"!==typeof WeakMap)return null;var t=new WeakMap;return o=function(){return t},t}t.exports=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!==typeof t)return{default:t};var e=o();if(e&&e.has(t))return e.get(t);var r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var s=a?Object.getOwnPropertyDescriptor(t,i):null;s&&(s.get||s.set)?Object.defineProperty(r,i,s):r[i]=t[i]}return r.default=t,e&&e.set(t,r),r}},UULE:function(t,e,r){"use strict";var n=Object.assign.bind(Object);t.exports=n,t.exports.default=t.exports},W8MJ:function(t,e){function r(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,u=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return s=t.done,t},e:function(t){u=!0,i=t},f:function(){try{s||null==r.return||r.return()}finally{if(u)throw i}}}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=0;--a){var i=this.tryEntries[a],s=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),R(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;R(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:C(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}(t.exports);try{regeneratorRuntime=n}catch(o){Function("r","regeneratorRuntime = r")(n)}},lwsE:function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},m0LI:function(t,e){t.exports=function(t,e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t)){var r=[],n=!0,o=!1,a=void 0;try{for(var i,s=t[Symbol.iterator]();!(n=(i=s.next()).done)&&(r.push(i.value),!e||r.length!==e);n=!0);}catch(u){o=!0,a=u}finally{try{n||null==s.return||s.return()}finally{if(o)throw a}}return r}}},"n3/+":function(t,e,r){"use strict";var n=r("o0o1"),o=r("yXPU");e.__esModule=!0,e.execOnce=function(t){var e,r=!1;return function(){return r||(r=!0,e=t.apply(void 0,arguments)),e}},e.getLocationOrigin=i,e.getURL=function(){var t=window.location.href,e=i();return t.substring(e.length)},e.getDisplayName=s,e.isResSent=u,e.loadGetInitialProps=c,e.formatWithValidation=function(t){0;return(0,a.formatUrl)(t)},e.ST=e.SP=e.urlObjectKeys=void 0;var a=r("tUWN");function i(){var t=window.location,e=t.protocol,r=t.hostname,n=t.port;return"".concat(e,"//").concat(r).concat(n?":"+n:"")}function s(t){return"string"===typeof t?t:t.displayName||t.name||"Unknown"}function u(t){return t.finished||t.headersSent}function c(t,e){return l.apply(this,arguments)}function l(){return(l=o(n.mark((function t(e,r){var o,a,i;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:t.next=4;break;case 4:if(o=r.res||r.ctx&&r.ctx.res,e.getInitialProps){t.next=12;break}if(!r.ctx||!r.Component){t.next=11;break}return t.next=9,c(r.Component,r.ctx);case 9:return t.t0=t.sent,t.abrupt("return",{pageProps:t.t0});case 11:return t.abrupt("return",{});case 12:return t.next=14,e.getInitialProps(r);case 14:if(a=t.sent,!o||!u(o)){t.next=17;break}return t.abrupt("return",a);case 17:if(a){t.next=20;break}throw i='"'.concat(s(e),'.getInitialProps()" should resolve to an object. But found "').concat(a,'" instead.'),new Error(i);case 20:return t.abrupt("return",a);case 22:case"end":return t.stop()}}),t)})))).apply(this,arguments)}e.urlObjectKeys=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];var f="undefined"!==typeof performance;e.SP=f;var h=f&&"function"===typeof performance.mark&&"function"===typeof performance.measure;e.ST=h},o0o1:function(t,e,r){t.exports=r("ls82")},pqeP:function(t,e,r){"use strict";var n=r("o0o1"),o=r("J4zp"),a=r("yXPU"),i=r("FzWm");e.__esModule=!0,e.markAssetError=f,e.isAssetError=function(t){return t&&l in t},e.getClientBuildManifest=p,e.default=void 0;i(r("GpGG"));var s=r("s4GJ");function u(t,e,r){var n,o=e.get(t);if(o)return"future"in o?o.future:Promise.resolve(o);var a=new Promise((function(t){n=t}));return e.set(t,o={resolve:n,future:a}),r?r().then((function(t){return n(t),t})):a}var c=function(t){try{return t=document.createElement("link"),!!window.MSInputMethodContext&&!!document.documentMode||t.relList.supports("prefetch")}catch(e){return!1}}();var l=Symbol("ASSET_LOAD_ERROR");function f(t){return Object.defineProperty(t,l,{})}function h(t,e,r){return new Promise((function(n,o){var a=!1;t.then((function(t){a=!0,n(t)})).catch(o),(0,s.requestIdleCallback)((function(){return setTimeout((function(){a||o(r)}),e)}))}))}function p(){return self.__BUILD_MANIFEST?Promise.resolve(self.__BUILD_MANIFEST):h(new Promise((function(t){var e=self.__BUILD_MANIFEST_CB;self.__BUILD_MANIFEST_CB=function(){t(self.__BUILD_MANIFEST),e&&e()}})),3800,f(new Error("Failed to load client build manifest")))}function d(t,e){return p().then((function(r){if(!(e in r))throw f(new Error("Failed to lookup route: ".concat(e)));var n=r[e].map((function(e){return t+"https://cdn.statically.io/gh/HiltonWS/hiltonws.github.io/master/smile/"+encodeURI(e)}));return{scripts:n.filter((function(t){return t.endsWith(".js")})),css:n.filter((function(t){return t.endsWith(".css")}))}}))}var v=function(t){var e=new Map,r=new Map,i=new Map,l=new Map;function p(t){var e=r.get(t);return e||(document.querySelector('script[src^="'.concat(t,'"]'))?Promise.resolve():(r.set(t,e=function(t,e){return new Promise((function(r,n){(e=document.createElement("script")).onload=r,e.onerror=function(){return n(f(new Error("Failed to load script: ".concat(t))))},e.crossOrigin=void 0,e.src=t,document.body.appendChild(e)}))}(t)),e))}function v(t){var e=i.get(t);return e||(i.set(t,e=fetch(t).then((function(e){if(!e.ok)throw new Error("Failed to load stylesheet: ".concat(t));return e.text().then((function(e){return{href:t,content:e}}))})).catch((function(t){throw f(t)}))),e)}return{whenEntrypoint:function(t){return u(t,e)},onEntrypoint:function(t,r){Promise.resolve(r).then((function(t){return t()})).then((function(t){return{component:t&&t.default||t,exports:t}}),(function(t){return{error:t}})).then((function(r){var n=e.get(t);e.set(t,r),n&&"resolve"in n&&n.resolve(r)}))},loadRoute:function(r){var i=this;return u(r,l,a(n.mark((function a(){var s,u,c,l,y,m,g,w;return n.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,d(t,r);case 3:return s=n.sent,u=s.scripts,c=s.css,n.next=8,Promise.all([e.has(r)?[]:Promise.all(u.map(p)),Promise.all(c.map(v))]);case 8:return l=n.sent,y=o(l,2),m=y[1],n.next=13,h(i.whenEntrypoint(r),3800,f(new Error("Route did not complete loading: ".concat(r))));case 13:return g=n.sent,w=Object.assign({styles:m},g),n.abrupt("return","error"in g?g:w);case 18:return n.prev=18,n.t0=n.catch(0),n.abrupt("return",{error:n.t0});case 21:case"end":return n.stop()}}),a,null,[[0,18]])}))))},prefetch:function(e){var r,n=this;return(r=navigator.connection)&&(r.saveData||/2g/.test(r.effectiveType))?Promise.resolve():d(t,e).then((function(t){return Promise.all(c?t.scripts.map((function(t){return e=t,r="script",new Promise((function(t,o){if(document.querySelector('link[rel="prefetch"][href^="'.concat(e,'"]')))return t();n=document.createElement("link"),r&&(n.as=r),n.rel="prefetch",n.crossOrigin=void 0,n.onload=t,n.onerror=o,n.href=e,document.head.appendChild(n)}));var e,r,n})):[])})).then((function(){(0,s.requestIdleCallback)((function(){return n.loadRoute(e)}))})).catch((function(){}))}}};e.default=v},s1dQ:function(t,e,r){"use strict";var n;e.__esModule=!0,e.RouterContext=void 0;var o=((n=r("BqPY"))&&n.__esModule?n:{default:n}).default.createContext(null);e.RouterContext=o},s4GJ:function(t,e,r){"use strict";e.__esModule=!0,e.cancelIdleCallback=e.requestIdleCallback=void 0;var n="undefined"!==typeof self&&self.requestIdleCallback||function(t){var e=Date.now();return setTimeout((function(){t({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-e))}})}),1)};e.requestIdleCallback=n;var o="undefined"!==typeof self&&self.cancelIdleCallback||function(t){return clearTimeout(t)};e.cancelIdleCallback=o},sXyB:function(t,e,r){var n=r("SksO"),o=r("b48C");function a(e,r,i){return o()?t.exports=a=Reflect.construct:t.exports=a=function(t,e,r){var o=[null];o.push.apply(o,e);var a=new(Function.bind.apply(t,o));return r&&n(a,r.prototype),a},a.apply(null,arguments)}t.exports=a},tUWN:function(t,e,r){"use strict";e.__esModule=!0,e.formatUrl=function(t){var e=t.auth,r=t.hostname,o=t.protocol||"",i=t.pathname||"",s=t.hash||"",u=t.query||"",c=!1;e=e?encodeURIComponent(e).replace(/%3A/i,":")+"@":"",t.host?c=e+t.host:r&&(c=e+(~r.indexOf(":")?"[".concat(r,"]"):r),t.port&&(c+=":"+t.port));u&&"object"===typeof u&&(u=String(n.urlQueryToSearchParams(u)));var l=t.search||u&&"?".concat(u)||"";o&&":"!==o.substr(-1)&&(o+=":");t.slashes||(!o||a.test(o))&&!1!==c?(c="//"+(c||""),i&&"/"!==i[0]&&(i="/"+i)):c||(c="");s&&"#"!==s[0]&&(s="#"+s);l&&"?"!==l[0]&&(l="?"+l);return i=i.replace(/[?#]/g,encodeURIComponent),l=l.replace("#","%23"),"".concat(o).concat(c).concat(i).concat(l).concat(s)};var n=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==typeof t&&"function"!==typeof t)return{default:t};var e=o();if(e&&e.has(t))return e.get(t);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if(Object.prototype.hasOwnProperty.call(t,a)){var i=n?Object.getOwnPropertyDescriptor(t,a):null;i&&(i.get||i.set)?Object.defineProperty(r,a,i):r[a]=t[a]}r.default=t,e&&e.set(t,r);return r}(r("29pC"));function o(){if("function"!==typeof WeakMap)return null;var t=new WeakMap;return o=function(){return t},t}var a=/https?|ftp|gopher|file/},vuub:function(t,e,r){"use strict";function n(t){return t.endsWith("/")&&"/"!==t?t.slice(0,-1):t}e.__esModule=!0,e.removePathTrailingSlash=n,e.normalizePathTrailingSlash=void 0;var o=n;e.normalizePathTrailingSlash=o},wTVA:function(t,e){t.exports=function(t){if(Array.isArray(t))return t}},wkBT:function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},yXPU:function(t,e){function r(t,e,r,n,o,a,i){try{var s=t[a](i),u=s.value}catch(c){return void r(c)}s.done?e(u):Promise.resolve(u).then(n,o)}t.exports=function(t){return function(){var e=this,n=arguments;return new Promise((function(o,a){var i=t.apply(e,n);function s(t){r(i,o,a,s,u,"next",t)}function u(t){r(i,o,a,s,u,"throw",t)}s(void 0)}))}}}}]); \ No newline at end of file +(window.webpackJsonp_N_E=window.webpackJsonp_N_E||[]).push([[2],{"/XDo":function(t,e,r){"use strict";e.__esModule=!0,e.getRouteMatcher=function(t){var e=t.re,r=t.groups;return function(t){var n=e.exec(t);if(!n)return!1;var o=function(t){try{return decodeURIComponent(t)}catch(r){var e=new Error("failed to decode param");throw e.code="DECODE_FAILED",e}},a={};return Object.keys(r).forEach((function(t){var e=r[t],i=n[e.pos];void 0!==i&&(a[t]=~i.indexOf("/")?i.split("/").map((function(t){return o(t)})):e.repeat?[o(i)]:o(i))})),a}}},"29pC":function(t,e,r){"use strict";var n=r("J4zp");function o(t){return"string"===typeof t||"number"===typeof t&&!isNaN(t)||"boolean"===typeof t?String(t):""}e.__esModule=!0,e.searchParamsToUrlQuery=function(t){var e={};return t.forEach((function(t,r){"undefined"===typeof e[r]?e[r]=t:Array.isArray(e[r])?e[r].push(t):e[r]=[e[r],t]})),e},e.urlQueryToSearchParams=function(t){var e=new URLSearchParams;return Object.entries(t).forEach((function(t){var r=n(t,2),a=r[0],i=r[1];Array.isArray(i)?i.forEach((function(t){return e.append(a,o(t))})):e.set(a,o(i))})),e},e.assign=function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n>>0,1)},emit:function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o1&&void 0!==arguments[1]?arguments[1]:"",r="/"===t?"/index":/^\/index(\/|$)/.test(t)?"/index".concat(t):"".concat(t);return r+e}},J4zp:function(t,e,r){var n=r("wTVA"),o=r("m0LI"),a=r("ZhPi"),i=r("wkBT");t.exports=function(t,e){return n(t)||o(t,e)||a(t,e)||i()}},R3d8:function(t,e,r){"use strict";function n(t){return t.replace(/\\/g,"/")}e.__esModule=!0,e.normalizePathSep=n,e.denormalizePagePath=function(t){(t=n(t)).startsWith("/index/")?t=t.slice(6):"/index"===t&&(t="/");return t}},SksO:function(t,e){function r(e,n){return t.exports=r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},r(e,n)}t.exports=r},TTnN:function(t,e,r){"use strict";var n=r("o0o1"),o=r("yXPU"),a=r("lwsE"),i=r("W8MJ"),s=r("J4zp");e.__esModule=!0,e.getDomainLocale=function(t,e,r,n){0;return!1},e.addLocale=_,e.delLocale=x,e.hasBasePath=k,e.addBasePath=S,e.delBasePath=E,e.isLocalURL=R,e.interpolateAs=L,e.resolveHref=O,e.default=void 0;var u=r("vuub"),c=r("pqeP"),l=r("R3d8"),f=(r("Ew7H"),w(r("Dg51"))),h=r("n3/+"),p=r("YKD2"),d=r("AO3j"),v=r("29pC"),y=w(r("lpVY")),m=r("/XDo"),g=r("99D5");function w(t){return t&&t.__esModule?t:{default:t}}function b(){return Object.assign(new Error("Route Cancelled"),{cancelled:!0})}function _(t,e,r){return t}function x(t,e){return t}function P(t){var e=t.indexOf("?"),r=t.indexOf("#");return(e>-1||r>-1)&&(t=t.substring(0,e>-1?e:r)),t}function k(t){return""===(t=P(t))||t.startsWith("/")}function S(t){return function(t,e){return e&&t.startsWith("/")?"/"===t?(0,u.normalizePathTrailingSlash)(e):"".concat(e).concat("/"===P(t)?t.substring(1):t):t}(t,"")}function E(t){return(t=t.slice("".length)).startsWith("/")||(t="/".concat(t)),t}function R(t){if(t.startsWith("/")||t.startsWith("#"))return!0;try{var e=(0,h.getLocationOrigin)(),r=new URL(t,e);return r.origin===e&&k(r.pathname)}catch(n){return!1}}function L(t,e,r){var n="",o=(0,g.getRouteRegex)(t),a=o.groups,i=(e!==t?(0,m.getRouteMatcher)(o)(e):"")||r;n=t;var s=Object.keys(a);return s.every((function(t){var e=i[t]||"",r=a[t],o=r.repeat,s=r.optional,u="[".concat(o?"...":"").concat(t,"]");return s&&(u="".concat(e?"":"/","[").concat(u,"]")),o&&!Array.isArray(e)&&(e=[e]),(s||t in i)&&(n=n.replace(u,o?e.map((function(t){return encodeURIComponent(t)})).join("/"):encodeURIComponent(e))||"/")}))||(n=""),{params:s,result:n}}function C(t,e){var r={};return Object.keys(t).forEach((function(n){e.includes(n)||(r[n]=t[n])})),r}function O(t,e,r){var n=new URL(t,"http://n"),o="string"===typeof e?e:(0,h.formatWithValidation)(e);if(!R(o))return r?[o]:o;try{var a=new URL(o,n);a.pathname=(0,u.normalizePathTrailingSlash)(a.pathname);var i="";if((0,p.isDynamicRoute)(a.pathname)&&a.searchParams&&r){var s=(0,v.searchParamsToUrlQuery)(a.searchParams),c=L(a.pathname,a.pathname,s),l=c.result,f=c.params;l&&(i=(0,h.formatWithValidation)({pathname:l,hash:a.hash,query:C(s,f)}))}var d=a.origin===n.origin?a.href.slice(a.origin.length):a.href;return r?[d,i||d]:d}catch(y){return r?[o]:o}}function T(t){var e=(0,h.getLocationOrigin)();return t.startsWith(e)?t.substring(e.length):t}function j(t,e,r){var n=O(t.pathname,e,!0),o=s(n,2),a=o[0],i=o[1],u=(0,h.getLocationOrigin)(),c=a.startsWith(u),l=i&&i.startsWith(u);a=T(a),i=i?T(i):i;var f=c?a:S(a),p=r?T(O(t.pathname,r)):i||a;return{url:f,as:l?p:S(p)}}function A(t,e){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=t.pathname,o=(0,u.removePathTrailingSlash)((0,l.denormalizePagePath)(r?E(n):n));return"/404"===o||"/_error"===o||(e.includes(o)||e.some((function(e){if((0,p.isDynamicRoute)(e)&&(0,g.getRouteRegex)(e).re.test(o))return t.pathname=r?S(e):e,!0})),t.pathname=(0,u.removePathTrailingSlash)(t.pathname)),t}var I=Symbol("SSG_DATA_NOT_FOUND");function D(t,e){return fetch(t,{credentials:"same-origin"}).then((function(r){if(!r.ok){if(e>1&&r.status>=500)return D(t,e-1);if(404===r.status)return r.json().then((function(t){if(t.notFound)return{notFound:I};throw new Error("Failed to load static props")}));throw new Error("Failed to load static props")}return r.json()}))}function N(t,e){return D(t,e?3:1).catch((function(t){throw e||(0,c.markAssetError)(t),t}))}var M=function(){function t(e,r,n,o){var i=this,s=o.initialProps,c=o.pageLoader,l=o.App,f=o.wrapApp,v=o.Component,y=o.err,m=o.subscription,g=o.isFallback,w=o.locale,b=(o.locales,o.defaultLocale,o.domainLocales,o.isPreview);a(this,t),this.route=void 0,this.pathname=void 0,this.query=void 0,this.asPath=void 0,this.basePath=void 0,this.components=void 0,this.sdc={},this.sdr={},this.sub=void 0,this.clc=void 0,this.pageLoader=void 0,this._bps=void 0,this.events=void 0,this._wrapApp=void 0,this.isSsr=void 0,this.isFallback=void 0,this._inFlightRoute=void 0,this._shallow=void 0,this.locale=void 0,this.locales=void 0,this.defaultLocale=void 0,this.domainLocales=void 0,this.isReady=void 0,this.isPreview=void 0,this.isLocaleDomain=void 0,this._idx=0,this.onPopState=function(t){var e=t.state;if(e){if(e.__N){var r=e.url,n=e.as,o=e.options,a=e.idx;i._idx=a;var s=(0,d.parseRelativeUrl)(r).pathname;i.isSsr&&n===i.asPath&&s===i.pathname||i._bps&&!i._bps(e)||i.change("replaceState",r,n,Object.assign({},o,{shallow:o.shallow&&i._shallow,locale:o.locale||i.defaultLocale}),undefined)}}else{var u=i.pathname,c=i.query;i.changeState("replaceState",(0,h.formatWithValidation)({pathname:S(u),query:c}),(0,h.getURL)())}},this.route=(0,u.removePathTrailingSlash)(e),this.components={},"/_error"!==e&&(this.components[this.route]={Component:v,initial:!0,props:s,err:y,__N_SSG:s&&s.__N_SSG,__N_SSP:s&&s.__N_SSP}),this.components["/_app"]={Component:l,styleSheets:[]},this.events=t.events,this.pageLoader=c,this.pathname=e,this.query=r;var _=(0,p.isDynamicRoute)(e)&&self.__NEXT_DATA__.autoExport;this.asPath=_?e:n,this.basePath="",this.sub=m,this.clc=null,this._wrapApp=f,this.isSsr=!0,this.isFallback=g,this.isReady=!(!self.__NEXT_DATA__.gssp&&!self.__NEXT_DATA__.gip&&(_||self.location.search)),this.isPreview=!!b,this.isLocaleDomain=!1,"//"!==n.substr(0,2)&&this.changeState("replaceState",(0,h.formatWithValidation)({pathname:S(e),query:r}),(0,h.getURL)(),{locale:w}),window.addEventListener("popstate",this.onPopState)}return i(t,[{key:"reload",value:function(){window.location.reload()}},{key:"back",value:function(){window.history.back()}},{key:"push",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};var n=j(this,t,e);return t=n.url,e=n.as,this.change("pushState",t,e,r)}},{key:"replace",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=j(this,t,e);return t=n.url,e=n.as,this.change("replaceState",t,e,r)}},{key:"change",value:function(){var e=o(n.mark((function e(r,o,a,i,s){var l,f,v,y,w,b,P,O,T,D,N,M,U,W,F,q,G,B,V,z,H,X,J,Y,$,Q,K,Z,tt,et,rt,nt,ot,at,it;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(R(o)){e.next=3;break}return window.location.href=o,e.abrupt("return",!1);case 3:i._h&&(this.isReady=!0),i.scroll=!(null!=(l=i.scroll)&&!l),f=i.locale!==this.locale,e.next=18;break;case 18:if(i._h||(this.isSsr=!1),h.ST&&performance.mark("routeChange"),v=i.shallow,y={shallow:void 0!==v&&v},this._inFlightRoute&&this.abortComponentLoad(this._inFlightRoute,y),a=S(_(k(a)?E(a):a,i.locale,this.defaultLocale)),w=x(k(a)?E(a):a,this.locale),this._inFlightRoute=a,i._h||!this.onlyAHashChange(w)){e.next=34;break}return this.asPath=w,t.events.emit("hashChangeStart",a,y),this.changeState(r,o,a,i),this.scrollToHash(w),this.notify(this.components[this.route],null),t.events.emit("hashChangeComplete",a,y),e.abrupt("return",!0);case 34:return b=(0,d.parseRelativeUrl)(o),O=(P=b).pathname,T=P.query,e.prev=36,e.next=39,this.pageLoader.getPageList();case 39:return D=e.sent,e.next=42,(0,c.getClientBuildManifest)();case 42:N=e.sent,N.__rewrites,e.next=50;break;case 46:return e.prev=46,e.t0=e.catch(36),window.location.href=a,e.abrupt("return",!1);case 50:if((b=A(b,D)).pathname!==O&&(O=b.pathname,o=(0,h.formatWithValidation)(b)),O=O?(0,u.removePathTrailingSlash)(E(O)):O,this.urlIsNew(w)||f||(r="replaceState"),M=(0,u.removePathTrailingSlash)(O),U=a,R(a)){e.next=62;break}e.next=60;break;case 60:return window.location.href=a,e.abrupt("return",!1);case 62:if(U=x(E(U),this.locale),!(0,p.isDynamicRoute)(M)){e.next=78;break}if(W=(0,d.parseRelativeUrl)(U),F=W.pathname,q=(0,g.getRouteRegex)(M),G=(0,m.getRouteMatcher)(q)(F),V=(B=M===F)?L(M,F,T):{},G&&(!B||V.result)){e.next=77;break}if(!((z=Object.keys(q.groups).filter((function(t){return!T[t]}))).length>0)){e.next=75;break}throw new Error((B?"The provided `href` (".concat(o,") value is missing query values (").concat(z.join(", "),") to be interpolated properly. "):"The provided `as` value (".concat(F,") is incompatible with the `href` value (").concat(M,"). "))+"Read more: https://err.sh/vercel/next.js/".concat(B?"href-interpolation-failed":"incompatible-href-as"));case 75:e.next=78;break;case 77:B?a=(0,h.formatWithValidation)(Object.assign({},W,{pathname:V.result,query:C(T,V.params)})):Object.assign(T,G);case 78:return t.events.emit("routeChangeStart",a,y),e.prev=79,e.next=82,this.getRouteInfo(M,O,T,a,U,y);case 82:if(J=e.sent,$=(Y=J).error,Q=Y.props,K=Y.__N_SSG,Z=Y.__N_SSP,!K&&!Z||!Q){e.next=109;break}if(!Q.pageProps||!Q.pageProps.__N_REDIRECT){e.next=95;break}if(!(tt=Q.pageProps.__N_REDIRECT).startsWith("/")){e.next=93;break}if(A(et=(0,d.parseRelativeUrl)(tt),D,!1),!D.includes(et.pathname)){e.next=93;break}return rt=j(this,tt,tt),nt=rt.url,ot=rt.as,e.abrupt("return",this.change(r,nt,ot,i));case 93:return window.location.href=tt,e.abrupt("return",new Promise((function(){})));case 95:if(this.isPreview=!!Q.__N_PREVIEW,Q.notFound!==I){e.next=109;break}return e.prev=97,e.next=100,this.fetchComponent("/404");case 100:at="/404",e.next=106;break;case 103:e.prev=103,e.t1=e.catch(97),at="/_error";case 106:return e.next=108,this.getRouteInfo(at,at,T,a,U,{shallow:!1});case 108:J=e.sent;case 109:return t.events.emit("beforeHistoryChange",a,y),this.changeState(r,o,a,i),it=i.shallow&&this.route===M,i._h&&"/_error"===O&&500===(null==(H=self.__NEXT_DATA__.props)||null==(X=H.pageProps)?void 0:X.statusCode)&&null!=Q&&Q.pageProps&&(Q.pageProps.statusCode=500),e.next=116,this.set(M,O,T,w,J,s||(it||!i.scroll?null:{x:0,y:0})).catch((function(t){if(!t.cancelled)throw t;$=$||t}));case 116:if(!$){e.next=119;break}throw t.events.emit("routeChangeError",$,w,y),$;case 119:return t.events.emit("routeChangeComplete",a,y),e.abrupt("return",!0);case 124:if(e.prev=124,e.t2=e.catch(79),!e.t2.cancelled){e.next=128;break}return e.abrupt("return",!1);case 128:throw e.t2;case 129:case"end":return e.stop()}}),e,this,[[36,46],[79,124],[97,103]])})));return function(t,r,n,o,a){return e.apply(this,arguments)}}()},{key:"changeState",value:function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};"pushState"===t&&(0,h.getURL)()===r||(this._shallow=n.shallow,window.history[t]({url:e,as:r,options:n,__N:!0,idx:this._idx="pushState"!==t?this._idx:this._idx+1},"",r))}},{key:"handleRouteInfoError",value:function(){var e=o(n.mark((function e(r,o,a,i,s,u){var l,f,h,p;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!r.cancelled){e.next=2;break}throw r;case 2:if(!(0,c.isAssetError)(r)&&!u){e.next=6;break}throw t.events.emit("routeChangeError",r,i,s),window.location.href=i,b();case 6:if(e.prev=6,"undefined"!==typeof l&&"undefined"!==typeof f){e.next=14;break}return e.next=11,this.fetchComponent("/_error");case 11:h=e.sent,l=h.page,f=h.styleSheets;case 14:if((p={props:undefined,Component:l,styleSheets:f,err:r,error:r}).props){e.next=26;break}return e.prev=16,e.next=19,this.getInitialProps(l,{err:r,pathname:o,query:a});case 19:p.props=e.sent,e.next=26;break;case 22:e.prev=22,e.t0=e.catch(16),console.error("Error in error page `getInitialProps`: ",e.t0),p.props={};case 26:return e.abrupt("return",p);case 29:return e.prev=29,e.t1=e.catch(6),e.abrupt("return",this.handleRouteInfoError(e.t1,o,a,i,s,!0));case 32:case"end":return e.stop()}}),e,this,[[6,29],[16,22]])})));return function(t,r,n,o,a,i){return e.apply(this,arguments)}}()},{key:"getRouteInfo",value:function(){var t=o(n.mark((function t(e,r,o,a,i,s){var u,c,l,f,p,d,v,y,m=this;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,u=this.components[e],!s.shallow||!u||this.route!==e){t.next=4;break}return t.abrupt("return",u);case 4:if(!(c=u&&"initial"in u?void 0:u)){t.next=9;break}t.t0=c,t.next=12;break;case 9:return t.next=11,this.fetchComponent(e).then((function(t){return{Component:t.page,styleSheets:t.styleSheets,__N_SSG:t.mod.__N_SSG,__N_SSP:t.mod.__N_SSP}}));case 11:t.t0=t.sent;case 12:l=t.t0,f=l.Component,p=l.__N_SSG,d=l.__N_SSP,t.next=18;break;case 18:return(p||d)&&(v=this.pageLoader.getDataHref((0,h.formatWithValidation)({pathname:r,query:o}),i,p,this.locale)),t.next=21,this._getData((function(){return p?m._getStaticData(v):d?m._getServerData(v):m.getInitialProps(f,{pathname:r,query:o,asPath:a})}));case 21:return y=t.sent,l.props=y,this.components[e]=l,t.abrupt("return",l);case 27:return t.prev=27,t.t1=t.catch(0),t.abrupt("return",this.handleRouteInfoError(t.t1,r,o,a,s));case 30:case"end":return t.stop()}}),t,this,[[0,27]])})));return function(e,r,n,o,a,i){return t.apply(this,arguments)}}()},{key:"set",value:function(t,e,r,n,o,a){return this.isFallback=!1,this.route=t,this.pathname=e,this.query=r,this.asPath=n,this.notify(o,a)}},{key:"beforePopState",value:function(t){this._bps=t}},{key:"onlyAHashChange",value:function(t){if(!this.asPath)return!1;var e=this.asPath.split("#"),r=s(e,2),n=r[0],o=r[1],a=t.split("#"),i=s(a,2),u=i[0],c=i[1];return!(!c||n!==u||o!==c)||n===u&&o!==c}},{key:"scrollToHash",value:function(t){var e=t.split("#"),r=s(e,2)[1];if(""!==r&&"top"!==r){var n=document.getElementById(r);if(n)n.scrollIntoView();else{var o=document.getElementsByName(r)[0];o&&o.scrollIntoView()}}else window.scrollTo(0,0)}},{key:"urlIsNew",value:function(t){return this.asPath!==t}},{key:"prefetch",value:function(){var t=o(n.mark((function t(e){var r,o,a,i,s,c,l,f,p,v,m=this,g=arguments;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=g.length>1&&void 0!==g[1]?g[1]:e,o=g.length>2&&void 0!==g[2]?g[2]:{},a=(0,d.parseRelativeUrl)(e),i=a.pathname,t.next=7,this.pageLoader.getPageList();case 7:s=t.sent,(a=A(a,s,!1)).pathname!==i&&(i=a.pathname,e=(0,h.formatWithValidation)(a)),c=(0,u.removePathTrailingSlash)(i),l=r,t.next=19;break;case 15:p=t.sent,f=p.__rewrites,(v=(0,y.default)(S(_(E(r),this.locale)),s,f,a.query,(function(t){return A({pathname:t},s).pathname}),this.locales)).matchedPage&&v.resolvedHref&&(c=v.resolvedHref,i=v.resolvedHref,a.pathname=i,e=(0,h.formatWithValidation)(a),l=v.asPath);case 19:t.next=21;break;case 21:return t.next=23,Promise.all([this.pageLoader._isSsg(e).then((function(t){return!!t&&m._getStaticData(m.pageLoader.getDataHref(e,l,!0,"undefined"!==typeof o.locale?o.locale:m.locale))})),this.pageLoader[o.priority?"loadPage":"prefetch"](c)]);case 23:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"fetchComponent",value:function(){var t=o(n.mark((function t(e){var r,o,a,i;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=!1,o=this.clc=function(){r=!0},t.next=4,this.pageLoader.loadPage(e);case 4:if(a=t.sent,!r){t.next=9;break}throw(i=new Error('Abort fetching component for route: "'.concat(e,'"'))).cancelled=!0,i;case 9:return o===this.clc&&(this.clc=null),t.abrupt("return",a);case 11:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"_getData",value:function(t){var e=this,r=!1,n=function(){r=!0};return this.clc=n,t().then((function(t){if(n===e.clc&&(e.clc=null),r){var o=new Error("Loading initial props cancelled");throw o.cancelled=!0,o}return t}))}},{key:"_getStaticData",value:function(t){var e=this,r=new URL(t,window.location.href).href;return!this.isPreview&&this.sdc[r]?Promise.resolve(this.sdc[r]):N(t,this.isSsr).then((function(t){return e.sdc[r]=t,t}))}},{key:"_getServerData",value:function(t){var e=this,r=new URL(t,window.location.href).href;return this.sdr[r]?this.sdr[r]:this.sdr[r]=N(t,this.isSsr).then((function(t){return delete e.sdr[r],t})).catch((function(t){throw delete e.sdr[r],t}))}},{key:"getInitialProps",value:function(t,e){var r=this.components["/_app"].Component,n=this._wrapApp(r);return e.AppTree=n,(0,h.loadGetInitialProps)(r,{AppTree:n,Component:t,router:this,ctx:e})}},{key:"abortComponentLoad",value:function(e,r){this.clc&&(t.events.emit("routeChangeError",b(),e,r),this.clc(),this.clc=null)}},{key:"notify",value:function(t,e){return this.sub(t,this.components["/_app"].Component,e)}}]),t}();e.default=M,M.events=(0,f.default)()},TTt4:function(t,e,r){var n=r("ekFS");function o(){if("function"!==typeof WeakMap)return null;var t=new WeakMap;return o=function(){return t},t}t.exports=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!==typeof t)return{default:t};var e=o();if(e&&e.has(t))return e.get(t);var r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var s=a?Object.getOwnPropertyDescriptor(t,i):null;s&&(s.get||s.set)?Object.defineProperty(r,i,s):r[i]=t[i]}return r.default=t,e&&e.set(t,r),r}},UULE:function(t,e,r){"use strict";var n=Object.assign.bind(Object);t.exports=n,t.exports.default=t.exports},W8MJ:function(t,e){function r(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,u=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return s=t.done,t},e:function(t){u=!0,i=t},f:function(){try{s||null==r.return||r.return()}finally{if(u)throw i}}}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=0;--a){var i=this.tryEntries[a],s=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),R(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;R(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:C(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}(t.exports);try{regeneratorRuntime=n}catch(o){Function("r","regeneratorRuntime = r")(n)}},lwsE:function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},m0LI:function(t,e){t.exports=function(t,e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t)){var r=[],n=!0,o=!1,a=void 0;try{for(var i,s=t[Symbol.iterator]();!(n=(i=s.next()).done)&&(r.push(i.value),!e||r.length!==e);n=!0);}catch(u){o=!0,a=u}finally{try{n||null==s.return||s.return()}finally{if(o)throw a}}return r}}},"n3/+":function(t,e,r){"use strict";var n=r("o0o1"),o=r("yXPU");e.__esModule=!0,e.execOnce=function(t){var e,r=!1;return function(){return r||(r=!0,e=t.apply(void 0,arguments)),e}},e.getLocationOrigin=i,e.getURL=function(){var t=window.location.href,e=i();return t.substring(e.length)},e.getDisplayName=s,e.isResSent=u,e.loadGetInitialProps=c,e.formatWithValidation=function(t){0;return(0,a.formatUrl)(t)},e.ST=e.SP=e.urlObjectKeys=void 0;var a=r("tUWN");function i(){var t=window.location,e=t.protocol,r=t.hostname,n=t.port;return"".concat(e,"//").concat(r).concat(n?":"+n:"")}function s(t){return"string"===typeof t?t:t.displayName||t.name||"Unknown"}function u(t){return t.finished||t.headersSent}function c(t,e){return l.apply(this,arguments)}function l(){return(l=o(n.mark((function t(e,r){var o,a,i;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:t.next=4;break;case 4:if(o=r.res||r.ctx&&r.ctx.res,e.getInitialProps){t.next=12;break}if(!r.ctx||!r.Component){t.next=11;break}return t.next=9,c(r.Component,r.ctx);case 9:return t.t0=t.sent,t.abrupt("return",{pageProps:t.t0});case 11:return t.abrupt("return",{});case 12:return t.next=14,e.getInitialProps(r);case 14:if(a=t.sent,!o||!u(o)){t.next=17;break}return t.abrupt("return",a);case 17:if(a){t.next=20;break}throw i='"'.concat(s(e),'.getInitialProps()" should resolve to an object. But found "').concat(a,'" instead.'),new Error(i);case 20:return t.abrupt("return",a);case 22:case"end":return t.stop()}}),t)})))).apply(this,arguments)}e.urlObjectKeys=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];var f="undefined"!==typeof performance;e.SP=f;var h=f&&"function"===typeof performance.mark&&"function"===typeof performance.measure;e.ST=h},o0o1:function(t,e,r){t.exports=r("ls82")},pqeP:function(t,e,r){"use strict";var n=r("o0o1"),o=r("J4zp"),a=r("yXPU"),i=r("FzWm");e.__esModule=!0,e.markAssetError=f,e.isAssetError=function(t){return t&&l in t},e.getClientBuildManifest=p,e.default=void 0;i(r("GpGG"));var s=r("s4GJ");function u(t,e,r){var n,o=e.get(t);if(o)return"future"in o?o.future:Promise.resolve(o);var a=new Promise((function(t){n=t}));return e.set(t,o={resolve:n,future:a}),r?r().then((function(t){return n(t),t})):a}var c=function(t){try{return t=document.createElement("link"),!!window.MSInputMethodContext&&!!document.documentMode||t.relList.supports("prefetch")}catch(e){return!1}}();var l=Symbol("ASSET_LOAD_ERROR");function f(t){return Object.defineProperty(t,l,{})}function h(t,e,r){return new Promise((function(n,o){var a=!1;t.then((function(t){a=!0,n(t)})).catch(o),(0,s.requestIdleCallback)((function(){return setTimeout((function(){a||o(r)}),e)}))}))}function p(){return self.__BUILD_MANIFEST?Promise.resolve(self.__BUILD_MANIFEST):h(new Promise((function(t){var e=self.__BUILD_MANIFEST_CB;self.__BUILD_MANIFEST_CB=function(){t(self.__BUILD_MANIFEST),e&&e()}})),3800,f(new Error("Failed to load client build manifest")))}function d(t,e){return p().then((function(r){if(!(e in r))throw f(new Error("Failed to lookup route: ".concat(e)));var n=r[e].map((function(e){return t+"https://cdn.statically.io/gh/HiltonWS/hiltonws.github.io/1.1.1/smile/"+encodeURI(e)}));return{scripts:n.filter((function(t){return t.endsWith(".js")})),css:n.filter((function(t){return t.endsWith(".css")}))}}))}var v=function(t){var e=new Map,r=new Map,i=new Map,l=new Map;function p(t){var e=r.get(t);return e||(document.querySelector('script[src^="'.concat(t,'"]'))?Promise.resolve():(r.set(t,e=function(t,e){return new Promise((function(r,n){(e=document.createElement("script")).onload=r,e.onerror=function(){return n(f(new Error("Failed to load script: ".concat(t))))},e.crossOrigin=void 0,e.src=t,document.body.appendChild(e)}))}(t)),e))}function v(t){var e=i.get(t);return e||(i.set(t,e=fetch(t).then((function(e){if(!e.ok)throw new Error("Failed to load stylesheet: ".concat(t));return e.text().then((function(e){return{href:t,content:e}}))})).catch((function(t){throw f(t)}))),e)}return{whenEntrypoint:function(t){return u(t,e)},onEntrypoint:function(t,r){Promise.resolve(r).then((function(t){return t()})).then((function(t){return{component:t&&t.default||t,exports:t}}),(function(t){return{error:t}})).then((function(r){var n=e.get(t);e.set(t,r),n&&"resolve"in n&&n.resolve(r)}))},loadRoute:function(r){var i=this;return u(r,l,a(n.mark((function a(){var s,u,c,l,y,m,g,w;return n.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,d(t,r);case 3:return s=n.sent,u=s.scripts,c=s.css,n.next=8,Promise.all([e.has(r)?[]:Promise.all(u.map(p)),Promise.all(c.map(v))]);case 8:return l=n.sent,y=o(l,2),m=y[1],n.next=13,h(i.whenEntrypoint(r),3800,f(new Error("Route did not complete loading: ".concat(r))));case 13:return g=n.sent,w=Object.assign({styles:m},g),n.abrupt("return","error"in g?g:w);case 18:return n.prev=18,n.t0=n.catch(0),n.abrupt("return",{error:n.t0});case 21:case"end":return n.stop()}}),a,null,[[0,18]])}))))},prefetch:function(e){var r,n=this;return(r=navigator.connection)&&(r.saveData||/2g/.test(r.effectiveType))?Promise.resolve():d(t,e).then((function(t){return Promise.all(c?t.scripts.map((function(t){return e=t,r="script",new Promise((function(t,o){if(document.querySelector('link[rel="prefetch"][href^="'.concat(e,'"]')))return t();n=document.createElement("link"),r&&(n.as=r),n.rel="prefetch",n.crossOrigin=void 0,n.onload=t,n.onerror=o,n.href=e,document.head.appendChild(n)}));var e,r,n})):[])})).then((function(){(0,s.requestIdleCallback)((function(){return n.loadRoute(e)}))})).catch((function(){}))}}};e.default=v},s1dQ:function(t,e,r){"use strict";var n;e.__esModule=!0,e.RouterContext=void 0;var o=((n=r("BqPY"))&&n.__esModule?n:{default:n}).default.createContext(null);e.RouterContext=o},s4GJ:function(t,e,r){"use strict";e.__esModule=!0,e.cancelIdleCallback=e.requestIdleCallback=void 0;var n="undefined"!==typeof self&&self.requestIdleCallback||function(t){var e=Date.now();return setTimeout((function(){t({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-e))}})}),1)};e.requestIdleCallback=n;var o="undefined"!==typeof self&&self.cancelIdleCallback||function(t){return clearTimeout(t)};e.cancelIdleCallback=o},sXyB:function(t,e,r){var n=r("SksO"),o=r("b48C");function a(e,r,i){return o()?t.exports=a=Reflect.construct:t.exports=a=function(t,e,r){var o=[null];o.push.apply(o,e);var a=new(Function.bind.apply(t,o));return r&&n(a,r.prototype),a},a.apply(null,arguments)}t.exports=a},tUWN:function(t,e,r){"use strict";e.__esModule=!0,e.formatUrl=function(t){var e=t.auth,r=t.hostname,o=t.protocol||"",i=t.pathname||"",s=t.hash||"",u=t.query||"",c=!1;e=e?encodeURIComponent(e).replace(/%3A/i,":")+"@":"",t.host?c=e+t.host:r&&(c=e+(~r.indexOf(":")?"[".concat(r,"]"):r),t.port&&(c+=":"+t.port));u&&"object"===typeof u&&(u=String(n.urlQueryToSearchParams(u)));var l=t.search||u&&"?".concat(u)||"";o&&":"!==o.substr(-1)&&(o+=":");t.slashes||(!o||a.test(o))&&!1!==c?(c="//"+(c||""),i&&"/"!==i[0]&&(i="/"+i)):c||(c="");s&&"#"!==s[0]&&(s="#"+s);l&&"?"!==l[0]&&(l="?"+l);return i=i.replace(/[?#]/g,encodeURIComponent),l=l.replace("#","%23"),"".concat(o).concat(c).concat(i).concat(l).concat(s)};var n=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==typeof t&&"function"!==typeof t)return{default:t};var e=o();if(e&&e.has(t))return e.get(t);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if(Object.prototype.hasOwnProperty.call(t,a)){var i=n?Object.getOwnPropertyDescriptor(t,a):null;i&&(i.get||i.set)?Object.defineProperty(r,a,i):r[a]=t[a]}r.default=t,e&&e.set(t,r);return r}(r("29pC"));function o(){if("function"!==typeof WeakMap)return null;var t=new WeakMap;return o=function(){return t},t}var a=/https?|ftp|gopher|file/},vuub:function(t,e,r){"use strict";function n(t){return t.endsWith("/")&&"/"!==t?t.slice(0,-1):t}e.__esModule=!0,e.removePathTrailingSlash=n,e.normalizePathTrailingSlash=void 0;var o=n;e.normalizePathTrailingSlash=o},wTVA:function(t,e){t.exports=function(t){if(Array.isArray(t))return t}},wkBT:function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},yXPU:function(t,e){function r(t,e,r,n,o,a,i){try{var s=t[a](i),u=s.value}catch(c){return void r(c)}s.done?e(u):Promise.resolve(u).then(n,o)}t.exports=function(t){return function(){var e=this,n=arguments;return new Promise((function(o,a){var i=t.apply(e,n);function s(t){r(i,o,a,s,u,"next",t)}function u(t){r(i,o,a,s,u,"throw",t)}s(void 0)}))}}}}]); \ No newline at end of file diff --git a/smile/static/chunks/3ef630e34cd10ba68f9d468ac363ff81c534e1e9.61f3c304b71d9cb8717f.js b/smile/static/chunks/3ef630e34cd10ba68f9d468ac363ff81c534e1e9.61f3c304b71d9cb8717f.js index 0364987..9d87339 100644 --- a/smile/static/chunks/3ef630e34cd10ba68f9d468ac363ff81c534e1e9.61f3c304b71d9cb8717f.js +++ b/smile/static/chunks/3ef630e34cd10ba68f9d468ac363ff81c534e1e9.61f3c304b71d9cb8717f.js @@ -1 +1 @@ -(window.webpackJsonp_N_E=window.webpackJsonp_N_E||[]).push([[2],{"/jkW":function(t,e,r){"use strict";e.__esModule=!0,e.isDynamicRoute=function(t){return n.test(t)};var n=/\/\[[^/]+?\](?=\/|$)/},"0Bsm":function(t,e,r){"use strict";var n=r("TqRt");e.__esModule=!0,e.default=function(t){function e(e){return o.default.createElement(t,Object.assign({router:(0,a.useRouter)()},e))}e.getInitialProps=t.getInitialProps,e.origGetInitialProps=t.origGetInitialProps,!1;return e};var o=n(r("q1tI")),a=r("nOHt")},"0G5g":function(t,e,r){"use strict";e.__esModule=!0,e.cancelIdleCallback=e.requestIdleCallback=void 0;var n="undefined"!==typeof self&&self.requestIdleCallback||function(t){var e=Date.now();return setTimeout((function(){t({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-e))}})}),1)};e.requestIdleCallback=n;var o="undefined"!==typeof self&&self.cancelIdleCallback||function(t){return clearTimeout(t)};e.cancelIdleCallback=o},"284h":function(t,e,r){var n=r("cDf5");function o(){if("function"!==typeof WeakMap)return null;var t=new WeakMap;return o=function(){return t},t}t.exports=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!==typeof t)return{default:t};var e=o();if(e&&e.has(t))return e.get(t);var r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var s=a?Object.getOwnPropertyDescriptor(t,i):null;s&&(s.get||s.set)?Object.defineProperty(r,i,s):r[i]=t[i]}return r.default=t,e&&e.set(t,r),r}},"3WeD":function(t,e,r){"use strict";var n=r("J4zp");function o(t){return"string"===typeof t||"number"===typeof t&&!isNaN(t)||"boolean"===typeof t?String(t):""}e.__esModule=!0,e.searchParamsToUrlQuery=function(t){var e={};return t.forEach((function(t,r){"undefined"===typeof e[r]?e[r]=t:Array.isArray(e[r])?e[r].push(t):e[r]=[e[r],t]})),e},e.urlQueryToSearchParams=function(t){var e=new URLSearchParams;return Object.entries(t).forEach((function(t){var r=n(t,2),a=r[0],i=r[1];Array.isArray(i)?i.forEach((function(t){return e.append(a,o(t))})):e.set(a,o(i))})),e},e.assign=function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n1&&void 0!==arguments[1]?arguments[1]:"",r="/"===t?"/index":/^\/index(\/|$)/.test(t)?"/index".concat(t):"".concat(t);return r+e}},Nh2W:function(t,e,r){"use strict";var n=r("o0o1"),o=r("J4zp"),a=r("yXPU"),i=r("TqRt");e.__esModule=!0,e.markAssetError=f,e.isAssetError=function(t){return t&&l in t},e.getClientBuildManifest=p,e.default=void 0;i(r("Lab5"));var s=r("0G5g");function u(t,e,r){var n,o=e.get(t);if(o)return"future"in o?o.future:Promise.resolve(o);var a=new Promise((function(t){n=t}));return e.set(t,o={resolve:n,future:a}),r?r().then((function(t){return n(t),t})):a}var c=function(t){try{return t=document.createElement("link"),!!window.MSInputMethodContext&&!!document.documentMode||t.relList.supports("prefetch")}catch(e){return!1}}();var l=Symbol("ASSET_LOAD_ERROR");function f(t){return Object.defineProperty(t,l,{})}function h(t,e,r){return new Promise((function(n,o){var a=!1;t.then((function(t){a=!0,n(t)})).catch(o),(0,s.requestIdleCallback)((function(){return setTimeout((function(){a||o(r)}),e)}))}))}function p(){return self.__BUILD_MANIFEST?Promise.resolve(self.__BUILD_MANIFEST):h(new Promise((function(t){var e=self.__BUILD_MANIFEST_CB;self.__BUILD_MANIFEST_CB=function(){t(self.__BUILD_MANIFEST),e&&e()}})),3800,f(new Error("Failed to load client build manifest")))}function d(t,e){return p().then((function(r){if(!(e in r))throw f(new Error("Failed to lookup route: ".concat(e)));var n=r[e].map((function(e){return t+"https://cdn.statically.io/gh/HiltonWS/hiltonws.github.io/master/smile/"+encodeURI(e)}));return{scripts:n.filter((function(t){return t.endsWith(".js")})),css:n.filter((function(t){return t.endsWith(".css")}))}}))}var v=function(t){var e=new Map,r=new Map,i=new Map,l=new Map;function p(t){var e=r.get(t);return e||(document.querySelector('script[src^="'.concat(t,'"]'))?Promise.resolve():(r.set(t,e=function(t,e){return new Promise((function(r,n){(e=document.createElement("script")).onload=r,e.onerror=function(){return n(f(new Error("Failed to load script: ".concat(t))))},e.crossOrigin=void 0,e.src=t,document.body.appendChild(e)}))}(t)),e))}function v(t){var e=i.get(t);return e||(i.set(t,e=fetch(t).then((function(e){if(!e.ok)throw new Error("Failed to load stylesheet: ".concat(t));return e.text().then((function(e){return{href:t,content:e}}))})).catch((function(t){throw f(t)}))),e)}return{whenEntrypoint:function(t){return u(t,e)},onEntrypoint:function(t,r){Promise.resolve(r).then((function(t){return t()})).then((function(t){return{component:t&&t.default||t,exports:t}}),(function(t){return{error:t}})).then((function(r){var n=e.get(t);e.set(t,r),n&&"resolve"in n&&n.resolve(r)}))},loadRoute:function(r){var i=this;return u(r,l,a(n.mark((function a(){var s,u,c,l,y,m,g,w;return n.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,d(t,r);case 3:return s=n.sent,u=s.scripts,c=s.css,n.next=8,Promise.all([e.has(r)?[]:Promise.all(u.map(p)),Promise.all(c.map(v))]);case 8:return l=n.sent,y=o(l,2),m=y[1],n.next=13,h(i.whenEntrypoint(r),3800,f(new Error("Route did not complete loading: ".concat(r))));case 13:return g=n.sent,w=Object.assign({styles:m},g),n.abrupt("return","error"in g?g:w);case 18:return n.prev=18,n.t0=n.catch(0),n.abrupt("return",{error:n.t0});case 21:case"end":return n.stop()}}),a,null,[[0,18]])}))))},prefetch:function(e){var r,n=this;return(r=navigator.connection)&&(r.saveData||/2g/.test(r.effectiveType))?Promise.resolve():d(t,e).then((function(t){return Promise.all(c?t.scripts.map((function(t){return e=t,r="script",new Promise((function(t,o){if(document.querySelector('link[rel="prefetch"][href^="'.concat(e,'"]')))return t();n=document.createElement("link"),r&&(n.as=r),n.rel="prefetch",n.crossOrigin=void 0,n.onload=t,n.onerror=o,n.href=e,document.head.appendChild(n)}));var e,r,n})):[])})).then((function(){(0,s.requestIdleCallback)((function(){return n.loadRoute(e)}))})).catch((function(){}))}}};e.default=v},Qetd:function(t,e,r){"use strict";var n=Object.assign.bind(Object);t.exports=n,t.exports.default=t.exports},SksO:function(t,e){function r(e,n){return t.exports=r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},r(e,n)}t.exports=r},TqRt:function(t,e){t.exports=function(t){return t&&t.__esModule?t:{default:t}}},W8MJ:function(t,e){function r(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r>>0,1)},emit:function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o-1||r>-1)&&(t=t.substring(0,e>-1?e:r)),t}function k(t){return""===(t=P(t))||t.startsWith("/")}function S(t){return function(t,e){return e&&t.startsWith("/")?"/"===t?(0,u.normalizePathTrailingSlash)(e):"".concat(e).concat("/"===P(t)?t.substring(1):t):t}(t,"")}function E(t){return(t=t.slice("".length)).startsWith("/")||(t="/".concat(t)),t}function R(t){if(t.startsWith("/")||t.startsWith("#"))return!0;try{var e=(0,h.getLocationOrigin)(),r=new URL(t,e);return r.origin===e&&k(r.pathname)}catch(n){return!1}}function L(t,e,r){var n="",o=(0,g.getRouteRegex)(t),a=o.groups,i=(e!==t?(0,m.getRouteMatcher)(o)(e):"")||r;n=t;var s=Object.keys(a);return s.every((function(t){var e=i[t]||"",r=a[t],o=r.repeat,s=r.optional,u="[".concat(o?"...":"").concat(t,"]");return s&&(u="".concat(e?"":"/","[").concat(u,"]")),o&&!Array.isArray(e)&&(e=[e]),(s||t in i)&&(n=n.replace(u,o?e.map((function(t){return encodeURIComponent(t)})).join("/"):encodeURIComponent(e))||"/")}))||(n=""),{params:s,result:n}}function C(t,e){var r={};return Object.keys(t).forEach((function(n){e.includes(n)||(r[n]=t[n])})),r}function O(t,e,r){var n=new URL(t,"http://n"),o="string"===typeof e?e:(0,h.formatWithValidation)(e);if(!R(o))return r?[o]:o;try{var a=new URL(o,n);a.pathname=(0,u.normalizePathTrailingSlash)(a.pathname);var i="";if((0,p.isDynamicRoute)(a.pathname)&&a.searchParams&&r){var s=(0,v.searchParamsToUrlQuery)(a.searchParams),c=L(a.pathname,a.pathname,s),l=c.result,f=c.params;l&&(i=(0,h.formatWithValidation)({pathname:l,hash:a.hash,query:C(s,f)}))}var d=a.origin===n.origin?a.href.slice(a.origin.length):a.href;return r?[d,i||d]:d}catch(y){return r?[o]:o}}function I(t){var e=(0,h.getLocationOrigin)();return t.startsWith(e)?t.substring(e.length):t}function T(t,e,r){var n=O(t.pathname,e,!0),o=s(n,2),a=o[0],i=o[1],u=(0,h.getLocationOrigin)(),c=a.startsWith(u),l=i&&i.startsWith(u);a=I(a),i=i?I(i):i;var f=c?a:S(a),p=r?I(O(t.pathname,r)):i||a;return{url:f,as:l?p:S(p)}}function j(t,e){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=t.pathname,o=(0,u.removePathTrailingSlash)((0,l.denormalizePagePath)(r?E(n):n));return"/404"===o||"/_error"===o||(e.includes(o)||e.some((function(e){if((0,p.isDynamicRoute)(e)&&(0,g.getRouteRegex)(e).re.test(o))return t.pathname=r?S(e):e,!0})),t.pathname=(0,u.removePathTrailingSlash)(t.pathname)),t}var A=Symbol("SSG_DATA_NOT_FOUND");function D(t,e){return fetch(t,{credentials:"same-origin"}).then((function(r){if(!r.ok){if(e>1&&r.status>=500)return D(t,e-1);if(404===r.status)return r.json().then((function(t){if(t.notFound)return{notFound:A};throw new Error("Failed to load static props")}));throw new Error("Failed to load static props")}return r.json()}))}function M(t,e){return D(t,e?3:1).catch((function(t){throw e||(0,c.markAssetError)(t),t}))}var N=function(){function t(e,r,n,o){var i=this,s=o.initialProps,c=o.pageLoader,l=o.App,f=o.wrapApp,v=o.Component,y=o.err,m=o.subscription,g=o.isFallback,w=o.locale,b=(o.locales,o.defaultLocale,o.domainLocales,o.isPreview);a(this,t),this.route=void 0,this.pathname=void 0,this.query=void 0,this.asPath=void 0,this.basePath=void 0,this.components=void 0,this.sdc={},this.sdr={},this.sub=void 0,this.clc=void 0,this.pageLoader=void 0,this._bps=void 0,this.events=void 0,this._wrapApp=void 0,this.isSsr=void 0,this.isFallback=void 0,this._inFlightRoute=void 0,this._shallow=void 0,this.locale=void 0,this.locales=void 0,this.defaultLocale=void 0,this.domainLocales=void 0,this.isReady=void 0,this.isPreview=void 0,this.isLocaleDomain=void 0,this._idx=0,this.onPopState=function(t){var e=t.state;if(e){if(e.__N){var r=e.url,n=e.as,o=e.options,a=e.idx;i._idx=a;var s=(0,d.parseRelativeUrl)(r).pathname;i.isSsr&&n===i.asPath&&s===i.pathname||i._bps&&!i._bps(e)||i.change("replaceState",r,n,Object.assign({},o,{shallow:o.shallow&&i._shallow,locale:o.locale||i.defaultLocale}),undefined)}}else{var u=i.pathname,c=i.query;i.changeState("replaceState",(0,h.formatWithValidation)({pathname:S(u),query:c}),(0,h.getURL)())}},this.route=(0,u.removePathTrailingSlash)(e),this.components={},"/_error"!==e&&(this.components[this.route]={Component:v,initial:!0,props:s,err:y,__N_SSG:s&&s.__N_SSG,__N_SSP:s&&s.__N_SSP}),this.components["/_app"]={Component:l,styleSheets:[]},this.events=t.events,this.pageLoader=c,this.pathname=e,this.query=r;var _=(0,p.isDynamicRoute)(e)&&self.__NEXT_DATA__.autoExport;this.asPath=_?e:n,this.basePath="",this.sub=m,this.clc=null,this._wrapApp=f,this.isSsr=!0,this.isFallback=g,this.isReady=!(!self.__NEXT_DATA__.gssp&&!self.__NEXT_DATA__.gip&&(_||self.location.search)),this.isPreview=!!b,this.isLocaleDomain=!1,"//"!==n.substr(0,2)&&this.changeState("replaceState",(0,h.formatWithValidation)({pathname:S(e),query:r}),(0,h.getURL)(),{locale:w}),window.addEventListener("popstate",this.onPopState)}return i(t,[{key:"reload",value:function(){window.location.reload()}},{key:"back",value:function(){window.history.back()}},{key:"push",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};var n=T(this,t,e);return t=n.url,e=n.as,this.change("pushState",t,e,r)}},{key:"replace",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=T(this,t,e);return t=n.url,e=n.as,this.change("replaceState",t,e,r)}},{key:"change",value:function(){var e=o(n.mark((function e(r,o,a,i,s){var l,f,v,y,w,b,P,O,I,D,M,N,U,W,q,F,G,B,V,H,X,z,J,$,Y,Q,Z,K,tt,et,rt,nt,ot,at,it;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(R(o)){e.next=3;break}return window.location.href=o,e.abrupt("return",!1);case 3:i._h&&(this.isReady=!0),i.scroll=!(null!=(l=i.scroll)&&!l),f=i.locale!==this.locale,e.next=18;break;case 18:if(i._h||(this.isSsr=!1),h.ST&&performance.mark("routeChange"),v=i.shallow,y={shallow:void 0!==v&&v},this._inFlightRoute&&this.abortComponentLoad(this._inFlightRoute,y),a=S(_(k(a)?E(a):a,i.locale,this.defaultLocale)),w=x(k(a)?E(a):a,this.locale),this._inFlightRoute=a,i._h||!this.onlyAHashChange(w)){e.next=34;break}return this.asPath=w,t.events.emit("hashChangeStart",a,y),this.changeState(r,o,a,i),this.scrollToHash(w),this.notify(this.components[this.route],null),t.events.emit("hashChangeComplete",a,y),e.abrupt("return",!0);case 34:return b=(0,d.parseRelativeUrl)(o),O=(P=b).pathname,I=P.query,e.prev=36,e.next=39,this.pageLoader.getPageList();case 39:return D=e.sent,e.next=42,(0,c.getClientBuildManifest)();case 42:M=e.sent,M.__rewrites,e.next=50;break;case 46:return e.prev=46,e.t0=e.catch(36),window.location.href=a,e.abrupt("return",!1);case 50:if((b=j(b,D)).pathname!==O&&(O=b.pathname,o=(0,h.formatWithValidation)(b)),O=O?(0,u.removePathTrailingSlash)(E(O)):O,this.urlIsNew(w)||f||(r="replaceState"),N=(0,u.removePathTrailingSlash)(O),U=a,R(a)){e.next=62;break}e.next=60;break;case 60:return window.location.href=a,e.abrupt("return",!1);case 62:if(U=x(E(U),this.locale),!(0,p.isDynamicRoute)(N)){e.next=78;break}if(W=(0,d.parseRelativeUrl)(U),q=W.pathname,F=(0,g.getRouteRegex)(N),G=(0,m.getRouteMatcher)(F)(q),V=(B=N===q)?L(N,q,I):{},G&&(!B||V.result)){e.next=77;break}if(!((H=Object.keys(F.groups).filter((function(t){return!I[t]}))).length>0)){e.next=75;break}throw new Error((B?"The provided `href` (".concat(o,") value is missing query values (").concat(H.join(", "),") to be interpolated properly. "):"The provided `as` value (".concat(q,") is incompatible with the `href` value (").concat(N,"). "))+"Read more: https://err.sh/vercel/next.js/".concat(B?"href-interpolation-failed":"incompatible-href-as"));case 75:e.next=78;break;case 77:B?a=(0,h.formatWithValidation)(Object.assign({},W,{pathname:V.result,query:C(I,V.params)})):Object.assign(I,G);case 78:return t.events.emit("routeChangeStart",a,y),e.prev=79,e.next=82,this.getRouteInfo(N,O,I,a,U,y);case 82:if(J=e.sent,Y=($=J).error,Q=$.props,Z=$.__N_SSG,K=$.__N_SSP,!Z&&!K||!Q){e.next=109;break}if(!Q.pageProps||!Q.pageProps.__N_REDIRECT){e.next=95;break}if(!(tt=Q.pageProps.__N_REDIRECT).startsWith("/")){e.next=93;break}if(j(et=(0,d.parseRelativeUrl)(tt),D,!1),!D.includes(et.pathname)){e.next=93;break}return rt=T(this,tt,tt),nt=rt.url,ot=rt.as,e.abrupt("return",this.change(r,nt,ot,i));case 93:return window.location.href=tt,e.abrupt("return",new Promise((function(){})));case 95:if(this.isPreview=!!Q.__N_PREVIEW,Q.notFound!==A){e.next=109;break}return e.prev=97,e.next=100,this.fetchComponent("/404");case 100:at="/404",e.next=106;break;case 103:e.prev=103,e.t1=e.catch(97),at="/_error";case 106:return e.next=108,this.getRouteInfo(at,at,I,a,U,{shallow:!1});case 108:J=e.sent;case 109:return t.events.emit("beforeHistoryChange",a,y),this.changeState(r,o,a,i),it=i.shallow&&this.route===N,i._h&&"/_error"===O&&500===(null==(X=self.__NEXT_DATA__.props)||null==(z=X.pageProps)?void 0:z.statusCode)&&null!=Q&&Q.pageProps&&(Q.pageProps.statusCode=500),e.next=116,this.set(N,O,I,w,J,s||(it||!i.scroll?null:{x:0,y:0})).catch((function(t){if(!t.cancelled)throw t;Y=Y||t}));case 116:if(!Y){e.next=119;break}throw t.events.emit("routeChangeError",Y,w,y),Y;case 119:return t.events.emit("routeChangeComplete",a,y),e.abrupt("return",!0);case 124:if(e.prev=124,e.t2=e.catch(79),!e.t2.cancelled){e.next=128;break}return e.abrupt("return",!1);case 128:throw e.t2;case 129:case"end":return e.stop()}}),e,this,[[36,46],[79,124],[97,103]])})));return function(t,r,n,o,a){return e.apply(this,arguments)}}()},{key:"changeState",value:function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};"pushState"===t&&(0,h.getURL)()===r||(this._shallow=n.shallow,window.history[t]({url:e,as:r,options:n,__N:!0,idx:this._idx="pushState"!==t?this._idx:this._idx+1},"",r))}},{key:"handleRouteInfoError",value:function(){var e=o(n.mark((function e(r,o,a,i,s,u){var l,f,h,p;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!r.cancelled){e.next=2;break}throw r;case 2:if(!(0,c.isAssetError)(r)&&!u){e.next=6;break}throw t.events.emit("routeChangeError",r,i,s),window.location.href=i,b();case 6:if(e.prev=6,"undefined"!==typeof l&&"undefined"!==typeof f){e.next=14;break}return e.next=11,this.fetchComponent("/_error");case 11:h=e.sent,l=h.page,f=h.styleSheets;case 14:if((p={props:undefined,Component:l,styleSheets:f,err:r,error:r}).props){e.next=26;break}return e.prev=16,e.next=19,this.getInitialProps(l,{err:r,pathname:o,query:a});case 19:p.props=e.sent,e.next=26;break;case 22:e.prev=22,e.t0=e.catch(16),console.error("Error in error page `getInitialProps`: ",e.t0),p.props={};case 26:return e.abrupt("return",p);case 29:return e.prev=29,e.t1=e.catch(6),e.abrupt("return",this.handleRouteInfoError(e.t1,o,a,i,s,!0));case 32:case"end":return e.stop()}}),e,this,[[6,29],[16,22]])})));return function(t,r,n,o,a,i){return e.apply(this,arguments)}}()},{key:"getRouteInfo",value:function(){var t=o(n.mark((function t(e,r,o,a,i,s){var u,c,l,f,p,d,v,y,m=this;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,u=this.components[e],!s.shallow||!u||this.route!==e){t.next=4;break}return t.abrupt("return",u);case 4:if(!(c=u&&"initial"in u?void 0:u)){t.next=9;break}t.t0=c,t.next=12;break;case 9:return t.next=11,this.fetchComponent(e).then((function(t){return{Component:t.page,styleSheets:t.styleSheets,__N_SSG:t.mod.__N_SSG,__N_SSP:t.mod.__N_SSP}}));case 11:t.t0=t.sent;case 12:l=t.t0,f=l.Component,p=l.__N_SSG,d=l.__N_SSP,t.next=18;break;case 18:return(p||d)&&(v=this.pageLoader.getDataHref((0,h.formatWithValidation)({pathname:r,query:o}),i,p,this.locale)),t.next=21,this._getData((function(){return p?m._getStaticData(v):d?m._getServerData(v):m.getInitialProps(f,{pathname:r,query:o,asPath:a})}));case 21:return y=t.sent,l.props=y,this.components[e]=l,t.abrupt("return",l);case 27:return t.prev=27,t.t1=t.catch(0),t.abrupt("return",this.handleRouteInfoError(t.t1,r,o,a,s));case 30:case"end":return t.stop()}}),t,this,[[0,27]])})));return function(e,r,n,o,a,i){return t.apply(this,arguments)}}()},{key:"set",value:function(t,e,r,n,o,a){return this.isFallback=!1,this.route=t,this.pathname=e,this.query=r,this.asPath=n,this.notify(o,a)}},{key:"beforePopState",value:function(t){this._bps=t}},{key:"onlyAHashChange",value:function(t){if(!this.asPath)return!1;var e=this.asPath.split("#"),r=s(e,2),n=r[0],o=r[1],a=t.split("#"),i=s(a,2),u=i[0],c=i[1];return!(!c||n!==u||o!==c)||n===u&&o!==c}},{key:"scrollToHash",value:function(t){var e=t.split("#"),r=s(e,2)[1];if(""!==r&&"top"!==r){var n=document.getElementById(r);if(n)n.scrollIntoView();else{var o=document.getElementsByName(r)[0];o&&o.scrollIntoView()}}else window.scrollTo(0,0)}},{key:"urlIsNew",value:function(t){return this.asPath!==t}},{key:"prefetch",value:function(){var t=o(n.mark((function t(e){var r,o,a,i,s,c,l,f,p,v,m=this,g=arguments;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=g.length>1&&void 0!==g[1]?g[1]:e,o=g.length>2&&void 0!==g[2]?g[2]:{},a=(0,d.parseRelativeUrl)(e),i=a.pathname,t.next=7,this.pageLoader.getPageList();case 7:s=t.sent,(a=j(a,s,!1)).pathname!==i&&(i=a.pathname,e=(0,h.formatWithValidation)(a)),c=(0,u.removePathTrailingSlash)(i),l=r,t.next=19;break;case 15:p=t.sent,f=p.__rewrites,(v=(0,y.default)(S(_(E(r),this.locale)),s,f,a.query,(function(t){return j({pathname:t},s).pathname}),this.locales)).matchedPage&&v.resolvedHref&&(c=v.resolvedHref,i=v.resolvedHref,a.pathname=i,e=(0,h.formatWithValidation)(a),l=v.asPath);case 19:t.next=21;break;case 21:return t.next=23,Promise.all([this.pageLoader._isSsg(e).then((function(t){return!!t&&m._getStaticData(m.pageLoader.getDataHref(e,l,!0,"undefined"!==typeof o.locale?o.locale:m.locale))})),this.pageLoader[o.priority?"loadPage":"prefetch"](c)]);case 23:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"fetchComponent",value:function(){var t=o(n.mark((function t(e){var r,o,a,i;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=!1,o=this.clc=function(){r=!0},t.next=4,this.pageLoader.loadPage(e);case 4:if(a=t.sent,!r){t.next=9;break}throw(i=new Error('Abort fetching component for route: "'.concat(e,'"'))).cancelled=!0,i;case 9:return o===this.clc&&(this.clc=null),t.abrupt("return",a);case 11:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"_getData",value:function(t){var e=this,r=!1,n=function(){r=!0};return this.clc=n,t().then((function(t){if(n===e.clc&&(e.clc=null),r){var o=new Error("Loading initial props cancelled");throw o.cancelled=!0,o}return t}))}},{key:"_getStaticData",value:function(t){var e=this,r=new URL(t,window.location.href).href;return!this.isPreview&&this.sdc[r]?Promise.resolve(this.sdc[r]):M(t,this.isSsr).then((function(t){return e.sdc[r]=t,t}))}},{key:"_getServerData",value:function(t){var e=this,r=new URL(t,window.location.href).href;return this.sdr[r]?this.sdr[r]:this.sdr[r]=M(t,this.isSsr).then((function(t){return delete e.sdr[r],t})).catch((function(t){throw delete e.sdr[r],t}))}},{key:"getInitialProps",value:function(t,e){var r=this.components["/_app"].Component,n=this._wrapApp(r);return e.AppTree=n,(0,h.loadGetInitialProps)(r,{AppTree:n,Component:t,router:this,ctx:e})}},{key:"abortComponentLoad",value:function(e,r){this.clc&&(t.events.emit("routeChangeError",b(),e,r),this.clc(),this.clc=null)}},{key:"notify",value:function(t,e){return this.sub(t,this.components["/_app"].Component,e)}}]),t}();e.default=N,N.events=(0,f.default)()},"g/15":function(t,e,r){"use strict";var n=r("o0o1"),o=r("yXPU");e.__esModule=!0,e.execOnce=function(t){var e,r=!1;return function(){return r||(r=!0,e=t.apply(void 0,arguments)),e}},e.getLocationOrigin=i,e.getURL=function(){var t=window.location.href,e=i();return t.substring(e.length)},e.getDisplayName=s,e.isResSent=u,e.loadGetInitialProps=c,e.formatWithValidation=function(t){0;return(0,a.formatUrl)(t)},e.ST=e.SP=e.urlObjectKeys=void 0;var a=r("6D7l");function i(){var t=window.location,e=t.protocol,r=t.hostname,n=t.port;return"".concat(e,"//").concat(r).concat(n?":"+n:"")}function s(t){return"string"===typeof t?t:t.displayName||t.name||"Unknown"}function u(t){return t.finished||t.headersSent}function c(t,e){return l.apply(this,arguments)}function l(){return(l=o(n.mark((function t(e,r){var o,a,i;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:t.next=4;break;case 4:if(o=r.res||r.ctx&&r.ctx.res,e.getInitialProps){t.next=12;break}if(!r.ctx||!r.Component){t.next=11;break}return t.next=9,c(r.Component,r.ctx);case 9:return t.t0=t.sent,t.abrupt("return",{pageProps:t.t0});case 11:return t.abrupt("return",{});case 12:return t.next=14,e.getInitialProps(r);case 14:if(a=t.sent,!o||!u(o)){t.next=17;break}return t.abrupt("return",a);case 17:if(a){t.next=20;break}throw i='"'.concat(s(e),'.getInitialProps()" should resolve to an object. But found "').concat(a,'" instead.'),new Error(i);case 20:return t.abrupt("return",a);case 22:case"end":return t.stop()}}),t)})))).apply(this,arguments)}e.urlObjectKeys=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];var f="undefined"!==typeof performance;e.SP=f;var h=f&&"function"===typeof performance.mark&&"function"===typeof performance.measure;e.ST=h},gguc:function(t,e,r){"use strict";e.__esModule=!0,e.getRouteMatcher=function(t){var e=t.re,r=t.groups;return function(t){var n=e.exec(t);if(!n)return!1;var o=function(t){try{return decodeURIComponent(t)}catch(r){var e=new Error("failed to decode param");throw e.code="DECODE_FAILED",e}},a={};return Object.keys(r).forEach((function(t){var e=r[t],i=n[e.pos];void 0!==i&&(a[t]=~i.indexOf("/")?i.split("/").map((function(t){return o(t)})):e.repeat?[o(i)]:o(i))})),a}}},hS4m:function(t,e,r){"use strict";e.__esModule=!0,e.parseRelativeUrl=function(t,e){var r=new URL((0,n.getLocationOrigin)()),a=e?new URL(e,r):r,i=new URL(t,a),s=i.pathname,u=i.searchParams,c=i.search,l=i.hash,f=i.href;if(i.origin!==r.origin)throw new Error("invariant: invalid relative URL, router received ".concat(t));return{pathname:s,query:(0,o.searchParamsToUrlQuery)(u),search:c,hash:l,href:f.slice(r.origin.length)}};var n=r("g/15"),o=r("3WeD")},ls82:function(t,e,r){var n=function(t){"use strict";var e,r=Object.prototype,n=r.hasOwnProperty,o="function"===typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(I){u=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var o=e&&e.prototype instanceof y?e:y,a=Object.create(o.prototype),i=new L(n||[]);return a._invoke=function(t,e,r){var n=f;return function(o,a){if(n===p)throw new Error("Generator is already running");if(n===d){if("throw"===o)throw a;return O()}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var s=S(i,r);if(s){if(s===v)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===f)throw n=d,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=p;var u=l(t,e,r);if("normal"===u.type){if(n=r.done?d:h,u.arg===v)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n=d,r.method="throw",r.arg=u.arg)}}}(t,r,i),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(I){return{type:"throw",arg:I}}}t.wrap=c;var f="suspendedStart",h="suspendedYield",p="executing",d="completed",v={};function y(){}function m(){}function g(){}var w={};w[a]=function(){return this};var b=Object.getPrototypeOf,_=b&&b(b(C([])));_&&_!==r&&n.call(_,a)&&(w=_);var x=g.prototype=y.prototype=Object.create(w);function P(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function k(t,e){function r(o,a,i,s){var u=l(t[o],t,a);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"===typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,i,s)}),(function(t){r("throw",t,i,s)})):e.resolve(f).then((function(t){c.value=t,i(c)}),(function(t){return r("throw",t,i,s)}))}s(u.arg)}var o;this._invoke=function(t,n){function a(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(a,a):a()}}function S(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,S(t,r),"throw"===r.method))return v;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=l(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,v;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function R(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function C(t){if(t){var r=t[a];if(r)return r.call(t);if("function"===typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--a){var i=this.tryEntries[a],s=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),R(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;R(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:C(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}(t.exports);try{regeneratorRuntime=n}catch(o){Function("r","regeneratorRuntime = r")(n)}},lwsE:function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},m0LI:function(t,e){t.exports=function(t,e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t)){var r=[],n=!0,o=!1,a=void 0;try{for(var i,s=t[Symbol.iterator]();!(n=(i=s.next()).done)&&(r.push(i.value),!e||r.length!==e);n=!0);}catch(u){o=!0,a=u}finally{try{n||null==s.return||s.return()}finally{if(o)throw a}}return r}}},nOHt:function(t,e,r){"use strict";var n=r("sXyB");function o(t,e){var r;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"===typeof t)return a(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return a(t,e)}(t))||e&&t&&"number"===typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,u=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return s=t.done,t},e:function(t){u=!0,i=t},f:function(){try{s||null==r.return||r.return()}finally{if(u)throw i}}}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r1?e-1:0),n=1;n1&&void 0!==arguments[1]?arguments[1]:"",r="/"===t?"/index":/^\/index(\/|$)/.test(t)?"/index".concat(t):"".concat(t);return r+e}},Nh2W:function(t,e,r){"use strict";var n=r("o0o1"),o=r("J4zp"),a=r("yXPU"),i=r("TqRt");e.__esModule=!0,e.markAssetError=f,e.isAssetError=function(t){return t&&l in t},e.getClientBuildManifest=p,e.default=void 0;i(r("Lab5"));var s=r("0G5g");function u(t,e,r){var n,o=e.get(t);if(o)return"future"in o?o.future:Promise.resolve(o);var a=new Promise((function(t){n=t}));return e.set(t,o={resolve:n,future:a}),r?r().then((function(t){return n(t),t})):a}var c=function(t){try{return t=document.createElement("link"),!!window.MSInputMethodContext&&!!document.documentMode||t.relList.supports("prefetch")}catch(e){return!1}}();var l=Symbol("ASSET_LOAD_ERROR");function f(t){return Object.defineProperty(t,l,{})}function h(t,e,r){return new Promise((function(n,o){var a=!1;t.then((function(t){a=!0,n(t)})).catch(o),(0,s.requestIdleCallback)((function(){return setTimeout((function(){a||o(r)}),e)}))}))}function p(){return self.__BUILD_MANIFEST?Promise.resolve(self.__BUILD_MANIFEST):h(new Promise((function(t){var e=self.__BUILD_MANIFEST_CB;self.__BUILD_MANIFEST_CB=function(){t(self.__BUILD_MANIFEST),e&&e()}})),3800,f(new Error("Failed to load client build manifest")))}function d(t,e){return p().then((function(r){if(!(e in r))throw f(new Error("Failed to lookup route: ".concat(e)));var n=r[e].map((function(e){return t+"https://cdn.statically.io/gh/HiltonWS/hiltonws.github.io/1.1.1/smile/"+encodeURI(e)}));return{scripts:n.filter((function(t){return t.endsWith(".js")})),css:n.filter((function(t){return t.endsWith(".css")}))}}))}var v=function(t){var e=new Map,r=new Map,i=new Map,l=new Map;function p(t){var e=r.get(t);return e||(document.querySelector('script[src^="'.concat(t,'"]'))?Promise.resolve():(r.set(t,e=function(t,e){return new Promise((function(r,n){(e=document.createElement("script")).onload=r,e.onerror=function(){return n(f(new Error("Failed to load script: ".concat(t))))},e.crossOrigin=void 0,e.src=t,document.body.appendChild(e)}))}(t)),e))}function v(t){var e=i.get(t);return e||(i.set(t,e=fetch(t).then((function(e){if(!e.ok)throw new Error("Failed to load stylesheet: ".concat(t));return e.text().then((function(e){return{href:t,content:e}}))})).catch((function(t){throw f(t)}))),e)}return{whenEntrypoint:function(t){return u(t,e)},onEntrypoint:function(t,r){Promise.resolve(r).then((function(t){return t()})).then((function(t){return{component:t&&t.default||t,exports:t}}),(function(t){return{error:t}})).then((function(r){var n=e.get(t);e.set(t,r),n&&"resolve"in n&&n.resolve(r)}))},loadRoute:function(r){var i=this;return u(r,l,a(n.mark((function a(){var s,u,c,l,y,m,g,w;return n.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,d(t,r);case 3:return s=n.sent,u=s.scripts,c=s.css,n.next=8,Promise.all([e.has(r)?[]:Promise.all(u.map(p)),Promise.all(c.map(v))]);case 8:return l=n.sent,y=o(l,2),m=y[1],n.next=13,h(i.whenEntrypoint(r),3800,f(new Error("Route did not complete loading: ".concat(r))));case 13:return g=n.sent,w=Object.assign({styles:m},g),n.abrupt("return","error"in g?g:w);case 18:return n.prev=18,n.t0=n.catch(0),n.abrupt("return",{error:n.t0});case 21:case"end":return n.stop()}}),a,null,[[0,18]])}))))},prefetch:function(e){var r,n=this;return(r=navigator.connection)&&(r.saveData||/2g/.test(r.effectiveType))?Promise.resolve():d(t,e).then((function(t){return Promise.all(c?t.scripts.map((function(t){return e=t,r="script",new Promise((function(t,o){if(document.querySelector('link[rel="prefetch"][href^="'.concat(e,'"]')))return t();n=document.createElement("link"),r&&(n.as=r),n.rel="prefetch",n.crossOrigin=void 0,n.onload=t,n.onerror=o,n.href=e,document.head.appendChild(n)}));var e,r,n})):[])})).then((function(){(0,s.requestIdleCallback)((function(){return n.loadRoute(e)}))})).catch((function(){}))}}};e.default=v},Qetd:function(t,e,r){"use strict";var n=Object.assign.bind(Object);t.exports=n,t.exports.default=t.exports},SksO:function(t,e){function r(e,n){return t.exports=r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},r(e,n)}t.exports=r},TqRt:function(t,e){t.exports=function(t){return t&&t.__esModule?t:{default:t}}},W8MJ:function(t,e){function r(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r>>0,1)},emit:function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o-1||r>-1)&&(t=t.substring(0,e>-1?e:r)),t}function k(t){return""===(t=P(t))||t.startsWith("/")}function S(t){return function(t,e){return e&&t.startsWith("/")?"/"===t?(0,u.normalizePathTrailingSlash)(e):"".concat(e).concat("/"===P(t)?t.substring(1):t):t}(t,"")}function E(t){return(t=t.slice("".length)).startsWith("/")||(t="/".concat(t)),t}function R(t){if(t.startsWith("/")||t.startsWith("#"))return!0;try{var e=(0,h.getLocationOrigin)(),r=new URL(t,e);return r.origin===e&&k(r.pathname)}catch(n){return!1}}function L(t,e,r){var n="",o=(0,g.getRouteRegex)(t),a=o.groups,i=(e!==t?(0,m.getRouteMatcher)(o)(e):"")||r;n=t;var s=Object.keys(a);return s.every((function(t){var e=i[t]||"",r=a[t],o=r.repeat,s=r.optional,u="[".concat(o?"...":"").concat(t,"]");return s&&(u="".concat(e?"":"/","[").concat(u,"]")),o&&!Array.isArray(e)&&(e=[e]),(s||t in i)&&(n=n.replace(u,o?e.map((function(t){return encodeURIComponent(t)})).join("/"):encodeURIComponent(e))||"/")}))||(n=""),{params:s,result:n}}function C(t,e){var r={};return Object.keys(t).forEach((function(n){e.includes(n)||(r[n]=t[n])})),r}function O(t,e,r){var n=new URL(t,"http://n"),o="string"===typeof e?e:(0,h.formatWithValidation)(e);if(!R(o))return r?[o]:o;try{var a=new URL(o,n);a.pathname=(0,u.normalizePathTrailingSlash)(a.pathname);var i="";if((0,p.isDynamicRoute)(a.pathname)&&a.searchParams&&r){var s=(0,v.searchParamsToUrlQuery)(a.searchParams),c=L(a.pathname,a.pathname,s),l=c.result,f=c.params;l&&(i=(0,h.formatWithValidation)({pathname:l,hash:a.hash,query:C(s,f)}))}var d=a.origin===n.origin?a.href.slice(a.origin.length):a.href;return r?[d,i||d]:d}catch(y){return r?[o]:o}}function I(t){var e=(0,h.getLocationOrigin)();return t.startsWith(e)?t.substring(e.length):t}function T(t,e,r){var n=O(t.pathname,e,!0),o=s(n,2),a=o[0],i=o[1],u=(0,h.getLocationOrigin)(),c=a.startsWith(u),l=i&&i.startsWith(u);a=I(a),i=i?I(i):i;var f=c?a:S(a),p=r?I(O(t.pathname,r)):i||a;return{url:f,as:l?p:S(p)}}function j(t,e){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=t.pathname,o=(0,u.removePathTrailingSlash)((0,l.denormalizePagePath)(r?E(n):n));return"/404"===o||"/_error"===o||(e.includes(o)||e.some((function(e){if((0,p.isDynamicRoute)(e)&&(0,g.getRouteRegex)(e).re.test(o))return t.pathname=r?S(e):e,!0})),t.pathname=(0,u.removePathTrailingSlash)(t.pathname)),t}var A=Symbol("SSG_DATA_NOT_FOUND");function D(t,e){return fetch(t,{credentials:"same-origin"}).then((function(r){if(!r.ok){if(e>1&&r.status>=500)return D(t,e-1);if(404===r.status)return r.json().then((function(t){if(t.notFound)return{notFound:A};throw new Error("Failed to load static props")}));throw new Error("Failed to load static props")}return r.json()}))}function M(t,e){return D(t,e?3:1).catch((function(t){throw e||(0,c.markAssetError)(t),t}))}var N=function(){function t(e,r,n,o){var i=this,s=o.initialProps,c=o.pageLoader,l=o.App,f=o.wrapApp,v=o.Component,y=o.err,m=o.subscription,g=o.isFallback,w=o.locale,b=(o.locales,o.defaultLocale,o.domainLocales,o.isPreview);a(this,t),this.route=void 0,this.pathname=void 0,this.query=void 0,this.asPath=void 0,this.basePath=void 0,this.components=void 0,this.sdc={},this.sdr={},this.sub=void 0,this.clc=void 0,this.pageLoader=void 0,this._bps=void 0,this.events=void 0,this._wrapApp=void 0,this.isSsr=void 0,this.isFallback=void 0,this._inFlightRoute=void 0,this._shallow=void 0,this.locale=void 0,this.locales=void 0,this.defaultLocale=void 0,this.domainLocales=void 0,this.isReady=void 0,this.isPreview=void 0,this.isLocaleDomain=void 0,this._idx=0,this.onPopState=function(t){var e=t.state;if(e){if(e.__N){var r=e.url,n=e.as,o=e.options,a=e.idx;i._idx=a;var s=(0,d.parseRelativeUrl)(r).pathname;i.isSsr&&n===i.asPath&&s===i.pathname||i._bps&&!i._bps(e)||i.change("replaceState",r,n,Object.assign({},o,{shallow:o.shallow&&i._shallow,locale:o.locale||i.defaultLocale}),undefined)}}else{var u=i.pathname,c=i.query;i.changeState("replaceState",(0,h.formatWithValidation)({pathname:S(u),query:c}),(0,h.getURL)())}},this.route=(0,u.removePathTrailingSlash)(e),this.components={},"/_error"!==e&&(this.components[this.route]={Component:v,initial:!0,props:s,err:y,__N_SSG:s&&s.__N_SSG,__N_SSP:s&&s.__N_SSP}),this.components["/_app"]={Component:l,styleSheets:[]},this.events=t.events,this.pageLoader=c,this.pathname=e,this.query=r;var _=(0,p.isDynamicRoute)(e)&&self.__NEXT_DATA__.autoExport;this.asPath=_?e:n,this.basePath="",this.sub=m,this.clc=null,this._wrapApp=f,this.isSsr=!0,this.isFallback=g,this.isReady=!(!self.__NEXT_DATA__.gssp&&!self.__NEXT_DATA__.gip&&(_||self.location.search)),this.isPreview=!!b,this.isLocaleDomain=!1,"//"!==n.substr(0,2)&&this.changeState("replaceState",(0,h.formatWithValidation)({pathname:S(e),query:r}),(0,h.getURL)(),{locale:w}),window.addEventListener("popstate",this.onPopState)}return i(t,[{key:"reload",value:function(){window.location.reload()}},{key:"back",value:function(){window.history.back()}},{key:"push",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};var n=T(this,t,e);return t=n.url,e=n.as,this.change("pushState",t,e,r)}},{key:"replace",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=T(this,t,e);return t=n.url,e=n.as,this.change("replaceState",t,e,r)}},{key:"change",value:function(){var e=o(n.mark((function e(r,o,a,i,s){var l,f,v,y,w,b,P,O,I,D,M,N,U,W,q,F,G,B,V,H,X,z,J,$,Y,Q,Z,K,tt,et,rt,nt,ot,at,it;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(R(o)){e.next=3;break}return window.location.href=o,e.abrupt("return",!1);case 3:i._h&&(this.isReady=!0),i.scroll=!(null!=(l=i.scroll)&&!l),f=i.locale!==this.locale,e.next=18;break;case 18:if(i._h||(this.isSsr=!1),h.ST&&performance.mark("routeChange"),v=i.shallow,y={shallow:void 0!==v&&v},this._inFlightRoute&&this.abortComponentLoad(this._inFlightRoute,y),a=S(_(k(a)?E(a):a,i.locale,this.defaultLocale)),w=x(k(a)?E(a):a,this.locale),this._inFlightRoute=a,i._h||!this.onlyAHashChange(w)){e.next=34;break}return this.asPath=w,t.events.emit("hashChangeStart",a,y),this.changeState(r,o,a,i),this.scrollToHash(w),this.notify(this.components[this.route],null),t.events.emit("hashChangeComplete",a,y),e.abrupt("return",!0);case 34:return b=(0,d.parseRelativeUrl)(o),O=(P=b).pathname,I=P.query,e.prev=36,e.next=39,this.pageLoader.getPageList();case 39:return D=e.sent,e.next=42,(0,c.getClientBuildManifest)();case 42:M=e.sent,M.__rewrites,e.next=50;break;case 46:return e.prev=46,e.t0=e.catch(36),window.location.href=a,e.abrupt("return",!1);case 50:if((b=j(b,D)).pathname!==O&&(O=b.pathname,o=(0,h.formatWithValidation)(b)),O=O?(0,u.removePathTrailingSlash)(E(O)):O,this.urlIsNew(w)||f||(r="replaceState"),N=(0,u.removePathTrailingSlash)(O),U=a,R(a)){e.next=62;break}e.next=60;break;case 60:return window.location.href=a,e.abrupt("return",!1);case 62:if(U=x(E(U),this.locale),!(0,p.isDynamicRoute)(N)){e.next=78;break}if(W=(0,d.parseRelativeUrl)(U),q=W.pathname,F=(0,g.getRouteRegex)(N),G=(0,m.getRouteMatcher)(F)(q),V=(B=N===q)?L(N,q,I):{},G&&(!B||V.result)){e.next=77;break}if(!((H=Object.keys(F.groups).filter((function(t){return!I[t]}))).length>0)){e.next=75;break}throw new Error((B?"The provided `href` (".concat(o,") value is missing query values (").concat(H.join(", "),") to be interpolated properly. "):"The provided `as` value (".concat(q,") is incompatible with the `href` value (").concat(N,"). "))+"Read more: https://err.sh/vercel/next.js/".concat(B?"href-interpolation-failed":"incompatible-href-as"));case 75:e.next=78;break;case 77:B?a=(0,h.formatWithValidation)(Object.assign({},W,{pathname:V.result,query:C(I,V.params)})):Object.assign(I,G);case 78:return t.events.emit("routeChangeStart",a,y),e.prev=79,e.next=82,this.getRouteInfo(N,O,I,a,U,y);case 82:if(J=e.sent,Y=($=J).error,Q=$.props,Z=$.__N_SSG,K=$.__N_SSP,!Z&&!K||!Q){e.next=109;break}if(!Q.pageProps||!Q.pageProps.__N_REDIRECT){e.next=95;break}if(!(tt=Q.pageProps.__N_REDIRECT).startsWith("/")){e.next=93;break}if(j(et=(0,d.parseRelativeUrl)(tt),D,!1),!D.includes(et.pathname)){e.next=93;break}return rt=T(this,tt,tt),nt=rt.url,ot=rt.as,e.abrupt("return",this.change(r,nt,ot,i));case 93:return window.location.href=tt,e.abrupt("return",new Promise((function(){})));case 95:if(this.isPreview=!!Q.__N_PREVIEW,Q.notFound!==A){e.next=109;break}return e.prev=97,e.next=100,this.fetchComponent("/404");case 100:at="/404",e.next=106;break;case 103:e.prev=103,e.t1=e.catch(97),at="/_error";case 106:return e.next=108,this.getRouteInfo(at,at,I,a,U,{shallow:!1});case 108:J=e.sent;case 109:return t.events.emit("beforeHistoryChange",a,y),this.changeState(r,o,a,i),it=i.shallow&&this.route===N,i._h&&"/_error"===O&&500===(null==(X=self.__NEXT_DATA__.props)||null==(z=X.pageProps)?void 0:z.statusCode)&&null!=Q&&Q.pageProps&&(Q.pageProps.statusCode=500),e.next=116,this.set(N,O,I,w,J,s||(it||!i.scroll?null:{x:0,y:0})).catch((function(t){if(!t.cancelled)throw t;Y=Y||t}));case 116:if(!Y){e.next=119;break}throw t.events.emit("routeChangeError",Y,w,y),Y;case 119:return t.events.emit("routeChangeComplete",a,y),e.abrupt("return",!0);case 124:if(e.prev=124,e.t2=e.catch(79),!e.t2.cancelled){e.next=128;break}return e.abrupt("return",!1);case 128:throw e.t2;case 129:case"end":return e.stop()}}),e,this,[[36,46],[79,124],[97,103]])})));return function(t,r,n,o,a){return e.apply(this,arguments)}}()},{key:"changeState",value:function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};"pushState"===t&&(0,h.getURL)()===r||(this._shallow=n.shallow,window.history[t]({url:e,as:r,options:n,__N:!0,idx:this._idx="pushState"!==t?this._idx:this._idx+1},"",r))}},{key:"handleRouteInfoError",value:function(){var e=o(n.mark((function e(r,o,a,i,s,u){var l,f,h,p;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!r.cancelled){e.next=2;break}throw r;case 2:if(!(0,c.isAssetError)(r)&&!u){e.next=6;break}throw t.events.emit("routeChangeError",r,i,s),window.location.href=i,b();case 6:if(e.prev=6,"undefined"!==typeof l&&"undefined"!==typeof f){e.next=14;break}return e.next=11,this.fetchComponent("/_error");case 11:h=e.sent,l=h.page,f=h.styleSheets;case 14:if((p={props:undefined,Component:l,styleSheets:f,err:r,error:r}).props){e.next=26;break}return e.prev=16,e.next=19,this.getInitialProps(l,{err:r,pathname:o,query:a});case 19:p.props=e.sent,e.next=26;break;case 22:e.prev=22,e.t0=e.catch(16),console.error("Error in error page `getInitialProps`: ",e.t0),p.props={};case 26:return e.abrupt("return",p);case 29:return e.prev=29,e.t1=e.catch(6),e.abrupt("return",this.handleRouteInfoError(e.t1,o,a,i,s,!0));case 32:case"end":return e.stop()}}),e,this,[[6,29],[16,22]])})));return function(t,r,n,o,a,i){return e.apply(this,arguments)}}()},{key:"getRouteInfo",value:function(){var t=o(n.mark((function t(e,r,o,a,i,s){var u,c,l,f,p,d,v,y,m=this;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,u=this.components[e],!s.shallow||!u||this.route!==e){t.next=4;break}return t.abrupt("return",u);case 4:if(!(c=u&&"initial"in u?void 0:u)){t.next=9;break}t.t0=c,t.next=12;break;case 9:return t.next=11,this.fetchComponent(e).then((function(t){return{Component:t.page,styleSheets:t.styleSheets,__N_SSG:t.mod.__N_SSG,__N_SSP:t.mod.__N_SSP}}));case 11:t.t0=t.sent;case 12:l=t.t0,f=l.Component,p=l.__N_SSG,d=l.__N_SSP,t.next=18;break;case 18:return(p||d)&&(v=this.pageLoader.getDataHref((0,h.formatWithValidation)({pathname:r,query:o}),i,p,this.locale)),t.next=21,this._getData((function(){return p?m._getStaticData(v):d?m._getServerData(v):m.getInitialProps(f,{pathname:r,query:o,asPath:a})}));case 21:return y=t.sent,l.props=y,this.components[e]=l,t.abrupt("return",l);case 27:return t.prev=27,t.t1=t.catch(0),t.abrupt("return",this.handleRouteInfoError(t.t1,r,o,a,s));case 30:case"end":return t.stop()}}),t,this,[[0,27]])})));return function(e,r,n,o,a,i){return t.apply(this,arguments)}}()},{key:"set",value:function(t,e,r,n,o,a){return this.isFallback=!1,this.route=t,this.pathname=e,this.query=r,this.asPath=n,this.notify(o,a)}},{key:"beforePopState",value:function(t){this._bps=t}},{key:"onlyAHashChange",value:function(t){if(!this.asPath)return!1;var e=this.asPath.split("#"),r=s(e,2),n=r[0],o=r[1],a=t.split("#"),i=s(a,2),u=i[0],c=i[1];return!(!c||n!==u||o!==c)||n===u&&o!==c}},{key:"scrollToHash",value:function(t){var e=t.split("#"),r=s(e,2)[1];if(""!==r&&"top"!==r){var n=document.getElementById(r);if(n)n.scrollIntoView();else{var o=document.getElementsByName(r)[0];o&&o.scrollIntoView()}}else window.scrollTo(0,0)}},{key:"urlIsNew",value:function(t){return this.asPath!==t}},{key:"prefetch",value:function(){var t=o(n.mark((function t(e){var r,o,a,i,s,c,l,f,p,v,m=this,g=arguments;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=g.length>1&&void 0!==g[1]?g[1]:e,o=g.length>2&&void 0!==g[2]?g[2]:{},a=(0,d.parseRelativeUrl)(e),i=a.pathname,t.next=7,this.pageLoader.getPageList();case 7:s=t.sent,(a=j(a,s,!1)).pathname!==i&&(i=a.pathname,e=(0,h.formatWithValidation)(a)),c=(0,u.removePathTrailingSlash)(i),l=r,t.next=19;break;case 15:p=t.sent,f=p.__rewrites,(v=(0,y.default)(S(_(E(r),this.locale)),s,f,a.query,(function(t){return j({pathname:t},s).pathname}),this.locales)).matchedPage&&v.resolvedHref&&(c=v.resolvedHref,i=v.resolvedHref,a.pathname=i,e=(0,h.formatWithValidation)(a),l=v.asPath);case 19:t.next=21;break;case 21:return t.next=23,Promise.all([this.pageLoader._isSsg(e).then((function(t){return!!t&&m._getStaticData(m.pageLoader.getDataHref(e,l,!0,"undefined"!==typeof o.locale?o.locale:m.locale))})),this.pageLoader[o.priority?"loadPage":"prefetch"](c)]);case 23:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"fetchComponent",value:function(){var t=o(n.mark((function t(e){var r,o,a,i;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=!1,o=this.clc=function(){r=!0},t.next=4,this.pageLoader.loadPage(e);case 4:if(a=t.sent,!r){t.next=9;break}throw(i=new Error('Abort fetching component for route: "'.concat(e,'"'))).cancelled=!0,i;case 9:return o===this.clc&&(this.clc=null),t.abrupt("return",a);case 11:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"_getData",value:function(t){var e=this,r=!1,n=function(){r=!0};return this.clc=n,t().then((function(t){if(n===e.clc&&(e.clc=null),r){var o=new Error("Loading initial props cancelled");throw o.cancelled=!0,o}return t}))}},{key:"_getStaticData",value:function(t){var e=this,r=new URL(t,window.location.href).href;return!this.isPreview&&this.sdc[r]?Promise.resolve(this.sdc[r]):M(t,this.isSsr).then((function(t){return e.sdc[r]=t,t}))}},{key:"_getServerData",value:function(t){var e=this,r=new URL(t,window.location.href).href;return this.sdr[r]?this.sdr[r]:this.sdr[r]=M(t,this.isSsr).then((function(t){return delete e.sdr[r],t})).catch((function(t){throw delete e.sdr[r],t}))}},{key:"getInitialProps",value:function(t,e){var r=this.components["/_app"].Component,n=this._wrapApp(r);return e.AppTree=n,(0,h.loadGetInitialProps)(r,{AppTree:n,Component:t,router:this,ctx:e})}},{key:"abortComponentLoad",value:function(e,r){this.clc&&(t.events.emit("routeChangeError",b(),e,r),this.clc(),this.clc=null)}},{key:"notify",value:function(t,e){return this.sub(t,this.components["/_app"].Component,e)}}]),t}();e.default=N,N.events=(0,f.default)()},"g/15":function(t,e,r){"use strict";var n=r("o0o1"),o=r("yXPU");e.__esModule=!0,e.execOnce=function(t){var e,r=!1;return function(){return r||(r=!0,e=t.apply(void 0,arguments)),e}},e.getLocationOrigin=i,e.getURL=function(){var t=window.location.href,e=i();return t.substring(e.length)},e.getDisplayName=s,e.isResSent=u,e.loadGetInitialProps=c,e.formatWithValidation=function(t){0;return(0,a.formatUrl)(t)},e.ST=e.SP=e.urlObjectKeys=void 0;var a=r("6D7l");function i(){var t=window.location,e=t.protocol,r=t.hostname,n=t.port;return"".concat(e,"//").concat(r).concat(n?":"+n:"")}function s(t){return"string"===typeof t?t:t.displayName||t.name||"Unknown"}function u(t){return t.finished||t.headersSent}function c(t,e){return l.apply(this,arguments)}function l(){return(l=o(n.mark((function t(e,r){var o,a,i;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:t.next=4;break;case 4:if(o=r.res||r.ctx&&r.ctx.res,e.getInitialProps){t.next=12;break}if(!r.ctx||!r.Component){t.next=11;break}return t.next=9,c(r.Component,r.ctx);case 9:return t.t0=t.sent,t.abrupt("return",{pageProps:t.t0});case 11:return t.abrupt("return",{});case 12:return t.next=14,e.getInitialProps(r);case 14:if(a=t.sent,!o||!u(o)){t.next=17;break}return t.abrupt("return",a);case 17:if(a){t.next=20;break}throw i='"'.concat(s(e),'.getInitialProps()" should resolve to an object. But found "').concat(a,'" instead.'),new Error(i);case 20:return t.abrupt("return",a);case 22:case"end":return t.stop()}}),t)})))).apply(this,arguments)}e.urlObjectKeys=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];var f="undefined"!==typeof performance;e.SP=f;var h=f&&"function"===typeof performance.mark&&"function"===typeof performance.measure;e.ST=h},gguc:function(t,e,r){"use strict";e.__esModule=!0,e.getRouteMatcher=function(t){var e=t.re,r=t.groups;return function(t){var n=e.exec(t);if(!n)return!1;var o=function(t){try{return decodeURIComponent(t)}catch(r){var e=new Error("failed to decode param");throw e.code="DECODE_FAILED",e}},a={};return Object.keys(r).forEach((function(t){var e=r[t],i=n[e.pos];void 0!==i&&(a[t]=~i.indexOf("/")?i.split("/").map((function(t){return o(t)})):e.repeat?[o(i)]:o(i))})),a}}},hS4m:function(t,e,r){"use strict";e.__esModule=!0,e.parseRelativeUrl=function(t,e){var r=new URL((0,n.getLocationOrigin)()),a=e?new URL(e,r):r,i=new URL(t,a),s=i.pathname,u=i.searchParams,c=i.search,l=i.hash,f=i.href;if(i.origin!==r.origin)throw new Error("invariant: invalid relative URL, router received ".concat(t));return{pathname:s,query:(0,o.searchParamsToUrlQuery)(u),search:c,hash:l,href:f.slice(r.origin.length)}};var n=r("g/15"),o=r("3WeD")},ls82:function(t,e,r){var n=function(t){"use strict";var e,r=Object.prototype,n=r.hasOwnProperty,o="function"===typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(I){u=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var o=e&&e.prototype instanceof y?e:y,a=Object.create(o.prototype),i=new L(n||[]);return a._invoke=function(t,e,r){var n=f;return function(o,a){if(n===p)throw new Error("Generator is already running");if(n===d){if("throw"===o)throw a;return O()}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var s=S(i,r);if(s){if(s===v)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===f)throw n=d,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=p;var u=l(t,e,r);if("normal"===u.type){if(n=r.done?d:h,u.arg===v)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n=d,r.method="throw",r.arg=u.arg)}}}(t,r,i),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(I){return{type:"throw",arg:I}}}t.wrap=c;var f="suspendedStart",h="suspendedYield",p="executing",d="completed",v={};function y(){}function m(){}function g(){}var w={};w[a]=function(){return this};var b=Object.getPrototypeOf,_=b&&b(b(C([])));_&&_!==r&&n.call(_,a)&&(w=_);var x=g.prototype=y.prototype=Object.create(w);function P(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function k(t,e){function r(o,a,i,s){var u=l(t[o],t,a);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"===typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,i,s)}),(function(t){r("throw",t,i,s)})):e.resolve(f).then((function(t){c.value=t,i(c)}),(function(t){return r("throw",t,i,s)}))}s(u.arg)}var o;this._invoke=function(t,n){function a(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(a,a):a()}}function S(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,S(t,r),"throw"===r.method))return v;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=l(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,v;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function R(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function C(t){if(t){var r=t[a];if(r)return r.call(t);if("function"===typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--a){var i=this.tryEntries[a],s=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),R(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;R(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:C(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}(t.exports);try{regeneratorRuntime=n}catch(o){Function("r","regeneratorRuntime = r")(n)}},lwsE:function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},m0LI:function(t,e){t.exports=function(t,e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t)){var r=[],n=!0,o=!1,a=void 0;try{for(var i,s=t[Symbol.iterator]();!(n=(i=s.next()).done)&&(r.push(i.value),!e||r.length!==e);n=!0);}catch(u){o=!0,a=u}finally{try{n||null==s.return||s.return()}finally{if(o)throw a}}return r}}},nOHt:function(t,e,r){"use strict";var n=r("sXyB");function o(t,e){var r;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"===typeof t)return a(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return a(t,e)}(t))||e&&t&&"number"===typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,u=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return s=t.done,t},e:function(t){u=!0,i=t},f:function(){try{s||null==r.return||r.return()}finally{if(u)throw i}}}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r1?e-1:0),n=1;n>>0,1)},emit:function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o1&&void 0!==arguments[1]?arguments[1]:"",r="/"===t?"/index":/^\/index(\/|$)/.test(t)?"/index".concat(t):"".concat(t);return r+e}},J4zp:function(t,e,r){var n=r("wTVA"),o=r("m0LI"),a=r("ZhPi"),i=r("wkBT");t.exports=function(t,e){return n(t)||o(t,e)||a(t,e)||i()}},Nsbk:function(t,e){function r(e){return t.exports=r=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},r(e)}t.exports=r},PJYZ:function(t,e){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}},R3d8:function(t,e,r){"use strict";function n(t){return t.replace(/\\/g,"/")}e.__esModule=!0,e.normalizePathSep=n,e.denormalizePagePath=function(t){(t=n(t)).startsWith("/index/")?t=t.slice(6):"/index"===t&&(t="/");return t}},SksO:function(t,e){function r(e,n){return t.exports=r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},r(e,n)}t.exports=r},TTnN:function(t,e,r){"use strict";var n=r("o0o1"),o=r("yXPU"),a=r("lwsE"),i=r("W8MJ"),u=r("J4zp");e.__esModule=!0,e.getDomainLocale=function(t,e,r,n){0;return!1},e.addLocale=_,e.delLocale=x,e.hasBasePath=S,e.addBasePath=k,e.delBasePath=E,e.isLocalURL=R,e.interpolateAs=L,e.resolveHref=O,e.default=void 0;var s=r("vuub"),c=r("pqeP"),l=r("R3d8"),f=(r("Ew7H"),b(r("Dg51"))),h=r("n3/+"),p=r("YKD2"),d=r("AO3j"),v=r("29pC"),y=b(r("lpVY")),m=r("/XDo"),g=r("99D5");function b(t){return t&&t.__esModule?t:{default:t}}function w(){return Object.assign(new Error("Route Cancelled"),{cancelled:!0})}function _(t,e,r){return t}function x(t,e){return t}function P(t){var e=t.indexOf("?"),r=t.indexOf("#");return(e>-1||r>-1)&&(t=t.substring(0,e>-1?e:r)),t}function S(t){return""===(t=P(t))||t.startsWith("/")}function k(t){return function(t,e){return e&&t.startsWith("/")?"/"===t?(0,s.normalizePathTrailingSlash)(e):"".concat(e).concat("/"===P(t)?t.substring(1):t):t}(t,"")}function E(t){return(t=t.slice("".length)).startsWith("/")||(t="/".concat(t)),t}function R(t){if(t.startsWith("/")||t.startsWith("#"))return!0;try{var e=(0,h.getLocationOrigin)(),r=new URL(t,e);return r.origin===e&&S(r.pathname)}catch(n){return!1}}function L(t,e,r){var n="",o=(0,g.getRouteRegex)(t),a=o.groups,i=(e!==t?(0,m.getRouteMatcher)(o)(e):"")||r;n=t;var u=Object.keys(a);return u.every((function(t){var e=i[t]||"",r=a[t],o=r.repeat,u=r.optional,s="[".concat(o?"...":"").concat(t,"]");return u&&(s="".concat(e?"":"/","[").concat(s,"]")),o&&!Array.isArray(e)&&(e=[e]),(u||t in i)&&(n=n.replace(s,o?e.map((function(t){return encodeURIComponent(t)})).join("/"):encodeURIComponent(e))||"/")}))||(n=""),{params:u,result:n}}function C(t,e){var r={};return Object.keys(t).forEach((function(n){e.includes(n)||(r[n]=t[n])})),r}function O(t,e,r){var n=new URL(t,"http://n"),o="string"===typeof e?e:(0,h.formatWithValidation)(e);if(!R(o))return r?[o]:o;try{var a=new URL(o,n);a.pathname=(0,s.normalizePathTrailingSlash)(a.pathname);var i="";if((0,p.isDynamicRoute)(a.pathname)&&a.searchParams&&r){var u=(0,v.searchParamsToUrlQuery)(a.searchParams),c=L(a.pathname,a.pathname,u),l=c.result,f=c.params;l&&(i=(0,h.formatWithValidation)({pathname:l,hash:a.hash,query:C(u,f)}))}var d=a.origin===n.origin?a.href.slice(a.origin.length):a.href;return r?[d,i||d]:d}catch(y){return r?[o]:o}}function j(t){var e=(0,h.getLocationOrigin)();return t.startsWith(e)?t.substring(e.length):t}function T(t,e,r){var n=O(t.pathname,e,!0),o=u(n,2),a=o[0],i=o[1],s=(0,h.getLocationOrigin)(),c=a.startsWith(s),l=i&&i.startsWith(s);a=j(a),i=i?j(i):i;var f=c?a:k(a),p=r?j(O(t.pathname,r)):i||a;return{url:f,as:l?p:k(p)}}function A(t,e){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=t.pathname,o=(0,s.removePathTrailingSlash)((0,l.denormalizePagePath)(r?E(n):n));return"/404"===o||"/_error"===o||(e.includes(o)||e.some((function(e){if((0,p.isDynamicRoute)(e)&&(0,g.getRouteRegex)(e).re.test(o))return t.pathname=r?k(e):e,!0})),t.pathname=(0,s.removePathTrailingSlash)(t.pathname)),t}var I=Symbol("SSG_DATA_NOT_FOUND");function D(t,e){return fetch(t,{credentials:"same-origin"}).then((function(r){if(!r.ok){if(e>1&&r.status>=500)return D(t,e-1);if(404===r.status)return r.json().then((function(t){if(t.notFound)return{notFound:I};throw new Error("Failed to load static props")}));throw new Error("Failed to load static props")}return r.json()}))}function M(t,e){return D(t,e?3:1).catch((function(t){throw e||(0,c.markAssetError)(t),t}))}var N=function(){function t(e,r,n,o){var i=this,u=o.initialProps,c=o.pageLoader,l=o.App,f=o.wrapApp,v=o.Component,y=o.err,m=o.subscription,g=o.isFallback,b=o.locale,w=(o.locales,o.defaultLocale,o.domainLocales,o.isPreview);a(this,t),this.route=void 0,this.pathname=void 0,this.query=void 0,this.asPath=void 0,this.basePath=void 0,this.components=void 0,this.sdc={},this.sdr={},this.sub=void 0,this.clc=void 0,this.pageLoader=void 0,this._bps=void 0,this.events=void 0,this._wrapApp=void 0,this.isSsr=void 0,this.isFallback=void 0,this._inFlightRoute=void 0,this._shallow=void 0,this.locale=void 0,this.locales=void 0,this.defaultLocale=void 0,this.domainLocales=void 0,this.isReady=void 0,this.isPreview=void 0,this.isLocaleDomain=void 0,this._idx=0,this.onPopState=function(t){var e=t.state;if(e){if(e.__N){var r=e.url,n=e.as,o=e.options,a=e.idx;i._idx=a;var u=(0,d.parseRelativeUrl)(r).pathname;i.isSsr&&n===i.asPath&&u===i.pathname||i._bps&&!i._bps(e)||i.change("replaceState",r,n,Object.assign({},o,{shallow:o.shallow&&i._shallow,locale:o.locale||i.defaultLocale}),undefined)}}else{var s=i.pathname,c=i.query;i.changeState("replaceState",(0,h.formatWithValidation)({pathname:k(s),query:c}),(0,h.getURL)())}},this.route=(0,s.removePathTrailingSlash)(e),this.components={},"/_error"!==e&&(this.components[this.route]={Component:v,initial:!0,props:u,err:y,__N_SSG:u&&u.__N_SSG,__N_SSP:u&&u.__N_SSP}),this.components["/_app"]={Component:l,styleSheets:[]},this.events=t.events,this.pageLoader=c,this.pathname=e,this.query=r;var _=(0,p.isDynamicRoute)(e)&&self.__NEXT_DATA__.autoExport;this.asPath=_?e:n,this.basePath="",this.sub=m,this.clc=null,this._wrapApp=f,this.isSsr=!0,this.isFallback=g,this.isReady=!(!self.__NEXT_DATA__.gssp&&!self.__NEXT_DATA__.gip&&(_||self.location.search)),this.isPreview=!!w,this.isLocaleDomain=!1,"//"!==n.substr(0,2)&&this.changeState("replaceState",(0,h.formatWithValidation)({pathname:k(e),query:r}),(0,h.getURL)(),{locale:b}),window.addEventListener("popstate",this.onPopState)}return i(t,[{key:"reload",value:function(){window.location.reload()}},{key:"back",value:function(){window.history.back()}},{key:"push",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};var n=T(this,t,e);return t=n.url,e=n.as,this.change("pushState",t,e,r)}},{key:"replace",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=T(this,t,e);return t=n.url,e=n.as,this.change("replaceState",t,e,r)}},{key:"change",value:function(){var e=o(n.mark((function e(r,o,a,i,u){var l,f,v,y,b,w,P,O,j,D,M,N,U,W,F,q,G,B,V,z,H,Y,J,X,$,Q,Z,K,tt,et,rt,nt,ot,at,it;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(R(o)){e.next=3;break}return window.location.href=o,e.abrupt("return",!1);case 3:i._h&&(this.isReady=!0),i.scroll=!(null!=(l=i.scroll)&&!l),f=i.locale!==this.locale,e.next=18;break;case 18:if(i._h||(this.isSsr=!1),h.ST&&performance.mark("routeChange"),v=i.shallow,y={shallow:void 0!==v&&v},this._inFlightRoute&&this.abortComponentLoad(this._inFlightRoute,y),a=k(_(S(a)?E(a):a,i.locale,this.defaultLocale)),b=x(S(a)?E(a):a,this.locale),this._inFlightRoute=a,i._h||!this.onlyAHashChange(b)){e.next=34;break}return this.asPath=b,t.events.emit("hashChangeStart",a,y),this.changeState(r,o,a,i),this.scrollToHash(b),this.notify(this.components[this.route],null),t.events.emit("hashChangeComplete",a,y),e.abrupt("return",!0);case 34:return w=(0,d.parseRelativeUrl)(o),O=(P=w).pathname,j=P.query,e.prev=36,e.next=39,this.pageLoader.getPageList();case 39:return D=e.sent,e.next=42,(0,c.getClientBuildManifest)();case 42:M=e.sent,M.__rewrites,e.next=50;break;case 46:return e.prev=46,e.t0=e.catch(36),window.location.href=a,e.abrupt("return",!1);case 50:if((w=A(w,D)).pathname!==O&&(O=w.pathname,o=(0,h.formatWithValidation)(w)),O=O?(0,s.removePathTrailingSlash)(E(O)):O,this.urlIsNew(b)||f||(r="replaceState"),N=(0,s.removePathTrailingSlash)(O),U=a,R(a)){e.next=62;break}e.next=60;break;case 60:return window.location.href=a,e.abrupt("return",!1);case 62:if(U=x(E(U),this.locale),!(0,p.isDynamicRoute)(N)){e.next=78;break}if(W=(0,d.parseRelativeUrl)(U),F=W.pathname,q=(0,g.getRouteRegex)(N),G=(0,m.getRouteMatcher)(q)(F),V=(B=N===F)?L(N,F,j):{},G&&(!B||V.result)){e.next=77;break}if(!((z=Object.keys(q.groups).filter((function(t){return!j[t]}))).length>0)){e.next=75;break}throw new Error((B?"The provided `href` (".concat(o,") value is missing query values (").concat(z.join(", "),") to be interpolated properly. "):"The provided `as` value (".concat(F,") is incompatible with the `href` value (").concat(N,"). "))+"Read more: https://err.sh/vercel/next.js/".concat(B?"href-interpolation-failed":"incompatible-href-as"));case 75:e.next=78;break;case 77:B?a=(0,h.formatWithValidation)(Object.assign({},W,{pathname:V.result,query:C(j,V.params)})):Object.assign(j,G);case 78:return t.events.emit("routeChangeStart",a,y),e.prev=79,e.next=82,this.getRouteInfo(N,O,j,a,U,y);case 82:if(J=e.sent,$=(X=J).error,Q=X.props,Z=X.__N_SSG,K=X.__N_SSP,!Z&&!K||!Q){e.next=109;break}if(!Q.pageProps||!Q.pageProps.__N_REDIRECT){e.next=95;break}if(!(tt=Q.pageProps.__N_REDIRECT).startsWith("/")){e.next=93;break}if(A(et=(0,d.parseRelativeUrl)(tt),D,!1),!D.includes(et.pathname)){e.next=93;break}return rt=T(this,tt,tt),nt=rt.url,ot=rt.as,e.abrupt("return",this.change(r,nt,ot,i));case 93:return window.location.href=tt,e.abrupt("return",new Promise((function(){})));case 95:if(this.isPreview=!!Q.__N_PREVIEW,Q.notFound!==I){e.next=109;break}return e.prev=97,e.next=100,this.fetchComponent("/404");case 100:at="/404",e.next=106;break;case 103:e.prev=103,e.t1=e.catch(97),at="/_error";case 106:return e.next=108,this.getRouteInfo(at,at,j,a,U,{shallow:!1});case 108:J=e.sent;case 109:return t.events.emit("beforeHistoryChange",a,y),this.changeState(r,o,a,i),it=i.shallow&&this.route===N,i._h&&"/_error"===O&&500===(null==(H=self.__NEXT_DATA__.props)||null==(Y=H.pageProps)?void 0:Y.statusCode)&&null!=Q&&Q.pageProps&&(Q.pageProps.statusCode=500),e.next=116,this.set(N,O,j,b,J,u||(it||!i.scroll?null:{x:0,y:0})).catch((function(t){if(!t.cancelled)throw t;$=$||t}));case 116:if(!$){e.next=119;break}throw t.events.emit("routeChangeError",$,b,y),$;case 119:return t.events.emit("routeChangeComplete",a,y),e.abrupt("return",!0);case 124:if(e.prev=124,e.t2=e.catch(79),!e.t2.cancelled){e.next=128;break}return e.abrupt("return",!1);case 128:throw e.t2;case 129:case"end":return e.stop()}}),e,this,[[36,46],[79,124],[97,103]])})));return function(t,r,n,o,a){return e.apply(this,arguments)}}()},{key:"changeState",value:function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};"pushState"===t&&(0,h.getURL)()===r||(this._shallow=n.shallow,window.history[t]({url:e,as:r,options:n,__N:!0,idx:this._idx="pushState"!==t?this._idx:this._idx+1},"",r))}},{key:"handleRouteInfoError",value:function(){var e=o(n.mark((function e(r,o,a,i,u,s){var l,f,h,p;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!r.cancelled){e.next=2;break}throw r;case 2:if(!(0,c.isAssetError)(r)&&!s){e.next=6;break}throw t.events.emit("routeChangeError",r,i,u),window.location.href=i,w();case 6:if(e.prev=6,"undefined"!==typeof l&&"undefined"!==typeof f){e.next=14;break}return e.next=11,this.fetchComponent("/_error");case 11:h=e.sent,l=h.page,f=h.styleSheets;case 14:if((p={props:undefined,Component:l,styleSheets:f,err:r,error:r}).props){e.next=26;break}return e.prev=16,e.next=19,this.getInitialProps(l,{err:r,pathname:o,query:a});case 19:p.props=e.sent,e.next=26;break;case 22:e.prev=22,e.t0=e.catch(16),console.error("Error in error page `getInitialProps`: ",e.t0),p.props={};case 26:return e.abrupt("return",p);case 29:return e.prev=29,e.t1=e.catch(6),e.abrupt("return",this.handleRouteInfoError(e.t1,o,a,i,u,!0));case 32:case"end":return e.stop()}}),e,this,[[6,29],[16,22]])})));return function(t,r,n,o,a,i){return e.apply(this,arguments)}}()},{key:"getRouteInfo",value:function(){var t=o(n.mark((function t(e,r,o,a,i,u){var s,c,l,f,p,d,v,y,m=this;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,s=this.components[e],!u.shallow||!s||this.route!==e){t.next=4;break}return t.abrupt("return",s);case 4:if(!(c=s&&"initial"in s?void 0:s)){t.next=9;break}t.t0=c,t.next=12;break;case 9:return t.next=11,this.fetchComponent(e).then((function(t){return{Component:t.page,styleSheets:t.styleSheets,__N_SSG:t.mod.__N_SSG,__N_SSP:t.mod.__N_SSP}}));case 11:t.t0=t.sent;case 12:l=t.t0,f=l.Component,p=l.__N_SSG,d=l.__N_SSP,t.next=18;break;case 18:return(p||d)&&(v=this.pageLoader.getDataHref((0,h.formatWithValidation)({pathname:r,query:o}),i,p,this.locale)),t.next=21,this._getData((function(){return p?m._getStaticData(v):d?m._getServerData(v):m.getInitialProps(f,{pathname:r,query:o,asPath:a})}));case 21:return y=t.sent,l.props=y,this.components[e]=l,t.abrupt("return",l);case 27:return t.prev=27,t.t1=t.catch(0),t.abrupt("return",this.handleRouteInfoError(t.t1,r,o,a,u));case 30:case"end":return t.stop()}}),t,this,[[0,27]])})));return function(e,r,n,o,a,i){return t.apply(this,arguments)}}()},{key:"set",value:function(t,e,r,n,o,a){return this.isFallback=!1,this.route=t,this.pathname=e,this.query=r,this.asPath=n,this.notify(o,a)}},{key:"beforePopState",value:function(t){this._bps=t}},{key:"onlyAHashChange",value:function(t){if(!this.asPath)return!1;var e=this.asPath.split("#"),r=u(e,2),n=r[0],o=r[1],a=t.split("#"),i=u(a,2),s=i[0],c=i[1];return!(!c||n!==s||o!==c)||n===s&&o!==c}},{key:"scrollToHash",value:function(t){var e=t.split("#"),r=u(e,2)[1];if(""!==r&&"top"!==r){var n=document.getElementById(r);if(n)n.scrollIntoView();else{var o=document.getElementsByName(r)[0];o&&o.scrollIntoView()}}else window.scrollTo(0,0)}},{key:"urlIsNew",value:function(t){return this.asPath!==t}},{key:"prefetch",value:function(){var t=o(n.mark((function t(e){var r,o,a,i,u,c,l,f,p,v,m=this,g=arguments;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=g.length>1&&void 0!==g[1]?g[1]:e,o=g.length>2&&void 0!==g[2]?g[2]:{},a=(0,d.parseRelativeUrl)(e),i=a.pathname,t.next=7,this.pageLoader.getPageList();case 7:u=t.sent,(a=A(a,u,!1)).pathname!==i&&(i=a.pathname,e=(0,h.formatWithValidation)(a)),c=(0,s.removePathTrailingSlash)(i),l=r,t.next=19;break;case 15:p=t.sent,f=p.__rewrites,(v=(0,y.default)(k(_(E(r),this.locale)),u,f,a.query,(function(t){return A({pathname:t},u).pathname}),this.locales)).matchedPage&&v.resolvedHref&&(c=v.resolvedHref,i=v.resolvedHref,a.pathname=i,e=(0,h.formatWithValidation)(a),l=v.asPath);case 19:t.next=21;break;case 21:return t.next=23,Promise.all([this.pageLoader._isSsg(e).then((function(t){return!!t&&m._getStaticData(m.pageLoader.getDataHref(e,l,!0,"undefined"!==typeof o.locale?o.locale:m.locale))})),this.pageLoader[o.priority?"loadPage":"prefetch"](c)]);case 23:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"fetchComponent",value:function(){var t=o(n.mark((function t(e){var r,o,a,i;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=!1,o=this.clc=function(){r=!0},t.next=4,this.pageLoader.loadPage(e);case 4:if(a=t.sent,!r){t.next=9;break}throw(i=new Error('Abort fetching component for route: "'.concat(e,'"'))).cancelled=!0,i;case 9:return o===this.clc&&(this.clc=null),t.abrupt("return",a);case 11:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"_getData",value:function(t){var e=this,r=!1,n=function(){r=!0};return this.clc=n,t().then((function(t){if(n===e.clc&&(e.clc=null),r){var o=new Error("Loading initial props cancelled");throw o.cancelled=!0,o}return t}))}},{key:"_getStaticData",value:function(t){var e=this,r=new URL(t,window.location.href).href;return!this.isPreview&&this.sdc[r]?Promise.resolve(this.sdc[r]):M(t,this.isSsr).then((function(t){return e.sdc[r]=t,t}))}},{key:"_getServerData",value:function(t){var e=this,r=new URL(t,window.location.href).href;return this.sdr[r]?this.sdr[r]:this.sdr[r]=M(t,this.isSsr).then((function(t){return delete e.sdr[r],t})).catch((function(t){throw delete e.sdr[r],t}))}},{key:"getInitialProps",value:function(t,e){var r=this.components["/_app"].Component,n=this._wrapApp(r);return e.AppTree=n,(0,h.loadGetInitialProps)(r,{AppTree:n,Component:t,router:this,ctx:e})}},{key:"abortComponentLoad",value:function(e,r){this.clc&&(t.events.emit("routeChangeError",w(),e,r),this.clc(),this.clc=null)}},{key:"notify",value:function(t,e){return this.sub(t,this.components["/_app"].Component,e)}}]),t}();e.default=N,N.events=(0,f.default)()},TTt4:function(t,e,r){var n=r("ekFS");function o(){if("function"!==typeof WeakMap)return null;var t=new WeakMap;return o=function(){return t},t}t.exports=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!==typeof t)return{default:t};var e=o();if(e&&e.has(t))return e.get(t);var r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var u=a?Object.getOwnPropertyDescriptor(t,i):null;u&&(u.get||u.set)?Object.defineProperty(r,i,u):r[i]=t[i]}return r.default=t,e&&e.set(t,r),r}},UULE:function(t,e,r){"use strict";var n=Object.assign.bind(Object);t.exports=n,t.exports.default=t.exports},W8MJ:function(t,e){function r(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,u=!0,s=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return u=t.done,t},e:function(t){s=!0,i=t},f:function(){try{u||null==r.return||r.return()}finally{if(s)throw i}}}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=0;--a){var i=this.tryEntries[a],u=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(s&&c){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),R(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;R(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:C(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}(t.exports);try{regeneratorRuntime=n}catch(o){Function("r","regeneratorRuntime = r")(n)}},lwsE:function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},m0LI:function(t,e){t.exports=function(t,e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t)){var r=[],n=!0,o=!1,a=void 0;try{for(var i,u=t[Symbol.iterator]();!(n=(i=u.next()).done)&&(r.push(i.value),!e||r.length!==e);n=!0);}catch(s){o=!0,a=s}finally{try{n||null==u.return||u.return()}finally{if(o)throw a}}return r}}},"n3/+":function(t,e,r){"use strict";var n=r("o0o1"),o=r("yXPU");e.__esModule=!0,e.execOnce=function(t){var e,r=!1;return function(){return r||(r=!0,e=t.apply(void 0,arguments)),e}},e.getLocationOrigin=i,e.getURL=function(){var t=window.location.href,e=i();return t.substring(e.length)},e.getDisplayName=u,e.isResSent=s,e.loadGetInitialProps=c,e.formatWithValidation=function(t){0;return(0,a.formatUrl)(t)},e.ST=e.SP=e.urlObjectKeys=void 0;var a=r("tUWN");function i(){var t=window.location,e=t.protocol,r=t.hostname,n=t.port;return"".concat(e,"//").concat(r).concat(n?":"+n:"")}function u(t){return"string"===typeof t?t:t.displayName||t.name||"Unknown"}function s(t){return t.finished||t.headersSent}function c(t,e){return l.apply(this,arguments)}function l(){return(l=o(n.mark((function t(e,r){var o,a,i;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:t.next=4;break;case 4:if(o=r.res||r.ctx&&r.ctx.res,e.getInitialProps){t.next=12;break}if(!r.ctx||!r.Component){t.next=11;break}return t.next=9,c(r.Component,r.ctx);case 9:return t.t0=t.sent,t.abrupt("return",{pageProps:t.t0});case 11:return t.abrupt("return",{});case 12:return t.next=14,e.getInitialProps(r);case 14:if(a=t.sent,!o||!s(o)){t.next=17;break}return t.abrupt("return",a);case 17:if(a){t.next=20;break}throw i='"'.concat(u(e),'.getInitialProps()" should resolve to an object. But found "').concat(a,'" instead.'),new Error(i);case 20:return t.abrupt("return",a);case 22:case"end":return t.stop()}}),t)})))).apply(this,arguments)}e.urlObjectKeys=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];var f="undefined"!==typeof performance;e.SP=f;var h=f&&"function"===typeof performance.mark&&"function"===typeof performance.measure;e.ST=h},o0o1:function(t,e,r){t.exports=r("ls82")},pqeP:function(t,e,r){"use strict";var n=r("o0o1"),o=r("J4zp"),a=r("yXPU"),i=r("FzWm");e.__esModule=!0,e.markAssetError=f,e.isAssetError=function(t){return t&&l in t},e.getClientBuildManifest=p,e.default=void 0;i(r("GpGG"));var u=r("s4GJ");function s(t,e,r){var n,o=e.get(t);if(o)return"future"in o?o.future:Promise.resolve(o);var a=new Promise((function(t){n=t}));return e.set(t,o={resolve:n,future:a}),r?r().then((function(t){return n(t),t})):a}var c=function(t){try{return t=document.createElement("link"),!!window.MSInputMethodContext&&!!document.documentMode||t.relList.supports("prefetch")}catch(e){return!1}}();var l=Symbol("ASSET_LOAD_ERROR");function f(t){return Object.defineProperty(t,l,{})}function h(t,e,r){return new Promise((function(n,o){var a=!1;t.then((function(t){a=!0,n(t)})).catch(o),(0,u.requestIdleCallback)((function(){return setTimeout((function(){a||o(r)}),e)}))}))}function p(){return self.__BUILD_MANIFEST?Promise.resolve(self.__BUILD_MANIFEST):h(new Promise((function(t){var e=self.__BUILD_MANIFEST_CB;self.__BUILD_MANIFEST_CB=function(){t(self.__BUILD_MANIFEST),e&&e()}})),3800,f(new Error("Failed to load client build manifest")))}function d(t,e){return p().then((function(r){if(!(e in r))throw f(new Error("Failed to lookup route: ".concat(e)));var n=r[e].map((function(e){return t+"https://cdn.statically.io/gh/HiltonWS/hiltonws.github.io/master/smile/"+encodeURI(e)}));return{scripts:n.filter((function(t){return t.endsWith(".js")})),css:n.filter((function(t){return t.endsWith(".css")}))}}))}var v=function(t){var e=new Map,r=new Map,i=new Map,l=new Map;function p(t){var e=r.get(t);return e||(document.querySelector('script[src^="'.concat(t,'"]'))?Promise.resolve():(r.set(t,e=function(t,e){return new Promise((function(r,n){(e=document.createElement("script")).onload=r,e.onerror=function(){return n(f(new Error("Failed to load script: ".concat(t))))},e.crossOrigin=void 0,e.src=t,document.body.appendChild(e)}))}(t)),e))}function v(t){var e=i.get(t);return e||(i.set(t,e=fetch(t).then((function(e){if(!e.ok)throw new Error("Failed to load stylesheet: ".concat(t));return e.text().then((function(e){return{href:t,content:e}}))})).catch((function(t){throw f(t)}))),e)}return{whenEntrypoint:function(t){return s(t,e)},onEntrypoint:function(t,r){Promise.resolve(r).then((function(t){return t()})).then((function(t){return{component:t&&t.default||t,exports:t}}),(function(t){return{error:t}})).then((function(r){var n=e.get(t);e.set(t,r),n&&"resolve"in n&&n.resolve(r)}))},loadRoute:function(r){var i=this;return s(r,l,a(n.mark((function a(){var u,s,c,l,y,m,g,b;return n.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,d(t,r);case 3:return u=n.sent,s=u.scripts,c=u.css,n.next=8,Promise.all([e.has(r)?[]:Promise.all(s.map(p)),Promise.all(c.map(v))]);case 8:return l=n.sent,y=o(l,2),m=y[1],n.next=13,h(i.whenEntrypoint(r),3800,f(new Error("Route did not complete loading: ".concat(r))));case 13:return g=n.sent,b=Object.assign({styles:m},g),n.abrupt("return","error"in g?g:b);case 18:return n.prev=18,n.t0=n.catch(0),n.abrupt("return",{error:n.t0});case 21:case"end":return n.stop()}}),a,null,[[0,18]])}))))},prefetch:function(e){var r,n=this;return(r=navigator.connection)&&(r.saveData||/2g/.test(r.effectiveType))?Promise.resolve():d(t,e).then((function(t){return Promise.all(c?t.scripts.map((function(t){return e=t,r="script",new Promise((function(t,o){if(document.querySelector('link[rel="prefetch"][href^="'.concat(e,'"]')))return t();n=document.createElement("link"),r&&(n.as=r),n.rel="prefetch",n.crossOrigin=void 0,n.onload=t,n.onerror=o,n.href=e,document.head.appendChild(n)}));var e,r,n})):[])})).then((function(){(0,u.requestIdleCallback)((function(){return n.loadRoute(e)}))})).catch((function(){}))}}};e.default=v},s1dQ:function(t,e,r){"use strict";var n;e.__esModule=!0,e.RouterContext=void 0;var o=((n=r("BqPY"))&&n.__esModule?n:{default:n}).default.createContext(null);e.RouterContext=o},s4GJ:function(t,e,r){"use strict";e.__esModule=!0,e.cancelIdleCallback=e.requestIdleCallback=void 0;var n="undefined"!==typeof self&&self.requestIdleCallback||function(t){var e=Date.now();return setTimeout((function(){t({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-e))}})}),1)};e.requestIdleCallback=n;var o="undefined"!==typeof self&&self.cancelIdleCallback||function(t){return clearTimeout(t)};e.cancelIdleCallback=o},sXyB:function(t,e,r){var n=r("SksO"),o=r("b48C");function a(e,r,i){return o()?t.exports=a=Reflect.construct:t.exports=a=function(t,e,r){var o=[null];o.push.apply(o,e);var a=new(Function.bind.apply(t,o));return r&&n(a,r.prototype),a},a.apply(null,arguments)}t.exports=a},tUWN:function(t,e,r){"use strict";e.__esModule=!0,e.formatUrl=function(t){var e=t.auth,r=t.hostname,o=t.protocol||"",i=t.pathname||"",u=t.hash||"",s=t.query||"",c=!1;e=e?encodeURIComponent(e).replace(/%3A/i,":")+"@":"",t.host?c=e+t.host:r&&(c=e+(~r.indexOf(":")?"[".concat(r,"]"):r),t.port&&(c+=":"+t.port));s&&"object"===typeof s&&(s=String(n.urlQueryToSearchParams(s)));var l=t.search||s&&"?".concat(s)||"";o&&":"!==o.substr(-1)&&(o+=":");t.slashes||(!o||a.test(o))&&!1!==c?(c="//"+(c||""),i&&"/"!==i[0]&&(i="/"+i)):c||(c="");u&&"#"!==u[0]&&(u="#"+u);l&&"?"!==l[0]&&(l="?"+l);return i=i.replace(/[?#]/g,encodeURIComponent),l=l.replace("#","%23"),"".concat(o).concat(c).concat(i).concat(l).concat(u)};var n=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==typeof t&&"function"!==typeof t)return{default:t};var e=o();if(e&&e.has(t))return e.get(t);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if(Object.prototype.hasOwnProperty.call(t,a)){var i=n?Object.getOwnPropertyDescriptor(t,a):null;i&&(i.get||i.set)?Object.defineProperty(r,a,i):r[a]=t[a]}r.default=t,e&&e.set(t,r);return r}(r("29pC"));function o(){if("function"!==typeof WeakMap)return null;var t=new WeakMap;return o=function(){return t},t}var a=/https?|ftp|gopher|file/},vuub:function(t,e,r){"use strict";function n(t){return t.endsWith("/")&&"/"!==t?t.slice(0,-1):t}e.__esModule=!0,e.removePathTrailingSlash=n,e.normalizePathTrailingSlash=void 0;var o=n;e.normalizePathTrailingSlash=o},wTVA:function(t,e){t.exports=function(t){if(Array.isArray(t))return t}},wkBT:function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},yXPU:function(t,e){function r(t,e,r,n,o,a,i){try{var u=t[a](i),s=u.value}catch(c){return void r(c)}u.done?e(s):Promise.resolve(s).then(n,o)}t.exports=function(t){return function(){var e=this,n=arguments;return new Promise((function(o,a){var i=t.apply(e,n);function u(t){r(i,o,a,u,s,"next",t)}function s(t){r(i,o,a,u,s,"throw",t)}u(void 0)}))}}}}]); \ No newline at end of file +(window.webpackJsonp_N_E=window.webpackJsonp_N_E||[]).push([[1],{"/XDo":function(t,e,r){"use strict";e.__esModule=!0,e.getRouteMatcher=function(t){var e=t.re,r=t.groups;return function(t){var n=e.exec(t);if(!n)return!1;var o=function(t){try{return decodeURIComponent(t)}catch(r){var e=new Error("failed to decode param");throw e.code="DECODE_FAILED",e}},a={};return Object.keys(r).forEach((function(t){var e=r[t],i=n[e.pos];void 0!==i&&(a[t]=~i.indexOf("/")?i.split("/").map((function(t){return o(t)})):e.repeat?[o(i)]:o(i))})),a}}},"29pC":function(t,e,r){"use strict";var n=r("J4zp");function o(t){return"string"===typeof t||"number"===typeof t&&!isNaN(t)||"boolean"===typeof t?String(t):""}e.__esModule=!0,e.searchParamsToUrlQuery=function(t){var e={};return t.forEach((function(t,r){"undefined"===typeof e[r]?e[r]=t:Array.isArray(e[r])?e[r].push(t):e[r]=[e[r],t]})),e},e.urlQueryToSearchParams=function(t){var e=new URLSearchParams;return Object.entries(t).forEach((function(t){var r=n(t,2),a=r[0],i=r[1];Array.isArray(i)?i.forEach((function(t){return e.append(a,o(t))})):e.set(a,o(i))})),e},e.assign=function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n>>0,1)},emit:function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o1&&void 0!==arguments[1]?arguments[1]:"",r="/"===t?"/index":/^\/index(\/|$)/.test(t)?"/index".concat(t):"".concat(t);return r+e}},J4zp:function(t,e,r){var n=r("wTVA"),o=r("m0LI"),a=r("ZhPi"),i=r("wkBT");t.exports=function(t,e){return n(t)||o(t,e)||a(t,e)||i()}},Nsbk:function(t,e){function r(e){return t.exports=r=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},r(e)}t.exports=r},PJYZ:function(t,e){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}},R3d8:function(t,e,r){"use strict";function n(t){return t.replace(/\\/g,"/")}e.__esModule=!0,e.normalizePathSep=n,e.denormalizePagePath=function(t){(t=n(t)).startsWith("/index/")?t=t.slice(6):"/index"===t&&(t="/");return t}},SksO:function(t,e){function r(e,n){return t.exports=r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},r(e,n)}t.exports=r},TTnN:function(t,e,r){"use strict";var n=r("o0o1"),o=r("yXPU"),a=r("lwsE"),i=r("W8MJ"),u=r("J4zp");e.__esModule=!0,e.getDomainLocale=function(t,e,r,n){0;return!1},e.addLocale=_,e.delLocale=x,e.hasBasePath=S,e.addBasePath=k,e.delBasePath=E,e.isLocalURL=R,e.interpolateAs=L,e.resolveHref=O,e.default=void 0;var s=r("vuub"),c=r("pqeP"),l=r("R3d8"),f=(r("Ew7H"),b(r("Dg51"))),h=r("n3/+"),p=r("YKD2"),d=r("AO3j"),v=r("29pC"),y=b(r("lpVY")),m=r("/XDo"),g=r("99D5");function b(t){return t&&t.__esModule?t:{default:t}}function w(){return Object.assign(new Error("Route Cancelled"),{cancelled:!0})}function _(t,e,r){return t}function x(t,e){return t}function P(t){var e=t.indexOf("?"),r=t.indexOf("#");return(e>-1||r>-1)&&(t=t.substring(0,e>-1?e:r)),t}function S(t){return""===(t=P(t))||t.startsWith("/")}function k(t){return function(t,e){return e&&t.startsWith("/")?"/"===t?(0,s.normalizePathTrailingSlash)(e):"".concat(e).concat("/"===P(t)?t.substring(1):t):t}(t,"")}function E(t){return(t=t.slice("".length)).startsWith("/")||(t="/".concat(t)),t}function R(t){if(t.startsWith("/")||t.startsWith("#"))return!0;try{var e=(0,h.getLocationOrigin)(),r=new URL(t,e);return r.origin===e&&S(r.pathname)}catch(n){return!1}}function L(t,e,r){var n="",o=(0,g.getRouteRegex)(t),a=o.groups,i=(e!==t?(0,m.getRouteMatcher)(o)(e):"")||r;n=t;var u=Object.keys(a);return u.every((function(t){var e=i[t]||"",r=a[t],o=r.repeat,u=r.optional,s="[".concat(o?"...":"").concat(t,"]");return u&&(s="".concat(e?"":"/","[").concat(s,"]")),o&&!Array.isArray(e)&&(e=[e]),(u||t in i)&&(n=n.replace(s,o?e.map((function(t){return encodeURIComponent(t)})).join("/"):encodeURIComponent(e))||"/")}))||(n=""),{params:u,result:n}}function C(t,e){var r={};return Object.keys(t).forEach((function(n){e.includes(n)||(r[n]=t[n])})),r}function O(t,e,r){var n=new URL(t,"http://n"),o="string"===typeof e?e:(0,h.formatWithValidation)(e);if(!R(o))return r?[o]:o;try{var a=new URL(o,n);a.pathname=(0,s.normalizePathTrailingSlash)(a.pathname);var i="";if((0,p.isDynamicRoute)(a.pathname)&&a.searchParams&&r){var u=(0,v.searchParamsToUrlQuery)(a.searchParams),c=L(a.pathname,a.pathname,u),l=c.result,f=c.params;l&&(i=(0,h.formatWithValidation)({pathname:l,hash:a.hash,query:C(u,f)}))}var d=a.origin===n.origin?a.href.slice(a.origin.length):a.href;return r?[d,i||d]:d}catch(y){return r?[o]:o}}function j(t){var e=(0,h.getLocationOrigin)();return t.startsWith(e)?t.substring(e.length):t}function T(t,e,r){var n=O(t.pathname,e,!0),o=u(n,2),a=o[0],i=o[1],s=(0,h.getLocationOrigin)(),c=a.startsWith(s),l=i&&i.startsWith(s);a=j(a),i=i?j(i):i;var f=c?a:k(a),p=r?j(O(t.pathname,r)):i||a;return{url:f,as:l?p:k(p)}}function A(t,e){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=t.pathname,o=(0,s.removePathTrailingSlash)((0,l.denormalizePagePath)(r?E(n):n));return"/404"===o||"/_error"===o||(e.includes(o)||e.some((function(e){if((0,p.isDynamicRoute)(e)&&(0,g.getRouteRegex)(e).re.test(o))return t.pathname=r?k(e):e,!0})),t.pathname=(0,s.removePathTrailingSlash)(t.pathname)),t}var I=Symbol("SSG_DATA_NOT_FOUND");function D(t,e){return fetch(t,{credentials:"same-origin"}).then((function(r){if(!r.ok){if(e>1&&r.status>=500)return D(t,e-1);if(404===r.status)return r.json().then((function(t){if(t.notFound)return{notFound:I};throw new Error("Failed to load static props")}));throw new Error("Failed to load static props")}return r.json()}))}function M(t,e){return D(t,e?3:1).catch((function(t){throw e||(0,c.markAssetError)(t),t}))}var N=function(){function t(e,r,n,o){var i=this,u=o.initialProps,c=o.pageLoader,l=o.App,f=o.wrapApp,v=o.Component,y=o.err,m=o.subscription,g=o.isFallback,b=o.locale,w=(o.locales,o.defaultLocale,o.domainLocales,o.isPreview);a(this,t),this.route=void 0,this.pathname=void 0,this.query=void 0,this.asPath=void 0,this.basePath=void 0,this.components=void 0,this.sdc={},this.sdr={},this.sub=void 0,this.clc=void 0,this.pageLoader=void 0,this._bps=void 0,this.events=void 0,this._wrapApp=void 0,this.isSsr=void 0,this.isFallback=void 0,this._inFlightRoute=void 0,this._shallow=void 0,this.locale=void 0,this.locales=void 0,this.defaultLocale=void 0,this.domainLocales=void 0,this.isReady=void 0,this.isPreview=void 0,this.isLocaleDomain=void 0,this._idx=0,this.onPopState=function(t){var e=t.state;if(e){if(e.__N){var r=e.url,n=e.as,o=e.options,a=e.idx;i._idx=a;var u=(0,d.parseRelativeUrl)(r).pathname;i.isSsr&&n===i.asPath&&u===i.pathname||i._bps&&!i._bps(e)||i.change("replaceState",r,n,Object.assign({},o,{shallow:o.shallow&&i._shallow,locale:o.locale||i.defaultLocale}),undefined)}}else{var s=i.pathname,c=i.query;i.changeState("replaceState",(0,h.formatWithValidation)({pathname:k(s),query:c}),(0,h.getURL)())}},this.route=(0,s.removePathTrailingSlash)(e),this.components={},"/_error"!==e&&(this.components[this.route]={Component:v,initial:!0,props:u,err:y,__N_SSG:u&&u.__N_SSG,__N_SSP:u&&u.__N_SSP}),this.components["/_app"]={Component:l,styleSheets:[]},this.events=t.events,this.pageLoader=c,this.pathname=e,this.query=r;var _=(0,p.isDynamicRoute)(e)&&self.__NEXT_DATA__.autoExport;this.asPath=_?e:n,this.basePath="",this.sub=m,this.clc=null,this._wrapApp=f,this.isSsr=!0,this.isFallback=g,this.isReady=!(!self.__NEXT_DATA__.gssp&&!self.__NEXT_DATA__.gip&&(_||self.location.search)),this.isPreview=!!w,this.isLocaleDomain=!1,"//"!==n.substr(0,2)&&this.changeState("replaceState",(0,h.formatWithValidation)({pathname:k(e),query:r}),(0,h.getURL)(),{locale:b}),window.addEventListener("popstate",this.onPopState)}return i(t,[{key:"reload",value:function(){window.location.reload()}},{key:"back",value:function(){window.history.back()}},{key:"push",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};var n=T(this,t,e);return t=n.url,e=n.as,this.change("pushState",t,e,r)}},{key:"replace",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=T(this,t,e);return t=n.url,e=n.as,this.change("replaceState",t,e,r)}},{key:"change",value:function(){var e=o(n.mark((function e(r,o,a,i,u){var l,f,v,y,b,w,P,O,j,D,M,N,U,W,F,q,G,B,V,z,H,Y,J,X,$,Q,Z,K,tt,et,rt,nt,ot,at,it;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(R(o)){e.next=3;break}return window.location.href=o,e.abrupt("return",!1);case 3:i._h&&(this.isReady=!0),i.scroll=!(null!=(l=i.scroll)&&!l),f=i.locale!==this.locale,e.next=18;break;case 18:if(i._h||(this.isSsr=!1),h.ST&&performance.mark("routeChange"),v=i.shallow,y={shallow:void 0!==v&&v},this._inFlightRoute&&this.abortComponentLoad(this._inFlightRoute,y),a=k(_(S(a)?E(a):a,i.locale,this.defaultLocale)),b=x(S(a)?E(a):a,this.locale),this._inFlightRoute=a,i._h||!this.onlyAHashChange(b)){e.next=34;break}return this.asPath=b,t.events.emit("hashChangeStart",a,y),this.changeState(r,o,a,i),this.scrollToHash(b),this.notify(this.components[this.route],null),t.events.emit("hashChangeComplete",a,y),e.abrupt("return",!0);case 34:return w=(0,d.parseRelativeUrl)(o),O=(P=w).pathname,j=P.query,e.prev=36,e.next=39,this.pageLoader.getPageList();case 39:return D=e.sent,e.next=42,(0,c.getClientBuildManifest)();case 42:M=e.sent,M.__rewrites,e.next=50;break;case 46:return e.prev=46,e.t0=e.catch(36),window.location.href=a,e.abrupt("return",!1);case 50:if((w=A(w,D)).pathname!==O&&(O=w.pathname,o=(0,h.formatWithValidation)(w)),O=O?(0,s.removePathTrailingSlash)(E(O)):O,this.urlIsNew(b)||f||(r="replaceState"),N=(0,s.removePathTrailingSlash)(O),U=a,R(a)){e.next=62;break}e.next=60;break;case 60:return window.location.href=a,e.abrupt("return",!1);case 62:if(U=x(E(U),this.locale),!(0,p.isDynamicRoute)(N)){e.next=78;break}if(W=(0,d.parseRelativeUrl)(U),F=W.pathname,q=(0,g.getRouteRegex)(N),G=(0,m.getRouteMatcher)(q)(F),V=(B=N===F)?L(N,F,j):{},G&&(!B||V.result)){e.next=77;break}if(!((z=Object.keys(q.groups).filter((function(t){return!j[t]}))).length>0)){e.next=75;break}throw new Error((B?"The provided `href` (".concat(o,") value is missing query values (").concat(z.join(", "),") to be interpolated properly. "):"The provided `as` value (".concat(F,") is incompatible with the `href` value (").concat(N,"). "))+"Read more: https://err.sh/vercel/next.js/".concat(B?"href-interpolation-failed":"incompatible-href-as"));case 75:e.next=78;break;case 77:B?a=(0,h.formatWithValidation)(Object.assign({},W,{pathname:V.result,query:C(j,V.params)})):Object.assign(j,G);case 78:return t.events.emit("routeChangeStart",a,y),e.prev=79,e.next=82,this.getRouteInfo(N,O,j,a,U,y);case 82:if(J=e.sent,$=(X=J).error,Q=X.props,Z=X.__N_SSG,K=X.__N_SSP,!Z&&!K||!Q){e.next=109;break}if(!Q.pageProps||!Q.pageProps.__N_REDIRECT){e.next=95;break}if(!(tt=Q.pageProps.__N_REDIRECT).startsWith("/")){e.next=93;break}if(A(et=(0,d.parseRelativeUrl)(tt),D,!1),!D.includes(et.pathname)){e.next=93;break}return rt=T(this,tt,tt),nt=rt.url,ot=rt.as,e.abrupt("return",this.change(r,nt,ot,i));case 93:return window.location.href=tt,e.abrupt("return",new Promise((function(){})));case 95:if(this.isPreview=!!Q.__N_PREVIEW,Q.notFound!==I){e.next=109;break}return e.prev=97,e.next=100,this.fetchComponent("/404");case 100:at="/404",e.next=106;break;case 103:e.prev=103,e.t1=e.catch(97),at="/_error";case 106:return e.next=108,this.getRouteInfo(at,at,j,a,U,{shallow:!1});case 108:J=e.sent;case 109:return t.events.emit("beforeHistoryChange",a,y),this.changeState(r,o,a,i),it=i.shallow&&this.route===N,i._h&&"/_error"===O&&500===(null==(H=self.__NEXT_DATA__.props)||null==(Y=H.pageProps)?void 0:Y.statusCode)&&null!=Q&&Q.pageProps&&(Q.pageProps.statusCode=500),e.next=116,this.set(N,O,j,b,J,u||(it||!i.scroll?null:{x:0,y:0})).catch((function(t){if(!t.cancelled)throw t;$=$||t}));case 116:if(!$){e.next=119;break}throw t.events.emit("routeChangeError",$,b,y),$;case 119:return t.events.emit("routeChangeComplete",a,y),e.abrupt("return",!0);case 124:if(e.prev=124,e.t2=e.catch(79),!e.t2.cancelled){e.next=128;break}return e.abrupt("return",!1);case 128:throw e.t2;case 129:case"end":return e.stop()}}),e,this,[[36,46],[79,124],[97,103]])})));return function(t,r,n,o,a){return e.apply(this,arguments)}}()},{key:"changeState",value:function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};"pushState"===t&&(0,h.getURL)()===r||(this._shallow=n.shallow,window.history[t]({url:e,as:r,options:n,__N:!0,idx:this._idx="pushState"!==t?this._idx:this._idx+1},"",r))}},{key:"handleRouteInfoError",value:function(){var e=o(n.mark((function e(r,o,a,i,u,s){var l,f,h,p;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!r.cancelled){e.next=2;break}throw r;case 2:if(!(0,c.isAssetError)(r)&&!s){e.next=6;break}throw t.events.emit("routeChangeError",r,i,u),window.location.href=i,w();case 6:if(e.prev=6,"undefined"!==typeof l&&"undefined"!==typeof f){e.next=14;break}return e.next=11,this.fetchComponent("/_error");case 11:h=e.sent,l=h.page,f=h.styleSheets;case 14:if((p={props:undefined,Component:l,styleSheets:f,err:r,error:r}).props){e.next=26;break}return e.prev=16,e.next=19,this.getInitialProps(l,{err:r,pathname:o,query:a});case 19:p.props=e.sent,e.next=26;break;case 22:e.prev=22,e.t0=e.catch(16),console.error("Error in error page `getInitialProps`: ",e.t0),p.props={};case 26:return e.abrupt("return",p);case 29:return e.prev=29,e.t1=e.catch(6),e.abrupt("return",this.handleRouteInfoError(e.t1,o,a,i,u,!0));case 32:case"end":return e.stop()}}),e,this,[[6,29],[16,22]])})));return function(t,r,n,o,a,i){return e.apply(this,arguments)}}()},{key:"getRouteInfo",value:function(){var t=o(n.mark((function t(e,r,o,a,i,u){var s,c,l,f,p,d,v,y,m=this;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,s=this.components[e],!u.shallow||!s||this.route!==e){t.next=4;break}return t.abrupt("return",s);case 4:if(!(c=s&&"initial"in s?void 0:s)){t.next=9;break}t.t0=c,t.next=12;break;case 9:return t.next=11,this.fetchComponent(e).then((function(t){return{Component:t.page,styleSheets:t.styleSheets,__N_SSG:t.mod.__N_SSG,__N_SSP:t.mod.__N_SSP}}));case 11:t.t0=t.sent;case 12:l=t.t0,f=l.Component,p=l.__N_SSG,d=l.__N_SSP,t.next=18;break;case 18:return(p||d)&&(v=this.pageLoader.getDataHref((0,h.formatWithValidation)({pathname:r,query:o}),i,p,this.locale)),t.next=21,this._getData((function(){return p?m._getStaticData(v):d?m._getServerData(v):m.getInitialProps(f,{pathname:r,query:o,asPath:a})}));case 21:return y=t.sent,l.props=y,this.components[e]=l,t.abrupt("return",l);case 27:return t.prev=27,t.t1=t.catch(0),t.abrupt("return",this.handleRouteInfoError(t.t1,r,o,a,u));case 30:case"end":return t.stop()}}),t,this,[[0,27]])})));return function(e,r,n,o,a,i){return t.apply(this,arguments)}}()},{key:"set",value:function(t,e,r,n,o,a){return this.isFallback=!1,this.route=t,this.pathname=e,this.query=r,this.asPath=n,this.notify(o,a)}},{key:"beforePopState",value:function(t){this._bps=t}},{key:"onlyAHashChange",value:function(t){if(!this.asPath)return!1;var e=this.asPath.split("#"),r=u(e,2),n=r[0],o=r[1],a=t.split("#"),i=u(a,2),s=i[0],c=i[1];return!(!c||n!==s||o!==c)||n===s&&o!==c}},{key:"scrollToHash",value:function(t){var e=t.split("#"),r=u(e,2)[1];if(""!==r&&"top"!==r){var n=document.getElementById(r);if(n)n.scrollIntoView();else{var o=document.getElementsByName(r)[0];o&&o.scrollIntoView()}}else window.scrollTo(0,0)}},{key:"urlIsNew",value:function(t){return this.asPath!==t}},{key:"prefetch",value:function(){var t=o(n.mark((function t(e){var r,o,a,i,u,c,l,f,p,v,m=this,g=arguments;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=g.length>1&&void 0!==g[1]?g[1]:e,o=g.length>2&&void 0!==g[2]?g[2]:{},a=(0,d.parseRelativeUrl)(e),i=a.pathname,t.next=7,this.pageLoader.getPageList();case 7:u=t.sent,(a=A(a,u,!1)).pathname!==i&&(i=a.pathname,e=(0,h.formatWithValidation)(a)),c=(0,s.removePathTrailingSlash)(i),l=r,t.next=19;break;case 15:p=t.sent,f=p.__rewrites,(v=(0,y.default)(k(_(E(r),this.locale)),u,f,a.query,(function(t){return A({pathname:t},u).pathname}),this.locales)).matchedPage&&v.resolvedHref&&(c=v.resolvedHref,i=v.resolvedHref,a.pathname=i,e=(0,h.formatWithValidation)(a),l=v.asPath);case 19:t.next=21;break;case 21:return t.next=23,Promise.all([this.pageLoader._isSsg(e).then((function(t){return!!t&&m._getStaticData(m.pageLoader.getDataHref(e,l,!0,"undefined"!==typeof o.locale?o.locale:m.locale))})),this.pageLoader[o.priority?"loadPage":"prefetch"](c)]);case 23:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"fetchComponent",value:function(){var t=o(n.mark((function t(e){var r,o,a,i;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=!1,o=this.clc=function(){r=!0},t.next=4,this.pageLoader.loadPage(e);case 4:if(a=t.sent,!r){t.next=9;break}throw(i=new Error('Abort fetching component for route: "'.concat(e,'"'))).cancelled=!0,i;case 9:return o===this.clc&&(this.clc=null),t.abrupt("return",a);case 11:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"_getData",value:function(t){var e=this,r=!1,n=function(){r=!0};return this.clc=n,t().then((function(t){if(n===e.clc&&(e.clc=null),r){var o=new Error("Loading initial props cancelled");throw o.cancelled=!0,o}return t}))}},{key:"_getStaticData",value:function(t){var e=this,r=new URL(t,window.location.href).href;return!this.isPreview&&this.sdc[r]?Promise.resolve(this.sdc[r]):M(t,this.isSsr).then((function(t){return e.sdc[r]=t,t}))}},{key:"_getServerData",value:function(t){var e=this,r=new URL(t,window.location.href).href;return this.sdr[r]?this.sdr[r]:this.sdr[r]=M(t,this.isSsr).then((function(t){return delete e.sdr[r],t})).catch((function(t){throw delete e.sdr[r],t}))}},{key:"getInitialProps",value:function(t,e){var r=this.components["/_app"].Component,n=this._wrapApp(r);return e.AppTree=n,(0,h.loadGetInitialProps)(r,{AppTree:n,Component:t,router:this,ctx:e})}},{key:"abortComponentLoad",value:function(e,r){this.clc&&(t.events.emit("routeChangeError",w(),e,r),this.clc(),this.clc=null)}},{key:"notify",value:function(t,e){return this.sub(t,this.components["/_app"].Component,e)}}]),t}();e.default=N,N.events=(0,f.default)()},TTt4:function(t,e,r){var n=r("ekFS");function o(){if("function"!==typeof WeakMap)return null;var t=new WeakMap;return o=function(){return t},t}t.exports=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!==typeof t)return{default:t};var e=o();if(e&&e.has(t))return e.get(t);var r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var u=a?Object.getOwnPropertyDescriptor(t,i):null;u&&(u.get||u.set)?Object.defineProperty(r,i,u):r[i]=t[i]}return r.default=t,e&&e.set(t,r),r}},UULE:function(t,e,r){"use strict";var n=Object.assign.bind(Object);t.exports=n,t.exports.default=t.exports},W8MJ:function(t,e){function r(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,u=!0,s=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return u=t.done,t},e:function(t){s=!0,i=t},f:function(){try{u||null==r.return||r.return()}finally{if(s)throw i}}}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=0;--a){var i=this.tryEntries[a],u=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(s&&c){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),R(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;R(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:C(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}(t.exports);try{regeneratorRuntime=n}catch(o){Function("r","regeneratorRuntime = r")(n)}},lwsE:function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},m0LI:function(t,e){t.exports=function(t,e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t)){var r=[],n=!0,o=!1,a=void 0;try{for(var i,u=t[Symbol.iterator]();!(n=(i=u.next()).done)&&(r.push(i.value),!e||r.length!==e);n=!0);}catch(s){o=!0,a=s}finally{try{n||null==u.return||u.return()}finally{if(o)throw a}}return r}}},"n3/+":function(t,e,r){"use strict";var n=r("o0o1"),o=r("yXPU");e.__esModule=!0,e.execOnce=function(t){var e,r=!1;return function(){return r||(r=!0,e=t.apply(void 0,arguments)),e}},e.getLocationOrigin=i,e.getURL=function(){var t=window.location.href,e=i();return t.substring(e.length)},e.getDisplayName=u,e.isResSent=s,e.loadGetInitialProps=c,e.formatWithValidation=function(t){0;return(0,a.formatUrl)(t)},e.ST=e.SP=e.urlObjectKeys=void 0;var a=r("tUWN");function i(){var t=window.location,e=t.protocol,r=t.hostname,n=t.port;return"".concat(e,"//").concat(r).concat(n?":"+n:"")}function u(t){return"string"===typeof t?t:t.displayName||t.name||"Unknown"}function s(t){return t.finished||t.headersSent}function c(t,e){return l.apply(this,arguments)}function l(){return(l=o(n.mark((function t(e,r){var o,a,i;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:t.next=4;break;case 4:if(o=r.res||r.ctx&&r.ctx.res,e.getInitialProps){t.next=12;break}if(!r.ctx||!r.Component){t.next=11;break}return t.next=9,c(r.Component,r.ctx);case 9:return t.t0=t.sent,t.abrupt("return",{pageProps:t.t0});case 11:return t.abrupt("return",{});case 12:return t.next=14,e.getInitialProps(r);case 14:if(a=t.sent,!o||!s(o)){t.next=17;break}return t.abrupt("return",a);case 17:if(a){t.next=20;break}throw i='"'.concat(u(e),'.getInitialProps()" should resolve to an object. But found "').concat(a,'" instead.'),new Error(i);case 20:return t.abrupt("return",a);case 22:case"end":return t.stop()}}),t)})))).apply(this,arguments)}e.urlObjectKeys=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];var f="undefined"!==typeof performance;e.SP=f;var h=f&&"function"===typeof performance.mark&&"function"===typeof performance.measure;e.ST=h},o0o1:function(t,e,r){t.exports=r("ls82")},pqeP:function(t,e,r){"use strict";var n=r("o0o1"),o=r("J4zp"),a=r("yXPU"),i=r("FzWm");e.__esModule=!0,e.markAssetError=f,e.isAssetError=function(t){return t&&l in t},e.getClientBuildManifest=p,e.default=void 0;i(r("GpGG"));var u=r("s4GJ");function s(t,e,r){var n,o=e.get(t);if(o)return"future"in o?o.future:Promise.resolve(o);var a=new Promise((function(t){n=t}));return e.set(t,o={resolve:n,future:a}),r?r().then((function(t){return n(t),t})):a}var c=function(t){try{return t=document.createElement("link"),!!window.MSInputMethodContext&&!!document.documentMode||t.relList.supports("prefetch")}catch(e){return!1}}();var l=Symbol("ASSET_LOAD_ERROR");function f(t){return Object.defineProperty(t,l,{})}function h(t,e,r){return new Promise((function(n,o){var a=!1;t.then((function(t){a=!0,n(t)})).catch(o),(0,u.requestIdleCallback)((function(){return setTimeout((function(){a||o(r)}),e)}))}))}function p(){return self.__BUILD_MANIFEST?Promise.resolve(self.__BUILD_MANIFEST):h(new Promise((function(t){var e=self.__BUILD_MANIFEST_CB;self.__BUILD_MANIFEST_CB=function(){t(self.__BUILD_MANIFEST),e&&e()}})),3800,f(new Error("Failed to load client build manifest")))}function d(t,e){return p().then((function(r){if(!(e in r))throw f(new Error("Failed to lookup route: ".concat(e)));var n=r[e].map((function(e){return t+"https://cdn.statically.io/gh/HiltonWS/hiltonws.github.io/1.1.1/smile/"+encodeURI(e)}));return{scripts:n.filter((function(t){return t.endsWith(".js")})),css:n.filter((function(t){return t.endsWith(".css")}))}}))}var v=function(t){var e=new Map,r=new Map,i=new Map,l=new Map;function p(t){var e=r.get(t);return e||(document.querySelector('script[src^="'.concat(t,'"]'))?Promise.resolve():(r.set(t,e=function(t,e){return new Promise((function(r,n){(e=document.createElement("script")).onload=r,e.onerror=function(){return n(f(new Error("Failed to load script: ".concat(t))))},e.crossOrigin=void 0,e.src=t,document.body.appendChild(e)}))}(t)),e))}function v(t){var e=i.get(t);return e||(i.set(t,e=fetch(t).then((function(e){if(!e.ok)throw new Error("Failed to load stylesheet: ".concat(t));return e.text().then((function(e){return{href:t,content:e}}))})).catch((function(t){throw f(t)}))),e)}return{whenEntrypoint:function(t){return s(t,e)},onEntrypoint:function(t,r){Promise.resolve(r).then((function(t){return t()})).then((function(t){return{component:t&&t.default||t,exports:t}}),(function(t){return{error:t}})).then((function(r){var n=e.get(t);e.set(t,r),n&&"resolve"in n&&n.resolve(r)}))},loadRoute:function(r){var i=this;return s(r,l,a(n.mark((function a(){var u,s,c,l,y,m,g,b;return n.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,d(t,r);case 3:return u=n.sent,s=u.scripts,c=u.css,n.next=8,Promise.all([e.has(r)?[]:Promise.all(s.map(p)),Promise.all(c.map(v))]);case 8:return l=n.sent,y=o(l,2),m=y[1],n.next=13,h(i.whenEntrypoint(r),3800,f(new Error("Route did not complete loading: ".concat(r))));case 13:return g=n.sent,b=Object.assign({styles:m},g),n.abrupt("return","error"in g?g:b);case 18:return n.prev=18,n.t0=n.catch(0),n.abrupt("return",{error:n.t0});case 21:case"end":return n.stop()}}),a,null,[[0,18]])}))))},prefetch:function(e){var r,n=this;return(r=navigator.connection)&&(r.saveData||/2g/.test(r.effectiveType))?Promise.resolve():d(t,e).then((function(t){return Promise.all(c?t.scripts.map((function(t){return e=t,r="script",new Promise((function(t,o){if(document.querySelector('link[rel="prefetch"][href^="'.concat(e,'"]')))return t();n=document.createElement("link"),r&&(n.as=r),n.rel="prefetch",n.crossOrigin=void 0,n.onload=t,n.onerror=o,n.href=e,document.head.appendChild(n)}));var e,r,n})):[])})).then((function(){(0,u.requestIdleCallback)((function(){return n.loadRoute(e)}))})).catch((function(){}))}}};e.default=v},s1dQ:function(t,e,r){"use strict";var n;e.__esModule=!0,e.RouterContext=void 0;var o=((n=r("BqPY"))&&n.__esModule?n:{default:n}).default.createContext(null);e.RouterContext=o},s4GJ:function(t,e,r){"use strict";e.__esModule=!0,e.cancelIdleCallback=e.requestIdleCallback=void 0;var n="undefined"!==typeof self&&self.requestIdleCallback||function(t){var e=Date.now();return setTimeout((function(){t({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-e))}})}),1)};e.requestIdleCallback=n;var o="undefined"!==typeof self&&self.cancelIdleCallback||function(t){return clearTimeout(t)};e.cancelIdleCallback=o},sXyB:function(t,e,r){var n=r("SksO"),o=r("b48C");function a(e,r,i){return o()?t.exports=a=Reflect.construct:t.exports=a=function(t,e,r){var o=[null];o.push.apply(o,e);var a=new(Function.bind.apply(t,o));return r&&n(a,r.prototype),a},a.apply(null,arguments)}t.exports=a},tUWN:function(t,e,r){"use strict";e.__esModule=!0,e.formatUrl=function(t){var e=t.auth,r=t.hostname,o=t.protocol||"",i=t.pathname||"",u=t.hash||"",s=t.query||"",c=!1;e=e?encodeURIComponent(e).replace(/%3A/i,":")+"@":"",t.host?c=e+t.host:r&&(c=e+(~r.indexOf(":")?"[".concat(r,"]"):r),t.port&&(c+=":"+t.port));s&&"object"===typeof s&&(s=String(n.urlQueryToSearchParams(s)));var l=t.search||s&&"?".concat(s)||"";o&&":"!==o.substr(-1)&&(o+=":");t.slashes||(!o||a.test(o))&&!1!==c?(c="//"+(c||""),i&&"/"!==i[0]&&(i="/"+i)):c||(c="");u&&"#"!==u[0]&&(u="#"+u);l&&"?"!==l[0]&&(l="?"+l);return i=i.replace(/[?#]/g,encodeURIComponent),l=l.replace("#","%23"),"".concat(o).concat(c).concat(i).concat(l).concat(u)};var n=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==typeof t&&"function"!==typeof t)return{default:t};var e=o();if(e&&e.has(t))return e.get(t);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if(Object.prototype.hasOwnProperty.call(t,a)){var i=n?Object.getOwnPropertyDescriptor(t,a):null;i&&(i.get||i.set)?Object.defineProperty(r,a,i):r[a]=t[a]}r.default=t,e&&e.set(t,r);return r}(r("29pC"));function o(){if("function"!==typeof WeakMap)return null;var t=new WeakMap;return o=function(){return t},t}var a=/https?|ftp|gopher|file/},vuub:function(t,e,r){"use strict";function n(t){return t.endsWith("/")&&"/"!==t?t.slice(0,-1):t}e.__esModule=!0,e.removePathTrailingSlash=n,e.normalizePathTrailingSlash=void 0;var o=n;e.normalizePathTrailingSlash=o},wTVA:function(t,e){t.exports=function(t){if(Array.isArray(t))return t}},wkBT:function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},yXPU:function(t,e){function r(t,e,r,n,o,a,i){try{var u=t[a](i),s=u.value}catch(c){return void r(c)}u.done?e(s):Promise.resolve(s).then(n,o)}t.exports=function(t){return function(){var e=this,n=arguments;return new Promise((function(o,a){var i=t.apply(e,n);function u(t){r(i,o,a,u,s,"next",t)}function s(t){r(i,o,a,u,s,"throw",t)}u(void 0)}))}}}}]); \ No newline at end of file diff --git a/smile/static/chunks/commons.be4a930c5b62f913b28c.js b/smile/static/chunks/commons.be4a930c5b62f913b28c.js index 2dc372c..439b1e6 100644 --- a/smile/static/chunks/commons.be4a930c5b62f913b28c.js +++ b/smile/static/chunks/commons.be4a930c5b62f913b28c.js @@ -1 +1 @@ -(window.webpackJsonp_N_E=window.webpackJsonp_N_E||[]).push([[1],{"/jkW":function(t,e,r){"use strict";e.__esModule=!0,e.isDynamicRoute=function(t){return n.test(t)};var n=/\/\[[^/]+?\](?=\/|$)/},"0Bsm":function(t,e,r){"use strict";var n=r("TqRt");e.__esModule=!0,e.default=function(t){function e(e){return o.default.createElement(t,Object.assign({router:(0,a.useRouter)()},e))}e.getInitialProps=t.getInitialProps,e.origGetInitialProps=t.origGetInitialProps,!1;return e};var o=n(r("q1tI")),a=r("nOHt")},"0G5g":function(t,e,r){"use strict";e.__esModule=!0,e.cancelIdleCallback=e.requestIdleCallback=void 0;var n="undefined"!==typeof self&&self.requestIdleCallback||function(t){var e=Date.now();return setTimeout((function(){t({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-e))}})}),1)};e.requestIdleCallback=n;var o="undefined"!==typeof self&&self.cancelIdleCallback||function(t){return clearTimeout(t)};e.cancelIdleCallback=o},"284h":function(t,e,r){var n=r("cDf5");function o(){if("function"!==typeof WeakMap)return null;var t=new WeakMap;return o=function(){return t},t}t.exports=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!==typeof t)return{default:t};var e=o();if(e&&e.has(t))return e.get(t);var r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var u=a?Object.getOwnPropertyDescriptor(t,i):null;u&&(u.get||u.set)?Object.defineProperty(r,i,u):r[i]=t[i]}return r.default=t,e&&e.set(t,r),r}},"3WeD":function(t,e,r){"use strict";var n=r("J4zp");function o(t){return"string"===typeof t||"number"===typeof t&&!isNaN(t)||"boolean"===typeof t?String(t):""}e.__esModule=!0,e.searchParamsToUrlQuery=function(t){var e={};return t.forEach((function(t,r){"undefined"===typeof e[r]?e[r]=t:Array.isArray(e[r])?e[r].push(t):e[r]=[e[r],t]})),e},e.urlQueryToSearchParams=function(t){var e=new URLSearchParams;return Object.entries(t).forEach((function(t){var r=n(t,2),a=r[0],i=r[1];Array.isArray(i)?i.forEach((function(t){return e.append(a,o(t))})):e.set(a,o(i))})),e},e.assign=function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n1&&void 0!==arguments[1]?arguments[1]:"",r="/"===t?"/index":/^\/index(\/|$)/.test(t)?"/index".concat(t):"".concat(t);return r+e}},Nh2W:function(t,e,r){"use strict";var n=r("o0o1"),o=r("J4zp"),a=r("yXPU"),i=r("TqRt");e.__esModule=!0,e.markAssetError=f,e.isAssetError=function(t){return t&&l in t},e.getClientBuildManifest=p,e.default=void 0;i(r("Lab5"));var u=r("0G5g");function s(t,e,r){var n,o=e.get(t);if(o)return"future"in o?o.future:Promise.resolve(o);var a=new Promise((function(t){n=t}));return e.set(t,o={resolve:n,future:a}),r?r().then((function(t){return n(t),t})):a}var c=function(t){try{return t=document.createElement("link"),!!window.MSInputMethodContext&&!!document.documentMode||t.relList.supports("prefetch")}catch(e){return!1}}();var l=Symbol("ASSET_LOAD_ERROR");function f(t){return Object.defineProperty(t,l,{})}function h(t,e,r){return new Promise((function(n,o){var a=!1;t.then((function(t){a=!0,n(t)})).catch(o),(0,u.requestIdleCallback)((function(){return setTimeout((function(){a||o(r)}),e)}))}))}function p(){return self.__BUILD_MANIFEST?Promise.resolve(self.__BUILD_MANIFEST):h(new Promise((function(t){var e=self.__BUILD_MANIFEST_CB;self.__BUILD_MANIFEST_CB=function(){t(self.__BUILD_MANIFEST),e&&e()}})),3800,f(new Error("Failed to load client build manifest")))}function d(t,e){return p().then((function(r){if(!(e in r))throw f(new Error("Failed to lookup route: ".concat(e)));var n=r[e].map((function(e){return t+"https://cdn.statically.io/gh/HiltonWS/hiltonws.github.io/master/smile/"+encodeURI(e)}));return{scripts:n.filter((function(t){return t.endsWith(".js")})),css:n.filter((function(t){return t.endsWith(".css")}))}}))}var v=function(t){var e=new Map,r=new Map,i=new Map,l=new Map;function p(t){var e=r.get(t);return e||(document.querySelector('script[src^="'.concat(t,'"]'))?Promise.resolve():(r.set(t,e=function(t,e){return new Promise((function(r,n){(e=document.createElement("script")).onload=r,e.onerror=function(){return n(f(new Error("Failed to load script: ".concat(t))))},e.crossOrigin=void 0,e.src=t,document.body.appendChild(e)}))}(t)),e))}function v(t){var e=i.get(t);return e||(i.set(t,e=fetch(t).then((function(e){if(!e.ok)throw new Error("Failed to load stylesheet: ".concat(t));return e.text().then((function(e){return{href:t,content:e}}))})).catch((function(t){throw f(t)}))),e)}return{whenEntrypoint:function(t){return s(t,e)},onEntrypoint:function(t,r){Promise.resolve(r).then((function(t){return t()})).then((function(t){return{component:t&&t.default||t,exports:t}}),(function(t){return{error:t}})).then((function(r){var n=e.get(t);e.set(t,r),n&&"resolve"in n&&n.resolve(r)}))},loadRoute:function(r){var i=this;return s(r,l,a(n.mark((function a(){var u,s,c,l,y,m,g,w;return n.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,d(t,r);case 3:return u=n.sent,s=u.scripts,c=u.css,n.next=8,Promise.all([e.has(r)?[]:Promise.all(s.map(p)),Promise.all(c.map(v))]);case 8:return l=n.sent,y=o(l,2),m=y[1],n.next=13,h(i.whenEntrypoint(r),3800,f(new Error("Route did not complete loading: ".concat(r))));case 13:return g=n.sent,w=Object.assign({styles:m},g),n.abrupt("return","error"in g?g:w);case 18:return n.prev=18,n.t0=n.catch(0),n.abrupt("return",{error:n.t0});case 21:case"end":return n.stop()}}),a,null,[[0,18]])}))))},prefetch:function(e){var r,n=this;return(r=navigator.connection)&&(r.saveData||/2g/.test(r.effectiveType))?Promise.resolve():d(t,e).then((function(t){return Promise.all(c?t.scripts.map((function(t){return e=t,r="script",new Promise((function(t,o){if(document.querySelector('link[rel="prefetch"][href^="'.concat(e,'"]')))return t();n=document.createElement("link"),r&&(n.as=r),n.rel="prefetch",n.crossOrigin=void 0,n.onload=t,n.onerror=o,n.href=e,document.head.appendChild(n)}));var e,r,n})):[])})).then((function(){(0,u.requestIdleCallback)((function(){return n.loadRoute(e)}))})).catch((function(){}))}}};e.default=v},Nsbk:function(t,e){function r(e){return t.exports=r=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},r(e)}t.exports=r},PJYZ:function(t,e){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}},Qetd:function(t,e,r){"use strict";var n=Object.assign.bind(Object);t.exports=n,t.exports.default=t.exports},SksO:function(t,e){function r(e,n){return t.exports=r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},r(e,n)}t.exports=r},TqRt:function(t,e){t.exports=function(t){return t&&t.__esModule?t:{default:t}}},W8MJ:function(t,e){function r(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r>>0,1)},emit:function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o-1||r>-1)&&(t=t.substring(0,e>-1?e:r)),t}function k(t){return""===(t=P(t))||t.startsWith("/")}function S(t){return function(t,e){return e&&t.startsWith("/")?"/"===t?(0,s.normalizePathTrailingSlash)(e):"".concat(e).concat("/"===P(t)?t.substring(1):t):t}(t,"")}function E(t){return(t=t.slice("".length)).startsWith("/")||(t="/".concat(t)),t}function R(t){if(t.startsWith("/")||t.startsWith("#"))return!0;try{var e=(0,h.getLocationOrigin)(),r=new URL(t,e);return r.origin===e&&k(r.pathname)}catch(n){return!1}}function L(t,e,r){var n="",o=(0,g.getRouteRegex)(t),a=o.groups,i=(e!==t?(0,m.getRouteMatcher)(o)(e):"")||r;n=t;var u=Object.keys(a);return u.every((function(t){var e=i[t]||"",r=a[t],o=r.repeat,u=r.optional,s="[".concat(o?"...":"").concat(t,"]");return u&&(s="".concat(e?"":"/","[").concat(s,"]")),o&&!Array.isArray(e)&&(e=[e]),(u||t in i)&&(n=n.replace(s,o?e.map((function(t){return encodeURIComponent(t)})).join("/"):encodeURIComponent(e))||"/")}))||(n=""),{params:u,result:n}}function O(t,e){var r={};return Object.keys(t).forEach((function(n){e.includes(n)||(r[n]=t[n])})),r}function C(t,e,r){var n=new URL(t,"http://n"),o="string"===typeof e?e:(0,h.formatWithValidation)(e);if(!R(o))return r?[o]:o;try{var a=new URL(o,n);a.pathname=(0,s.normalizePathTrailingSlash)(a.pathname);var i="";if((0,p.isDynamicRoute)(a.pathname)&&a.searchParams&&r){var u=(0,v.searchParamsToUrlQuery)(a.searchParams),c=L(a.pathname,a.pathname,u),l=c.result,f=c.params;l&&(i=(0,h.formatWithValidation)({pathname:l,hash:a.hash,query:O(u,f)}))}var d=a.origin===n.origin?a.href.slice(a.origin.length):a.href;return r?[d,i||d]:d}catch(y){return r?[o]:o}}function I(t){var e=(0,h.getLocationOrigin)();return t.startsWith(e)?t.substring(e.length):t}function j(t,e,r){var n=C(t.pathname,e,!0),o=u(n,2),a=o[0],i=o[1],s=(0,h.getLocationOrigin)(),c=a.startsWith(s),l=i&&i.startsWith(s);a=I(a),i=i?I(i):i;var f=c?a:S(a),p=r?I(C(t.pathname,r)):i||a;return{url:f,as:l?p:S(p)}}function T(t,e){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=t.pathname,o=(0,s.removePathTrailingSlash)((0,l.denormalizePagePath)(r?E(n):n));return"/404"===o||"/_error"===o||(e.includes(o)||e.some((function(e){if((0,p.isDynamicRoute)(e)&&(0,g.getRouteRegex)(e).re.test(o))return t.pathname=r?S(e):e,!0})),t.pathname=(0,s.removePathTrailingSlash)(t.pathname)),t}var A=Symbol("SSG_DATA_NOT_FOUND");function D(t,e){return fetch(t,{credentials:"same-origin"}).then((function(r){if(!r.ok){if(e>1&&r.status>=500)return D(t,e-1);if(404===r.status)return r.json().then((function(t){if(t.notFound)return{notFound:A};throw new Error("Failed to load static props")}));throw new Error("Failed to load static props")}return r.json()}))}function M(t,e){return D(t,e?3:1).catch((function(t){throw e||(0,c.markAssetError)(t),t}))}var N=function(){function t(e,r,n,o){var i=this,u=o.initialProps,c=o.pageLoader,l=o.App,f=o.wrapApp,v=o.Component,y=o.err,m=o.subscription,g=o.isFallback,w=o.locale,b=(o.locales,o.defaultLocale,o.domainLocales,o.isPreview);a(this,t),this.route=void 0,this.pathname=void 0,this.query=void 0,this.asPath=void 0,this.basePath=void 0,this.components=void 0,this.sdc={},this.sdr={},this.sub=void 0,this.clc=void 0,this.pageLoader=void 0,this._bps=void 0,this.events=void 0,this._wrapApp=void 0,this.isSsr=void 0,this.isFallback=void 0,this._inFlightRoute=void 0,this._shallow=void 0,this.locale=void 0,this.locales=void 0,this.defaultLocale=void 0,this.domainLocales=void 0,this.isReady=void 0,this.isPreview=void 0,this.isLocaleDomain=void 0,this._idx=0,this.onPopState=function(t){var e=t.state;if(e){if(e.__N){var r=e.url,n=e.as,o=e.options,a=e.idx;i._idx=a;var u=(0,d.parseRelativeUrl)(r).pathname;i.isSsr&&n===i.asPath&&u===i.pathname||i._bps&&!i._bps(e)||i.change("replaceState",r,n,Object.assign({},o,{shallow:o.shallow&&i._shallow,locale:o.locale||i.defaultLocale}),undefined)}}else{var s=i.pathname,c=i.query;i.changeState("replaceState",(0,h.formatWithValidation)({pathname:S(s),query:c}),(0,h.getURL)())}},this.route=(0,s.removePathTrailingSlash)(e),this.components={},"/_error"!==e&&(this.components[this.route]={Component:v,initial:!0,props:u,err:y,__N_SSG:u&&u.__N_SSG,__N_SSP:u&&u.__N_SSP}),this.components["/_app"]={Component:l,styleSheets:[]},this.events=t.events,this.pageLoader=c,this.pathname=e,this.query=r;var _=(0,p.isDynamicRoute)(e)&&self.__NEXT_DATA__.autoExport;this.asPath=_?e:n,this.basePath="",this.sub=m,this.clc=null,this._wrapApp=f,this.isSsr=!0,this.isFallback=g,this.isReady=!(!self.__NEXT_DATA__.gssp&&!self.__NEXT_DATA__.gip&&(_||self.location.search)),this.isPreview=!!b,this.isLocaleDomain=!1,"//"!==n.substr(0,2)&&this.changeState("replaceState",(0,h.formatWithValidation)({pathname:S(e),query:r}),(0,h.getURL)(),{locale:w}),window.addEventListener("popstate",this.onPopState)}return i(t,[{key:"reload",value:function(){window.location.reload()}},{key:"back",value:function(){window.history.back()}},{key:"push",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};var n=j(this,t,e);return t=n.url,e=n.as,this.change("pushState",t,e,r)}},{key:"replace",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=j(this,t,e);return t=n.url,e=n.as,this.change("replaceState",t,e,r)}},{key:"change",value:function(){var e=o(n.mark((function e(r,o,a,i,u){var l,f,v,y,w,b,P,C,I,D,M,N,U,W,q,F,G,B,H,V,X,z,J,Y,$,Q,Z,K,tt,et,rt,nt,ot,at,it;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(R(o)){e.next=3;break}return window.location.href=o,e.abrupt("return",!1);case 3:i._h&&(this.isReady=!0),i.scroll=!(null!=(l=i.scroll)&&!l),f=i.locale!==this.locale,e.next=18;break;case 18:if(i._h||(this.isSsr=!1),h.ST&&performance.mark("routeChange"),v=i.shallow,y={shallow:void 0!==v&&v},this._inFlightRoute&&this.abortComponentLoad(this._inFlightRoute,y),a=S(_(k(a)?E(a):a,i.locale,this.defaultLocale)),w=x(k(a)?E(a):a,this.locale),this._inFlightRoute=a,i._h||!this.onlyAHashChange(w)){e.next=34;break}return this.asPath=w,t.events.emit("hashChangeStart",a,y),this.changeState(r,o,a,i),this.scrollToHash(w),this.notify(this.components[this.route],null),t.events.emit("hashChangeComplete",a,y),e.abrupt("return",!0);case 34:return b=(0,d.parseRelativeUrl)(o),C=(P=b).pathname,I=P.query,e.prev=36,e.next=39,this.pageLoader.getPageList();case 39:return D=e.sent,e.next=42,(0,c.getClientBuildManifest)();case 42:M=e.sent,M.__rewrites,e.next=50;break;case 46:return e.prev=46,e.t0=e.catch(36),window.location.href=a,e.abrupt("return",!1);case 50:if((b=T(b,D)).pathname!==C&&(C=b.pathname,o=(0,h.formatWithValidation)(b)),C=C?(0,s.removePathTrailingSlash)(E(C)):C,this.urlIsNew(w)||f||(r="replaceState"),N=(0,s.removePathTrailingSlash)(C),U=a,R(a)){e.next=62;break}e.next=60;break;case 60:return window.location.href=a,e.abrupt("return",!1);case 62:if(U=x(E(U),this.locale),!(0,p.isDynamicRoute)(N)){e.next=78;break}if(W=(0,d.parseRelativeUrl)(U),q=W.pathname,F=(0,g.getRouteRegex)(N),G=(0,m.getRouteMatcher)(F)(q),H=(B=N===q)?L(N,q,I):{},G&&(!B||H.result)){e.next=77;break}if(!((V=Object.keys(F.groups).filter((function(t){return!I[t]}))).length>0)){e.next=75;break}throw new Error((B?"The provided `href` (".concat(o,") value is missing query values (").concat(V.join(", "),") to be interpolated properly. "):"The provided `as` value (".concat(q,") is incompatible with the `href` value (").concat(N,"). "))+"Read more: https://err.sh/vercel/next.js/".concat(B?"href-interpolation-failed":"incompatible-href-as"));case 75:e.next=78;break;case 77:B?a=(0,h.formatWithValidation)(Object.assign({},W,{pathname:H.result,query:O(I,H.params)})):Object.assign(I,G);case 78:return t.events.emit("routeChangeStart",a,y),e.prev=79,e.next=82,this.getRouteInfo(N,C,I,a,U,y);case 82:if(J=e.sent,$=(Y=J).error,Q=Y.props,Z=Y.__N_SSG,K=Y.__N_SSP,!Z&&!K||!Q){e.next=109;break}if(!Q.pageProps||!Q.pageProps.__N_REDIRECT){e.next=95;break}if(!(tt=Q.pageProps.__N_REDIRECT).startsWith("/")){e.next=93;break}if(T(et=(0,d.parseRelativeUrl)(tt),D,!1),!D.includes(et.pathname)){e.next=93;break}return rt=j(this,tt,tt),nt=rt.url,ot=rt.as,e.abrupt("return",this.change(r,nt,ot,i));case 93:return window.location.href=tt,e.abrupt("return",new Promise((function(){})));case 95:if(this.isPreview=!!Q.__N_PREVIEW,Q.notFound!==A){e.next=109;break}return e.prev=97,e.next=100,this.fetchComponent("/404");case 100:at="/404",e.next=106;break;case 103:e.prev=103,e.t1=e.catch(97),at="/_error";case 106:return e.next=108,this.getRouteInfo(at,at,I,a,U,{shallow:!1});case 108:J=e.sent;case 109:return t.events.emit("beforeHistoryChange",a,y),this.changeState(r,o,a,i),it=i.shallow&&this.route===N,i._h&&"/_error"===C&&500===(null==(X=self.__NEXT_DATA__.props)||null==(z=X.pageProps)?void 0:z.statusCode)&&null!=Q&&Q.pageProps&&(Q.pageProps.statusCode=500),e.next=116,this.set(N,C,I,w,J,u||(it||!i.scroll?null:{x:0,y:0})).catch((function(t){if(!t.cancelled)throw t;$=$||t}));case 116:if(!$){e.next=119;break}throw t.events.emit("routeChangeError",$,w,y),$;case 119:return t.events.emit("routeChangeComplete",a,y),e.abrupt("return",!0);case 124:if(e.prev=124,e.t2=e.catch(79),!e.t2.cancelled){e.next=128;break}return e.abrupt("return",!1);case 128:throw e.t2;case 129:case"end":return e.stop()}}),e,this,[[36,46],[79,124],[97,103]])})));return function(t,r,n,o,a){return e.apply(this,arguments)}}()},{key:"changeState",value:function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};"pushState"===t&&(0,h.getURL)()===r||(this._shallow=n.shallow,window.history[t]({url:e,as:r,options:n,__N:!0,idx:this._idx="pushState"!==t?this._idx:this._idx+1},"",r))}},{key:"handleRouteInfoError",value:function(){var e=o(n.mark((function e(r,o,a,i,u,s){var l,f,h,p;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!r.cancelled){e.next=2;break}throw r;case 2:if(!(0,c.isAssetError)(r)&&!s){e.next=6;break}throw t.events.emit("routeChangeError",r,i,u),window.location.href=i,b();case 6:if(e.prev=6,"undefined"!==typeof l&&"undefined"!==typeof f){e.next=14;break}return e.next=11,this.fetchComponent("/_error");case 11:h=e.sent,l=h.page,f=h.styleSheets;case 14:if((p={props:undefined,Component:l,styleSheets:f,err:r,error:r}).props){e.next=26;break}return e.prev=16,e.next=19,this.getInitialProps(l,{err:r,pathname:o,query:a});case 19:p.props=e.sent,e.next=26;break;case 22:e.prev=22,e.t0=e.catch(16),console.error("Error in error page `getInitialProps`: ",e.t0),p.props={};case 26:return e.abrupt("return",p);case 29:return e.prev=29,e.t1=e.catch(6),e.abrupt("return",this.handleRouteInfoError(e.t1,o,a,i,u,!0));case 32:case"end":return e.stop()}}),e,this,[[6,29],[16,22]])})));return function(t,r,n,o,a,i){return e.apply(this,arguments)}}()},{key:"getRouteInfo",value:function(){var t=o(n.mark((function t(e,r,o,a,i,u){var s,c,l,f,p,d,v,y,m=this;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,s=this.components[e],!u.shallow||!s||this.route!==e){t.next=4;break}return t.abrupt("return",s);case 4:if(!(c=s&&"initial"in s?void 0:s)){t.next=9;break}t.t0=c,t.next=12;break;case 9:return t.next=11,this.fetchComponent(e).then((function(t){return{Component:t.page,styleSheets:t.styleSheets,__N_SSG:t.mod.__N_SSG,__N_SSP:t.mod.__N_SSP}}));case 11:t.t0=t.sent;case 12:l=t.t0,f=l.Component,p=l.__N_SSG,d=l.__N_SSP,t.next=18;break;case 18:return(p||d)&&(v=this.pageLoader.getDataHref((0,h.formatWithValidation)({pathname:r,query:o}),i,p,this.locale)),t.next=21,this._getData((function(){return p?m._getStaticData(v):d?m._getServerData(v):m.getInitialProps(f,{pathname:r,query:o,asPath:a})}));case 21:return y=t.sent,l.props=y,this.components[e]=l,t.abrupt("return",l);case 27:return t.prev=27,t.t1=t.catch(0),t.abrupt("return",this.handleRouteInfoError(t.t1,r,o,a,u));case 30:case"end":return t.stop()}}),t,this,[[0,27]])})));return function(e,r,n,o,a,i){return t.apply(this,arguments)}}()},{key:"set",value:function(t,e,r,n,o,a){return this.isFallback=!1,this.route=t,this.pathname=e,this.query=r,this.asPath=n,this.notify(o,a)}},{key:"beforePopState",value:function(t){this._bps=t}},{key:"onlyAHashChange",value:function(t){if(!this.asPath)return!1;var e=this.asPath.split("#"),r=u(e,2),n=r[0],o=r[1],a=t.split("#"),i=u(a,2),s=i[0],c=i[1];return!(!c||n!==s||o!==c)||n===s&&o!==c}},{key:"scrollToHash",value:function(t){var e=t.split("#"),r=u(e,2)[1];if(""!==r&&"top"!==r){var n=document.getElementById(r);if(n)n.scrollIntoView();else{var o=document.getElementsByName(r)[0];o&&o.scrollIntoView()}}else window.scrollTo(0,0)}},{key:"urlIsNew",value:function(t){return this.asPath!==t}},{key:"prefetch",value:function(){var t=o(n.mark((function t(e){var r,o,a,i,u,c,l,f,p,v,m=this,g=arguments;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=g.length>1&&void 0!==g[1]?g[1]:e,o=g.length>2&&void 0!==g[2]?g[2]:{},a=(0,d.parseRelativeUrl)(e),i=a.pathname,t.next=7,this.pageLoader.getPageList();case 7:u=t.sent,(a=T(a,u,!1)).pathname!==i&&(i=a.pathname,e=(0,h.formatWithValidation)(a)),c=(0,s.removePathTrailingSlash)(i),l=r,t.next=19;break;case 15:p=t.sent,f=p.__rewrites,(v=(0,y.default)(S(_(E(r),this.locale)),u,f,a.query,(function(t){return T({pathname:t},u).pathname}),this.locales)).matchedPage&&v.resolvedHref&&(c=v.resolvedHref,i=v.resolvedHref,a.pathname=i,e=(0,h.formatWithValidation)(a),l=v.asPath);case 19:t.next=21;break;case 21:return t.next=23,Promise.all([this.pageLoader._isSsg(e).then((function(t){return!!t&&m._getStaticData(m.pageLoader.getDataHref(e,l,!0,"undefined"!==typeof o.locale?o.locale:m.locale))})),this.pageLoader[o.priority?"loadPage":"prefetch"](c)]);case 23:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"fetchComponent",value:function(){var t=o(n.mark((function t(e){var r,o,a,i;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=!1,o=this.clc=function(){r=!0},t.next=4,this.pageLoader.loadPage(e);case 4:if(a=t.sent,!r){t.next=9;break}throw(i=new Error('Abort fetching component for route: "'.concat(e,'"'))).cancelled=!0,i;case 9:return o===this.clc&&(this.clc=null),t.abrupt("return",a);case 11:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"_getData",value:function(t){var e=this,r=!1,n=function(){r=!0};return this.clc=n,t().then((function(t){if(n===e.clc&&(e.clc=null),r){var o=new Error("Loading initial props cancelled");throw o.cancelled=!0,o}return t}))}},{key:"_getStaticData",value:function(t){var e=this,r=new URL(t,window.location.href).href;return!this.isPreview&&this.sdc[r]?Promise.resolve(this.sdc[r]):M(t,this.isSsr).then((function(t){return e.sdc[r]=t,t}))}},{key:"_getServerData",value:function(t){var e=this,r=new URL(t,window.location.href).href;return this.sdr[r]?this.sdr[r]:this.sdr[r]=M(t,this.isSsr).then((function(t){return delete e.sdr[r],t})).catch((function(t){throw delete e.sdr[r],t}))}},{key:"getInitialProps",value:function(t,e){var r=this.components["/_app"].Component,n=this._wrapApp(r);return e.AppTree=n,(0,h.loadGetInitialProps)(r,{AppTree:n,Component:t,router:this,ctx:e})}},{key:"abortComponentLoad",value:function(e,r){this.clc&&(t.events.emit("routeChangeError",b(),e,r),this.clc(),this.clc=null)}},{key:"notify",value:function(t,e){return this.sub(t,this.components["/_app"].Component,e)}}]),t}();e.default=N,N.events=(0,f.default)()},"g/15":function(t,e,r){"use strict";var n=r("o0o1"),o=r("yXPU");e.__esModule=!0,e.execOnce=function(t){var e,r=!1;return function(){return r||(r=!0,e=t.apply(void 0,arguments)),e}},e.getLocationOrigin=i,e.getURL=function(){var t=window.location.href,e=i();return t.substring(e.length)},e.getDisplayName=u,e.isResSent=s,e.loadGetInitialProps=c,e.formatWithValidation=function(t){0;return(0,a.formatUrl)(t)},e.ST=e.SP=e.urlObjectKeys=void 0;var a=r("6D7l");function i(){var t=window.location,e=t.protocol,r=t.hostname,n=t.port;return"".concat(e,"//").concat(r).concat(n?":"+n:"")}function u(t){return"string"===typeof t?t:t.displayName||t.name||"Unknown"}function s(t){return t.finished||t.headersSent}function c(t,e){return l.apply(this,arguments)}function l(){return(l=o(n.mark((function t(e,r){var o,a,i;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:t.next=4;break;case 4:if(o=r.res||r.ctx&&r.ctx.res,e.getInitialProps){t.next=12;break}if(!r.ctx||!r.Component){t.next=11;break}return t.next=9,c(r.Component,r.ctx);case 9:return t.t0=t.sent,t.abrupt("return",{pageProps:t.t0});case 11:return t.abrupt("return",{});case 12:return t.next=14,e.getInitialProps(r);case 14:if(a=t.sent,!o||!s(o)){t.next=17;break}return t.abrupt("return",a);case 17:if(a){t.next=20;break}throw i='"'.concat(u(e),'.getInitialProps()" should resolve to an object. But found "').concat(a,'" instead.'),new Error(i);case 20:return t.abrupt("return",a);case 22:case"end":return t.stop()}}),t)})))).apply(this,arguments)}e.urlObjectKeys=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];var f="undefined"!==typeof performance;e.SP=f;var h=f&&"function"===typeof performance.mark&&"function"===typeof performance.measure;e.ST=h},gguc:function(t,e,r){"use strict";e.__esModule=!0,e.getRouteMatcher=function(t){var e=t.re,r=t.groups;return function(t){var n=e.exec(t);if(!n)return!1;var o=function(t){try{return decodeURIComponent(t)}catch(r){var e=new Error("failed to decode param");throw e.code="DECODE_FAILED",e}},a={};return Object.keys(r).forEach((function(t){var e=r[t],i=n[e.pos];void 0!==i&&(a[t]=~i.indexOf("/")?i.split("/").map((function(t){return o(t)})):e.repeat?[o(i)]:o(i))})),a}}},hS4m:function(t,e,r){"use strict";e.__esModule=!0,e.parseRelativeUrl=function(t,e){var r=new URL((0,n.getLocationOrigin)()),a=e?new URL(e,r):r,i=new URL(t,a),u=i.pathname,s=i.searchParams,c=i.search,l=i.hash,f=i.href;if(i.origin!==r.origin)throw new Error("invariant: invalid relative URL, router received ".concat(t));return{pathname:u,query:(0,o.searchParamsToUrlQuery)(s),search:c,hash:l,href:f.slice(r.origin.length)}};var n=r("g/15"),o=r("3WeD")},ls82:function(t,e,r){var n=function(t){"use strict";var e,r=Object.prototype,n=r.hasOwnProperty,o="function"===typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(I){s=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var o=e&&e.prototype instanceof y?e:y,a=Object.create(o.prototype),i=new L(n||[]);return a._invoke=function(t,e,r){var n=f;return function(o,a){if(n===p)throw new Error("Generator is already running");if(n===d){if("throw"===o)throw a;return C()}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var u=S(i,r);if(u){if(u===v)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===f)throw n=d,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=p;var s=l(t,e,r);if("normal"===s.type){if(n=r.done?d:h,s.arg===v)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n=d,r.method="throw",r.arg=s.arg)}}}(t,r,i),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(I){return{type:"throw",arg:I}}}t.wrap=c;var f="suspendedStart",h="suspendedYield",p="executing",d="completed",v={};function y(){}function m(){}function g(){}var w={};w[a]=function(){return this};var b=Object.getPrototypeOf,_=b&&b(b(O([])));_&&_!==r&&n.call(_,a)&&(w=_);var x=g.prototype=y.prototype=Object.create(w);function P(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function k(t,e){function r(o,a,i,u){var s=l(t[o],t,a);if("throw"!==s.type){var c=s.arg,f=c.value;return f&&"object"===typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,i,u)}),(function(t){r("throw",t,i,u)})):e.resolve(f).then((function(t){c.value=t,i(c)}),(function(t){return r("throw",t,i,u)}))}u(s.arg)}var o;this._invoke=function(t,n){function a(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(a,a):a()}}function S(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,S(t,r),"throw"===r.method))return v;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=l(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,v;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function R(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function O(t){if(t){var r=t[a];if(r)return r.call(t);if("function"===typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--a){var i=this.tryEntries[a],u=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(s&&c){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),R(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;R(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:O(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}(t.exports);try{regeneratorRuntime=n}catch(o){Function("r","regeneratorRuntime = r")(n)}},lwsE:function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},m0LI:function(t,e){t.exports=function(t,e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t)){var r=[],n=!0,o=!1,a=void 0;try{for(var i,u=t[Symbol.iterator]();!(n=(i=u.next()).done)&&(r.push(i.value),!e||r.length!==e);n=!0);}catch(s){o=!0,a=s}finally{try{n||null==u.return||u.return()}finally{if(o)throw a}}return r}}},nOHt:function(t,e,r){"use strict";var n=r("sXyB");function o(t,e){var r;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"===typeof t)return a(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return a(t,e)}(t))||e&&t&&"number"===typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,u=!0,s=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return u=t.done,t},e:function(t){s=!0,i=t},f:function(){try{u||null==r.return||r.return()}finally{if(s)throw i}}}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r1?e-1:0),n=1;n1&&void 0!==arguments[1]?arguments[1]:"",r="/"===t?"/index":/^\/index(\/|$)/.test(t)?"/index".concat(t):"".concat(t);return r+e}},Nh2W:function(t,e,r){"use strict";var n=r("o0o1"),o=r("J4zp"),a=r("yXPU"),i=r("TqRt");e.__esModule=!0,e.markAssetError=f,e.isAssetError=function(t){return t&&l in t},e.getClientBuildManifest=p,e.default=void 0;i(r("Lab5"));var u=r("0G5g");function s(t,e,r){var n,o=e.get(t);if(o)return"future"in o?o.future:Promise.resolve(o);var a=new Promise((function(t){n=t}));return e.set(t,o={resolve:n,future:a}),r?r().then((function(t){return n(t),t})):a}var c=function(t){try{return t=document.createElement("link"),!!window.MSInputMethodContext&&!!document.documentMode||t.relList.supports("prefetch")}catch(e){return!1}}();var l=Symbol("ASSET_LOAD_ERROR");function f(t){return Object.defineProperty(t,l,{})}function h(t,e,r){return new Promise((function(n,o){var a=!1;t.then((function(t){a=!0,n(t)})).catch(o),(0,u.requestIdleCallback)((function(){return setTimeout((function(){a||o(r)}),e)}))}))}function p(){return self.__BUILD_MANIFEST?Promise.resolve(self.__BUILD_MANIFEST):h(new Promise((function(t){var e=self.__BUILD_MANIFEST_CB;self.__BUILD_MANIFEST_CB=function(){t(self.__BUILD_MANIFEST),e&&e()}})),3800,f(new Error("Failed to load client build manifest")))}function d(t,e){return p().then((function(r){if(!(e in r))throw f(new Error("Failed to lookup route: ".concat(e)));var n=r[e].map((function(e){return t+"https://cdn.statically.io/gh/HiltonWS/hiltonws.github.io/1.1.1/smile/"+encodeURI(e)}));return{scripts:n.filter((function(t){return t.endsWith(".js")})),css:n.filter((function(t){return t.endsWith(".css")}))}}))}var v=function(t){var e=new Map,r=new Map,i=new Map,l=new Map;function p(t){var e=r.get(t);return e||(document.querySelector('script[src^="'.concat(t,'"]'))?Promise.resolve():(r.set(t,e=function(t,e){return new Promise((function(r,n){(e=document.createElement("script")).onload=r,e.onerror=function(){return n(f(new Error("Failed to load script: ".concat(t))))},e.crossOrigin=void 0,e.src=t,document.body.appendChild(e)}))}(t)),e))}function v(t){var e=i.get(t);return e||(i.set(t,e=fetch(t).then((function(e){if(!e.ok)throw new Error("Failed to load stylesheet: ".concat(t));return e.text().then((function(e){return{href:t,content:e}}))})).catch((function(t){throw f(t)}))),e)}return{whenEntrypoint:function(t){return s(t,e)},onEntrypoint:function(t,r){Promise.resolve(r).then((function(t){return t()})).then((function(t){return{component:t&&t.default||t,exports:t}}),(function(t){return{error:t}})).then((function(r){var n=e.get(t);e.set(t,r),n&&"resolve"in n&&n.resolve(r)}))},loadRoute:function(r){var i=this;return s(r,l,a(n.mark((function a(){var u,s,c,l,y,m,g,w;return n.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,d(t,r);case 3:return u=n.sent,s=u.scripts,c=u.css,n.next=8,Promise.all([e.has(r)?[]:Promise.all(s.map(p)),Promise.all(c.map(v))]);case 8:return l=n.sent,y=o(l,2),m=y[1],n.next=13,h(i.whenEntrypoint(r),3800,f(new Error("Route did not complete loading: ".concat(r))));case 13:return g=n.sent,w=Object.assign({styles:m},g),n.abrupt("return","error"in g?g:w);case 18:return n.prev=18,n.t0=n.catch(0),n.abrupt("return",{error:n.t0});case 21:case"end":return n.stop()}}),a,null,[[0,18]])}))))},prefetch:function(e){var r,n=this;return(r=navigator.connection)&&(r.saveData||/2g/.test(r.effectiveType))?Promise.resolve():d(t,e).then((function(t){return Promise.all(c?t.scripts.map((function(t){return e=t,r="script",new Promise((function(t,o){if(document.querySelector('link[rel="prefetch"][href^="'.concat(e,'"]')))return t();n=document.createElement("link"),r&&(n.as=r),n.rel="prefetch",n.crossOrigin=void 0,n.onload=t,n.onerror=o,n.href=e,document.head.appendChild(n)}));var e,r,n})):[])})).then((function(){(0,u.requestIdleCallback)((function(){return n.loadRoute(e)}))})).catch((function(){}))}}};e.default=v},Nsbk:function(t,e){function r(e){return t.exports=r=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},r(e)}t.exports=r},PJYZ:function(t,e){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}},Qetd:function(t,e,r){"use strict";var n=Object.assign.bind(Object);t.exports=n,t.exports.default=t.exports},SksO:function(t,e){function r(e,n){return t.exports=r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},r(e,n)}t.exports=r},TqRt:function(t,e){t.exports=function(t){return t&&t.__esModule?t:{default:t}}},W8MJ:function(t,e){function r(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r>>0,1)},emit:function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o-1||r>-1)&&(t=t.substring(0,e>-1?e:r)),t}function k(t){return""===(t=P(t))||t.startsWith("/")}function S(t){return function(t,e){return e&&t.startsWith("/")?"/"===t?(0,s.normalizePathTrailingSlash)(e):"".concat(e).concat("/"===P(t)?t.substring(1):t):t}(t,"")}function E(t){return(t=t.slice("".length)).startsWith("/")||(t="/".concat(t)),t}function R(t){if(t.startsWith("/")||t.startsWith("#"))return!0;try{var e=(0,h.getLocationOrigin)(),r=new URL(t,e);return r.origin===e&&k(r.pathname)}catch(n){return!1}}function L(t,e,r){var n="",o=(0,g.getRouteRegex)(t),a=o.groups,i=(e!==t?(0,m.getRouteMatcher)(o)(e):"")||r;n=t;var u=Object.keys(a);return u.every((function(t){var e=i[t]||"",r=a[t],o=r.repeat,u=r.optional,s="[".concat(o?"...":"").concat(t,"]");return u&&(s="".concat(e?"":"/","[").concat(s,"]")),o&&!Array.isArray(e)&&(e=[e]),(u||t in i)&&(n=n.replace(s,o?e.map((function(t){return encodeURIComponent(t)})).join("/"):encodeURIComponent(e))||"/")}))||(n=""),{params:u,result:n}}function O(t,e){var r={};return Object.keys(t).forEach((function(n){e.includes(n)||(r[n]=t[n])})),r}function C(t,e,r){var n=new URL(t,"http://n"),o="string"===typeof e?e:(0,h.formatWithValidation)(e);if(!R(o))return r?[o]:o;try{var a=new URL(o,n);a.pathname=(0,s.normalizePathTrailingSlash)(a.pathname);var i="";if((0,p.isDynamicRoute)(a.pathname)&&a.searchParams&&r){var u=(0,v.searchParamsToUrlQuery)(a.searchParams),c=L(a.pathname,a.pathname,u),l=c.result,f=c.params;l&&(i=(0,h.formatWithValidation)({pathname:l,hash:a.hash,query:O(u,f)}))}var d=a.origin===n.origin?a.href.slice(a.origin.length):a.href;return r?[d,i||d]:d}catch(y){return r?[o]:o}}function I(t){var e=(0,h.getLocationOrigin)();return t.startsWith(e)?t.substring(e.length):t}function j(t,e,r){var n=C(t.pathname,e,!0),o=u(n,2),a=o[0],i=o[1],s=(0,h.getLocationOrigin)(),c=a.startsWith(s),l=i&&i.startsWith(s);a=I(a),i=i?I(i):i;var f=c?a:S(a),p=r?I(C(t.pathname,r)):i||a;return{url:f,as:l?p:S(p)}}function T(t,e){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=t.pathname,o=(0,s.removePathTrailingSlash)((0,l.denormalizePagePath)(r?E(n):n));return"/404"===o||"/_error"===o||(e.includes(o)||e.some((function(e){if((0,p.isDynamicRoute)(e)&&(0,g.getRouteRegex)(e).re.test(o))return t.pathname=r?S(e):e,!0})),t.pathname=(0,s.removePathTrailingSlash)(t.pathname)),t}var A=Symbol("SSG_DATA_NOT_FOUND");function D(t,e){return fetch(t,{credentials:"same-origin"}).then((function(r){if(!r.ok){if(e>1&&r.status>=500)return D(t,e-1);if(404===r.status)return r.json().then((function(t){if(t.notFound)return{notFound:A};throw new Error("Failed to load static props")}));throw new Error("Failed to load static props")}return r.json()}))}function M(t,e){return D(t,e?3:1).catch((function(t){throw e||(0,c.markAssetError)(t),t}))}var N=function(){function t(e,r,n,o){var i=this,u=o.initialProps,c=o.pageLoader,l=o.App,f=o.wrapApp,v=o.Component,y=o.err,m=o.subscription,g=o.isFallback,w=o.locale,b=(o.locales,o.defaultLocale,o.domainLocales,o.isPreview);a(this,t),this.route=void 0,this.pathname=void 0,this.query=void 0,this.asPath=void 0,this.basePath=void 0,this.components=void 0,this.sdc={},this.sdr={},this.sub=void 0,this.clc=void 0,this.pageLoader=void 0,this._bps=void 0,this.events=void 0,this._wrapApp=void 0,this.isSsr=void 0,this.isFallback=void 0,this._inFlightRoute=void 0,this._shallow=void 0,this.locale=void 0,this.locales=void 0,this.defaultLocale=void 0,this.domainLocales=void 0,this.isReady=void 0,this.isPreview=void 0,this.isLocaleDomain=void 0,this._idx=0,this.onPopState=function(t){var e=t.state;if(e){if(e.__N){var r=e.url,n=e.as,o=e.options,a=e.idx;i._idx=a;var u=(0,d.parseRelativeUrl)(r).pathname;i.isSsr&&n===i.asPath&&u===i.pathname||i._bps&&!i._bps(e)||i.change("replaceState",r,n,Object.assign({},o,{shallow:o.shallow&&i._shallow,locale:o.locale||i.defaultLocale}),undefined)}}else{var s=i.pathname,c=i.query;i.changeState("replaceState",(0,h.formatWithValidation)({pathname:S(s),query:c}),(0,h.getURL)())}},this.route=(0,s.removePathTrailingSlash)(e),this.components={},"/_error"!==e&&(this.components[this.route]={Component:v,initial:!0,props:u,err:y,__N_SSG:u&&u.__N_SSG,__N_SSP:u&&u.__N_SSP}),this.components["/_app"]={Component:l,styleSheets:[]},this.events=t.events,this.pageLoader=c,this.pathname=e,this.query=r;var _=(0,p.isDynamicRoute)(e)&&self.__NEXT_DATA__.autoExport;this.asPath=_?e:n,this.basePath="",this.sub=m,this.clc=null,this._wrapApp=f,this.isSsr=!0,this.isFallback=g,this.isReady=!(!self.__NEXT_DATA__.gssp&&!self.__NEXT_DATA__.gip&&(_||self.location.search)),this.isPreview=!!b,this.isLocaleDomain=!1,"//"!==n.substr(0,2)&&this.changeState("replaceState",(0,h.formatWithValidation)({pathname:S(e),query:r}),(0,h.getURL)(),{locale:w}),window.addEventListener("popstate",this.onPopState)}return i(t,[{key:"reload",value:function(){window.location.reload()}},{key:"back",value:function(){window.history.back()}},{key:"push",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};var n=j(this,t,e);return t=n.url,e=n.as,this.change("pushState",t,e,r)}},{key:"replace",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=j(this,t,e);return t=n.url,e=n.as,this.change("replaceState",t,e,r)}},{key:"change",value:function(){var e=o(n.mark((function e(r,o,a,i,u){var l,f,v,y,w,b,P,C,I,D,M,N,U,W,q,F,G,B,H,V,X,z,J,Y,$,Q,Z,K,tt,et,rt,nt,ot,at,it;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(R(o)){e.next=3;break}return window.location.href=o,e.abrupt("return",!1);case 3:i._h&&(this.isReady=!0),i.scroll=!(null!=(l=i.scroll)&&!l),f=i.locale!==this.locale,e.next=18;break;case 18:if(i._h||(this.isSsr=!1),h.ST&&performance.mark("routeChange"),v=i.shallow,y={shallow:void 0!==v&&v},this._inFlightRoute&&this.abortComponentLoad(this._inFlightRoute,y),a=S(_(k(a)?E(a):a,i.locale,this.defaultLocale)),w=x(k(a)?E(a):a,this.locale),this._inFlightRoute=a,i._h||!this.onlyAHashChange(w)){e.next=34;break}return this.asPath=w,t.events.emit("hashChangeStart",a,y),this.changeState(r,o,a,i),this.scrollToHash(w),this.notify(this.components[this.route],null),t.events.emit("hashChangeComplete",a,y),e.abrupt("return",!0);case 34:return b=(0,d.parseRelativeUrl)(o),C=(P=b).pathname,I=P.query,e.prev=36,e.next=39,this.pageLoader.getPageList();case 39:return D=e.sent,e.next=42,(0,c.getClientBuildManifest)();case 42:M=e.sent,M.__rewrites,e.next=50;break;case 46:return e.prev=46,e.t0=e.catch(36),window.location.href=a,e.abrupt("return",!1);case 50:if((b=T(b,D)).pathname!==C&&(C=b.pathname,o=(0,h.formatWithValidation)(b)),C=C?(0,s.removePathTrailingSlash)(E(C)):C,this.urlIsNew(w)||f||(r="replaceState"),N=(0,s.removePathTrailingSlash)(C),U=a,R(a)){e.next=62;break}e.next=60;break;case 60:return window.location.href=a,e.abrupt("return",!1);case 62:if(U=x(E(U),this.locale),!(0,p.isDynamicRoute)(N)){e.next=78;break}if(W=(0,d.parseRelativeUrl)(U),q=W.pathname,F=(0,g.getRouteRegex)(N),G=(0,m.getRouteMatcher)(F)(q),H=(B=N===q)?L(N,q,I):{},G&&(!B||H.result)){e.next=77;break}if(!((V=Object.keys(F.groups).filter((function(t){return!I[t]}))).length>0)){e.next=75;break}throw new Error((B?"The provided `href` (".concat(o,") value is missing query values (").concat(V.join(", "),") to be interpolated properly. "):"The provided `as` value (".concat(q,") is incompatible with the `href` value (").concat(N,"). "))+"Read more: https://err.sh/vercel/next.js/".concat(B?"href-interpolation-failed":"incompatible-href-as"));case 75:e.next=78;break;case 77:B?a=(0,h.formatWithValidation)(Object.assign({},W,{pathname:H.result,query:O(I,H.params)})):Object.assign(I,G);case 78:return t.events.emit("routeChangeStart",a,y),e.prev=79,e.next=82,this.getRouteInfo(N,C,I,a,U,y);case 82:if(J=e.sent,$=(Y=J).error,Q=Y.props,Z=Y.__N_SSG,K=Y.__N_SSP,!Z&&!K||!Q){e.next=109;break}if(!Q.pageProps||!Q.pageProps.__N_REDIRECT){e.next=95;break}if(!(tt=Q.pageProps.__N_REDIRECT).startsWith("/")){e.next=93;break}if(T(et=(0,d.parseRelativeUrl)(tt),D,!1),!D.includes(et.pathname)){e.next=93;break}return rt=j(this,tt,tt),nt=rt.url,ot=rt.as,e.abrupt("return",this.change(r,nt,ot,i));case 93:return window.location.href=tt,e.abrupt("return",new Promise((function(){})));case 95:if(this.isPreview=!!Q.__N_PREVIEW,Q.notFound!==A){e.next=109;break}return e.prev=97,e.next=100,this.fetchComponent("/404");case 100:at="/404",e.next=106;break;case 103:e.prev=103,e.t1=e.catch(97),at="/_error";case 106:return e.next=108,this.getRouteInfo(at,at,I,a,U,{shallow:!1});case 108:J=e.sent;case 109:return t.events.emit("beforeHistoryChange",a,y),this.changeState(r,o,a,i),it=i.shallow&&this.route===N,i._h&&"/_error"===C&&500===(null==(X=self.__NEXT_DATA__.props)||null==(z=X.pageProps)?void 0:z.statusCode)&&null!=Q&&Q.pageProps&&(Q.pageProps.statusCode=500),e.next=116,this.set(N,C,I,w,J,u||(it||!i.scroll?null:{x:0,y:0})).catch((function(t){if(!t.cancelled)throw t;$=$||t}));case 116:if(!$){e.next=119;break}throw t.events.emit("routeChangeError",$,w,y),$;case 119:return t.events.emit("routeChangeComplete",a,y),e.abrupt("return",!0);case 124:if(e.prev=124,e.t2=e.catch(79),!e.t2.cancelled){e.next=128;break}return e.abrupt("return",!1);case 128:throw e.t2;case 129:case"end":return e.stop()}}),e,this,[[36,46],[79,124],[97,103]])})));return function(t,r,n,o,a){return e.apply(this,arguments)}}()},{key:"changeState",value:function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};"pushState"===t&&(0,h.getURL)()===r||(this._shallow=n.shallow,window.history[t]({url:e,as:r,options:n,__N:!0,idx:this._idx="pushState"!==t?this._idx:this._idx+1},"",r))}},{key:"handleRouteInfoError",value:function(){var e=o(n.mark((function e(r,o,a,i,u,s){var l,f,h,p;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!r.cancelled){e.next=2;break}throw r;case 2:if(!(0,c.isAssetError)(r)&&!s){e.next=6;break}throw t.events.emit("routeChangeError",r,i,u),window.location.href=i,b();case 6:if(e.prev=6,"undefined"!==typeof l&&"undefined"!==typeof f){e.next=14;break}return e.next=11,this.fetchComponent("/_error");case 11:h=e.sent,l=h.page,f=h.styleSheets;case 14:if((p={props:undefined,Component:l,styleSheets:f,err:r,error:r}).props){e.next=26;break}return e.prev=16,e.next=19,this.getInitialProps(l,{err:r,pathname:o,query:a});case 19:p.props=e.sent,e.next=26;break;case 22:e.prev=22,e.t0=e.catch(16),console.error("Error in error page `getInitialProps`: ",e.t0),p.props={};case 26:return e.abrupt("return",p);case 29:return e.prev=29,e.t1=e.catch(6),e.abrupt("return",this.handleRouteInfoError(e.t1,o,a,i,u,!0));case 32:case"end":return e.stop()}}),e,this,[[6,29],[16,22]])})));return function(t,r,n,o,a,i){return e.apply(this,arguments)}}()},{key:"getRouteInfo",value:function(){var t=o(n.mark((function t(e,r,o,a,i,u){var s,c,l,f,p,d,v,y,m=this;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,s=this.components[e],!u.shallow||!s||this.route!==e){t.next=4;break}return t.abrupt("return",s);case 4:if(!(c=s&&"initial"in s?void 0:s)){t.next=9;break}t.t0=c,t.next=12;break;case 9:return t.next=11,this.fetchComponent(e).then((function(t){return{Component:t.page,styleSheets:t.styleSheets,__N_SSG:t.mod.__N_SSG,__N_SSP:t.mod.__N_SSP}}));case 11:t.t0=t.sent;case 12:l=t.t0,f=l.Component,p=l.__N_SSG,d=l.__N_SSP,t.next=18;break;case 18:return(p||d)&&(v=this.pageLoader.getDataHref((0,h.formatWithValidation)({pathname:r,query:o}),i,p,this.locale)),t.next=21,this._getData((function(){return p?m._getStaticData(v):d?m._getServerData(v):m.getInitialProps(f,{pathname:r,query:o,asPath:a})}));case 21:return y=t.sent,l.props=y,this.components[e]=l,t.abrupt("return",l);case 27:return t.prev=27,t.t1=t.catch(0),t.abrupt("return",this.handleRouteInfoError(t.t1,r,o,a,u));case 30:case"end":return t.stop()}}),t,this,[[0,27]])})));return function(e,r,n,o,a,i){return t.apply(this,arguments)}}()},{key:"set",value:function(t,e,r,n,o,a){return this.isFallback=!1,this.route=t,this.pathname=e,this.query=r,this.asPath=n,this.notify(o,a)}},{key:"beforePopState",value:function(t){this._bps=t}},{key:"onlyAHashChange",value:function(t){if(!this.asPath)return!1;var e=this.asPath.split("#"),r=u(e,2),n=r[0],o=r[1],a=t.split("#"),i=u(a,2),s=i[0],c=i[1];return!(!c||n!==s||o!==c)||n===s&&o!==c}},{key:"scrollToHash",value:function(t){var e=t.split("#"),r=u(e,2)[1];if(""!==r&&"top"!==r){var n=document.getElementById(r);if(n)n.scrollIntoView();else{var o=document.getElementsByName(r)[0];o&&o.scrollIntoView()}}else window.scrollTo(0,0)}},{key:"urlIsNew",value:function(t){return this.asPath!==t}},{key:"prefetch",value:function(){var t=o(n.mark((function t(e){var r,o,a,i,u,c,l,f,p,v,m=this,g=arguments;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=g.length>1&&void 0!==g[1]?g[1]:e,o=g.length>2&&void 0!==g[2]?g[2]:{},a=(0,d.parseRelativeUrl)(e),i=a.pathname,t.next=7,this.pageLoader.getPageList();case 7:u=t.sent,(a=T(a,u,!1)).pathname!==i&&(i=a.pathname,e=(0,h.formatWithValidation)(a)),c=(0,s.removePathTrailingSlash)(i),l=r,t.next=19;break;case 15:p=t.sent,f=p.__rewrites,(v=(0,y.default)(S(_(E(r),this.locale)),u,f,a.query,(function(t){return T({pathname:t},u).pathname}),this.locales)).matchedPage&&v.resolvedHref&&(c=v.resolvedHref,i=v.resolvedHref,a.pathname=i,e=(0,h.formatWithValidation)(a),l=v.asPath);case 19:t.next=21;break;case 21:return t.next=23,Promise.all([this.pageLoader._isSsg(e).then((function(t){return!!t&&m._getStaticData(m.pageLoader.getDataHref(e,l,!0,"undefined"!==typeof o.locale?o.locale:m.locale))})),this.pageLoader[o.priority?"loadPage":"prefetch"](c)]);case 23:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"fetchComponent",value:function(){var t=o(n.mark((function t(e){var r,o,a,i;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=!1,o=this.clc=function(){r=!0},t.next=4,this.pageLoader.loadPage(e);case 4:if(a=t.sent,!r){t.next=9;break}throw(i=new Error('Abort fetching component for route: "'.concat(e,'"'))).cancelled=!0,i;case 9:return o===this.clc&&(this.clc=null),t.abrupt("return",a);case 11:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"_getData",value:function(t){var e=this,r=!1,n=function(){r=!0};return this.clc=n,t().then((function(t){if(n===e.clc&&(e.clc=null),r){var o=new Error("Loading initial props cancelled");throw o.cancelled=!0,o}return t}))}},{key:"_getStaticData",value:function(t){var e=this,r=new URL(t,window.location.href).href;return!this.isPreview&&this.sdc[r]?Promise.resolve(this.sdc[r]):M(t,this.isSsr).then((function(t){return e.sdc[r]=t,t}))}},{key:"_getServerData",value:function(t){var e=this,r=new URL(t,window.location.href).href;return this.sdr[r]?this.sdr[r]:this.sdr[r]=M(t,this.isSsr).then((function(t){return delete e.sdr[r],t})).catch((function(t){throw delete e.sdr[r],t}))}},{key:"getInitialProps",value:function(t,e){var r=this.components["/_app"].Component,n=this._wrapApp(r);return e.AppTree=n,(0,h.loadGetInitialProps)(r,{AppTree:n,Component:t,router:this,ctx:e})}},{key:"abortComponentLoad",value:function(e,r){this.clc&&(t.events.emit("routeChangeError",b(),e,r),this.clc(),this.clc=null)}},{key:"notify",value:function(t,e){return this.sub(t,this.components["/_app"].Component,e)}}]),t}();e.default=N,N.events=(0,f.default)()},"g/15":function(t,e,r){"use strict";var n=r("o0o1"),o=r("yXPU");e.__esModule=!0,e.execOnce=function(t){var e,r=!1;return function(){return r||(r=!0,e=t.apply(void 0,arguments)),e}},e.getLocationOrigin=i,e.getURL=function(){var t=window.location.href,e=i();return t.substring(e.length)},e.getDisplayName=u,e.isResSent=s,e.loadGetInitialProps=c,e.formatWithValidation=function(t){0;return(0,a.formatUrl)(t)},e.ST=e.SP=e.urlObjectKeys=void 0;var a=r("6D7l");function i(){var t=window.location,e=t.protocol,r=t.hostname,n=t.port;return"".concat(e,"//").concat(r).concat(n?":"+n:"")}function u(t){return"string"===typeof t?t:t.displayName||t.name||"Unknown"}function s(t){return t.finished||t.headersSent}function c(t,e){return l.apply(this,arguments)}function l(){return(l=o(n.mark((function t(e,r){var o,a,i;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:t.next=4;break;case 4:if(o=r.res||r.ctx&&r.ctx.res,e.getInitialProps){t.next=12;break}if(!r.ctx||!r.Component){t.next=11;break}return t.next=9,c(r.Component,r.ctx);case 9:return t.t0=t.sent,t.abrupt("return",{pageProps:t.t0});case 11:return t.abrupt("return",{});case 12:return t.next=14,e.getInitialProps(r);case 14:if(a=t.sent,!o||!s(o)){t.next=17;break}return t.abrupt("return",a);case 17:if(a){t.next=20;break}throw i='"'.concat(u(e),'.getInitialProps()" should resolve to an object. But found "').concat(a,'" instead.'),new Error(i);case 20:return t.abrupt("return",a);case 22:case"end":return t.stop()}}),t)})))).apply(this,arguments)}e.urlObjectKeys=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];var f="undefined"!==typeof performance;e.SP=f;var h=f&&"function"===typeof performance.mark&&"function"===typeof performance.measure;e.ST=h},gguc:function(t,e,r){"use strict";e.__esModule=!0,e.getRouteMatcher=function(t){var e=t.re,r=t.groups;return function(t){var n=e.exec(t);if(!n)return!1;var o=function(t){try{return decodeURIComponent(t)}catch(r){var e=new Error("failed to decode param");throw e.code="DECODE_FAILED",e}},a={};return Object.keys(r).forEach((function(t){var e=r[t],i=n[e.pos];void 0!==i&&(a[t]=~i.indexOf("/")?i.split("/").map((function(t){return o(t)})):e.repeat?[o(i)]:o(i))})),a}}},hS4m:function(t,e,r){"use strict";e.__esModule=!0,e.parseRelativeUrl=function(t,e){var r=new URL((0,n.getLocationOrigin)()),a=e?new URL(e,r):r,i=new URL(t,a),u=i.pathname,s=i.searchParams,c=i.search,l=i.hash,f=i.href;if(i.origin!==r.origin)throw new Error("invariant: invalid relative URL, router received ".concat(t));return{pathname:u,query:(0,o.searchParamsToUrlQuery)(s),search:c,hash:l,href:f.slice(r.origin.length)}};var n=r("g/15"),o=r("3WeD")},ls82:function(t,e,r){var n=function(t){"use strict";var e,r=Object.prototype,n=r.hasOwnProperty,o="function"===typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(I){s=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var o=e&&e.prototype instanceof y?e:y,a=Object.create(o.prototype),i=new L(n||[]);return a._invoke=function(t,e,r){var n=f;return function(o,a){if(n===p)throw new Error("Generator is already running");if(n===d){if("throw"===o)throw a;return C()}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var u=S(i,r);if(u){if(u===v)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===f)throw n=d,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=p;var s=l(t,e,r);if("normal"===s.type){if(n=r.done?d:h,s.arg===v)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n=d,r.method="throw",r.arg=s.arg)}}}(t,r,i),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(I){return{type:"throw",arg:I}}}t.wrap=c;var f="suspendedStart",h="suspendedYield",p="executing",d="completed",v={};function y(){}function m(){}function g(){}var w={};w[a]=function(){return this};var b=Object.getPrototypeOf,_=b&&b(b(O([])));_&&_!==r&&n.call(_,a)&&(w=_);var x=g.prototype=y.prototype=Object.create(w);function P(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function k(t,e){function r(o,a,i,u){var s=l(t[o],t,a);if("throw"!==s.type){var c=s.arg,f=c.value;return f&&"object"===typeof f&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,i,u)}),(function(t){r("throw",t,i,u)})):e.resolve(f).then((function(t){c.value=t,i(c)}),(function(t){return r("throw",t,i,u)}))}u(s.arg)}var o;this._invoke=function(t,n){function a(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(a,a):a()}}function S(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,S(t,r),"throw"===r.method))return v;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=l(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,v;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function R(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function O(t){if(t){var r=t[a];if(r)return r.call(t);if("function"===typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--a){var i=this.tryEntries[a],u=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(s&&c){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),R(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;R(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:O(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}(t.exports);try{regeneratorRuntime=n}catch(o){Function("r","regeneratorRuntime = r")(n)}},lwsE:function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},m0LI:function(t,e){t.exports=function(t,e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t)){var r=[],n=!0,o=!1,a=void 0;try{for(var i,u=t[Symbol.iterator]();!(n=(i=u.next()).done)&&(r.push(i.value),!e||r.length!==e);n=!0);}catch(s){o=!0,a=s}finally{try{n||null==u.return||u.return()}finally{if(o)throw a}}return r}}},nOHt:function(t,e,r){"use strict";var n=r("sXyB");function o(t,e){var r;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"===typeof t)return a(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return a(t,e)}(t))||e&&t&&"number"===typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,u=!0,s=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return u=t.done,t},e:function(t){s=!0,i=t},f:function(){try{u||null==r.return||r.return()}finally{if(s)throw i}}}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r1&&t.some(Array.isArray)?t.flat(e-1):t},Array.prototype.flatMap=function(e,t){return this.map(e,t).flat()}),Promise.prototype.finally||(Promise.prototype.finally=function(e){if("function"!=typeof e)return this.then(e,e);var t=this.constructor||Promise;return this.then((function(r){return t.resolve(e()).then((function(){return r}))}),(function(r){return t.resolve(e()).then((function(){throw r}))}))})},"7W2i":function(e,t,r){var n=r("SksO");e.exports=function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&n(e,t)}},BMP1:function(e,t,r){"use strict";var n=r("284h")(r("IKlv"));window.next=n,(0,n.default)().catch(console.error)},DqTX:function(e,t,r){"use strict";t.__esModule=!0,t.default=function(){var e=null;return{mountedInstances:new Set,updateHead:function(t){var r=e=Promise.resolve().then((function(){if(r===e){e=null;var n={};t.forEach((function(e){var t=n[e.type]||[];t.push(e),n[e.type]=t}));var a=n.title?n.title[0]:null,i="";if(a){var u=a.props.children;i="string"===typeof u?u:Array.isArray(u)?u.join(""):""}i!==document.title&&(document.title=i),["meta","base","link","style","script"].forEach((function(e){!function(e,t){var r=document.getElementsByTagName("head")[0],n=r.querySelector("meta[name=next-head-count]");0;for(var a=Number(n.content),i=[],u=0,c=n.previousElementSibling;u0&&void 0!==s[0]?s[0]:{},e.next=4,Y.routeLoader.whenEntrypoint("/_app");case 4:if(!("error"in(r=e.sent))){e.next=7;break}throw r.error;case 7:o=r.component,a=r.exports,Z=o,a&&a.reportWebVitals&&(K=function(e){var t,r=e.id,n=e.name,o=e.startTime,i=e.value,u=e.duration,c=e.entryType,s=e.entries,l="".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12);s&&s.length&&(t=s[0].startTime),a.reportWebVitals({id:r||l,name:n,startTime:o||t,value:null==i?u:i,label:"mark"===c||"measure"===c?"custom":"web-vital"})}),i=L,e.prev=11,e.next=16;break;case 16:return e.next=18,Y.routeLoader.whenEntrypoint(R);case 18:e.t0=e.sent;case 19:if(!("error"in(u=e.t0))){e.next=22;break}throw u.error;case 22:te=u.component,e.next=27;break;case 27:e.next=32;break;case 29:e.prev=29,e.t1=e.catch(11),i=e.t1;case 32:if(!window.__NEXT_PRELOADREADY){e.next=36;break}return e.next=36,window.__NEXT_PRELOADREADY(j);case 36:return t.router=Q=(0,k.createRouter)(R,F,U,{initialProps:M,pageLoader:Y,App:Z,Component:te,wrapApp:me,err:i,isFallback:Boolean(B),subscription:function(e,t,r){return ae(Object.assign({},e,{App:t,scroll:r}))},locale:q,locales:H,defaultLocale:W,domainLocales:X,isPreview:G}),ae(c={App:Z,initial:!0,Component:te,props:M,err:i}),e.abrupt("return",ne);case 44:return e.abrupt("return",{emitter:ne,render:ae,renderCtx:c});case 45:case"end":return e.stop()}}),e,null,[[11,29]])})));return function(){return e.apply(this,arguments)}}();function ae(e){return ie.apply(this,arguments)}function ie(){return(ie=o(n.mark((function e(t){return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.err){e.next=4;break}return e.next=3,ue(t);case 3:return e.abrupt("return");case 4:return e.prev=4,e.next=7,he(t);case 7:e.next=16;break;case 9:if(e.prev=9,e.t0=e.catch(4),!e.t0.cancelled){e.next=13;break}throw e.t0;case 13:return e.next=16,ue((0,m.default)({},t,{err:e.t0}));case 16:case"end":return e.stop()}}),e,null,[[4,9]])})))).apply(this,arguments)}function ue(e){var t=e.App,r=e.err;return console.error(r),Y.loadPage("/_error").then((function(n){var o=n.page,a=n.styleSheets,i=me(t),u={Component:o,AppTree:i,router:Q,ctx:{err:r,pathname:R,query:F,asPath:U,AppTree:i}};return Promise.resolve(e.props?e.props:(0,x.loadGetInitialProps)(t,u)).then((function(t){return he((0,m.default)({},e,{err:r,Component:o,styleSheets:a,props:t}))}))}))}t.default=oe;var ce="function"===typeof v.default.hydrate;function se(){x.ST&&(performance.mark("afterHydrate"),performance.measure("Next.js-before-hydration","navigationStart","beforeRender"),performance.measure("Next.js-hydration","beforeRender","afterHydrate"),K&&performance.getEntriesByName("Next.js-hydration").forEach(K),fe())}function le(){if(x.ST){performance.mark("afterRender");var e=performance.getEntriesByName("routeChange","mark");e.length&&(performance.measure("Next.js-route-change-to-render",e[0].name,"beforeRender"),performance.measure("Next.js-render","beforeRender","afterRender"),K&&(performance.getEntriesByName("Next.js-render").forEach(K),performance.getEntriesByName("Next.js-route-change-to-render").forEach(K)),fe(),["Next.js-route-change-to-render","Next.js-render"].forEach((function(e){return performance.clearMeasures(e)})))}}function fe(){["beforeRender","afterHydrate","afterRender","routeChange"].forEach((function(e){return performance.clearMarks(e)}))}function pe(e){var t=e.children;return h.default.createElement(re,{fn:function(e){return ue({App:Z,err:e}).catch((function(e){return console.error("Error rendering page: ",e)}))}},h.default.createElement(b.RouterContext.Provider,{value:(0,k.makePublicRouterInstance)(Q)},h.default.createElement(y.HeadManagerContext.Provider,{value:$},t)))}var de,me=function(e){return function(t){var r=(0,m.default)({},t,{Component:te,err:L,router:Q});return h.default.createElement(pe,null,h.default.createElement(e,r))}};function he(e){var t=e.App,r=e.Component,n=e.props,o=e.err,a="initial"in e?void 0:e.styleSheets;r=r||de.Component,n=n||de.props;var i=(0,m.default)({},n,{Component:r,err:o,router:Q});de=i;var u,c=!1,s=new Promise((function(e,t){z&&z(),u=function(){z=null,e()},z=function(){c=!0,z=null;var e=new Error("Cancel rendering route");e.cancelled=!0,t(e)}}));var l,f,p=h.default.createElement(ve,{callback:function(){u()}},h.default.createElement(ye,{callback:function(){if(a&&!c){for(var t=new Set(a.map((function(e){return e.href}))),r=C(document.querySelectorAll("style[data-n-href]")),n=r.map((function(e){return e.getAttribute("data-n-href")})),o=0;o1&&void 0!==arguments[1]?arguments[1]:-1,delta:0,entries:[],id:n(),isFinal:!1}},a=function(e,t){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var r=new PerformanceObserver((function(e){return e.getEntries().map(t)}));return r.observe({type:e,buffered:!0}),r}}catch(e){}},i=!1,u=!1,c=function(e){i=!e.persisted},s=function(){addEventListener("pagehide",c),addEventListener("beforeunload",(function(){}))},l=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];u||(s(),u=!0),addEventListener("visibilitychange",(function(t){var r=t.timeStamp;"hidden"===document.visibilityState&&e({timeStamp:r,isUnloading:i})}),{capture:!0,once:t})},f=function(e,t,r,n){var o;return function(){r&&t.isFinal&&r.disconnect(),t.value>=0&&(n||t.isFinal||"hidden"===document.visibilityState)&&(t.delta=t.value-(o||0),(t.delta||t.isFinal||void 0===o)&&(e(t),o=t.value))}},p=function(){return void 0===t&&(t="hidden"===document.visibilityState?0:1/0,l((function(e){var r=e.timeStamp;return t=r}),!0)),{get timeStamp(){return t}}},d=function(){return r||(r=new Promise((function(e){return["scroll","keydown","pointerdown"].map((function(t){addEventListener(t,e,{once:!0,passive:!0,capture:!0})}))}))),r};e.getCLS=function(e){var t,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=o("CLS",0),i=function(e){e.hadRecentInput||(n.value+=e.value,n.entries.push(e),t())},u=a("layout-shift",i);u&&(t=f(e,n,u,r),l((function(e){var r=e.isUnloading;u.takeRecords().map(i),r&&(n.isFinal=!0),t()})))},e.getFCP=function(e){var t,r=o("FCP"),n=p(),i=a("paint",(function(e){"first-contentful-paint"===e.name&&e.startTime1&&void 0!==arguments[1]&&arguments[1],n=o("LCP"),i=p(),u=function(e){var r=e.startTime;r1&&t.some(Array.isArray)?t.flat(e-1):t},Array.prototype.flatMap=function(e,t){return this.map(e,t).flat()}),Promise.prototype.finally||(Promise.prototype.finally=function(e){if("function"!=typeof e)return this.then(e,e);var t=this.constructor||Promise;return this.then((function(r){return t.resolve(e()).then((function(){return r}))}),(function(r){return t.resolve(e()).then((function(){throw r}))}))})},"7W2i":function(e,t,r){var n=r("SksO");e.exports=function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&n(e,t)}},BMP1:function(e,t,r){"use strict";var n=r("284h")(r("IKlv"));window.next=n,(0,n.default)().catch(console.error)},DqTX:function(e,t,r){"use strict";t.__esModule=!0,t.default=function(){var e=null;return{mountedInstances:new Set,updateHead:function(t){var r=e=Promise.resolve().then((function(){if(r===e){e=null;var n={};t.forEach((function(e){var t=n[e.type]||[];t.push(e),n[e.type]=t}));var a=n.title?n.title[0]:null,i="";if(a){var u=a.props.children;i="string"===typeof u?u:Array.isArray(u)?u.join(""):""}i!==document.title&&(document.title=i),["meta","base","link","style","script"].forEach((function(e){!function(e,t){var r=document.getElementsByTagName("head")[0],n=r.querySelector("meta[name=next-head-count]");0;for(var a=Number(n.content),i=[],u=0,c=n.previousElementSibling;u0&&void 0!==s[0]?s[0]:{},e.next=4,Y.routeLoader.whenEntrypoint("/_app");case 4:if(!("error"in(r=e.sent))){e.next=7;break}throw r.error;case 7:o=r.component,a=r.exports,Z=o,a&&a.reportWebVitals&&(K=function(e){var t,r=e.id,n=e.name,o=e.startTime,i=e.value,u=e.duration,c=e.entryType,s=e.entries,l="".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12);s&&s.length&&(t=s[0].startTime),a.reportWebVitals({id:r||l,name:n,startTime:o||t,value:null==i?u:i,label:"mark"===c||"measure"===c?"custom":"web-vital"})}),i=L,e.prev=11,e.next=16;break;case 16:return e.next=18,Y.routeLoader.whenEntrypoint(R);case 18:e.t0=e.sent;case 19:if(!("error"in(u=e.t0))){e.next=22;break}throw u.error;case 22:te=u.component,e.next=27;break;case 27:e.next=32;break;case 29:e.prev=29,e.t1=e.catch(11),i=e.t1;case 32:if(!window.__NEXT_PRELOADREADY){e.next=36;break}return e.next=36,window.__NEXT_PRELOADREADY(j);case 36:return t.router=Q=(0,k.createRouter)(R,F,U,{initialProps:M,pageLoader:Y,App:Z,Component:te,wrapApp:me,err:i,isFallback:Boolean(B),subscription:function(e,t,r){return ae(Object.assign({},e,{App:t,scroll:r}))},locale:q,locales:H,defaultLocale:W,domainLocales:X,isPreview:G}),ae(c={App:Z,initial:!0,Component:te,props:M,err:i}),e.abrupt("return",ne);case 44:return e.abrupt("return",{emitter:ne,render:ae,renderCtx:c});case 45:case"end":return e.stop()}}),e,null,[[11,29]])})));return function(){return e.apply(this,arguments)}}();function ae(e){return ie.apply(this,arguments)}function ie(){return(ie=o(n.mark((function e(t){return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.err){e.next=4;break}return e.next=3,ue(t);case 3:return e.abrupt("return");case 4:return e.prev=4,e.next=7,he(t);case 7:e.next=16;break;case 9:if(e.prev=9,e.t0=e.catch(4),!e.t0.cancelled){e.next=13;break}throw e.t0;case 13:return e.next=16,ue((0,m.default)({},t,{err:e.t0}));case 16:case"end":return e.stop()}}),e,null,[[4,9]])})))).apply(this,arguments)}function ue(e){var t=e.App,r=e.err;return console.error(r),Y.loadPage("/_error").then((function(n){var o=n.page,a=n.styleSheets,i=me(t),u={Component:o,AppTree:i,router:Q,ctx:{err:r,pathname:R,query:F,asPath:U,AppTree:i}};return Promise.resolve(e.props?e.props:(0,x.loadGetInitialProps)(t,u)).then((function(t){return he((0,m.default)({},e,{err:r,Component:o,styleSheets:a,props:t}))}))}))}t.default=oe;var ce="function"===typeof v.default.hydrate;function se(){x.ST&&(performance.mark("afterHydrate"),performance.measure("Next.js-before-hydration","navigationStart","beforeRender"),performance.measure("Next.js-hydration","beforeRender","afterHydrate"),K&&performance.getEntriesByName("Next.js-hydration").forEach(K),fe())}function le(){if(x.ST){performance.mark("afterRender");var e=performance.getEntriesByName("routeChange","mark");e.length&&(performance.measure("Next.js-route-change-to-render",e[0].name,"beforeRender"),performance.measure("Next.js-render","beforeRender","afterRender"),K&&(performance.getEntriesByName("Next.js-render").forEach(K),performance.getEntriesByName("Next.js-route-change-to-render").forEach(K)),fe(),["Next.js-route-change-to-render","Next.js-render"].forEach((function(e){return performance.clearMeasures(e)})))}}function fe(){["beforeRender","afterHydrate","afterRender","routeChange"].forEach((function(e){return performance.clearMarks(e)}))}function pe(e){var t=e.children;return h.default.createElement(re,{fn:function(e){return ue({App:Z,err:e}).catch((function(e){return console.error("Error rendering page: ",e)}))}},h.default.createElement(b.RouterContext.Provider,{value:(0,k.makePublicRouterInstance)(Q)},h.default.createElement(y.HeadManagerContext.Provider,{value:$},t)))}var de,me=function(e){return function(t){var r=(0,m.default)({},t,{Component:te,err:L,router:Q});return h.default.createElement(pe,null,h.default.createElement(e,r))}};function he(e){var t=e.App,r=e.Component,n=e.props,o=e.err,a="initial"in e?void 0:e.styleSheets;r=r||de.Component,n=n||de.props;var i=(0,m.default)({},n,{Component:r,err:o,router:Q});de=i;var u,c=!1,s=new Promise((function(e,t){z&&z(),u=function(){z=null,e()},z=function(){c=!0,z=null;var e=new Error("Cancel rendering route");e.cancelled=!0,t(e)}}));var l,f,p=h.default.createElement(ve,{callback:function(){u()}},h.default.createElement(ye,{callback:function(){if(a&&!c){for(var t=new Set(a.map((function(e){return e.href}))),r=C(document.querySelectorAll("style[data-n-href]")),n=r.map((function(e){return e.getAttribute("data-n-href")})),o=0;o1&&void 0!==arguments[1]?arguments[1]:-1,delta:0,entries:[],id:n(),isFinal:!1}},a=function(e,t){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var r=new PerformanceObserver((function(e){return e.getEntries().map(t)}));return r.observe({type:e,buffered:!0}),r}}catch(e){}},i=!1,u=!1,c=function(e){i=!e.persisted},s=function(){addEventListener("pagehide",c),addEventListener("beforeunload",(function(){}))},l=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];u||(s(),u=!0),addEventListener("visibilitychange",(function(t){var r=t.timeStamp;"hidden"===document.visibilityState&&e({timeStamp:r,isUnloading:i})}),{capture:!0,once:t})},f=function(e,t,r,n){var o;return function(){r&&t.isFinal&&r.disconnect(),t.value>=0&&(n||t.isFinal||"hidden"===document.visibilityState)&&(t.delta=t.value-(o||0),(t.delta||t.isFinal||void 0===o)&&(e(t),o=t.value))}},p=function(){return void 0===t&&(t="hidden"===document.visibilityState?0:1/0,l((function(e){var r=e.timeStamp;return t=r}),!0)),{get timeStamp(){return t}}},d=function(){return r||(r=new Promise((function(e){return["scroll","keydown","pointerdown"].map((function(t){addEventListener(t,e,{once:!0,passive:!0,capture:!0})}))}))),r};e.getCLS=function(e){var t,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=o("CLS",0),i=function(e){e.hadRecentInput||(n.value+=e.value,n.entries.push(e),t())},u=a("layout-shift",i);u&&(t=f(e,n,u,r),l((function(e){var r=e.isUnloading;u.takeRecords().map(i),r&&(n.isFinal=!0),t()})))},e.getFCP=function(e){var t,r=o("FCP"),n=p(),i=a("paint",(function(e){"first-contentful-paint"===e.name&&e.startTime1&&void 0!==arguments[1]&&arguments[1],n=o("LCP"),i=p(),u=function(e){var r=e.startTime;r1&&t.some(Array.isArray)?t.flat(e-1):t},Array.prototype.flatMap=function(e,t){return this.map(e,t).flat()}),Promise.prototype.finally||(Promise.prototype.finally=function(e){if("function"!=typeof e)return this.then(e,e);var t=this.constructor||Promise;return this.then((function(r){return t.resolve(e()).then((function(){return r}))}),(function(r){return t.resolve(e()).then((function(){throw r}))}))})},BMP1:function(e,t,r){"use strict";var n=r("284h")(r("IKlv"));window.next=n,(0,n.default)().catch(console.error)},DqTX:function(e,t,r){"use strict";t.__esModule=!0,t.default=function(){var e=null;return{mountedInstances:new Set,updateHead:function(t){var r=e=Promise.resolve().then((function(){if(r===e){e=null;var n={};t.forEach((function(e){var t=n[e.type]||[];t.push(e),n[e.type]=t}));var o=n.title?n.title[0]:null,i="";if(o){var u=o.props.children;i="string"===typeof u?u:Array.isArray(u)?u.join(""):""}i!==document.title&&(document.title=i),["meta","base","link","style","script"].forEach((function(e){!function(e,t){var r=document.getElementsByTagName("head")[0],n=r.querySelector("meta[name=next-head-count]");0;for(var o=Number(n.content),i=[],u=0,c=n.previousElementSibling;u0&&void 0!==s[0]?s[0]:{},e.next=4,Y.routeLoader.whenEntrypoint("/_app");case 4:if(!("error"in(r=e.sent))){e.next=7;break}throw r.error;case 7:a=r.component,o=r.exports,K=a,o&&o.reportWebVitals&&(Z=function(e){var t,r=e.id,n=e.name,a=e.startTime,i=e.value,u=e.duration,c=e.entryType,s=e.entries,l="".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12);s&&s.length&&(t=s[0].startTime),o.reportWebVitals({id:r||l,name:n,startTime:a||t,value:null==i?u:i,label:"mark"===c||"measure"===c?"custom":"web-vital"})}),i=M,e.prev=11,e.next=16;break;case 16:return e.next=18,Y.routeLoader.whenEntrypoint(R);case 18:e.t0=e.sent;case 19:if(!("error"in(u=e.t0))){e.next=22;break}throw u.error;case 22:te=u.component,e.next=27;break;case 27:e.next=32;break;case 29:e.prev=29,e.t1=e.catch(11),i=e.t1;case 32:if(!window.__NEXT_PRELOADREADY){e.next=36;break}return e.next=36,window.__NEXT_PRELOADREADY(q);case 36:return t.router=Q=(0,A.createRouter)(R,F,J,{initialProps:L,pageLoader:Y,App:K,Component:te,wrapApp:me,err:i,isFallback:Boolean(j),subscription:function(e,t,r){return oe(Object.assign({},e,{App:t,scroll:r}))},locale:O,locales:X,defaultLocale:U,domainLocales:H,isPreview:G}),oe(c={App:K,initial:!0,Component:te,props:L,err:i}),e.abrupt("return",ne);case 44:return e.abrupt("return",{emitter:ne,render:oe,renderCtx:c});case 45:case"end":return e.stop()}}),e,null,[[11,29]])})));return function(){return e.apply(this,arguments)}}();function oe(e){return ie.apply(this,arguments)}function ie(){return(ie=a(n.mark((function e(t){return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.err){e.next=4;break}return e.next=3,ue(t);case 3:return e.abrupt("return");case 4:return e.prev=4,e.next=7,he(t);case 7:e.next=16;break;case 9:if(e.prev=9,e.t0=e.catch(4),!e.t0.cancelled){e.next=13;break}throw e.t0;case 13:return e.next=16,ue((0,m.default)({},t,{err:e.t0}));case 16:case"end":return e.stop()}}),e,null,[[4,9]])})))).apply(this,arguments)}function ue(e){var t=e.App,r=e.err;return console.error(r),Y.loadPage("/_error").then((function(n){var a=n.page,o=n.styleSheets,i=me(t),u={Component:a,AppTree:i,router:Q,ctx:{err:r,pathname:R,query:F,asPath:J,AppTree:i}};return Promise.resolve(e.props?e.props:(0,x.loadGetInitialProps)(t,u)).then((function(t){return he((0,m.default)({},e,{err:r,Component:a,styleSheets:o,props:t}))}))}))}t.default=ae;var ce="function"===typeof v.default.hydrate;function se(){x.ST&&(performance.mark("afterHydrate"),performance.measure("Next.js-before-hydration","navigationStart","beforeRender"),performance.measure("Next.js-hydration","beforeRender","afterHydrate"),Z&&performance.getEntriesByName("Next.js-hydration").forEach(Z),fe())}function le(){if(x.ST){performance.mark("afterRender");var e=performance.getEntriesByName("routeChange","mark");e.length&&(performance.measure("Next.js-route-change-to-render",e[0].name,"beforeRender"),performance.measure("Next.js-render","beforeRender","afterRender"),Z&&(performance.getEntriesByName("Next.js-render").forEach(Z),performance.getEntriesByName("Next.js-route-change-to-render").forEach(Z)),fe(),["Next.js-route-change-to-render","Next.js-render"].forEach((function(e){return performance.clearMeasures(e)})))}}function fe(){["beforeRender","afterHydrate","afterRender","routeChange"].forEach((function(e){return performance.clearMarks(e)}))}function pe(e){var t=e.children;return h.default.createElement(re,{fn:function(e){return ue({App:K,err:e}).catch((function(e){return console.error("Error rendering page: ",e)}))}},h.default.createElement(S.RouterContext.Provider,{value:(0,A.makePublicRouterInstance)(Q)},h.default.createElement(y.HeadManagerContext.Provider,{value:$},t)))}var de,me=function(e){return function(t){var r=(0,m.default)({},t,{Component:te,err:M,router:Q});return h.default.createElement(pe,null,h.default.createElement(e,r))}};function he(e){var t=e.App,r=e.Component,n=e.props,a=e.err,o="initial"in e?void 0:e.styleSheets;r=r||de.Component,n=n||de.props;var i=(0,m.default)({},n,{Component:r,err:a,router:Q});de=i;var u,c=!1,s=new Promise((function(e,t){z&&z(),u=function(){z=null,e()},z=function(){c=!0,z=null;var e=new Error("Cancel rendering route");e.cancelled=!0,t(e)}}));var l,f,p=h.default.createElement(ve,{callback:function(){u()}},h.default.createElement(ye,{callback:function(){if(o&&!c){for(var t=new Set(o.map((function(e){return e.href}))),r=C(document.querySelectorAll("style[data-n-href]")),n=r.map((function(e){return e.getAttribute("data-n-href")})),a=0;a1&&void 0!==arguments[1]?arguments[1]:-1,delta:0,entries:[],id:n(),isFinal:!1}},o=function(e,t){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var r=new PerformanceObserver((function(e){return e.getEntries().map(t)}));return r.observe({type:e,buffered:!0}),r}}catch(e){}},i=!1,u=!1,c=function(e){i=!e.persisted},s=function(){addEventListener("pagehide",c),addEventListener("beforeunload",(function(){}))},l=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];u||(s(),u=!0),addEventListener("visibilitychange",(function(t){var r=t.timeStamp;"hidden"===document.visibilityState&&e({timeStamp:r,isUnloading:i})}),{capture:!0,once:t})},f=function(e,t,r,n){var a;return function(){r&&t.isFinal&&r.disconnect(),t.value>=0&&(n||t.isFinal||"hidden"===document.visibilityState)&&(t.delta=t.value-(a||0),(t.delta||t.isFinal||void 0===a)&&(e(t),a=t.value))}},p=function(){return void 0===t&&(t="hidden"===document.visibilityState?0:1/0,l((function(e){var r=e.timeStamp;return t=r}),!0)),{get timeStamp(){return t}}},d=function(){return r||(r=new Promise((function(e){return["scroll","keydown","pointerdown"].map((function(t){addEventListener(t,e,{once:!0,passive:!0,capture:!0})}))}))),r};e.getCLS=function(e){var t,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=a("CLS",0),i=function(e){e.hadRecentInput||(n.value+=e.value,n.entries.push(e),t())},u=o("layout-shift",i);u&&(t=f(e,n,u,r),l((function(e){var r=e.isUnloading;u.takeRecords().map(i),r&&(n.isFinal=!0),t()})))},e.getFCP=function(e){var t,r=a("FCP"),n=p(),i=o("paint",(function(e){"first-contentful-paint"===e.name&&e.startTime1&&void 0!==arguments[1]&&arguments[1],n=a("LCP"),i=p(),u=function(e){var r=e.startTime;r1&&t.some(Array.isArray)?t.flat(e-1):t},Array.prototype.flatMap=function(e,t){return this.map(e,t).flat()}),Promise.prototype.finally||(Promise.prototype.finally=function(e){if("function"!=typeof e)return this.then(e,e);var t=this.constructor||Promise;return this.then((function(r){return t.resolve(e()).then((function(){return r}))}),(function(r){return t.resolve(e()).then((function(){throw r}))}))})},BMP1:function(e,t,r){"use strict";var n=r("284h")(r("IKlv"));window.next=n,(0,n.default)().catch(console.error)},DqTX:function(e,t,r){"use strict";t.__esModule=!0,t.default=function(){var e=null;return{mountedInstances:new Set,updateHead:function(t){var r=e=Promise.resolve().then((function(){if(r===e){e=null;var n={};t.forEach((function(e){var t=n[e.type]||[];t.push(e),n[e.type]=t}));var o=n.title?n.title[0]:null,i="";if(o){var u=o.props.children;i="string"===typeof u?u:Array.isArray(u)?u.join(""):""}i!==document.title&&(document.title=i),["meta","base","link","style","script"].forEach((function(e){!function(e,t){var r=document.getElementsByTagName("head")[0],n=r.querySelector("meta[name=next-head-count]");0;for(var o=Number(n.content),i=[],u=0,c=n.previousElementSibling;u0&&void 0!==s[0]?s[0]:{},e.next=4,Y.routeLoader.whenEntrypoint("/_app");case 4:if(!("error"in(r=e.sent))){e.next=7;break}throw r.error;case 7:a=r.component,o=r.exports,K=a,o&&o.reportWebVitals&&(Z=function(e){var t,r=e.id,n=e.name,a=e.startTime,i=e.value,u=e.duration,c=e.entryType,s=e.entries,l="".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12);s&&s.length&&(t=s[0].startTime),o.reportWebVitals({id:r||l,name:n,startTime:a||t,value:null==i?u:i,label:"mark"===c||"measure"===c?"custom":"web-vital"})}),i=M,e.prev=11,e.next=16;break;case 16:return e.next=18,Y.routeLoader.whenEntrypoint(R);case 18:e.t0=e.sent;case 19:if(!("error"in(u=e.t0))){e.next=22;break}throw u.error;case 22:te=u.component,e.next=27;break;case 27:e.next=32;break;case 29:e.prev=29,e.t1=e.catch(11),i=e.t1;case 32:if(!window.__NEXT_PRELOADREADY){e.next=36;break}return e.next=36,window.__NEXT_PRELOADREADY(q);case 36:return t.router=Q=(0,A.createRouter)(R,F,J,{initialProps:L,pageLoader:Y,App:K,Component:te,wrapApp:me,err:i,isFallback:Boolean(j),subscription:function(e,t,r){return oe(Object.assign({},e,{App:t,scroll:r}))},locale:O,locales:X,defaultLocale:U,domainLocales:H,isPreview:G}),oe(c={App:K,initial:!0,Component:te,props:L,err:i}),e.abrupt("return",ne);case 44:return e.abrupt("return",{emitter:ne,render:oe,renderCtx:c});case 45:case"end":return e.stop()}}),e,null,[[11,29]])})));return function(){return e.apply(this,arguments)}}();function oe(e){return ie.apply(this,arguments)}function ie(){return(ie=a(n.mark((function e(t){return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.err){e.next=4;break}return e.next=3,ue(t);case 3:return e.abrupt("return");case 4:return e.prev=4,e.next=7,he(t);case 7:e.next=16;break;case 9:if(e.prev=9,e.t0=e.catch(4),!e.t0.cancelled){e.next=13;break}throw e.t0;case 13:return e.next=16,ue((0,m.default)({},t,{err:e.t0}));case 16:case"end":return e.stop()}}),e,null,[[4,9]])})))).apply(this,arguments)}function ue(e){var t=e.App,r=e.err;return console.error(r),Y.loadPage("/_error").then((function(n){var a=n.page,o=n.styleSheets,i=me(t),u={Component:a,AppTree:i,router:Q,ctx:{err:r,pathname:R,query:F,asPath:J,AppTree:i}};return Promise.resolve(e.props?e.props:(0,x.loadGetInitialProps)(t,u)).then((function(t){return he((0,m.default)({},e,{err:r,Component:a,styleSheets:o,props:t}))}))}))}t.default=ae;var ce="function"===typeof v.default.hydrate;function se(){x.ST&&(performance.mark("afterHydrate"),performance.measure("Next.js-before-hydration","navigationStart","beforeRender"),performance.measure("Next.js-hydration","beforeRender","afterHydrate"),Z&&performance.getEntriesByName("Next.js-hydration").forEach(Z),fe())}function le(){if(x.ST){performance.mark("afterRender");var e=performance.getEntriesByName("routeChange","mark");e.length&&(performance.measure("Next.js-route-change-to-render",e[0].name,"beforeRender"),performance.measure("Next.js-render","beforeRender","afterRender"),Z&&(performance.getEntriesByName("Next.js-render").forEach(Z),performance.getEntriesByName("Next.js-route-change-to-render").forEach(Z)),fe(),["Next.js-route-change-to-render","Next.js-render"].forEach((function(e){return performance.clearMeasures(e)})))}}function fe(){["beforeRender","afterHydrate","afterRender","routeChange"].forEach((function(e){return performance.clearMarks(e)}))}function pe(e){var t=e.children;return h.default.createElement(re,{fn:function(e){return ue({App:K,err:e}).catch((function(e){return console.error("Error rendering page: ",e)}))}},h.default.createElement(S.RouterContext.Provider,{value:(0,A.makePublicRouterInstance)(Q)},h.default.createElement(y.HeadManagerContext.Provider,{value:$},t)))}var de,me=function(e){return function(t){var r=(0,m.default)({},t,{Component:te,err:M,router:Q});return h.default.createElement(pe,null,h.default.createElement(e,r))}};function he(e){var t=e.App,r=e.Component,n=e.props,a=e.err,o="initial"in e?void 0:e.styleSheets;r=r||de.Component,n=n||de.props;var i=(0,m.default)({},n,{Component:r,err:a,router:Q});de=i;var u,c=!1,s=new Promise((function(e,t){z&&z(),u=function(){z=null,e()},z=function(){c=!0,z=null;var e=new Error("Cancel rendering route");e.cancelled=!0,t(e)}}));var l,f,p=h.default.createElement(ve,{callback:function(){u()}},h.default.createElement(ye,{callback:function(){if(o&&!c){for(var t=new Set(o.map((function(e){return e.href}))),r=C(document.querySelectorAll("style[data-n-href]")),n=r.map((function(e){return e.getAttribute("data-n-href")})),a=0;a1&&void 0!==arguments[1]?arguments[1]:-1,delta:0,entries:[],id:n(),isFinal:!1}},o=function(e,t){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var r=new PerformanceObserver((function(e){return e.getEntries().map(t)}));return r.observe({type:e,buffered:!0}),r}}catch(e){}},i=!1,u=!1,c=function(e){i=!e.persisted},s=function(){addEventListener("pagehide",c),addEventListener("beforeunload",(function(){}))},l=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];u||(s(),u=!0),addEventListener("visibilitychange",(function(t){var r=t.timeStamp;"hidden"===document.visibilityState&&e({timeStamp:r,isUnloading:i})}),{capture:!0,once:t})},f=function(e,t,r,n){var a;return function(){r&&t.isFinal&&r.disconnect(),t.value>=0&&(n||t.isFinal||"hidden"===document.visibilityState)&&(t.delta=t.value-(a||0),(t.delta||t.isFinal||void 0===a)&&(e(t),a=t.value))}},p=function(){return void 0===t&&(t="hidden"===document.visibilityState?0:1/0,l((function(e){var r=e.timeStamp;return t=r}),!0)),{get timeStamp(){return t}}},d=function(){return r||(r=new Promise((function(e){return["scroll","keydown","pointerdown"].map((function(t){addEventListener(t,e,{once:!0,passive:!0,capture:!0})}))}))),r};e.getCLS=function(e){var t,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=a("CLS",0),i=function(e){e.hadRecentInput||(n.value+=e.value,n.entries.push(e),t())},u=o("layout-shift",i);u&&(t=f(e,n,u,r),l((function(e){var r=e.isUnloading;u.takeRecords().map(i),r&&(n.isFinal=!0),t()})))},e.getFCP=function(e){var t,r=a("FCP"),n=p(),i=o("paint",(function(e){"first-contentful-paint"===e.name&&e.startTime1&&void 0!==arguments[1]&&arguments[1],n=a("LCP"),i=p(),u=function(e){var r=e.startTime;r0&&void 0!==s[0]?s[0]:{},e.next=4,Y.routeLoader.whenEntrypoint("/_app");case 4:if(!("error"in(r=e.sent))){e.next=7;break}throw r.error;case 7:o=r.component,a=r.exports,Z=o,a&&a.reportWebVitals&&(K=function(e){var t,r=e.id,n=e.name,o=e.startTime,i=e.value,u=e.duration,c=e.entryType,s=e.entries,l="".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12);s&&s.length&&(t=s[0].startTime),a.reportWebVitals({id:r||l,name:n,startTime:o||t,value:null==i?u:i,label:"mark"===c||"measure"===c?"custom":"web-vital"})}),i=R,e.prev=11,e.next=16;break;case 16:return e.next=18,Y.routeLoader.whenEntrypoint(L);case 18:e.t0=e.sent;case 19:if(!("error"in(u=e.t0))){e.next=22;break}throw u.error;case 22:te=u.component,e.next=27;break;case 27:e.next=32;break;case 29:e.prev=29,e.t1=e.catch(11),i=e.t1;case 32:if(!window.__NEXT_PRELOADREADY){e.next=36;break}return e.next=36,window.__NEXT_PRELOADREADY(j);case 36:return t.router=V=(0,k.createRouter)(L,D,W,{initialProps:M,pageLoader:Y,App:Z,Component:te,wrapApp:me,err:i,isFallback:Boolean(B),subscription:function(e,t,r){return ae(Object.assign({},e,{App:t,scroll:r}))},locale:q,locales:H,defaultLocale:G,domainLocales:U,isPreview:X}),ae(c={App:Z,initial:!0,Component:te,props:M,err:i}),e.abrupt("return",ne);case 44:return e.abrupt("return",{emitter:ne,render:ae,renderCtx:c});case 45:case"end":return e.stop()}}),e,null,[[11,29]])})));return function(){return e.apply(this,arguments)}}();function ae(e){return ie.apply(this,arguments)}function ie(){return(ie=o(n.mark((function e(t){return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.err){e.next=4;break}return e.next=3,ue(t);case 3:return e.abrupt("return");case 4:return e.prev=4,e.next=7,he(t);case 7:e.next=16;break;case 9:if(e.prev=9,e.t0=e.catch(4),!e.t0.cancelled){e.next=13;break}throw e.t0;case 13:return e.next=16,ue((0,m.default)({},t,{err:e.t0}));case 16:case"end":return e.stop()}}),e,null,[[4,9]])})))).apply(this,arguments)}function ue(e){var t=e.App,r=e.err;return console.error(r),Y.loadPage("/_error").then((function(n){var o=n.page,a=n.styleSheets,i=me(t),u={Component:o,AppTree:i,router:V,ctx:{err:r,pathname:L,query:D,asPath:W,AppTree:i}};return Promise.resolve(e.props?e.props:(0,x.loadGetInitialProps)(t,u)).then((function(t){return he((0,m.default)({},e,{err:r,Component:o,styleSheets:a,props:t}))}))}))}t.default=oe;var ce="function"===typeof v.default.hydrate;function se(){x.ST&&(performance.mark("afterHydrate"),performance.measure("Next.js-before-hydration","navigationStart","beforeRender"),performance.measure("Next.js-hydration","beforeRender","afterHydrate"),K&&performance.getEntriesByName("Next.js-hydration").forEach(K),fe())}function le(){if(x.ST){performance.mark("afterRender");var e=performance.getEntriesByName("routeChange","mark");e.length&&(performance.measure("Next.js-route-change-to-render",e[0].name,"beforeRender"),performance.measure("Next.js-render","beforeRender","afterRender"),K&&(performance.getEntriesByName("Next.js-render").forEach(K),performance.getEntriesByName("Next.js-route-change-to-render").forEach(K)),fe(),["Next.js-route-change-to-render","Next.js-render"].forEach((function(e){return performance.clearMeasures(e)})))}}function fe(){["beforeRender","afterHydrate","afterRender","routeChange"].forEach((function(e){return performance.clearMarks(e)}))}function pe(e){var t=e.children;return h.default.createElement(re,{fn:function(e){return ue({App:Z,err:e}).catch((function(e){return console.error("Error rendering page: ",e)}))}},h.default.createElement(b.RouterContext.Provider,{value:(0,k.makePublicRouterInstance)(V)},h.default.createElement(y.HeadManagerContext.Provider,{value:$},t)))}var de,me=function(e){return function(t){var r=(0,m.default)({},t,{Component:te,err:R,router:V});return h.default.createElement(pe,null,h.default.createElement(e,r))}};function he(e){var t=e.App,r=e.Component,n=e.props,o=e.err,a="initial"in e?void 0:e.styleSheets;r=r||de.Component,n=n||de.props;var i=(0,m.default)({},n,{Component:r,err:o,router:V});de=i;var u,c=!1,s=new Promise((function(e,t){z&&z(),u=function(){z=null,e()},z=function(){c=!0,z=null;var e=new Error("Cancel rendering route");e.cancelled=!0,t(e)}}));var l,f,p=h.default.createElement(ve,{callback:function(){u()}},h.default.createElement(ye,{callback:function(){if(a&&!c){for(var t=new Set(a.map((function(e){return e.href}))),r=N(document.querySelectorAll("style[data-n-href]")),n=r.map((function(e){return e.getAttribute("data-n-href")})),o=0;o1&&void 0!==arguments[1]?arguments[1]:-1,delta:0,entries:[],id:n(),isFinal:!1}},a=function(e,t){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var r=new PerformanceObserver((function(e){return e.getEntries().map(t)}));return r.observe({type:e,buffered:!0}),r}}catch(e){}},i=!1,u=!1,c=function(e){i=!e.persisted},s=function(){addEventListener("pagehide",c),addEventListener("beforeunload",(function(){}))},l=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];u||(s(),u=!0),addEventListener("visibilitychange",(function(t){var r=t.timeStamp;"hidden"===document.visibilityState&&e({timeStamp:r,isUnloading:i})}),{capture:!0,once:t})},f=function(e,t,r,n){var o;return function(){r&&t.isFinal&&r.disconnect(),t.value>=0&&(n||t.isFinal||"hidden"===document.visibilityState)&&(t.delta=t.value-(o||0),(t.delta||t.isFinal||void 0===o)&&(e(t),o=t.value))}},p=function(){return void 0===t&&(t="hidden"===document.visibilityState?0:1/0,l((function(e){var r=e.timeStamp;return t=r}),!0)),{get timeStamp(){return t}}},d=function(){return r||(r=new Promise((function(e){return["scroll","keydown","pointerdown"].map((function(t){addEventListener(t,e,{once:!0,passive:!0,capture:!0})}))}))),r};e.getCLS=function(e){var t,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=o("CLS",0),i=function(e){e.hadRecentInput||(n.value+=e.value,n.entries.push(e),t())},u=a("layout-shift",i);u&&(t=f(e,n,u,r),l((function(e){var r=e.isUnloading;u.takeRecords().map(i),r&&(n.isFinal=!0),t()})))},e.getFCP=function(e){var t,r=o("FCP"),n=p(),i=a("paint",(function(e){"first-contentful-paint"===e.name&&e.startTime1&&void 0!==arguments[1]&&arguments[1],n=o("LCP"),i=p(),u=function(e){var r=e.startTime;r1&&t.some(Array.isArray)?t.flat(e-1):t},Array.prototype.flatMap=function(e,t){return this.map(e,t).flat()}),Promise.prototype.finally||(Promise.prototype.finally=function(e){if("function"!=typeof e)return this.then(e,e);var t=this.constructor||Promise;return this.then((function(r){return t.resolve(e()).then((function(){return r}))}),(function(r){return t.resolve(e()).then((function(){throw r}))}))})}},[["QOTr",0,1,2]]]); \ No newline at end of file +_N_E=(window.webpackJsonp_N_E=window.webpackJsonp_N_E||[]).push([[4],{"7W2i":function(e,t,r){var n=r("SksO");e.exports=function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&n(e,t)}},DCIx:function(e,t,r){"use strict";var n=r("lwsE"),o=r("W8MJ"),a=r("TTt4"),i=r("FzWm");t.__esModule=!0,t.default=void 0;var u=r("TTnN"),c=i(r("GpGG")),s=r("YKD2"),l=r("AO3j"),f=r("vuub"),p=a(r("pqeP"));function d(e){if("/"!==e[0])throw new Error('Route name should start with a "/", got "'.concat(e,'"'));return"/"===e?e:e.replace(/\/$/,"")}var m=function(){function e(t,r){n(this,e),this.buildId=void 0,this.assetPrefix=void 0,this.promisedSsgManifest=void 0,this.promisedDevPagesManifest=void 0,this.routeLoader=void 0,this.routeLoader=(0,p.default)(r),this.buildId=t,this.assetPrefix=r,this.promisedSsgManifest=new Promise((function(e){window.__SSG_MANIFEST?e(window.__SSG_MANIFEST):window.__SSG_MANIFEST_CB=function(){e(window.__SSG_MANIFEST)}}))}return o(e,[{key:"getPageList",value:function(){return(0,p.getClientBuildManifest)().then((function(e){return e.sortedPages}))}},{key:"getDataHref",value:function(e,t,r,n){var o=this,a=(0,l.parseRelativeUrl)(e),i=a.pathname,p=a.query,m=a.search,h=(0,l.parseRelativeUrl)(t).pathname,v=d(i),y=function(e){var t=(0,c.default)((0,f.removePathTrailingSlash)((0,u.addLocale)(e,n)),".json");return(0,u.addBasePath)("https://cdn.statically.io/gh/HiltonWS/hiltonws.github.io/1.1.1/smile/data/".concat(o.buildId).concat(t).concat(r?"":m))},g=(0,s.isDynamicRoute)(v),b=g?(0,u.interpolateAs)(i,h,p).result:"";return g?b&&y(b):y(v)}},{key:"_isSsg",value:function(e){var t=d((0,l.parseRelativeUrl)(e).pathname);return this.promisedSsgManifest.then((function(e){return e.has(t)}))}},{key:"loadPage",value:function(e){return this.routeLoader.loadRoute(e).then((function(e){if("component"in e)return{page:e.component,mod:e.exports,styleSheets:e.styles.map((function(e){return{href:e.href,text:e.content}}))};throw e.error}))}},{key:"prefetch",value:function(e){return this.routeLoader.prefetch(e)}}]),e}();t.default=m},IeIt:function(e,t,r){"use strict";t.__esModule=!0,t.default=function(){var e=null;return{mountedInstances:new Set,updateHead:function(t){var r=e=Promise.resolve().then((function(){if(r===e){e=null;var n={};t.forEach((function(e){var t=n[e.type]||[];t.push(e),n[e.type]=t}));var a=n.title?n.title[0]:null,i="";if(a){var u=a.props.children;i="string"===typeof u?u:Array.isArray(u)?u.join(""):""}i!==document.title&&(document.title=i),["meta","base","link","style","script"].forEach((function(e){!function(e,t){var r=document.getElementsByTagName("head")[0],n=r.querySelector("meta[name=next-head-count]");0;for(var a=Number(n.content),i=[],u=0,c=n.previousElementSibling;u0&&void 0!==s[0]?s[0]:{},e.next=4,Y.routeLoader.whenEntrypoint("/_app");case 4:if(!("error"in(r=e.sent))){e.next=7;break}throw r.error;case 7:o=r.component,a=r.exports,Z=o,a&&a.reportWebVitals&&(K=function(e){var t,r=e.id,n=e.name,o=e.startTime,i=e.value,u=e.duration,c=e.entryType,s=e.entries,l="".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12);s&&s.length&&(t=s[0].startTime),a.reportWebVitals({id:r||l,name:n,startTime:o||t,value:null==i?u:i,label:"mark"===c||"measure"===c?"custom":"web-vital"})}),i=R,e.prev=11,e.next=16;break;case 16:return e.next=18,Y.routeLoader.whenEntrypoint(L);case 18:e.t0=e.sent;case 19:if(!("error"in(u=e.t0))){e.next=22;break}throw u.error;case 22:te=u.component,e.next=27;break;case 27:e.next=32;break;case 29:e.prev=29,e.t1=e.catch(11),i=e.t1;case 32:if(!window.__NEXT_PRELOADREADY){e.next=36;break}return e.next=36,window.__NEXT_PRELOADREADY(j);case 36:return t.router=V=(0,k.createRouter)(L,D,W,{initialProps:M,pageLoader:Y,App:Z,Component:te,wrapApp:me,err:i,isFallback:Boolean(B),subscription:function(e,t,r){return ae(Object.assign({},e,{App:t,scroll:r}))},locale:q,locales:H,defaultLocale:G,domainLocales:U,isPreview:X}),ae(c={App:Z,initial:!0,Component:te,props:M,err:i}),e.abrupt("return",ne);case 44:return e.abrupt("return",{emitter:ne,render:ae,renderCtx:c});case 45:case"end":return e.stop()}}),e,null,[[11,29]])})));return function(){return e.apply(this,arguments)}}();function ae(e){return ie.apply(this,arguments)}function ie(){return(ie=o(n.mark((function e(t){return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.err){e.next=4;break}return e.next=3,ue(t);case 3:return e.abrupt("return");case 4:return e.prev=4,e.next=7,he(t);case 7:e.next=16;break;case 9:if(e.prev=9,e.t0=e.catch(4),!e.t0.cancelled){e.next=13;break}throw e.t0;case 13:return e.next=16,ue((0,m.default)({},t,{err:e.t0}));case 16:case"end":return e.stop()}}),e,null,[[4,9]])})))).apply(this,arguments)}function ue(e){var t=e.App,r=e.err;return console.error(r),Y.loadPage("/_error").then((function(n){var o=n.page,a=n.styleSheets,i=me(t),u={Component:o,AppTree:i,router:V,ctx:{err:r,pathname:L,query:D,asPath:W,AppTree:i}};return Promise.resolve(e.props?e.props:(0,x.loadGetInitialProps)(t,u)).then((function(t){return he((0,m.default)({},e,{err:r,Component:o,styleSheets:a,props:t}))}))}))}t.default=oe;var ce="function"===typeof v.default.hydrate;function se(){x.ST&&(performance.mark("afterHydrate"),performance.measure("Next.js-before-hydration","navigationStart","beforeRender"),performance.measure("Next.js-hydration","beforeRender","afterHydrate"),K&&performance.getEntriesByName("Next.js-hydration").forEach(K),fe())}function le(){if(x.ST){performance.mark("afterRender");var e=performance.getEntriesByName("routeChange","mark");e.length&&(performance.measure("Next.js-route-change-to-render",e[0].name,"beforeRender"),performance.measure("Next.js-render","beforeRender","afterRender"),K&&(performance.getEntriesByName("Next.js-render").forEach(K),performance.getEntriesByName("Next.js-route-change-to-render").forEach(K)),fe(),["Next.js-route-change-to-render","Next.js-render"].forEach((function(e){return performance.clearMeasures(e)})))}}function fe(){["beforeRender","afterHydrate","afterRender","routeChange"].forEach((function(e){return performance.clearMarks(e)}))}function pe(e){var t=e.children;return h.default.createElement(re,{fn:function(e){return ue({App:Z,err:e}).catch((function(e){return console.error("Error rendering page: ",e)}))}},h.default.createElement(b.RouterContext.Provider,{value:(0,k.makePublicRouterInstance)(V)},h.default.createElement(y.HeadManagerContext.Provider,{value:$},t)))}var de,me=function(e){return function(t){var r=(0,m.default)({},t,{Component:te,err:R,router:V});return h.default.createElement(pe,null,h.default.createElement(e,r))}};function he(e){var t=e.App,r=e.Component,n=e.props,o=e.err,a="initial"in e?void 0:e.styleSheets;r=r||de.Component,n=n||de.props;var i=(0,m.default)({},n,{Component:r,err:o,router:V});de=i;var u,c=!1,s=new Promise((function(e,t){z&&z(),u=function(){z=null,e()},z=function(){c=!0,z=null;var e=new Error("Cancel rendering route");e.cancelled=!0,t(e)}}));var l,f,p=h.default.createElement(ve,{callback:function(){u()}},h.default.createElement(ye,{callback:function(){if(a&&!c){for(var t=new Set(a.map((function(e){return e.href}))),r=N(document.querySelectorAll("style[data-n-href]")),n=r.map((function(e){return e.getAttribute("data-n-href")})),o=0;o1&&void 0!==arguments[1]?arguments[1]:-1,delta:0,entries:[],id:n(),isFinal:!1}},a=function(e,t){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var r=new PerformanceObserver((function(e){return e.getEntries().map(t)}));return r.observe({type:e,buffered:!0}),r}}catch(e){}},i=!1,u=!1,c=function(e){i=!e.persisted},s=function(){addEventListener("pagehide",c),addEventListener("beforeunload",(function(){}))},l=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];u||(s(),u=!0),addEventListener("visibilitychange",(function(t){var r=t.timeStamp;"hidden"===document.visibilityState&&e({timeStamp:r,isUnloading:i})}),{capture:!0,once:t})},f=function(e,t,r,n){var o;return function(){r&&t.isFinal&&r.disconnect(),t.value>=0&&(n||t.isFinal||"hidden"===document.visibilityState)&&(t.delta=t.value-(o||0),(t.delta||t.isFinal||void 0===o)&&(e(t),o=t.value))}},p=function(){return void 0===t&&(t="hidden"===document.visibilityState?0:1/0,l((function(e){var r=e.timeStamp;return t=r}),!0)),{get timeStamp(){return t}}},d=function(){return r||(r=new Promise((function(e){return["scroll","keydown","pointerdown"].map((function(t){addEventListener(t,e,{once:!0,passive:!0,capture:!0})}))}))),r};e.getCLS=function(e){var t,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=o("CLS",0),i=function(e){e.hadRecentInput||(n.value+=e.value,n.entries.push(e),t())},u=a("layout-shift",i);u&&(t=f(e,n,u,r),l((function(e){var r=e.isUnloading;u.takeRecords().map(i),r&&(n.isFinal=!0),t()})))},e.getFCP=function(e){var t,r=o("FCP"),n=p(),i=a("paint",(function(e){"first-contentful-paint"===e.name&&e.startTime1&&void 0!==arguments[1]&&arguments[1],n=o("LCP"),i=p(),u=function(e){var r=e.startTime;r1&&t.some(Array.isArray)?t.flat(e-1):t},Array.prototype.flatMap=function(e,t){return this.map(e,t).flat()}),Promise.prototype.finally||(Promise.prototype.finally=function(e){if("function"!=typeof e)return this.then(e,e);var t=this.constructor||Promise;return this.then((function(r){return t.resolve(e()).then((function(){return r}))}),(function(r){return t.resolve(e()).then((function(){throw r}))}))})}},[["QOTr",0,1,2]]]); \ No newline at end of file diff --git a/smile/static/chunks/main-e088bf890857f0435a27.js b/smile/static/chunks/main-e088bf890857f0435a27.js index b8bf0ad..a8d0058 100644 --- a/smile/static/chunks/main-e088bf890857f0435a27.js +++ b/smile/static/chunks/main-e088bf890857f0435a27.js @@ -1 +1 @@ -_N_E=(window.webpackJsonp_N_E=window.webpackJsonp_N_E||[]).push([[4],{DCIx:function(e,t,r){"use strict";var n=r("lwsE"),a=r("W8MJ"),o=r("TTt4"),i=r("FzWm");t.__esModule=!0,t.default=void 0;var u=r("TTnN"),c=i(r("GpGG")),s=r("YKD2"),l=r("AO3j"),f=r("vuub"),p=o(r("pqeP"));function d(e){if("/"!==e[0])throw new Error('Route name should start with a "/", got "'.concat(e,'"'));return"/"===e?e:e.replace(/\/$/,"")}var m=function(){function e(t,r){n(this,e),this.buildId=void 0,this.assetPrefix=void 0,this.promisedSsgManifest=void 0,this.promisedDevPagesManifest=void 0,this.routeLoader=void 0,this.routeLoader=(0,p.default)(r),this.buildId=t,this.assetPrefix=r,this.promisedSsgManifest=new Promise((function(e){window.__SSG_MANIFEST?e(window.__SSG_MANIFEST):window.__SSG_MANIFEST_CB=function(){e(window.__SSG_MANIFEST)}}))}return a(e,[{key:"getPageList",value:function(){return(0,p.getClientBuildManifest)().then((function(e){return e.sortedPages}))}},{key:"getDataHref",value:function(e,t,r,n){var a=this,o=(0,l.parseRelativeUrl)(e),i=o.pathname,p=o.query,m=o.search,h=(0,l.parseRelativeUrl)(t).pathname,v=d(i),y=function(e){var t=(0,c.default)((0,f.removePathTrailingSlash)((0,u.addLocale)(e,n)),".json");return(0,u.addBasePath)("https://cdn.statically.io/gh/HiltonWS/hiltonws.github.io/master/smile/data/".concat(a.buildId).concat(t).concat(r?"":m))},g=(0,s.isDynamicRoute)(v),S=g?(0,u.interpolateAs)(i,h,p).result:"";return g?S&&y(S):y(v)}},{key:"_isSsg",value:function(e){var t=d((0,l.parseRelativeUrl)(e).pathname);return this.promisedSsgManifest.then((function(e){return e.has(t)}))}},{key:"loadPage",value:function(e){return this.routeLoader.loadRoute(e).then((function(e){if("component"in e)return{page:e.component,mod:e.exports,styleSheets:e.styles.map((function(e){return{href:e.href,text:e.content}}))};throw e.error}))}},{key:"prefetch",value:function(e){return this.routeLoader.prefetch(e)}}]),e}();t.default=m},IeIt:function(e,t,r){"use strict";t.__esModule=!0,t.default=function(){var e=null;return{mountedInstances:new Set,updateHead:function(t){var r=e=Promise.resolve().then((function(){if(r===e){e=null;var n={};t.forEach((function(e){var t=n[e.type]||[];t.push(e),n[e.type]=t}));var o=n.title?n.title[0]:null,i="";if(o){var u=o.props.children;i="string"===typeof u?u:Array.isArray(u)?u.join(""):""}i!==document.title&&(document.title=i),["meta","base","link","style","script"].forEach((function(e){!function(e,t){var r=document.getElementsByTagName("head")[0],n=r.querySelector("meta[name=next-head-count]");0;for(var o=Number(n.content),i=[],u=0,c=n.previousElementSibling;u0&&void 0!==s[0]?s[0]:{},e.next=4,Y.routeLoader.whenEntrypoint("/_app");case 4:if(!("error"in(r=e.sent))){e.next=7;break}throw r.error;case 7:a=r.component,o=r.exports,K=a,o&&o.reportWebVitals&&(Z=function(e){var t,r=e.id,n=e.name,a=e.startTime,i=e.value,u=e.duration,c=e.entryType,s=e.entries,l="".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12);s&&s.length&&(t=s[0].startTime),o.reportWebVitals({id:r||l,name:n,startTime:a||t,value:null==i?u:i,label:"mark"===c||"measure"===c?"custom":"web-vital"})}),i=M,e.prev=11,e.next=16;break;case 16:return e.next=18,Y.routeLoader.whenEntrypoint(L);case 18:e.t0=e.sent;case 19:if(!("error"in(u=e.t0))){e.next=22;break}throw u.error;case 22:te=u.component,e.next=27;break;case 27:e.next=32;break;case 29:e.prev=29,e.t1=e.catch(11),i=e.t1;case 32:if(!window.__NEXT_PRELOADREADY){e.next=36;break}return e.next=36,window.__NEXT_PRELOADREADY(q);case 36:return t.router=V=(0,C.createRouter)(L,D,W,{initialProps:R,pageLoader:Y,App:K,Component:te,wrapApp:me,err:i,isFallback:Boolean(j),subscription:function(e,t,r){return oe(Object.assign({},e,{App:t,scroll:r}))},locale:O,locales:H,defaultLocale:G,domainLocales:U,isPreview:X}),oe(c={App:K,initial:!0,Component:te,props:R,err:i}),e.abrupt("return",ne);case 44:return e.abrupt("return",{emitter:ne,render:oe,renderCtx:c});case 45:case"end":return e.stop()}}),e,null,[[11,29]])})));return function(){return e.apply(this,arguments)}}();function oe(e){return ie.apply(this,arguments)}function ie(){return(ie=a(n.mark((function e(t){return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.err){e.next=4;break}return e.next=3,ue(t);case 3:return e.abrupt("return");case 4:return e.prev=4,e.next=7,he(t);case 7:e.next=16;break;case 9:if(e.prev=9,e.t0=e.catch(4),!e.t0.cancelled){e.next=13;break}throw e.t0;case 13:return e.next=16,ue((0,m.default)({},t,{err:e.t0}));case 16:case"end":return e.stop()}}),e,null,[[4,9]])})))).apply(this,arguments)}function ue(e){var t=e.App,r=e.err;return console.error(r),Y.loadPage("/_error").then((function(n){var a=n.page,o=n.styleSheets,i=me(t),u={Component:a,AppTree:i,router:V,ctx:{err:r,pathname:L,query:D,asPath:W,AppTree:i}};return Promise.resolve(e.props?e.props:(0,T.loadGetInitialProps)(t,u)).then((function(t){return he((0,m.default)({},e,{err:r,Component:a,styleSheets:o,props:t}))}))}))}t.default=ae;var ce="function"===typeof v.default.hydrate;function se(){T.ST&&(performance.mark("afterHydrate"),performance.measure("Next.js-before-hydration","navigationStart","beforeRender"),performance.measure("Next.js-hydration","beforeRender","afterHydrate"),Z&&performance.getEntriesByName("Next.js-hydration").forEach(Z),fe())}function le(){if(T.ST){performance.mark("afterRender");var e=performance.getEntriesByName("routeChange","mark");e.length&&(performance.measure("Next.js-route-change-to-render",e[0].name,"beforeRender"),performance.measure("Next.js-render","beforeRender","afterRender"),Z&&(performance.getEntriesByName("Next.js-render").forEach(Z),performance.getEntriesByName("Next.js-route-change-to-render").forEach(Z)),fe(),["Next.js-route-change-to-render","Next.js-render"].forEach((function(e){return performance.clearMeasures(e)})))}}function fe(){["beforeRender","afterHydrate","afterRender","routeChange"].forEach((function(e){return performance.clearMarks(e)}))}function pe(e){var t=e.children;return h.default.createElement(re,{fn:function(e){return ue({App:K,err:e}).catch((function(e){return console.error("Error rendering page: ",e)}))}},h.default.createElement(S.RouterContext.Provider,{value:(0,C.makePublicRouterInstance)(V)},h.default.createElement(y.HeadManagerContext.Provider,{value:$},t)))}var de,me=function(e){return function(t){var r=(0,m.default)({},t,{Component:te,err:M,router:V});return h.default.createElement(pe,null,h.default.createElement(e,r))}};function he(e){var t=e.App,r=e.Component,n=e.props,a=e.err,o="initial"in e?void 0:e.styleSheets;r=r||de.Component,n=n||de.props;var i=(0,m.default)({},n,{Component:r,err:a,router:V});de=i;var u,c=!1,s=new Promise((function(e,t){z&&z(),u=function(){z=null,e()},z=function(){c=!0,z=null;var e=new Error("Cancel rendering route");e.cancelled=!0,t(e)}}));var l,f,p=h.default.createElement(ve,{callback:function(){u()}},h.default.createElement(ye,{callback:function(){if(o&&!c){for(var t=new Set(o.map((function(e){return e.href}))),r=k(document.querySelectorAll("style[data-n-href]")),n=r.map((function(e){return e.getAttribute("data-n-href")})),a=0;a1&&void 0!==arguments[1]?arguments[1]:-1,delta:0,entries:[],id:n(),isFinal:!1}},o=function(e,t){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var r=new PerformanceObserver((function(e){return e.getEntries().map(t)}));return r.observe({type:e,buffered:!0}),r}}catch(e){}},i=!1,u=!1,c=function(e){i=!e.persisted},s=function(){addEventListener("pagehide",c),addEventListener("beforeunload",(function(){}))},l=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];u||(s(),u=!0),addEventListener("visibilitychange",(function(t){var r=t.timeStamp;"hidden"===document.visibilityState&&e({timeStamp:r,isUnloading:i})}),{capture:!0,once:t})},f=function(e,t,r,n){var a;return function(){r&&t.isFinal&&r.disconnect(),t.value>=0&&(n||t.isFinal||"hidden"===document.visibilityState)&&(t.delta=t.value-(a||0),(t.delta||t.isFinal||void 0===a)&&(e(t),a=t.value))}},p=function(){return void 0===t&&(t="hidden"===document.visibilityState?0:1/0,l((function(e){var r=e.timeStamp;return t=r}),!0)),{get timeStamp(){return t}}},d=function(){return r||(r=new Promise((function(e){return["scroll","keydown","pointerdown"].map((function(t){addEventListener(t,e,{once:!0,passive:!0,capture:!0})}))}))),r};e.getCLS=function(e){var t,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=a("CLS",0),i=function(e){e.hadRecentInput||(n.value+=e.value,n.entries.push(e),t())},u=o("layout-shift",i);u&&(t=f(e,n,u,r),l((function(e){var r=e.isUnloading;u.takeRecords().map(i),r&&(n.isFinal=!0),t()})))},e.getFCP=function(e){var t,r=a("FCP"),n=p(),i=o("paint",(function(e){"first-contentful-paint"===e.name&&e.startTime1&&void 0!==arguments[1]&&arguments[1],n=a("LCP"),i=p(),u=function(e){var r=e.startTime;r1&&t.some(Array.isArray)?t.flat(e-1):t},Array.prototype.flatMap=function(e,t){return this.map(e,t).flat()}),Promise.prototype.finally||(Promise.prototype.finally=function(e){if("function"!=typeof e)return this.then(e,e);var t=this.constructor||Promise;return this.then((function(r){return t.resolve(e()).then((function(){return r}))}),(function(r){return t.resolve(e()).then((function(){throw r}))}))})}},[["QOTr",0,2,1]]]); \ No newline at end of file +_N_E=(window.webpackJsonp_N_E=window.webpackJsonp_N_E||[]).push([[4],{DCIx:function(e,t,r){"use strict";var n=r("lwsE"),a=r("W8MJ"),o=r("TTt4"),i=r("FzWm");t.__esModule=!0,t.default=void 0;var u=r("TTnN"),c=i(r("GpGG")),s=r("YKD2"),l=r("AO3j"),f=r("vuub"),p=o(r("pqeP"));function d(e){if("/"!==e[0])throw new Error('Route name should start with a "/", got "'.concat(e,'"'));return"/"===e?e:e.replace(/\/$/,"")}var m=function(){function e(t,r){n(this,e),this.buildId=void 0,this.assetPrefix=void 0,this.promisedSsgManifest=void 0,this.promisedDevPagesManifest=void 0,this.routeLoader=void 0,this.routeLoader=(0,p.default)(r),this.buildId=t,this.assetPrefix=r,this.promisedSsgManifest=new Promise((function(e){window.__SSG_MANIFEST?e(window.__SSG_MANIFEST):window.__SSG_MANIFEST_CB=function(){e(window.__SSG_MANIFEST)}}))}return a(e,[{key:"getPageList",value:function(){return(0,p.getClientBuildManifest)().then((function(e){return e.sortedPages}))}},{key:"getDataHref",value:function(e,t,r,n){var a=this,o=(0,l.parseRelativeUrl)(e),i=o.pathname,p=o.query,m=o.search,h=(0,l.parseRelativeUrl)(t).pathname,v=d(i),y=function(e){var t=(0,c.default)((0,f.removePathTrailingSlash)((0,u.addLocale)(e,n)),".json");return(0,u.addBasePath)("https://cdn.statically.io/gh/HiltonWS/hiltonws.github.io/1.1.1/smile/data/".concat(a.buildId).concat(t).concat(r?"":m))},g=(0,s.isDynamicRoute)(v),S=g?(0,u.interpolateAs)(i,h,p).result:"";return g?S&&y(S):y(v)}},{key:"_isSsg",value:function(e){var t=d((0,l.parseRelativeUrl)(e).pathname);return this.promisedSsgManifest.then((function(e){return e.has(t)}))}},{key:"loadPage",value:function(e){return this.routeLoader.loadRoute(e).then((function(e){if("component"in e)return{page:e.component,mod:e.exports,styleSheets:e.styles.map((function(e){return{href:e.href,text:e.content}}))};throw e.error}))}},{key:"prefetch",value:function(e){return this.routeLoader.prefetch(e)}}]),e}();t.default=m},IeIt:function(e,t,r){"use strict";t.__esModule=!0,t.default=function(){var e=null;return{mountedInstances:new Set,updateHead:function(t){var r=e=Promise.resolve().then((function(){if(r===e){e=null;var n={};t.forEach((function(e){var t=n[e.type]||[];t.push(e),n[e.type]=t}));var o=n.title?n.title[0]:null,i="";if(o){var u=o.props.children;i="string"===typeof u?u:Array.isArray(u)?u.join(""):""}i!==document.title&&(document.title=i),["meta","base","link","style","script"].forEach((function(e){!function(e,t){var r=document.getElementsByTagName("head")[0],n=r.querySelector("meta[name=next-head-count]");0;for(var o=Number(n.content),i=[],u=0,c=n.previousElementSibling;u0&&void 0!==s[0]?s[0]:{},e.next=4,Y.routeLoader.whenEntrypoint("/_app");case 4:if(!("error"in(r=e.sent))){e.next=7;break}throw r.error;case 7:a=r.component,o=r.exports,K=a,o&&o.reportWebVitals&&(Z=function(e){var t,r=e.id,n=e.name,a=e.startTime,i=e.value,u=e.duration,c=e.entryType,s=e.entries,l="".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12);s&&s.length&&(t=s[0].startTime),o.reportWebVitals({id:r||l,name:n,startTime:a||t,value:null==i?u:i,label:"mark"===c||"measure"===c?"custom":"web-vital"})}),i=M,e.prev=11,e.next=16;break;case 16:return e.next=18,Y.routeLoader.whenEntrypoint(L);case 18:e.t0=e.sent;case 19:if(!("error"in(u=e.t0))){e.next=22;break}throw u.error;case 22:te=u.component,e.next=27;break;case 27:e.next=32;break;case 29:e.prev=29,e.t1=e.catch(11),i=e.t1;case 32:if(!window.__NEXT_PRELOADREADY){e.next=36;break}return e.next=36,window.__NEXT_PRELOADREADY(q);case 36:return t.router=V=(0,C.createRouter)(L,D,W,{initialProps:R,pageLoader:Y,App:K,Component:te,wrapApp:me,err:i,isFallback:Boolean(j),subscription:function(e,t,r){return oe(Object.assign({},e,{App:t,scroll:r}))},locale:O,locales:H,defaultLocale:G,domainLocales:U,isPreview:X}),oe(c={App:K,initial:!0,Component:te,props:R,err:i}),e.abrupt("return",ne);case 44:return e.abrupt("return",{emitter:ne,render:oe,renderCtx:c});case 45:case"end":return e.stop()}}),e,null,[[11,29]])})));return function(){return e.apply(this,arguments)}}();function oe(e){return ie.apply(this,arguments)}function ie(){return(ie=a(n.mark((function e(t){return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.err){e.next=4;break}return e.next=3,ue(t);case 3:return e.abrupt("return");case 4:return e.prev=4,e.next=7,he(t);case 7:e.next=16;break;case 9:if(e.prev=9,e.t0=e.catch(4),!e.t0.cancelled){e.next=13;break}throw e.t0;case 13:return e.next=16,ue((0,m.default)({},t,{err:e.t0}));case 16:case"end":return e.stop()}}),e,null,[[4,9]])})))).apply(this,arguments)}function ue(e){var t=e.App,r=e.err;return console.error(r),Y.loadPage("/_error").then((function(n){var a=n.page,o=n.styleSheets,i=me(t),u={Component:a,AppTree:i,router:V,ctx:{err:r,pathname:L,query:D,asPath:W,AppTree:i}};return Promise.resolve(e.props?e.props:(0,T.loadGetInitialProps)(t,u)).then((function(t){return he((0,m.default)({},e,{err:r,Component:a,styleSheets:o,props:t}))}))}))}t.default=ae;var ce="function"===typeof v.default.hydrate;function se(){T.ST&&(performance.mark("afterHydrate"),performance.measure("Next.js-before-hydration","navigationStart","beforeRender"),performance.measure("Next.js-hydration","beforeRender","afterHydrate"),Z&&performance.getEntriesByName("Next.js-hydration").forEach(Z),fe())}function le(){if(T.ST){performance.mark("afterRender");var e=performance.getEntriesByName("routeChange","mark");e.length&&(performance.measure("Next.js-route-change-to-render",e[0].name,"beforeRender"),performance.measure("Next.js-render","beforeRender","afterRender"),Z&&(performance.getEntriesByName("Next.js-render").forEach(Z),performance.getEntriesByName("Next.js-route-change-to-render").forEach(Z)),fe(),["Next.js-route-change-to-render","Next.js-render"].forEach((function(e){return performance.clearMeasures(e)})))}}function fe(){["beforeRender","afterHydrate","afterRender","routeChange"].forEach((function(e){return performance.clearMarks(e)}))}function pe(e){var t=e.children;return h.default.createElement(re,{fn:function(e){return ue({App:K,err:e}).catch((function(e){return console.error("Error rendering page: ",e)}))}},h.default.createElement(S.RouterContext.Provider,{value:(0,C.makePublicRouterInstance)(V)},h.default.createElement(y.HeadManagerContext.Provider,{value:$},t)))}var de,me=function(e){return function(t){var r=(0,m.default)({},t,{Component:te,err:M,router:V});return h.default.createElement(pe,null,h.default.createElement(e,r))}};function he(e){var t=e.App,r=e.Component,n=e.props,a=e.err,o="initial"in e?void 0:e.styleSheets;r=r||de.Component,n=n||de.props;var i=(0,m.default)({},n,{Component:r,err:a,router:V});de=i;var u,c=!1,s=new Promise((function(e,t){z&&z(),u=function(){z=null,e()},z=function(){c=!0,z=null;var e=new Error("Cancel rendering route");e.cancelled=!0,t(e)}}));var l,f,p=h.default.createElement(ve,{callback:function(){u()}},h.default.createElement(ye,{callback:function(){if(o&&!c){for(var t=new Set(o.map((function(e){return e.href}))),r=k(document.querySelectorAll("style[data-n-href]")),n=r.map((function(e){return e.getAttribute("data-n-href")})),a=0;a1&&void 0!==arguments[1]?arguments[1]:-1,delta:0,entries:[],id:n(),isFinal:!1}},o=function(e,t){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var r=new PerformanceObserver((function(e){return e.getEntries().map(t)}));return r.observe({type:e,buffered:!0}),r}}catch(e){}},i=!1,u=!1,c=function(e){i=!e.persisted},s=function(){addEventListener("pagehide",c),addEventListener("beforeunload",(function(){}))},l=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];u||(s(),u=!0),addEventListener("visibilitychange",(function(t){var r=t.timeStamp;"hidden"===document.visibilityState&&e({timeStamp:r,isUnloading:i})}),{capture:!0,once:t})},f=function(e,t,r,n){var a;return function(){r&&t.isFinal&&r.disconnect(),t.value>=0&&(n||t.isFinal||"hidden"===document.visibilityState)&&(t.delta=t.value-(a||0),(t.delta||t.isFinal||void 0===a)&&(e(t),a=t.value))}},p=function(){return void 0===t&&(t="hidden"===document.visibilityState?0:1/0,l((function(e){var r=e.timeStamp;return t=r}),!0)),{get timeStamp(){return t}}},d=function(){return r||(r=new Promise((function(e){return["scroll","keydown","pointerdown"].map((function(t){addEventListener(t,e,{once:!0,passive:!0,capture:!0})}))}))),r};e.getCLS=function(e){var t,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=a("CLS",0),i=function(e){e.hadRecentInput||(n.value+=e.value,n.entries.push(e),t())},u=o("layout-shift",i);u&&(t=f(e,n,u,r),l((function(e){var r=e.isUnloading;u.takeRecords().map(i),r&&(n.isFinal=!0),t()})))},e.getFCP=function(e){var t,r=a("FCP"),n=p(),i=o("paint",(function(e){"first-contentful-paint"===e.name&&e.startTime1&&void 0!==arguments[1]&&arguments[1],n=a("LCP"),i=p(),u=function(e){var r=e.startTime;r1&&t.some(Array.isArray)?t.flat(e-1):t},Array.prototype.flatMap=function(e,t){return this.map(e,t).flat()}),Promise.prototype.finally||(Promise.prototype.finally=function(e){if("function"!=typeof e)return this.then(e,e);var t=this.constructor||Promise;return this.then((function(r){return t.resolve(e()).then((function(){return r}))}),(function(r){return t.resolve(e()).then((function(){throw r}))}))})}},[["QOTr",0,2,1]]]); \ No newline at end of file diff --git a/smile/static/chunks/main.js b/smile/static/chunks/main.js index 82ee7a2..9000648 100644 --- a/smile/static/chunks/main.js +++ b/smile/static/chunks/main.js @@ -2917,7 +2917,7 @@ function notDisplayed(_path) { }); } function notVisible(_path) { - // https://github.com/jquery/jquery-ui/blob/master/ui/core.js#L109-L114 + // https://github.com/jquery/jquery-ui/blob/1.1.1/ui/core.js#L109-L114 // NOTE: a nested element can reverse visibility:hidden|collapse by explicitly setting visibility:visible // NOTE: visibility can be ["", "visible", "hidden", "collapse"] var hidden = findIndex(_path, function (element) { @@ -3036,7 +3036,7 @@ function getImageOfArea(element) { var supports$2 = void 0; // https://developer.mozilla.org/en-US/docs/Web/HTML/Element/map // https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attr-usemap -// https://github.com/jquery/jquery-ui/blob/master/ui/core.js#L88-L107 +// https://github.com/jquery/jquery-ui/blob/1.1.1/ui/core.js#L88-L107 function isValidArea(context) { if (!supports$2) { supports$2 = _supports(); @@ -4196,7 +4196,7 @@ function queryTabsequence() { } return elements; } -// codes mostly cloned from https://github.com/keithamus/jwerty/blob/master/jwerty.js +// codes mostly cloned from https://github.com/keithamus/jwerty/blob/1.1.1/jwerty.js // deliberately not exposing characters like <,.-#* because they vary *wildly* // across keyboard layouts and may cause various problems // (e.g. "*" is "Shift +" on a German Mac keyboard) @@ -5297,7 +5297,7 @@ exports.noop = noop; exports.__esModule = true; var stacktrace_parser_1 = __webpack_require__(/*! stacktrace-parser */ "./node_modules/stacktrace-parser/dist/stack-trace-parser.esm.js"); -var regexNextStatic = /\https://cdn.statically.io/gh/HiltonWS/hiltonws.github.io/master/smile(\/static\/.+)/g; +var regexNextStatic = /\https://cdn.statically.io/gh/HiltonWS/hiltonws.github.io/1.1.1/smile(\/static\/.+)/g; function parseStack(stack) { var frames = stacktrace_parser_1.parse(stack); return frames.map(function (frame) { @@ -5629,7 +5629,7 @@ var React = __importStar(__webpack_require__(/*! react */ "./node_modules/react/ var noop_template_1 = __webpack_require__(/*! ../helpers/noop-template */ "./node_modules/@next/react-dev-overlay/lib/internal/helpers/noop-template.js"); function CssReset() { return (React.createElement("style", { dangerouslySetInnerHTML: { - __html: noop_template_1.noop(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n :host {\n all: initial;\n\n /* the direction property is not reset by 'all' */\n direction: ltr;\n }\n\n /*!\n * Bootstrap Reboot v4.4.1 (https://getbootstrap.com/)\n * Copyright 2011-2019 The Bootstrap Authors\n * Copyright 2011-2019 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)\n */\n *,\n *::before,\n *::after {\n box-sizing: border-box;\n }\n\n :host {\n font-family: sans-serif;\n line-height: 1.15;\n -webkit-text-size-adjust: 100%;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n }\n\n article,\n aside,\n figcaption,\n figure,\n footer,\n header,\n hgroup,\n main,\n nav,\n section {\n display: block;\n }\n\n :host {\n margin: 0;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,\n 'Helvetica Neue', Arial, 'Noto Sans', sans-serif,\n 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',\n 'Noto Color Emoji';\n font-size: 16px;\n font-weight: 400;\n line-height: 1.5;\n color: #212529;\n text-align: left;\n background-color: #fff;\n }\n\n [tabindex='-1']:focus:not(:focus-visible) {\n outline: 0 !important;\n }\n\n hr {\n box-sizing: content-box;\n height: 0;\n overflow: visible;\n }\n\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n margin-top: 0;\n margin-bottom: 8px;\n }\n\n p {\n margin-top: 0;\n margin-bottom: 16px;\n }\n\n abbr[title],\n abbr[data-original-title] {\n text-decoration: underline;\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n cursor: help;\n border-bottom: 0;\n -webkit-text-decoration-skip-ink: none;\n text-decoration-skip-ink: none;\n }\n\n address {\n margin-bottom: 16px;\n font-style: normal;\n line-height: inherit;\n }\n\n ol,\n ul,\n dl {\n margin-top: 0;\n margin-bottom: 16px;\n }\n\n ol ol,\n ul ul,\n ol ul,\n ul ol {\n margin-bottom: 0;\n }\n\n dt {\n font-weight: 700;\n }\n\n dd {\n margin-bottom: 8px;\n margin-left: 0;\n }\n\n blockquote {\n margin: 0 0 16px;\n }\n\n b,\n strong {\n font-weight: bolder;\n }\n\n small {\n font-size: 80%;\n }\n\n sub,\n sup {\n position: relative;\n font-size: 75%;\n line-height: 0;\n vertical-align: baseline;\n }\n\n sub {\n bottom: -0.25em;\n }\n\n sup {\n top: -0.5em;\n }\n\n a {\n color: #007bff;\n text-decoration: none;\n background-color: transparent;\n }\n\n a:hover {\n color: #0056b3;\n text-decoration: underline;\n }\n\n a:not([href]) {\n color: inherit;\n text-decoration: none;\n }\n\n a:not([href]):hover {\n color: inherit;\n text-decoration: none;\n }\n\n pre,\n code,\n kbd,\n samp {\n font-family: SFMono-Regular, Menlo, Monaco, Consolas,\n 'Liberation Mono', 'Courier New', monospace;\n font-size: 1em;\n }\n\n pre {\n margin-top: 0;\n margin-bottom: 16px;\n overflow: auto;\n }\n\n figure {\n margin: 0 0 16px;\n }\n\n img {\n vertical-align: middle;\n border-style: none;\n }\n\n svg {\n overflow: hidden;\n vertical-align: middle;\n }\n\n table {\n border-collapse: collapse;\n }\n\n caption {\n padding-top: 12px;\n padding-bottom: 12px;\n color: #6c757d;\n text-align: left;\n caption-side: bottom;\n }\n\n th {\n text-align: inherit;\n }\n\n label {\n display: inline-block;\n margin-bottom: 8px;\n }\n\n button {\n border-radius: 0;\n }\n\n button:focus {\n outline: 1px dotted;\n outline: 5px auto -webkit-focus-ring-color;\n }\n\n input,\n button,\n select,\n optgroup,\n textarea {\n margin: 0;\n font-family: inherit;\n font-size: inherit;\n line-height: inherit;\n }\n\n button,\n input {\n overflow: visible;\n }\n\n button,\n select {\n text-transform: none;\n }\n\n select {\n word-wrap: normal;\n }\n\n button,\n [type='button'],\n [type='reset'],\n [type='submit'] {\n -webkit-appearance: button;\n }\n\n button:not(:disabled),\n [type='button']:not(:disabled),\n [type='reset']:not(:disabled),\n [type='submit']:not(:disabled) {\n cursor: pointer;\n }\n\n button::-moz-focus-inner,\n [type='button']::-moz-focus-inner,\n [type='reset']::-moz-focus-inner,\n [type='submit']::-moz-focus-inner {\n padding: 0;\n border-style: none;\n }\n\n input[type='radio'],\n input[type='checkbox'] {\n box-sizing: border-box;\n padding: 0;\n }\n\n input[type='date'],\n input[type='time'],\n input[type='datetime-local'],\n input[type='month'] {\n -webkit-appearance: listbox;\n }\n\n textarea {\n overflow: auto;\n resize: vertical;\n }\n\n fieldset {\n min-width: 0;\n padding: 0;\n margin: 0;\n border: 0;\n }\n\n legend {\n display: block;\n width: 100%;\n max-width: 100%;\n padding: 0;\n margin-bottom: 8px;\n font-size: 24px;\n line-height: inherit;\n color: inherit;\n white-space: normal;\n }\n\n progress {\n vertical-align: baseline;\n }\n\n [type='number']::-webkit-inner-spin-button,\n [type='number']::-webkit-outer-spin-button {\n height: auto;\n }\n\n [type='search'] {\n outline-offset: -2px;\n -webkit-appearance: none;\n }\n\n [type='search']::-webkit-search-decoration {\n -webkit-appearance: none;\n }\n\n ::-webkit-file-upload-button {\n font: inherit;\n -webkit-appearance: button;\n }\n\n output {\n display: inline-block;\n }\n\n summary {\n display: list-item;\n cursor: pointer;\n }\n\n template {\n display: none;\n }\n\n [hidden] {\n display: none !important;\n }\n "], ["\n :host {\n all: initial;\n\n /* the direction property is not reset by 'all' */\n direction: ltr;\n }\n\n /*!\n * Bootstrap Reboot v4.4.1 (https://getbootstrap.com/)\n * Copyright 2011-2019 The Bootstrap Authors\n * Copyright 2011-2019 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)\n */\n *,\n *::before,\n *::after {\n box-sizing: border-box;\n }\n\n :host {\n font-family: sans-serif;\n line-height: 1.15;\n -webkit-text-size-adjust: 100%;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n }\n\n article,\n aside,\n figcaption,\n figure,\n footer,\n header,\n hgroup,\n main,\n nav,\n section {\n display: block;\n }\n\n :host {\n margin: 0;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,\n 'Helvetica Neue', Arial, 'Noto Sans', sans-serif,\n 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',\n 'Noto Color Emoji';\n font-size: 16px;\n font-weight: 400;\n line-height: 1.5;\n color: #212529;\n text-align: left;\n background-color: #fff;\n }\n\n [tabindex='-1']:focus:not(:focus-visible) {\n outline: 0 !important;\n }\n\n hr {\n box-sizing: content-box;\n height: 0;\n overflow: visible;\n }\n\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n margin-top: 0;\n margin-bottom: 8px;\n }\n\n p {\n margin-top: 0;\n margin-bottom: 16px;\n }\n\n abbr[title],\n abbr[data-original-title] {\n text-decoration: underline;\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n cursor: help;\n border-bottom: 0;\n -webkit-text-decoration-skip-ink: none;\n text-decoration-skip-ink: none;\n }\n\n address {\n margin-bottom: 16px;\n font-style: normal;\n line-height: inherit;\n }\n\n ol,\n ul,\n dl {\n margin-top: 0;\n margin-bottom: 16px;\n }\n\n ol ol,\n ul ul,\n ol ul,\n ul ol {\n margin-bottom: 0;\n }\n\n dt {\n font-weight: 700;\n }\n\n dd {\n margin-bottom: 8px;\n margin-left: 0;\n }\n\n blockquote {\n margin: 0 0 16px;\n }\n\n b,\n strong {\n font-weight: bolder;\n }\n\n small {\n font-size: 80%;\n }\n\n sub,\n sup {\n position: relative;\n font-size: 75%;\n line-height: 0;\n vertical-align: baseline;\n }\n\n sub {\n bottom: -0.25em;\n }\n\n sup {\n top: -0.5em;\n }\n\n a {\n color: #007bff;\n text-decoration: none;\n background-color: transparent;\n }\n\n a:hover {\n color: #0056b3;\n text-decoration: underline;\n }\n\n a:not([href]) {\n color: inherit;\n text-decoration: none;\n }\n\n a:not([href]):hover {\n color: inherit;\n text-decoration: none;\n }\n\n pre,\n code,\n kbd,\n samp {\n font-family: SFMono-Regular, Menlo, Monaco, Consolas,\n 'Liberation Mono', 'Courier New', monospace;\n font-size: 1em;\n }\n\n pre {\n margin-top: 0;\n margin-bottom: 16px;\n overflow: auto;\n }\n\n figure {\n margin: 0 0 16px;\n }\n\n img {\n vertical-align: middle;\n border-style: none;\n }\n\n svg {\n overflow: hidden;\n vertical-align: middle;\n }\n\n table {\n border-collapse: collapse;\n }\n\n caption {\n padding-top: 12px;\n padding-bottom: 12px;\n color: #6c757d;\n text-align: left;\n caption-side: bottom;\n }\n\n th {\n text-align: inherit;\n }\n\n label {\n display: inline-block;\n margin-bottom: 8px;\n }\n\n button {\n border-radius: 0;\n }\n\n button:focus {\n outline: 1px dotted;\n outline: 5px auto -webkit-focus-ring-color;\n }\n\n input,\n button,\n select,\n optgroup,\n textarea {\n margin: 0;\n font-family: inherit;\n font-size: inherit;\n line-height: inherit;\n }\n\n button,\n input {\n overflow: visible;\n }\n\n button,\n select {\n text-transform: none;\n }\n\n select {\n word-wrap: normal;\n }\n\n button,\n [type='button'],\n [type='reset'],\n [type='submit'] {\n -webkit-appearance: button;\n }\n\n button:not(:disabled),\n [type='button']:not(:disabled),\n [type='reset']:not(:disabled),\n [type='submit']:not(:disabled) {\n cursor: pointer;\n }\n\n button::-moz-focus-inner,\n [type='button']::-moz-focus-inner,\n [type='reset']::-moz-focus-inner,\n [type='submit']::-moz-focus-inner {\n padding: 0;\n border-style: none;\n }\n\n input[type='radio'],\n input[type='checkbox'] {\n box-sizing: border-box;\n padding: 0;\n }\n\n input[type='date'],\n input[type='time'],\n input[type='datetime-local'],\n input[type='month'] {\n -webkit-appearance: listbox;\n }\n\n textarea {\n overflow: auto;\n resize: vertical;\n }\n\n fieldset {\n min-width: 0;\n padding: 0;\n margin: 0;\n border: 0;\n }\n\n legend {\n display: block;\n width: 100%;\n max-width: 100%;\n padding: 0;\n margin-bottom: 8px;\n font-size: 24px;\n line-height: inherit;\n color: inherit;\n white-space: normal;\n }\n\n progress {\n vertical-align: baseline;\n }\n\n [type='number']::-webkit-inner-spin-button,\n [type='number']::-webkit-outer-spin-button {\n height: auto;\n }\n\n [type='search'] {\n outline-offset: -2px;\n -webkit-appearance: none;\n }\n\n [type='search']::-webkit-search-decoration {\n -webkit-appearance: none;\n }\n\n ::-webkit-file-upload-button {\n font: inherit;\n -webkit-appearance: button;\n }\n\n output {\n display: inline-block;\n }\n\n summary {\n display: list-item;\n cursor: pointer;\n }\n\n template {\n display: none;\n }\n\n [hidden] {\n display: none !important;\n }\n "]))) + __html: noop_template_1.noop(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n :host {\n all: initial;\n\n /* the direction property is not reset by 'all' */\n direction: ltr;\n }\n\n /*!\n * Bootstrap Reboot v4.4.1 (https://getbootstrap.com/)\n * Copyright 2011-2019 The Bootstrap Authors\n * Copyright 2011-2019 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/1.1.1/LICENSE)\n * Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/1.1.1/LICENSE.md)\n */\n *,\n *::before,\n *::after {\n box-sizing: border-box;\n }\n\n :host {\n font-family: sans-serif;\n line-height: 1.15;\n -webkit-text-size-adjust: 100%;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n }\n\n article,\n aside,\n figcaption,\n figure,\n footer,\n header,\n hgroup,\n main,\n nav,\n section {\n display: block;\n }\n\n :host {\n margin: 0;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,\n 'Helvetica Neue', Arial, 'Noto Sans', sans-serif,\n 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',\n 'Noto Color Emoji';\n font-size: 16px;\n font-weight: 400;\n line-height: 1.5;\n color: #212529;\n text-align: left;\n background-color: #fff;\n }\n\n [tabindex='-1']:focus:not(:focus-visible) {\n outline: 0 !important;\n }\n\n hr {\n box-sizing: content-box;\n height: 0;\n overflow: visible;\n }\n\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n margin-top: 0;\n margin-bottom: 8px;\n }\n\n p {\n margin-top: 0;\n margin-bottom: 16px;\n }\n\n abbr[title],\n abbr[data-original-title] {\n text-decoration: underline;\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n cursor: help;\n border-bottom: 0;\n -webkit-text-decoration-skip-ink: none;\n text-decoration-skip-ink: none;\n }\n\n address {\n margin-bottom: 16px;\n font-style: normal;\n line-height: inherit;\n }\n\n ol,\n ul,\n dl {\n margin-top: 0;\n margin-bottom: 16px;\n }\n\n ol ol,\n ul ul,\n ol ul,\n ul ol {\n margin-bottom: 0;\n }\n\n dt {\n font-weight: 700;\n }\n\n dd {\n margin-bottom: 8px;\n margin-left: 0;\n }\n\n blockquote {\n margin: 0 0 16px;\n }\n\n b,\n strong {\n font-weight: bolder;\n }\n\n small {\n font-size: 80%;\n }\n\n sub,\n sup {\n position: relative;\n font-size: 75%;\n line-height: 0;\n vertical-align: baseline;\n }\n\n sub {\n bottom: -0.25em;\n }\n\n sup {\n top: -0.5em;\n }\n\n a {\n color: #007bff;\n text-decoration: none;\n background-color: transparent;\n }\n\n a:hover {\n color: #0056b3;\n text-decoration: underline;\n }\n\n a:not([href]) {\n color: inherit;\n text-decoration: none;\n }\n\n a:not([href]):hover {\n color: inherit;\n text-decoration: none;\n }\n\n pre,\n code,\n kbd,\n samp {\n font-family: SFMono-Regular, Menlo, Monaco, Consolas,\n 'Liberation Mono', 'Courier New', monospace;\n font-size: 1em;\n }\n\n pre {\n margin-top: 0;\n margin-bottom: 16px;\n overflow: auto;\n }\n\n figure {\n margin: 0 0 16px;\n }\n\n img {\n vertical-align: middle;\n border-style: none;\n }\n\n svg {\n overflow: hidden;\n vertical-align: middle;\n }\n\n table {\n border-collapse: collapse;\n }\n\n caption {\n padding-top: 12px;\n padding-bottom: 12px;\n color: #6c757d;\n text-align: left;\n caption-side: bottom;\n }\n\n th {\n text-align: inherit;\n }\n\n label {\n display: inline-block;\n margin-bottom: 8px;\n }\n\n button {\n border-radius: 0;\n }\n\n button:focus {\n outline: 1px dotted;\n outline: 5px auto -webkit-focus-ring-color;\n }\n\n input,\n button,\n select,\n optgroup,\n textarea {\n margin: 0;\n font-family: inherit;\n font-size: inherit;\n line-height: inherit;\n }\n\n button,\n input {\n overflow: visible;\n }\n\n button,\n select {\n text-transform: none;\n }\n\n select {\n word-wrap: normal;\n }\n\n button,\n [type='button'],\n [type='reset'],\n [type='submit'] {\n -webkit-appearance: button;\n }\n\n button:not(:disabled),\n [type='button']:not(:disabled),\n [type='reset']:not(:disabled),\n [type='submit']:not(:disabled) {\n cursor: pointer;\n }\n\n button::-moz-focus-inner,\n [type='button']::-moz-focus-inner,\n [type='reset']::-moz-focus-inner,\n [type='submit']::-moz-focus-inner {\n padding: 0;\n border-style: none;\n }\n\n input[type='radio'],\n input[type='checkbox'] {\n box-sizing: border-box;\n padding: 0;\n }\n\n input[type='date'],\n input[type='time'],\n input[type='datetime-local'],\n input[type='month'] {\n -webkit-appearance: listbox;\n }\n\n textarea {\n overflow: auto;\n resize: vertical;\n }\n\n fieldset {\n min-width: 0;\n padding: 0;\n margin: 0;\n border: 0;\n }\n\n legend {\n display: block;\n width: 100%;\n max-width: 100%;\n padding: 0;\n margin-bottom: 8px;\n font-size: 24px;\n line-height: inherit;\n color: inherit;\n white-space: normal;\n }\n\n progress {\n vertical-align: baseline;\n }\n\n [type='number']::-webkit-inner-spin-button,\n [type='number']::-webkit-outer-spin-button {\n height: auto;\n }\n\n [type='search'] {\n outline-offset: -2px;\n -webkit-appearance: none;\n }\n\n [type='search']::-webkit-search-decoration {\n -webkit-appearance: none;\n }\n\n ::-webkit-file-upload-button {\n font: inherit;\n -webkit-appearance: button;\n }\n\n output {\n display: inline-block;\n }\n\n summary {\n display: list-item;\n cursor: pointer;\n }\n\n template {\n display: none;\n }\n\n [hidden] {\n display: none !important;\n }\n "], ["\n :host {\n all: initial;\n\n /* the direction property is not reset by 'all' */\n direction: ltr;\n }\n\n /*!\n * Bootstrap Reboot v4.4.1 (https://getbootstrap.com/)\n * Copyright 2011-2019 The Bootstrap Authors\n * Copyright 2011-2019 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/1.1.1/LICENSE)\n * Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/1.1.1/LICENSE.md)\n */\n *,\n *::before,\n *::after {\n box-sizing: border-box;\n }\n\n :host {\n font-family: sans-serif;\n line-height: 1.15;\n -webkit-text-size-adjust: 100%;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n }\n\n article,\n aside,\n figcaption,\n figure,\n footer,\n header,\n hgroup,\n main,\n nav,\n section {\n display: block;\n }\n\n :host {\n margin: 0;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,\n 'Helvetica Neue', Arial, 'Noto Sans', sans-serif,\n 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',\n 'Noto Color Emoji';\n font-size: 16px;\n font-weight: 400;\n line-height: 1.5;\n color: #212529;\n text-align: left;\n background-color: #fff;\n }\n\n [tabindex='-1']:focus:not(:focus-visible) {\n outline: 0 !important;\n }\n\n hr {\n box-sizing: content-box;\n height: 0;\n overflow: visible;\n }\n\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n margin-top: 0;\n margin-bottom: 8px;\n }\n\n p {\n margin-top: 0;\n margin-bottom: 16px;\n }\n\n abbr[title],\n abbr[data-original-title] {\n text-decoration: underline;\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n cursor: help;\n border-bottom: 0;\n -webkit-text-decoration-skip-ink: none;\n text-decoration-skip-ink: none;\n }\n\n address {\n margin-bottom: 16px;\n font-style: normal;\n line-height: inherit;\n }\n\n ol,\n ul,\n dl {\n margin-top: 0;\n margin-bottom: 16px;\n }\n\n ol ol,\n ul ul,\n ol ul,\n ul ol {\n margin-bottom: 0;\n }\n\n dt {\n font-weight: 700;\n }\n\n dd {\n margin-bottom: 8px;\n margin-left: 0;\n }\n\n blockquote {\n margin: 0 0 16px;\n }\n\n b,\n strong {\n font-weight: bolder;\n }\n\n small {\n font-size: 80%;\n }\n\n sub,\n sup {\n position: relative;\n font-size: 75%;\n line-height: 0;\n vertical-align: baseline;\n }\n\n sub {\n bottom: -0.25em;\n }\n\n sup {\n top: -0.5em;\n }\n\n a {\n color: #007bff;\n text-decoration: none;\n background-color: transparent;\n }\n\n a:hover {\n color: #0056b3;\n text-decoration: underline;\n }\n\n a:not([href]) {\n color: inherit;\n text-decoration: none;\n }\n\n a:not([href]):hover {\n color: inherit;\n text-decoration: none;\n }\n\n pre,\n code,\n kbd,\n samp {\n font-family: SFMono-Regular, Menlo, Monaco, Consolas,\n 'Liberation Mono', 'Courier New', monospace;\n font-size: 1em;\n }\n\n pre {\n margin-top: 0;\n margin-bottom: 16px;\n overflow: auto;\n }\n\n figure {\n margin: 0 0 16px;\n }\n\n img {\n vertical-align: middle;\n border-style: none;\n }\n\n svg {\n overflow: hidden;\n vertical-align: middle;\n }\n\n table {\n border-collapse: collapse;\n }\n\n caption {\n padding-top: 12px;\n padding-bottom: 12px;\n color: #6c757d;\n text-align: left;\n caption-side: bottom;\n }\n\n th {\n text-align: inherit;\n }\n\n label {\n display: inline-block;\n margin-bottom: 8px;\n }\n\n button {\n border-radius: 0;\n }\n\n button:focus {\n outline: 1px dotted;\n outline: 5px auto -webkit-focus-ring-color;\n }\n\n input,\n button,\n select,\n optgroup,\n textarea {\n margin: 0;\n font-family: inherit;\n font-size: inherit;\n line-height: inherit;\n }\n\n button,\n input {\n overflow: visible;\n }\n\n button,\n select {\n text-transform: none;\n }\n\n select {\n word-wrap: normal;\n }\n\n button,\n [type='button'],\n [type='reset'],\n [type='submit'] {\n -webkit-appearance: button;\n }\n\n button:not(:disabled),\n [type='button']:not(:disabled),\n [type='reset']:not(:disabled),\n [type='submit']:not(:disabled) {\n cursor: pointer;\n }\n\n button::-moz-focus-inner,\n [type='button']::-moz-focus-inner,\n [type='reset']::-moz-focus-inner,\n [type='submit']::-moz-focus-inner {\n padding: 0;\n border-style: none;\n }\n\n input[type='radio'],\n input[type='checkbox'] {\n box-sizing: border-box;\n padding: 0;\n }\n\n input[type='date'],\n input[type='time'],\n input[type='datetime-local'],\n input[type='month'] {\n -webkit-appearance: listbox;\n }\n\n textarea {\n overflow: auto;\n resize: vertical;\n }\n\n fieldset {\n min-width: 0;\n padding: 0;\n margin: 0;\n border: 0;\n }\n\n legend {\n display: block;\n width: 100%;\n max-width: 100%;\n padding: 0;\n margin-bottom: 8px;\n font-size: 24px;\n line-height: inherit;\n color: inherit;\n white-space: normal;\n }\n\n progress {\n vertical-align: baseline;\n }\n\n [type='number']::-webkit-inner-spin-button,\n [type='number']::-webkit-outer-spin-button {\n height: auto;\n }\n\n [type='search'] {\n outline-offset: -2px;\n -webkit-appearance: none;\n }\n\n [type='search']::-webkit-search-decoration {\n -webkit-appearance: none;\n }\n\n ::-webkit-file-upload-button {\n font: inherit;\n -webkit-appearance: button;\n }\n\n output {\n display: inline-block;\n }\n\n summary {\n display: list-item;\n cursor: pointer;\n }\n\n template {\n display: none;\n }\n\n [hidden] {\n display: none !important;\n }\n "]))) } })); } exports.CssReset = CssReset; @@ -6361,7 +6361,7 @@ module.exports = function () { /* WEBPACK VAR INJECTION */(function(global) {/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */ ;(function(root, factory) { - // https://github.com/umdjs/umd/blob/master/returnExports.js + // https://github.com/umdjs/umd/blob/1.1.1/returnExports.js if (true) { // For Node.js. module.exports = factory(root); @@ -6530,7 +6530,7 @@ function initializeBuildWatcher(toggleCallback) { var timeoutId = null; // Handle events var evtSource = (0, _eventsource.getEventSourceWrapper)({ - path: 'https://cdn.statically.io/gh/HiltonWS/hiltonws.github.io/master/smile/webpack-hmr' + path: 'https://cdn.statically.io/gh/HiltonWS/hiltonws.github.io/1.1.1/smile/webpack-hmr' }); evtSource.addMessageListener(function (event) { // This is the heartbeat event @@ -6856,7 +6856,7 @@ function formatMessage(message) { } var lines = message.split('\n'); // Strip Webpack-added headers off errors/warnings - // https://github.com/webpack/webpack/blob/master/lib/ModuleError.js + // https://github.com/webpack/webpack/blob/1.1.1/lib/ModuleError.js lines = lines.filter(function (line) { return !/Module [A-z ]+\(from/.test(line); @@ -8683,7 +8683,7 @@ function setupPing(assetPrefix, pathnameFn, retry) { exports.currentPage = currentPage = pathname; // close current EventSource connection closePing(); - var url = "".concat(assetPrefix, "https://cdn.statically.io/gh/HiltonWS/hiltonws.github.io/master/smile/webpack-hmr?page=").concat(currentPage); + var url = "".concat(assetPrefix, "https://cdn.statically.io/gh/HiltonWS/hiltonws.github.io/1.1.1/smile/webpack-hmr?page=").concat(currentPage); evtSource = (0, _eventsource.getEventSourceWrapper)({ path: url, timeout: 5000, @@ -8793,7 +8793,7 @@ var _hotDevClient = _interopRequireDefault(__webpack_require__(/*! ./error-overl var _default = function _default(_ref) { var assetPrefix = _ref.assetPrefix; var options = { - path: "".concat(assetPrefix, "https://cdn.statically.io/gh/HiltonWS/hiltonws.github.io/master/smile/webpack-hmr") + path: "".concat(assetPrefix, "https://cdn.statically.io/gh/HiltonWS/hiltonws.github.io/1.1.1/smile/webpack-hmr") }; var devClient = (0, _hotDevClient["default"])(options); devClient.subscribeToHmrEvent(function (obj) { @@ -9178,7 +9178,7 @@ var defaultLocale = data.defaultLocale; var prefix = assetPrefix || ''; // With dynamic assetPrefix it's no longer possible to set assetPrefix at the build time // So, this is how we do it in the client side at runtime -__webpack_require__.p = "".concat(prefix, "https://cdn.statically.io/gh/HiltonWS/hiltonws.github.io/master/smile/"); //eslint-disable-line +__webpack_require__.p = "".concat(prefix, "https://cdn.statically.io/gh/HiltonWS/hiltonws.github.io/1.1.1/smile/"); //eslint-disable-line // Initialize next/config with the environment configuration envConfig.setConfig({ @@ -10035,7 +10035,7 @@ window.next = next; function devPagesManifestListener(event) { if (event.data.indexOf('devPagesManifest') !== -1) { - fetch("".concat(prefix, "https://cdn.statically.io/gh/HiltonWS/hiltonws.github.io/master/smile/static/development/_devPagesManifest.json")).then(function (res) { + fetch("".concat(prefix, "https://cdn.statically.io/gh/HiltonWS/hiltonws.github.io/1.1.1/smile/static/development/_devPagesManifest.json")).then(function (res) { return res.json(); }).then(function (manifest) { window.__DEV_PAGES_MANIFEST = manifest; @@ -10302,7 +10302,7 @@ var PageLoader = /*#__PURE__*/function () { return window.__DEV_PAGES_MANIFEST.pages; } else { if (!this.promisedDevPagesManifest) { - this.promisedDevPagesManifest = fetch("".concat(this.assetPrefix, "https://cdn.statically.io/gh/HiltonWS/hiltonws.github.io/master/smile/static/development/_devPagesManifest.json")).then(function (res) { + this.promisedDevPagesManifest = fetch("".concat(this.assetPrefix, "https://cdn.statically.io/gh/HiltonWS/hiltonws.github.io/1.1.1/smile/static/development/_devPagesManifest.json")).then(function (res) { return res.json(); }).then(function (manifest) { ; @@ -10340,7 +10340,7 @@ var PageLoader = /*#__PURE__*/function () { var getHrefForSlug = function getHrefForSlug(path) { var dataRoute = (0, _getAssetPathFromRoute["default"])((0, _normalizeTrailingSlash.removePathTrailingSlash)((0, _router.addLocale)(path, locale)), '.json'); - return (0, _router.addBasePath)("https://cdn.statically.io/gh/HiltonWS/hiltonws.github.io/master/smile/data/".concat(_this.buildId).concat(dataRoute).concat(ssg ? '' : search)); + return (0, _router.addBasePath)("https://cdn.statically.io/gh/HiltonWS/hiltonws.github.io/1.1.1/smile/data/".concat(_this.buildId).concat(dataRoute).concat(ssg ? '' : search)); }; var isDynamic = (0, _isDynamic.isDynamicRoute)(route); @@ -10823,7 +10823,7 @@ function getClientBuildManifest() { function getFilesForRoute(assetPrefix, route) { if (true) { return Promise.resolve({ - scripts: [assetPrefix + 'https://cdn.statically.io/gh/HiltonWS/hiltonws.github.io/master/smile/static/chunks/pages' + encodeURI((0, _getAssetPathFromRoute["default"])(route, '.js'))], + scripts: [assetPrefix + 'https://cdn.statically.io/gh/HiltonWS/hiltonws.github.io/1.1.1/smile/static/chunks/pages' + encodeURI((0, _getAssetPathFromRoute["default"])(route, '.js'))], // Styles are handled by `style-loader` in development: css: [] }); @@ -10835,7 +10835,7 @@ function getFilesForRoute(assetPrefix, route) { } var allFiles = manifest[route].map(function (entry) { - return assetPrefix + 'https://cdn.statically.io/gh/HiltonWS/hiltonws.github.io/master/smile/' + encodeURI(entry); + return assetPrefix + 'https://cdn.statically.io/gh/HiltonWS/hiltonws.github.io/1.1.1/smile/' + encodeURI(entry); }); return { scripts: allFiles.filter(function (v) { diff --git a/smile/static/chunks/pages/_app.js b/smile/static/chunks/pages/_app.js index c7d29c9..4fb88eb 100644 --- a/smile/static/chunks/pages/_app.js +++ b/smile/static/chunks/pages/_app.js @@ -858,7 +858,7 @@ function getClientBuildManifest() { function getFilesForRoute(assetPrefix, route) { if (true) { return Promise.resolve({ - scripts: [assetPrefix + 'https://cdn.statically.io/gh/HiltonWS/hiltonws.github.io/master/smile/static/chunks/pages' + encodeURI((0, _getAssetPathFromRoute["default"])(route, '.js'))], + scripts: [assetPrefix + 'https://cdn.statically.io/gh/HiltonWS/hiltonws.github.io/1.1.1/smile/static/chunks/pages' + encodeURI((0, _getAssetPathFromRoute["default"])(route, '.js'))], // Styles are handled by `style-loader` in development: css: [] }); @@ -870,7 +870,7 @@ function getFilesForRoute(assetPrefix, route) { } var allFiles = manifest[route].map(function (entry) { - return assetPrefix + 'https://cdn.statically.io/gh/HiltonWS/hiltonws.github.io/master/smile/' + encodeURI(entry); + return assetPrefix + 'https://cdn.statically.io/gh/HiltonWS/hiltonws.github.io/1.1.1/smile/' + encodeURI(entry); }); return { scripts: allFiles.filter(function (v) { diff --git a/smile/static/chunks/pages/index-093fcb674434806aa3ef.js b/smile/static/chunks/pages/index-093fcb674434806aa3ef.js index a19805d..e92061f 100644 --- a/smile/static/chunks/pages/index-093fcb674434806aa3ef.js +++ b/smile/static/chunks/pages/index-093fcb674434806aa3ef.js @@ -1 +1 @@ -_N_E=(window.webpackJsonp_N_E=window.webpackJsonp_N_E||[]).push([[7],{"/0+H":function(t,e,n){"use strict";e.__esModule=!0,e.isInAmpMode=a,e.useAmp=function(){return a(o.default.useContext(i.AmpStateContext))};var r,o=(r=n("q1tI"))&&r.__esModule?r:{default:r},i=n("lwAK");function a(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.ampFirst,n=void 0!==e&&e,r=t.hybrid,o=void 0!==r&&r,i=t.hasQuery,a=void 0!==i&&i;return n||o&&a}},1:function(t,e){},2:function(t,e){},3:function(t,e){},"49sm":function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},"7qA8":function(t,e,n){"use strict";function r(t){var e="";if(!t)try{t=n(!function(){var t=new Error("Cannot find module 'fs'");throw t.code="MODULE_NOT_FOUND",t}())}catch(r){e=r.toString()}return{readFile:t?function(e){return new Promise((function(n,r){t.readFile(e,(function(t,e){return t?r(t):n(e)}))}))}:function(){throw new Error("readFile - failed to require fs in nodejs environment with error: "+e)}}}n.d(e,"a",(function(){return r}))},"8Kt/":function(t,e,n){"use strict";n("lSNA");e.__esModule=!0,e.defaultHead=f,e.default=void 0;var r,o=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==typeof t&&"function"!==typeof t)return{default:t};var e=u();if(e&&e.has(t))return e.get(t);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o)){var i=r?Object.getOwnPropertyDescriptor(t,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=t[o]}n.default=t,e&&e.set(t,n);return n}(n("q1tI")),i=(r=n("Xuae"))&&r.__esModule?r:{default:r},a=n("lwAK"),c=n("FYa8"),s=n("/0+H");function u(){if("function"!==typeof WeakMap)return null;var t=new WeakMap;return u=function(){return t},t}function f(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=[o.default.createElement("meta",{charSet:"utf-8"})];return t||e.push(o.default.createElement("meta",{name:"viewport",content:"width=device-width"})),e}function h(t,e){return"string"===typeof e||"number"===typeof e?t:e.type===o.default.Fragment?t.concat(o.default.Children.toArray(e.props.children).reduce((function(t,e){return"string"===typeof e||"number"===typeof e?t:t.concat(e)}),[])):t.concat(e)}var p=["name","httpEquiv","charSet","itemProp"];function l(t,e){return t.reduce((function(t,e){var n=o.default.Children.toArray(e.props.children);return t.concat(n)}),[]).reduce(h,[]).reverse().concat(f(e.inAmpMode)).filter(function(){var t=new Set,e=new Set,n=new Set,r={};return function(o){var i=!0,a=!1;if(o.key&&"number"!==typeof o.key&&o.key.indexOf("$")>0){a=!0;var c=o.key.slice(o.key.indexOf("$")+1);t.has(c)?i=!1:t.add(c)}switch(o.type){case"title":case"base":e.has(o.type)?i=!1:e.add(o.type);break;case"meta":for(var s=0,u=p.length;s=0||(o[n]=t[n]);return o}},"8oxB":function(t,e){var n,r,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function c(t){if(n===setTimeout)return setTimeout(t,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"===typeof setTimeout?setTimeout:i}catch(t){n=i}try{r="function"===typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var s,u=[],f=!1,h=-1;function p(){f&&s&&(f=!1,s.length?u=s.concat(u):h=-1,u.length&&l())}function l(){if(!f){var t=c(p);f=!0;for(var e=u.length;e;){for(s=u,u=[];++h1)for(var n=1;n0?a-4:a;for(n=0;n>16&255,s[f++]=e>>8&255,s[f++]=255&e;2===c&&(e=o[t.charCodeAt(n)]<<2|o[t.charCodeAt(n+1)]>>4,s[f++]=255&e);1===c&&(e=o[t.charCodeAt(n)]<<10|o[t.charCodeAt(n+1)]<<4|o[t.charCodeAt(n+2)]>>2,s[f++]=e>>8&255,s[f++]=255&e);return s},e.fromByteArray=function(t){for(var e,n=t.length,o=n%3,i=[],a=16383,c=0,s=n-o;cs?s:c+a));1===o?(e=t[n-1],i.push(r[e>>2]+r[e<<4&63]+"==")):2===o&&(e=(t[n-2]<<8)+t[n-1],i.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"="));return i.join("")};for(var r=[],o=[],i="undefined"!==typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=0,s=a.length;c0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function f(t,e,n){for(var o,i,a=[],c=e;c>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return a.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},HDXh:function(t,e,n){"use strict";(function(t){var r=n("H7XF"),o=n("kVK+"),i=n("49sm");function a(){return s.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function c(t,e){if(a()=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|t}function d(t,e){if(s.isBuffer(t))return t.length;if("undefined"!==typeof ArrayBuffer&&"function"===typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!==typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return W(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return U(t).length;default:if(r)return W(t).length;e=(""+e).toLowerCase(),r=!0}}function v(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return T(this,e,n);case"utf8":case"utf-8":return j(this,e,n);case"ascii":return S(this,e,n);case"latin1":case"binary":return A(this,e,n);case"base64":return E(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function m(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function b(t,e,n,r,o){if(0===t.length)return-1;if("string"===typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(o)return-1;n=t.length-1}else if(n<0){if(!o)return-1;n=0}if("string"===typeof e&&(e=s.from(e,r)),s.isBuffer(e))return 0===e.length?-1:g(t,e,n,r,o);if("number"===typeof e)return e&=255,s.TYPED_ARRAY_SUPPORT&&"function"===typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):g(t,[e],n,r,o);throw new TypeError("val must be string, number or Buffer")}function g(t,e,n,r,o){var i,a=1,c=t.length,s=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;a=2,c/=2,s/=2,n/=2}function u(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(o){var f=-1;for(i=n;ic&&(n=c-s),i=n;i>=0;i--){for(var h=!0,p=0;po&&(r=o):r=o;var i=e.length;if(i%2!==0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var a=0;a>8,o=n%256,i.push(o),i.push(r);return i}(e,t.length-n),t,n,r)}function E(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function j(t,e,n){n=Math.min(t.length,n);for(var r=[],o=e;o239?4:u>223?3:u>191?2:1;if(o+h<=n)switch(h){case 1:u<128&&(f=u);break;case 2:128===(192&(i=t[o+1]))&&(s=(31&u)<<6|63&i)>127&&(f=s);break;case 3:i=t[o+1],a=t[o+2],128===(192&i)&&128===(192&a)&&(s=(15&u)<<12|(63&i)<<6|63&a)>2047&&(s<55296||s>57343)&&(f=s);break;case 4:i=t[o+1],a=t[o+2],c=t[o+3],128===(192&i)&&128===(192&a)&&128===(192&c)&&(s=(15&u)<<18|(63&i)<<12|(63&a)<<6|63&c)>65535&&s<1114112&&(f=s)}null===f?(f=65533,h=1):f>65535&&(f-=65536,r.push(f>>>10&1023|55296),f=56320|1023&f),r.push(f),o+=h}return function(t){var e=t.length;if(e<=M)return String.fromCharCode.apply(String,t);var n="",r=0;for(;r0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),""},s.prototype.compare=function(t,e,n,r,o){if(!s.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),e<0||n>t.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&e>=n)return 0;if(r>=o)return-1;if(e>=n)return 1;if(this===t)return 0;for(var i=(o>>>=0)-(r>>>=0),a=(n>>>=0)-(e>>>=0),c=Math.min(i,a),u=this.slice(r,o),f=t.slice(e,n),h=0;ho)&&(n=o),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return y(this,t,e,n);case"utf8":case"utf-8":return w(this,t,e,n);case"ascii":return _(this,t,e,n);case"latin1":case"binary":return x(this,t,e,n);case"base64":return O(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,e,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var M=4096;function S(t,e,n){var r="";n=Math.min(t.length,n);for(var o=e;or)&&(n=r);for(var o="",i=e;in)throw new RangeError("Trying to access beyond buffer length")}function F(t,e,n,r,o,i){if(!s.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||et.length)throw new RangeError("Index out of range")}function L(t,e,n,r){e<0&&(e=65535+e+1);for(var o=0,i=Math.min(t.length-n,2);o>>8*(r?o:1-o)}function C(t,e,n,r){e<0&&(e=4294967295+e+1);for(var o=0,i=Math.min(t.length-n,4);o>>8*(r?o:3-o)&255}function R(t,e,n,r,o,i){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function k(t,e,n,r,i){return i||R(t,0,n,4),o.write(t,e,n,r,23,4),n+4}function B(t,e,n,r,i){return i||R(t,0,n,8),o.write(t,e,n,r,52,8),n+8}s.prototype.slice=function(t,e){var n,r=this.length;if((t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e0&&(o*=256);)r+=this[t+--e]*o;return r},s.prototype.readUInt8=function(t,e){return e||D(t,1,this.length),this[t]},s.prototype.readUInt16LE=function(t,e){return e||D(t,2,this.length),this[t]|this[t+1]<<8},s.prototype.readUInt16BE=function(t,e){return e||D(t,2,this.length),this[t]<<8|this[t+1]},s.prototype.readUInt32LE=function(t,e){return e||D(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},s.prototype.readUInt32BE=function(t,e){return e||D(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},s.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||D(t,e,this.length);for(var r=this[t],o=1,i=0;++i=(o*=128)&&(r-=Math.pow(2,8*e)),r},s.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||D(t,e,this.length);for(var r=e,o=1,i=this[t+--r];r>0&&(o*=256);)i+=this[t+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*e)),i},s.prototype.readInt8=function(t,e){return e||D(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},s.prototype.readInt16LE=function(t,e){e||D(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt16BE=function(t,e){e||D(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt32LE=function(t,e){return e||D(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},s.prototype.readInt32BE=function(t,e){return e||D(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},s.prototype.readFloatLE=function(t,e){return e||D(t,4,this.length),o.read(this,t,!0,23,4)},s.prototype.readFloatBE=function(t,e){return e||D(t,4,this.length),o.read(this,t,!1,23,4)},s.prototype.readDoubleLE=function(t,e){return e||D(t,8,this.length),o.read(this,t,!0,52,8)},s.prototype.readDoubleBE=function(t,e){return e||D(t,8,this.length),o.read(this,t,!1,52,8)},s.prototype.writeUIntLE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||F(this,t,e,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[e]=255&t;++i=0&&(i*=256);)this[e+o]=t/i&255;return e+n},s.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||F(this,t,e,1,255,0),s.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},s.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||F(this,t,e,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):L(this,t,e,!0),e+2},s.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||F(this,t,e,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):L(this,t,e,!1),e+2},s.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||F(this,t,e,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):C(this,t,e,!0),e+4},s.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||F(this,t,e,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):C(this,t,e,!1),e+4},s.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var o=Math.pow(2,8*n-1);F(this,t,e,n,o-1,-o)}var i=0,a=1,c=0;for(this[e]=255&t;++i>0)-c&255;return e+n},s.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var o=Math.pow(2,8*n-1);F(this,t,e,n,o-1,-o)}var i=n-1,a=1,c=0;for(this[e+i]=255&t;--i>=0&&(a*=256);)t<0&&0===c&&0!==this[e+i+1]&&(c=1),this[e+i]=(t/a>>0)-c&255;return e+n},s.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||F(this,t,e,1,127,-128),s.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},s.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||F(this,t,e,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):L(this,t,e,!0),e+2},s.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||F(this,t,e,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):L(this,t,e,!1),e+2},s.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||F(this,t,e,4,2147483647,-2147483648),s.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):C(this,t,e,!0),e+4},s.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||F(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):C(this,t,e,!1),e+4},s.prototype.writeFloatLE=function(t,e,n){return k(this,t,e,!0,n)},s.prototype.writeFloatBE=function(t,e,n){return k(this,t,e,!1,n)},s.prototype.writeDoubleLE=function(t,e,n){return B(this,t,e,!0,n)},s.prototype.writeDoubleBE=function(t,e,n){return B(this,t,e,!1,n)},s.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e=0;--o)t[o+e]=this[o+n];else if(i<1e3||!s.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"===typeof t)for(i=e;i55295&&n<57344){if(!o){if(n>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(e-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(e-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((e-=1)<0)break;i.push(n)}else if(n<2048){if((e-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function U(t){return r.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(N,"")).length<2)return"";for(;t.length%4!==0;)t+="=";return t}(t))}function H(t,e,n,r){for(var o=0;o=e.length||o>=t.length);++o)e[o+n]=t[o];return o}}).call(this,n("ntbh"))},Ijbi:function(t,e,n){var r=n("WkPL");t.exports=function(t){if(Array.isArray(t))return r(t)}},RIqP:function(t,e,n){var r=n("Ijbi"),o=n("EbDI"),i=n("ZhPi"),a=n("Bnag");t.exports=function(t){return r(t)||o(t)||i(t)||a()}},RNiq:function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return Ln}));var r=n("o0o1"),o=n.n(r),i=n("nKUr");function a(t,e,n,r,o,i,a){try{var c=t[i](a),s=c.value}catch(u){return void n(u)}c.done?e(s):Promise.resolve(s).then(r,o)}function c(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function c(t){a(i,r,o,c,s,"next",t)}function s(t){a(i,r,o,c,s,"throw",t)}c(void 0)}))}}var s=n("g4pe"),u=n.n(s),f=(n("Aiso"),n("Tred")),h=n.n(f),p=n("YFqc"),l=n.n(p);function d(t){var e=t.children;t.home;return Object(i.jsxs)("div",{className:h.a.container,children:[Object(i.jsx)(u.a,{children:Object(i.jsx)("link",{rel:"icon",href:"/favicon.ico"})}),Object(i.jsx)("header",{className:h.a.header}),Object(i.jsx)("main",{children:e}),Object(i.jsx)("div",{className:h.a.backToHome,children:Object(i.jsx)(l.a,{href:"/",children:Object(i.jsx)("a",{children:"\u2190 Back to home"})})})]})}var v=n("Z4Yb"),m=n.n(v),b=n("lT9W");function g(t,e,n){if(void 0===n&&(n=!1),t.beginPath(),e.slice(1).forEach((function(n,r){var o=n.x,i=n.y,a=e[r];t.moveTo(a.x,a.y),t.lineTo(o,i)})),n){var r=e[e.length-1],o=e[0];if(!r||!o)return;t.moveTo(r.x,r.y),t.lineTo(o.x,o.y)}t.stroke()}var y=n("mrSG"),w=function(){function t(t,e){if(!A(t)||!A(e))throw new Error("Dimensions.constructor - expected width and height to be valid numbers, instead have "+JSON.stringify({width:t,height:e}));this._width=t,this._height=e}return Object.defineProperty(t.prototype,"width",{get:function(){return this._width},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this._height},enumerable:!0,configurable:!0}),t.prototype.reverse=function(){return new t(1/this.width,1/this.height)},t}();function _(t,e){return t instanceof b.a&&t.shape.length===e}function x(t){return _(t,3)}function O(t){return _(t,4)}function P(t){return t%2===0}function E(t,e){void 0===e&&(e=2);var n=Math.pow(10,e);return Math.floor(t*n)/n}function j(t){return t&&t.width&&t.height}function M(t){return t.reduce((function(t,e){return t.add(e)}),new I(0,0)).div(new I(t.length,t.length))}function S(t,e,n){return Array(t).fill(0).map((function(t,r){return e+r*n}))}function A(t){return!!t&&t!==1/0&&t!==-1/0&&!isNaN(t)||0===t}function T(t){return A(t)&&0<=t&&t<=1}var I=function(){function t(t,e){this._x=t,this._y=e}return Object.defineProperty(t.prototype,"x",{get:function(){return this._x},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"y",{get:function(){return this._y},enumerable:!0,configurable:!0}),t.prototype.add=function(e){return new t(this.x+e.x,this.y+e.y)},t.prototype.sub=function(e){return new t(this.x-e.x,this.y-e.y)},t.prototype.mul=function(e){return new t(this.x*e.x,this.y*e.y)},t.prototype.div=function(e){return new t(this.x/e.x,this.y/e.y)},t.prototype.abs=function(){return new t(Math.abs(this.x),Math.abs(this.y))},t.prototype.magnitude=function(){return Math.sqrt(Math.pow(this.x,2)+Math.pow(this.y,2))},t.prototype.floor=function(){return new t(Math.floor(this.x),Math.floor(this.y))},t}(),D=function(){function t(e,n){void 0===n&&(n=!0);var r=e||{},o=[r.left,r.top,r.right,r.bottom].every(A),i=[r.x,r.y,r.width,r.height].every(A);if(!i&&!o)throw new Error("Box.constructor - expected box to be IBoundingBox | IRect, instead have "+JSON.stringify(r));var a=i?[r.x,r.y,r.width,r.height]:[r.left,r.top,r.right-r.left,r.bottom-r.top],c=a[0],s=a[1],u=a[2],f=a[3];t.assertIsValidBox({x:c,y:s,width:u,height:f},"Box.constructor",n),this._x=c,this._y=s,this._width=u,this._height=f}return t.isRect=function(t){return!!t&&[t.x,t.y,t.width,t.height].every(A)},t.assertIsValidBox=function(e,n,r){if(void 0===r&&(r=!1),!t.isRect(e))throw new Error(n+" - invalid box: "+JSON.stringify(e)+", expected object with properties x, y, width, height");if(!r&&(e.width<0||e.height<0))throw new Error(n+" - width ("+e.width+") and height ("+e.height+") must be positive numbers")},Object.defineProperty(t.prototype,"x",{get:function(){return this._x},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"y",{get:function(){return this._y},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this._width},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this._height},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"left",{get:function(){return this.x},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"top",{get:function(){return this.y},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){return this.x+this.width},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bottom",{get:function(){return this.y+this.height},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"area",{get:function(){return this.width*this.height},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"topLeft",{get:function(){return new I(this.left,this.top)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"topRight",{get:function(){return new I(this.right,this.top)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bottomLeft",{get:function(){return new I(this.left,this.bottom)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bottomRight",{get:function(){return new I(this.right,this.bottom)},enumerable:!0,configurable:!0}),t.prototype.round=function(){var e=[this.x,this.y,this.width,this.height].map((function(t){return Math.round(t)}));return new t({x:e[0],y:e[1],width:e[2],height:e[3]})},t.prototype.floor=function(){var e=[this.x,this.y,this.width,this.height].map((function(t){return Math.floor(t)}));return new t({x:e[0],y:e[1],width:e[2],height:e[3]})},t.prototype.toSquare=function(){var e=this,n=e.x,r=e.y,o=e.width,i=e.height,a=Math.abs(o-i);return oe&&(o=-s+e+n,s=e),u>t&&(i=-u+t+r,u=t),a<1&&(i=2-a,a=1),c<1&&(i=2-c,c=1),{dy:1,edy:i,dx:1,edx:o,y:c,ey:u,x:a,ex:s,w:n,h:r}},t.prototype.calibrate=function(e){return new t({left:this.left+e.left*this.width,top:this.top+e.top*this.height,right:this.right+e.right*this.width,bottom:this.bottom+e.bottom*this.height}).toSquare().round()},t}(),F=function(t){function e(e,n,r,o,i){return void 0===i&&(i=!1),t.call(this,{left:e,top:n,right:r,bottom:o},i)||this}return Object(y.c)(e,t),e}(D),L=function(){function t(t,e,n,r,o){this._imageDims=new w(o.width,o.height),this._score=t,this._classScore=e,this._className=n,this._box=new D(r).rescale(this._imageDims)}return Object.defineProperty(t.prototype,"score",{get:function(){return this._score},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"classScore",{get:function(){return this._classScore},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"className",{get:function(){return this._className},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"box",{get:function(){return this._box},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"imageDims",{get:function(){return this._imageDims},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"imageWidth",{get:function(){return this.imageDims.width},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"imageHeight",{get:function(){return this.imageDims.height},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"relativeBox",{get:function(){return new D(this._box).rescale(this.imageDims.reverse())},enumerable:!0,configurable:!0}),t.prototype.forSize=function(e,n){return new t(this.score,this.classScore,this.className,this.relativeBox,{width:e,height:n})},t}(),C=function(t){function e(e,n,r){return t.call(this,e,e,"",n,r)||this}return Object(y.c)(e,t),e.prototype.forSize=function(n,r){var o=t.prototype.forSize.call(this,n,r);return new e(o.score,o.relativeBox,o.imageDims)},e}(L);function R(t,e,n){void 0===n&&(n=!0);var r=Math.max(0,Math.min(t.right,e.right)-Math.max(t.left,e.left))*Math.max(0,Math.min(t.bottom,e.bottom)-Math.max(t.top,e.top));return n?r/(t.area+e.area-r):r/Math.min(t.area,e.area)}function k(t,e,n,r){void 0===r&&(r=!0);for(var o=e.map((function(t,e){return{score:t,boxIndex:e}})).sort((function(t,e){return t.score-e.score})).map((function(t){return t.boxIndex})),i=[],a=function(){var e=o.pop();i.push(e);for(var a=o,c=[],s=0;s0;)a();return i}function B(t,e){return b.L((function(){var n=e[0],r=e[1],o=e[2],i=b.n(Object(y.e)(t.shape.slice(0,3),[1]),n),a=b.n(Object(y.e)(t.shape.slice(0,3),[1]),r),c=b.n(Object(y.e)(t.shape.slice(0,3),[1]),o),s=b.h([i,a,c],3);return b.F(t,s)}))}function N(t){return 1/(1+Math.exp(-t))}var z=function(t){function e(e,n,r,o,i){return void 0===i&&(i=!1),t.call(this,{x:e,y:n,width:r,height:o},i)||this}return Object(y.c)(e,t),e}(D),W=function(){function t(t,e,n){void 0===n&&(n=new I(0,0));var r=e.width,o=e.height;this._imgDims=new w(r,o),this._shift=n,this._positions=t.map((function(t){return t.mul(new I(r,o)).add(n)}))}return Object.defineProperty(t.prototype,"shift",{get:function(){return new I(this._shift.x,this._shift.y)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"imageWidth",{get:function(){return this._imgDims.width},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"imageHeight",{get:function(){return this._imgDims.height},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"positions",{get:function(){return this._positions},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"relativePositions",{get:function(){var t=this;return this._positions.map((function(e){return e.sub(t._shift).div(new I(t.imageWidth,t.imageHeight))}))},enumerable:!0,configurable:!0}),t.prototype.forSize=function(t,e){return new this.constructor(this.relativePositions,{width:t,height:e})},t.prototype.shiftBy=function(t,e){return new this.constructor(this.relativePositions,this._imgDims,new I(t,e))},t.prototype.shiftByPoint=function(t){return this.shiftBy(t.x,t.y)},t.prototype.align=function(t,e){if(void 0===e&&(e={}),t){var n=t instanceof C?t.box.floor():new D(t);return this.shiftBy(n.x,n.y).align(null,e)}var r=Object.assign({},{useDlibAlignment:!1,minBoxPadding:.2},e),o=r.useDlibAlignment,i=r.minBoxPadding;return o?this.alignDlib():this.alignMinBbox(i)},t.prototype.alignDlib=function(){var t=this.getRefPointsForAlignment(),e=t[0],n=t[1],r=t[2],o=function(t){return r.sub(t).magnitude()},i=(o(e)+o(n))/2,a=Math.floor(i/.45),c=M(t),s=Math.floor(Math.max(0,c.x-.5*a)),u=Math.floor(Math.max(0,c.y-.43*a));return new z(s,u,Math.min(a,this.imageWidth+s),Math.min(a,this.imageHeight+u))},t.prototype.alignMinBbox=function(t){var e=function(t){var e=t.map((function(t){return t.x})),n=t.map((function(t){return t.y})),r=e.reduce((function(t,e){return e=3}function ht(t){var e=ot.getEnv(),n=e.Image,r=e.Video;return t instanceof n?new w(t.naturalWidth,t.naturalHeight):t instanceof r?new w(t.videoWidth,t.videoHeight):new w(t.width,t.height)}function pt(t){var e=t.width,n=t.height,r=(0,ot.getEnv().createCanvasElement)();return r.width=e,r.height=n,r}function lt(t,e){var n=ot.getEnv().ImageData;if(!(t instanceof n)&&!ft(t))throw new Error("createCanvasFromMedia - media has not finished loading yet");var r=e||ht(t),o=r.width,i=r.height,a=pt({width:o,height:i});return t instanceof n?at(a).putImageData(t,0,0):at(a).drawImage(t,0,0,o,i),a}function dt(t,e){return Object(y.b)(this,void 0,void 0,(function(){var n,r,o,i,a,c;return Object(y.d)(this,(function(s){switch(s.label){case 0:return n=e||ot.getEnv().createCanvasElement(),r=t.shape.slice(O(t)?1:0),o=r[0],i=r[1],a=r[2],c=b.L((function(){return t.as3D(o,i,a).toInt()})),[4,b.f.toPixels(c,n)];case 1:return s.sent(),c.dispose(),[2,n]}}))}))}function vt(t){var e=ot.getEnv(),n=e.Image,r=e.Canvas,o=e.Video;return t instanceof n||t instanceof r||t instanceof o}var mt=function(){function t(t,e){var n=this;if(void 0===e&&(e=!1),this._imageTensors=[],this._canvases=[],this._treatAsBatchInput=!1,this._inputDimensions=[],!Array.isArray(t))throw new Error("NetInput.constructor - expected inputs to be an Array of TResolvedNetInput or to be instanceof tf.Tensor4D, instead have "+t);this._treatAsBatchInput=e,this._batchSize=t.length,t.forEach((function(t,e){if(x(t))return n._imageTensors[e]=t,void(n._inputDimensions[e]=t.shape);if(O(t)){var r=t.shape[0];if(1!==r)throw new Error("NetInput - tf.Tensor4D with batchSize "+r+" passed, but not supported in input array");return n._imageTensors[e]=t,void(n._inputDimensions[e]=t.shape.slice(1))}var o=t instanceof ot.getEnv().Canvas?t:lt(t);n._canvases[e]=o,n._inputDimensions[e]=[o.height,o.width,3]}))}return Object.defineProperty(t.prototype,"imageTensors",{get:function(){return this._imageTensors},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"canvases",{get:function(){return this._canvases},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isBatchInput",{get:function(){return this.batchSize>1||this._treatAsBatchInput},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"batchSize",{get:function(){return this._batchSize},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"inputDimensions",{get:function(){return this._inputDimensions},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"inputSize",{get:function(){return this._inputSize},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"reshapedInputDimensions",{get:function(){var t=this;return S(this.batchSize,0,1).map((function(e,n){return t.getReshapedInputDimensions(n)}))},enumerable:!0,configurable:!0}),t.prototype.getInput=function(t){return this.canvases[t]||this.imageTensors[t]},t.prototype.getInputDimensions=function(t){return this._inputDimensions[t]},t.prototype.getInputHeight=function(t){return this._inputDimensions[t][0]},t.prototype.getInputWidth=function(t){return this._inputDimensions[t][1]},t.prototype.getReshapedInputDimensions=function(t){if("number"!==typeof this.inputSize)throw new Error("getReshapedInputDimensions - inputSize not set, toBatchTensor has not been called yet");return function(t,e){var n=t.width,r=t.height,o=e/Math.max(r,n);return new w(Math.round(n*o),Math.round(r*o))}({width:this.getInputWidth(t),height:this.getInputHeight(t)},this.inputSize)},t.prototype.toBatchTensor=function(t,e){var n=this;return void 0===e&&(e=!0),this._inputSize=t,b.L((function(){var r=S(n.batchSize,0,1).map((function(r){var o=n.getInput(r);if(o instanceof b.a){var i=O(o)?o:o.expandDims();return(i=function(t,e){return void 0===e&&(e=!1),b.L((function(){var n=t.shape.slice(1),r=n[0],o=n[1];if(r===o)return t;var i=Math.abs(r-o),a=Math.round(i*(e?.5:1)),c=r>o?2:1,s=function(e){var n=t.shape.slice();return n[c]=e,b.n(n,0)},u=s(a),f=i-u.shape[c],h=[e&&f?s(f):null,t,u].filter((function(t){return!!t})).map((function(t){return t.toFloat()}));return b.h(h,c)}))}(i,e)).shape[1]===t&&i.shape[2]===t||(i=b.o.resizeBilinear(i,[t,t])),i.as3D(t,t,3)}if(o instanceof ot.getEnv().Canvas)return b.f.fromPixels(function(t,e,n){void 0===n&&(n=!1);var r=ot.getEnv(),o=r.Image,i=r.Canvas;if(!(t instanceof o||t instanceof i))throw new Error("imageToSquare - expected arg0 to be HTMLImageElement | HTMLCanvasElement");var a=ht(t),c=e/Math.max(a.height,a.width),s=c*a.width,u=c*a.height,f=pt({width:e,height:e}),h=t instanceof i?t:lt(t),p=Math.abs(s-u)/2,l=n&&s1)throw new Error("extractFaces - batchSize > 1 not supported");return(i=o.getInput(0))instanceof n?(a=i,[3,4]):[3,2];case 2:return[4,dt(i)];case 3:a=s.sent(),s.label=4;case 4:r=a,s.label=5;case 5:return c=at(r),[2,e.map((function(t){return t instanceof C?t.forSize(r.width,r.height).box.floor():t})).map((function(t){return t.clipAtImageBorders(r.width,r.height)})).map((function(t){var e=t.x,n=t.y,r=t.width,o=t.height,i=pt({width:r,height:o});return at(i).putImageData(c.getImageData(e,n,r,o),0,0),i}))]}}))}))}function yt(t,e){return Object(y.b)(this,void 0,void 0,(function(){return Object(y.d)(this,(function(n){if(!x(t)&&!O(t))throw new Error("extractFaceTensors - expected image tensor to be 3D or 4D");if(O(t)&&t.shape[0]>1)throw new Error("extractFaceTensors - batchSize > 1 not supported");return[2,b.L((function(){var n=t.shape.slice(O(t)?1:0),r=n[0],o=n[1],i=n[2];return e.map((function(t){return t instanceof C?t.forSize(o,r).box:t})).map((function(t){return t.clipAtImageBorders(o,r)})).map((function(e){var n=e.x,a=e.y,c=e.width,s=e.height;return b.C(t.as3D(r,o,i),[a,n,0],[s,c,i])}))}))]}))}))}function wt(t,e){return Object(y.b)(this,void 0,void 0,(function(){var n;return Object(y.d)(this,(function(r){switch(r.label){case 0:return[4,(0,ot.getEnv().fetch)(t,e)];case 1:if(!((n=r.sent()).status<400))throw new Error("failed to fetch: ("+n.status+") "+n.statusText+", from url: "+n.url);return[2,n]}}))}))}function _t(t){return Object(y.b)(this,void 0,void 0,(function(){return Object(y.d)(this,(function(e){switch(e.label){case 0:return[4,wt(t)];case 1:return[2,e.sent().json()]}}))}))}function xt(t,e){var n=e+"-weights_manifest.json";if(!t)return{modelBaseUri:"",manifestUri:n};if("/"===t)return{modelBaseUri:"/",manifestUri:"/"+n};var r=t.startsWith("http://")?"http://":t.startsWith("https://")?"https://":"",o=(t=t.replace(r,"")).split("/").filter((function(t){return t})),i=t.endsWith(".json")?o[o.length-1]:n,a=r+(t.endsWith(".json")?o.slice(0,o.length-1):o).join("/");return{modelBaseUri:a=t.startsWith("/")?"/"+a:a,manifestUri:"/"===a?"/"+i:a+"/"+i}}function Ot(t,e){return Object(y.b)(this,void 0,void 0,(function(){var n,r,o,i;return Object(y.d)(this,(function(a){switch(a.label){case 0:return n=xt(t,e),r=n.manifestUri,o=n.modelBaseUri,[4,_t(r)];case 1:return i=a.sent(),[2,b.p.loadWeights(i,o)]}}))}))}var Pt=function(){function t(t){this._name=t,this._params=void 0,this._paramMappings=[]}return Object.defineProperty(t.prototype,"params",{get:function(){return this._params},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"paramMappings",{get:function(){return this._paramMappings},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isLoaded",{get:function(){return!!this.params},enumerable:!0,configurable:!0}),t.prototype.getParamFromPath=function(t){var e=this.traversePropertyPath(t);return e.obj[e.objProp]},t.prototype.reassignParamFromPath=function(t,e){var n=this.traversePropertyPath(t),r=n.obj,o=n.objProp;r[o].dispose(),r[o]=e},t.prototype.getParamList=function(){var t=this;return this._paramMappings.map((function(e){var n=e.paramPath;return{path:n,tensor:t.getParamFromPath(n)}}))},t.prototype.getTrainableParams=function(){return this.getParamList().filter((function(t){return t.tensor instanceof b.b}))},t.prototype.getFrozenParams=function(){return this.getParamList().filter((function(t){return!(t.tensor instanceof b.b)}))},t.prototype.variable=function(){var t=this;this.getFrozenParams().forEach((function(e){var n=e.path,r=e.tensor;t.reassignParamFromPath(n,r.variable())}))},t.prototype.freeze=function(){var t=this;this.getTrainableParams().forEach((function(e){var n=e.path,r=e.tensor,o=b.G(r.dataSync());r.dispose(),t.reassignParamFromPath(n,o)}))},t.prototype.dispose=function(t){void 0===t&&(t=!0),this.getParamList().forEach((function(e){if(t&&e.tensor.isDisposed)throw new Error("param tensor has already been disposed for path "+e.path);e.tensor.dispose()})),this._params=void 0},t.prototype.serializeParams=function(){return new Float32Array(this.getParamList().map((function(t){var e=t.tensor;return Array.from(e.dataSync())})).reduce((function(t,e){return t.concat(e)})))},t.prototype.load=function(t){return Object(y.b)(this,void 0,void 0,(function(){return Object(y.d)(this,(function(e){switch(e.label){case 0:return t instanceof Float32Array?(this.extractWeights(t),[2]):[4,this.loadFromUri(t)];case 1:return e.sent(),[2]}}))}))},t.prototype.loadFromUri=function(t){return Object(y.b)(this,void 0,void 0,(function(){var e;return Object(y.d)(this,(function(n){switch(n.label){case 0:if(t&&"string"!==typeof t)throw new Error(this._name+".loadFromUri - expected model uri");return[4,Ot(t,this.getDefaultModelName())];case 1:return e=n.sent(),this.loadFromWeightMap(e),[2]}}))}))},t.prototype.loadFromDisk=function(t){return Object(y.b)(this,void 0,void 0,(function(){var e,n,r,o,i,a,c,s,u,f;return Object(y.d)(this,(function(h){switch(h.label){case 0:if(t&&"string"!==typeof t)throw new Error(this._name+".loadFromDisk - expected model file path");return e=ot.getEnv().readFile,n=xt(t,this.getDefaultModelName()),r=n.manifestUri,o=n.modelBaseUri,i=function(t){return Promise.all(t.map((function(t){return e(t).then((function(t){return t.buffer}))})))},a=b.p.weightsLoaderFactory(i),u=(s=JSON).parse,[4,e(r)];case 1:return c=u.apply(s,[h.sent().toString()]),[4,a(c,o)];case 2:return f=h.sent(),this.loadFromWeightMap(f),[2]}}))}))},t.prototype.loadFromWeightMap=function(t){var e=this.extractParamsFromWeigthMap(t),n=e.paramMappings,r=e.params;this._paramMappings=n,this._params=r},t.prototype.extractWeights=function(t){var e=this.extractParams(t),n=e.paramMappings,r=e.params;this._paramMappings=n,this._params=r},t.prototype.traversePropertyPath=function(t){if(!this.params)throw new Error("traversePropertyPath - model has no loaded params");var e=t.split("/").reduce((function(e,n){if(!e.nextObj.hasOwnProperty(n))throw new Error("traversePropertyPath - object does not have property "+n+", for path "+t);return{obj:e.nextObj,objProp:n,nextObj:e.nextObj[n]}}),{nextObj:this.params}),n=e.obj,r=e.objProp;if(!n||!r||!(n[r]instanceof b.a))throw new Error("traversePropertyPath - parameter is not a tensor, for path "+t);return{obj:n,objProp:r}},t}();function Et(t,e,n){return b.L((function(){var r=b.z(t,e.depthwise_filter,e.pointwise_filter,n,"same");return r=b.c(r,e.bias)}))}function jt(t,e,n){return void 0===n&&(n=!1),b.L((function(){var r=b.w(n?b.c(b.i(t,e.conv0.filters,[2,2],"same"),e.conv0.bias):Et(t,e.conv0,[2,2])),o=Et(r,e.conv1,[1,1]),i=Et(b.w(b.c(r,o)),e.conv2,[1,1]);return b.w(b.c(r,b.c(o,i)))}))}function Mt(t,e,n,r){return void 0===n&&(n=!1),void 0===r&&(r=!0),b.L((function(){var o=b.w(n?b.c(b.i(t,e.conv0.filters,r?[2,2]:[1,1],"same"),e.conv0.bias):Et(t,e.conv0,r?[2,2]:[1,1])),i=Et(o,e.conv1,[1,1]),a=Et(b.w(b.c(o,i)),e.conv2,[1,1]),c=Et(b.w(b.c(o,b.c(i,a))),e.conv3,[1,1]);return b.w(b.c(o,b.c(i,b.c(a,c))))}))}function St(t,e,n,r){return void 0===n&&(n="same"),void 0===r&&(r=!1),b.L((function(){var o=b.c(b.i(t,e.filters,[1,1],n),e.bias);return r?b.w(o):o}))}function At(t,e){Object.keys(t).forEach((function(n){e.some((function(t){return t.originalPath===n}))||t[n].dispose()}))}function Tt(t,e){return function(n,r,o,i){var a=b.K(t(n*r*o*o),[o,o,n,r]),c=b.H(t(r));return e.push({paramPath:i+"/filters"},{paramPath:i+"/bias"}),{filters:a,bias:c}}}function It(t,e){return function(n,r,o){var i=b.I(t(n*r),[n,r]),a=b.H(t(r));return e.push({paramPath:o+"/weights"},{paramPath:o+"/bias"}),{weights:i,bias:a}}}var Dt=function(t,e,n){this.depthwise_filter=t,this.pointwise_filter=e,this.bias=n};function Ft(t,e){return function(n,r,o){var i=b.K(t(9*n),[3,3,n,1]),a=b.K(t(n*r),[1,1,n,r]),c=b.H(t(r));return e.push({paramPath:o+"/depthwise_filter"},{paramPath:o+"/pointwise_filter"},{paramPath:o+"/bias"}),new Dt(i,a,c)}}function Lt(t){return function(e){var n=t(e+"/depthwise_filter",4),r=t(e+"/pointwise_filter",4),o=t(e+"/bias",1);return new Dt(n,r,o)}}function Ct(t,e){return function(n,r,o){var i=t[n];if(!_(i,r))throw new Error("expected weightMap["+n+"] to be a Tensor"+r+"D, instead have "+i);return e.push({originalPath:n,paramPath:o||n}),i}}function Rt(t){var e=t;return{extractWeights:function(t){var n=e.slice(0,t);return e=e.slice(t),n},getRemainingWeights:function(){return e}}}function kt(t,e){var n=Tt(t,e),r=Ft(t,e);function o(t,e,o,i){return void 0===i&&(i=!1),{conv0:i?n(t,e,3,o+"/conv0"):r(t,e,o+"/conv0"),conv1:r(e,e,o+"/conv1"),conv2:r(e,e,o+"/conv2")}}return{extractDenseBlock3Params:o,extractDenseBlock4Params:function(t,e,n,i){void 0===i&&(i=!1);var a=o(t,e,n,i);return{conv0:a.conv0,conv1:a.conv1,conv2:a.conv2,conv3:r(e,e,n+"/conv3")}}}}function Bt(t){return function(e){return{filters:t(e+"/filters",4),bias:t(e+"/bias",1)}}}function Nt(t,e){var n=Ct(t,e),r=Bt(n),o=Lt(n);return{extractDenseBlock3Params:function(t,e){return void 0===e&&(e=!1),{conv0:e?r(t+"/conv0"):o(t+"/conv0"),conv1:o(t+"/conv1"),conv2:o(t+"/conv2")}},extractDenseBlock4Params:function(t,e){return void 0===e&&(e=!1),{conv0:e?r(t+"/conv0"):o(t+"/conv0"),conv1:o(t+"/conv1"),conv2:o(t+"/conv2"),conv3:o(t+"/conv3")}}}}var zt=function(t){function e(){return t.call(this,"FaceFeatureExtractor")||this}return Object(y.c)(e,t),e.prototype.forwardInput=function(t){var e=this.params;if(!e)throw new Error("FaceFeatureExtractor - load model before inference");return b.L((function(){var n=Mt(B(t.toBatchTensor(112,!0),[122.782,117.001,104.298]).div(b.y(255)),e.dense0,!0);return n=Mt(n,e.dense1),n=Mt(n,e.dense2),n=Mt(n,e.dense3),n=b.d(n,[7,7],[2,2],"valid")}))},e.prototype.forward=function(t){return Object(y.b)(this,void 0,void 0,(function(){var e;return Object(y.d)(this,(function(n){switch(n.label){case 0:return e=this.forwardInput,[4,bt(t)];case 1:return[2,e.apply(this,[n.sent()])]}}))}))},e.prototype.getDefaultModelName=function(){return"face_feature_extractor_model"},e.prototype.extractParamsFromWeigthMap=function(t){return function(t){var e=[],n=Nt(t,e).extractDenseBlock4Params,r={dense0:n("dense0",!0),dense1:n("dense1"),dense2:n("dense2"),dense3:n("dense3")};return At(t,e),{params:r,paramMappings:e}}(t)},e.prototype.extractParams=function(t){return function(t){var e=[],n=Rt(t),r=n.extractWeights,o=n.getRemainingWeights,i=kt(r,e).extractDenseBlock4Params,a=i(3,32,"dense0",!0),c=i(32,64,"dense1"),s=i(64,128,"dense2"),u=i(128,256,"dense3");if(0!==o().length)throw new Error("weights remaing after extract: "+o().length);return{paramMappings:e,params:{dense0:a,dense1:c,dense2:s,dense3:u}}}(t)},e}(Pt);function Wt(t,e){return b.L((function(){return b.c(b.q(t,e.weights),e.bias)}))}function Ut(t){var e={},n={};return Object.keys(t).forEach((function(r){(r.startsWith("fc")?n:e)[r]=t[r]})),{featureExtractorMap:e,classifierMap:n}}var Ht=function(t){function e(e,n){var r=t.call(this,e)||this;return r._faceFeatureExtractor=n,r}return Object(y.c)(e,t),Object.defineProperty(e.prototype,"faceFeatureExtractor",{get:function(){return this._faceFeatureExtractor},enumerable:!0,configurable:!0}),e.prototype.runNet=function(t){var e=this,n=this.params;if(!n)throw new Error(this._name+" - load model before inference");return b.L((function(){var r=t instanceof mt?e.faceFeatureExtractor.forwardInput(t):t;return Wt(r.as2D(r.shape[0],-1),n.fc)}))},e.prototype.dispose=function(e){void 0===e&&(e=!0),this.faceFeatureExtractor.dispose(e),t.prototype.dispose.call(this,e)},e.prototype.loadClassifierParams=function(t){var e=this.extractClassifierParams(t),n=e.params,r=e.paramMappings;this._params=n,this._paramMappings=r},e.prototype.extractClassifierParams=function(t){return function(t,e,n){var r=[],o=Rt(t),i=o.extractWeights,a=o.getRemainingWeights,c=It(i,r)(e,n,"fc");if(0!==a().length)throw new Error("weights remaing after extract: "+a().length);return{paramMappings:r,params:{fc:c}}}(t,this.getClassifierChannelsIn(),this.getClassifierChannelsOut())},e.prototype.extractParamsFromWeigthMap=function(t){var e=Ut(t),n=e.featureExtractorMap,r=e.classifierMap;return this.faceFeatureExtractor.loadFromWeightMap(n),function(t){var e,n=[],r=Ct(t,n),o={fc:(e="fc",{weights:r(e+"/weights",2),bias:r(e+"/bias",1)})};return At(t,n),{params:o,paramMappings:n}}(r)},e.prototype.extractParams=function(t){var e=this.getClassifierChannelsIn(),n=this.getClassifierChannelsOut(),r=n*e+n,o=t.slice(0,t.length-r),i=t.slice(t.length-r);return this.faceFeatureExtractor.extractWeights(o),this.extractClassifierParams(i)},e}(Pt),Yt=["neutral","happy","sad","angry","fearful","disgusted","surprised"],qt=function(){function t(t){var e=this;if(7!==t.length)throw new Error("FaceExpressions.constructor - expected probabilities.length to be 7, have: "+t.length);Yt.forEach((function(n,r){e[n]=t[r]}))}return t.prototype.asSortedArray=function(){var t=this;return Yt.map((function(e){return{expression:e,probability:t[e]}})).sort((function(t,e){return e.probability-t.probability}))},t}(),Vt=function(t){function e(e){return void 0===e&&(e=new zt),t.call(this,"FaceExpressionNet",e)||this}return Object(y.c)(e,t),e.prototype.forwardInput=function(t){var e=this;return b.L((function(){return b.D(e.runNet(t))}))},e.prototype.forward=function(t){return Object(y.b)(this,void 0,void 0,(function(){var e;return Object(y.d)(this,(function(n){switch(n.label){case 0:return e=this.forwardInput,[4,bt(t)];case 1:return[2,e.apply(this,[n.sent()])]}}))}))},e.prototype.predictExpressions=function(t){return Object(y.b)(this,void 0,void 0,(function(){var e,n,r,o,i=this;return Object(y.d)(this,(function(a){switch(a.label){case 0:return[4,bt(t)];case 1:return e=a.sent(),[4,this.forwardInput(e)];case 2:return n=a.sent(),[4,Promise.all(b.O(n).map((function(t){return Object(y.b)(i,void 0,void 0,(function(){var e;return Object(y.d)(this,(function(n){switch(n.label){case 0:return[4,t.data()];case 1:return e=n.sent(),t.dispose(),[2,e]}}))}))})))];case 3:return r=a.sent(),n.dispose(),o=r.map((function(t){return new qt(t)})),[2,e.isBatchInput?o:o[0]]}}))}))},e.prototype.getDefaultModelName=function(){return"face_expression_model"},e.prototype.getClassifierChannelsIn=function(){return 256},e.prototype.getClassifierChannelsOut=function(){return 7},e}(Ht);function Gt(t,e){var n={expressions:e};return Object.assign({},t,n)}function Jt(t){return G(t)&&t.landmarks instanceof W&&t.unshiftedLandmarks instanceof W&&t.alignedRect instanceof C}function Kt(t,e){var n=t.detection.box,r=e.shiftBy(n.x,n.y),o=r.align(),i=t.detection.imageDims,a={landmarks:r,unshiftedLandmarks:e,alignedRect:new C(t.detection.score,o.rescale(i.reverse()),i)};return Object.assign({},t,a)}var Xt=function(t){void 0===t&&(t={});var e=t.drawLines,n=void 0===e||e,r=t.drawPoints,o=void 0===r||r,i=t.lineWidth,a=t.lineColor,c=t.pointSize,s=t.pointColor;this.drawLines=n,this.drawPoints=o,this.lineWidth=i||1,this.pointSize=c||2,this.lineColor=a||"rgba(0, 255, 255, 1)",this.pointColor=s||"rgba(255, 0, 255, 1)"};!function(){function t(t,e){void 0===e&&(e={}),this.faceLandmarks=t,this.options=new Xt(e)}t.prototype.draw=function(t){var e=at(t),n=this.options,r=n.drawLines,o=n.drawPoints,i=n.lineWidth,a=n.lineColor,c=n.pointSize,s=n.pointColor;if(r&&this.faceLandmarks instanceof H&&(e.strokeStyle=a,e.lineWidth=i,g(e,this.faceLandmarks.getJawOutline()),g(e,this.faceLandmarks.getLeftEyeBrow()),g(e,this.faceLandmarks.getRightEyeBrow()),g(e,this.faceLandmarks.getNose()),g(e,this.faceLandmarks.getLeftEye(),!0),g(e,this.faceLandmarks.getRightEye(),!0),g(e,this.faceLandmarks.getMouth(),!0)),o){e.strokeStyle=s,e.fillStyle=s;this.faceLandmarks.positions.forEach((function(t){e.beginPath(),e.arc(t.x,t.y,c,0,2*Math.PI),e.fill()}))}}}();function Zt(t,e){var n=[],r=Rt(t),o=r.extractWeights,i=r.getRemainingWeights,a=function(t,e){var n=Tt(t,e),r=Ft(t,e);return{extractConvParams:n,extractSeparableConvParams:r,extractReductionBlockParams:function(t,e,o){return{separable_conv0:r(t,e,o+"/separable_conv0"),separable_conv1:r(e,e,o+"/separable_conv1"),expansion_conv:n(t,e,1,o+"/expansion_conv")}},extractMainBlockParams:function(t,e){return{separable_conv0:r(t,t,e+"/separable_conv0"),separable_conv1:r(t,t,e+"/separable_conv1"),separable_conv2:r(t,t,e+"/separable_conv2")}}}}(o,n),c=a.extractConvParams,s=a.extractSeparableConvParams,u=a.extractReductionBlockParams,f=a.extractMainBlockParams,h={conv_in:c(3,32,3,"entry_flow/conv_in"),reduction_block_0:u(32,64,"entry_flow/reduction_block_0"),reduction_block_1:u(64,128,"entry_flow/reduction_block_1")},p={};S(e,0,1).forEach((function(t){p["main_block_"+t]=f(128,"middle_flow/main_block_"+t)}));var l={reduction_block:u(128,256,"exit_flow/reduction_block"),separable_conv:s(256,512,"exit_flow/separable_conv")};if(0!==i().length)throw new Error("weights remaing after extract: "+i().length);return{paramMappings:n,params:{entry_flow:h,middle_flow:p,exit_flow:l}}}function Qt(t,e){var n=[],r=function(t,e){var n=Ct(t,e),r=Bt(n),o=Lt(n);return{extractConvParams:r,extractSeparableConvParams:o,extractReductionBlockParams:function(t){return{separable_conv0:o(t+"/separable_conv0"),separable_conv1:o(t+"/separable_conv1"),expansion_conv:r(t+"/expansion_conv")}},extractMainBlockParams:function(t){return{separable_conv0:o(t+"/separable_conv0"),separable_conv1:o(t+"/separable_conv1"),separable_conv2:o(t+"/separable_conv2")}}}}(t,n),o=r.extractConvParams,i=r.extractSeparableConvParams,a=r.extractReductionBlockParams,c=r.extractMainBlockParams,s={conv_in:o("entry_flow/conv_in"),reduction_block_0:a("entry_flow/reduction_block_0"),reduction_block_1:a("entry_flow/reduction_block_1")},u={};S(e,0,1).forEach((function(t){u["main_block_"+t]=c("middle_flow/main_block_"+t)}));var f={reduction_block:a("exit_flow/reduction_block"),separable_conv:i("exit_flow/separable_conv")};return At(t,n),{params:{entry_flow:s,middle_flow:u,exit_flow:f},paramMappings:n}}function $t(t,e,n){return b.c(b.i(t,e.filters,n,"same"),e.bias)}function te(t,e,n){void 0===n&&(n=!0);var r=n?b.w(t):t;return r=Et(r,e.separable_conv0,[1,1]),r=Et(b.w(r),e.separable_conv1,[1,1]),r=b.s(r,[3,3],[2,2],"same"),r=b.c(r,$t(t,e.expansion_conv,[2,2]))}var ee,ne=function(t){function e(e){var n=t.call(this,"TinyXception")||this;return n._numMainBlocks=e,n}return Object(y.c)(e,t),e.prototype.forwardInput=function(t){var e=this,n=this.params;if(!n)throw new Error("TinyXception - load model before inference");return b.L((function(){var r=B(t.toBatchTensor(112,!0),[122.782,117.001,104.298]).div(b.y(256)),o=b.w($t(r,n.entry_flow.conv_in,[2,2]));return o=te(o,n.entry_flow.reduction_block_0,!1),o=te(o,n.entry_flow.reduction_block_1),S(e._numMainBlocks,0,1).forEach((function(t){o=function(t,e){var n=Et(b.w(t),e.separable_conv0,[1,1]);return n=Et(b.w(n),e.separable_conv1,[1,1]),n=Et(b.w(n),e.separable_conv2,[1,1]),b.c(n,t)}(o,n.middle_flow["main_block_"+t])})),o=te(o,n.exit_flow.reduction_block),o=b.w(Et(o,n.exit_flow.separable_conv,[1,1]))}))},e.prototype.forward=function(t){return Object(y.b)(this,void 0,void 0,(function(){var e;return Object(y.d)(this,(function(n){switch(n.label){case 0:return e=this.forwardInput,[4,bt(t)];case 1:return[2,e.apply(this,[n.sent()])]}}))}))},e.prototype.getDefaultModelName=function(){return"tiny_xception_model"},e.prototype.extractParamsFromWeigthMap=function(t){return Qt(t,this._numMainBlocks)},e.prototype.extractParams=function(t){return Zt(t,this._numMainBlocks)},e}(Pt);!function(t){t.FEMALE="female",t.MALE="male"}(ee||(ee={}));var re=function(t){function e(e){void 0===e&&(e=new ne(2));var n=t.call(this,"AgeGenderNet")||this;return n._faceFeatureExtractor=e,n}return Object(y.c)(e,t),Object.defineProperty(e.prototype,"faceFeatureExtractor",{get:function(){return this._faceFeatureExtractor},enumerable:!0,configurable:!0}),e.prototype.runNet=function(t){var e=this,n=this.params;if(!n)throw new Error(this._name+" - load model before inference");return b.L((function(){var r=t instanceof mt?e.faceFeatureExtractor.forwardInput(t):t,o=b.d(r,[7,7],[2,2],"valid").as2D(r.shape[0],-1);return{age:Wt(o,n.fc.age).as1D(),gender:Wt(o,n.fc.gender)}}))},e.prototype.forwardInput=function(t){var e=this;return b.L((function(){var n=e.runNet(t),r=n.age,o=n.gender;return{age:r,gender:b.D(o)}}))},e.prototype.forward=function(t){return Object(y.b)(this,void 0,void 0,(function(){var e;return Object(y.d)(this,(function(n){switch(n.label){case 0:return e=this.forwardInput,[4,bt(t)];case 1:return[2,e.apply(this,[n.sent()])]}}))}))},e.prototype.predictAgeAndGender=function(t){return Object(y.b)(this,void 0,void 0,(function(){var e,n,r,o,i,a,c=this;return Object(y.d)(this,(function(s){switch(s.label){case 0:return[4,bt(t)];case 1:return e=s.sent(),[4,this.forwardInput(e)];case 2:return n=s.sent(),r=b.O(n.age),o=b.O(n.gender),i=r.map((function(t,e){return{ageTensor:t,genderTensor:o[e]}})),[4,Promise.all(i.map((function(t){var e=t.ageTensor,n=t.genderTensor;return Object(y.b)(c,void 0,void 0,(function(){var t,r,o,i,a;return Object(y.d)(this,(function(c){switch(c.label){case 0:return[4,e.data()];case 1:return t=c.sent()[0],[4,n.data()];case 2:return r=c.sent()[0],i=(o=r>.5)?ee.MALE:ee.FEMALE,a=o?r:1-r,e.dispose(),n.dispose(),[2,{age:t,gender:i,genderProbability:a}]}}))}))})))];case 3:return a=s.sent(),n.age.dispose(),n.gender.dispose(),[2,e.isBatchInput?a:a[0]]}}))}))},e.prototype.getDefaultModelName=function(){return"age_gender_model"},e.prototype.dispose=function(e){void 0===e&&(e=!0),this.faceFeatureExtractor.dispose(e),t.prototype.dispose.call(this,e)},e.prototype.loadClassifierParams=function(t){var e=this.extractClassifierParams(t),n=e.params,r=e.paramMappings;this._params=n,this._paramMappings=r},e.prototype.extractClassifierParams=function(t){return function(t){var e=[],n=Rt(t),r=n.extractWeights,o=n.getRemainingWeights,i=It(r,e),a=i(512,1,"fc/age"),c=i(512,2,"fc/gender");if(0!==o().length)throw new Error("weights remaing after extract: "+o().length);return{paramMappings:e,params:{fc:{age:a,gender:c}}}}(t)},e.prototype.extractParamsFromWeigthMap=function(t){var e=Ut(t),n=e.featureExtractorMap,r=e.classifierMap;return this.faceFeatureExtractor.loadFromWeightMap(n),function(t){var e=[],n=Ct(t,e);function r(t){return{weights:n(t+"/weights",2),bias:n(t+"/bias",1)}}var o={fc:{age:r("fc/age"),gender:r("fc/gender")}};return At(t,e),{params:o,paramMappings:e}}(r)},e.prototype.extractParams=function(t){var e=t.slice(0,t.length-1539),n=t.slice(t.length-1539);return this.faceFeatureExtractor.extractWeights(e),this.extractClassifierParams(n)},e}(Pt),oe=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(y.c)(e,t),e.prototype.postProcess=function(t,e,n){var r=n.map((function(t){var n=t.width,r=t.height,o=e/Math.max(r,n);return{width:n*o,height:r*o}})),o=r.length;return b.L((function(){var n=function(t,e){return b.E([b.n([68],t),b.n([68],e)],1).as2D(1,136).as1D()},i=function(t,e){var n=r[t],o=n.width,i=n.height;return e(o,i)?Math.abs(o-i)/2:0};return t.mul(b.n([o,136],e)).sub(b.E(Array.from(Array(o),(function(t,e){return n(function(t){return i(t,(function(t,e){return t 0");if("number"!==typeof this._scaleFactor||this._scaleFactor<=0||this._scaleFactor>=1)throw new Error(this._name+" - expected scaleFactor to be a number between 0 and 1");if("number"!==typeof this._maxNumScales||this._maxNumScales<0)throw new Error(this._name+" - expected maxNumScales to be a number > 0");if(!Array.isArray(this._scoreThresholds)||3!==this._scoreThresholds.length||this._scoreThresholds.some((function(t){return"number"!==typeof t})))throw new Error(this._name+" - expected scoreThresholds to be an array of numbers of length 3");if(this._scaleSteps&&(!Array.isArray(this._scaleSteps)||this._scaleSteps.some((function(t){return"number"!==typeof t}))))throw new Error(this._name+" - expected scaleSteps to be an array of numbers")}return Object.defineProperty(t.prototype,"minFaceSize",{get:function(){return this._minFaceSize},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"scaleFactor",{get:function(){return this._scaleFactor},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"maxNumScales",{get:function(){return this._maxNumScales},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"scoreThresholds",{get:function(){return this._scoreThresholds},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"scaleSteps",{get:function(){return this._scaleSteps},enumerable:!0,configurable:!0}),t}();function _e(t,e){function n(n,r,o,i,a){var c=b.K(t(n*r*o*o),[o,o,n,r]),s=b.H(t(r));return e.push({paramPath:i+"/filters"},{paramPath:i+"/"+(a?"batch_norm_offset":"bias")}),{filters:c,bias:s}}function r(t,e,r,o){var i=n(t,e,r,o,!0);return{filters:i.filters,batch_norm_offset:i.bias}}function o(n,o,i){return{depthwise_conv:function(n,r){var o=b.K(t(9*n),[3,3,n,1]),i=b.H(t(n)),a=b.H(t(n)),c=b.H(t(n)),s=b.H(t(n));return e.push({paramPath:r+"/filters"},{paramPath:r+"/batch_norm_scale"},{paramPath:r+"/batch_norm_offset"},{paramPath:r+"/batch_norm_mean"},{paramPath:r+"/batch_norm_variance"}),{filters:o,batch_norm_scale:i,batch_norm_offset:a,batch_norm_mean:c,batch_norm_variance:s}}(n,i+"/depthwise_conv"),pointwise_conv:r(n,o,1,i+"/pointwise_conv")}}return{extractMobilenetV1Params:function(){return{conv_0:r(3,32,3,"mobilenetv1/conv_0"),conv_1:o(32,64,"mobilenetv1/conv_1"),conv_2:o(64,128,"mobilenetv1/conv_2"),conv_3:o(128,128,"mobilenetv1/conv_3"),conv_4:o(128,256,"mobilenetv1/conv_4"),conv_5:o(256,256,"mobilenetv1/conv_5"),conv_6:o(256,512,"mobilenetv1/conv_6"),conv_7:o(512,512,"mobilenetv1/conv_7"),conv_8:o(512,512,"mobilenetv1/conv_8"),conv_9:o(512,512,"mobilenetv1/conv_9"),conv_10:o(512,512,"mobilenetv1/conv_10"),conv_11:o(512,512,"mobilenetv1/conv_11"),conv_12:o(512,1024,"mobilenetv1/conv_12"),conv_13:o(1024,1024,"mobilenetv1/conv_13")}},extractPredictionLayerParams:function(){return{conv_0:r(1024,256,1,"prediction_layer/conv_0"),conv_1:r(256,512,3,"prediction_layer/conv_1"),conv_2:r(512,128,1,"prediction_layer/conv_2"),conv_3:r(128,256,3,"prediction_layer/conv_3"),conv_4:r(256,128,1,"prediction_layer/conv_4"),conv_5:r(128,256,3,"prediction_layer/conv_5"),conv_6:r(256,64,1,"prediction_layer/conv_6"),conv_7:r(64,128,3,"prediction_layer/conv_7"),box_predictor_0:{box_encoding_predictor:n(512,12,1,"prediction_layer/box_predictor_0/box_encoding_predictor"),class_predictor:n(512,9,1,"prediction_layer/box_predictor_0/class_predictor")},box_predictor_1:{box_encoding_predictor:n(1024,24,1,"prediction_layer/box_predictor_1/box_encoding_predictor"),class_predictor:n(1024,18,1,"prediction_layer/box_predictor_1/class_predictor")},box_predictor_2:{box_encoding_predictor:n(512,24,1,"prediction_layer/box_predictor_2/box_encoding_predictor"),class_predictor:n(512,18,1,"prediction_layer/box_predictor_2/class_predictor")},box_predictor_3:{box_encoding_predictor:n(256,24,1,"prediction_layer/box_predictor_3/box_encoding_predictor"),class_predictor:n(256,18,1,"prediction_layer/box_predictor_3/class_predictor")},box_predictor_4:{box_encoding_predictor:n(256,24,1,"prediction_layer/box_predictor_4/box_encoding_predictor"),class_predictor:n(256,18,1,"prediction_layer/box_predictor_4/class_predictor")},box_predictor_5:{box_encoding_predictor:n(128,24,1,"prediction_layer/box_predictor_5/box_encoding_predictor"),class_predictor:n(128,18,1,"prediction_layer/box_predictor_5/class_predictor")}}}}}function xe(t){var e=[],n=function(t,e){var n=Ct(t,e);function r(t,e,r){return{filters:n(t+"/Conv2d_"+e+"_pointwise/weights",4,r+"/filters"),batch_norm_offset:n(t+"/Conv2d_"+e+"_pointwise/convolution_bn_offset",1,r+"/batch_norm_offset")}}function o(t){var e="mobilenetv1/conv_"+t,o="MobilenetV1/Conv2d_"+t+"_depthwise",i=e+"/depthwise_conv",a=e+"/pointwise_conv";return{depthwise_conv:{filters:n(o+"/depthwise_weights",4,i+"/filters"),batch_norm_scale:n(o+"/BatchNorm/gamma",1,i+"/batch_norm_scale"),batch_norm_offset:n(o+"/BatchNorm/beta",1,i+"/batch_norm_offset"),batch_norm_mean:n(o+"/BatchNorm/moving_mean",1,i+"/batch_norm_mean"),batch_norm_variance:n(o+"/BatchNorm/moving_variance",1,i+"/batch_norm_variance")},pointwise_conv:r("MobilenetV1",t,a)}}function i(t,e){return{filters:n(t+"/weights",4,e+"/filters"),bias:n(t+"/biases",1,e+"/bias")}}function a(t){return{box_encoding_predictor:i("Prediction/BoxPredictor_"+t+"/BoxEncodingPredictor","prediction_layer/box_predictor_"+t+"/box_encoding_predictor"),class_predictor:i("Prediction/BoxPredictor_"+t+"/ClassPredictor","prediction_layer/box_predictor_"+t+"/class_predictor")}}return{extractMobilenetV1Params:function(){return{conv_0:r("MobilenetV1",0,"mobilenetv1/conv_0"),conv_1:o(1),conv_2:o(2),conv_3:o(3),conv_4:o(4),conv_5:o(5),conv_6:o(6),conv_7:o(7),conv_8:o(8),conv_9:o(9),conv_10:o(10),conv_11:o(11),conv_12:o(12),conv_13:o(13)}},extractPredictionLayerParams:function(){return{conv_0:r("Prediction",0,"prediction_layer/conv_0"),conv_1:r("Prediction",1,"prediction_layer/conv_1"),conv_2:r("Prediction",2,"prediction_layer/conv_2"),conv_3:r("Prediction",3,"prediction_layer/conv_3"),conv_4:r("Prediction",4,"prediction_layer/conv_4"),conv_5:r("Prediction",5,"prediction_layer/conv_5"),conv_6:r("Prediction",6,"prediction_layer/conv_6"),conv_7:r("Prediction",7,"prediction_layer/conv_7"),box_predictor_0:a(0),box_predictor_1:a(1),box_predictor_2:a(2),box_predictor_3:a(3),box_predictor_4:a(4),box_predictor_5:a(5)}}}}(t,e),r=n.extractMobilenetV1Params,o=n.extractPredictionLayerParams,i=t["Output/extra_dim"];if(e.push({originalPath:"Output/extra_dim",paramPath:"output_layer/extra_dim"}),!x(i))throw new Error("expected weightMap['Output/extra_dim'] to be a Tensor3D, instead have "+i);var a={mobilenetv1:r(),prediction_layer:o(),output_layer:{extra_dim:i}};return At(t,e),{params:a,paramMappings:e}}function Oe(t,e,n){return b.L((function(){var r=b.i(t,e.filters,n,"same");return r=b.c(r,e.batch_norm_offset),b.g(r,0,6)}))}function Pe(t,e){return b.L((function(){var n=null,r=Oe(t,e.conv_0,[2,2]);if([e.conv_1,e.conv_2,e.conv_3,e.conv_4,e.conv_5,e.conv_6,e.conv_7,e.conv_8,e.conv_9,e.conv_10,e.conv_11,e.conv_12,e.conv_13].forEach((function(t,e){var o=e+1,i=function(t){return[2,4,6,12].some((function(e){return e===t}))?[2,2]:[1,1]}(o);r=Oe(r=function(t,e,n){return b.L((function(){var r=b.j(t,e.filters,n,"same");return r=b.e(r,e.batch_norm_mean,e.batch_norm_variance,e.batch_norm_offset,e.batch_norm_scale,.0010000000474974513),b.g(r,0,6)}))}(r,t.depthwise_conv,i),t.pointwise_conv,[1,1]),11===o&&(n=r)})),null===n)throw new Error("mobileNetV1 - output of conv layer 11 is null");return{out:r,conv11:n}}))}function Ee(t,e,n){var r=t.arraySync(),o=Math.min(r[e][0],r[e][2]),i=Math.min(r[e][1],r[e][3]),a=Math.max(r[e][0],r[e][2]),c=Math.max(r[e][1],r[e][3]),s=Math.min(r[n][0],r[n][2]),u=Math.min(r[n][1],r[n][3]),f=Math.max(r[n][0],r[n][2]),h=Math.max(r[n][1],r[n][3]),p=(a-o)*(c-i),l=(f-s)*(h-u);if(p<=0||l<=0)return 0;var d=Math.max(o,s),v=Math.max(i,u),m=Math.min(a,f),b=Math.min(c,h),g=Math.max(m-d,0)*Math.max(b-v,0);return g/(p+l-g)}function je(t,e){var n=function(t){var e=b.O(b.N(t,[1,0])),n=[b.F(e[2],e[0]),b.F(e[3],e[1])];return{sizes:n,centers:[b.c(e[0],b.k(n[0],b.y(2))),b.c(e[1],b.k(n[1],b.y(2)))]}}(t),r=n.sizes,o=n.centers,i=b.O(b.N(e,[1,0])),a=b.k(b.t(b.l(b.k(i[2],b.y(5))),r[0]),b.y(2)),c=b.c(b.t(b.k(i[0],b.y(10)),r[0]),o[0]),s=b.k(b.t(b.l(b.k(i[3],b.y(5))),r[1]),b.y(2)),u=b.c(b.t(b.k(i[1],b.y(10)),r[1]),o[1]);return b.N(b.E([b.F(c,a),b.F(u,s),b.c(c,a),b.c(u,s)]),[1,0])}function Me(t,e){return b.L((function(){var n=t.shape[0];return{boxPredictionEncoding:b.x(St(t,e.box_encoding_predictor),[n,-1,1,4]),classPrediction:b.x(St(t,e.class_predictor),[n,-1,3])}}))}var Se=function(){function t(t){var e=void 0===t?{}:t,n=e.minConfidence,r=e.maxResults;if(this._name="SsdMobilenetv1Options",this._minConfidence=n||.5,this._maxResults=r||100,"number"!==typeof this._minConfidence||this._minConfidence<=0||this._minConfidence>=1)throw new Error(this._name+" - expected minConfidence to be a number between 0 and 1");if("number"!==typeof this._maxResults)throw new Error(this._name+" - expected maxResults to be a number")}return Object.defineProperty(t.prototype,"minConfidence",{get:function(){return this._minConfidence},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"maxResults",{get:function(){return this._maxResults},enumerable:!0,configurable:!0}),t}(),Ae=function(t){function e(){return t.call(this,"SsdMobilenetv1")||this}return Object(y.c)(e,t),e.prototype.forwardInput=function(t){var e=this.params;if(!e)throw new Error("SsdMobilenetv1 - load model before inference");return b.L((function(){var n=t.toBatchTensor(512,!1).toFloat(),r=Pe(b.F(b.t(n,b.y(.007843137718737125)),b.y(1)),e.mobilenetv1),o=function(t,e,n){return b.L((function(){var r=Oe(t,n.conv_0,[1,1]),o=Oe(r,n.conv_1,[2,2]),i=Oe(o,n.conv_2,[1,1]),a=Oe(i,n.conv_3,[2,2]),c=Oe(a,n.conv_4,[1,1]),s=Oe(c,n.conv_5,[2,2]),u=Oe(s,n.conv_6,[1,1]),f=Oe(u,n.conv_7,[2,2]),h=Me(e,n.box_predictor_0),p=Me(t,n.box_predictor_1),l=Me(o,n.box_predictor_2),d=Me(a,n.box_predictor_3),v=Me(s,n.box_predictor_4),m=Me(f,n.box_predictor_5);return{boxPredictions:b.h([h.boxPredictionEncoding,p.boxPredictionEncoding,l.boxPredictionEncoding,d.boxPredictionEncoding,v.boxPredictionEncoding,m.boxPredictionEncoding],1),classPredictions:b.h([h.classPrediction,p.classPrediction,l.classPrediction,d.classPrediction,v.classPrediction,m.classPrediction],1)}}))}(r.out,r.conv11,e.prediction_layer);return function(t,e,n){return b.L((function(){var r=t.shape[0],o=je(b.x(b.M(n.extra_dim,[r,1,1]),[-1,4]),b.x(t,[-1,4]));o=b.x(o,[r,o.shape[0]/r,4]);var i=b.A(b.B(e,[0,0,1],[-1,-1,-1])),a=b.B(i,[0,0,0],[-1,-1,1]);return a=b.x(a,[r,a.shape[1]]),{boxes:b.O(o),scores:b.O(a)}}))}(o.boxPredictions,o.classPredictions,e.output_layer)}))},e.prototype.forward=function(t){return Object(y.b)(this,void 0,void 0,(function(){var e;return Object(y.d)(this,(function(n){switch(n.label){case 0:return e=this.forwardInput,[4,bt(t)];case 1:return[2,e.apply(this,[n.sent()])]}}))}))},e.prototype.locateFaces=function(t,e){return void 0===e&&(e={}),Object(y.b)(this,void 0,void 0,(function(){var n,r,o,i,a,c,s,u,f,h,p,l,d,v,m,b,g,w,_,x;return Object(y.d)(this,(function(y){switch(y.label){case 0:return n=new Se(e),r=n.maxResults,o=n.minConfidence,[4,bt(t)];case 1:for(i=y.sent(),a=this.forwardInput(i),c=a.boxes,s=a.scores,u=c[0],f=s[0],h=1;ho})).sort((function(t,e){return e.score-t.score})),s=[];return c.forEach((function(e){if(!(s.length>=a)){for(var n=e.score,i=s.length-1;i>=0;--i){var c=Ee(t,e.boxIndex,s[i]);if(0!==c&&(e.score*=c<=r?1:0,e.score<=o))break}n===e.score&&s.push(e.boxIndex)}})),s}(u,p,r,.5,o),m=i.getReshapedInputDimensions(0),b=i.inputSize,g=b/m.width,w=b/m.height,_=u.arraySync(),x=v.map((function(t){var e=[Math.max(0,_[t][0]),Math.min(1,_[t][2])].map((function(t){return t*w})),n=e[0],r=e[1],o=[Math.max(0,_[t][1]),Math.min(1,_[t][3])].map((function(t){return t*g})),a=o[0],c=o[1];return new C(p[t],new z(a,n,c-a,r-n),{height:i.getInputHeight(0),width:i.getInputWidth(0)})})),u.dispose(),f.dispose(),[2,x]}}))}))},e.prototype.getDefaultModelName=function(){return"ssd_mobilenetv1_model"},e.prototype.extractParamsFromWeigthMap=function(t){return xe(t)},e.prototype.extractParams=function(t){return function(t){var e=[],n=Rt(t),r=n.extractWeights,o=n.getRemainingWeights,i=_e(r,e),a=i.extractMobilenetV1Params,c=i.extractPredictionLayerParams,s=a(),u=c(),f={extra_dim:b.J(r(20472),[1,5118,4])};if(e.push({paramPath:"output_layer/extra_dim"}),0!==o().length)throw new Error("weights remaing after extract: "+o().length);return{params:{mobilenetv1:s,prediction_layer:u,output_layer:f},paramMappings:e}}(t)},e}(Pt);!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(y.c)(e,t)}(Ae);var Te,Ie=[new I(.738768,.874946),new I(2.42204,2.65704),new I(4.30971,7.04493),new I(10.246,4.59428),new I(12.6868,11.8741)],De=[new I(1.603231,2.094468),new I(6.041143,7.080126),new I(2.882459,3.518061),new I(4.266906,5.178857),new I(9.041765,10.66308)],Fe=[117.001,114.697,97.404],Le=function(t){return"number"===typeof t};function Ce(t){return b.L((function(){var e=b.t(t,b.y(.10000000149011612));return b.c(b.w(b.F(t,e)),e)}))}function Re(t,e){return b.L((function(){var n=b.v(t,[[0,0],[1,1],[1,1],[0,0]]);return n=b.i(n,e.conv.filters,[1,1],"valid"),n=b.F(n,e.bn.sub),n=b.t(n,e.bn.truediv),Ce(n=b.c(n,e.conv.bias))}))}function ke(t,e){return b.L((function(){var n=b.v(t,[[0,0],[1,1],[1,1],[0,0]]);return n=b.z(n,e.depthwise_filter,e.pointwise_filter,[1,1],"valid"),Ce(n=b.c(n,e.bias))}))}function Be(t,e){var n=Tt(t,e);var r=Ft(t,e);return{extractConvParams:n,extractConvWithBatchNormParams:function(r,o,i){return{conv:n(r,o,3,i+"/conv"),bn:function(n,r){var o=b.H(t(n)),i=b.H(t(n));return e.push({paramPath:r+"/sub"},{paramPath:r+"/truediv"}),{sub:o,truediv:i}}(o,i+"/bn")}},extractSeparableConvParams:r}}function Ne(t,e){var n=Ct(t,e);function r(t){return{filters:n(t+"/filters",4),bias:n(t+"/bias",1)}}return{extractConvParams:r,extractConvWithBatchNormParams:function(t){return{conv:r(t+"/conv"),bn:function(t){return{sub:n(t+"/sub",1),truediv:n(t+"/truediv",1)}}(t+"/bn")}},extractSeparableConvParams:Lt(n)}}!function(t){t[t.XS=224]="XS",t[t.SM=320]="SM",t[t.MD=416]="MD",t[t.LG=608]="LG"}(Te||(Te={}));var ze=function(){function t(t){var e=void 0===t?{}:t,n=e.inputSize,r=e.scoreThreshold;if(this._name="TinyYolov2Options",this._inputSize=n||416,this._scoreThreshold=r||.5,"number"!==typeof this._inputSize||this._inputSize%32!==0)throw new Error(this._name+" - expected inputSize to be a number divisible by 32");if("number"!==typeof this._scoreThreshold||this._scoreThreshold<=0||this._scoreThreshold>=1)throw new Error(this._name+" - expected scoreThreshold to be a number between 0 and 1")}return Object.defineProperty(t.prototype,"inputSize",{get:function(){return this._inputSize},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"scoreThreshold",{get:function(){return this._scoreThreshold},enumerable:!0,configurable:!0}),t}(),We=function(t){function e(e){var n=t.call(this,"TinyYolov2")||this;return function(t){if(!t)throw new Error("invalid config: "+t);if("boolean"!==typeof t.withSeparableConvs)throw new Error("config.withSeparableConvs has to be a boolean, have: "+t.withSeparableConvs);if(!Le(t.iouThreshold)||t.iouThreshold<0||t.iouThreshold>1)throw new Error("config.iouThreshold has to be a number between [0, 1], have: "+t.iouThreshold);if(!Array.isArray(t.classes)||!t.classes.length||!t.classes.every((function(t){return"string"===typeof t})))throw new Error("config.classes has to be an array class names: string[], have: "+JSON.stringify(t.classes));if(!Array.isArray(t.anchors)||!t.anchors.length||!t.anchors.map((function(t){return t||{}})).every((function(t){return Le(t.x)&&Le(t.y)})))throw new Error("config.anchors has to be an array of { x: number, y: number }, have: "+JSON.stringify(t.anchors));if(t.meanRgb&&(!Array.isArray(t.meanRgb)||3!==t.meanRgb.length||!t.meanRgb.every(Le)))throw new Error("config.meanRgb has to be an array of shape [number, number, number], have: "+JSON.stringify(t.meanRgb))}(e),n._config=e,n}return Object(y.c)(e,t),Object.defineProperty(e.prototype,"config",{get:function(){return this._config},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"withClassScores",{get:function(){return this.config.withClassScores||this.config.classes.length>1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"boxEncodingSize",{get:function(){return 5+(this.withClassScores?this.config.classes.length:0)},enumerable:!0,configurable:!0}),e.prototype.runTinyYolov2=function(t,e){var n=Re(t,e.conv0);return n=Re(n=b.s(n,[2,2],[2,2],"same"),e.conv1),n=Re(n=b.s(n,[2,2],[2,2],"same"),e.conv2),n=Re(n=b.s(n,[2,2],[2,2],"same"),e.conv3),n=Re(n=b.s(n,[2,2],[2,2],"same"),e.conv4),n=Re(n=b.s(n,[2,2],[2,2],"same"),e.conv5),n=Re(n=b.s(n,[2,2],[1,1],"same"),e.conv6),St(n=Re(n,e.conv7),e.conv8,"valid",!1)},e.prototype.runMobilenet=function(t,e){var n=this.config.isFirstLayerConv2d?Ce(St(t,e.conv0,"valid",!1)):ke(t,e.conv0);return n=ke(n=b.s(n,[2,2],[2,2],"same"),e.conv1),n=ke(n=b.s(n,[2,2],[2,2],"same"),e.conv2),n=ke(n=b.s(n,[2,2],[2,2],"same"),e.conv3),n=ke(n=b.s(n,[2,2],[2,2],"same"),e.conv4),n=ke(n=b.s(n,[2,2],[2,2],"same"),e.conv5),n=b.s(n,[2,2],[1,1],"same"),n=e.conv6?ke(n,e.conv6):n,St(n=e.conv7?ke(n,e.conv7):n,e.conv8,"valid",!1)},e.prototype.forwardInput=function(t,e){var n=this,r=this.params;if(!r)throw new Error("TinyYolov2 - load model before inference");return b.L((function(){var o=t.toBatchTensor(e,!1).toFloat();return o=(o=n.config.meanRgb?B(o,n.config.meanRgb):o).div(b.y(256)),n.config.withSeparableConvs?n.runMobilenet(o,r):n.runTinyYolov2(o,r)}))},e.prototype.forward=function(t,e){return Object(y.b)(this,void 0,void 0,(function(){var n;return Object(y.d)(this,(function(r){switch(r.label){case 0:return n=this.forwardInput,[4,bt(t)];case 1:return[4,n.apply(this,[r.sent(),e])];case 2:return[2,r.sent()]}}))}))},e.prototype.detect=function(t,e){return void 0===e&&(e={}),Object(y.b)(this,void 0,void 0,(function(){var n,r,o,i,a,c,s,u,f,h,p,l,d,v=this;return Object(y.d)(this,(function(m){switch(m.label){case 0:return n=new ze(e),r=n.inputSize,o=n.scoreThreshold,[4,bt(t)];case 1:return i=m.sent(),[4,this.forwardInput(i,r)];case 2:return a=m.sent(),c=b.L((function(){return b.O(a)[0].expandDims()})),s={width:i.getInputWidth(0),height:i.getInputHeight(0)},[4,this.extractBoxes(c,i.getReshapedInputDimensions(0),o)];case 3:return u=m.sent(),a.dispose(),c.dispose(),f=u.map((function(t){return t.box})),h=u.map((function(t){return t.score})),p=u.map((function(t){return t.classScore})),l=u.map((function(t){return v.config.classes[t.label]})),d=k(f.map((function(t){return t.rescale(r)})),h,this.config.iouThreshold,!0),[2,d.map((function(t){return new L(h[t],p[t],l[t],f[t],s)}))]}}))}))},e.prototype.getDefaultModelName=function(){return""},e.prototype.extractParamsFromWeigthMap=function(t){return function(t,e){var n,r=[],o=Ne(t,r),i=o.extractConvParams,a=o.extractConvWithBatchNormParams,c=o.extractSeparableConvParams;if(e.withSeparableConvs){var s=e.filterSizes&&e.filterSizes.length||9;n={conv0:e.isFirstLayerConv2d?i("conv0"):c("conv0"),conv1:c("conv1"),conv2:c("conv2"),conv3:c("conv3"),conv4:c("conv4"),conv5:c("conv5"),conv6:s>7?c("conv6"):void 0,conv7:s>8?c("conv7"):void 0,conv8:i("conv8")}}else n={conv0:a("conv0"),conv1:a("conv1"),conv2:a("conv2"),conv3:a("conv3"),conv4:a("conv4"),conv5:a("conv5"),conv6:a("conv6"),conv7:a("conv7"),conv8:i("conv8")};return At(t,r),{params:n,paramMappings:r}}(t,this.config)},e.prototype.extractParams=function(t){var n=this.config.filterSizes||e.DEFAULT_FILTER_SIZES,r=n?n.length:void 0;if(7!==r&&8!==r&&9!==r)throw new Error("TinyYolov2 - expected 7 | 8 | 9 convolutional filters, but found "+r+" filterSizes in config");return function(t,e,n,r){var o,i=Rt(t),a=i.extractWeights,c=i.getRemainingWeights,s=[],u=Be(a,s),f=u.extractConvParams,h=u.extractConvWithBatchNormParams,p=u.extractSeparableConvParams;if(e.withSeparableConvs){var l=r[0],d=r[1],v=r[2],m=r[3],b=r[4],g=r[5],y=r[6],w=r[7],_=r[8];o={conv0:e.isFirstLayerConv2d?f(l,d,3,"conv0"):p(l,d,"conv0"),conv1:p(d,v,"conv1"),conv2:p(v,m,"conv2"),conv3:p(m,b,"conv3"),conv4:p(b,g,"conv4"),conv5:p(g,y,"conv5"),conv6:w?p(y,w,"conv6"):void 0,conv7:_?p(w,_,"conv7"):void 0,conv8:f(_||w||y,5*n,1,"conv8")}}else l=r[0],d=r[1],v=r[2],m=r[3],b=r[4],g=r[5],y=r[6],w=r[7],_=r[8],o={conv0:h(l,d,"conv0"),conv1:h(d,v,"conv1"),conv2:h(v,m,"conv2"),conv3:h(m,b,"conv3"),conv4:h(b,g,"conv4"),conv5:h(g,y,"conv5"),conv6:h(y,w,"conv6"),conv7:h(w,_,"conv7"),conv8:f(_,5*n,1,"conv8")};if(0!==c().length)throw new Error("weights remaing after extract: "+c().length);return{params:o,paramMappings:s}}(t,this.config,this.boxEncodingSize,n)},e.prototype.extractBoxes=function(t,e,n){return Object(y.b)(this,void 0,void 0,(function(){var r,o,i,a,c,s,u,f,h,p,l,d,v,m,g,w,_,x,O,P,E,j,M,S,A,T,I,D,L,C=this;return Object(y.d)(this,(function(R){switch(R.label){case 0:return r=e.width,o=e.height,i=Math.max(r,o),a=i/r,c=i/o,s=t.shape[1],u=this.config.anchors.length,f=b.L((function(){var e=t.reshape([s,s,u,C.boxEncodingSize]);return[e.slice([0,0,0,0],[s,s,u,4]),e.slice([0,0,0,4],[s,s,u,1]),C.withClassScores?b.D(e.slice([0,0,0,5],[s,s,u,C.config.classes.length]),3):b.y(0)]})),h=f[0],p=f[1],l=f[2],d=[],[4,p.array()];case 1:return v=R.sent(),[4,h.array()];case 2:m=R.sent(),g=0,R.label=3;case 3:if(!(gn?(O=(w+N(m[g][w][_][0]))/s*a,P=(g+N(m[g][w][_][1]))/s*c,E=Math.exp(m[g][w][_][2])*this.config.anchors[_].x/s*a,j=Math.exp(m[g][w][_][3])*this.config.anchors[_].y/s*c,M=O-E/2,S=P-j/2,A={row:g,col:w,anchor:_},this.withClassScores?[4,this.extractPredictedClass(l,A)]:[3,7]):[3,9]):[3,10];case 6:return L=R.sent(),[3,8];case 7:L={classScore:1,label:0},R.label=8;case 8:I=(T=L).classScore,D=T.label,d.push(Object(y.a)({box:new F(M,S,M+E,S+j),score:x,classScore:x*I,label:D},A)),R.label=9;case 9:return _++,[3,5];case 10:return w++,[3,4];case 11:return g++,[3,3];case 12:return h.dispose(),p.dispose(),l.dispose(),[2,d]}}))}))},e.prototype.extractPredictedClass=function(t,e){return Object(y.b)(this,void 0,void 0,(function(){var n,r,o,i;return Object(y.d)(this,(function(a){switch(a.label){case 0:return n=e.row,r=e.col,o=e.anchor,[4,t.array()];case 1:return i=a.sent(),[2,Array(this.config.classes.length).fill(0).map((function(t,e){return i[n][r][o][e]})).map((function(t,e){return{classScore:t,label:e}})).reduce((function(t,e){return t.classScore>e.classScore?t:e}))]}}))}))},e.DEFAULT_FILTER_SIZES=[3,16,32,64,128,256,512,1024,1024],e}(Pt),Ue=function(t){function e(e){void 0===e&&(e=!0);var n=Object.assign({},{withSeparableConvs:e,iouThreshold:.4,classes:["face"]},e?{anchors:De,meanRgb:Fe}:{anchors:Ie,withClassScores:!0});return t.call(this,n)||this}return Object(y.c)(e,t),Object.defineProperty(e.prototype,"withSeparableConvs",{get:function(){return this.config.withSeparableConvs},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"anchors",{get:function(){return this.config.anchors},enumerable:!0,configurable:!0}),e.prototype.locateFaces=function(t,e){return Object(y.b)(this,void 0,void 0,(function(){return Object(y.d)(this,(function(n){switch(n.label){case 0:return[4,this.detect(t,e)];case 1:return[2,n.sent().map((function(t){return new C(t.score,t.relativeBox,{width:t.imageWidth,height:t.imageHeight})}))]}}))}))},e.prototype.getDefaultModelName=function(){return this.withSeparableConvs?"tiny_yolov2_separable_conv_model":"tiny_yolov2_model"},e.prototype.extractParamsFromWeigthMap=function(e){return t.prototype.extractParamsFromWeigthMap.call(this,e)},e}(We);var He=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._name="TinyFaceDetectorOptions",e}return Object(y.c)(e,t),e}(ze),Ye=function(){function t(){}return t.prototype.then=function(t){return Object(y.b)(this,void 0,void 0,(function(){var e;return Object(y.d)(this,(function(n){switch(n.label){case 0:return e=t,[4,this.run()];case 1:return[2,e.apply(void 0,[n.sent()])]}}))}))},t.prototype.run=function(){return Object(y.b)(this,void 0,void 0,(function(){return Object(y.d)(this,(function(t){throw new Error("ComposableTask - run is not implemented")}))}))},t}();function qe(t,e,n,r,o){return void 0===o&&(o=function(t){return t.alignedRect}),Object(y.b)(this,void 0,void 0,(function(){var i,a,c,s,u;return Object(y.d)(this,(function(f){switch(f.label){case 0:return i=t.map((function(t){return Jt(t)?o(t):t.detection})),(c=r)?[3,5]:e instanceof b.a?[4,yt(e,i)]:[3,2];case 1:return s=f.sent(),[3,4];case 2:return[4,gt(e,i)];case 3:s=f.sent(),f.label=4;case 4:c=s,f.label=5;case 5:return[4,n(a=c)];case 6:return u=f.sent(),a.forEach((function(t){return t instanceof b.a&&t.dispose()})),[2,u]}}))}))}function Ve(t,e,n,r,o){return Object(y.b)(this,void 0,void 0,(function(){var i=this;return Object(y.d)(this,(function(a){return[2,qe([t],e,(function(t){return Object(y.b)(i,void 0,void 0,(function(){return Object(y.d)(this,(function(e){return[2,n(t[0])]}))}))}),r,o)]}))}))}function Ge(t){var e=Rt(t),n=e.extractWeights,r=e.getRemainingWeights,o=[],i=function(t,e){var n=Tt(t,e),r=It(t,e);function o(n,r){var o=b.H(t(n));return e.push({paramPath:r}),o}function i(t,e,r){return void 0===r&&(r=!1),{conv1:n(t[0],t[1],3,e+"/conv1"),prelu1_alpha:o(t[1],e+"/prelu1_alpha"),conv2:n(t[1],t[2],3,e+"/conv2"),prelu2_alpha:o(t[2],e+"/prelu2_alpha"),conv3:n(t[2],t[3],r?2:3,e+"/conv3"),prelu3_alpha:o(t[3],e+"/prelu3_alpha")}}return{extractPNetParams:function(){var t=i([3,10,16,32],"pnet"),e=n(32,2,1,"pnet/conv4_1"),r=n(32,4,1,"pnet/conv4_2");return Object(y.a)(Object(y.a)({},t),{conv4_1:e,conv4_2:r})},extractRNetParams:function(){var t=i([3,28,48,64],"rnet",!0),e=r(576,128,"rnet/fc1"),n=o(128,"rnet/prelu4_alpha"),a=r(128,2,"rnet/fc2_1"),c=r(128,4,"rnet/fc2_2");return Object(y.a)(Object(y.a)({},t),{fc1:e,prelu4_alpha:n,fc2_1:a,fc2_2:c})},extractONetParams:function(){var t=i([3,32,64,64],"onet"),e=n(64,128,2,"onet/conv4"),a=o(128,"onet/prelu4_alpha"),c=r(1152,256,"onet/fc1"),s=o(256,"onet/prelu5_alpha"),u=r(256,2,"onet/fc2_1"),f=r(256,4,"onet/fc2_2"),h=r(256,10,"onet/fc2_3");return Object(y.a)(Object(y.a)({},t),{conv4:e,prelu4_alpha:a,fc1:c,prelu5_alpha:s,fc2_1:u,fc2_2:f,fc2_3:h})}}}(n,o),a=i.extractPNetParams,c=i.extractRNetParams,s=i.extractONetParams,u=a(),f=c(),h=s();if(0!==r().length)throw new Error("weights remaing after extract: "+r().length);return{params:{pnet:u,rnet:f,onet:h},paramMappings:o}}function Je(t){var e=[],n=function(t,e){var n=Ct(t,e);function r(t){return{filters:n(t+"/weights",4,t+"/filters"),bias:n(t+"/bias",1)}}function o(t){return{weights:n(t+"/weights",2),bias:n(t+"/bias",1)}}function i(t){return n(t,1)}function a(t){return{conv1:r(t+"/conv1"),prelu1_alpha:i(t+"/prelu1_alpha"),conv2:r(t+"/conv2"),prelu2_alpha:i(t+"/prelu2_alpha"),conv3:r(t+"/conv3"),prelu3_alpha:i(t+"/prelu3_alpha")}}return{extractPNetParams:function(){var t=a("pnet"),e=r("pnet/conv4_1"),n=r("pnet/conv4_2");return Object(y.a)(Object(y.a)({},t),{conv4_1:e,conv4_2:n})},extractRNetParams:function(){var t=a("rnet"),e=o("rnet/fc1"),n=i("rnet/prelu4_alpha"),r=o("rnet/fc2_1"),c=o("rnet/fc2_2");return Object(y.a)(Object(y.a)({},t),{fc1:e,prelu4_alpha:n,fc2_1:r,fc2_2:c})},extractONetParams:function(){var t=a("onet"),e=r("onet/conv4"),n=i("onet/prelu4_alpha"),c=o("onet/fc1"),s=i("onet/prelu5_alpha"),u=o("onet/fc2_1"),f=o("onet/fc2_2"),h=o("onet/fc2_3");return Object(y.a)(Object(y.a)({},t),{conv4:e,prelu4_alpha:n,fc1:c,prelu5_alpha:s,fc2_1:u,fc2_2:f,fc2_3:h})}}}(t,e),r=n.extractPNetParams,o=n.extractRNetParams,i=n.extractONetParams,a=r(),c=o(),s=i();return At(t,e),{params:{pnet:a,rnet:c,onet:s},paramMappings:e}}function Ke(t,e){var n=e[0],r=e[1];return{height:Math.floor(n*t),width:Math.floor(r*t)}}var Xe=function(t){function e(e,n,r,o){return t.call(this,{left:e,top:n,right:r,bottom:o},!0)||this}return Object(y.c)(e,t),e}(D);function Ze(t){return b.L((function(){return b.t(b.F(t,b.y(127.5)),b.y(.0078125))}))}function Qe(t,e){return b.L((function(){return b.c(b.w(t),b.t(e,b.u(b.w(b.u(t)))))}))}function $e(t,e,n){return void 0===n&&(n=!1),b.L((function(){var r=St(t,e.conv1,"valid");return r=Qe(r,e.prelu1_alpha),r=Qe(r=St(r=b.s(r,n?[2,2]:[3,3],[2,2],"same"),e.conv2,"valid"),e.prelu2_alpha),r=Qe(r=St(r=n?r:b.s(r,[3,3],[2,2],"valid"),e.conv3,"valid"),e.prelu3_alpha)}))}function tn(t,e,n,r,o){o.stage1=[];var i=e.map((function(e){return b.L((function(){var n={scale:e},o=function(t,e){return b.L((function(){var n=Ke(e,t.shape.slice(1)),r=n.height,o=n.width,i=Ze(b.o.resizeBilinear(t,[r,o]));return b.N(i,[0,2,1,3])}))}(t,e),i=Date.now(),a=function(t,e){return b.L((function(){var n=$e(t,e,!0),r=St(n,e.conv4_1,"valid"),o=b.m(b.r(r,3),3);return{prob:b.D(b.F(r,o),3),regions:St(n,e.conv4_2,"valid")}}))}(o,r),c=a.prob,s=a.regions;return n.pnet=Date.now()-i,{scoresTensor:b.O(b.O(c,3)[1])[0],regionsTensor:b.O(s)[0],scale:e,statsForScale:n}}))})).map((function(t){var e=t.scoresTensor,r=t.regionsTensor,i=t.scale,a=t.statsForScale,c=function(t,e,n,r){for(var o=[],i=t.arraySync(),a=0;a=r&&o.push(new I(c,a));return o.map((function(t){var r=new F(Math.round((2*t.y+1)/n),Math.round((2*t.x+1)/n),Math.round((2*t.y+12)/n),Math.round((2*t.x+12)/n)),o=i[t.y][t.x],a=e.arraySync();return{cell:r,score:o,region:new Xe(a[t.y][t.x][0],a[t.y][t.x][1],a[t.y][t.x][2],a[t.y][t.x][3])}}))}(e,r,i,n);if(e.dispose(),r.dispose(),!c.length)return o.stage1.push(a),[];var s=Date.now(),u=k(c.map((function(t){return t.cell})),c.map((function(t){return t.score})),.5);return a.nms=Date.now()-s,a.numBoxes=u.length,o.stage1.push(a),u.map((function(t){return c[t]}))})).reduce((function(t,e){return t.concat(e)}),[]),a=[],c=[];if(i.length>0){var s=Date.now(),u=k(i.map((function(t){return t.cell})),i.map((function(t){return t.score})),.7);o.stage1_nms=Date.now()-s,c=u.map((function(t){return i[t].score})),a=u.map((function(t){return i[t]})).map((function(t){var e=t.cell,n=t.region;return new F(e.left+n.left*e.width,e.top+n.top*e.height,e.right+n.right*e.width,e.bottom+n.bottom*e.height).toSquare().round()}))}return{boxes:a,scores:c}}function en(t,e,n){var r=n.width,o=n.height;return Object(y.b)(this,void 0,void 0,(function(){var n,i,a,c=this;return Object(y.d)(this,(function(s){switch(s.label){case 0:return n=at(t),[4,Promise.all(e.map((function(e){return Object(y.b)(c,void 0,void 0,(function(){var r,o,i,a,c,s,u,f;return Object(y.d)(this,(function(h){return r=e.padAtBorders(t.height,t.width),o=r.y,i=r.ey,a=r.x,c=r.ex,s=a-1,u=o-1,f=n.getImageData(s,u,c-s,i-u),[2,ot.isNodejs()?lt(f):createImageBitmap(f)]}))}))})))];case 1:return i=s.sent(),a=[],i.forEach((function(t){var e=at(pt({width:r,height:o}));e.drawImage(t,0,0,r,o);for(var n=e.getImageData(0,0,r,o).data,i=[],c=0;c1?b.h(c.map((function(t){return t.scores}))):c[0].scores,h=(f=Array).from,[4,s.data()];case 2:return u=h.apply(f,[y.sent()]),s.dispose(),p=u.map((function(t,e){return{score:t,idx:e}})).filter((function(t){return t.score>n})).map((function(t){return t.idx})),l=p.map((function(t){return e[t]})),d=p.map((function(t){return u[t]})),v=[],m=[],l.length>0&&(i=Date.now(),g=k(l,d,.7),o.stage2_nms=Date.now()-i,w=g.map((function(t){var e=c[p[t]].regions.arraySync();return new Xe(e[0][0],e[0][1],e[0][2],e[0][3])})),m=g.map((function(t){return d[t]})),v=g.map((function(t,e){return l[t].calibrate(w[e])}))),c.forEach((function(t){t.regions.dispose(),t.scores.dispose()})),[2,{boxes:v,scores:m}]}}))}))}function rn(t,e,n,r,o){return Object(y.b)(this,void 0,void 0,(function(){var i,a,c,s,u,f,h,p,l,d,v,m,g,w,_;return Object(y.d)(this,(function(y){switch(y.label){case 0:return i=Date.now(),[4,en(t,e,{width:48,height:48})];case 1:return a=y.sent(),o.stage3_extractImagePatches=Date.now()-i,i=Date.now(),c=a.map((function(t){var e=function(t,e){return b.L((function(){var n=$e(t,e);n=Qe(n=St(n=b.s(n,[2,2],[2,2],"same"),e.conv4,"valid"),e.prelu4_alpha);var r=Qe(Wt(b.x(n,[n.shape[0],e.fc1.weights.shape[0]]),e.fc1),e.prelu5_alpha),o=Wt(r,e.fc2_1),i=b.m(b.r(o,1),1),a=b.D(b.F(o,i),1),c=Wt(r,e.fc2_2),s=Wt(r,e.fc2_3);return{scores:b.O(a,1)[1],regions:c,points:s}}))}(t,r);return t.dispose(),e})),o.stage3_onet=Date.now()-i,s=c.length>1?b.h(c.map((function(t){return t.scores}))):c[0].scores,h=(f=Array).from,[4,s.data()];case 2:return u=h.apply(f,[y.sent()]),s.dispose(),p=u.map((function(t,e){return{score:t,idx:e}})).filter((function(t){return t.score>n})).map((function(t){return t.idx})),l=p.map((function(t){var e=c[t].regions.arraySync();return new Xe(e[0][0],e[0][1],e[0][2],e[0][3])})),d=p.map((function(t,n){return e[t].calibrate(l[n])})),v=p.map((function(t){return u[t]})),m=[],g=[],w=[],d.length>0&&(i=Date.now(),_=k(d,v,.7,!1),o.stage3_nms=Date.now()-i,m=_.map((function(t){return d[t]})),g=_.map((function(t){return v[t]})),w=_.map((function(t,e){return Array(5).fill(0).map((function(n,r){var o=c[t].points.arraySync();return new I(o[0][r]*(m[e].width+1)+m[e].left,o[0][r+5]*(m[e].height+1)+m[e].top)}))}))),c.forEach((function(t){t.regions.dispose(),t.scores.dispose(),t.points.dispose()})),[2,{boxes:m,scores:g,points:w}]}}))}))}var on=function(t){function e(){return t.call(this,"Mtcnn")||this}return Object(y.c)(e,t),e.prototype.load=function(e){return Object(y.b)(this,void 0,void 0,(function(){return Object(y.d)(this,(function(n){return console.warn("mtcnn is deprecated and will be removed soon"),[2,t.prototype.load.call(this,e)]}))}))},e.prototype.loadFromDisk=function(e){return Object(y.b)(this,void 0,void 0,(function(){return Object(y.d)(this,(function(n){return console.warn("mtcnn is deprecated and will be removed soon"),[2,t.prototype.loadFromDisk.call(this,e)]}))}))},e.prototype.forwardInput=function(t,e){return void 0===e&&(e={}),Object(y.b)(this,void 0,void 0,(function(){var n,r,o,i,a,c,s,u,f,h,p,l,d,v,m,g,w,_,x,O,P;return Object(y.d)(this,(function(y){switch(y.label){case 0:if(!(n=this.params))throw new Error("Mtcnn - load model before inference");if(!(r=t.canvases[0]))throw new Error("Mtcnn - inputCanvas is not defined, note that passing tensors into Mtcnn.forwardInput is not supported yet.");return o={},i=Date.now(),a=b.L((function(){return t=b.m(b.f.fromPixels(r)).toFloat(),b.L((function(){return b.E(b.O(t,3).reverse(),3)}));var t})),c=function(t){return a.dispose(),o.total=Date.now()-i,t},s=a.shape.slice(1),u=s[0],f=s[1],h=new we(e),p=h.minFaceSize,l=h.scaleFactor,d=h.maxNumScales,v=h.scoreThresholds,m=h.scaleSteps,g=(m||function(t,e,n){for(var r=n[0],o=n[1],i=12/t,a=[],c=Math.min(r,o)*i,s=0;c>=12;)a.push(i*Math.pow(e,s)),c*=e,s+=1;return a}(p,l,[u,f])).filter((function(t){var e=Ke(t,[u,f]);return Math.min(e.width,e.height)>12})).slice(0,d),o.scales=g,o.pyramid=g.map((function(t){return Ke(t,[u,f])})),w=Date.now(),[4,tn(a,g,v[0],n.pnet,o)];case 1:return _=y.sent(),o.total_stage1=Date.now()-w,_.boxes.length?(o.stage2_numInputBoxes=_.boxes.length,w=Date.now(),[4,nn(r,_.boxes,v[1],n.rnet,o)]):[2,c({results:[],stats:o})];case 2:return x=y.sent(),o.total_stage2=Date.now()-w,x.boxes.length?(o.stage3_numInputBoxes=x.boxes.length,w=Date.now(),[4,rn(r,x.boxes,v[2],n.onet,o)]):[2,c({results:[],stats:o})];case 3:return O=y.sent(),o.total_stage3=Date.now()-w,P=O.boxes.map((function(t,e){return Kt(J({},new C(O.scores[e],new z(t.left/f,t.top/u,t.width/f,t.height/u),{height:u,width:f})),new U(O.points[e].map((function(e){return e.sub(new I(t.left,t.top)).div(new I(t.width,t.height))})),{width:t.width,height:t.height}))})),[2,c({results:P,stats:o})]}}))}))},e.prototype.forward=function(t,e){return void 0===e&&(e={}),Object(y.b)(this,void 0,void 0,(function(){var n;return Object(y.d)(this,(function(r){switch(r.label){case 0:return n=this.forwardInput,[4,bt(t)];case 1:return[4,n.apply(this,[r.sent(),e])];case 2:return[2,r.sent().results]}}))}))},e.prototype.forwardWithStats=function(t,e){return void 0===e&&(e={}),Object(y.b)(this,void 0,void 0,(function(){var n;return Object(y.d)(this,(function(r){switch(r.label){case 0:return n=this.forwardInput,[4,bt(t)];case 1:return[2,n.apply(this,[r.sent(),e])]}}))}))},e.prototype.getDefaultModelName=function(){return"mtcnn_model"},e.prototype.extractParamsFromWeigthMap=function(t){return Je(t)},e.prototype.extractParams=function(t){return Ge(t)},e}(Pt),an=[new I(1.603231,2.094468),new I(6.041143,7.080126),new I(2.882459,3.518061),new I(4.266906,5.178857),new I(9.041765,10.66308)],cn=[117.001,114.697,97.404],sn=function(t){function e(){var e={withSeparableConvs:!0,iouThreshold:.4,classes:["face"],anchors:an,meanRgb:cn,isFirstLayerConv2d:!0,filterSizes:[3,16,32,64,128,256,512]};return t.call(this,e)||this}return Object(y.c)(e,t),Object.defineProperty(e.prototype,"anchors",{get:function(){return this.config.anchors},enumerable:!0,configurable:!0}),e.prototype.locateFaces=function(t,e){return Object(y.b)(this,void 0,void 0,(function(){return Object(y.d)(this,(function(n){switch(n.label){case 0:return[4,this.detect(t,e)];case 1:return[2,n.sent().map((function(t){return new C(t.score,t.relativeBox,{width:t.imageWidth,height:t.imageHeight})}))]}}))}))},e.prototype.getDefaultModelName=function(){return"tiny_face_detector_model"},e.prototype.extractParamsFromWeigthMap=function(e){return t.prototype.extractParamsFromWeigthMap.call(this,e)},e}(We),un={ssdMobilenetv1:new Ae,tinyFaceDetector:new sn,tinyYolov2:new Ue,mtcnn:new on,faceLandmark68Net:new ie,faceLandmark68TinyNet:new ce,faceRecognitionNet:new me,faceExpressionNet:new Vt,ageGenderNet:new re},fn=function(t){return un.ssdMobilenetv1.load(t)},hn=function(t){return un.faceLandmark68Net.load(t)},pn=function(t){return un.faceRecognitionNet.load(t)},ln=function(t){return un.faceExpressionNet.load(t)},dn=function(t){function e(e,n,r){var o=t.call(this)||this;return o.parentTask=e,o.input=n,o.extractedFaces=r,o}return Object(y.c)(e,t),e}(Ye),vn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(y.c)(e,t),e.prototype.run=function(){return Object(y.b)(this,void 0,void 0,(function(){var t,e,n=this;return Object(y.d)(this,(function(r){switch(r.label){case 0:return[4,this.parentTask];case 1:return[4,qe(t=r.sent(),this.input,(function(t){return Object(y.b)(n,void 0,void 0,(function(){return Object(y.d)(this,(function(e){switch(e.label){case 0:return[4,Promise.all(t.map((function(t){return un.faceExpressionNet.predictExpressions(t)})))];case 1:return[2,e.sent()]}}))}))}),this.extractedFaces)];case 2:return e=r.sent(),[2,t.map((function(t,n){return Gt(t,e[n])}))]}}))}))},e.prototype.withAgeAndGender=function(){return new wn(this,this.input)},e}(dn),mn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(y.c)(e,t),e.prototype.run=function(){return Object(y.b)(this,void 0,void 0,(function(){var t,e;return Object(y.d)(this,(function(n){switch(n.label){case 0:return[4,this.parentTask];case 1:return(t=n.sent())?[4,Ve(t,this.input,(function(t){return un.faceExpressionNet.predictExpressions(t)}),this.extractedFaces)]:[2];case 2:return e=n.sent(),[2,Gt(t,e)]}}))}))},e.prototype.withAgeAndGender=function(){return new _n(this,this.input)},e}(dn),bn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(y.c)(e,t),e.prototype.withAgeAndGender=function(){return new xn(this,this.input)},e.prototype.withFaceDescriptors=function(){return new En(this,this.input)},e}(vn),gn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(y.c)(e,t),e.prototype.withAgeAndGender=function(){return new On(this,this.input)},e.prototype.withFaceDescriptor=function(){return new jn(this,this.input)},e}(mn),yn=function(t){function e(e,n,r){var o=t.call(this)||this;return o.parentTask=e,o.input=n,o.extractedFaces=r,o}return Object(y.c)(e,t),e}(Ye),wn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(y.c)(e,t),e.prototype.run=function(){return Object(y.b)(this,void 0,void 0,(function(){var t,e,n=this;return Object(y.d)(this,(function(r){switch(r.label){case 0:return[4,this.parentTask];case 1:return[4,qe(t=r.sent(),this.input,(function(t){return Object(y.b)(n,void 0,void 0,(function(){return Object(y.d)(this,(function(e){switch(e.label){case 0:return[4,Promise.all(t.map((function(t){return un.ageGenderNet.predictAgeAndGender(t)})))];case 1:return[2,e.sent()]}}))}))}),this.extractedFaces)];case 2:return e=r.sent(),[2,t.map((function(t,n){var r=e[n],o=r.age;return ge(ye(t,r.gender,r.genderProbability),o)}))]}}))}))},e.prototype.withFaceExpressions=function(){return new vn(this,this.input)},e}(yn),_n=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(y.c)(e,t),e.prototype.run=function(){return Object(y.b)(this,void 0,void 0,(function(){var t,e,n,r,o;return Object(y.d)(this,(function(i){switch(i.label){case 0:return[4,this.parentTask];case 1:return(t=i.sent())?[4,Ve(t,this.input,(function(t){return un.ageGenderNet.predictAgeAndGender(t)}),this.extractedFaces)]:[2];case 2:return e=i.sent(),n=e.age,r=e.gender,o=e.genderProbability,[2,ge(ye(t,r,o),n)]}}))}))},e.prototype.withFaceExpressions=function(){return new mn(this,this.input)},e}(yn),xn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(y.c)(e,t),e.prototype.withFaceExpressions=function(){return new bn(this,this.input)},e.prototype.withFaceDescriptors=function(){return new En(this,this.input)},e}(wn),On=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(y.c)(e,t),e.prototype.withFaceExpressions=function(){return new gn(this,this.input)},e.prototype.withFaceDescriptor=function(){return new jn(this,this.input)},e}(_n),Pn=function(t){function e(e,n){var r=t.call(this)||this;return r.parentTask=e,r.input=n,r}return Object(y.c)(e,t),e}(Ye),En=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(y.c)(e,t),e.prototype.run=function(){return Object(y.b)(this,void 0,void 0,(function(){var t;return Object(y.d)(this,(function(e){switch(e.label){case 0:return[4,this.parentTask];case 1:return[4,qe(t=e.sent(),this.input,(function(t){return Promise.all(t.map((function(t){return un.faceRecognitionNet.computeFaceDescriptor(t)})))}),null,(function(t){return t.landmarks.align(null,{useDlibAlignment:!0})}))];case 2:return[2,e.sent().map((function(e,n){return be(t[n],e)}))]}}))}))},e.prototype.withFaceExpressions=function(){return new bn(this,this.input)},e.prototype.withAgeAndGender=function(){return new xn(this,this.input)},e}(Pn),jn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(y.c)(e,t),e.prototype.run=function(){return Object(y.b)(this,void 0,void 0,(function(){var t,e;return Object(y.d)(this,(function(n){switch(n.label){case 0:return[4,this.parentTask];case 1:return(t=n.sent())?[4,Ve(t,this.input,(function(t){return un.faceRecognitionNet.computeFaceDescriptor(t)}),null,(function(t){return t.landmarks.align(null,{useDlibAlignment:!0})}))]:[2];case 2:return e=n.sent(),[2,be(t,e)]}}))}))},e.prototype.withFaceExpressions=function(){return new gn(this,this.input)},e.prototype.withAgeAndGender=function(){return new On(this,this.input)},e}(Pn),Mn=function(t){function e(e,n,r){var o=t.call(this)||this;return o.parentTask=e,o.input=n,o.useTinyLandmarkNet=r,o}return Object(y.c)(e,t),Object.defineProperty(e.prototype,"landmarkNet",{get:function(){return this.useTinyLandmarkNet?un.faceLandmark68TinyNet:un.faceLandmark68Net},enumerable:!0,configurable:!0}),e}(Ye),Sn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(y.c)(e,t),e.prototype.run=function(){return Object(y.b)(this,void 0,void 0,(function(){var t,e,n,r,o,i=this;return Object(y.d)(this,(function(a){switch(a.label){case 0:return[4,this.parentTask];case 1:return t=a.sent(),e=t.map((function(t){return t.detection})),this.input instanceof b.a?[4,yt(this.input,e)]:[3,3];case 2:return r=a.sent(),[3,5];case 3:return[4,gt(this.input,e)];case 4:r=a.sent(),a.label=5;case 5:return n=r,[4,Promise.all(n.map((function(t){return i.landmarkNet.detectLandmarks(t)})))];case 6:return o=a.sent(),n.forEach((function(t){return t instanceof b.a&&t.dispose()})),[2,t.map((function(t,e){return Kt(t,o[e])}))]}}))}))},e.prototype.withFaceExpressions=function(){return new bn(this,this.input)},e.prototype.withAgeAndGender=function(){return new xn(this,this.input)},e.prototype.withFaceDescriptors=function(){return new En(this,this.input)},e}(Mn),An=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(y.c)(e,t),e.prototype.run=function(){return Object(y.b)(this,void 0,void 0,(function(){var t,e,n,r,o;return Object(y.d)(this,(function(i){switch(i.label){case 0:return[4,this.parentTask];case 1:return(t=i.sent())?(e=t.detection,this.input instanceof b.a?[4,yt(this.input,[e])]:[3,3]):[2];case 2:return r=i.sent(),[3,5];case 3:return[4,gt(this.input,[e])];case 4:r=i.sent(),i.label=5;case 5:return n=r,[4,this.landmarkNet.detectLandmarks(n[0])];case 6:return o=i.sent(),n.forEach((function(t){return t instanceof b.a&&t.dispose()})),[2,Kt(t,o)]}}))}))},e.prototype.withFaceExpressions=function(){return new gn(this,this.input)},e.prototype.withAgeAndGender=function(){return new On(this,this.input)},e.prototype.withFaceDescriptor=function(){return new jn(this,this.input)},e}(Mn),Tn=function(t){function e(e,n){void 0===n&&(n=new Se);var r=t.call(this)||this;return r.input=e,r.options=n,r}return Object(y.c)(e,t),e}(Ye),In=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(y.c)(e,t),e.prototype.run=function(){return Object(y.b)(this,void 0,void 0,(function(){var t,e,n,r;return Object(y.d)(this,(function(o){switch(o.label){case 0:return e=(t=this).input,(n=t.options)instanceof we?[4,un.mtcnn.forward(e,n)]:[3,2];case 1:return[2,o.sent().map((function(t){return t.detection}))];case 2:if(!(r=n instanceof He?function(t){return un.tinyFaceDetector.locateFaces(t,n)}:n instanceof Se?function(t){return un.ssdMobilenetv1.locateFaces(t,n)}:n instanceof ze?function(t){return un.tinyYolov2.locateFaces(t,n)}:null))throw new Error("detectFaces - expected options to be instance of TinyFaceDetectorOptions | SsdMobilenetv1Options | MtcnnOptions | TinyYolov2Options");return[2,r(e)]}}))}))},e.prototype.runAndExtendWithFaceDetections=function(){var t=this;return new Promise((function(e){return Object(y.b)(t,void 0,void 0,(function(){var t;return Object(y.d)(this,(function(n){switch(n.label){case 0:return[4,this.run()];case 1:return t=n.sent(),[2,e(t.map((function(t){return J({},t)})))]}}))}))}))},e.prototype.withFaceLandmarks=function(t){return void 0===t&&(t=!1),new Sn(this.runAndExtendWithFaceDetections(),this.input,t)},e.prototype.withFaceExpressions=function(){return new vn(this.runAndExtendWithFaceDetections(),this.input)},e.prototype.withAgeAndGender=function(){return new wn(this.runAndExtendWithFaceDetections(),this.input)},e}(Tn);!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(y.c)(e,t),e.prototype.run=function(){return Object(y.b)(this,void 0,void 0,(function(){var t,e;return Object(y.d)(this,(function(n){switch(n.label){case 0:return[4,new In(this.input,this.options)];case 1:return t=n.sent(),e=t[0],t.forEach((function(t){t.score>e.score&&(e=t)})),[2,e]}}))}))},e.prototype.runAndExtendWithFaceDetection=function(){var t=this;return new Promise((function(e){return Object(y.b)(t,void 0,void 0,(function(){var t;return Object(y.d)(this,(function(n){switch(n.label){case 0:return[4,this.run()];case 1:return t=n.sent(),[2,e(t?J({},t):void 0)]}}))}))}))},e.prototype.withFaceLandmarks=function(t){return void 0===t&&(t=!1),new An(this.runAndExtendWithFaceDetection(),this.input,t)},e.prototype.withFaceExpressions=function(){return new mn(this.runAndExtendWithFaceDetection(),this.input)},e.prototype.withAgeAndGender=function(){return new _n(this.runAndExtendWithFaceDetection(),this.input)}}(Tn);function Dn(t,e){return void 0===e&&(e=new Se),new In(t,e)}!function(){function t(t,e){void 0===e&&(e=.6),this._distanceThreshold=e;var n=Array.isArray(t)?t:[t];if(!n.length)throw new Error("FaceRecognizer.constructor - expected atleast one input");var r=1,o=function(){return"person "+r++};this._labeledDescriptors=n.map((function(t){if(t instanceof V)return t;if(t instanceof Float32Array)return new V(o(),[t]);if(t.descriptor&&t.descriptor instanceof Float32Array)return new V(o(),[t.descriptor]);throw new Error("FaceRecognizer.constructor - expected inputs to be of type LabeledFaceDescriptors | WithFaceDescriptor | Float32Array | Array | Float32Array>")}))}Object.defineProperty(t.prototype,"labeledDescriptors",{get:function(){return this._labeledDescriptors},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"distanceThreshold",{get:function(){return this._distanceThreshold},enumerable:!0,configurable:!0}),t.prototype.computeMeanDistance=function(t,e){return e.map((function(e){return function(t,e){if(t.length!==e.length)throw new Error("euclideanDistance: arr1.length !== arr2.length");var n=Array.from(t),r=Array.from(e);return Math.sqrt(n.map((function(t,e){return t-r[e]})).reduce((function(t,e){return t+Math.pow(e,2)}),0))}(e,t)})).reduce((function(t,e){return t+e}),0)/(e.length||1)},t.prototype.matchDescriptor=function(t){var e=this;return this.labeledDescriptors.map((function(n){var r=n.descriptors,o=n.label;return new Y(o,e.computeMeanDistance(t,r))})).reduce((function(t,e){return t.distance.9&&t.expressions.happy<=1?n.style.display="none":n.style.display="block"})),clearInterval(i),a();case 6:case"end":return t.stop()}}),t)}))),200)},e=document.getElementById("inputVideo"),(n=document.getElementById("overlay")).width=e.offsetWidth,n.height=e.offsetHeight,r=new He,n.style.borderStyle="dotted",a();case 8:case"end":return t.stop()}}),t)})))).apply(this,arguments)}return Promise.all([(t=e,un.tinyFaceDetector.load(t)),hn(e),ln(e),pn(e),fn(e)]).then(function(){return n.apply(this,arguments)}()).catch((function(t){return console.error(t)})),Object(i.jsxs)(d,{children:[Object(i.jsx)(u.a,{children:Object(i.jsx)("title",{children:"Smile"})}),Object(i.jsxs)("section",{className:m.a.headingMd,children:[Object(i.jsx)("h1",{children:"Smile"}),Object(i.jsx)("video",{id:"inputVideo",autoPlay:!0,muted:!0,children:" "}),Object(i.jsx)("canvas",{className:m.a.canvas,id:"overlay"})]})]})}},Tred:function(t,e,n){t.exports={container:"layout_container__2t4v2",header:"layout_header__2rhWq",backTohome:"layout_backTohome__10oyl"}},UWYU:function(t,e,n){"use strict";e.__esModule=!0,e.imageConfigDefault=e.VALID_LOADERS=void 0;e.VALID_LOADERS=["default","imgix","cloudinary","akamai"];e.imageConfigDefault={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"https://cdn.statically.io/gh/HiltonWS/hiltonws.github.io/master/smile/image",loader:"default",domains:[]}},Xuae:function(t,e,n){"use strict";var r=n("RIqP"),o=n("lwsE"),i=n("W8MJ"),a=(n("PJYZ"),n("7W2i")),c=n("a1gu"),s=n("Nsbk");function u(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=s(t);if(e){var o=s(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return c(this,n)}}e.__esModule=!0,e.default=void 0;var f=n("q1tI"),h=function(t){a(n,t);var e=u(n);function n(t){var i;return o(this,n),(i=e.call(this,t))._hasHeadManager=void 0,i.emitChange=function(){i._hasHeadManager&&i.props.headManager.updateHead(i.props.reduceComponentsToState(r(i.props.headManager.mountedInstances),i.props))},i._hasHeadManager=i.props.headManager&&i.props.headManager.mountedInstances,i}return i(n,[{key:"componentDidMount",value:function(){this._hasHeadManager&&this.props.headManager.mountedInstances.add(this),this.emitChange()}},{key:"componentDidUpdate",value:function(){this.emitChange()}},{key:"componentWillUnmount",value:function(){this._hasHeadManager&&this.props.headManager.mountedInstances.delete(this),this.emitChange()}},{key:"render",value:function(){return null}}]),n}(f.Component);e.default=h},YC04:function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return i}));var r=n("mrSG"),o=n("7qA8");function i(){var e=t.Canvas||t.HTMLCanvasElement,n=t.Image||t.HTMLImageElement,i=t.fetch||function(){throw new Error("fetch - missing fetch implementation for nodejs environment")},a=Object(o.a)();return Object(r.a)({Canvas:e||function(){},CanvasRenderingContext2D:t.CanvasRenderingContext2D||function(){},Image:n||function(){},ImageData:t.ImageData||function(){},Video:t.HTMLVideoElement||function(){},createCanvasElement:function(){if(e)return new e;throw new Error("createCanvasElement - missing Canvas implementation for nodejs environment")},createImageElement:function(){if(n)return new n;throw new Error("createImageElement - missing Image implementation for nodejs environment")},fetch:i},a)}}).call(this,n("ntbh"))},YFqc:function(t,e,n){t.exports=n("cTJO")},Z4Yb:function(t,e,n){t.exports={heading2Xl:"utils_heading2Xl__1I65m",headingXl:"utils_headingXl__1XecN",headingLg:"utils_headingLg__de7p0",headingMd:"utils_headingMd__3de6G",borderCircle:"utils_borderCircle__13qdJ",colorInherit:"utils_colorInherit__3Gudf",padding1px:"utils_padding1px__oCny8",list:"utils_list__S7_pe",listItem:"utils_listItem__2eJpJ",lightText:"utils_lightText__12Ckm",canvas:"utils_canvas__1SWLi"}},cTJO:function(t,e,n){"use strict";var r=n("J4zp"),o=n("284h");e.__esModule=!0,e.default=void 0;var i=o(n("q1tI")),a=n("elyg"),c=n("nOHt"),s=n("vNVm"),u={};function f(t,e,n,r){if(t&&(0,a.isLocalURL)(e)){t.prefetch(e,n,r).catch((function(t){0}));var o=r&&"undefined"!==typeof r.locale?r.locale:t&&t.locale;u[e+"%"+n+(o?"%"+o:"")]=!0}}var h=function(t){var e=!1!==t.prefetch,n=(0,c.useRouter)(),o=n&&n.pathname||"/",h=i.default.useMemo((function(){var e=(0,a.resolveHref)(o,t.href,!0),n=r(e,2),i=n[0],c=n[1];return{href:i,as:t.as?(0,a.resolveHref)(o,t.as):c||i}}),[o,t.href,t.as]),p=h.href,l=h.as,d=t.children,v=t.replace,m=t.shallow,b=t.scroll,g=t.locale;"string"===typeof d&&(d=i.default.createElement("a",null,d));var y=i.Children.only(d),w=y&&"object"===typeof y&&y.ref,_=(0,s.useIntersection)({rootMargin:"200px"}),x=r(_,2),O=x[0],P=x[1],E=i.default.useCallback((function(t){O(t),w&&("function"===typeof w?w(t):"object"===typeof w&&(w.current=t))}),[w,O]);(0,i.useEffect)((function(){var t=P&&e&&(0,a.isLocalURL)(p),r="undefined"!==typeof g?g:n&&n.locale,o=u[p+"%"+l+(r?"%"+r:"")];t&&!o&&f(n,p,l,{locale:r})}),[l,p,P,g,e,n]);var j={ref:E,onClick:function(t){y.props&&"function"===typeof y.props.onClick&&y.props.onClick(t),t.defaultPrevented||function(t,e,n,r,o,i,c,s){("A"!==t.currentTarget.nodeName||!function(t){var e=t.currentTarget.target;return e&&"_self"!==e||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which}(t)&&(0,a.isLocalURL)(n))&&(t.preventDefault(),null==c&&(c=r.indexOf("#")<0),e[o?"replace":"push"](n,r,{shallow:i,locale:s,scroll:c}).then((function(t){t&&c&&document.body.focus()})))}(t,n,p,l,v,m,b,g)},onMouseEnter:function(t){(0,a.isLocalURL)(p)&&(y.props&&"function"===typeof y.props.onMouseEnter&&y.props.onMouseEnter(t),f(n,p,l,{priority:!0}))}};if(t.passHref||"a"===y.type&&!("href"in y.props)){var M="undefined"!==typeof g?g:n&&n.locale,S=n&&n.isLocaleDomain&&(0,a.getDomainLocale)(l,M,n&&n.locales,n&&n.domainLocales);j.href=S||(0,a.addBasePath)((0,a.addLocale)(l,M,n&&n.defaultLocale))}return i.default.cloneElement(y,j)};e.default=h},dEHY:function(t,e,n){"use strict";e.__esModule=!0,e.toBase64=function(t){return window.btoa(t)}},dQHF:function(t,e,n){"use strict";var r=n("J4zp"),o=n("RIqP"),i=n("TqRt");e.__esModule=!0,e.default=function(t){var e=t.src,n=t.sizes,i=t.unoptimized,c=void 0!==i&&i,h=t.priority,l=void 0!==h&&h,d=t.loading,m=t.className,b=t.quality,g=t.width,x=t.height,O=t.objectFit,P=t.objectPosition,E=t.loader,j=void 0===E?_:E,M=(0,a.default)(t,["src","sizes","unoptimized","priority","loading","className","quality","width","height","objectFit","objectPosition","loader"]),S=n?"responsive":"intrinsic",A=!1;"unsized"in M?(A=Boolean(M.unsized),delete M.unsized):"layout"in M&&(M.layout&&(S=M.layout),delete M.layout);0;var T=!l&&("lazy"===d||"undefined"===typeof d);e&&e.startsWith("data:")&&(c=!0,T=!1);var I,D,F,L=(0,p.useIntersection)({rootMargin:"200px",disabled:!T}),C=r(L,2),R=C[0],k=C[1],B=!T||k,N=w(g),z=w(x),W=w(b),U={visibility:B?"inherit":"hidden",position:"absolute",top:0,left:0,bottom:0,right:0,boxSizing:"border-box",padding:0,border:"none",margin:"auto",display:"block",width:0,height:0,minWidth:"100%",maxWidth:"100%",minHeight:"100%",maxHeight:"100%",objectFit:O,objectPosition:P};if("undefined"!==typeof N&&"undefined"!==typeof z&&"fill"!==S){var H=z/N,Y=isNaN(H)?"100%":"".concat(100*H,"%");"responsive"===S?(I={display:"block",overflow:"hidden",position:"relative",boxSizing:"border-box",margin:0},D={display:"block",boxSizing:"border-box",paddingTop:Y}):"intrinsic"===S?(I={display:"inline-block",maxWidth:"100%",overflow:"hidden",position:"relative",boxSizing:"border-box",margin:0},D={boxSizing:"border-box",display:"block",maxWidth:"100%"},F='')):"fixed"===S&&(I={overflow:"hidden",boxSizing:"border-box",display:"inline-block",position:"relative",width:N,height:z})}else"undefined"===typeof N&&"undefined"===typeof z&&"fill"===S&&(I={display:"block",overflow:"hidden",position:"absolute",top:0,left:0,bottom:0,right:0,boxSizing:"border-box",margin:0});var q={src:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",srcSet:void 0,sizes:void 0};B&&(q=function(t){var e=t.src,n=t.unoptimized,r=t.layout,i=t.width,a=t.quality,c=t.sizes,s=t.loader;if(n)return{src:e,srcSet:void 0,sizes:void 0};var u=function(t,e,n){if(n&&("fill"===e||"responsive"===e)){var r=o(n.matchAll(/(^|\s)(1?\d?\d)vw/g)).map((function(t){return parseInt(t[2])}));if(r.length){var i=.01*Math.min.apply(Math,o(r));return{widths:y.filter((function(t){return t>=v[0]*i})),kind:"w"}}return{widths:y,kind:"w"}}if("number"!==typeof t||"fill"===e||"responsive"===e)return{widths:v,kind:"w"};return{widths:o(new Set([t,2*t].map((function(t){return y.find((function(e){return e>=t}))||y[y.length-1]})))),kind:"x"}}(i,r,c),f=u.widths,h=u.kind,p=f.length-1;return{sizes:c||"w"!==h?c:"100vw",srcSet:f.map((function(t,n){return"".concat(s({src:e,quality:a,width:t})," ").concat("w"===h?t:n+1).concat(h)})).join(", "),src:s({src:e,quality:a,width:f[p]})}}({src:e,unoptimized:c,layout:S,width:N,quality:W,sizes:n,loader:j}));A&&(I=void 0,D=void 0,U=void 0);return s.default.createElement("div",{style:I},D?s.default.createElement("div",{style:D},F?s.default.createElement("img",{style:{maxWidth:"100%",display:"block",margin:0,border:"none",padding:0},alt:"","aria-hidden":!0,role:"presentation",src:"data:image/svg+xml;base64,".concat((0,f.toBase64)(F))}):null):null,s.default.createElement("img",Object.assign({},M,q,{decoding:"async",className:m,ref:R,style:U})),l?s.default.createElement(u.default,null,s.default.createElement("link",{key:"__nimg-"+q.src+q.srcSet+q.sizes,rel:"preload",as:"image",href:q.srcSet?void 0:q.src,imagesrcset:q.srcSet,imagesizes:q.sizes})):null)};var a=i(n("8OQS")),c=i(n("pVnL")),s=i(n("q1tI")),u=i(n("8Kt/")),f=n("dEHY"),h=n("UWYU"),p=n("vNVm");var l=new Map([["imgix",function(t){var e=t.root,n=t.src,r=t.width,o=t.quality,i=["auto=format","fit=max","w="+r],a="";o&&i.push("q="+o);i.length&&(a="?"+i.join("&"));return"".concat(e).concat(x(n)).concat(a)}],["cloudinary",function(t){var e=t.root,n=t.src,r=t.width,o=t.quality,i=["f_auto","c_limit","w_"+r,"q_"+(o||"auto")].join(",")+"/";return"".concat(e).concat(i).concat(x(n))}],["akamai",function(t){var e=t.root,n=t.src,r=t.width;return"".concat(e).concat(x(n),"?imwidth=").concat(r)}],["default",function(t){var e=t.root,n=t.src,r=t.width,o=t.quality;0;return"".concat(e,"?url=").concat(encodeURIComponent(n),"&w=").concat(r,"&q=").concat(o||75)}]]),d={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"https://cdn.statically.io/gh/HiltonWS/hiltonws.github.io/master/smile/image",loader:"default"}||h.imageConfigDefault,v=d.deviceSizes,m=d.imageSizes,b=d.loader,g=d.path,y=(d.domains,[].concat(o(v),o(m)));function w(t){return"number"===typeof t?t:"string"===typeof t?parseInt(t,10):void 0}function _(t){var e=l.get(b);if(e)return e((0,c.default)({root:g},t));throw new Error('Unknown "loader" found in "next.config.js". Expected: '.concat(h.VALID_LOADERS.join(", "),". Received: ").concat(b))}function x(t){return"/"===t[0]?t.slice(1):t}v.sort((function(t,e){return t-e})),y.sort((function(t,e){return t-e}))},g4pe:function(t,e,n){t.exports=n("8Kt/")},"kVK+":function(t,e){e.read=function(t,e,n,r,o){var i,a,c=8*o-r-1,s=(1<>1,f=-7,h=n?o-1:0,p=n?-1:1,l=t[e+h];for(h+=p,i=l&(1<<-f)-1,l>>=-f,f+=c;f>0;i=256*i+t[e+h],h+=p,f-=8);for(a=i&(1<<-f)-1,i>>=-f,f+=r;f>0;a=256*a+t[e+h],h+=p,f-=8);if(0===i)i=1-u;else{if(i===s)return a?NaN:1/0*(l?-1:1);a+=Math.pow(2,r),i-=u}return(l?-1:1)*a*Math.pow(2,i-r)},e.write=function(t,e,n,r,o,i){var a,c,s,u=8*i-o-1,f=(1<>1,p=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,l=r?0:i-1,d=r?1:-1,v=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(c=isNaN(e)?1:0,a=f):(a=Math.floor(Math.log(e)/Math.LN2),e*(s=Math.pow(2,-a))<1&&(a--,s*=2),(e+=a+h>=1?p/s:p*Math.pow(2,1-h))*s>=2&&(a++,s/=2),a+h>=f?(c=0,a=f):a+h>=1?(c=(e*s-1)*Math.pow(2,o),a+=h):(c=e*Math.pow(2,h-1)*Math.pow(2,o),a=0));o>=8;t[n+l]=255&c,l+=d,c/=256,o-=8);for(a=a<0;t[n+l]=255&a,l+=d,a/=256,u-=8);t[n+l-d]|=128*v}},lSNA:function(t,e){t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}},lwAK:function(t,e,n){"use strict";var r;e.__esModule=!0,e.AmpStateContext=void 0;var o=((r=n("q1tI"))&&r.__esModule?r:{default:r}).default.createContext({});e.AmpStateContext=o},mrSG:function(t,e,n){"use strict";n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return a})),n.d(e,"d",(function(){return c})),n.d(e,"e",(function(){return s}));var r=function(t,e){return(r=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 o(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var i=function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0;e&&n&&e(n)}))}),t);return c.set(e,n={id:e,observer:o,elements:r}),n}(n),o=r.id,i=r.observer,a=r.elements;return a.set(t,e),i.observe(t),function(){a.delete(t),i.unobserve(t),0===a.size&&(i.disconnect(),c.delete(o))}}(t,(function(t){return t&&p(t)}),{rootMargin:e}))}),[n,e,h]);return(0,o.useEffect)((function(){if(!a&&!h){var t=(0,i.requestIdleCallback)((function(){return p(!0)}));return function(){return(0,i.cancelIdleCallback)(t)}}}),[h]),[l,h]};var o=n("q1tI"),i=n("0G5g"),a="undefined"!==typeof IntersectionObserver;var c=new Map},vlRD:function(t,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/",function(){return n("RNiq")}])}},[["vlRD",0,2,3,1]]]); \ No newline at end of file +_N_E=(window.webpackJsonp_N_E=window.webpackJsonp_N_E||[]).push([[7],{"/0+H":function(t,e,n){"use strict";e.__esModule=!0,e.isInAmpMode=a,e.useAmp=function(){return a(o.default.useContext(i.AmpStateContext))};var r,o=(r=n("q1tI"))&&r.__esModule?r:{default:r},i=n("lwAK");function a(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.ampFirst,n=void 0!==e&&e,r=t.hybrid,o=void 0!==r&&r,i=t.hasQuery,a=void 0!==i&&i;return n||o&&a}},1:function(t,e){},2:function(t,e){},3:function(t,e){},"49sm":function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},"7qA8":function(t,e,n){"use strict";function r(t){var e="";if(!t)try{t=n(!function(){var t=new Error("Cannot find module 'fs'");throw t.code="MODULE_NOT_FOUND",t}())}catch(r){e=r.toString()}return{readFile:t?function(e){return new Promise((function(n,r){t.readFile(e,(function(t,e){return t?r(t):n(e)}))}))}:function(){throw new Error("readFile - failed to require fs in nodejs environment with error: "+e)}}}n.d(e,"a",(function(){return r}))},"8Kt/":function(t,e,n){"use strict";n("lSNA");e.__esModule=!0,e.defaultHead=f,e.default=void 0;var r,o=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==typeof t&&"function"!==typeof t)return{default:t};var e=u();if(e&&e.has(t))return e.get(t);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o)){var i=r?Object.getOwnPropertyDescriptor(t,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=t[o]}n.default=t,e&&e.set(t,n);return n}(n("q1tI")),i=(r=n("Xuae"))&&r.__esModule?r:{default:r},a=n("lwAK"),c=n("FYa8"),s=n("/0+H");function u(){if("function"!==typeof WeakMap)return null;var t=new WeakMap;return u=function(){return t},t}function f(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=[o.default.createElement("meta",{charSet:"utf-8"})];return t||e.push(o.default.createElement("meta",{name:"viewport",content:"width=device-width"})),e}function h(t,e){return"string"===typeof e||"number"===typeof e?t:e.type===o.default.Fragment?t.concat(o.default.Children.toArray(e.props.children).reduce((function(t,e){return"string"===typeof e||"number"===typeof e?t:t.concat(e)}),[])):t.concat(e)}var p=["name","httpEquiv","charSet","itemProp"];function l(t,e){return t.reduce((function(t,e){var n=o.default.Children.toArray(e.props.children);return t.concat(n)}),[]).reduce(h,[]).reverse().concat(f(e.inAmpMode)).filter(function(){var t=new Set,e=new Set,n=new Set,r={};return function(o){var i=!0,a=!1;if(o.key&&"number"!==typeof o.key&&o.key.indexOf("$")>0){a=!0;var c=o.key.slice(o.key.indexOf("$")+1);t.has(c)?i=!1:t.add(c)}switch(o.type){case"title":case"base":e.has(o.type)?i=!1:e.add(o.type);break;case"meta":for(var s=0,u=p.length;s=0||(o[n]=t[n]);return o}},"8oxB":function(t,e){var n,r,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function c(t){if(n===setTimeout)return setTimeout(t,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"===typeof setTimeout?setTimeout:i}catch(t){n=i}try{r="function"===typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var s,u=[],f=!1,h=-1;function p(){f&&s&&(f=!1,s.length?u=s.concat(u):h=-1,u.length&&l())}function l(){if(!f){var t=c(p);f=!0;for(var e=u.length;e;){for(s=u,u=[];++h1)for(var n=1;n0?a-4:a;for(n=0;n>16&255,s[f++]=e>>8&255,s[f++]=255&e;2===c&&(e=o[t.charCodeAt(n)]<<2|o[t.charCodeAt(n+1)]>>4,s[f++]=255&e);1===c&&(e=o[t.charCodeAt(n)]<<10|o[t.charCodeAt(n+1)]<<4|o[t.charCodeAt(n+2)]>>2,s[f++]=e>>8&255,s[f++]=255&e);return s},e.fromByteArray=function(t){for(var e,n=t.length,o=n%3,i=[],a=16383,c=0,s=n-o;cs?s:c+a));1===o?(e=t[n-1],i.push(r[e>>2]+r[e<<4&63]+"==")):2===o&&(e=(t[n-2]<<8)+t[n-1],i.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"="));return i.join("")};for(var r=[],o=[],i="undefined"!==typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=0,s=a.length;c0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function f(t,e,n){for(var o,i,a=[],c=e;c>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return a.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},HDXh:function(t,e,n){"use strict";(function(t){var r=n("H7XF"),o=n("kVK+"),i=n("49sm");function a(){return s.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function c(t,e){if(a()=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|t}function d(t,e){if(s.isBuffer(t))return t.length;if("undefined"!==typeof ArrayBuffer&&"function"===typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!==typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return W(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return U(t).length;default:if(r)return W(t).length;e=(""+e).toLowerCase(),r=!0}}function v(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return T(this,e,n);case"utf8":case"utf-8":return j(this,e,n);case"ascii":return S(this,e,n);case"latin1":case"binary":return A(this,e,n);case"base64":return E(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function m(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function b(t,e,n,r,o){if(0===t.length)return-1;if("string"===typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(o)return-1;n=t.length-1}else if(n<0){if(!o)return-1;n=0}if("string"===typeof e&&(e=s.from(e,r)),s.isBuffer(e))return 0===e.length?-1:g(t,e,n,r,o);if("number"===typeof e)return e&=255,s.TYPED_ARRAY_SUPPORT&&"function"===typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):g(t,[e],n,r,o);throw new TypeError("val must be string, number or Buffer")}function g(t,e,n,r,o){var i,a=1,c=t.length,s=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;a=2,c/=2,s/=2,n/=2}function u(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(o){var f=-1;for(i=n;ic&&(n=c-s),i=n;i>=0;i--){for(var h=!0,p=0;po&&(r=o):r=o;var i=e.length;if(i%2!==0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var a=0;a>8,o=n%256,i.push(o),i.push(r);return i}(e,t.length-n),t,n,r)}function E(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function j(t,e,n){n=Math.min(t.length,n);for(var r=[],o=e;o239?4:u>223?3:u>191?2:1;if(o+h<=n)switch(h){case 1:u<128&&(f=u);break;case 2:128===(192&(i=t[o+1]))&&(s=(31&u)<<6|63&i)>127&&(f=s);break;case 3:i=t[o+1],a=t[o+2],128===(192&i)&&128===(192&a)&&(s=(15&u)<<12|(63&i)<<6|63&a)>2047&&(s<55296||s>57343)&&(f=s);break;case 4:i=t[o+1],a=t[o+2],c=t[o+3],128===(192&i)&&128===(192&a)&&128===(192&c)&&(s=(15&u)<<18|(63&i)<<12|(63&a)<<6|63&c)>65535&&s<1114112&&(f=s)}null===f?(f=65533,h=1):f>65535&&(f-=65536,r.push(f>>>10&1023|55296),f=56320|1023&f),r.push(f),o+=h}return function(t){var e=t.length;if(e<=M)return String.fromCharCode.apply(String,t);var n="",r=0;for(;r0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),""},s.prototype.compare=function(t,e,n,r,o){if(!s.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),e<0||n>t.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&e>=n)return 0;if(r>=o)return-1;if(e>=n)return 1;if(this===t)return 0;for(var i=(o>>>=0)-(r>>>=0),a=(n>>>=0)-(e>>>=0),c=Math.min(i,a),u=this.slice(r,o),f=t.slice(e,n),h=0;ho)&&(n=o),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return y(this,t,e,n);case"utf8":case"utf-8":return w(this,t,e,n);case"ascii":return _(this,t,e,n);case"latin1":case"binary":return x(this,t,e,n);case"base64":return O(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,e,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var M=4096;function S(t,e,n){var r="";n=Math.min(t.length,n);for(var o=e;or)&&(n=r);for(var o="",i=e;in)throw new RangeError("Trying to access beyond buffer length")}function F(t,e,n,r,o,i){if(!s.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||et.length)throw new RangeError("Index out of range")}function L(t,e,n,r){e<0&&(e=65535+e+1);for(var o=0,i=Math.min(t.length-n,2);o>>8*(r?o:1-o)}function C(t,e,n,r){e<0&&(e=4294967295+e+1);for(var o=0,i=Math.min(t.length-n,4);o>>8*(r?o:3-o)&255}function R(t,e,n,r,o,i){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function k(t,e,n,r,i){return i||R(t,0,n,4),o.write(t,e,n,r,23,4),n+4}function B(t,e,n,r,i){return i||R(t,0,n,8),o.write(t,e,n,r,52,8),n+8}s.prototype.slice=function(t,e){var n,r=this.length;if((t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e0&&(o*=256);)r+=this[t+--e]*o;return r},s.prototype.readUInt8=function(t,e){return e||D(t,1,this.length),this[t]},s.prototype.readUInt16LE=function(t,e){return e||D(t,2,this.length),this[t]|this[t+1]<<8},s.prototype.readUInt16BE=function(t,e){return e||D(t,2,this.length),this[t]<<8|this[t+1]},s.prototype.readUInt32LE=function(t,e){return e||D(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},s.prototype.readUInt32BE=function(t,e){return e||D(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},s.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||D(t,e,this.length);for(var r=this[t],o=1,i=0;++i=(o*=128)&&(r-=Math.pow(2,8*e)),r},s.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||D(t,e,this.length);for(var r=e,o=1,i=this[t+--r];r>0&&(o*=256);)i+=this[t+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*e)),i},s.prototype.readInt8=function(t,e){return e||D(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},s.prototype.readInt16LE=function(t,e){e||D(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt16BE=function(t,e){e||D(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt32LE=function(t,e){return e||D(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},s.prototype.readInt32BE=function(t,e){return e||D(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},s.prototype.readFloatLE=function(t,e){return e||D(t,4,this.length),o.read(this,t,!0,23,4)},s.prototype.readFloatBE=function(t,e){return e||D(t,4,this.length),o.read(this,t,!1,23,4)},s.prototype.readDoubleLE=function(t,e){return e||D(t,8,this.length),o.read(this,t,!0,52,8)},s.prototype.readDoubleBE=function(t,e){return e||D(t,8,this.length),o.read(this,t,!1,52,8)},s.prototype.writeUIntLE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||F(this,t,e,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[e]=255&t;++i=0&&(i*=256);)this[e+o]=t/i&255;return e+n},s.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||F(this,t,e,1,255,0),s.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},s.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||F(this,t,e,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):L(this,t,e,!0),e+2},s.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||F(this,t,e,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):L(this,t,e,!1),e+2},s.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||F(this,t,e,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):C(this,t,e,!0),e+4},s.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||F(this,t,e,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):C(this,t,e,!1),e+4},s.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var o=Math.pow(2,8*n-1);F(this,t,e,n,o-1,-o)}var i=0,a=1,c=0;for(this[e]=255&t;++i>0)-c&255;return e+n},s.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var o=Math.pow(2,8*n-1);F(this,t,e,n,o-1,-o)}var i=n-1,a=1,c=0;for(this[e+i]=255&t;--i>=0&&(a*=256);)t<0&&0===c&&0!==this[e+i+1]&&(c=1),this[e+i]=(t/a>>0)-c&255;return e+n},s.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||F(this,t,e,1,127,-128),s.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},s.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||F(this,t,e,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):L(this,t,e,!0),e+2},s.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||F(this,t,e,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):L(this,t,e,!1),e+2},s.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||F(this,t,e,4,2147483647,-2147483648),s.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):C(this,t,e,!0),e+4},s.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||F(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):C(this,t,e,!1),e+4},s.prototype.writeFloatLE=function(t,e,n){return k(this,t,e,!0,n)},s.prototype.writeFloatBE=function(t,e,n){return k(this,t,e,!1,n)},s.prototype.writeDoubleLE=function(t,e,n){return B(this,t,e,!0,n)},s.prototype.writeDoubleBE=function(t,e,n){return B(this,t,e,!1,n)},s.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e=0;--o)t[o+e]=this[o+n];else if(i<1e3||!s.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"===typeof t)for(i=e;i55295&&n<57344){if(!o){if(n>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(e-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(e-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((e-=1)<0)break;i.push(n)}else if(n<2048){if((e-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function U(t){return r.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(N,"")).length<2)return"";for(;t.length%4!==0;)t+="=";return t}(t))}function H(t,e,n,r){for(var o=0;o=e.length||o>=t.length);++o)e[o+n]=t[o];return o}}).call(this,n("ntbh"))},Ijbi:function(t,e,n){var r=n("WkPL");t.exports=function(t){if(Array.isArray(t))return r(t)}},RIqP:function(t,e,n){var r=n("Ijbi"),o=n("EbDI"),i=n("ZhPi"),a=n("Bnag");t.exports=function(t){return r(t)||o(t)||i(t)||a()}},RNiq:function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return Ln}));var r=n("o0o1"),o=n.n(r),i=n("nKUr");function a(t,e,n,r,o,i,a){try{var c=t[i](a),s=c.value}catch(u){return void n(u)}c.done?e(s):Promise.resolve(s).then(r,o)}function c(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function c(t){a(i,r,o,c,s,"next",t)}function s(t){a(i,r,o,c,s,"throw",t)}c(void 0)}))}}var s=n("g4pe"),u=n.n(s),f=(n("Aiso"),n("Tred")),h=n.n(f),p=n("YFqc"),l=n.n(p);function d(t){var e=t.children;t.home;return Object(i.jsxs)("div",{className:h.a.container,children:[Object(i.jsx)(u.a,{children:Object(i.jsx)("link",{rel:"icon",href:"/favicon.ico"})}),Object(i.jsx)("header",{className:h.a.header}),Object(i.jsx)("main",{children:e}),Object(i.jsx)("div",{className:h.a.backToHome,children:Object(i.jsx)(l.a,{href:"/",children:Object(i.jsx)("a",{children:"\u2190 Back to home"})})})]})}var v=n("Z4Yb"),m=n.n(v),b=n("lT9W");function g(t,e,n){if(void 0===n&&(n=!1),t.beginPath(),e.slice(1).forEach((function(n,r){var o=n.x,i=n.y,a=e[r];t.moveTo(a.x,a.y),t.lineTo(o,i)})),n){var r=e[e.length-1],o=e[0];if(!r||!o)return;t.moveTo(r.x,r.y),t.lineTo(o.x,o.y)}t.stroke()}var y=n("mrSG"),w=function(){function t(t,e){if(!A(t)||!A(e))throw new Error("Dimensions.constructor - expected width and height to be valid numbers, instead have "+JSON.stringify({width:t,height:e}));this._width=t,this._height=e}return Object.defineProperty(t.prototype,"width",{get:function(){return this._width},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this._height},enumerable:!0,configurable:!0}),t.prototype.reverse=function(){return new t(1/this.width,1/this.height)},t}();function _(t,e){return t instanceof b.a&&t.shape.length===e}function x(t){return _(t,3)}function O(t){return _(t,4)}function P(t){return t%2===0}function E(t,e){void 0===e&&(e=2);var n=Math.pow(10,e);return Math.floor(t*n)/n}function j(t){return t&&t.width&&t.height}function M(t){return t.reduce((function(t,e){return t.add(e)}),new I(0,0)).div(new I(t.length,t.length))}function S(t,e,n){return Array(t).fill(0).map((function(t,r){return e+r*n}))}function A(t){return!!t&&t!==1/0&&t!==-1/0&&!isNaN(t)||0===t}function T(t){return A(t)&&0<=t&&t<=1}var I=function(){function t(t,e){this._x=t,this._y=e}return Object.defineProperty(t.prototype,"x",{get:function(){return this._x},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"y",{get:function(){return this._y},enumerable:!0,configurable:!0}),t.prototype.add=function(e){return new t(this.x+e.x,this.y+e.y)},t.prototype.sub=function(e){return new t(this.x-e.x,this.y-e.y)},t.prototype.mul=function(e){return new t(this.x*e.x,this.y*e.y)},t.prototype.div=function(e){return new t(this.x/e.x,this.y/e.y)},t.prototype.abs=function(){return new t(Math.abs(this.x),Math.abs(this.y))},t.prototype.magnitude=function(){return Math.sqrt(Math.pow(this.x,2)+Math.pow(this.y,2))},t.prototype.floor=function(){return new t(Math.floor(this.x),Math.floor(this.y))},t}(),D=function(){function t(e,n){void 0===n&&(n=!0);var r=e||{},o=[r.left,r.top,r.right,r.bottom].every(A),i=[r.x,r.y,r.width,r.height].every(A);if(!i&&!o)throw new Error("Box.constructor - expected box to be IBoundingBox | IRect, instead have "+JSON.stringify(r));var a=i?[r.x,r.y,r.width,r.height]:[r.left,r.top,r.right-r.left,r.bottom-r.top],c=a[0],s=a[1],u=a[2],f=a[3];t.assertIsValidBox({x:c,y:s,width:u,height:f},"Box.constructor",n),this._x=c,this._y=s,this._width=u,this._height=f}return t.isRect=function(t){return!!t&&[t.x,t.y,t.width,t.height].every(A)},t.assertIsValidBox=function(e,n,r){if(void 0===r&&(r=!1),!t.isRect(e))throw new Error(n+" - invalid box: "+JSON.stringify(e)+", expected object with properties x, y, width, height");if(!r&&(e.width<0||e.height<0))throw new Error(n+" - width ("+e.width+") and height ("+e.height+") must be positive numbers")},Object.defineProperty(t.prototype,"x",{get:function(){return this._x},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"y",{get:function(){return this._y},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this._width},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this._height},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"left",{get:function(){return this.x},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"top",{get:function(){return this.y},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){return this.x+this.width},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bottom",{get:function(){return this.y+this.height},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"area",{get:function(){return this.width*this.height},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"topLeft",{get:function(){return new I(this.left,this.top)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"topRight",{get:function(){return new I(this.right,this.top)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bottomLeft",{get:function(){return new I(this.left,this.bottom)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bottomRight",{get:function(){return new I(this.right,this.bottom)},enumerable:!0,configurable:!0}),t.prototype.round=function(){var e=[this.x,this.y,this.width,this.height].map((function(t){return Math.round(t)}));return new t({x:e[0],y:e[1],width:e[2],height:e[3]})},t.prototype.floor=function(){var e=[this.x,this.y,this.width,this.height].map((function(t){return Math.floor(t)}));return new t({x:e[0],y:e[1],width:e[2],height:e[3]})},t.prototype.toSquare=function(){var e=this,n=e.x,r=e.y,o=e.width,i=e.height,a=Math.abs(o-i);return oe&&(o=-s+e+n,s=e),u>t&&(i=-u+t+r,u=t),a<1&&(i=2-a,a=1),c<1&&(i=2-c,c=1),{dy:1,edy:i,dx:1,edx:o,y:c,ey:u,x:a,ex:s,w:n,h:r}},t.prototype.calibrate=function(e){return new t({left:this.left+e.left*this.width,top:this.top+e.top*this.height,right:this.right+e.right*this.width,bottom:this.bottom+e.bottom*this.height}).toSquare().round()},t}(),F=function(t){function e(e,n,r,o,i){return void 0===i&&(i=!1),t.call(this,{left:e,top:n,right:r,bottom:o},i)||this}return Object(y.c)(e,t),e}(D),L=function(){function t(t,e,n,r,o){this._imageDims=new w(o.width,o.height),this._score=t,this._classScore=e,this._className=n,this._box=new D(r).rescale(this._imageDims)}return Object.defineProperty(t.prototype,"score",{get:function(){return this._score},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"classScore",{get:function(){return this._classScore},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"className",{get:function(){return this._className},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"box",{get:function(){return this._box},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"imageDims",{get:function(){return this._imageDims},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"imageWidth",{get:function(){return this.imageDims.width},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"imageHeight",{get:function(){return this.imageDims.height},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"relativeBox",{get:function(){return new D(this._box).rescale(this.imageDims.reverse())},enumerable:!0,configurable:!0}),t.prototype.forSize=function(e,n){return new t(this.score,this.classScore,this.className,this.relativeBox,{width:e,height:n})},t}(),C=function(t){function e(e,n,r){return t.call(this,e,e,"",n,r)||this}return Object(y.c)(e,t),e.prototype.forSize=function(n,r){var o=t.prototype.forSize.call(this,n,r);return new e(o.score,o.relativeBox,o.imageDims)},e}(L);function R(t,e,n){void 0===n&&(n=!0);var r=Math.max(0,Math.min(t.right,e.right)-Math.max(t.left,e.left))*Math.max(0,Math.min(t.bottom,e.bottom)-Math.max(t.top,e.top));return n?r/(t.area+e.area-r):r/Math.min(t.area,e.area)}function k(t,e,n,r){void 0===r&&(r=!0);for(var o=e.map((function(t,e){return{score:t,boxIndex:e}})).sort((function(t,e){return t.score-e.score})).map((function(t){return t.boxIndex})),i=[],a=function(){var e=o.pop();i.push(e);for(var a=o,c=[],s=0;s0;)a();return i}function B(t,e){return b.L((function(){var n=e[0],r=e[1],o=e[2],i=b.n(Object(y.e)(t.shape.slice(0,3),[1]),n),a=b.n(Object(y.e)(t.shape.slice(0,3),[1]),r),c=b.n(Object(y.e)(t.shape.slice(0,3),[1]),o),s=b.h([i,a,c],3);return b.F(t,s)}))}function N(t){return 1/(1+Math.exp(-t))}var z=function(t){function e(e,n,r,o,i){return void 0===i&&(i=!1),t.call(this,{x:e,y:n,width:r,height:o},i)||this}return Object(y.c)(e,t),e}(D),W=function(){function t(t,e,n){void 0===n&&(n=new I(0,0));var r=e.width,o=e.height;this._imgDims=new w(r,o),this._shift=n,this._positions=t.map((function(t){return t.mul(new I(r,o)).add(n)}))}return Object.defineProperty(t.prototype,"shift",{get:function(){return new I(this._shift.x,this._shift.y)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"imageWidth",{get:function(){return this._imgDims.width},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"imageHeight",{get:function(){return this._imgDims.height},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"positions",{get:function(){return this._positions},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"relativePositions",{get:function(){var t=this;return this._positions.map((function(e){return e.sub(t._shift).div(new I(t.imageWidth,t.imageHeight))}))},enumerable:!0,configurable:!0}),t.prototype.forSize=function(t,e){return new this.constructor(this.relativePositions,{width:t,height:e})},t.prototype.shiftBy=function(t,e){return new this.constructor(this.relativePositions,this._imgDims,new I(t,e))},t.prototype.shiftByPoint=function(t){return this.shiftBy(t.x,t.y)},t.prototype.align=function(t,e){if(void 0===e&&(e={}),t){var n=t instanceof C?t.box.floor():new D(t);return this.shiftBy(n.x,n.y).align(null,e)}var r=Object.assign({},{useDlibAlignment:!1,minBoxPadding:.2},e),o=r.useDlibAlignment,i=r.minBoxPadding;return o?this.alignDlib():this.alignMinBbox(i)},t.prototype.alignDlib=function(){var t=this.getRefPointsForAlignment(),e=t[0],n=t[1],r=t[2],o=function(t){return r.sub(t).magnitude()},i=(o(e)+o(n))/2,a=Math.floor(i/.45),c=M(t),s=Math.floor(Math.max(0,c.x-.5*a)),u=Math.floor(Math.max(0,c.y-.43*a));return new z(s,u,Math.min(a,this.imageWidth+s),Math.min(a,this.imageHeight+u))},t.prototype.alignMinBbox=function(t){var e=function(t){var e=t.map((function(t){return t.x})),n=t.map((function(t){return t.y})),r=e.reduce((function(t,e){return e=3}function ht(t){var e=ot.getEnv(),n=e.Image,r=e.Video;return t instanceof n?new w(t.naturalWidth,t.naturalHeight):t instanceof r?new w(t.videoWidth,t.videoHeight):new w(t.width,t.height)}function pt(t){var e=t.width,n=t.height,r=(0,ot.getEnv().createCanvasElement)();return r.width=e,r.height=n,r}function lt(t,e){var n=ot.getEnv().ImageData;if(!(t instanceof n)&&!ft(t))throw new Error("createCanvasFromMedia - media has not finished loading yet");var r=e||ht(t),o=r.width,i=r.height,a=pt({width:o,height:i});return t instanceof n?at(a).putImageData(t,0,0):at(a).drawImage(t,0,0,o,i),a}function dt(t,e){return Object(y.b)(this,void 0,void 0,(function(){var n,r,o,i,a,c;return Object(y.d)(this,(function(s){switch(s.label){case 0:return n=e||ot.getEnv().createCanvasElement(),r=t.shape.slice(O(t)?1:0),o=r[0],i=r[1],a=r[2],c=b.L((function(){return t.as3D(o,i,a).toInt()})),[4,b.f.toPixels(c,n)];case 1:return s.sent(),c.dispose(),[2,n]}}))}))}function vt(t){var e=ot.getEnv(),n=e.Image,r=e.Canvas,o=e.Video;return t instanceof n||t instanceof r||t instanceof o}var mt=function(){function t(t,e){var n=this;if(void 0===e&&(e=!1),this._imageTensors=[],this._canvases=[],this._treatAsBatchInput=!1,this._inputDimensions=[],!Array.isArray(t))throw new Error("NetInput.constructor - expected inputs to be an Array of TResolvedNetInput or to be instanceof tf.Tensor4D, instead have "+t);this._treatAsBatchInput=e,this._batchSize=t.length,t.forEach((function(t,e){if(x(t))return n._imageTensors[e]=t,void(n._inputDimensions[e]=t.shape);if(O(t)){var r=t.shape[0];if(1!==r)throw new Error("NetInput - tf.Tensor4D with batchSize "+r+" passed, but not supported in input array");return n._imageTensors[e]=t,void(n._inputDimensions[e]=t.shape.slice(1))}var o=t instanceof ot.getEnv().Canvas?t:lt(t);n._canvases[e]=o,n._inputDimensions[e]=[o.height,o.width,3]}))}return Object.defineProperty(t.prototype,"imageTensors",{get:function(){return this._imageTensors},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"canvases",{get:function(){return this._canvases},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isBatchInput",{get:function(){return this.batchSize>1||this._treatAsBatchInput},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"batchSize",{get:function(){return this._batchSize},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"inputDimensions",{get:function(){return this._inputDimensions},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"inputSize",{get:function(){return this._inputSize},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"reshapedInputDimensions",{get:function(){var t=this;return S(this.batchSize,0,1).map((function(e,n){return t.getReshapedInputDimensions(n)}))},enumerable:!0,configurable:!0}),t.prototype.getInput=function(t){return this.canvases[t]||this.imageTensors[t]},t.prototype.getInputDimensions=function(t){return this._inputDimensions[t]},t.prototype.getInputHeight=function(t){return this._inputDimensions[t][0]},t.prototype.getInputWidth=function(t){return this._inputDimensions[t][1]},t.prototype.getReshapedInputDimensions=function(t){if("number"!==typeof this.inputSize)throw new Error("getReshapedInputDimensions - inputSize not set, toBatchTensor has not been called yet");return function(t,e){var n=t.width,r=t.height,o=e/Math.max(r,n);return new w(Math.round(n*o),Math.round(r*o))}({width:this.getInputWidth(t),height:this.getInputHeight(t)},this.inputSize)},t.prototype.toBatchTensor=function(t,e){var n=this;return void 0===e&&(e=!0),this._inputSize=t,b.L((function(){var r=S(n.batchSize,0,1).map((function(r){var o=n.getInput(r);if(o instanceof b.a){var i=O(o)?o:o.expandDims();return(i=function(t,e){return void 0===e&&(e=!1),b.L((function(){var n=t.shape.slice(1),r=n[0],o=n[1];if(r===o)return t;var i=Math.abs(r-o),a=Math.round(i*(e?.5:1)),c=r>o?2:1,s=function(e){var n=t.shape.slice();return n[c]=e,b.n(n,0)},u=s(a),f=i-u.shape[c],h=[e&&f?s(f):null,t,u].filter((function(t){return!!t})).map((function(t){return t.toFloat()}));return b.h(h,c)}))}(i,e)).shape[1]===t&&i.shape[2]===t||(i=b.o.resizeBilinear(i,[t,t])),i.as3D(t,t,3)}if(o instanceof ot.getEnv().Canvas)return b.f.fromPixels(function(t,e,n){void 0===n&&(n=!1);var r=ot.getEnv(),o=r.Image,i=r.Canvas;if(!(t instanceof o||t instanceof i))throw new Error("imageToSquare - expected arg0 to be HTMLImageElement | HTMLCanvasElement");var a=ht(t),c=e/Math.max(a.height,a.width),s=c*a.width,u=c*a.height,f=pt({width:e,height:e}),h=t instanceof i?t:lt(t),p=Math.abs(s-u)/2,l=n&&s1)throw new Error("extractFaces - batchSize > 1 not supported");return(i=o.getInput(0))instanceof n?(a=i,[3,4]):[3,2];case 2:return[4,dt(i)];case 3:a=s.sent(),s.label=4;case 4:r=a,s.label=5;case 5:return c=at(r),[2,e.map((function(t){return t instanceof C?t.forSize(r.width,r.height).box.floor():t})).map((function(t){return t.clipAtImageBorders(r.width,r.height)})).map((function(t){var e=t.x,n=t.y,r=t.width,o=t.height,i=pt({width:r,height:o});return at(i).putImageData(c.getImageData(e,n,r,o),0,0),i}))]}}))}))}function yt(t,e){return Object(y.b)(this,void 0,void 0,(function(){return Object(y.d)(this,(function(n){if(!x(t)&&!O(t))throw new Error("extractFaceTensors - expected image tensor to be 3D or 4D");if(O(t)&&t.shape[0]>1)throw new Error("extractFaceTensors - batchSize > 1 not supported");return[2,b.L((function(){var n=t.shape.slice(O(t)?1:0),r=n[0],o=n[1],i=n[2];return e.map((function(t){return t instanceof C?t.forSize(o,r).box:t})).map((function(t){return t.clipAtImageBorders(o,r)})).map((function(e){var n=e.x,a=e.y,c=e.width,s=e.height;return b.C(t.as3D(r,o,i),[a,n,0],[s,c,i])}))}))]}))}))}function wt(t,e){return Object(y.b)(this,void 0,void 0,(function(){var n;return Object(y.d)(this,(function(r){switch(r.label){case 0:return[4,(0,ot.getEnv().fetch)(t,e)];case 1:if(!((n=r.sent()).status<400))throw new Error("failed to fetch: ("+n.status+") "+n.statusText+", from url: "+n.url);return[2,n]}}))}))}function _t(t){return Object(y.b)(this,void 0,void 0,(function(){return Object(y.d)(this,(function(e){switch(e.label){case 0:return[4,wt(t)];case 1:return[2,e.sent().json()]}}))}))}function xt(t,e){var n=e+"-weights_manifest.json";if(!t)return{modelBaseUri:"",manifestUri:n};if("/"===t)return{modelBaseUri:"/",manifestUri:"/"+n};var r=t.startsWith("http://")?"http://":t.startsWith("https://")?"https://":"",o=(t=t.replace(r,"")).split("/").filter((function(t){return t})),i=t.endsWith(".json")?o[o.length-1]:n,a=r+(t.endsWith(".json")?o.slice(0,o.length-1):o).join("/");return{modelBaseUri:a=t.startsWith("/")?"/"+a:a,manifestUri:"/"===a?"/"+i:a+"/"+i}}function Ot(t,e){return Object(y.b)(this,void 0,void 0,(function(){var n,r,o,i;return Object(y.d)(this,(function(a){switch(a.label){case 0:return n=xt(t,e),r=n.manifestUri,o=n.modelBaseUri,[4,_t(r)];case 1:return i=a.sent(),[2,b.p.loadWeights(i,o)]}}))}))}var Pt=function(){function t(t){this._name=t,this._params=void 0,this._paramMappings=[]}return Object.defineProperty(t.prototype,"params",{get:function(){return this._params},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"paramMappings",{get:function(){return this._paramMappings},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isLoaded",{get:function(){return!!this.params},enumerable:!0,configurable:!0}),t.prototype.getParamFromPath=function(t){var e=this.traversePropertyPath(t);return e.obj[e.objProp]},t.prototype.reassignParamFromPath=function(t,e){var n=this.traversePropertyPath(t),r=n.obj,o=n.objProp;r[o].dispose(),r[o]=e},t.prototype.getParamList=function(){var t=this;return this._paramMappings.map((function(e){var n=e.paramPath;return{path:n,tensor:t.getParamFromPath(n)}}))},t.prototype.getTrainableParams=function(){return this.getParamList().filter((function(t){return t.tensor instanceof b.b}))},t.prototype.getFrozenParams=function(){return this.getParamList().filter((function(t){return!(t.tensor instanceof b.b)}))},t.prototype.variable=function(){var t=this;this.getFrozenParams().forEach((function(e){var n=e.path,r=e.tensor;t.reassignParamFromPath(n,r.variable())}))},t.prototype.freeze=function(){var t=this;this.getTrainableParams().forEach((function(e){var n=e.path,r=e.tensor,o=b.G(r.dataSync());r.dispose(),t.reassignParamFromPath(n,o)}))},t.prototype.dispose=function(t){void 0===t&&(t=!0),this.getParamList().forEach((function(e){if(t&&e.tensor.isDisposed)throw new Error("param tensor has already been disposed for path "+e.path);e.tensor.dispose()})),this._params=void 0},t.prototype.serializeParams=function(){return new Float32Array(this.getParamList().map((function(t){var e=t.tensor;return Array.from(e.dataSync())})).reduce((function(t,e){return t.concat(e)})))},t.prototype.load=function(t){return Object(y.b)(this,void 0,void 0,(function(){return Object(y.d)(this,(function(e){switch(e.label){case 0:return t instanceof Float32Array?(this.extractWeights(t),[2]):[4,this.loadFromUri(t)];case 1:return e.sent(),[2]}}))}))},t.prototype.loadFromUri=function(t){return Object(y.b)(this,void 0,void 0,(function(){var e;return Object(y.d)(this,(function(n){switch(n.label){case 0:if(t&&"string"!==typeof t)throw new Error(this._name+".loadFromUri - expected model uri");return[4,Ot(t,this.getDefaultModelName())];case 1:return e=n.sent(),this.loadFromWeightMap(e),[2]}}))}))},t.prototype.loadFromDisk=function(t){return Object(y.b)(this,void 0,void 0,(function(){var e,n,r,o,i,a,c,s,u,f;return Object(y.d)(this,(function(h){switch(h.label){case 0:if(t&&"string"!==typeof t)throw new Error(this._name+".loadFromDisk - expected model file path");return e=ot.getEnv().readFile,n=xt(t,this.getDefaultModelName()),r=n.manifestUri,o=n.modelBaseUri,i=function(t){return Promise.all(t.map((function(t){return e(t).then((function(t){return t.buffer}))})))},a=b.p.weightsLoaderFactory(i),u=(s=JSON).parse,[4,e(r)];case 1:return c=u.apply(s,[h.sent().toString()]),[4,a(c,o)];case 2:return f=h.sent(),this.loadFromWeightMap(f),[2]}}))}))},t.prototype.loadFromWeightMap=function(t){var e=this.extractParamsFromWeigthMap(t),n=e.paramMappings,r=e.params;this._paramMappings=n,this._params=r},t.prototype.extractWeights=function(t){var e=this.extractParams(t),n=e.paramMappings,r=e.params;this._paramMappings=n,this._params=r},t.prototype.traversePropertyPath=function(t){if(!this.params)throw new Error("traversePropertyPath - model has no loaded params");var e=t.split("/").reduce((function(e,n){if(!e.nextObj.hasOwnProperty(n))throw new Error("traversePropertyPath - object does not have property "+n+", for path "+t);return{obj:e.nextObj,objProp:n,nextObj:e.nextObj[n]}}),{nextObj:this.params}),n=e.obj,r=e.objProp;if(!n||!r||!(n[r]instanceof b.a))throw new Error("traversePropertyPath - parameter is not a tensor, for path "+t);return{obj:n,objProp:r}},t}();function Et(t,e,n){return b.L((function(){var r=b.z(t,e.depthwise_filter,e.pointwise_filter,n,"same");return r=b.c(r,e.bias)}))}function jt(t,e,n){return void 0===n&&(n=!1),b.L((function(){var r=b.w(n?b.c(b.i(t,e.conv0.filters,[2,2],"same"),e.conv0.bias):Et(t,e.conv0,[2,2])),o=Et(r,e.conv1,[1,1]),i=Et(b.w(b.c(r,o)),e.conv2,[1,1]);return b.w(b.c(r,b.c(o,i)))}))}function Mt(t,e,n,r){return void 0===n&&(n=!1),void 0===r&&(r=!0),b.L((function(){var o=b.w(n?b.c(b.i(t,e.conv0.filters,r?[2,2]:[1,1],"same"),e.conv0.bias):Et(t,e.conv0,r?[2,2]:[1,1])),i=Et(o,e.conv1,[1,1]),a=Et(b.w(b.c(o,i)),e.conv2,[1,1]),c=Et(b.w(b.c(o,b.c(i,a))),e.conv3,[1,1]);return b.w(b.c(o,b.c(i,b.c(a,c))))}))}function St(t,e,n,r){return void 0===n&&(n="same"),void 0===r&&(r=!1),b.L((function(){var o=b.c(b.i(t,e.filters,[1,1],n),e.bias);return r?b.w(o):o}))}function At(t,e){Object.keys(t).forEach((function(n){e.some((function(t){return t.originalPath===n}))||t[n].dispose()}))}function Tt(t,e){return function(n,r,o,i){var a=b.K(t(n*r*o*o),[o,o,n,r]),c=b.H(t(r));return e.push({paramPath:i+"/filters"},{paramPath:i+"/bias"}),{filters:a,bias:c}}}function It(t,e){return function(n,r,o){var i=b.I(t(n*r),[n,r]),a=b.H(t(r));return e.push({paramPath:o+"/weights"},{paramPath:o+"/bias"}),{weights:i,bias:a}}}var Dt=function(t,e,n){this.depthwise_filter=t,this.pointwise_filter=e,this.bias=n};function Ft(t,e){return function(n,r,o){var i=b.K(t(9*n),[3,3,n,1]),a=b.K(t(n*r),[1,1,n,r]),c=b.H(t(r));return e.push({paramPath:o+"/depthwise_filter"},{paramPath:o+"/pointwise_filter"},{paramPath:o+"/bias"}),new Dt(i,a,c)}}function Lt(t){return function(e){var n=t(e+"/depthwise_filter",4),r=t(e+"/pointwise_filter",4),o=t(e+"/bias",1);return new Dt(n,r,o)}}function Ct(t,e){return function(n,r,o){var i=t[n];if(!_(i,r))throw new Error("expected weightMap["+n+"] to be a Tensor"+r+"D, instead have "+i);return e.push({originalPath:n,paramPath:o||n}),i}}function Rt(t){var e=t;return{extractWeights:function(t){var n=e.slice(0,t);return e=e.slice(t),n},getRemainingWeights:function(){return e}}}function kt(t,e){var n=Tt(t,e),r=Ft(t,e);function o(t,e,o,i){return void 0===i&&(i=!1),{conv0:i?n(t,e,3,o+"/conv0"):r(t,e,o+"/conv0"),conv1:r(e,e,o+"/conv1"),conv2:r(e,e,o+"/conv2")}}return{extractDenseBlock3Params:o,extractDenseBlock4Params:function(t,e,n,i){void 0===i&&(i=!1);var a=o(t,e,n,i);return{conv0:a.conv0,conv1:a.conv1,conv2:a.conv2,conv3:r(e,e,n+"/conv3")}}}}function Bt(t){return function(e){return{filters:t(e+"/filters",4),bias:t(e+"/bias",1)}}}function Nt(t,e){var n=Ct(t,e),r=Bt(n),o=Lt(n);return{extractDenseBlock3Params:function(t,e){return void 0===e&&(e=!1),{conv0:e?r(t+"/conv0"):o(t+"/conv0"),conv1:o(t+"/conv1"),conv2:o(t+"/conv2")}},extractDenseBlock4Params:function(t,e){return void 0===e&&(e=!1),{conv0:e?r(t+"/conv0"):o(t+"/conv0"),conv1:o(t+"/conv1"),conv2:o(t+"/conv2"),conv3:o(t+"/conv3")}}}}var zt=function(t){function e(){return t.call(this,"FaceFeatureExtractor")||this}return Object(y.c)(e,t),e.prototype.forwardInput=function(t){var e=this.params;if(!e)throw new Error("FaceFeatureExtractor - load model before inference");return b.L((function(){var n=Mt(B(t.toBatchTensor(112,!0),[122.782,117.001,104.298]).div(b.y(255)),e.dense0,!0);return n=Mt(n,e.dense1),n=Mt(n,e.dense2),n=Mt(n,e.dense3),n=b.d(n,[7,7],[2,2],"valid")}))},e.prototype.forward=function(t){return Object(y.b)(this,void 0,void 0,(function(){var e;return Object(y.d)(this,(function(n){switch(n.label){case 0:return e=this.forwardInput,[4,bt(t)];case 1:return[2,e.apply(this,[n.sent()])]}}))}))},e.prototype.getDefaultModelName=function(){return"face_feature_extractor_model"},e.prototype.extractParamsFromWeigthMap=function(t){return function(t){var e=[],n=Nt(t,e).extractDenseBlock4Params,r={dense0:n("dense0",!0),dense1:n("dense1"),dense2:n("dense2"),dense3:n("dense3")};return At(t,e),{params:r,paramMappings:e}}(t)},e.prototype.extractParams=function(t){return function(t){var e=[],n=Rt(t),r=n.extractWeights,o=n.getRemainingWeights,i=kt(r,e).extractDenseBlock4Params,a=i(3,32,"dense0",!0),c=i(32,64,"dense1"),s=i(64,128,"dense2"),u=i(128,256,"dense3");if(0!==o().length)throw new Error("weights remaing after extract: "+o().length);return{paramMappings:e,params:{dense0:a,dense1:c,dense2:s,dense3:u}}}(t)},e}(Pt);function Wt(t,e){return b.L((function(){return b.c(b.q(t,e.weights),e.bias)}))}function Ut(t){var e={},n={};return Object.keys(t).forEach((function(r){(r.startsWith("fc")?n:e)[r]=t[r]})),{featureExtractorMap:e,classifierMap:n}}var Ht=function(t){function e(e,n){var r=t.call(this,e)||this;return r._faceFeatureExtractor=n,r}return Object(y.c)(e,t),Object.defineProperty(e.prototype,"faceFeatureExtractor",{get:function(){return this._faceFeatureExtractor},enumerable:!0,configurable:!0}),e.prototype.runNet=function(t){var e=this,n=this.params;if(!n)throw new Error(this._name+" - load model before inference");return b.L((function(){var r=t instanceof mt?e.faceFeatureExtractor.forwardInput(t):t;return Wt(r.as2D(r.shape[0],-1),n.fc)}))},e.prototype.dispose=function(e){void 0===e&&(e=!0),this.faceFeatureExtractor.dispose(e),t.prototype.dispose.call(this,e)},e.prototype.loadClassifierParams=function(t){var e=this.extractClassifierParams(t),n=e.params,r=e.paramMappings;this._params=n,this._paramMappings=r},e.prototype.extractClassifierParams=function(t){return function(t,e,n){var r=[],o=Rt(t),i=o.extractWeights,a=o.getRemainingWeights,c=It(i,r)(e,n,"fc");if(0!==a().length)throw new Error("weights remaing after extract: "+a().length);return{paramMappings:r,params:{fc:c}}}(t,this.getClassifierChannelsIn(),this.getClassifierChannelsOut())},e.prototype.extractParamsFromWeigthMap=function(t){var e=Ut(t),n=e.featureExtractorMap,r=e.classifierMap;return this.faceFeatureExtractor.loadFromWeightMap(n),function(t){var e,n=[],r=Ct(t,n),o={fc:(e="fc",{weights:r(e+"/weights",2),bias:r(e+"/bias",1)})};return At(t,n),{params:o,paramMappings:n}}(r)},e.prototype.extractParams=function(t){var e=this.getClassifierChannelsIn(),n=this.getClassifierChannelsOut(),r=n*e+n,o=t.slice(0,t.length-r),i=t.slice(t.length-r);return this.faceFeatureExtractor.extractWeights(o),this.extractClassifierParams(i)},e}(Pt),Yt=["neutral","happy","sad","angry","fearful","disgusted","surprised"],qt=function(){function t(t){var e=this;if(7!==t.length)throw new Error("FaceExpressions.constructor - expected probabilities.length to be 7, have: "+t.length);Yt.forEach((function(n,r){e[n]=t[r]}))}return t.prototype.asSortedArray=function(){var t=this;return Yt.map((function(e){return{expression:e,probability:t[e]}})).sort((function(t,e){return e.probability-t.probability}))},t}(),Vt=function(t){function e(e){return void 0===e&&(e=new zt),t.call(this,"FaceExpressionNet",e)||this}return Object(y.c)(e,t),e.prototype.forwardInput=function(t){var e=this;return b.L((function(){return b.D(e.runNet(t))}))},e.prototype.forward=function(t){return Object(y.b)(this,void 0,void 0,(function(){var e;return Object(y.d)(this,(function(n){switch(n.label){case 0:return e=this.forwardInput,[4,bt(t)];case 1:return[2,e.apply(this,[n.sent()])]}}))}))},e.prototype.predictExpressions=function(t){return Object(y.b)(this,void 0,void 0,(function(){var e,n,r,o,i=this;return Object(y.d)(this,(function(a){switch(a.label){case 0:return[4,bt(t)];case 1:return e=a.sent(),[4,this.forwardInput(e)];case 2:return n=a.sent(),[4,Promise.all(b.O(n).map((function(t){return Object(y.b)(i,void 0,void 0,(function(){var e;return Object(y.d)(this,(function(n){switch(n.label){case 0:return[4,t.data()];case 1:return e=n.sent(),t.dispose(),[2,e]}}))}))})))];case 3:return r=a.sent(),n.dispose(),o=r.map((function(t){return new qt(t)})),[2,e.isBatchInput?o:o[0]]}}))}))},e.prototype.getDefaultModelName=function(){return"face_expression_model"},e.prototype.getClassifierChannelsIn=function(){return 256},e.prototype.getClassifierChannelsOut=function(){return 7},e}(Ht);function Gt(t,e){var n={expressions:e};return Object.assign({},t,n)}function Jt(t){return G(t)&&t.landmarks instanceof W&&t.unshiftedLandmarks instanceof W&&t.alignedRect instanceof C}function Kt(t,e){var n=t.detection.box,r=e.shiftBy(n.x,n.y),o=r.align(),i=t.detection.imageDims,a={landmarks:r,unshiftedLandmarks:e,alignedRect:new C(t.detection.score,o.rescale(i.reverse()),i)};return Object.assign({},t,a)}var Xt=function(t){void 0===t&&(t={});var e=t.drawLines,n=void 0===e||e,r=t.drawPoints,o=void 0===r||r,i=t.lineWidth,a=t.lineColor,c=t.pointSize,s=t.pointColor;this.drawLines=n,this.drawPoints=o,this.lineWidth=i||1,this.pointSize=c||2,this.lineColor=a||"rgba(0, 255, 255, 1)",this.pointColor=s||"rgba(255, 0, 255, 1)"};!function(){function t(t,e){void 0===e&&(e={}),this.faceLandmarks=t,this.options=new Xt(e)}t.prototype.draw=function(t){var e=at(t),n=this.options,r=n.drawLines,o=n.drawPoints,i=n.lineWidth,a=n.lineColor,c=n.pointSize,s=n.pointColor;if(r&&this.faceLandmarks instanceof H&&(e.strokeStyle=a,e.lineWidth=i,g(e,this.faceLandmarks.getJawOutline()),g(e,this.faceLandmarks.getLeftEyeBrow()),g(e,this.faceLandmarks.getRightEyeBrow()),g(e,this.faceLandmarks.getNose()),g(e,this.faceLandmarks.getLeftEye(),!0),g(e,this.faceLandmarks.getRightEye(),!0),g(e,this.faceLandmarks.getMouth(),!0)),o){e.strokeStyle=s,e.fillStyle=s;this.faceLandmarks.positions.forEach((function(t){e.beginPath(),e.arc(t.x,t.y,c,0,2*Math.PI),e.fill()}))}}}();function Zt(t,e){var n=[],r=Rt(t),o=r.extractWeights,i=r.getRemainingWeights,a=function(t,e){var n=Tt(t,e),r=Ft(t,e);return{extractConvParams:n,extractSeparableConvParams:r,extractReductionBlockParams:function(t,e,o){return{separable_conv0:r(t,e,o+"/separable_conv0"),separable_conv1:r(e,e,o+"/separable_conv1"),expansion_conv:n(t,e,1,o+"/expansion_conv")}},extractMainBlockParams:function(t,e){return{separable_conv0:r(t,t,e+"/separable_conv0"),separable_conv1:r(t,t,e+"/separable_conv1"),separable_conv2:r(t,t,e+"/separable_conv2")}}}}(o,n),c=a.extractConvParams,s=a.extractSeparableConvParams,u=a.extractReductionBlockParams,f=a.extractMainBlockParams,h={conv_in:c(3,32,3,"entry_flow/conv_in"),reduction_block_0:u(32,64,"entry_flow/reduction_block_0"),reduction_block_1:u(64,128,"entry_flow/reduction_block_1")},p={};S(e,0,1).forEach((function(t){p["main_block_"+t]=f(128,"middle_flow/main_block_"+t)}));var l={reduction_block:u(128,256,"exit_flow/reduction_block"),separable_conv:s(256,512,"exit_flow/separable_conv")};if(0!==i().length)throw new Error("weights remaing after extract: "+i().length);return{paramMappings:n,params:{entry_flow:h,middle_flow:p,exit_flow:l}}}function Qt(t,e){var n=[],r=function(t,e){var n=Ct(t,e),r=Bt(n),o=Lt(n);return{extractConvParams:r,extractSeparableConvParams:o,extractReductionBlockParams:function(t){return{separable_conv0:o(t+"/separable_conv0"),separable_conv1:o(t+"/separable_conv1"),expansion_conv:r(t+"/expansion_conv")}},extractMainBlockParams:function(t){return{separable_conv0:o(t+"/separable_conv0"),separable_conv1:o(t+"/separable_conv1"),separable_conv2:o(t+"/separable_conv2")}}}}(t,n),o=r.extractConvParams,i=r.extractSeparableConvParams,a=r.extractReductionBlockParams,c=r.extractMainBlockParams,s={conv_in:o("entry_flow/conv_in"),reduction_block_0:a("entry_flow/reduction_block_0"),reduction_block_1:a("entry_flow/reduction_block_1")},u={};S(e,0,1).forEach((function(t){u["main_block_"+t]=c("middle_flow/main_block_"+t)}));var f={reduction_block:a("exit_flow/reduction_block"),separable_conv:i("exit_flow/separable_conv")};return At(t,n),{params:{entry_flow:s,middle_flow:u,exit_flow:f},paramMappings:n}}function $t(t,e,n){return b.c(b.i(t,e.filters,n,"same"),e.bias)}function te(t,e,n){void 0===n&&(n=!0);var r=n?b.w(t):t;return r=Et(r,e.separable_conv0,[1,1]),r=Et(b.w(r),e.separable_conv1,[1,1]),r=b.s(r,[3,3],[2,2],"same"),r=b.c(r,$t(t,e.expansion_conv,[2,2]))}var ee,ne=function(t){function e(e){var n=t.call(this,"TinyXception")||this;return n._numMainBlocks=e,n}return Object(y.c)(e,t),e.prototype.forwardInput=function(t){var e=this,n=this.params;if(!n)throw new Error("TinyXception - load model before inference");return b.L((function(){var r=B(t.toBatchTensor(112,!0),[122.782,117.001,104.298]).div(b.y(256)),o=b.w($t(r,n.entry_flow.conv_in,[2,2]));return o=te(o,n.entry_flow.reduction_block_0,!1),o=te(o,n.entry_flow.reduction_block_1),S(e._numMainBlocks,0,1).forEach((function(t){o=function(t,e){var n=Et(b.w(t),e.separable_conv0,[1,1]);return n=Et(b.w(n),e.separable_conv1,[1,1]),n=Et(b.w(n),e.separable_conv2,[1,1]),b.c(n,t)}(o,n.middle_flow["main_block_"+t])})),o=te(o,n.exit_flow.reduction_block),o=b.w(Et(o,n.exit_flow.separable_conv,[1,1]))}))},e.prototype.forward=function(t){return Object(y.b)(this,void 0,void 0,(function(){var e;return Object(y.d)(this,(function(n){switch(n.label){case 0:return e=this.forwardInput,[4,bt(t)];case 1:return[2,e.apply(this,[n.sent()])]}}))}))},e.prototype.getDefaultModelName=function(){return"tiny_xception_model"},e.prototype.extractParamsFromWeigthMap=function(t){return Qt(t,this._numMainBlocks)},e.prototype.extractParams=function(t){return Zt(t,this._numMainBlocks)},e}(Pt);!function(t){t.FEMALE="female",t.MALE="male"}(ee||(ee={}));var re=function(t){function e(e){void 0===e&&(e=new ne(2));var n=t.call(this,"AgeGenderNet")||this;return n._faceFeatureExtractor=e,n}return Object(y.c)(e,t),Object.defineProperty(e.prototype,"faceFeatureExtractor",{get:function(){return this._faceFeatureExtractor},enumerable:!0,configurable:!0}),e.prototype.runNet=function(t){var e=this,n=this.params;if(!n)throw new Error(this._name+" - load model before inference");return b.L((function(){var r=t instanceof mt?e.faceFeatureExtractor.forwardInput(t):t,o=b.d(r,[7,7],[2,2],"valid").as2D(r.shape[0],-1);return{age:Wt(o,n.fc.age).as1D(),gender:Wt(o,n.fc.gender)}}))},e.prototype.forwardInput=function(t){var e=this;return b.L((function(){var n=e.runNet(t),r=n.age,o=n.gender;return{age:r,gender:b.D(o)}}))},e.prototype.forward=function(t){return Object(y.b)(this,void 0,void 0,(function(){var e;return Object(y.d)(this,(function(n){switch(n.label){case 0:return e=this.forwardInput,[4,bt(t)];case 1:return[2,e.apply(this,[n.sent()])]}}))}))},e.prototype.predictAgeAndGender=function(t){return Object(y.b)(this,void 0,void 0,(function(){var e,n,r,o,i,a,c=this;return Object(y.d)(this,(function(s){switch(s.label){case 0:return[4,bt(t)];case 1:return e=s.sent(),[4,this.forwardInput(e)];case 2:return n=s.sent(),r=b.O(n.age),o=b.O(n.gender),i=r.map((function(t,e){return{ageTensor:t,genderTensor:o[e]}})),[4,Promise.all(i.map((function(t){var e=t.ageTensor,n=t.genderTensor;return Object(y.b)(c,void 0,void 0,(function(){var t,r,o,i,a;return Object(y.d)(this,(function(c){switch(c.label){case 0:return[4,e.data()];case 1:return t=c.sent()[0],[4,n.data()];case 2:return r=c.sent()[0],i=(o=r>.5)?ee.MALE:ee.FEMALE,a=o?r:1-r,e.dispose(),n.dispose(),[2,{age:t,gender:i,genderProbability:a}]}}))}))})))];case 3:return a=s.sent(),n.age.dispose(),n.gender.dispose(),[2,e.isBatchInput?a:a[0]]}}))}))},e.prototype.getDefaultModelName=function(){return"age_gender_model"},e.prototype.dispose=function(e){void 0===e&&(e=!0),this.faceFeatureExtractor.dispose(e),t.prototype.dispose.call(this,e)},e.prototype.loadClassifierParams=function(t){var e=this.extractClassifierParams(t),n=e.params,r=e.paramMappings;this._params=n,this._paramMappings=r},e.prototype.extractClassifierParams=function(t){return function(t){var e=[],n=Rt(t),r=n.extractWeights,o=n.getRemainingWeights,i=It(r,e),a=i(512,1,"fc/age"),c=i(512,2,"fc/gender");if(0!==o().length)throw new Error("weights remaing after extract: "+o().length);return{paramMappings:e,params:{fc:{age:a,gender:c}}}}(t)},e.prototype.extractParamsFromWeigthMap=function(t){var e=Ut(t),n=e.featureExtractorMap,r=e.classifierMap;return this.faceFeatureExtractor.loadFromWeightMap(n),function(t){var e=[],n=Ct(t,e);function r(t){return{weights:n(t+"/weights",2),bias:n(t+"/bias",1)}}var o={fc:{age:r("fc/age"),gender:r("fc/gender")}};return At(t,e),{params:o,paramMappings:e}}(r)},e.prototype.extractParams=function(t){var e=t.slice(0,t.length-1539),n=t.slice(t.length-1539);return this.faceFeatureExtractor.extractWeights(e),this.extractClassifierParams(n)},e}(Pt),oe=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(y.c)(e,t),e.prototype.postProcess=function(t,e,n){var r=n.map((function(t){var n=t.width,r=t.height,o=e/Math.max(r,n);return{width:n*o,height:r*o}})),o=r.length;return b.L((function(){var n=function(t,e){return b.E([b.n([68],t),b.n([68],e)],1).as2D(1,136).as1D()},i=function(t,e){var n=r[t],o=n.width,i=n.height;return e(o,i)?Math.abs(o-i)/2:0};return t.mul(b.n([o,136],e)).sub(b.E(Array.from(Array(o),(function(t,e){return n(function(t){return i(t,(function(t,e){return t 0");if("number"!==typeof this._scaleFactor||this._scaleFactor<=0||this._scaleFactor>=1)throw new Error(this._name+" - expected scaleFactor to be a number between 0 and 1");if("number"!==typeof this._maxNumScales||this._maxNumScales<0)throw new Error(this._name+" - expected maxNumScales to be a number > 0");if(!Array.isArray(this._scoreThresholds)||3!==this._scoreThresholds.length||this._scoreThresholds.some((function(t){return"number"!==typeof t})))throw new Error(this._name+" - expected scoreThresholds to be an array of numbers of length 3");if(this._scaleSteps&&(!Array.isArray(this._scaleSteps)||this._scaleSteps.some((function(t){return"number"!==typeof t}))))throw new Error(this._name+" - expected scaleSteps to be an array of numbers")}return Object.defineProperty(t.prototype,"minFaceSize",{get:function(){return this._minFaceSize},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"scaleFactor",{get:function(){return this._scaleFactor},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"maxNumScales",{get:function(){return this._maxNumScales},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"scoreThresholds",{get:function(){return this._scoreThresholds},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"scaleSteps",{get:function(){return this._scaleSteps},enumerable:!0,configurable:!0}),t}();function _e(t,e){function n(n,r,o,i,a){var c=b.K(t(n*r*o*o),[o,o,n,r]),s=b.H(t(r));return e.push({paramPath:i+"/filters"},{paramPath:i+"/"+(a?"batch_norm_offset":"bias")}),{filters:c,bias:s}}function r(t,e,r,o){var i=n(t,e,r,o,!0);return{filters:i.filters,batch_norm_offset:i.bias}}function o(n,o,i){return{depthwise_conv:function(n,r){var o=b.K(t(9*n),[3,3,n,1]),i=b.H(t(n)),a=b.H(t(n)),c=b.H(t(n)),s=b.H(t(n));return e.push({paramPath:r+"/filters"},{paramPath:r+"/batch_norm_scale"},{paramPath:r+"/batch_norm_offset"},{paramPath:r+"/batch_norm_mean"},{paramPath:r+"/batch_norm_variance"}),{filters:o,batch_norm_scale:i,batch_norm_offset:a,batch_norm_mean:c,batch_norm_variance:s}}(n,i+"/depthwise_conv"),pointwise_conv:r(n,o,1,i+"/pointwise_conv")}}return{extractMobilenetV1Params:function(){return{conv_0:r(3,32,3,"mobilenetv1/conv_0"),conv_1:o(32,64,"mobilenetv1/conv_1"),conv_2:o(64,128,"mobilenetv1/conv_2"),conv_3:o(128,128,"mobilenetv1/conv_3"),conv_4:o(128,256,"mobilenetv1/conv_4"),conv_5:o(256,256,"mobilenetv1/conv_5"),conv_6:o(256,512,"mobilenetv1/conv_6"),conv_7:o(512,512,"mobilenetv1/conv_7"),conv_8:o(512,512,"mobilenetv1/conv_8"),conv_9:o(512,512,"mobilenetv1/conv_9"),conv_10:o(512,512,"mobilenetv1/conv_10"),conv_11:o(512,512,"mobilenetv1/conv_11"),conv_12:o(512,1024,"mobilenetv1/conv_12"),conv_13:o(1024,1024,"mobilenetv1/conv_13")}},extractPredictionLayerParams:function(){return{conv_0:r(1024,256,1,"prediction_layer/conv_0"),conv_1:r(256,512,3,"prediction_layer/conv_1"),conv_2:r(512,128,1,"prediction_layer/conv_2"),conv_3:r(128,256,3,"prediction_layer/conv_3"),conv_4:r(256,128,1,"prediction_layer/conv_4"),conv_5:r(128,256,3,"prediction_layer/conv_5"),conv_6:r(256,64,1,"prediction_layer/conv_6"),conv_7:r(64,128,3,"prediction_layer/conv_7"),box_predictor_0:{box_encoding_predictor:n(512,12,1,"prediction_layer/box_predictor_0/box_encoding_predictor"),class_predictor:n(512,9,1,"prediction_layer/box_predictor_0/class_predictor")},box_predictor_1:{box_encoding_predictor:n(1024,24,1,"prediction_layer/box_predictor_1/box_encoding_predictor"),class_predictor:n(1024,18,1,"prediction_layer/box_predictor_1/class_predictor")},box_predictor_2:{box_encoding_predictor:n(512,24,1,"prediction_layer/box_predictor_2/box_encoding_predictor"),class_predictor:n(512,18,1,"prediction_layer/box_predictor_2/class_predictor")},box_predictor_3:{box_encoding_predictor:n(256,24,1,"prediction_layer/box_predictor_3/box_encoding_predictor"),class_predictor:n(256,18,1,"prediction_layer/box_predictor_3/class_predictor")},box_predictor_4:{box_encoding_predictor:n(256,24,1,"prediction_layer/box_predictor_4/box_encoding_predictor"),class_predictor:n(256,18,1,"prediction_layer/box_predictor_4/class_predictor")},box_predictor_5:{box_encoding_predictor:n(128,24,1,"prediction_layer/box_predictor_5/box_encoding_predictor"),class_predictor:n(128,18,1,"prediction_layer/box_predictor_5/class_predictor")}}}}}function xe(t){var e=[],n=function(t,e){var n=Ct(t,e);function r(t,e,r){return{filters:n(t+"/Conv2d_"+e+"_pointwise/weights",4,r+"/filters"),batch_norm_offset:n(t+"/Conv2d_"+e+"_pointwise/convolution_bn_offset",1,r+"/batch_norm_offset")}}function o(t){var e="mobilenetv1/conv_"+t,o="MobilenetV1/Conv2d_"+t+"_depthwise",i=e+"/depthwise_conv",a=e+"/pointwise_conv";return{depthwise_conv:{filters:n(o+"/depthwise_weights",4,i+"/filters"),batch_norm_scale:n(o+"/BatchNorm/gamma",1,i+"/batch_norm_scale"),batch_norm_offset:n(o+"/BatchNorm/beta",1,i+"/batch_norm_offset"),batch_norm_mean:n(o+"/BatchNorm/moving_mean",1,i+"/batch_norm_mean"),batch_norm_variance:n(o+"/BatchNorm/moving_variance",1,i+"/batch_norm_variance")},pointwise_conv:r("MobilenetV1",t,a)}}function i(t,e){return{filters:n(t+"/weights",4,e+"/filters"),bias:n(t+"/biases",1,e+"/bias")}}function a(t){return{box_encoding_predictor:i("Prediction/BoxPredictor_"+t+"/BoxEncodingPredictor","prediction_layer/box_predictor_"+t+"/box_encoding_predictor"),class_predictor:i("Prediction/BoxPredictor_"+t+"/ClassPredictor","prediction_layer/box_predictor_"+t+"/class_predictor")}}return{extractMobilenetV1Params:function(){return{conv_0:r("MobilenetV1",0,"mobilenetv1/conv_0"),conv_1:o(1),conv_2:o(2),conv_3:o(3),conv_4:o(4),conv_5:o(5),conv_6:o(6),conv_7:o(7),conv_8:o(8),conv_9:o(9),conv_10:o(10),conv_11:o(11),conv_12:o(12),conv_13:o(13)}},extractPredictionLayerParams:function(){return{conv_0:r("Prediction",0,"prediction_layer/conv_0"),conv_1:r("Prediction",1,"prediction_layer/conv_1"),conv_2:r("Prediction",2,"prediction_layer/conv_2"),conv_3:r("Prediction",3,"prediction_layer/conv_3"),conv_4:r("Prediction",4,"prediction_layer/conv_4"),conv_5:r("Prediction",5,"prediction_layer/conv_5"),conv_6:r("Prediction",6,"prediction_layer/conv_6"),conv_7:r("Prediction",7,"prediction_layer/conv_7"),box_predictor_0:a(0),box_predictor_1:a(1),box_predictor_2:a(2),box_predictor_3:a(3),box_predictor_4:a(4),box_predictor_5:a(5)}}}}(t,e),r=n.extractMobilenetV1Params,o=n.extractPredictionLayerParams,i=t["Output/extra_dim"];if(e.push({originalPath:"Output/extra_dim",paramPath:"output_layer/extra_dim"}),!x(i))throw new Error("expected weightMap['Output/extra_dim'] to be a Tensor3D, instead have "+i);var a={mobilenetv1:r(),prediction_layer:o(),output_layer:{extra_dim:i}};return At(t,e),{params:a,paramMappings:e}}function Oe(t,e,n){return b.L((function(){var r=b.i(t,e.filters,n,"same");return r=b.c(r,e.batch_norm_offset),b.g(r,0,6)}))}function Pe(t,e){return b.L((function(){var n=null,r=Oe(t,e.conv_0,[2,2]);if([e.conv_1,e.conv_2,e.conv_3,e.conv_4,e.conv_5,e.conv_6,e.conv_7,e.conv_8,e.conv_9,e.conv_10,e.conv_11,e.conv_12,e.conv_13].forEach((function(t,e){var o=e+1,i=function(t){return[2,4,6,12].some((function(e){return e===t}))?[2,2]:[1,1]}(o);r=Oe(r=function(t,e,n){return b.L((function(){var r=b.j(t,e.filters,n,"same");return r=b.e(r,e.batch_norm_mean,e.batch_norm_variance,e.batch_norm_offset,e.batch_norm_scale,.0010000000474974513),b.g(r,0,6)}))}(r,t.depthwise_conv,i),t.pointwise_conv,[1,1]),11===o&&(n=r)})),null===n)throw new Error("mobileNetV1 - output of conv layer 11 is null");return{out:r,conv11:n}}))}function Ee(t,e,n){var r=t.arraySync(),o=Math.min(r[e][0],r[e][2]),i=Math.min(r[e][1],r[e][3]),a=Math.max(r[e][0],r[e][2]),c=Math.max(r[e][1],r[e][3]),s=Math.min(r[n][0],r[n][2]),u=Math.min(r[n][1],r[n][3]),f=Math.max(r[n][0],r[n][2]),h=Math.max(r[n][1],r[n][3]),p=(a-o)*(c-i),l=(f-s)*(h-u);if(p<=0||l<=0)return 0;var d=Math.max(o,s),v=Math.max(i,u),m=Math.min(a,f),b=Math.min(c,h),g=Math.max(m-d,0)*Math.max(b-v,0);return g/(p+l-g)}function je(t,e){var n=function(t){var e=b.O(b.N(t,[1,0])),n=[b.F(e[2],e[0]),b.F(e[3],e[1])];return{sizes:n,centers:[b.c(e[0],b.k(n[0],b.y(2))),b.c(e[1],b.k(n[1],b.y(2)))]}}(t),r=n.sizes,o=n.centers,i=b.O(b.N(e,[1,0])),a=b.k(b.t(b.l(b.k(i[2],b.y(5))),r[0]),b.y(2)),c=b.c(b.t(b.k(i[0],b.y(10)),r[0]),o[0]),s=b.k(b.t(b.l(b.k(i[3],b.y(5))),r[1]),b.y(2)),u=b.c(b.t(b.k(i[1],b.y(10)),r[1]),o[1]);return b.N(b.E([b.F(c,a),b.F(u,s),b.c(c,a),b.c(u,s)]),[1,0])}function Me(t,e){return b.L((function(){var n=t.shape[0];return{boxPredictionEncoding:b.x(St(t,e.box_encoding_predictor),[n,-1,1,4]),classPrediction:b.x(St(t,e.class_predictor),[n,-1,3])}}))}var Se=function(){function t(t){var e=void 0===t?{}:t,n=e.minConfidence,r=e.maxResults;if(this._name="SsdMobilenetv1Options",this._minConfidence=n||.5,this._maxResults=r||100,"number"!==typeof this._minConfidence||this._minConfidence<=0||this._minConfidence>=1)throw new Error(this._name+" - expected minConfidence to be a number between 0 and 1");if("number"!==typeof this._maxResults)throw new Error(this._name+" - expected maxResults to be a number")}return Object.defineProperty(t.prototype,"minConfidence",{get:function(){return this._minConfidence},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"maxResults",{get:function(){return this._maxResults},enumerable:!0,configurable:!0}),t}(),Ae=function(t){function e(){return t.call(this,"SsdMobilenetv1")||this}return Object(y.c)(e,t),e.prototype.forwardInput=function(t){var e=this.params;if(!e)throw new Error("SsdMobilenetv1 - load model before inference");return b.L((function(){var n=t.toBatchTensor(512,!1).toFloat(),r=Pe(b.F(b.t(n,b.y(.007843137718737125)),b.y(1)),e.mobilenetv1),o=function(t,e,n){return b.L((function(){var r=Oe(t,n.conv_0,[1,1]),o=Oe(r,n.conv_1,[2,2]),i=Oe(o,n.conv_2,[1,1]),a=Oe(i,n.conv_3,[2,2]),c=Oe(a,n.conv_4,[1,1]),s=Oe(c,n.conv_5,[2,2]),u=Oe(s,n.conv_6,[1,1]),f=Oe(u,n.conv_7,[2,2]),h=Me(e,n.box_predictor_0),p=Me(t,n.box_predictor_1),l=Me(o,n.box_predictor_2),d=Me(a,n.box_predictor_3),v=Me(s,n.box_predictor_4),m=Me(f,n.box_predictor_5);return{boxPredictions:b.h([h.boxPredictionEncoding,p.boxPredictionEncoding,l.boxPredictionEncoding,d.boxPredictionEncoding,v.boxPredictionEncoding,m.boxPredictionEncoding],1),classPredictions:b.h([h.classPrediction,p.classPrediction,l.classPrediction,d.classPrediction,v.classPrediction,m.classPrediction],1)}}))}(r.out,r.conv11,e.prediction_layer);return function(t,e,n){return b.L((function(){var r=t.shape[0],o=je(b.x(b.M(n.extra_dim,[r,1,1]),[-1,4]),b.x(t,[-1,4]));o=b.x(o,[r,o.shape[0]/r,4]);var i=b.A(b.B(e,[0,0,1],[-1,-1,-1])),a=b.B(i,[0,0,0],[-1,-1,1]);return a=b.x(a,[r,a.shape[1]]),{boxes:b.O(o),scores:b.O(a)}}))}(o.boxPredictions,o.classPredictions,e.output_layer)}))},e.prototype.forward=function(t){return Object(y.b)(this,void 0,void 0,(function(){var e;return Object(y.d)(this,(function(n){switch(n.label){case 0:return e=this.forwardInput,[4,bt(t)];case 1:return[2,e.apply(this,[n.sent()])]}}))}))},e.prototype.locateFaces=function(t,e){return void 0===e&&(e={}),Object(y.b)(this,void 0,void 0,(function(){var n,r,o,i,a,c,s,u,f,h,p,l,d,v,m,b,g,w,_,x;return Object(y.d)(this,(function(y){switch(y.label){case 0:return n=new Se(e),r=n.maxResults,o=n.minConfidence,[4,bt(t)];case 1:for(i=y.sent(),a=this.forwardInput(i),c=a.boxes,s=a.scores,u=c[0],f=s[0],h=1;ho})).sort((function(t,e){return e.score-t.score})),s=[];return c.forEach((function(e){if(!(s.length>=a)){for(var n=e.score,i=s.length-1;i>=0;--i){var c=Ee(t,e.boxIndex,s[i]);if(0!==c&&(e.score*=c<=r?1:0,e.score<=o))break}n===e.score&&s.push(e.boxIndex)}})),s}(u,p,r,.5,o),m=i.getReshapedInputDimensions(0),b=i.inputSize,g=b/m.width,w=b/m.height,_=u.arraySync(),x=v.map((function(t){var e=[Math.max(0,_[t][0]),Math.min(1,_[t][2])].map((function(t){return t*w})),n=e[0],r=e[1],o=[Math.max(0,_[t][1]),Math.min(1,_[t][3])].map((function(t){return t*g})),a=o[0],c=o[1];return new C(p[t],new z(a,n,c-a,r-n),{height:i.getInputHeight(0),width:i.getInputWidth(0)})})),u.dispose(),f.dispose(),[2,x]}}))}))},e.prototype.getDefaultModelName=function(){return"ssd_mobilenetv1_model"},e.prototype.extractParamsFromWeigthMap=function(t){return xe(t)},e.prototype.extractParams=function(t){return function(t){var e=[],n=Rt(t),r=n.extractWeights,o=n.getRemainingWeights,i=_e(r,e),a=i.extractMobilenetV1Params,c=i.extractPredictionLayerParams,s=a(),u=c(),f={extra_dim:b.J(r(20472),[1,5118,4])};if(e.push({paramPath:"output_layer/extra_dim"}),0!==o().length)throw new Error("weights remaing after extract: "+o().length);return{params:{mobilenetv1:s,prediction_layer:u,output_layer:f},paramMappings:e}}(t)},e}(Pt);!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(y.c)(e,t)}(Ae);var Te,Ie=[new I(.738768,.874946),new I(2.42204,2.65704),new I(4.30971,7.04493),new I(10.246,4.59428),new I(12.6868,11.8741)],De=[new I(1.603231,2.094468),new I(6.041143,7.080126),new I(2.882459,3.518061),new I(4.266906,5.178857),new I(9.041765,10.66308)],Fe=[117.001,114.697,97.404],Le=function(t){return"number"===typeof t};function Ce(t){return b.L((function(){var e=b.t(t,b.y(.10000000149011612));return b.c(b.w(b.F(t,e)),e)}))}function Re(t,e){return b.L((function(){var n=b.v(t,[[0,0],[1,1],[1,1],[0,0]]);return n=b.i(n,e.conv.filters,[1,1],"valid"),n=b.F(n,e.bn.sub),n=b.t(n,e.bn.truediv),Ce(n=b.c(n,e.conv.bias))}))}function ke(t,e){return b.L((function(){var n=b.v(t,[[0,0],[1,1],[1,1],[0,0]]);return n=b.z(n,e.depthwise_filter,e.pointwise_filter,[1,1],"valid"),Ce(n=b.c(n,e.bias))}))}function Be(t,e){var n=Tt(t,e);var r=Ft(t,e);return{extractConvParams:n,extractConvWithBatchNormParams:function(r,o,i){return{conv:n(r,o,3,i+"/conv"),bn:function(n,r){var o=b.H(t(n)),i=b.H(t(n));return e.push({paramPath:r+"/sub"},{paramPath:r+"/truediv"}),{sub:o,truediv:i}}(o,i+"/bn")}},extractSeparableConvParams:r}}function Ne(t,e){var n=Ct(t,e);function r(t){return{filters:n(t+"/filters",4),bias:n(t+"/bias",1)}}return{extractConvParams:r,extractConvWithBatchNormParams:function(t){return{conv:r(t+"/conv"),bn:function(t){return{sub:n(t+"/sub",1),truediv:n(t+"/truediv",1)}}(t+"/bn")}},extractSeparableConvParams:Lt(n)}}!function(t){t[t.XS=224]="XS",t[t.SM=320]="SM",t[t.MD=416]="MD",t[t.LG=608]="LG"}(Te||(Te={}));var ze=function(){function t(t){var e=void 0===t?{}:t,n=e.inputSize,r=e.scoreThreshold;if(this._name="TinyYolov2Options",this._inputSize=n||416,this._scoreThreshold=r||.5,"number"!==typeof this._inputSize||this._inputSize%32!==0)throw new Error(this._name+" - expected inputSize to be a number divisible by 32");if("number"!==typeof this._scoreThreshold||this._scoreThreshold<=0||this._scoreThreshold>=1)throw new Error(this._name+" - expected scoreThreshold to be a number between 0 and 1")}return Object.defineProperty(t.prototype,"inputSize",{get:function(){return this._inputSize},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"scoreThreshold",{get:function(){return this._scoreThreshold},enumerable:!0,configurable:!0}),t}(),We=function(t){function e(e){var n=t.call(this,"TinyYolov2")||this;return function(t){if(!t)throw new Error("invalid config: "+t);if("boolean"!==typeof t.withSeparableConvs)throw new Error("config.withSeparableConvs has to be a boolean, have: "+t.withSeparableConvs);if(!Le(t.iouThreshold)||t.iouThreshold<0||t.iouThreshold>1)throw new Error("config.iouThreshold has to be a number between [0, 1], have: "+t.iouThreshold);if(!Array.isArray(t.classes)||!t.classes.length||!t.classes.every((function(t){return"string"===typeof t})))throw new Error("config.classes has to be an array class names: string[], have: "+JSON.stringify(t.classes));if(!Array.isArray(t.anchors)||!t.anchors.length||!t.anchors.map((function(t){return t||{}})).every((function(t){return Le(t.x)&&Le(t.y)})))throw new Error("config.anchors has to be an array of { x: number, y: number }, have: "+JSON.stringify(t.anchors));if(t.meanRgb&&(!Array.isArray(t.meanRgb)||3!==t.meanRgb.length||!t.meanRgb.every(Le)))throw new Error("config.meanRgb has to be an array of shape [number, number, number], have: "+JSON.stringify(t.meanRgb))}(e),n._config=e,n}return Object(y.c)(e,t),Object.defineProperty(e.prototype,"config",{get:function(){return this._config},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"withClassScores",{get:function(){return this.config.withClassScores||this.config.classes.length>1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"boxEncodingSize",{get:function(){return 5+(this.withClassScores?this.config.classes.length:0)},enumerable:!0,configurable:!0}),e.prototype.runTinyYolov2=function(t,e){var n=Re(t,e.conv0);return n=Re(n=b.s(n,[2,2],[2,2],"same"),e.conv1),n=Re(n=b.s(n,[2,2],[2,2],"same"),e.conv2),n=Re(n=b.s(n,[2,2],[2,2],"same"),e.conv3),n=Re(n=b.s(n,[2,2],[2,2],"same"),e.conv4),n=Re(n=b.s(n,[2,2],[2,2],"same"),e.conv5),n=Re(n=b.s(n,[2,2],[1,1],"same"),e.conv6),St(n=Re(n,e.conv7),e.conv8,"valid",!1)},e.prototype.runMobilenet=function(t,e){var n=this.config.isFirstLayerConv2d?Ce(St(t,e.conv0,"valid",!1)):ke(t,e.conv0);return n=ke(n=b.s(n,[2,2],[2,2],"same"),e.conv1),n=ke(n=b.s(n,[2,2],[2,2],"same"),e.conv2),n=ke(n=b.s(n,[2,2],[2,2],"same"),e.conv3),n=ke(n=b.s(n,[2,2],[2,2],"same"),e.conv4),n=ke(n=b.s(n,[2,2],[2,2],"same"),e.conv5),n=b.s(n,[2,2],[1,1],"same"),n=e.conv6?ke(n,e.conv6):n,St(n=e.conv7?ke(n,e.conv7):n,e.conv8,"valid",!1)},e.prototype.forwardInput=function(t,e){var n=this,r=this.params;if(!r)throw new Error("TinyYolov2 - load model before inference");return b.L((function(){var o=t.toBatchTensor(e,!1).toFloat();return o=(o=n.config.meanRgb?B(o,n.config.meanRgb):o).div(b.y(256)),n.config.withSeparableConvs?n.runMobilenet(o,r):n.runTinyYolov2(o,r)}))},e.prototype.forward=function(t,e){return Object(y.b)(this,void 0,void 0,(function(){var n;return Object(y.d)(this,(function(r){switch(r.label){case 0:return n=this.forwardInput,[4,bt(t)];case 1:return[4,n.apply(this,[r.sent(),e])];case 2:return[2,r.sent()]}}))}))},e.prototype.detect=function(t,e){return void 0===e&&(e={}),Object(y.b)(this,void 0,void 0,(function(){var n,r,o,i,a,c,s,u,f,h,p,l,d,v=this;return Object(y.d)(this,(function(m){switch(m.label){case 0:return n=new ze(e),r=n.inputSize,o=n.scoreThreshold,[4,bt(t)];case 1:return i=m.sent(),[4,this.forwardInput(i,r)];case 2:return a=m.sent(),c=b.L((function(){return b.O(a)[0].expandDims()})),s={width:i.getInputWidth(0),height:i.getInputHeight(0)},[4,this.extractBoxes(c,i.getReshapedInputDimensions(0),o)];case 3:return u=m.sent(),a.dispose(),c.dispose(),f=u.map((function(t){return t.box})),h=u.map((function(t){return t.score})),p=u.map((function(t){return t.classScore})),l=u.map((function(t){return v.config.classes[t.label]})),d=k(f.map((function(t){return t.rescale(r)})),h,this.config.iouThreshold,!0),[2,d.map((function(t){return new L(h[t],p[t],l[t],f[t],s)}))]}}))}))},e.prototype.getDefaultModelName=function(){return""},e.prototype.extractParamsFromWeigthMap=function(t){return function(t,e){var n,r=[],o=Ne(t,r),i=o.extractConvParams,a=o.extractConvWithBatchNormParams,c=o.extractSeparableConvParams;if(e.withSeparableConvs){var s=e.filterSizes&&e.filterSizes.length||9;n={conv0:e.isFirstLayerConv2d?i("conv0"):c("conv0"),conv1:c("conv1"),conv2:c("conv2"),conv3:c("conv3"),conv4:c("conv4"),conv5:c("conv5"),conv6:s>7?c("conv6"):void 0,conv7:s>8?c("conv7"):void 0,conv8:i("conv8")}}else n={conv0:a("conv0"),conv1:a("conv1"),conv2:a("conv2"),conv3:a("conv3"),conv4:a("conv4"),conv5:a("conv5"),conv6:a("conv6"),conv7:a("conv7"),conv8:i("conv8")};return At(t,r),{params:n,paramMappings:r}}(t,this.config)},e.prototype.extractParams=function(t){var n=this.config.filterSizes||e.DEFAULT_FILTER_SIZES,r=n?n.length:void 0;if(7!==r&&8!==r&&9!==r)throw new Error("TinyYolov2 - expected 7 | 8 | 9 convolutional filters, but found "+r+" filterSizes in config");return function(t,e,n,r){var o,i=Rt(t),a=i.extractWeights,c=i.getRemainingWeights,s=[],u=Be(a,s),f=u.extractConvParams,h=u.extractConvWithBatchNormParams,p=u.extractSeparableConvParams;if(e.withSeparableConvs){var l=r[0],d=r[1],v=r[2],m=r[3],b=r[4],g=r[5],y=r[6],w=r[7],_=r[8];o={conv0:e.isFirstLayerConv2d?f(l,d,3,"conv0"):p(l,d,"conv0"),conv1:p(d,v,"conv1"),conv2:p(v,m,"conv2"),conv3:p(m,b,"conv3"),conv4:p(b,g,"conv4"),conv5:p(g,y,"conv5"),conv6:w?p(y,w,"conv6"):void 0,conv7:_?p(w,_,"conv7"):void 0,conv8:f(_||w||y,5*n,1,"conv8")}}else l=r[0],d=r[1],v=r[2],m=r[3],b=r[4],g=r[5],y=r[6],w=r[7],_=r[8],o={conv0:h(l,d,"conv0"),conv1:h(d,v,"conv1"),conv2:h(v,m,"conv2"),conv3:h(m,b,"conv3"),conv4:h(b,g,"conv4"),conv5:h(g,y,"conv5"),conv6:h(y,w,"conv6"),conv7:h(w,_,"conv7"),conv8:f(_,5*n,1,"conv8")};if(0!==c().length)throw new Error("weights remaing after extract: "+c().length);return{params:o,paramMappings:s}}(t,this.config,this.boxEncodingSize,n)},e.prototype.extractBoxes=function(t,e,n){return Object(y.b)(this,void 0,void 0,(function(){var r,o,i,a,c,s,u,f,h,p,l,d,v,m,g,w,_,x,O,P,E,j,M,S,A,T,I,D,L,C=this;return Object(y.d)(this,(function(R){switch(R.label){case 0:return r=e.width,o=e.height,i=Math.max(r,o),a=i/r,c=i/o,s=t.shape[1],u=this.config.anchors.length,f=b.L((function(){var e=t.reshape([s,s,u,C.boxEncodingSize]);return[e.slice([0,0,0,0],[s,s,u,4]),e.slice([0,0,0,4],[s,s,u,1]),C.withClassScores?b.D(e.slice([0,0,0,5],[s,s,u,C.config.classes.length]),3):b.y(0)]})),h=f[0],p=f[1],l=f[2],d=[],[4,p.array()];case 1:return v=R.sent(),[4,h.array()];case 2:m=R.sent(),g=0,R.label=3;case 3:if(!(gn?(O=(w+N(m[g][w][_][0]))/s*a,P=(g+N(m[g][w][_][1]))/s*c,E=Math.exp(m[g][w][_][2])*this.config.anchors[_].x/s*a,j=Math.exp(m[g][w][_][3])*this.config.anchors[_].y/s*c,M=O-E/2,S=P-j/2,A={row:g,col:w,anchor:_},this.withClassScores?[4,this.extractPredictedClass(l,A)]:[3,7]):[3,9]):[3,10];case 6:return L=R.sent(),[3,8];case 7:L={classScore:1,label:0},R.label=8;case 8:I=(T=L).classScore,D=T.label,d.push(Object(y.a)({box:new F(M,S,M+E,S+j),score:x,classScore:x*I,label:D},A)),R.label=9;case 9:return _++,[3,5];case 10:return w++,[3,4];case 11:return g++,[3,3];case 12:return h.dispose(),p.dispose(),l.dispose(),[2,d]}}))}))},e.prototype.extractPredictedClass=function(t,e){return Object(y.b)(this,void 0,void 0,(function(){var n,r,o,i;return Object(y.d)(this,(function(a){switch(a.label){case 0:return n=e.row,r=e.col,o=e.anchor,[4,t.array()];case 1:return i=a.sent(),[2,Array(this.config.classes.length).fill(0).map((function(t,e){return i[n][r][o][e]})).map((function(t,e){return{classScore:t,label:e}})).reduce((function(t,e){return t.classScore>e.classScore?t:e}))]}}))}))},e.DEFAULT_FILTER_SIZES=[3,16,32,64,128,256,512,1024,1024],e}(Pt),Ue=function(t){function e(e){void 0===e&&(e=!0);var n=Object.assign({},{withSeparableConvs:e,iouThreshold:.4,classes:["face"]},e?{anchors:De,meanRgb:Fe}:{anchors:Ie,withClassScores:!0});return t.call(this,n)||this}return Object(y.c)(e,t),Object.defineProperty(e.prototype,"withSeparableConvs",{get:function(){return this.config.withSeparableConvs},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"anchors",{get:function(){return this.config.anchors},enumerable:!0,configurable:!0}),e.prototype.locateFaces=function(t,e){return Object(y.b)(this,void 0,void 0,(function(){return Object(y.d)(this,(function(n){switch(n.label){case 0:return[4,this.detect(t,e)];case 1:return[2,n.sent().map((function(t){return new C(t.score,t.relativeBox,{width:t.imageWidth,height:t.imageHeight})}))]}}))}))},e.prototype.getDefaultModelName=function(){return this.withSeparableConvs?"tiny_yolov2_separable_conv_model":"tiny_yolov2_model"},e.prototype.extractParamsFromWeigthMap=function(e){return t.prototype.extractParamsFromWeigthMap.call(this,e)},e}(We);var He=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._name="TinyFaceDetectorOptions",e}return Object(y.c)(e,t),e}(ze),Ye=function(){function t(){}return t.prototype.then=function(t){return Object(y.b)(this,void 0,void 0,(function(){var e;return Object(y.d)(this,(function(n){switch(n.label){case 0:return e=t,[4,this.run()];case 1:return[2,e.apply(void 0,[n.sent()])]}}))}))},t.prototype.run=function(){return Object(y.b)(this,void 0,void 0,(function(){return Object(y.d)(this,(function(t){throw new Error("ComposableTask - run is not implemented")}))}))},t}();function qe(t,e,n,r,o){return void 0===o&&(o=function(t){return t.alignedRect}),Object(y.b)(this,void 0,void 0,(function(){var i,a,c,s,u;return Object(y.d)(this,(function(f){switch(f.label){case 0:return i=t.map((function(t){return Jt(t)?o(t):t.detection})),(c=r)?[3,5]:e instanceof b.a?[4,yt(e,i)]:[3,2];case 1:return s=f.sent(),[3,4];case 2:return[4,gt(e,i)];case 3:s=f.sent(),f.label=4;case 4:c=s,f.label=5;case 5:return[4,n(a=c)];case 6:return u=f.sent(),a.forEach((function(t){return t instanceof b.a&&t.dispose()})),[2,u]}}))}))}function Ve(t,e,n,r,o){return Object(y.b)(this,void 0,void 0,(function(){var i=this;return Object(y.d)(this,(function(a){return[2,qe([t],e,(function(t){return Object(y.b)(i,void 0,void 0,(function(){return Object(y.d)(this,(function(e){return[2,n(t[0])]}))}))}),r,o)]}))}))}function Ge(t){var e=Rt(t),n=e.extractWeights,r=e.getRemainingWeights,o=[],i=function(t,e){var n=Tt(t,e),r=It(t,e);function o(n,r){var o=b.H(t(n));return e.push({paramPath:r}),o}function i(t,e,r){return void 0===r&&(r=!1),{conv1:n(t[0],t[1],3,e+"/conv1"),prelu1_alpha:o(t[1],e+"/prelu1_alpha"),conv2:n(t[1],t[2],3,e+"/conv2"),prelu2_alpha:o(t[2],e+"/prelu2_alpha"),conv3:n(t[2],t[3],r?2:3,e+"/conv3"),prelu3_alpha:o(t[3],e+"/prelu3_alpha")}}return{extractPNetParams:function(){var t=i([3,10,16,32],"pnet"),e=n(32,2,1,"pnet/conv4_1"),r=n(32,4,1,"pnet/conv4_2");return Object(y.a)(Object(y.a)({},t),{conv4_1:e,conv4_2:r})},extractRNetParams:function(){var t=i([3,28,48,64],"rnet",!0),e=r(576,128,"rnet/fc1"),n=o(128,"rnet/prelu4_alpha"),a=r(128,2,"rnet/fc2_1"),c=r(128,4,"rnet/fc2_2");return Object(y.a)(Object(y.a)({},t),{fc1:e,prelu4_alpha:n,fc2_1:a,fc2_2:c})},extractONetParams:function(){var t=i([3,32,64,64],"onet"),e=n(64,128,2,"onet/conv4"),a=o(128,"onet/prelu4_alpha"),c=r(1152,256,"onet/fc1"),s=o(256,"onet/prelu5_alpha"),u=r(256,2,"onet/fc2_1"),f=r(256,4,"onet/fc2_2"),h=r(256,10,"onet/fc2_3");return Object(y.a)(Object(y.a)({},t),{conv4:e,prelu4_alpha:a,fc1:c,prelu5_alpha:s,fc2_1:u,fc2_2:f,fc2_3:h})}}}(n,o),a=i.extractPNetParams,c=i.extractRNetParams,s=i.extractONetParams,u=a(),f=c(),h=s();if(0!==r().length)throw new Error("weights remaing after extract: "+r().length);return{params:{pnet:u,rnet:f,onet:h},paramMappings:o}}function Je(t){var e=[],n=function(t,e){var n=Ct(t,e);function r(t){return{filters:n(t+"/weights",4,t+"/filters"),bias:n(t+"/bias",1)}}function o(t){return{weights:n(t+"/weights",2),bias:n(t+"/bias",1)}}function i(t){return n(t,1)}function a(t){return{conv1:r(t+"/conv1"),prelu1_alpha:i(t+"/prelu1_alpha"),conv2:r(t+"/conv2"),prelu2_alpha:i(t+"/prelu2_alpha"),conv3:r(t+"/conv3"),prelu3_alpha:i(t+"/prelu3_alpha")}}return{extractPNetParams:function(){var t=a("pnet"),e=r("pnet/conv4_1"),n=r("pnet/conv4_2");return Object(y.a)(Object(y.a)({},t),{conv4_1:e,conv4_2:n})},extractRNetParams:function(){var t=a("rnet"),e=o("rnet/fc1"),n=i("rnet/prelu4_alpha"),r=o("rnet/fc2_1"),c=o("rnet/fc2_2");return Object(y.a)(Object(y.a)({},t),{fc1:e,prelu4_alpha:n,fc2_1:r,fc2_2:c})},extractONetParams:function(){var t=a("onet"),e=r("onet/conv4"),n=i("onet/prelu4_alpha"),c=o("onet/fc1"),s=i("onet/prelu5_alpha"),u=o("onet/fc2_1"),f=o("onet/fc2_2"),h=o("onet/fc2_3");return Object(y.a)(Object(y.a)({},t),{conv4:e,prelu4_alpha:n,fc1:c,prelu5_alpha:s,fc2_1:u,fc2_2:f,fc2_3:h})}}}(t,e),r=n.extractPNetParams,o=n.extractRNetParams,i=n.extractONetParams,a=r(),c=o(),s=i();return At(t,e),{params:{pnet:a,rnet:c,onet:s},paramMappings:e}}function Ke(t,e){var n=e[0],r=e[1];return{height:Math.floor(n*t),width:Math.floor(r*t)}}var Xe=function(t){function e(e,n,r,o){return t.call(this,{left:e,top:n,right:r,bottom:o},!0)||this}return Object(y.c)(e,t),e}(D);function Ze(t){return b.L((function(){return b.t(b.F(t,b.y(127.5)),b.y(.0078125))}))}function Qe(t,e){return b.L((function(){return b.c(b.w(t),b.t(e,b.u(b.w(b.u(t)))))}))}function $e(t,e,n){return void 0===n&&(n=!1),b.L((function(){var r=St(t,e.conv1,"valid");return r=Qe(r,e.prelu1_alpha),r=Qe(r=St(r=b.s(r,n?[2,2]:[3,3],[2,2],"same"),e.conv2,"valid"),e.prelu2_alpha),r=Qe(r=St(r=n?r:b.s(r,[3,3],[2,2],"valid"),e.conv3,"valid"),e.prelu3_alpha)}))}function tn(t,e,n,r,o){o.stage1=[];var i=e.map((function(e){return b.L((function(){var n={scale:e},o=function(t,e){return b.L((function(){var n=Ke(e,t.shape.slice(1)),r=n.height,o=n.width,i=Ze(b.o.resizeBilinear(t,[r,o]));return b.N(i,[0,2,1,3])}))}(t,e),i=Date.now(),a=function(t,e){return b.L((function(){var n=$e(t,e,!0),r=St(n,e.conv4_1,"valid"),o=b.m(b.r(r,3),3);return{prob:b.D(b.F(r,o),3),regions:St(n,e.conv4_2,"valid")}}))}(o,r),c=a.prob,s=a.regions;return n.pnet=Date.now()-i,{scoresTensor:b.O(b.O(c,3)[1])[0],regionsTensor:b.O(s)[0],scale:e,statsForScale:n}}))})).map((function(t){var e=t.scoresTensor,r=t.regionsTensor,i=t.scale,a=t.statsForScale,c=function(t,e,n,r){for(var o=[],i=t.arraySync(),a=0;a=r&&o.push(new I(c,a));return o.map((function(t){var r=new F(Math.round((2*t.y+1)/n),Math.round((2*t.x+1)/n),Math.round((2*t.y+12)/n),Math.round((2*t.x+12)/n)),o=i[t.y][t.x],a=e.arraySync();return{cell:r,score:o,region:new Xe(a[t.y][t.x][0],a[t.y][t.x][1],a[t.y][t.x][2],a[t.y][t.x][3])}}))}(e,r,i,n);if(e.dispose(),r.dispose(),!c.length)return o.stage1.push(a),[];var s=Date.now(),u=k(c.map((function(t){return t.cell})),c.map((function(t){return t.score})),.5);return a.nms=Date.now()-s,a.numBoxes=u.length,o.stage1.push(a),u.map((function(t){return c[t]}))})).reduce((function(t,e){return t.concat(e)}),[]),a=[],c=[];if(i.length>0){var s=Date.now(),u=k(i.map((function(t){return t.cell})),i.map((function(t){return t.score})),.7);o.stage1_nms=Date.now()-s,c=u.map((function(t){return i[t].score})),a=u.map((function(t){return i[t]})).map((function(t){var e=t.cell,n=t.region;return new F(e.left+n.left*e.width,e.top+n.top*e.height,e.right+n.right*e.width,e.bottom+n.bottom*e.height).toSquare().round()}))}return{boxes:a,scores:c}}function en(t,e,n){var r=n.width,o=n.height;return Object(y.b)(this,void 0,void 0,(function(){var n,i,a,c=this;return Object(y.d)(this,(function(s){switch(s.label){case 0:return n=at(t),[4,Promise.all(e.map((function(e){return Object(y.b)(c,void 0,void 0,(function(){var r,o,i,a,c,s,u,f;return Object(y.d)(this,(function(h){return r=e.padAtBorders(t.height,t.width),o=r.y,i=r.ey,a=r.x,c=r.ex,s=a-1,u=o-1,f=n.getImageData(s,u,c-s,i-u),[2,ot.isNodejs()?lt(f):createImageBitmap(f)]}))}))})))];case 1:return i=s.sent(),a=[],i.forEach((function(t){var e=at(pt({width:r,height:o}));e.drawImage(t,0,0,r,o);for(var n=e.getImageData(0,0,r,o).data,i=[],c=0;c1?b.h(c.map((function(t){return t.scores}))):c[0].scores,h=(f=Array).from,[4,s.data()];case 2:return u=h.apply(f,[y.sent()]),s.dispose(),p=u.map((function(t,e){return{score:t,idx:e}})).filter((function(t){return t.score>n})).map((function(t){return t.idx})),l=p.map((function(t){return e[t]})),d=p.map((function(t){return u[t]})),v=[],m=[],l.length>0&&(i=Date.now(),g=k(l,d,.7),o.stage2_nms=Date.now()-i,w=g.map((function(t){var e=c[p[t]].regions.arraySync();return new Xe(e[0][0],e[0][1],e[0][2],e[0][3])})),m=g.map((function(t){return d[t]})),v=g.map((function(t,e){return l[t].calibrate(w[e])}))),c.forEach((function(t){t.regions.dispose(),t.scores.dispose()})),[2,{boxes:v,scores:m}]}}))}))}function rn(t,e,n,r,o){return Object(y.b)(this,void 0,void 0,(function(){var i,a,c,s,u,f,h,p,l,d,v,m,g,w,_;return Object(y.d)(this,(function(y){switch(y.label){case 0:return i=Date.now(),[4,en(t,e,{width:48,height:48})];case 1:return a=y.sent(),o.stage3_extractImagePatches=Date.now()-i,i=Date.now(),c=a.map((function(t){var e=function(t,e){return b.L((function(){var n=$e(t,e);n=Qe(n=St(n=b.s(n,[2,2],[2,2],"same"),e.conv4,"valid"),e.prelu4_alpha);var r=Qe(Wt(b.x(n,[n.shape[0],e.fc1.weights.shape[0]]),e.fc1),e.prelu5_alpha),o=Wt(r,e.fc2_1),i=b.m(b.r(o,1),1),a=b.D(b.F(o,i),1),c=Wt(r,e.fc2_2),s=Wt(r,e.fc2_3);return{scores:b.O(a,1)[1],regions:c,points:s}}))}(t,r);return t.dispose(),e})),o.stage3_onet=Date.now()-i,s=c.length>1?b.h(c.map((function(t){return t.scores}))):c[0].scores,h=(f=Array).from,[4,s.data()];case 2:return u=h.apply(f,[y.sent()]),s.dispose(),p=u.map((function(t,e){return{score:t,idx:e}})).filter((function(t){return t.score>n})).map((function(t){return t.idx})),l=p.map((function(t){var e=c[t].regions.arraySync();return new Xe(e[0][0],e[0][1],e[0][2],e[0][3])})),d=p.map((function(t,n){return e[t].calibrate(l[n])})),v=p.map((function(t){return u[t]})),m=[],g=[],w=[],d.length>0&&(i=Date.now(),_=k(d,v,.7,!1),o.stage3_nms=Date.now()-i,m=_.map((function(t){return d[t]})),g=_.map((function(t){return v[t]})),w=_.map((function(t,e){return Array(5).fill(0).map((function(n,r){var o=c[t].points.arraySync();return new I(o[0][r]*(m[e].width+1)+m[e].left,o[0][r+5]*(m[e].height+1)+m[e].top)}))}))),c.forEach((function(t){t.regions.dispose(),t.scores.dispose(),t.points.dispose()})),[2,{boxes:m,scores:g,points:w}]}}))}))}var on=function(t){function e(){return t.call(this,"Mtcnn")||this}return Object(y.c)(e,t),e.prototype.load=function(e){return Object(y.b)(this,void 0,void 0,(function(){return Object(y.d)(this,(function(n){return console.warn("mtcnn is deprecated and will be removed soon"),[2,t.prototype.load.call(this,e)]}))}))},e.prototype.loadFromDisk=function(e){return Object(y.b)(this,void 0,void 0,(function(){return Object(y.d)(this,(function(n){return console.warn("mtcnn is deprecated and will be removed soon"),[2,t.prototype.loadFromDisk.call(this,e)]}))}))},e.prototype.forwardInput=function(t,e){return void 0===e&&(e={}),Object(y.b)(this,void 0,void 0,(function(){var n,r,o,i,a,c,s,u,f,h,p,l,d,v,m,g,w,_,x,O,P;return Object(y.d)(this,(function(y){switch(y.label){case 0:if(!(n=this.params))throw new Error("Mtcnn - load model before inference");if(!(r=t.canvases[0]))throw new Error("Mtcnn - inputCanvas is not defined, note that passing tensors into Mtcnn.forwardInput is not supported yet.");return o={},i=Date.now(),a=b.L((function(){return t=b.m(b.f.fromPixels(r)).toFloat(),b.L((function(){return b.E(b.O(t,3).reverse(),3)}));var t})),c=function(t){return a.dispose(),o.total=Date.now()-i,t},s=a.shape.slice(1),u=s[0],f=s[1],h=new we(e),p=h.minFaceSize,l=h.scaleFactor,d=h.maxNumScales,v=h.scoreThresholds,m=h.scaleSteps,g=(m||function(t,e,n){for(var r=n[0],o=n[1],i=12/t,a=[],c=Math.min(r,o)*i,s=0;c>=12;)a.push(i*Math.pow(e,s)),c*=e,s+=1;return a}(p,l,[u,f])).filter((function(t){var e=Ke(t,[u,f]);return Math.min(e.width,e.height)>12})).slice(0,d),o.scales=g,o.pyramid=g.map((function(t){return Ke(t,[u,f])})),w=Date.now(),[4,tn(a,g,v[0],n.pnet,o)];case 1:return _=y.sent(),o.total_stage1=Date.now()-w,_.boxes.length?(o.stage2_numInputBoxes=_.boxes.length,w=Date.now(),[4,nn(r,_.boxes,v[1],n.rnet,o)]):[2,c({results:[],stats:o})];case 2:return x=y.sent(),o.total_stage2=Date.now()-w,x.boxes.length?(o.stage3_numInputBoxes=x.boxes.length,w=Date.now(),[4,rn(r,x.boxes,v[2],n.onet,o)]):[2,c({results:[],stats:o})];case 3:return O=y.sent(),o.total_stage3=Date.now()-w,P=O.boxes.map((function(t,e){return Kt(J({},new C(O.scores[e],new z(t.left/f,t.top/u,t.width/f,t.height/u),{height:u,width:f})),new U(O.points[e].map((function(e){return e.sub(new I(t.left,t.top)).div(new I(t.width,t.height))})),{width:t.width,height:t.height}))})),[2,c({results:P,stats:o})]}}))}))},e.prototype.forward=function(t,e){return void 0===e&&(e={}),Object(y.b)(this,void 0,void 0,(function(){var n;return Object(y.d)(this,(function(r){switch(r.label){case 0:return n=this.forwardInput,[4,bt(t)];case 1:return[4,n.apply(this,[r.sent(),e])];case 2:return[2,r.sent().results]}}))}))},e.prototype.forwardWithStats=function(t,e){return void 0===e&&(e={}),Object(y.b)(this,void 0,void 0,(function(){var n;return Object(y.d)(this,(function(r){switch(r.label){case 0:return n=this.forwardInput,[4,bt(t)];case 1:return[2,n.apply(this,[r.sent(),e])]}}))}))},e.prototype.getDefaultModelName=function(){return"mtcnn_model"},e.prototype.extractParamsFromWeigthMap=function(t){return Je(t)},e.prototype.extractParams=function(t){return Ge(t)},e}(Pt),an=[new I(1.603231,2.094468),new I(6.041143,7.080126),new I(2.882459,3.518061),new I(4.266906,5.178857),new I(9.041765,10.66308)],cn=[117.001,114.697,97.404],sn=function(t){function e(){var e={withSeparableConvs:!0,iouThreshold:.4,classes:["face"],anchors:an,meanRgb:cn,isFirstLayerConv2d:!0,filterSizes:[3,16,32,64,128,256,512]};return t.call(this,e)||this}return Object(y.c)(e,t),Object.defineProperty(e.prototype,"anchors",{get:function(){return this.config.anchors},enumerable:!0,configurable:!0}),e.prototype.locateFaces=function(t,e){return Object(y.b)(this,void 0,void 0,(function(){return Object(y.d)(this,(function(n){switch(n.label){case 0:return[4,this.detect(t,e)];case 1:return[2,n.sent().map((function(t){return new C(t.score,t.relativeBox,{width:t.imageWidth,height:t.imageHeight})}))]}}))}))},e.prototype.getDefaultModelName=function(){return"tiny_face_detector_model"},e.prototype.extractParamsFromWeigthMap=function(e){return t.prototype.extractParamsFromWeigthMap.call(this,e)},e}(We),un={ssdMobilenetv1:new Ae,tinyFaceDetector:new sn,tinyYolov2:new Ue,mtcnn:new on,faceLandmark68Net:new ie,faceLandmark68TinyNet:new ce,faceRecognitionNet:new me,faceExpressionNet:new Vt,ageGenderNet:new re},fn=function(t){return un.ssdMobilenetv1.load(t)},hn=function(t){return un.faceLandmark68Net.load(t)},pn=function(t){return un.faceRecognitionNet.load(t)},ln=function(t){return un.faceExpressionNet.load(t)},dn=function(t){function e(e,n,r){var o=t.call(this)||this;return o.parentTask=e,o.input=n,o.extractedFaces=r,o}return Object(y.c)(e,t),e}(Ye),vn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(y.c)(e,t),e.prototype.run=function(){return Object(y.b)(this,void 0,void 0,(function(){var t,e,n=this;return Object(y.d)(this,(function(r){switch(r.label){case 0:return[4,this.parentTask];case 1:return[4,qe(t=r.sent(),this.input,(function(t){return Object(y.b)(n,void 0,void 0,(function(){return Object(y.d)(this,(function(e){switch(e.label){case 0:return[4,Promise.all(t.map((function(t){return un.faceExpressionNet.predictExpressions(t)})))];case 1:return[2,e.sent()]}}))}))}),this.extractedFaces)];case 2:return e=r.sent(),[2,t.map((function(t,n){return Gt(t,e[n])}))]}}))}))},e.prototype.withAgeAndGender=function(){return new wn(this,this.input)},e}(dn),mn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(y.c)(e,t),e.prototype.run=function(){return Object(y.b)(this,void 0,void 0,(function(){var t,e;return Object(y.d)(this,(function(n){switch(n.label){case 0:return[4,this.parentTask];case 1:return(t=n.sent())?[4,Ve(t,this.input,(function(t){return un.faceExpressionNet.predictExpressions(t)}),this.extractedFaces)]:[2];case 2:return e=n.sent(),[2,Gt(t,e)]}}))}))},e.prototype.withAgeAndGender=function(){return new _n(this,this.input)},e}(dn),bn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(y.c)(e,t),e.prototype.withAgeAndGender=function(){return new xn(this,this.input)},e.prototype.withFaceDescriptors=function(){return new En(this,this.input)},e}(vn),gn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(y.c)(e,t),e.prototype.withAgeAndGender=function(){return new On(this,this.input)},e.prototype.withFaceDescriptor=function(){return new jn(this,this.input)},e}(mn),yn=function(t){function e(e,n,r){var o=t.call(this)||this;return o.parentTask=e,o.input=n,o.extractedFaces=r,o}return Object(y.c)(e,t),e}(Ye),wn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(y.c)(e,t),e.prototype.run=function(){return Object(y.b)(this,void 0,void 0,(function(){var t,e,n=this;return Object(y.d)(this,(function(r){switch(r.label){case 0:return[4,this.parentTask];case 1:return[4,qe(t=r.sent(),this.input,(function(t){return Object(y.b)(n,void 0,void 0,(function(){return Object(y.d)(this,(function(e){switch(e.label){case 0:return[4,Promise.all(t.map((function(t){return un.ageGenderNet.predictAgeAndGender(t)})))];case 1:return[2,e.sent()]}}))}))}),this.extractedFaces)];case 2:return e=r.sent(),[2,t.map((function(t,n){var r=e[n],o=r.age;return ge(ye(t,r.gender,r.genderProbability),o)}))]}}))}))},e.prototype.withFaceExpressions=function(){return new vn(this,this.input)},e}(yn),_n=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(y.c)(e,t),e.prototype.run=function(){return Object(y.b)(this,void 0,void 0,(function(){var t,e,n,r,o;return Object(y.d)(this,(function(i){switch(i.label){case 0:return[4,this.parentTask];case 1:return(t=i.sent())?[4,Ve(t,this.input,(function(t){return un.ageGenderNet.predictAgeAndGender(t)}),this.extractedFaces)]:[2];case 2:return e=i.sent(),n=e.age,r=e.gender,o=e.genderProbability,[2,ge(ye(t,r,o),n)]}}))}))},e.prototype.withFaceExpressions=function(){return new mn(this,this.input)},e}(yn),xn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(y.c)(e,t),e.prototype.withFaceExpressions=function(){return new bn(this,this.input)},e.prototype.withFaceDescriptors=function(){return new En(this,this.input)},e}(wn),On=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(y.c)(e,t),e.prototype.withFaceExpressions=function(){return new gn(this,this.input)},e.prototype.withFaceDescriptor=function(){return new jn(this,this.input)},e}(_n),Pn=function(t){function e(e,n){var r=t.call(this)||this;return r.parentTask=e,r.input=n,r}return Object(y.c)(e,t),e}(Ye),En=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(y.c)(e,t),e.prototype.run=function(){return Object(y.b)(this,void 0,void 0,(function(){var t;return Object(y.d)(this,(function(e){switch(e.label){case 0:return[4,this.parentTask];case 1:return[4,qe(t=e.sent(),this.input,(function(t){return Promise.all(t.map((function(t){return un.faceRecognitionNet.computeFaceDescriptor(t)})))}),null,(function(t){return t.landmarks.align(null,{useDlibAlignment:!0})}))];case 2:return[2,e.sent().map((function(e,n){return be(t[n],e)}))]}}))}))},e.prototype.withFaceExpressions=function(){return new bn(this,this.input)},e.prototype.withAgeAndGender=function(){return new xn(this,this.input)},e}(Pn),jn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(y.c)(e,t),e.prototype.run=function(){return Object(y.b)(this,void 0,void 0,(function(){var t,e;return Object(y.d)(this,(function(n){switch(n.label){case 0:return[4,this.parentTask];case 1:return(t=n.sent())?[4,Ve(t,this.input,(function(t){return un.faceRecognitionNet.computeFaceDescriptor(t)}),null,(function(t){return t.landmarks.align(null,{useDlibAlignment:!0})}))]:[2];case 2:return e=n.sent(),[2,be(t,e)]}}))}))},e.prototype.withFaceExpressions=function(){return new gn(this,this.input)},e.prototype.withAgeAndGender=function(){return new On(this,this.input)},e}(Pn),Mn=function(t){function e(e,n,r){var o=t.call(this)||this;return o.parentTask=e,o.input=n,o.useTinyLandmarkNet=r,o}return Object(y.c)(e,t),Object.defineProperty(e.prototype,"landmarkNet",{get:function(){return this.useTinyLandmarkNet?un.faceLandmark68TinyNet:un.faceLandmark68Net},enumerable:!0,configurable:!0}),e}(Ye),Sn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(y.c)(e,t),e.prototype.run=function(){return Object(y.b)(this,void 0,void 0,(function(){var t,e,n,r,o,i=this;return Object(y.d)(this,(function(a){switch(a.label){case 0:return[4,this.parentTask];case 1:return t=a.sent(),e=t.map((function(t){return t.detection})),this.input instanceof b.a?[4,yt(this.input,e)]:[3,3];case 2:return r=a.sent(),[3,5];case 3:return[4,gt(this.input,e)];case 4:r=a.sent(),a.label=5;case 5:return n=r,[4,Promise.all(n.map((function(t){return i.landmarkNet.detectLandmarks(t)})))];case 6:return o=a.sent(),n.forEach((function(t){return t instanceof b.a&&t.dispose()})),[2,t.map((function(t,e){return Kt(t,o[e])}))]}}))}))},e.prototype.withFaceExpressions=function(){return new bn(this,this.input)},e.prototype.withAgeAndGender=function(){return new xn(this,this.input)},e.prototype.withFaceDescriptors=function(){return new En(this,this.input)},e}(Mn),An=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(y.c)(e,t),e.prototype.run=function(){return Object(y.b)(this,void 0,void 0,(function(){var t,e,n,r,o;return Object(y.d)(this,(function(i){switch(i.label){case 0:return[4,this.parentTask];case 1:return(t=i.sent())?(e=t.detection,this.input instanceof b.a?[4,yt(this.input,[e])]:[3,3]):[2];case 2:return r=i.sent(),[3,5];case 3:return[4,gt(this.input,[e])];case 4:r=i.sent(),i.label=5;case 5:return n=r,[4,this.landmarkNet.detectLandmarks(n[0])];case 6:return o=i.sent(),n.forEach((function(t){return t instanceof b.a&&t.dispose()})),[2,Kt(t,o)]}}))}))},e.prototype.withFaceExpressions=function(){return new gn(this,this.input)},e.prototype.withAgeAndGender=function(){return new On(this,this.input)},e.prototype.withFaceDescriptor=function(){return new jn(this,this.input)},e}(Mn),Tn=function(t){function e(e,n){void 0===n&&(n=new Se);var r=t.call(this)||this;return r.input=e,r.options=n,r}return Object(y.c)(e,t),e}(Ye),In=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(y.c)(e,t),e.prototype.run=function(){return Object(y.b)(this,void 0,void 0,(function(){var t,e,n,r;return Object(y.d)(this,(function(o){switch(o.label){case 0:return e=(t=this).input,(n=t.options)instanceof we?[4,un.mtcnn.forward(e,n)]:[3,2];case 1:return[2,o.sent().map((function(t){return t.detection}))];case 2:if(!(r=n instanceof He?function(t){return un.tinyFaceDetector.locateFaces(t,n)}:n instanceof Se?function(t){return un.ssdMobilenetv1.locateFaces(t,n)}:n instanceof ze?function(t){return un.tinyYolov2.locateFaces(t,n)}:null))throw new Error("detectFaces - expected options to be instance of TinyFaceDetectorOptions | SsdMobilenetv1Options | MtcnnOptions | TinyYolov2Options");return[2,r(e)]}}))}))},e.prototype.runAndExtendWithFaceDetections=function(){var t=this;return new Promise((function(e){return Object(y.b)(t,void 0,void 0,(function(){var t;return Object(y.d)(this,(function(n){switch(n.label){case 0:return[4,this.run()];case 1:return t=n.sent(),[2,e(t.map((function(t){return J({},t)})))]}}))}))}))},e.prototype.withFaceLandmarks=function(t){return void 0===t&&(t=!1),new Sn(this.runAndExtendWithFaceDetections(),this.input,t)},e.prototype.withFaceExpressions=function(){return new vn(this.runAndExtendWithFaceDetections(),this.input)},e.prototype.withAgeAndGender=function(){return new wn(this.runAndExtendWithFaceDetections(),this.input)},e}(Tn);!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(y.c)(e,t),e.prototype.run=function(){return Object(y.b)(this,void 0,void 0,(function(){var t,e;return Object(y.d)(this,(function(n){switch(n.label){case 0:return[4,new In(this.input,this.options)];case 1:return t=n.sent(),e=t[0],t.forEach((function(t){t.score>e.score&&(e=t)})),[2,e]}}))}))},e.prototype.runAndExtendWithFaceDetection=function(){var t=this;return new Promise((function(e){return Object(y.b)(t,void 0,void 0,(function(){var t;return Object(y.d)(this,(function(n){switch(n.label){case 0:return[4,this.run()];case 1:return t=n.sent(),[2,e(t?J({},t):void 0)]}}))}))}))},e.prototype.withFaceLandmarks=function(t){return void 0===t&&(t=!1),new An(this.runAndExtendWithFaceDetection(),this.input,t)},e.prototype.withFaceExpressions=function(){return new mn(this.runAndExtendWithFaceDetection(),this.input)},e.prototype.withAgeAndGender=function(){return new _n(this.runAndExtendWithFaceDetection(),this.input)}}(Tn);function Dn(t,e){return void 0===e&&(e=new Se),new In(t,e)}!function(){function t(t,e){void 0===e&&(e=.6),this._distanceThreshold=e;var n=Array.isArray(t)?t:[t];if(!n.length)throw new Error("FaceRecognizer.constructor - expected atleast one input");var r=1,o=function(){return"person "+r++};this._labeledDescriptors=n.map((function(t){if(t instanceof V)return t;if(t instanceof Float32Array)return new V(o(),[t]);if(t.descriptor&&t.descriptor instanceof Float32Array)return new V(o(),[t.descriptor]);throw new Error("FaceRecognizer.constructor - expected inputs to be of type LabeledFaceDescriptors | WithFaceDescriptor | Float32Array | Array | Float32Array>")}))}Object.defineProperty(t.prototype,"labeledDescriptors",{get:function(){return this._labeledDescriptors},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"distanceThreshold",{get:function(){return this._distanceThreshold},enumerable:!0,configurable:!0}),t.prototype.computeMeanDistance=function(t,e){return e.map((function(e){return function(t,e){if(t.length!==e.length)throw new Error("euclideanDistance: arr1.length !== arr2.length");var n=Array.from(t),r=Array.from(e);return Math.sqrt(n.map((function(t,e){return t-r[e]})).reduce((function(t,e){return t+Math.pow(e,2)}),0))}(e,t)})).reduce((function(t,e){return t+e}),0)/(e.length||1)},t.prototype.matchDescriptor=function(t){var e=this;return this.labeledDescriptors.map((function(n){var r=n.descriptors,o=n.label;return new Y(o,e.computeMeanDistance(t,r))})).reduce((function(t,e){return t.distance.9&&t.expressions.happy<=1?n.style.display="none":n.style.display="block"})),clearInterval(i),a();case 6:case"end":return t.stop()}}),t)}))),200)},e=document.getElementById("inputVideo"),(n=document.getElementById("overlay")).width=e.offsetWidth,n.height=e.offsetHeight,r=new He,n.style.borderStyle="dotted",a();case 8:case"end":return t.stop()}}),t)})))).apply(this,arguments)}return Promise.all([(t=e,un.tinyFaceDetector.load(t)),hn(e),ln(e),pn(e),fn(e)]).then(function(){return n.apply(this,arguments)}()).catch((function(t){return console.error(t)})),Object(i.jsxs)(d,{children:[Object(i.jsx)(u.a,{children:Object(i.jsx)("title",{children:"Smile"})}),Object(i.jsxs)("section",{className:m.a.headingMd,children:[Object(i.jsx)("h1",{children:"Smile"}),Object(i.jsx)("video",{id:"inputVideo",autoPlay:!0,muted:!0,children:" "}),Object(i.jsx)("canvas",{className:m.a.canvas,id:"overlay"})]})]})}},Tred:function(t,e,n){t.exports={container:"layout_container__2t4v2",header:"layout_header__2rhWq",backTohome:"layout_backTohome__10oyl"}},UWYU:function(t,e,n){"use strict";e.__esModule=!0,e.imageConfigDefault=e.VALID_LOADERS=void 0;e.VALID_LOADERS=["default","imgix","cloudinary","akamai"];e.imageConfigDefault={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"https://cdn.statically.io/gh/HiltonWS/hiltonws.github.io/1.1.1/smile/image",loader:"default",domains:[]}},Xuae:function(t,e,n){"use strict";var r=n("RIqP"),o=n("lwsE"),i=n("W8MJ"),a=(n("PJYZ"),n("7W2i")),c=n("a1gu"),s=n("Nsbk");function u(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=s(t);if(e){var o=s(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return c(this,n)}}e.__esModule=!0,e.default=void 0;var f=n("q1tI"),h=function(t){a(n,t);var e=u(n);function n(t){var i;return o(this,n),(i=e.call(this,t))._hasHeadManager=void 0,i.emitChange=function(){i._hasHeadManager&&i.props.headManager.updateHead(i.props.reduceComponentsToState(r(i.props.headManager.mountedInstances),i.props))},i._hasHeadManager=i.props.headManager&&i.props.headManager.mountedInstances,i}return i(n,[{key:"componentDidMount",value:function(){this._hasHeadManager&&this.props.headManager.mountedInstances.add(this),this.emitChange()}},{key:"componentDidUpdate",value:function(){this.emitChange()}},{key:"componentWillUnmount",value:function(){this._hasHeadManager&&this.props.headManager.mountedInstances.delete(this),this.emitChange()}},{key:"render",value:function(){return null}}]),n}(f.Component);e.default=h},YC04:function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return i}));var r=n("mrSG"),o=n("7qA8");function i(){var e=t.Canvas||t.HTMLCanvasElement,n=t.Image||t.HTMLImageElement,i=t.fetch||function(){throw new Error("fetch - missing fetch implementation for nodejs environment")},a=Object(o.a)();return Object(r.a)({Canvas:e||function(){},CanvasRenderingContext2D:t.CanvasRenderingContext2D||function(){},Image:n||function(){},ImageData:t.ImageData||function(){},Video:t.HTMLVideoElement||function(){},createCanvasElement:function(){if(e)return new e;throw new Error("createCanvasElement - missing Canvas implementation for nodejs environment")},createImageElement:function(){if(n)return new n;throw new Error("createImageElement - missing Image implementation for nodejs environment")},fetch:i},a)}}).call(this,n("ntbh"))},YFqc:function(t,e,n){t.exports=n("cTJO")},Z4Yb:function(t,e,n){t.exports={heading2Xl:"utils_heading2Xl__1I65m",headingXl:"utils_headingXl__1XecN",headingLg:"utils_headingLg__de7p0",headingMd:"utils_headingMd__3de6G",borderCircle:"utils_borderCircle__13qdJ",colorInherit:"utils_colorInherit__3Gudf",padding1px:"utils_padding1px__oCny8",list:"utils_list__S7_pe",listItem:"utils_listItem__2eJpJ",lightText:"utils_lightText__12Ckm",canvas:"utils_canvas__1SWLi"}},cTJO:function(t,e,n){"use strict";var r=n("J4zp"),o=n("284h");e.__esModule=!0,e.default=void 0;var i=o(n("q1tI")),a=n("elyg"),c=n("nOHt"),s=n("vNVm"),u={};function f(t,e,n,r){if(t&&(0,a.isLocalURL)(e)){t.prefetch(e,n,r).catch((function(t){0}));var o=r&&"undefined"!==typeof r.locale?r.locale:t&&t.locale;u[e+"%"+n+(o?"%"+o:"")]=!0}}var h=function(t){var e=!1!==t.prefetch,n=(0,c.useRouter)(),o=n&&n.pathname||"/",h=i.default.useMemo((function(){var e=(0,a.resolveHref)(o,t.href,!0),n=r(e,2),i=n[0],c=n[1];return{href:i,as:t.as?(0,a.resolveHref)(o,t.as):c||i}}),[o,t.href,t.as]),p=h.href,l=h.as,d=t.children,v=t.replace,m=t.shallow,b=t.scroll,g=t.locale;"string"===typeof d&&(d=i.default.createElement("a",null,d));var y=i.Children.only(d),w=y&&"object"===typeof y&&y.ref,_=(0,s.useIntersection)({rootMargin:"200px"}),x=r(_,2),O=x[0],P=x[1],E=i.default.useCallback((function(t){O(t),w&&("function"===typeof w?w(t):"object"===typeof w&&(w.current=t))}),[w,O]);(0,i.useEffect)((function(){var t=P&&e&&(0,a.isLocalURL)(p),r="undefined"!==typeof g?g:n&&n.locale,o=u[p+"%"+l+(r?"%"+r:"")];t&&!o&&f(n,p,l,{locale:r})}),[l,p,P,g,e,n]);var j={ref:E,onClick:function(t){y.props&&"function"===typeof y.props.onClick&&y.props.onClick(t),t.defaultPrevented||function(t,e,n,r,o,i,c,s){("A"!==t.currentTarget.nodeName||!function(t){var e=t.currentTarget.target;return e&&"_self"!==e||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which}(t)&&(0,a.isLocalURL)(n))&&(t.preventDefault(),null==c&&(c=r.indexOf("#")<0),e[o?"replace":"push"](n,r,{shallow:i,locale:s,scroll:c}).then((function(t){t&&c&&document.body.focus()})))}(t,n,p,l,v,m,b,g)},onMouseEnter:function(t){(0,a.isLocalURL)(p)&&(y.props&&"function"===typeof y.props.onMouseEnter&&y.props.onMouseEnter(t),f(n,p,l,{priority:!0}))}};if(t.passHref||"a"===y.type&&!("href"in y.props)){var M="undefined"!==typeof g?g:n&&n.locale,S=n&&n.isLocaleDomain&&(0,a.getDomainLocale)(l,M,n&&n.locales,n&&n.domainLocales);j.href=S||(0,a.addBasePath)((0,a.addLocale)(l,M,n&&n.defaultLocale))}return i.default.cloneElement(y,j)};e.default=h},dEHY:function(t,e,n){"use strict";e.__esModule=!0,e.toBase64=function(t){return window.btoa(t)}},dQHF:function(t,e,n){"use strict";var r=n("J4zp"),o=n("RIqP"),i=n("TqRt");e.__esModule=!0,e.default=function(t){var e=t.src,n=t.sizes,i=t.unoptimized,c=void 0!==i&&i,h=t.priority,l=void 0!==h&&h,d=t.loading,m=t.className,b=t.quality,g=t.width,x=t.height,O=t.objectFit,P=t.objectPosition,E=t.loader,j=void 0===E?_:E,M=(0,a.default)(t,["src","sizes","unoptimized","priority","loading","className","quality","width","height","objectFit","objectPosition","loader"]),S=n?"responsive":"intrinsic",A=!1;"unsized"in M?(A=Boolean(M.unsized),delete M.unsized):"layout"in M&&(M.layout&&(S=M.layout),delete M.layout);0;var T=!l&&("lazy"===d||"undefined"===typeof d);e&&e.startsWith("data:")&&(c=!0,T=!1);var I,D,F,L=(0,p.useIntersection)({rootMargin:"200px",disabled:!T}),C=r(L,2),R=C[0],k=C[1],B=!T||k,N=w(g),z=w(x),W=w(b),U={visibility:B?"inherit":"hidden",position:"absolute",top:0,left:0,bottom:0,right:0,boxSizing:"border-box",padding:0,border:"none",margin:"auto",display:"block",width:0,height:0,minWidth:"100%",maxWidth:"100%",minHeight:"100%",maxHeight:"100%",objectFit:O,objectPosition:P};if("undefined"!==typeof N&&"undefined"!==typeof z&&"fill"!==S){var H=z/N,Y=isNaN(H)?"100%":"".concat(100*H,"%");"responsive"===S?(I={display:"block",overflow:"hidden",position:"relative",boxSizing:"border-box",margin:0},D={display:"block",boxSizing:"border-box",paddingTop:Y}):"intrinsic"===S?(I={display:"inline-block",maxWidth:"100%",overflow:"hidden",position:"relative",boxSizing:"border-box",margin:0},D={boxSizing:"border-box",display:"block",maxWidth:"100%"},F='')):"fixed"===S&&(I={overflow:"hidden",boxSizing:"border-box",display:"inline-block",position:"relative",width:N,height:z})}else"undefined"===typeof N&&"undefined"===typeof z&&"fill"===S&&(I={display:"block",overflow:"hidden",position:"absolute",top:0,left:0,bottom:0,right:0,boxSizing:"border-box",margin:0});var q={src:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",srcSet:void 0,sizes:void 0};B&&(q=function(t){var e=t.src,n=t.unoptimized,r=t.layout,i=t.width,a=t.quality,c=t.sizes,s=t.loader;if(n)return{src:e,srcSet:void 0,sizes:void 0};var u=function(t,e,n){if(n&&("fill"===e||"responsive"===e)){var r=o(n.matchAll(/(^|\s)(1?\d?\d)vw/g)).map((function(t){return parseInt(t[2])}));if(r.length){var i=.01*Math.min.apply(Math,o(r));return{widths:y.filter((function(t){return t>=v[0]*i})),kind:"w"}}return{widths:y,kind:"w"}}if("number"!==typeof t||"fill"===e||"responsive"===e)return{widths:v,kind:"w"};return{widths:o(new Set([t,2*t].map((function(t){return y.find((function(e){return e>=t}))||y[y.length-1]})))),kind:"x"}}(i,r,c),f=u.widths,h=u.kind,p=f.length-1;return{sizes:c||"w"!==h?c:"100vw",srcSet:f.map((function(t,n){return"".concat(s({src:e,quality:a,width:t})," ").concat("w"===h?t:n+1).concat(h)})).join(", "),src:s({src:e,quality:a,width:f[p]})}}({src:e,unoptimized:c,layout:S,width:N,quality:W,sizes:n,loader:j}));A&&(I=void 0,D=void 0,U=void 0);return s.default.createElement("div",{style:I},D?s.default.createElement("div",{style:D},F?s.default.createElement("img",{style:{maxWidth:"100%",display:"block",margin:0,border:"none",padding:0},alt:"","aria-hidden":!0,role:"presentation",src:"data:image/svg+xml;base64,".concat((0,f.toBase64)(F))}):null):null,s.default.createElement("img",Object.assign({},M,q,{decoding:"async",className:m,ref:R,style:U})),l?s.default.createElement(u.default,null,s.default.createElement("link",{key:"__nimg-"+q.src+q.srcSet+q.sizes,rel:"preload",as:"image",href:q.srcSet?void 0:q.src,imagesrcset:q.srcSet,imagesizes:q.sizes})):null)};var a=i(n("8OQS")),c=i(n("pVnL")),s=i(n("q1tI")),u=i(n("8Kt/")),f=n("dEHY"),h=n("UWYU"),p=n("vNVm");var l=new Map([["imgix",function(t){var e=t.root,n=t.src,r=t.width,o=t.quality,i=["auto=format","fit=max","w="+r],a="";o&&i.push("q="+o);i.length&&(a="?"+i.join("&"));return"".concat(e).concat(x(n)).concat(a)}],["cloudinary",function(t){var e=t.root,n=t.src,r=t.width,o=t.quality,i=["f_auto","c_limit","w_"+r,"q_"+(o||"auto")].join(",")+"/";return"".concat(e).concat(i).concat(x(n))}],["akamai",function(t){var e=t.root,n=t.src,r=t.width;return"".concat(e).concat(x(n),"?imwidth=").concat(r)}],["default",function(t){var e=t.root,n=t.src,r=t.width,o=t.quality;0;return"".concat(e,"?url=").concat(encodeURIComponent(n),"&w=").concat(r,"&q=").concat(o||75)}]]),d={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"https://cdn.statically.io/gh/HiltonWS/hiltonws.github.io/1.1.1/smile/image",loader:"default"}||h.imageConfigDefault,v=d.deviceSizes,m=d.imageSizes,b=d.loader,g=d.path,y=(d.domains,[].concat(o(v),o(m)));function w(t){return"number"===typeof t?t:"string"===typeof t?parseInt(t,10):void 0}function _(t){var e=l.get(b);if(e)return e((0,c.default)({root:g},t));throw new Error('Unknown "loader" found in "next.config.js". Expected: '.concat(h.VALID_LOADERS.join(", "),". Received: ").concat(b))}function x(t){return"/"===t[0]?t.slice(1):t}v.sort((function(t,e){return t-e})),y.sort((function(t,e){return t-e}))},g4pe:function(t,e,n){t.exports=n("8Kt/")},"kVK+":function(t,e){e.read=function(t,e,n,r,o){var i,a,c=8*o-r-1,s=(1<>1,f=-7,h=n?o-1:0,p=n?-1:1,l=t[e+h];for(h+=p,i=l&(1<<-f)-1,l>>=-f,f+=c;f>0;i=256*i+t[e+h],h+=p,f-=8);for(a=i&(1<<-f)-1,i>>=-f,f+=r;f>0;a=256*a+t[e+h],h+=p,f-=8);if(0===i)i=1-u;else{if(i===s)return a?NaN:1/0*(l?-1:1);a+=Math.pow(2,r),i-=u}return(l?-1:1)*a*Math.pow(2,i-r)},e.write=function(t,e,n,r,o,i){var a,c,s,u=8*i-o-1,f=(1<>1,p=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,l=r?0:i-1,d=r?1:-1,v=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(c=isNaN(e)?1:0,a=f):(a=Math.floor(Math.log(e)/Math.LN2),e*(s=Math.pow(2,-a))<1&&(a--,s*=2),(e+=a+h>=1?p/s:p*Math.pow(2,1-h))*s>=2&&(a++,s/=2),a+h>=f?(c=0,a=f):a+h>=1?(c=(e*s-1)*Math.pow(2,o),a+=h):(c=e*Math.pow(2,h-1)*Math.pow(2,o),a=0));o>=8;t[n+l]=255&c,l+=d,c/=256,o-=8);for(a=a<0;t[n+l]=255&a,l+=d,a/=256,u-=8);t[n+l-d]|=128*v}},lSNA:function(t,e){t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}},lwAK:function(t,e,n){"use strict";var r;e.__esModule=!0,e.AmpStateContext=void 0;var o=((r=n("q1tI"))&&r.__esModule?r:{default:r}).default.createContext({});e.AmpStateContext=o},mrSG:function(t,e,n){"use strict";n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return a})),n.d(e,"d",(function(){return c})),n.d(e,"e",(function(){return s}));var r=function(t,e){return(r=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 o(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var i=function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0;e&&n&&e(n)}))}),t);return c.set(e,n={id:e,observer:o,elements:r}),n}(n),o=r.id,i=r.observer,a=r.elements;return a.set(t,e),i.observe(t),function(){a.delete(t),i.unobserve(t),0===a.size&&(i.disconnect(),c.delete(o))}}(t,(function(t){return t&&p(t)}),{rootMargin:e}))}),[n,e,h]);return(0,o.useEffect)((function(){if(!a&&!h){var t=(0,i.requestIdleCallback)((function(){return p(!0)}));return function(){return(0,i.cancelIdleCallback)(t)}}}),[h]),[l,h]};var o=n("q1tI"),i=n("0G5g"),a="undefined"!==typeof IntersectionObserver;var c=new Map},vlRD:function(t,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/",function(){return n("RNiq")}])}},[["vlRD",0,2,3,1]]]); \ No newline at end of file diff --git a/smile/static/chunks/pages/index-2104b64b80e366aea4ec.js b/smile/static/chunks/pages/index-2104b64b80e366aea4ec.js index 1bbfaf1..571b9f9 100644 --- a/smile/static/chunks/pages/index-2104b64b80e366aea4ec.js +++ b/smile/static/chunks/pages/index-2104b64b80e366aea4ec.js @@ -1 +1 @@ -_N_E=(window.webpackJsonp_N_E=window.webpackJsonp_N_E||[]).push([[7],{"0W9y":function(t,e,n){"use strict";var r=n("J4zp"),o=n("TTt4");e.__esModule=!0,e.default=void 0;var i=o(n("BqPY")),a=n("TTnN"),c=n("a7Zl"),s=n("9DAu"),u={};function f(t,e,n,r){if(t&&(0,a.isLocalURL)(e)){t.prefetch(e,n,r).catch((function(t){0}));var o=r&&"undefined"!==typeof r.locale?r.locale:t&&t.locale;u[e+"%"+n+(o?"%"+o:"")]=!0}}var h=function(t){var e=!1!==t.prefetch,n=(0,c.useRouter)(),o=n&&n.pathname||"/",h=i.default.useMemo((function(){var e=(0,a.resolveHref)(o,t.href,!0),n=r(e,2),i=n[0],c=n[1];return{href:i,as:t.as?(0,a.resolveHref)(o,t.as):c||i}}),[o,t.href,t.as]),p=h.href,l=h.as,d=t.children,v=t.replace,m=t.shallow,b=t.scroll,g=t.locale;"string"===typeof d&&(d=i.default.createElement("a",null,d));var y=i.Children.only(d),w=y&&"object"===typeof y&&y.ref,_=(0,s.useIntersection)({rootMargin:"200px"}),x=r(_,2),P=x[0],O=x[1],E=i.default.useCallback((function(t){P(t),w&&("function"===typeof w?w(t):"object"===typeof w&&(w.current=t))}),[w,P]);(0,i.useEffect)((function(){var t=O&&e&&(0,a.isLocalURL)(p),r="undefined"!==typeof g?g:n&&n.locale,o=u[p+"%"+l+(r?"%"+r:"")];t&&!o&&f(n,p,l,{locale:r})}),[l,p,O,g,e,n]);var j={ref:E,onClick:function(t){y.props&&"function"===typeof y.props.onClick&&y.props.onClick(t),t.defaultPrevented||function(t,e,n,r,o,i,c,s){("A"!==t.currentTarget.nodeName||!function(t){var e=t.currentTarget.target;return e&&"_self"!==e||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which}(t)&&(0,a.isLocalURL)(n))&&(t.preventDefault(),null==c&&(c=r.indexOf("#")<0),e[o?"replace":"push"](n,r,{shallow:i,locale:s,scroll:c}).then((function(t){t&&c&&document.body.focus()})))}(t,n,p,l,v,m,b,g)},onMouseEnter:function(t){(0,a.isLocalURL)(p)&&(y.props&&"function"===typeof y.props.onMouseEnter&&y.props.onMouseEnter(t),f(n,p,l,{priority:!0}))}};if(t.passHref||"a"===y.type&&!("href"in y.props)){var M="undefined"!==typeof g?g:n&&n.locale,S=n&&n.isLocaleDomain&&(0,a.getDomainLocale)(l,M,n&&n.locales,n&&n.domainLocales);j.href=S||(0,a.addBasePath)((0,a.addLocale)(l,M,n&&n.defaultLocale))}return i.default.cloneElement(y,j)};e.default=h},1:function(t,e){},2:function(t,e){},"2tVS":function(t,e,n){"use strict";(function(t){var r=n("fssf"),o=n("jsv+"),i=n("Ik3D");function a(){return s.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function c(t,e){if(a()=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|t}function d(t,e){if(s.isBuffer(t))return t.length;if("undefined"!==typeof ArrayBuffer&&"function"===typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!==typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return W(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return U(t).length;default:if(r)return W(t).length;e=(""+e).toLowerCase(),r=!0}}function v(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return A(this,e,n);case"utf8":case"utf-8":return j(this,e,n);case"ascii":return S(this,e,n);case"latin1":case"binary":return T(this,e,n);case"base64":return E(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function m(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function b(t,e,n,r,o){if(0===t.length)return-1;if("string"===typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(o)return-1;n=t.length-1}else if(n<0){if(!o)return-1;n=0}if("string"===typeof e&&(e=s.from(e,r)),s.isBuffer(e))return 0===e.length?-1:g(t,e,n,r,o);if("number"===typeof e)return e&=255,s.TYPED_ARRAY_SUPPORT&&"function"===typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):g(t,[e],n,r,o);throw new TypeError("val must be string, number or Buffer")}function g(t,e,n,r,o){var i,a=1,c=t.length,s=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;a=2,c/=2,s/=2,n/=2}function u(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(o){var f=-1;for(i=n;ic&&(n=c-s),i=n;i>=0;i--){for(var h=!0,p=0;po&&(r=o):r=o;var i=e.length;if(i%2!==0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var a=0;a>8,o=n%256,i.push(o),i.push(r);return i}(e,t.length-n),t,n,r)}function E(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function j(t,e,n){n=Math.min(t.length,n);for(var r=[],o=e;o239?4:u>223?3:u>191?2:1;if(o+h<=n)switch(h){case 1:u<128&&(f=u);break;case 2:128===(192&(i=t[o+1]))&&(s=(31&u)<<6|63&i)>127&&(f=s);break;case 3:i=t[o+1],a=t[o+2],128===(192&i)&&128===(192&a)&&(s=(15&u)<<12|(63&i)<<6|63&a)>2047&&(s<55296||s>57343)&&(f=s);break;case 4:i=t[o+1],a=t[o+2],c=t[o+3],128===(192&i)&&128===(192&a)&&128===(192&c)&&(s=(15&u)<<18|(63&i)<<12|(63&a)<<6|63&c)>65535&&s<1114112&&(f=s)}null===f?(f=65533,h=1):f>65535&&(f-=65536,r.push(f>>>10&1023|55296),f=56320|1023&f),r.push(f),o+=h}return function(t){var e=t.length;if(e<=M)return String.fromCharCode.apply(String,t);var n="",r=0;for(;r0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),""},s.prototype.compare=function(t,e,n,r,o){if(!s.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),e<0||n>t.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&e>=n)return 0;if(r>=o)return-1;if(e>=n)return 1;if(this===t)return 0;for(var i=(o>>>=0)-(r>>>=0),a=(n>>>=0)-(e>>>=0),c=Math.min(i,a),u=this.slice(r,o),f=t.slice(e,n),h=0;ho)&&(n=o),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return y(this,t,e,n);case"utf8":case"utf-8":return w(this,t,e,n);case"ascii":return _(this,t,e,n);case"latin1":case"binary":return x(this,t,e,n);case"base64":return P(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,t,e,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var M=4096;function S(t,e,n){var r="";n=Math.min(t.length,n);for(var o=e;or)&&(n=r);for(var o="",i=e;in)throw new RangeError("Trying to access beyond buffer length")}function C(t,e,n,r,o,i){if(!s.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||et.length)throw new RangeError("Index out of range")}function F(t,e,n,r){e<0&&(e=65535+e+1);for(var o=0,i=Math.min(t.length-n,2);o>>8*(r?o:1-o)}function L(t,e,n,r){e<0&&(e=4294967295+e+1);for(var o=0,i=Math.min(t.length-n,4);o>>8*(r?o:3-o)&255}function R(t,e,n,r,o,i){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function k(t,e,n,r,i){return i||R(t,0,n,4),o.write(t,e,n,r,23,4),n+4}function B(t,e,n,r,i){return i||R(t,0,n,8),o.write(t,e,n,r,52,8),n+8}s.prototype.slice=function(t,e){var n,r=this.length;if((t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e0&&(o*=256);)r+=this[t+--e]*o;return r},s.prototype.readUInt8=function(t,e){return e||I(t,1,this.length),this[t]},s.prototype.readUInt16LE=function(t,e){return e||I(t,2,this.length),this[t]|this[t+1]<<8},s.prototype.readUInt16BE=function(t,e){return e||I(t,2,this.length),this[t]<<8|this[t+1]},s.prototype.readUInt32LE=function(t,e){return e||I(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},s.prototype.readUInt32BE=function(t,e){return e||I(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},s.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||I(t,e,this.length);for(var r=this[t],o=1,i=0;++i=(o*=128)&&(r-=Math.pow(2,8*e)),r},s.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||I(t,e,this.length);for(var r=e,o=1,i=this[t+--r];r>0&&(o*=256);)i+=this[t+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*e)),i},s.prototype.readInt8=function(t,e){return e||I(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},s.prototype.readInt16LE=function(t,e){e||I(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt16BE=function(t,e){e||I(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt32LE=function(t,e){return e||I(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},s.prototype.readInt32BE=function(t,e){return e||I(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},s.prototype.readFloatLE=function(t,e){return e||I(t,4,this.length),o.read(this,t,!0,23,4)},s.prototype.readFloatBE=function(t,e){return e||I(t,4,this.length),o.read(this,t,!1,23,4)},s.prototype.readDoubleLE=function(t,e){return e||I(t,8,this.length),o.read(this,t,!0,52,8)},s.prototype.readDoubleBE=function(t,e){return e||I(t,8,this.length),o.read(this,t,!1,52,8)},s.prototype.writeUIntLE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||C(this,t,e,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[e]=255&t;++i=0&&(i*=256);)this[e+o]=t/i&255;return e+n},s.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||C(this,t,e,1,255,0),s.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},s.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||C(this,t,e,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):F(this,t,e,!0),e+2},s.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||C(this,t,e,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):F(this,t,e,!1),e+2},s.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||C(this,t,e,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):L(this,t,e,!0),e+4},s.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||C(this,t,e,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):L(this,t,e,!1),e+4},s.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var o=Math.pow(2,8*n-1);C(this,t,e,n,o-1,-o)}var i=0,a=1,c=0;for(this[e]=255&t;++i>0)-c&255;return e+n},s.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var o=Math.pow(2,8*n-1);C(this,t,e,n,o-1,-o)}var i=n-1,a=1,c=0;for(this[e+i]=255&t;--i>=0&&(a*=256);)t<0&&0===c&&0!==this[e+i+1]&&(c=1),this[e+i]=(t/a>>0)-c&255;return e+n},s.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||C(this,t,e,1,127,-128),s.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},s.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||C(this,t,e,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):F(this,t,e,!0),e+2},s.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||C(this,t,e,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):F(this,t,e,!1),e+2},s.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||C(this,t,e,4,2147483647,-2147483648),s.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):L(this,t,e,!0),e+4},s.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||C(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):L(this,t,e,!1),e+4},s.prototype.writeFloatLE=function(t,e,n){return k(this,t,e,!0,n)},s.prototype.writeFloatBE=function(t,e,n){return k(this,t,e,!1,n)},s.prototype.writeDoubleLE=function(t,e,n){return B(this,t,e,!0,n)},s.prototype.writeDoubleBE=function(t,e,n){return B(this,t,e,!1,n)},s.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e=0;--o)t[o+e]=this[o+n];else if(i<1e3||!s.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"===typeof t)for(i=e;i55295&&n<57344){if(!o){if(n>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(e-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(e-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((e-=1)<0)break;i.push(n)}else if(n<2048){if((e-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function U(t){return r.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(N,"")).length<2)return"";for(;t.length%4!==0;)t+="=";return t}(t))}function H(t,e,n,r){for(var o=0;o=e.length||o>=t.length);++o)e[o+n]=t[o];return o}}).call(this,n("jzzT"))},3:function(t,e){},"7qA8":function(t,e,n){"use strict";function r(t){var e="";if(!t)try{t=n(!function(){var t=new Error("Cannot find module 'fs'");throw t.code="MODULE_NOT_FOUND",t}())}catch(r){e=r.toString()}return{readFile:t?function(e){return new Promise((function(n,r){t.readFile(e,(function(t,e){return t?r(t):n(e)}))}))}:function(){throw new Error("readFile - failed to require fs in nodejs environment with error: "+e)}}}n.d(e,"a",(function(){return r}))},"9DAu":function(t,e,n){"use strict";var r=n("J4zp");e.__esModule=!0,e.useIntersection=function(t){var e=t.rootMargin,n=t.disabled||!a,s=(0,o.useRef)(),u=(0,o.useState)(!1),f=r(u,2),h=f[0],p=f[1],l=(0,o.useCallback)((function(t){s.current&&(s.current(),s.current=void 0),n||h||t&&t.tagName&&(s.current=function(t,e,n){var r=function(t){var e=t.rootMargin||"",n=c.get(e);if(n)return n;var r=new Map,o=new IntersectionObserver((function(t){t.forEach((function(t){var e=r.get(t.target),n=t.isIntersecting||t.intersectionRatio>0;e&&n&&e(n)}))}),t);return c.set(e,n={id:e,observer:o,elements:r}),n}(n),o=r.id,i=r.observer,a=r.elements;return a.set(t,e),i.observe(t),function(){a.delete(t),i.unobserve(t),0===a.size&&(i.disconnect(),c.delete(o))}}(t,(function(t){return t&&p(t)}),{rootMargin:e}))}),[n,e,h]);return(0,o.useEffect)((function(){if(!a&&!h){var t=(0,i.requestIdleCallback)((function(){return p(!0)}));return function(){return(0,i.cancelIdleCallback)(t)}}}),[h]),[l,h]};var o=n("BqPY"),i=n("s4GJ"),a="undefined"!==typeof IntersectionObserver;var c=new Map},Bnag:function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},D0IF:function(t,e,n){"use strict";e.__esModule=!0,e.imageConfigDefault=e.VALID_LOADERS=void 0;e.VALID_LOADERS=["default","imgix","cloudinary","akamai"];e.imageConfigDefault={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"https://cdn.statically.io/gh/HiltonWS/hiltonws.github.io/master/smile/image",loader:"default",domains:[]}},EbDI:function(t,e){t.exports=function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}},Ijbi:function(t,e,n){var r=n("WkPL");t.exports=function(t){if(Array.isArray(t))return r(t)}},Ik3D:function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},N6lM:function(t,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/",function(){return n("RNiq")}])},RIqP:function(t,e,n){var r=n("Ijbi"),o=n("EbDI"),i=n("ZhPi"),a=n("Bnag");t.exports=function(t){return r(t)||o(t)||i(t)||a()}},RNiq:function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return Fn}));var r=n("o0o1"),o=n.n(r),i=n("nKUr");function a(t,e,n,r,o,i,a){try{var c=t[i](a),s=c.value}catch(u){return void n(u)}c.done?e(s):Promise.resolve(s).then(r,o)}function c(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function c(t){a(i,r,o,c,s,"next",t)}function s(t){a(i,r,o,c,s,"throw",t)}c(void 0)}))}}var s=n("Ruhs"),u=n.n(s),f=(n("djdT"),n("Tred")),h=n.n(f),p=n("lFXY"),l=n.n(p);function d(t){var e=t.children;t.home;return Object(i.jsxs)("div",{className:h.a.container,children:[Object(i.jsx)(u.a,{children:Object(i.jsx)("link",{rel:"icon",href:"/favicon.ico"})}),Object(i.jsx)("header",{className:h.a.header}),Object(i.jsx)("main",{children:e}),Object(i.jsx)("div",{className:h.a.backToHome,children:Object(i.jsx)(l.a,{href:"/",children:Object(i.jsx)("a",{children:"\u2190 Back to home"})})})]})}var v=n("Z4Yb"),m=n.n(v),b=n("lT9W");function g(t,e,n){if(void 0===n&&(n=!1),t.beginPath(),e.slice(1).forEach((function(n,r){var o=n.x,i=n.y,a=e[r];t.moveTo(a.x,a.y),t.lineTo(o,i)})),n){var r=e[e.length-1],o=e[0];if(!r||!o)return;t.moveTo(r.x,r.y),t.lineTo(o.x,o.y)}t.stroke()}var y=n("mrSG"),w=function(){function t(t,e){if(!T(t)||!T(e))throw new Error("Dimensions.constructor - expected width and height to be valid numbers, instead have "+JSON.stringify({width:t,height:e}));this._width=t,this._height=e}return Object.defineProperty(t.prototype,"width",{get:function(){return this._width},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this._height},enumerable:!0,configurable:!0}),t.prototype.reverse=function(){return new t(1/this.width,1/this.height)},t}();function _(t,e){return t instanceof b.a&&t.shape.length===e}function x(t){return _(t,3)}function P(t){return _(t,4)}function O(t){return t%2===0}function E(t,e){void 0===e&&(e=2);var n=Math.pow(10,e);return Math.floor(t*n)/n}function j(t){return t&&t.width&&t.height}function M(t){return t.reduce((function(t,e){return t.add(e)}),new D(0,0)).div(new D(t.length,t.length))}function S(t,e,n){return Array(t).fill(0).map((function(t,r){return e+r*n}))}function T(t){return!!t&&t!==1/0&&t!==-1/0&&!isNaN(t)||0===t}function A(t){return T(t)&&0<=t&&t<=1}var D=function(){function t(t,e){this._x=t,this._y=e}return Object.defineProperty(t.prototype,"x",{get:function(){return this._x},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"y",{get:function(){return this._y},enumerable:!0,configurable:!0}),t.prototype.add=function(e){return new t(this.x+e.x,this.y+e.y)},t.prototype.sub=function(e){return new t(this.x-e.x,this.y-e.y)},t.prototype.mul=function(e){return new t(this.x*e.x,this.y*e.y)},t.prototype.div=function(e){return new t(this.x/e.x,this.y/e.y)},t.prototype.abs=function(){return new t(Math.abs(this.x),Math.abs(this.y))},t.prototype.magnitude=function(){return Math.sqrt(Math.pow(this.x,2)+Math.pow(this.y,2))},t.prototype.floor=function(){return new t(Math.floor(this.x),Math.floor(this.y))},t}(),I=function(){function t(e,n){void 0===n&&(n=!0);var r=e||{},o=[r.left,r.top,r.right,r.bottom].every(T),i=[r.x,r.y,r.width,r.height].every(T);if(!i&&!o)throw new Error("Box.constructor - expected box to be IBoundingBox | IRect, instead have "+JSON.stringify(r));var a=i?[r.x,r.y,r.width,r.height]:[r.left,r.top,r.right-r.left,r.bottom-r.top],c=a[0],s=a[1],u=a[2],f=a[3];t.assertIsValidBox({x:c,y:s,width:u,height:f},"Box.constructor",n),this._x=c,this._y=s,this._width=u,this._height=f}return t.isRect=function(t){return!!t&&[t.x,t.y,t.width,t.height].every(T)},t.assertIsValidBox=function(e,n,r){if(void 0===r&&(r=!1),!t.isRect(e))throw new Error(n+" - invalid box: "+JSON.stringify(e)+", expected object with properties x, y, width, height");if(!r&&(e.width<0||e.height<0))throw new Error(n+" - width ("+e.width+") and height ("+e.height+") must be positive numbers")},Object.defineProperty(t.prototype,"x",{get:function(){return this._x},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"y",{get:function(){return this._y},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this._width},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this._height},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"left",{get:function(){return this.x},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"top",{get:function(){return this.y},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){return this.x+this.width},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bottom",{get:function(){return this.y+this.height},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"area",{get:function(){return this.width*this.height},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"topLeft",{get:function(){return new D(this.left,this.top)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"topRight",{get:function(){return new D(this.right,this.top)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bottomLeft",{get:function(){return new D(this.left,this.bottom)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bottomRight",{get:function(){return new D(this.right,this.bottom)},enumerable:!0,configurable:!0}),t.prototype.round=function(){var e=[this.x,this.y,this.width,this.height].map((function(t){return Math.round(t)}));return new t({x:e[0],y:e[1],width:e[2],height:e[3]})},t.prototype.floor=function(){var e=[this.x,this.y,this.width,this.height].map((function(t){return Math.floor(t)}));return new t({x:e[0],y:e[1],width:e[2],height:e[3]})},t.prototype.toSquare=function(){var e=this,n=e.x,r=e.y,o=e.width,i=e.height,a=Math.abs(o-i);return oe&&(o=-s+e+n,s=e),u>t&&(i=-u+t+r,u=t),a<1&&(i=2-a,a=1),c<1&&(i=2-c,c=1),{dy:1,edy:i,dx:1,edx:o,y:c,ey:u,x:a,ex:s,w:n,h:r}},t.prototype.calibrate=function(e){return new t({left:this.left+e.left*this.width,top:this.top+e.top*this.height,right:this.right+e.right*this.width,bottom:this.bottom+e.bottom*this.height}).toSquare().round()},t}(),C=function(t){function e(e,n,r,o,i){return void 0===i&&(i=!1),t.call(this,{left:e,top:n,right:r,bottom:o},i)||this}return Object(y.c)(e,t),e}(I),F=function(){function t(t,e,n,r,o){this._imageDims=new w(o.width,o.height),this._score=t,this._classScore=e,this._className=n,this._box=new I(r).rescale(this._imageDims)}return Object.defineProperty(t.prototype,"score",{get:function(){return this._score},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"classScore",{get:function(){return this._classScore},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"className",{get:function(){return this._className},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"box",{get:function(){return this._box},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"imageDims",{get:function(){return this._imageDims},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"imageWidth",{get:function(){return this.imageDims.width},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"imageHeight",{get:function(){return this.imageDims.height},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"relativeBox",{get:function(){return new I(this._box).rescale(this.imageDims.reverse())},enumerable:!0,configurable:!0}),t.prototype.forSize=function(e,n){return new t(this.score,this.classScore,this.className,this.relativeBox,{width:e,height:n})},t}(),L=function(t){function e(e,n,r){return t.call(this,e,e,"",n,r)||this}return Object(y.c)(e,t),e.prototype.forSize=function(n,r){var o=t.prototype.forSize.call(this,n,r);return new e(o.score,o.relativeBox,o.imageDims)},e}(F);function R(t,e,n){void 0===n&&(n=!0);var r=Math.max(0,Math.min(t.right,e.right)-Math.max(t.left,e.left))*Math.max(0,Math.min(t.bottom,e.bottom)-Math.max(t.top,e.top));return n?r/(t.area+e.area-r):r/Math.min(t.area,e.area)}function k(t,e,n,r){void 0===r&&(r=!0);for(var o=e.map((function(t,e){return{score:t,boxIndex:e}})).sort((function(t,e){return t.score-e.score})).map((function(t){return t.boxIndex})),i=[],a=function(){var e=o.pop();i.push(e);for(var a=o,c=[],s=0;s0;)a();return i}function B(t,e){return b.L((function(){var n=e[0],r=e[1],o=e[2],i=b.n(Object(y.e)(t.shape.slice(0,3),[1]),n),a=b.n(Object(y.e)(t.shape.slice(0,3),[1]),r),c=b.n(Object(y.e)(t.shape.slice(0,3),[1]),o),s=b.h([i,a,c],3);return b.F(t,s)}))}function N(t){return 1/(1+Math.exp(-t))}var z=function(t){function e(e,n,r,o,i){return void 0===i&&(i=!1),t.call(this,{x:e,y:n,width:r,height:o},i)||this}return Object(y.c)(e,t),e}(I),W=function(){function t(t,e,n){void 0===n&&(n=new D(0,0));var r=e.width,o=e.height;this._imgDims=new w(r,o),this._shift=n,this._positions=t.map((function(t){return t.mul(new D(r,o)).add(n)}))}return Object.defineProperty(t.prototype,"shift",{get:function(){return new D(this._shift.x,this._shift.y)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"imageWidth",{get:function(){return this._imgDims.width},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"imageHeight",{get:function(){return this._imgDims.height},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"positions",{get:function(){return this._positions},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"relativePositions",{get:function(){var t=this;return this._positions.map((function(e){return e.sub(t._shift).div(new D(t.imageWidth,t.imageHeight))}))},enumerable:!0,configurable:!0}),t.prototype.forSize=function(t,e){return new this.constructor(this.relativePositions,{width:t,height:e})},t.prototype.shiftBy=function(t,e){return new this.constructor(this.relativePositions,this._imgDims,new D(t,e))},t.prototype.shiftByPoint=function(t){return this.shiftBy(t.x,t.y)},t.prototype.align=function(t,e){if(void 0===e&&(e={}),t){var n=t instanceof L?t.box.floor():new I(t);return this.shiftBy(n.x,n.y).align(null,e)}var r=Object.assign({},{useDlibAlignment:!1,minBoxPadding:.2},e),o=r.useDlibAlignment,i=r.minBoxPadding;return o?this.alignDlib():this.alignMinBbox(i)},t.prototype.alignDlib=function(){var t=this.getRefPointsForAlignment(),e=t[0],n=t[1],r=t[2],o=function(t){return r.sub(t).magnitude()},i=(o(e)+o(n))/2,a=Math.floor(i/.45),c=M(t),s=Math.floor(Math.max(0,c.x-.5*a)),u=Math.floor(Math.max(0,c.y-.43*a));return new z(s,u,Math.min(a,this.imageWidth+s),Math.min(a,this.imageHeight+u))},t.prototype.alignMinBbox=function(t){var e=function(t){var e=t.map((function(t){return t.x})),n=t.map((function(t){return t.y})),r=e.reduce((function(t,e){return e=3}function ht(t){var e=ot.getEnv(),n=e.Image,r=e.Video;return t instanceof n?new w(t.naturalWidth,t.naturalHeight):t instanceof r?new w(t.videoWidth,t.videoHeight):new w(t.width,t.height)}function pt(t){var e=t.width,n=t.height,r=(0,ot.getEnv().createCanvasElement)();return r.width=e,r.height=n,r}function lt(t,e){var n=ot.getEnv().ImageData;if(!(t instanceof n)&&!ft(t))throw new Error("createCanvasFromMedia - media has not finished loading yet");var r=e||ht(t),o=r.width,i=r.height,a=pt({width:o,height:i});return t instanceof n?at(a).putImageData(t,0,0):at(a).drawImage(t,0,0,o,i),a}function dt(t,e){return Object(y.b)(this,void 0,void 0,(function(){var n,r,o,i,a,c;return Object(y.d)(this,(function(s){switch(s.label){case 0:return n=e||ot.getEnv().createCanvasElement(),r=t.shape.slice(P(t)?1:0),o=r[0],i=r[1],a=r[2],c=b.L((function(){return t.as3D(o,i,a).toInt()})),[4,b.f.toPixels(c,n)];case 1:return s.sent(),c.dispose(),[2,n]}}))}))}function vt(t){var e=ot.getEnv(),n=e.Image,r=e.Canvas,o=e.Video;return t instanceof n||t instanceof r||t instanceof o}var mt=function(){function t(t,e){var n=this;if(void 0===e&&(e=!1),this._imageTensors=[],this._canvases=[],this._treatAsBatchInput=!1,this._inputDimensions=[],!Array.isArray(t))throw new Error("NetInput.constructor - expected inputs to be an Array of TResolvedNetInput or to be instanceof tf.Tensor4D, instead have "+t);this._treatAsBatchInput=e,this._batchSize=t.length,t.forEach((function(t,e){if(x(t))return n._imageTensors[e]=t,void(n._inputDimensions[e]=t.shape);if(P(t)){var r=t.shape[0];if(1!==r)throw new Error("NetInput - tf.Tensor4D with batchSize "+r+" passed, but not supported in input array");return n._imageTensors[e]=t,void(n._inputDimensions[e]=t.shape.slice(1))}var o=t instanceof ot.getEnv().Canvas?t:lt(t);n._canvases[e]=o,n._inputDimensions[e]=[o.height,o.width,3]}))}return Object.defineProperty(t.prototype,"imageTensors",{get:function(){return this._imageTensors},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"canvases",{get:function(){return this._canvases},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isBatchInput",{get:function(){return this.batchSize>1||this._treatAsBatchInput},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"batchSize",{get:function(){return this._batchSize},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"inputDimensions",{get:function(){return this._inputDimensions},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"inputSize",{get:function(){return this._inputSize},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"reshapedInputDimensions",{get:function(){var t=this;return S(this.batchSize,0,1).map((function(e,n){return t.getReshapedInputDimensions(n)}))},enumerable:!0,configurable:!0}),t.prototype.getInput=function(t){return this.canvases[t]||this.imageTensors[t]},t.prototype.getInputDimensions=function(t){return this._inputDimensions[t]},t.prototype.getInputHeight=function(t){return this._inputDimensions[t][0]},t.prototype.getInputWidth=function(t){return this._inputDimensions[t][1]},t.prototype.getReshapedInputDimensions=function(t){if("number"!==typeof this.inputSize)throw new Error("getReshapedInputDimensions - inputSize not set, toBatchTensor has not been called yet");return function(t,e){var n=t.width,r=t.height,o=e/Math.max(r,n);return new w(Math.round(n*o),Math.round(r*o))}({width:this.getInputWidth(t),height:this.getInputHeight(t)},this.inputSize)},t.prototype.toBatchTensor=function(t,e){var n=this;return void 0===e&&(e=!0),this._inputSize=t,b.L((function(){var r=S(n.batchSize,0,1).map((function(r){var o=n.getInput(r);if(o instanceof b.a){var i=P(o)?o:o.expandDims();return(i=function(t,e){return void 0===e&&(e=!1),b.L((function(){var n=t.shape.slice(1),r=n[0],o=n[1];if(r===o)return t;var i=Math.abs(r-o),a=Math.round(i*(e?.5:1)),c=r>o?2:1,s=function(e){var n=t.shape.slice();return n[c]=e,b.n(n,0)},u=s(a),f=i-u.shape[c],h=[e&&f?s(f):null,t,u].filter((function(t){return!!t})).map((function(t){return t.toFloat()}));return b.h(h,c)}))}(i,e)).shape[1]===t&&i.shape[2]===t||(i=b.o.resizeBilinear(i,[t,t])),i.as3D(t,t,3)}if(o instanceof ot.getEnv().Canvas)return b.f.fromPixels(function(t,e,n){void 0===n&&(n=!1);var r=ot.getEnv(),o=r.Image,i=r.Canvas;if(!(t instanceof o||t instanceof i))throw new Error("imageToSquare - expected arg0 to be HTMLImageElement | HTMLCanvasElement");var a=ht(t),c=e/Math.max(a.height,a.width),s=c*a.width,u=c*a.height,f=pt({width:e,height:e}),h=t instanceof i?t:lt(t),p=Math.abs(s-u)/2,l=n&&s1)throw new Error("extractFaces - batchSize > 1 not supported");return(i=o.getInput(0))instanceof n?(a=i,[3,4]):[3,2];case 2:return[4,dt(i)];case 3:a=s.sent(),s.label=4;case 4:r=a,s.label=5;case 5:return c=at(r),[2,e.map((function(t){return t instanceof L?t.forSize(r.width,r.height).box.floor():t})).map((function(t){return t.clipAtImageBorders(r.width,r.height)})).map((function(t){var e=t.x,n=t.y,r=t.width,o=t.height,i=pt({width:r,height:o});return at(i).putImageData(c.getImageData(e,n,r,o),0,0),i}))]}}))}))}function yt(t,e){return Object(y.b)(this,void 0,void 0,(function(){return Object(y.d)(this,(function(n){if(!x(t)&&!P(t))throw new Error("extractFaceTensors - expected image tensor to be 3D or 4D");if(P(t)&&t.shape[0]>1)throw new Error("extractFaceTensors - batchSize > 1 not supported");return[2,b.L((function(){var n=t.shape.slice(P(t)?1:0),r=n[0],o=n[1],i=n[2];return e.map((function(t){return t instanceof L?t.forSize(o,r).box:t})).map((function(t){return t.clipAtImageBorders(o,r)})).map((function(e){var n=e.x,a=e.y,c=e.width,s=e.height;return b.C(t.as3D(r,o,i),[a,n,0],[s,c,i])}))}))]}))}))}function wt(t,e){return Object(y.b)(this,void 0,void 0,(function(){var n;return Object(y.d)(this,(function(r){switch(r.label){case 0:return[4,(0,ot.getEnv().fetch)(t,e)];case 1:if(!((n=r.sent()).status<400))throw new Error("failed to fetch: ("+n.status+") "+n.statusText+", from url: "+n.url);return[2,n]}}))}))}function _t(t){return Object(y.b)(this,void 0,void 0,(function(){return Object(y.d)(this,(function(e){switch(e.label){case 0:return[4,wt(t)];case 1:return[2,e.sent().json()]}}))}))}function xt(t,e){var n=e+"-weights_manifest.json";if(!t)return{modelBaseUri:"",manifestUri:n};if("/"===t)return{modelBaseUri:"/",manifestUri:"/"+n};var r=t.startsWith("http://")?"http://":t.startsWith("https://")?"https://":"",o=(t=t.replace(r,"")).split("/").filter((function(t){return t})),i=t.endsWith(".json")?o[o.length-1]:n,a=r+(t.endsWith(".json")?o.slice(0,o.length-1):o).join("/");return{modelBaseUri:a=t.startsWith("/")?"/"+a:a,manifestUri:"/"===a?"/"+i:a+"/"+i}}function Pt(t,e){return Object(y.b)(this,void 0,void 0,(function(){var n,r,o,i;return Object(y.d)(this,(function(a){switch(a.label){case 0:return n=xt(t,e),r=n.manifestUri,o=n.modelBaseUri,[4,_t(r)];case 1:return i=a.sent(),[2,b.p.loadWeights(i,o)]}}))}))}var Ot=function(){function t(t){this._name=t,this._params=void 0,this._paramMappings=[]}return Object.defineProperty(t.prototype,"params",{get:function(){return this._params},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"paramMappings",{get:function(){return this._paramMappings},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isLoaded",{get:function(){return!!this.params},enumerable:!0,configurable:!0}),t.prototype.getParamFromPath=function(t){var e=this.traversePropertyPath(t);return e.obj[e.objProp]},t.prototype.reassignParamFromPath=function(t,e){var n=this.traversePropertyPath(t),r=n.obj,o=n.objProp;r[o].dispose(),r[o]=e},t.prototype.getParamList=function(){var t=this;return this._paramMappings.map((function(e){var n=e.paramPath;return{path:n,tensor:t.getParamFromPath(n)}}))},t.prototype.getTrainableParams=function(){return this.getParamList().filter((function(t){return t.tensor instanceof b.b}))},t.prototype.getFrozenParams=function(){return this.getParamList().filter((function(t){return!(t.tensor instanceof b.b)}))},t.prototype.variable=function(){var t=this;this.getFrozenParams().forEach((function(e){var n=e.path,r=e.tensor;t.reassignParamFromPath(n,r.variable())}))},t.prototype.freeze=function(){var t=this;this.getTrainableParams().forEach((function(e){var n=e.path,r=e.tensor,o=b.G(r.dataSync());r.dispose(),t.reassignParamFromPath(n,o)}))},t.prototype.dispose=function(t){void 0===t&&(t=!0),this.getParamList().forEach((function(e){if(t&&e.tensor.isDisposed)throw new Error("param tensor has already been disposed for path "+e.path);e.tensor.dispose()})),this._params=void 0},t.prototype.serializeParams=function(){return new Float32Array(this.getParamList().map((function(t){var e=t.tensor;return Array.from(e.dataSync())})).reduce((function(t,e){return t.concat(e)})))},t.prototype.load=function(t){return Object(y.b)(this,void 0,void 0,(function(){return Object(y.d)(this,(function(e){switch(e.label){case 0:return t instanceof Float32Array?(this.extractWeights(t),[2]):[4,this.loadFromUri(t)];case 1:return e.sent(),[2]}}))}))},t.prototype.loadFromUri=function(t){return Object(y.b)(this,void 0,void 0,(function(){var e;return Object(y.d)(this,(function(n){switch(n.label){case 0:if(t&&"string"!==typeof t)throw new Error(this._name+".loadFromUri - expected model uri");return[4,Pt(t,this.getDefaultModelName())];case 1:return e=n.sent(),this.loadFromWeightMap(e),[2]}}))}))},t.prototype.loadFromDisk=function(t){return Object(y.b)(this,void 0,void 0,(function(){var e,n,r,o,i,a,c,s,u,f;return Object(y.d)(this,(function(h){switch(h.label){case 0:if(t&&"string"!==typeof t)throw new Error(this._name+".loadFromDisk - expected model file path");return e=ot.getEnv().readFile,n=xt(t,this.getDefaultModelName()),r=n.manifestUri,o=n.modelBaseUri,i=function(t){return Promise.all(t.map((function(t){return e(t).then((function(t){return t.buffer}))})))},a=b.p.weightsLoaderFactory(i),u=(s=JSON).parse,[4,e(r)];case 1:return c=u.apply(s,[h.sent().toString()]),[4,a(c,o)];case 2:return f=h.sent(),this.loadFromWeightMap(f),[2]}}))}))},t.prototype.loadFromWeightMap=function(t){var e=this.extractParamsFromWeigthMap(t),n=e.paramMappings,r=e.params;this._paramMappings=n,this._params=r},t.prototype.extractWeights=function(t){var e=this.extractParams(t),n=e.paramMappings,r=e.params;this._paramMappings=n,this._params=r},t.prototype.traversePropertyPath=function(t){if(!this.params)throw new Error("traversePropertyPath - model has no loaded params");var e=t.split("/").reduce((function(e,n){if(!e.nextObj.hasOwnProperty(n))throw new Error("traversePropertyPath - object does not have property "+n+", for path "+t);return{obj:e.nextObj,objProp:n,nextObj:e.nextObj[n]}}),{nextObj:this.params}),n=e.obj,r=e.objProp;if(!n||!r||!(n[r]instanceof b.a))throw new Error("traversePropertyPath - parameter is not a tensor, for path "+t);return{obj:n,objProp:r}},t}();function Et(t,e,n){return b.L((function(){var r=b.z(t,e.depthwise_filter,e.pointwise_filter,n,"same");return r=b.c(r,e.bias)}))}function jt(t,e,n){return void 0===n&&(n=!1),b.L((function(){var r=b.w(n?b.c(b.i(t,e.conv0.filters,[2,2],"same"),e.conv0.bias):Et(t,e.conv0,[2,2])),o=Et(r,e.conv1,[1,1]),i=Et(b.w(b.c(r,o)),e.conv2,[1,1]);return b.w(b.c(r,b.c(o,i)))}))}function Mt(t,e,n,r){return void 0===n&&(n=!1),void 0===r&&(r=!0),b.L((function(){var o=b.w(n?b.c(b.i(t,e.conv0.filters,r?[2,2]:[1,1],"same"),e.conv0.bias):Et(t,e.conv0,r?[2,2]:[1,1])),i=Et(o,e.conv1,[1,1]),a=Et(b.w(b.c(o,i)),e.conv2,[1,1]),c=Et(b.w(b.c(o,b.c(i,a))),e.conv3,[1,1]);return b.w(b.c(o,b.c(i,b.c(a,c))))}))}function St(t,e,n,r){return void 0===n&&(n="same"),void 0===r&&(r=!1),b.L((function(){var o=b.c(b.i(t,e.filters,[1,1],n),e.bias);return r?b.w(o):o}))}function Tt(t,e){Object.keys(t).forEach((function(n){e.some((function(t){return t.originalPath===n}))||t[n].dispose()}))}function At(t,e){return function(n,r,o,i){var a=b.K(t(n*r*o*o),[o,o,n,r]),c=b.H(t(r));return e.push({paramPath:i+"/filters"},{paramPath:i+"/bias"}),{filters:a,bias:c}}}function Dt(t,e){return function(n,r,o){var i=b.I(t(n*r),[n,r]),a=b.H(t(r));return e.push({paramPath:o+"/weights"},{paramPath:o+"/bias"}),{weights:i,bias:a}}}var It=function(t,e,n){this.depthwise_filter=t,this.pointwise_filter=e,this.bias=n};function Ct(t,e){return function(n,r,o){var i=b.K(t(9*n),[3,3,n,1]),a=b.K(t(n*r),[1,1,n,r]),c=b.H(t(r));return e.push({paramPath:o+"/depthwise_filter"},{paramPath:o+"/pointwise_filter"},{paramPath:o+"/bias"}),new It(i,a,c)}}function Ft(t){return function(e){var n=t(e+"/depthwise_filter",4),r=t(e+"/pointwise_filter",4),o=t(e+"/bias",1);return new It(n,r,o)}}function Lt(t,e){return function(n,r,o){var i=t[n];if(!_(i,r))throw new Error("expected weightMap["+n+"] to be a Tensor"+r+"D, instead have "+i);return e.push({originalPath:n,paramPath:o||n}),i}}function Rt(t){var e=t;return{extractWeights:function(t){var n=e.slice(0,t);return e=e.slice(t),n},getRemainingWeights:function(){return e}}}function kt(t,e){var n=At(t,e),r=Ct(t,e);function o(t,e,o,i){return void 0===i&&(i=!1),{conv0:i?n(t,e,3,o+"/conv0"):r(t,e,o+"/conv0"),conv1:r(e,e,o+"/conv1"),conv2:r(e,e,o+"/conv2")}}return{extractDenseBlock3Params:o,extractDenseBlock4Params:function(t,e,n,i){void 0===i&&(i=!1);var a=o(t,e,n,i);return{conv0:a.conv0,conv1:a.conv1,conv2:a.conv2,conv3:r(e,e,n+"/conv3")}}}}function Bt(t){return function(e){return{filters:t(e+"/filters",4),bias:t(e+"/bias",1)}}}function Nt(t,e){var n=Lt(t,e),r=Bt(n),o=Ft(n);return{extractDenseBlock3Params:function(t,e){return void 0===e&&(e=!1),{conv0:e?r(t+"/conv0"):o(t+"/conv0"),conv1:o(t+"/conv1"),conv2:o(t+"/conv2")}},extractDenseBlock4Params:function(t,e){return void 0===e&&(e=!1),{conv0:e?r(t+"/conv0"):o(t+"/conv0"),conv1:o(t+"/conv1"),conv2:o(t+"/conv2"),conv3:o(t+"/conv3")}}}}var zt=function(t){function e(){return t.call(this,"FaceFeatureExtractor")||this}return Object(y.c)(e,t),e.prototype.forwardInput=function(t){var e=this.params;if(!e)throw new Error("FaceFeatureExtractor - load model before inference");return b.L((function(){var n=Mt(B(t.toBatchTensor(112,!0),[122.782,117.001,104.298]).div(b.y(255)),e.dense0,!0);return n=Mt(n,e.dense1),n=Mt(n,e.dense2),n=Mt(n,e.dense3),n=b.d(n,[7,7],[2,2],"valid")}))},e.prototype.forward=function(t){return Object(y.b)(this,void 0,void 0,(function(){var e;return Object(y.d)(this,(function(n){switch(n.label){case 0:return e=this.forwardInput,[4,bt(t)];case 1:return[2,e.apply(this,[n.sent()])]}}))}))},e.prototype.getDefaultModelName=function(){return"face_feature_extractor_model"},e.prototype.extractParamsFromWeigthMap=function(t){return function(t){var e=[],n=Nt(t,e).extractDenseBlock4Params,r={dense0:n("dense0",!0),dense1:n("dense1"),dense2:n("dense2"),dense3:n("dense3")};return Tt(t,e),{params:r,paramMappings:e}}(t)},e.prototype.extractParams=function(t){return function(t){var e=[],n=Rt(t),r=n.extractWeights,o=n.getRemainingWeights,i=kt(r,e).extractDenseBlock4Params,a=i(3,32,"dense0",!0),c=i(32,64,"dense1"),s=i(64,128,"dense2"),u=i(128,256,"dense3");if(0!==o().length)throw new Error("weights remaing after extract: "+o().length);return{paramMappings:e,params:{dense0:a,dense1:c,dense2:s,dense3:u}}}(t)},e}(Ot);function Wt(t,e){return b.L((function(){return b.c(b.q(t,e.weights),e.bias)}))}function Ut(t){var e={},n={};return Object.keys(t).forEach((function(r){(r.startsWith("fc")?n:e)[r]=t[r]})),{featureExtractorMap:e,classifierMap:n}}var Ht=function(t){function e(e,n){var r=t.call(this,e)||this;return r._faceFeatureExtractor=n,r}return Object(y.c)(e,t),Object.defineProperty(e.prototype,"faceFeatureExtractor",{get:function(){return this._faceFeatureExtractor},enumerable:!0,configurable:!0}),e.prototype.runNet=function(t){var e=this,n=this.params;if(!n)throw new Error(this._name+" - load model before inference");return b.L((function(){var r=t instanceof mt?e.faceFeatureExtractor.forwardInput(t):t;return Wt(r.as2D(r.shape[0],-1),n.fc)}))},e.prototype.dispose=function(e){void 0===e&&(e=!0),this.faceFeatureExtractor.dispose(e),t.prototype.dispose.call(this,e)},e.prototype.loadClassifierParams=function(t){var e=this.extractClassifierParams(t),n=e.params,r=e.paramMappings;this._params=n,this._paramMappings=r},e.prototype.extractClassifierParams=function(t){return function(t,e,n){var r=[],o=Rt(t),i=o.extractWeights,a=o.getRemainingWeights,c=Dt(i,r)(e,n,"fc");if(0!==a().length)throw new Error("weights remaing after extract: "+a().length);return{paramMappings:r,params:{fc:c}}}(t,this.getClassifierChannelsIn(),this.getClassifierChannelsOut())},e.prototype.extractParamsFromWeigthMap=function(t){var e=Ut(t),n=e.featureExtractorMap,r=e.classifierMap;return this.faceFeatureExtractor.loadFromWeightMap(n),function(t){var e,n=[],r=Lt(t,n),o={fc:(e="fc",{weights:r(e+"/weights",2),bias:r(e+"/bias",1)})};return Tt(t,n),{params:o,paramMappings:n}}(r)},e.prototype.extractParams=function(t){var e=this.getClassifierChannelsIn(),n=this.getClassifierChannelsOut(),r=n*e+n,o=t.slice(0,t.length-r),i=t.slice(t.length-r);return this.faceFeatureExtractor.extractWeights(o),this.extractClassifierParams(i)},e}(Ot),Yt=["neutral","happy","sad","angry","fearful","disgusted","surprised"],qt=function(){function t(t){var e=this;if(7!==t.length)throw new Error("FaceExpressions.constructor - expected probabilities.length to be 7, have: "+t.length);Yt.forEach((function(n,r){e[n]=t[r]}))}return t.prototype.asSortedArray=function(){var t=this;return Yt.map((function(e){return{expression:e,probability:t[e]}})).sort((function(t,e){return e.probability-t.probability}))},t}(),Gt=function(t){function e(e){return void 0===e&&(e=new zt),t.call(this,"FaceExpressionNet",e)||this}return Object(y.c)(e,t),e.prototype.forwardInput=function(t){var e=this;return b.L((function(){return b.D(e.runNet(t))}))},e.prototype.forward=function(t){return Object(y.b)(this,void 0,void 0,(function(){var e;return Object(y.d)(this,(function(n){switch(n.label){case 0:return e=this.forwardInput,[4,bt(t)];case 1:return[2,e.apply(this,[n.sent()])]}}))}))},e.prototype.predictExpressions=function(t){return Object(y.b)(this,void 0,void 0,(function(){var e,n,r,o,i=this;return Object(y.d)(this,(function(a){switch(a.label){case 0:return[4,bt(t)];case 1:return e=a.sent(),[4,this.forwardInput(e)];case 2:return n=a.sent(),[4,Promise.all(b.O(n).map((function(t){return Object(y.b)(i,void 0,void 0,(function(){var e;return Object(y.d)(this,(function(n){switch(n.label){case 0:return[4,t.data()];case 1:return e=n.sent(),t.dispose(),[2,e]}}))}))})))];case 3:return r=a.sent(),n.dispose(),o=r.map((function(t){return new qt(t)})),[2,e.isBatchInput?o:o[0]]}}))}))},e.prototype.getDefaultModelName=function(){return"face_expression_model"},e.prototype.getClassifierChannelsIn=function(){return 256},e.prototype.getClassifierChannelsOut=function(){return 7},e}(Ht);function Vt(t,e){var n={expressions:e};return Object.assign({},t,n)}function Jt(t){return V(t)&&t.landmarks instanceof W&&t.unshiftedLandmarks instanceof W&&t.alignedRect instanceof L}function Xt(t,e){var n=t.detection.box,r=e.shiftBy(n.x,n.y),o=r.align(),i=t.detection.imageDims,a={landmarks:r,unshiftedLandmarks:e,alignedRect:new L(t.detection.score,o.rescale(i.reverse()),i)};return Object.assign({},t,a)}var Kt=function(t){void 0===t&&(t={});var e=t.drawLines,n=void 0===e||e,r=t.drawPoints,o=void 0===r||r,i=t.lineWidth,a=t.lineColor,c=t.pointSize,s=t.pointColor;this.drawLines=n,this.drawPoints=o,this.lineWidth=i||1,this.pointSize=c||2,this.lineColor=a||"rgba(0, 255, 255, 1)",this.pointColor=s||"rgba(255, 0, 255, 1)"};!function(){function t(t,e){void 0===e&&(e={}),this.faceLandmarks=t,this.options=new Kt(e)}t.prototype.draw=function(t){var e=at(t),n=this.options,r=n.drawLines,o=n.drawPoints,i=n.lineWidth,a=n.lineColor,c=n.pointSize,s=n.pointColor;if(r&&this.faceLandmarks instanceof H&&(e.strokeStyle=a,e.lineWidth=i,g(e,this.faceLandmarks.getJawOutline()),g(e,this.faceLandmarks.getLeftEyeBrow()),g(e,this.faceLandmarks.getRightEyeBrow()),g(e,this.faceLandmarks.getNose()),g(e,this.faceLandmarks.getLeftEye(),!0),g(e,this.faceLandmarks.getRightEye(),!0),g(e,this.faceLandmarks.getMouth(),!0)),o){e.strokeStyle=s,e.fillStyle=s;this.faceLandmarks.positions.forEach((function(t){e.beginPath(),e.arc(t.x,t.y,c,0,2*Math.PI),e.fill()}))}}}();function Zt(t,e){var n=[],r=Rt(t),o=r.extractWeights,i=r.getRemainingWeights,a=function(t,e){var n=At(t,e),r=Ct(t,e);return{extractConvParams:n,extractSeparableConvParams:r,extractReductionBlockParams:function(t,e,o){return{separable_conv0:r(t,e,o+"/separable_conv0"),separable_conv1:r(e,e,o+"/separable_conv1"),expansion_conv:n(t,e,1,o+"/expansion_conv")}},extractMainBlockParams:function(t,e){return{separable_conv0:r(t,t,e+"/separable_conv0"),separable_conv1:r(t,t,e+"/separable_conv1"),separable_conv2:r(t,t,e+"/separable_conv2")}}}}(o,n),c=a.extractConvParams,s=a.extractSeparableConvParams,u=a.extractReductionBlockParams,f=a.extractMainBlockParams,h={conv_in:c(3,32,3,"entry_flow/conv_in"),reduction_block_0:u(32,64,"entry_flow/reduction_block_0"),reduction_block_1:u(64,128,"entry_flow/reduction_block_1")},p={};S(e,0,1).forEach((function(t){p["main_block_"+t]=f(128,"middle_flow/main_block_"+t)}));var l={reduction_block:u(128,256,"exit_flow/reduction_block"),separable_conv:s(256,512,"exit_flow/separable_conv")};if(0!==i().length)throw new Error("weights remaing after extract: "+i().length);return{paramMappings:n,params:{entry_flow:h,middle_flow:p,exit_flow:l}}}function Qt(t,e){var n=[],r=function(t,e){var n=Lt(t,e),r=Bt(n),o=Ft(n);return{extractConvParams:r,extractSeparableConvParams:o,extractReductionBlockParams:function(t){return{separable_conv0:o(t+"/separable_conv0"),separable_conv1:o(t+"/separable_conv1"),expansion_conv:r(t+"/expansion_conv")}},extractMainBlockParams:function(t){return{separable_conv0:o(t+"/separable_conv0"),separable_conv1:o(t+"/separable_conv1"),separable_conv2:o(t+"/separable_conv2")}}}}(t,n),o=r.extractConvParams,i=r.extractSeparableConvParams,a=r.extractReductionBlockParams,c=r.extractMainBlockParams,s={conv_in:o("entry_flow/conv_in"),reduction_block_0:a("entry_flow/reduction_block_0"),reduction_block_1:a("entry_flow/reduction_block_1")},u={};S(e,0,1).forEach((function(t){u["main_block_"+t]=c("middle_flow/main_block_"+t)}));var f={reduction_block:a("exit_flow/reduction_block"),separable_conv:i("exit_flow/separable_conv")};return Tt(t,n),{params:{entry_flow:s,middle_flow:u,exit_flow:f},paramMappings:n}}function $t(t,e,n){return b.c(b.i(t,e.filters,n,"same"),e.bias)}function te(t,e,n){void 0===n&&(n=!0);var r=n?b.w(t):t;return r=Et(r,e.separable_conv0,[1,1]),r=Et(b.w(r),e.separable_conv1,[1,1]),r=b.s(r,[3,3],[2,2],"same"),r=b.c(r,$t(t,e.expansion_conv,[2,2]))}var ee,ne=function(t){function e(e){var n=t.call(this,"TinyXception")||this;return n._numMainBlocks=e,n}return Object(y.c)(e,t),e.prototype.forwardInput=function(t){var e=this,n=this.params;if(!n)throw new Error("TinyXception - load model before inference");return b.L((function(){var r=B(t.toBatchTensor(112,!0),[122.782,117.001,104.298]).div(b.y(256)),o=b.w($t(r,n.entry_flow.conv_in,[2,2]));return o=te(o,n.entry_flow.reduction_block_0,!1),o=te(o,n.entry_flow.reduction_block_1),S(e._numMainBlocks,0,1).forEach((function(t){o=function(t,e){var n=Et(b.w(t),e.separable_conv0,[1,1]);return n=Et(b.w(n),e.separable_conv1,[1,1]),n=Et(b.w(n),e.separable_conv2,[1,1]),b.c(n,t)}(o,n.middle_flow["main_block_"+t])})),o=te(o,n.exit_flow.reduction_block),o=b.w(Et(o,n.exit_flow.separable_conv,[1,1]))}))},e.prototype.forward=function(t){return Object(y.b)(this,void 0,void 0,(function(){var e;return Object(y.d)(this,(function(n){switch(n.label){case 0:return e=this.forwardInput,[4,bt(t)];case 1:return[2,e.apply(this,[n.sent()])]}}))}))},e.prototype.getDefaultModelName=function(){return"tiny_xception_model"},e.prototype.extractParamsFromWeigthMap=function(t){return Qt(t,this._numMainBlocks)},e.prototype.extractParams=function(t){return Zt(t,this._numMainBlocks)},e}(Ot);!function(t){t.FEMALE="female",t.MALE="male"}(ee||(ee={}));var re=function(t){function e(e){void 0===e&&(e=new ne(2));var n=t.call(this,"AgeGenderNet")||this;return n._faceFeatureExtractor=e,n}return Object(y.c)(e,t),Object.defineProperty(e.prototype,"faceFeatureExtractor",{get:function(){return this._faceFeatureExtractor},enumerable:!0,configurable:!0}),e.prototype.runNet=function(t){var e=this,n=this.params;if(!n)throw new Error(this._name+" - load model before inference");return b.L((function(){var r=t instanceof mt?e.faceFeatureExtractor.forwardInput(t):t,o=b.d(r,[7,7],[2,2],"valid").as2D(r.shape[0],-1);return{age:Wt(o,n.fc.age).as1D(),gender:Wt(o,n.fc.gender)}}))},e.prototype.forwardInput=function(t){var e=this;return b.L((function(){var n=e.runNet(t),r=n.age,o=n.gender;return{age:r,gender:b.D(o)}}))},e.prototype.forward=function(t){return Object(y.b)(this,void 0,void 0,(function(){var e;return Object(y.d)(this,(function(n){switch(n.label){case 0:return e=this.forwardInput,[4,bt(t)];case 1:return[2,e.apply(this,[n.sent()])]}}))}))},e.prototype.predictAgeAndGender=function(t){return Object(y.b)(this,void 0,void 0,(function(){var e,n,r,o,i,a,c=this;return Object(y.d)(this,(function(s){switch(s.label){case 0:return[4,bt(t)];case 1:return e=s.sent(),[4,this.forwardInput(e)];case 2:return n=s.sent(),r=b.O(n.age),o=b.O(n.gender),i=r.map((function(t,e){return{ageTensor:t,genderTensor:o[e]}})),[4,Promise.all(i.map((function(t){var e=t.ageTensor,n=t.genderTensor;return Object(y.b)(c,void 0,void 0,(function(){var t,r,o,i,a;return Object(y.d)(this,(function(c){switch(c.label){case 0:return[4,e.data()];case 1:return t=c.sent()[0],[4,n.data()];case 2:return r=c.sent()[0],i=(o=r>.5)?ee.MALE:ee.FEMALE,a=o?r:1-r,e.dispose(),n.dispose(),[2,{age:t,gender:i,genderProbability:a}]}}))}))})))];case 3:return a=s.sent(),n.age.dispose(),n.gender.dispose(),[2,e.isBatchInput?a:a[0]]}}))}))},e.prototype.getDefaultModelName=function(){return"age_gender_model"},e.prototype.dispose=function(e){void 0===e&&(e=!0),this.faceFeatureExtractor.dispose(e),t.prototype.dispose.call(this,e)},e.prototype.loadClassifierParams=function(t){var e=this.extractClassifierParams(t),n=e.params,r=e.paramMappings;this._params=n,this._paramMappings=r},e.prototype.extractClassifierParams=function(t){return function(t){var e=[],n=Rt(t),r=n.extractWeights,o=n.getRemainingWeights,i=Dt(r,e),a=i(512,1,"fc/age"),c=i(512,2,"fc/gender");if(0!==o().length)throw new Error("weights remaing after extract: "+o().length);return{paramMappings:e,params:{fc:{age:a,gender:c}}}}(t)},e.prototype.extractParamsFromWeigthMap=function(t){var e=Ut(t),n=e.featureExtractorMap,r=e.classifierMap;return this.faceFeatureExtractor.loadFromWeightMap(n),function(t){var e=[],n=Lt(t,e);function r(t){return{weights:n(t+"/weights",2),bias:n(t+"/bias",1)}}var o={fc:{age:r("fc/age"),gender:r("fc/gender")}};return Tt(t,e),{params:o,paramMappings:e}}(r)},e.prototype.extractParams=function(t){var e=t.slice(0,t.length-1539),n=t.slice(t.length-1539);return this.faceFeatureExtractor.extractWeights(e),this.extractClassifierParams(n)},e}(Ot),oe=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(y.c)(e,t),e.prototype.postProcess=function(t,e,n){var r=n.map((function(t){var n=t.width,r=t.height,o=e/Math.max(r,n);return{width:n*o,height:r*o}})),o=r.length;return b.L((function(){var n=function(t,e){return b.E([b.n([68],t),b.n([68],e)],1).as2D(1,136).as1D()},i=function(t,e){var n=r[t],o=n.width,i=n.height;return e(o,i)?Math.abs(o-i)/2:0};return t.mul(b.n([o,136],e)).sub(b.E(Array.from(Array(o),(function(t,e){return n(function(t){return i(t,(function(t,e){return t 0");if("number"!==typeof this._scaleFactor||this._scaleFactor<=0||this._scaleFactor>=1)throw new Error(this._name+" - expected scaleFactor to be a number between 0 and 1");if("number"!==typeof this._maxNumScales||this._maxNumScales<0)throw new Error(this._name+" - expected maxNumScales to be a number > 0");if(!Array.isArray(this._scoreThresholds)||3!==this._scoreThresholds.length||this._scoreThresholds.some((function(t){return"number"!==typeof t})))throw new Error(this._name+" - expected scoreThresholds to be an array of numbers of length 3");if(this._scaleSteps&&(!Array.isArray(this._scaleSteps)||this._scaleSteps.some((function(t){return"number"!==typeof t}))))throw new Error(this._name+" - expected scaleSteps to be an array of numbers")}return Object.defineProperty(t.prototype,"minFaceSize",{get:function(){return this._minFaceSize},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"scaleFactor",{get:function(){return this._scaleFactor},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"maxNumScales",{get:function(){return this._maxNumScales},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"scoreThresholds",{get:function(){return this._scoreThresholds},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"scaleSteps",{get:function(){return this._scaleSteps},enumerable:!0,configurable:!0}),t}();function _e(t,e){function n(n,r,o,i,a){var c=b.K(t(n*r*o*o),[o,o,n,r]),s=b.H(t(r));return e.push({paramPath:i+"/filters"},{paramPath:i+"/"+(a?"batch_norm_offset":"bias")}),{filters:c,bias:s}}function r(t,e,r,o){var i=n(t,e,r,o,!0);return{filters:i.filters,batch_norm_offset:i.bias}}function o(n,o,i){return{depthwise_conv:function(n,r){var o=b.K(t(9*n),[3,3,n,1]),i=b.H(t(n)),a=b.H(t(n)),c=b.H(t(n)),s=b.H(t(n));return e.push({paramPath:r+"/filters"},{paramPath:r+"/batch_norm_scale"},{paramPath:r+"/batch_norm_offset"},{paramPath:r+"/batch_norm_mean"},{paramPath:r+"/batch_norm_variance"}),{filters:o,batch_norm_scale:i,batch_norm_offset:a,batch_norm_mean:c,batch_norm_variance:s}}(n,i+"/depthwise_conv"),pointwise_conv:r(n,o,1,i+"/pointwise_conv")}}return{extractMobilenetV1Params:function(){return{conv_0:r(3,32,3,"mobilenetv1/conv_0"),conv_1:o(32,64,"mobilenetv1/conv_1"),conv_2:o(64,128,"mobilenetv1/conv_2"),conv_3:o(128,128,"mobilenetv1/conv_3"),conv_4:o(128,256,"mobilenetv1/conv_4"),conv_5:o(256,256,"mobilenetv1/conv_5"),conv_6:o(256,512,"mobilenetv1/conv_6"),conv_7:o(512,512,"mobilenetv1/conv_7"),conv_8:o(512,512,"mobilenetv1/conv_8"),conv_9:o(512,512,"mobilenetv1/conv_9"),conv_10:o(512,512,"mobilenetv1/conv_10"),conv_11:o(512,512,"mobilenetv1/conv_11"),conv_12:o(512,1024,"mobilenetv1/conv_12"),conv_13:o(1024,1024,"mobilenetv1/conv_13")}},extractPredictionLayerParams:function(){return{conv_0:r(1024,256,1,"prediction_layer/conv_0"),conv_1:r(256,512,3,"prediction_layer/conv_1"),conv_2:r(512,128,1,"prediction_layer/conv_2"),conv_3:r(128,256,3,"prediction_layer/conv_3"),conv_4:r(256,128,1,"prediction_layer/conv_4"),conv_5:r(128,256,3,"prediction_layer/conv_5"),conv_6:r(256,64,1,"prediction_layer/conv_6"),conv_7:r(64,128,3,"prediction_layer/conv_7"),box_predictor_0:{box_encoding_predictor:n(512,12,1,"prediction_layer/box_predictor_0/box_encoding_predictor"),class_predictor:n(512,9,1,"prediction_layer/box_predictor_0/class_predictor")},box_predictor_1:{box_encoding_predictor:n(1024,24,1,"prediction_layer/box_predictor_1/box_encoding_predictor"),class_predictor:n(1024,18,1,"prediction_layer/box_predictor_1/class_predictor")},box_predictor_2:{box_encoding_predictor:n(512,24,1,"prediction_layer/box_predictor_2/box_encoding_predictor"),class_predictor:n(512,18,1,"prediction_layer/box_predictor_2/class_predictor")},box_predictor_3:{box_encoding_predictor:n(256,24,1,"prediction_layer/box_predictor_3/box_encoding_predictor"),class_predictor:n(256,18,1,"prediction_layer/box_predictor_3/class_predictor")},box_predictor_4:{box_encoding_predictor:n(256,24,1,"prediction_layer/box_predictor_4/box_encoding_predictor"),class_predictor:n(256,18,1,"prediction_layer/box_predictor_4/class_predictor")},box_predictor_5:{box_encoding_predictor:n(128,24,1,"prediction_layer/box_predictor_5/box_encoding_predictor"),class_predictor:n(128,18,1,"prediction_layer/box_predictor_5/class_predictor")}}}}}function xe(t){var e=[],n=function(t,e){var n=Lt(t,e);function r(t,e,r){return{filters:n(t+"/Conv2d_"+e+"_pointwise/weights",4,r+"/filters"),batch_norm_offset:n(t+"/Conv2d_"+e+"_pointwise/convolution_bn_offset",1,r+"/batch_norm_offset")}}function o(t){var e="mobilenetv1/conv_"+t,o="MobilenetV1/Conv2d_"+t+"_depthwise",i=e+"/depthwise_conv",a=e+"/pointwise_conv";return{depthwise_conv:{filters:n(o+"/depthwise_weights",4,i+"/filters"),batch_norm_scale:n(o+"/BatchNorm/gamma",1,i+"/batch_norm_scale"),batch_norm_offset:n(o+"/BatchNorm/beta",1,i+"/batch_norm_offset"),batch_norm_mean:n(o+"/BatchNorm/moving_mean",1,i+"/batch_norm_mean"),batch_norm_variance:n(o+"/BatchNorm/moving_variance",1,i+"/batch_norm_variance")},pointwise_conv:r("MobilenetV1",t,a)}}function i(t,e){return{filters:n(t+"/weights",4,e+"/filters"),bias:n(t+"/biases",1,e+"/bias")}}function a(t){return{box_encoding_predictor:i("Prediction/BoxPredictor_"+t+"/BoxEncodingPredictor","prediction_layer/box_predictor_"+t+"/box_encoding_predictor"),class_predictor:i("Prediction/BoxPredictor_"+t+"/ClassPredictor","prediction_layer/box_predictor_"+t+"/class_predictor")}}return{extractMobilenetV1Params:function(){return{conv_0:r("MobilenetV1",0,"mobilenetv1/conv_0"),conv_1:o(1),conv_2:o(2),conv_3:o(3),conv_4:o(4),conv_5:o(5),conv_6:o(6),conv_7:o(7),conv_8:o(8),conv_9:o(9),conv_10:o(10),conv_11:o(11),conv_12:o(12),conv_13:o(13)}},extractPredictionLayerParams:function(){return{conv_0:r("Prediction",0,"prediction_layer/conv_0"),conv_1:r("Prediction",1,"prediction_layer/conv_1"),conv_2:r("Prediction",2,"prediction_layer/conv_2"),conv_3:r("Prediction",3,"prediction_layer/conv_3"),conv_4:r("Prediction",4,"prediction_layer/conv_4"),conv_5:r("Prediction",5,"prediction_layer/conv_5"),conv_6:r("Prediction",6,"prediction_layer/conv_6"),conv_7:r("Prediction",7,"prediction_layer/conv_7"),box_predictor_0:a(0),box_predictor_1:a(1),box_predictor_2:a(2),box_predictor_3:a(3),box_predictor_4:a(4),box_predictor_5:a(5)}}}}(t,e),r=n.extractMobilenetV1Params,o=n.extractPredictionLayerParams,i=t["Output/extra_dim"];if(e.push({originalPath:"Output/extra_dim",paramPath:"output_layer/extra_dim"}),!x(i))throw new Error("expected weightMap['Output/extra_dim'] to be a Tensor3D, instead have "+i);var a={mobilenetv1:r(),prediction_layer:o(),output_layer:{extra_dim:i}};return Tt(t,e),{params:a,paramMappings:e}}function Pe(t,e,n){return b.L((function(){var r=b.i(t,e.filters,n,"same");return r=b.c(r,e.batch_norm_offset),b.g(r,0,6)}))}function Oe(t,e){return b.L((function(){var n=null,r=Pe(t,e.conv_0,[2,2]);if([e.conv_1,e.conv_2,e.conv_3,e.conv_4,e.conv_5,e.conv_6,e.conv_7,e.conv_8,e.conv_9,e.conv_10,e.conv_11,e.conv_12,e.conv_13].forEach((function(t,e){var o=e+1,i=function(t){return[2,4,6,12].some((function(e){return e===t}))?[2,2]:[1,1]}(o);r=Pe(r=function(t,e,n){return b.L((function(){var r=b.j(t,e.filters,n,"same");return r=b.e(r,e.batch_norm_mean,e.batch_norm_variance,e.batch_norm_offset,e.batch_norm_scale,.0010000000474974513),b.g(r,0,6)}))}(r,t.depthwise_conv,i),t.pointwise_conv,[1,1]),11===o&&(n=r)})),null===n)throw new Error("mobileNetV1 - output of conv layer 11 is null");return{out:r,conv11:n}}))}function Ee(t,e,n){var r=t.arraySync(),o=Math.min(r[e][0],r[e][2]),i=Math.min(r[e][1],r[e][3]),a=Math.max(r[e][0],r[e][2]),c=Math.max(r[e][1],r[e][3]),s=Math.min(r[n][0],r[n][2]),u=Math.min(r[n][1],r[n][3]),f=Math.max(r[n][0],r[n][2]),h=Math.max(r[n][1],r[n][3]),p=(a-o)*(c-i),l=(f-s)*(h-u);if(p<=0||l<=0)return 0;var d=Math.max(o,s),v=Math.max(i,u),m=Math.min(a,f),b=Math.min(c,h),g=Math.max(m-d,0)*Math.max(b-v,0);return g/(p+l-g)}function je(t,e){var n=function(t){var e=b.O(b.N(t,[1,0])),n=[b.F(e[2],e[0]),b.F(e[3],e[1])];return{sizes:n,centers:[b.c(e[0],b.k(n[0],b.y(2))),b.c(e[1],b.k(n[1],b.y(2)))]}}(t),r=n.sizes,o=n.centers,i=b.O(b.N(e,[1,0])),a=b.k(b.t(b.l(b.k(i[2],b.y(5))),r[0]),b.y(2)),c=b.c(b.t(b.k(i[0],b.y(10)),r[0]),o[0]),s=b.k(b.t(b.l(b.k(i[3],b.y(5))),r[1]),b.y(2)),u=b.c(b.t(b.k(i[1],b.y(10)),r[1]),o[1]);return b.N(b.E([b.F(c,a),b.F(u,s),b.c(c,a),b.c(u,s)]),[1,0])}function Me(t,e){return b.L((function(){var n=t.shape[0];return{boxPredictionEncoding:b.x(St(t,e.box_encoding_predictor),[n,-1,1,4]),classPrediction:b.x(St(t,e.class_predictor),[n,-1,3])}}))}var Se=function(){function t(t){var e=void 0===t?{}:t,n=e.minConfidence,r=e.maxResults;if(this._name="SsdMobilenetv1Options",this._minConfidence=n||.5,this._maxResults=r||100,"number"!==typeof this._minConfidence||this._minConfidence<=0||this._minConfidence>=1)throw new Error(this._name+" - expected minConfidence to be a number between 0 and 1");if("number"!==typeof this._maxResults)throw new Error(this._name+" - expected maxResults to be a number")}return Object.defineProperty(t.prototype,"minConfidence",{get:function(){return this._minConfidence},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"maxResults",{get:function(){return this._maxResults},enumerable:!0,configurable:!0}),t}(),Te=function(t){function e(){return t.call(this,"SsdMobilenetv1")||this}return Object(y.c)(e,t),e.prototype.forwardInput=function(t){var e=this.params;if(!e)throw new Error("SsdMobilenetv1 - load model before inference");return b.L((function(){var n=t.toBatchTensor(512,!1).toFloat(),r=Oe(b.F(b.t(n,b.y(.007843137718737125)),b.y(1)),e.mobilenetv1),o=function(t,e,n){return b.L((function(){var r=Pe(t,n.conv_0,[1,1]),o=Pe(r,n.conv_1,[2,2]),i=Pe(o,n.conv_2,[1,1]),a=Pe(i,n.conv_3,[2,2]),c=Pe(a,n.conv_4,[1,1]),s=Pe(c,n.conv_5,[2,2]),u=Pe(s,n.conv_6,[1,1]),f=Pe(u,n.conv_7,[2,2]),h=Me(e,n.box_predictor_0),p=Me(t,n.box_predictor_1),l=Me(o,n.box_predictor_2),d=Me(a,n.box_predictor_3),v=Me(s,n.box_predictor_4),m=Me(f,n.box_predictor_5);return{boxPredictions:b.h([h.boxPredictionEncoding,p.boxPredictionEncoding,l.boxPredictionEncoding,d.boxPredictionEncoding,v.boxPredictionEncoding,m.boxPredictionEncoding],1),classPredictions:b.h([h.classPrediction,p.classPrediction,l.classPrediction,d.classPrediction,v.classPrediction,m.classPrediction],1)}}))}(r.out,r.conv11,e.prediction_layer);return function(t,e,n){return b.L((function(){var r=t.shape[0],o=je(b.x(b.M(n.extra_dim,[r,1,1]),[-1,4]),b.x(t,[-1,4]));o=b.x(o,[r,o.shape[0]/r,4]);var i=b.A(b.B(e,[0,0,1],[-1,-1,-1])),a=b.B(i,[0,0,0],[-1,-1,1]);return a=b.x(a,[r,a.shape[1]]),{boxes:b.O(o),scores:b.O(a)}}))}(o.boxPredictions,o.classPredictions,e.output_layer)}))},e.prototype.forward=function(t){return Object(y.b)(this,void 0,void 0,(function(){var e;return Object(y.d)(this,(function(n){switch(n.label){case 0:return e=this.forwardInput,[4,bt(t)];case 1:return[2,e.apply(this,[n.sent()])]}}))}))},e.prototype.locateFaces=function(t,e){return void 0===e&&(e={}),Object(y.b)(this,void 0,void 0,(function(){var n,r,o,i,a,c,s,u,f,h,p,l,d,v,m,b,g,w,_,x;return Object(y.d)(this,(function(y){switch(y.label){case 0:return n=new Se(e),r=n.maxResults,o=n.minConfidence,[4,bt(t)];case 1:for(i=y.sent(),a=this.forwardInput(i),c=a.boxes,s=a.scores,u=c[0],f=s[0],h=1;ho})).sort((function(t,e){return e.score-t.score})),s=[];return c.forEach((function(e){if(!(s.length>=a)){for(var n=e.score,i=s.length-1;i>=0;--i){var c=Ee(t,e.boxIndex,s[i]);if(0!==c&&(e.score*=c<=r?1:0,e.score<=o))break}n===e.score&&s.push(e.boxIndex)}})),s}(u,p,r,.5,o),m=i.getReshapedInputDimensions(0),b=i.inputSize,g=b/m.width,w=b/m.height,_=u.arraySync(),x=v.map((function(t){var e=[Math.max(0,_[t][0]),Math.min(1,_[t][2])].map((function(t){return t*w})),n=e[0],r=e[1],o=[Math.max(0,_[t][1]),Math.min(1,_[t][3])].map((function(t){return t*g})),a=o[0],c=o[1];return new L(p[t],new z(a,n,c-a,r-n),{height:i.getInputHeight(0),width:i.getInputWidth(0)})})),u.dispose(),f.dispose(),[2,x]}}))}))},e.prototype.getDefaultModelName=function(){return"ssd_mobilenetv1_model"},e.prototype.extractParamsFromWeigthMap=function(t){return xe(t)},e.prototype.extractParams=function(t){return function(t){var e=[],n=Rt(t),r=n.extractWeights,o=n.getRemainingWeights,i=_e(r,e),a=i.extractMobilenetV1Params,c=i.extractPredictionLayerParams,s=a(),u=c(),f={extra_dim:b.J(r(20472),[1,5118,4])};if(e.push({paramPath:"output_layer/extra_dim"}),0!==o().length)throw new Error("weights remaing after extract: "+o().length);return{params:{mobilenetv1:s,prediction_layer:u,output_layer:f},paramMappings:e}}(t)},e}(Ot);!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(y.c)(e,t)}(Te);var Ae,De=[new D(.738768,.874946),new D(2.42204,2.65704),new D(4.30971,7.04493),new D(10.246,4.59428),new D(12.6868,11.8741)],Ie=[new D(1.603231,2.094468),new D(6.041143,7.080126),new D(2.882459,3.518061),new D(4.266906,5.178857),new D(9.041765,10.66308)],Ce=[117.001,114.697,97.404],Fe=function(t){return"number"===typeof t};function Le(t){return b.L((function(){var e=b.t(t,b.y(.10000000149011612));return b.c(b.w(b.F(t,e)),e)}))}function Re(t,e){return b.L((function(){var n=b.v(t,[[0,0],[1,1],[1,1],[0,0]]);return n=b.i(n,e.conv.filters,[1,1],"valid"),n=b.F(n,e.bn.sub),n=b.t(n,e.bn.truediv),Le(n=b.c(n,e.conv.bias))}))}function ke(t,e){return b.L((function(){var n=b.v(t,[[0,0],[1,1],[1,1],[0,0]]);return n=b.z(n,e.depthwise_filter,e.pointwise_filter,[1,1],"valid"),Le(n=b.c(n,e.bias))}))}function Be(t,e){var n=At(t,e);var r=Ct(t,e);return{extractConvParams:n,extractConvWithBatchNormParams:function(r,o,i){return{conv:n(r,o,3,i+"/conv"),bn:function(n,r){var o=b.H(t(n)),i=b.H(t(n));return e.push({paramPath:r+"/sub"},{paramPath:r+"/truediv"}),{sub:o,truediv:i}}(o,i+"/bn")}},extractSeparableConvParams:r}}function Ne(t,e){var n=Lt(t,e);function r(t){return{filters:n(t+"/filters",4),bias:n(t+"/bias",1)}}return{extractConvParams:r,extractConvWithBatchNormParams:function(t){return{conv:r(t+"/conv"),bn:function(t){return{sub:n(t+"/sub",1),truediv:n(t+"/truediv",1)}}(t+"/bn")}},extractSeparableConvParams:Ft(n)}}!function(t){t[t.XS=224]="XS",t[t.SM=320]="SM",t[t.MD=416]="MD",t[t.LG=608]="LG"}(Ae||(Ae={}));var ze=function(){function t(t){var e=void 0===t?{}:t,n=e.inputSize,r=e.scoreThreshold;if(this._name="TinyYolov2Options",this._inputSize=n||416,this._scoreThreshold=r||.5,"number"!==typeof this._inputSize||this._inputSize%32!==0)throw new Error(this._name+" - expected inputSize to be a number divisible by 32");if("number"!==typeof this._scoreThreshold||this._scoreThreshold<=0||this._scoreThreshold>=1)throw new Error(this._name+" - expected scoreThreshold to be a number between 0 and 1")}return Object.defineProperty(t.prototype,"inputSize",{get:function(){return this._inputSize},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"scoreThreshold",{get:function(){return this._scoreThreshold},enumerable:!0,configurable:!0}),t}(),We=function(t){function e(e){var n=t.call(this,"TinyYolov2")||this;return function(t){if(!t)throw new Error("invalid config: "+t);if("boolean"!==typeof t.withSeparableConvs)throw new Error("config.withSeparableConvs has to be a boolean, have: "+t.withSeparableConvs);if(!Fe(t.iouThreshold)||t.iouThreshold<0||t.iouThreshold>1)throw new Error("config.iouThreshold has to be a number between [0, 1], have: "+t.iouThreshold);if(!Array.isArray(t.classes)||!t.classes.length||!t.classes.every((function(t){return"string"===typeof t})))throw new Error("config.classes has to be an array class names: string[], have: "+JSON.stringify(t.classes));if(!Array.isArray(t.anchors)||!t.anchors.length||!t.anchors.map((function(t){return t||{}})).every((function(t){return Fe(t.x)&&Fe(t.y)})))throw new Error("config.anchors has to be an array of { x: number, y: number }, have: "+JSON.stringify(t.anchors));if(t.meanRgb&&(!Array.isArray(t.meanRgb)||3!==t.meanRgb.length||!t.meanRgb.every(Fe)))throw new Error("config.meanRgb has to be an array of shape [number, number, number], have: "+JSON.stringify(t.meanRgb))}(e),n._config=e,n}return Object(y.c)(e,t),Object.defineProperty(e.prototype,"config",{get:function(){return this._config},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"withClassScores",{get:function(){return this.config.withClassScores||this.config.classes.length>1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"boxEncodingSize",{get:function(){return 5+(this.withClassScores?this.config.classes.length:0)},enumerable:!0,configurable:!0}),e.prototype.runTinyYolov2=function(t,e){var n=Re(t,e.conv0);return n=Re(n=b.s(n,[2,2],[2,2],"same"),e.conv1),n=Re(n=b.s(n,[2,2],[2,2],"same"),e.conv2),n=Re(n=b.s(n,[2,2],[2,2],"same"),e.conv3),n=Re(n=b.s(n,[2,2],[2,2],"same"),e.conv4),n=Re(n=b.s(n,[2,2],[2,2],"same"),e.conv5),n=Re(n=b.s(n,[2,2],[1,1],"same"),e.conv6),St(n=Re(n,e.conv7),e.conv8,"valid",!1)},e.prototype.runMobilenet=function(t,e){var n=this.config.isFirstLayerConv2d?Le(St(t,e.conv0,"valid",!1)):ke(t,e.conv0);return n=ke(n=b.s(n,[2,2],[2,2],"same"),e.conv1),n=ke(n=b.s(n,[2,2],[2,2],"same"),e.conv2),n=ke(n=b.s(n,[2,2],[2,2],"same"),e.conv3),n=ke(n=b.s(n,[2,2],[2,2],"same"),e.conv4),n=ke(n=b.s(n,[2,2],[2,2],"same"),e.conv5),n=b.s(n,[2,2],[1,1],"same"),n=e.conv6?ke(n,e.conv6):n,St(n=e.conv7?ke(n,e.conv7):n,e.conv8,"valid",!1)},e.prototype.forwardInput=function(t,e){var n=this,r=this.params;if(!r)throw new Error("TinyYolov2 - load model before inference");return b.L((function(){var o=t.toBatchTensor(e,!1).toFloat();return o=(o=n.config.meanRgb?B(o,n.config.meanRgb):o).div(b.y(256)),n.config.withSeparableConvs?n.runMobilenet(o,r):n.runTinyYolov2(o,r)}))},e.prototype.forward=function(t,e){return Object(y.b)(this,void 0,void 0,(function(){var n;return Object(y.d)(this,(function(r){switch(r.label){case 0:return n=this.forwardInput,[4,bt(t)];case 1:return[4,n.apply(this,[r.sent(),e])];case 2:return[2,r.sent()]}}))}))},e.prototype.detect=function(t,e){return void 0===e&&(e={}),Object(y.b)(this,void 0,void 0,(function(){var n,r,o,i,a,c,s,u,f,h,p,l,d,v=this;return Object(y.d)(this,(function(m){switch(m.label){case 0:return n=new ze(e),r=n.inputSize,o=n.scoreThreshold,[4,bt(t)];case 1:return i=m.sent(),[4,this.forwardInput(i,r)];case 2:return a=m.sent(),c=b.L((function(){return b.O(a)[0].expandDims()})),s={width:i.getInputWidth(0),height:i.getInputHeight(0)},[4,this.extractBoxes(c,i.getReshapedInputDimensions(0),o)];case 3:return u=m.sent(),a.dispose(),c.dispose(),f=u.map((function(t){return t.box})),h=u.map((function(t){return t.score})),p=u.map((function(t){return t.classScore})),l=u.map((function(t){return v.config.classes[t.label]})),d=k(f.map((function(t){return t.rescale(r)})),h,this.config.iouThreshold,!0),[2,d.map((function(t){return new F(h[t],p[t],l[t],f[t],s)}))]}}))}))},e.prototype.getDefaultModelName=function(){return""},e.prototype.extractParamsFromWeigthMap=function(t){return function(t,e){var n,r=[],o=Ne(t,r),i=o.extractConvParams,a=o.extractConvWithBatchNormParams,c=o.extractSeparableConvParams;if(e.withSeparableConvs){var s=e.filterSizes&&e.filterSizes.length||9;n={conv0:e.isFirstLayerConv2d?i("conv0"):c("conv0"),conv1:c("conv1"),conv2:c("conv2"),conv3:c("conv3"),conv4:c("conv4"),conv5:c("conv5"),conv6:s>7?c("conv6"):void 0,conv7:s>8?c("conv7"):void 0,conv8:i("conv8")}}else n={conv0:a("conv0"),conv1:a("conv1"),conv2:a("conv2"),conv3:a("conv3"),conv4:a("conv4"),conv5:a("conv5"),conv6:a("conv6"),conv7:a("conv7"),conv8:i("conv8")};return Tt(t,r),{params:n,paramMappings:r}}(t,this.config)},e.prototype.extractParams=function(t){var n=this.config.filterSizes||e.DEFAULT_FILTER_SIZES,r=n?n.length:void 0;if(7!==r&&8!==r&&9!==r)throw new Error("TinyYolov2 - expected 7 | 8 | 9 convolutional filters, but found "+r+" filterSizes in config");return function(t,e,n,r){var o,i=Rt(t),a=i.extractWeights,c=i.getRemainingWeights,s=[],u=Be(a,s),f=u.extractConvParams,h=u.extractConvWithBatchNormParams,p=u.extractSeparableConvParams;if(e.withSeparableConvs){var l=r[0],d=r[1],v=r[2],m=r[3],b=r[4],g=r[5],y=r[6],w=r[7],_=r[8];o={conv0:e.isFirstLayerConv2d?f(l,d,3,"conv0"):p(l,d,"conv0"),conv1:p(d,v,"conv1"),conv2:p(v,m,"conv2"),conv3:p(m,b,"conv3"),conv4:p(b,g,"conv4"),conv5:p(g,y,"conv5"),conv6:w?p(y,w,"conv6"):void 0,conv7:_?p(w,_,"conv7"):void 0,conv8:f(_||w||y,5*n,1,"conv8")}}else l=r[0],d=r[1],v=r[2],m=r[3],b=r[4],g=r[5],y=r[6],w=r[7],_=r[8],o={conv0:h(l,d,"conv0"),conv1:h(d,v,"conv1"),conv2:h(v,m,"conv2"),conv3:h(m,b,"conv3"),conv4:h(b,g,"conv4"),conv5:h(g,y,"conv5"),conv6:h(y,w,"conv6"),conv7:h(w,_,"conv7"),conv8:f(_,5*n,1,"conv8")};if(0!==c().length)throw new Error("weights remaing after extract: "+c().length);return{params:o,paramMappings:s}}(t,this.config,this.boxEncodingSize,n)},e.prototype.extractBoxes=function(t,e,n){return Object(y.b)(this,void 0,void 0,(function(){var r,o,i,a,c,s,u,f,h,p,l,d,v,m,g,w,_,x,P,O,E,j,M,S,T,A,D,I,F,L=this;return Object(y.d)(this,(function(R){switch(R.label){case 0:return r=e.width,o=e.height,i=Math.max(r,o),a=i/r,c=i/o,s=t.shape[1],u=this.config.anchors.length,f=b.L((function(){var e=t.reshape([s,s,u,L.boxEncodingSize]);return[e.slice([0,0,0,0],[s,s,u,4]),e.slice([0,0,0,4],[s,s,u,1]),L.withClassScores?b.D(e.slice([0,0,0,5],[s,s,u,L.config.classes.length]),3):b.y(0)]})),h=f[0],p=f[1],l=f[2],d=[],[4,p.array()];case 1:return v=R.sent(),[4,h.array()];case 2:m=R.sent(),g=0,R.label=3;case 3:if(!(gn?(P=(w+N(m[g][w][_][0]))/s*a,O=(g+N(m[g][w][_][1]))/s*c,E=Math.exp(m[g][w][_][2])*this.config.anchors[_].x/s*a,j=Math.exp(m[g][w][_][3])*this.config.anchors[_].y/s*c,M=P-E/2,S=O-j/2,T={row:g,col:w,anchor:_},this.withClassScores?[4,this.extractPredictedClass(l,T)]:[3,7]):[3,9]):[3,10];case 6:return F=R.sent(),[3,8];case 7:F={classScore:1,label:0},R.label=8;case 8:D=(A=F).classScore,I=A.label,d.push(Object(y.a)({box:new C(M,S,M+E,S+j),score:x,classScore:x*D,label:I},T)),R.label=9;case 9:return _++,[3,5];case 10:return w++,[3,4];case 11:return g++,[3,3];case 12:return h.dispose(),p.dispose(),l.dispose(),[2,d]}}))}))},e.prototype.extractPredictedClass=function(t,e){return Object(y.b)(this,void 0,void 0,(function(){var n,r,o,i;return Object(y.d)(this,(function(a){switch(a.label){case 0:return n=e.row,r=e.col,o=e.anchor,[4,t.array()];case 1:return i=a.sent(),[2,Array(this.config.classes.length).fill(0).map((function(t,e){return i[n][r][o][e]})).map((function(t,e){return{classScore:t,label:e}})).reduce((function(t,e){return t.classScore>e.classScore?t:e}))]}}))}))},e.DEFAULT_FILTER_SIZES=[3,16,32,64,128,256,512,1024,1024],e}(Ot),Ue=function(t){function e(e){void 0===e&&(e=!0);var n=Object.assign({},{withSeparableConvs:e,iouThreshold:.4,classes:["face"]},e?{anchors:Ie,meanRgb:Ce}:{anchors:De,withClassScores:!0});return t.call(this,n)||this}return Object(y.c)(e,t),Object.defineProperty(e.prototype,"withSeparableConvs",{get:function(){return this.config.withSeparableConvs},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"anchors",{get:function(){return this.config.anchors},enumerable:!0,configurable:!0}),e.prototype.locateFaces=function(t,e){return Object(y.b)(this,void 0,void 0,(function(){return Object(y.d)(this,(function(n){switch(n.label){case 0:return[4,this.detect(t,e)];case 1:return[2,n.sent().map((function(t){return new L(t.score,t.relativeBox,{width:t.imageWidth,height:t.imageHeight})}))]}}))}))},e.prototype.getDefaultModelName=function(){return this.withSeparableConvs?"tiny_yolov2_separable_conv_model":"tiny_yolov2_model"},e.prototype.extractParamsFromWeigthMap=function(e){return t.prototype.extractParamsFromWeigthMap.call(this,e)},e}(We);var He=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._name="TinyFaceDetectorOptions",e}return Object(y.c)(e,t),e}(ze),Ye=function(){function t(){}return t.prototype.then=function(t){return Object(y.b)(this,void 0,void 0,(function(){var e;return Object(y.d)(this,(function(n){switch(n.label){case 0:return e=t,[4,this.run()];case 1:return[2,e.apply(void 0,[n.sent()])]}}))}))},t.prototype.run=function(){return Object(y.b)(this,void 0,void 0,(function(){return Object(y.d)(this,(function(t){throw new Error("ComposableTask - run is not implemented")}))}))},t}();function qe(t,e,n,r,o){return void 0===o&&(o=function(t){return t.alignedRect}),Object(y.b)(this,void 0,void 0,(function(){var i,a,c,s,u;return Object(y.d)(this,(function(f){switch(f.label){case 0:return i=t.map((function(t){return Jt(t)?o(t):t.detection})),(c=r)?[3,5]:e instanceof b.a?[4,yt(e,i)]:[3,2];case 1:return s=f.sent(),[3,4];case 2:return[4,gt(e,i)];case 3:s=f.sent(),f.label=4;case 4:c=s,f.label=5;case 5:return[4,n(a=c)];case 6:return u=f.sent(),a.forEach((function(t){return t instanceof b.a&&t.dispose()})),[2,u]}}))}))}function Ge(t,e,n,r,o){return Object(y.b)(this,void 0,void 0,(function(){var i=this;return Object(y.d)(this,(function(a){return[2,qe([t],e,(function(t){return Object(y.b)(i,void 0,void 0,(function(){return Object(y.d)(this,(function(e){return[2,n(t[0])]}))}))}),r,o)]}))}))}function Ve(t){var e=Rt(t),n=e.extractWeights,r=e.getRemainingWeights,o=[],i=function(t,e){var n=At(t,e),r=Dt(t,e);function o(n,r){var o=b.H(t(n));return e.push({paramPath:r}),o}function i(t,e,r){return void 0===r&&(r=!1),{conv1:n(t[0],t[1],3,e+"/conv1"),prelu1_alpha:o(t[1],e+"/prelu1_alpha"),conv2:n(t[1],t[2],3,e+"/conv2"),prelu2_alpha:o(t[2],e+"/prelu2_alpha"),conv3:n(t[2],t[3],r?2:3,e+"/conv3"),prelu3_alpha:o(t[3],e+"/prelu3_alpha")}}return{extractPNetParams:function(){var t=i([3,10,16,32],"pnet"),e=n(32,2,1,"pnet/conv4_1"),r=n(32,4,1,"pnet/conv4_2");return Object(y.a)(Object(y.a)({},t),{conv4_1:e,conv4_2:r})},extractRNetParams:function(){var t=i([3,28,48,64],"rnet",!0),e=r(576,128,"rnet/fc1"),n=o(128,"rnet/prelu4_alpha"),a=r(128,2,"rnet/fc2_1"),c=r(128,4,"rnet/fc2_2");return Object(y.a)(Object(y.a)({},t),{fc1:e,prelu4_alpha:n,fc2_1:a,fc2_2:c})},extractONetParams:function(){var t=i([3,32,64,64],"onet"),e=n(64,128,2,"onet/conv4"),a=o(128,"onet/prelu4_alpha"),c=r(1152,256,"onet/fc1"),s=o(256,"onet/prelu5_alpha"),u=r(256,2,"onet/fc2_1"),f=r(256,4,"onet/fc2_2"),h=r(256,10,"onet/fc2_3");return Object(y.a)(Object(y.a)({},t),{conv4:e,prelu4_alpha:a,fc1:c,prelu5_alpha:s,fc2_1:u,fc2_2:f,fc2_3:h})}}}(n,o),a=i.extractPNetParams,c=i.extractRNetParams,s=i.extractONetParams,u=a(),f=c(),h=s();if(0!==r().length)throw new Error("weights remaing after extract: "+r().length);return{params:{pnet:u,rnet:f,onet:h},paramMappings:o}}function Je(t){var e=[],n=function(t,e){var n=Lt(t,e);function r(t){return{filters:n(t+"/weights",4,t+"/filters"),bias:n(t+"/bias",1)}}function o(t){return{weights:n(t+"/weights",2),bias:n(t+"/bias",1)}}function i(t){return n(t,1)}function a(t){return{conv1:r(t+"/conv1"),prelu1_alpha:i(t+"/prelu1_alpha"),conv2:r(t+"/conv2"),prelu2_alpha:i(t+"/prelu2_alpha"),conv3:r(t+"/conv3"),prelu3_alpha:i(t+"/prelu3_alpha")}}return{extractPNetParams:function(){var t=a("pnet"),e=r("pnet/conv4_1"),n=r("pnet/conv4_2");return Object(y.a)(Object(y.a)({},t),{conv4_1:e,conv4_2:n})},extractRNetParams:function(){var t=a("rnet"),e=o("rnet/fc1"),n=i("rnet/prelu4_alpha"),r=o("rnet/fc2_1"),c=o("rnet/fc2_2");return Object(y.a)(Object(y.a)({},t),{fc1:e,prelu4_alpha:n,fc2_1:r,fc2_2:c})},extractONetParams:function(){var t=a("onet"),e=r("onet/conv4"),n=i("onet/prelu4_alpha"),c=o("onet/fc1"),s=i("onet/prelu5_alpha"),u=o("onet/fc2_1"),f=o("onet/fc2_2"),h=o("onet/fc2_3");return Object(y.a)(Object(y.a)({},t),{conv4:e,prelu4_alpha:n,fc1:c,prelu5_alpha:s,fc2_1:u,fc2_2:f,fc2_3:h})}}}(t,e),r=n.extractPNetParams,o=n.extractRNetParams,i=n.extractONetParams,a=r(),c=o(),s=i();return Tt(t,e),{params:{pnet:a,rnet:c,onet:s},paramMappings:e}}function Xe(t,e){var n=e[0],r=e[1];return{height:Math.floor(n*t),width:Math.floor(r*t)}}var Ke=function(t){function e(e,n,r,o){return t.call(this,{left:e,top:n,right:r,bottom:o},!0)||this}return Object(y.c)(e,t),e}(I);function Ze(t){return b.L((function(){return b.t(b.F(t,b.y(127.5)),b.y(.0078125))}))}function Qe(t,e){return b.L((function(){return b.c(b.w(t),b.t(e,b.u(b.w(b.u(t)))))}))}function $e(t,e,n){return void 0===n&&(n=!1),b.L((function(){var r=St(t,e.conv1,"valid");return r=Qe(r,e.prelu1_alpha),r=Qe(r=St(r=b.s(r,n?[2,2]:[3,3],[2,2],"same"),e.conv2,"valid"),e.prelu2_alpha),r=Qe(r=St(r=n?r:b.s(r,[3,3],[2,2],"valid"),e.conv3,"valid"),e.prelu3_alpha)}))}function tn(t,e,n,r,o){o.stage1=[];var i=e.map((function(e){return b.L((function(){var n={scale:e},o=function(t,e){return b.L((function(){var n=Xe(e,t.shape.slice(1)),r=n.height,o=n.width,i=Ze(b.o.resizeBilinear(t,[r,o]));return b.N(i,[0,2,1,3])}))}(t,e),i=Date.now(),a=function(t,e){return b.L((function(){var n=$e(t,e,!0),r=St(n,e.conv4_1,"valid"),o=b.m(b.r(r,3),3);return{prob:b.D(b.F(r,o),3),regions:St(n,e.conv4_2,"valid")}}))}(o,r),c=a.prob,s=a.regions;return n.pnet=Date.now()-i,{scoresTensor:b.O(b.O(c,3)[1])[0],regionsTensor:b.O(s)[0],scale:e,statsForScale:n}}))})).map((function(t){var e=t.scoresTensor,r=t.regionsTensor,i=t.scale,a=t.statsForScale,c=function(t,e,n,r){for(var o=[],i=t.arraySync(),a=0;a=r&&o.push(new D(c,a));return o.map((function(t){var r=new C(Math.round((2*t.y+1)/n),Math.round((2*t.x+1)/n),Math.round((2*t.y+12)/n),Math.round((2*t.x+12)/n)),o=i[t.y][t.x],a=e.arraySync();return{cell:r,score:o,region:new Ke(a[t.y][t.x][0],a[t.y][t.x][1],a[t.y][t.x][2],a[t.y][t.x][3])}}))}(e,r,i,n);if(e.dispose(),r.dispose(),!c.length)return o.stage1.push(a),[];var s=Date.now(),u=k(c.map((function(t){return t.cell})),c.map((function(t){return t.score})),.5);return a.nms=Date.now()-s,a.numBoxes=u.length,o.stage1.push(a),u.map((function(t){return c[t]}))})).reduce((function(t,e){return t.concat(e)}),[]),a=[],c=[];if(i.length>0){var s=Date.now(),u=k(i.map((function(t){return t.cell})),i.map((function(t){return t.score})),.7);o.stage1_nms=Date.now()-s,c=u.map((function(t){return i[t].score})),a=u.map((function(t){return i[t]})).map((function(t){var e=t.cell,n=t.region;return new C(e.left+n.left*e.width,e.top+n.top*e.height,e.right+n.right*e.width,e.bottom+n.bottom*e.height).toSquare().round()}))}return{boxes:a,scores:c}}function en(t,e,n){var r=n.width,o=n.height;return Object(y.b)(this,void 0,void 0,(function(){var n,i,a,c=this;return Object(y.d)(this,(function(s){switch(s.label){case 0:return n=at(t),[4,Promise.all(e.map((function(e){return Object(y.b)(c,void 0,void 0,(function(){var r,o,i,a,c,s,u,f;return Object(y.d)(this,(function(h){return r=e.padAtBorders(t.height,t.width),o=r.y,i=r.ey,a=r.x,c=r.ex,s=a-1,u=o-1,f=n.getImageData(s,u,c-s,i-u),[2,ot.isNodejs()?lt(f):createImageBitmap(f)]}))}))})))];case 1:return i=s.sent(),a=[],i.forEach((function(t){var e=at(pt({width:r,height:o}));e.drawImage(t,0,0,r,o);for(var n=e.getImageData(0,0,r,o).data,i=[],c=0;c1?b.h(c.map((function(t){return t.scores}))):c[0].scores,h=(f=Array).from,[4,s.data()];case 2:return u=h.apply(f,[y.sent()]),s.dispose(),p=u.map((function(t,e){return{score:t,idx:e}})).filter((function(t){return t.score>n})).map((function(t){return t.idx})),l=p.map((function(t){return e[t]})),d=p.map((function(t){return u[t]})),v=[],m=[],l.length>0&&(i=Date.now(),g=k(l,d,.7),o.stage2_nms=Date.now()-i,w=g.map((function(t){var e=c[p[t]].regions.arraySync();return new Ke(e[0][0],e[0][1],e[0][2],e[0][3])})),m=g.map((function(t){return d[t]})),v=g.map((function(t,e){return l[t].calibrate(w[e])}))),c.forEach((function(t){t.regions.dispose(),t.scores.dispose()})),[2,{boxes:v,scores:m}]}}))}))}function rn(t,e,n,r,o){return Object(y.b)(this,void 0,void 0,(function(){var i,a,c,s,u,f,h,p,l,d,v,m,g,w,_;return Object(y.d)(this,(function(y){switch(y.label){case 0:return i=Date.now(),[4,en(t,e,{width:48,height:48})];case 1:return a=y.sent(),o.stage3_extractImagePatches=Date.now()-i,i=Date.now(),c=a.map((function(t){var e=function(t,e){return b.L((function(){var n=$e(t,e);n=Qe(n=St(n=b.s(n,[2,2],[2,2],"same"),e.conv4,"valid"),e.prelu4_alpha);var r=Qe(Wt(b.x(n,[n.shape[0],e.fc1.weights.shape[0]]),e.fc1),e.prelu5_alpha),o=Wt(r,e.fc2_1),i=b.m(b.r(o,1),1),a=b.D(b.F(o,i),1),c=Wt(r,e.fc2_2),s=Wt(r,e.fc2_3);return{scores:b.O(a,1)[1],regions:c,points:s}}))}(t,r);return t.dispose(),e})),o.stage3_onet=Date.now()-i,s=c.length>1?b.h(c.map((function(t){return t.scores}))):c[0].scores,h=(f=Array).from,[4,s.data()];case 2:return u=h.apply(f,[y.sent()]),s.dispose(),p=u.map((function(t,e){return{score:t,idx:e}})).filter((function(t){return t.score>n})).map((function(t){return t.idx})),l=p.map((function(t){var e=c[t].regions.arraySync();return new Ke(e[0][0],e[0][1],e[0][2],e[0][3])})),d=p.map((function(t,n){return e[t].calibrate(l[n])})),v=p.map((function(t){return u[t]})),m=[],g=[],w=[],d.length>0&&(i=Date.now(),_=k(d,v,.7,!1),o.stage3_nms=Date.now()-i,m=_.map((function(t){return d[t]})),g=_.map((function(t){return v[t]})),w=_.map((function(t,e){return Array(5).fill(0).map((function(n,r){var o=c[t].points.arraySync();return new D(o[0][r]*(m[e].width+1)+m[e].left,o[0][r+5]*(m[e].height+1)+m[e].top)}))}))),c.forEach((function(t){t.regions.dispose(),t.scores.dispose(),t.points.dispose()})),[2,{boxes:m,scores:g,points:w}]}}))}))}var on=function(t){function e(){return t.call(this,"Mtcnn")||this}return Object(y.c)(e,t),e.prototype.load=function(e){return Object(y.b)(this,void 0,void 0,(function(){return Object(y.d)(this,(function(n){return console.warn("mtcnn is deprecated and will be removed soon"),[2,t.prototype.load.call(this,e)]}))}))},e.prototype.loadFromDisk=function(e){return Object(y.b)(this,void 0,void 0,(function(){return Object(y.d)(this,(function(n){return console.warn("mtcnn is deprecated and will be removed soon"),[2,t.prototype.loadFromDisk.call(this,e)]}))}))},e.prototype.forwardInput=function(t,e){return void 0===e&&(e={}),Object(y.b)(this,void 0,void 0,(function(){var n,r,o,i,a,c,s,u,f,h,p,l,d,v,m,g,w,_,x,P,O;return Object(y.d)(this,(function(y){switch(y.label){case 0:if(!(n=this.params))throw new Error("Mtcnn - load model before inference");if(!(r=t.canvases[0]))throw new Error("Mtcnn - inputCanvas is not defined, note that passing tensors into Mtcnn.forwardInput is not supported yet.");return o={},i=Date.now(),a=b.L((function(){return t=b.m(b.f.fromPixels(r)).toFloat(),b.L((function(){return b.E(b.O(t,3).reverse(),3)}));var t})),c=function(t){return a.dispose(),o.total=Date.now()-i,t},s=a.shape.slice(1),u=s[0],f=s[1],h=new we(e),p=h.minFaceSize,l=h.scaleFactor,d=h.maxNumScales,v=h.scoreThresholds,m=h.scaleSteps,g=(m||function(t,e,n){for(var r=n[0],o=n[1],i=12/t,a=[],c=Math.min(r,o)*i,s=0;c>=12;)a.push(i*Math.pow(e,s)),c*=e,s+=1;return a}(p,l,[u,f])).filter((function(t){var e=Xe(t,[u,f]);return Math.min(e.width,e.height)>12})).slice(0,d),o.scales=g,o.pyramid=g.map((function(t){return Xe(t,[u,f])})),w=Date.now(),[4,tn(a,g,v[0],n.pnet,o)];case 1:return _=y.sent(),o.total_stage1=Date.now()-w,_.boxes.length?(o.stage2_numInputBoxes=_.boxes.length,w=Date.now(),[4,nn(r,_.boxes,v[1],n.rnet,o)]):[2,c({results:[],stats:o})];case 2:return x=y.sent(),o.total_stage2=Date.now()-w,x.boxes.length?(o.stage3_numInputBoxes=x.boxes.length,w=Date.now(),[4,rn(r,x.boxes,v[2],n.onet,o)]):[2,c({results:[],stats:o})];case 3:return P=y.sent(),o.total_stage3=Date.now()-w,O=P.boxes.map((function(t,e){return Xt(J({},new L(P.scores[e],new z(t.left/f,t.top/u,t.width/f,t.height/u),{height:u,width:f})),new U(P.points[e].map((function(e){return e.sub(new D(t.left,t.top)).div(new D(t.width,t.height))})),{width:t.width,height:t.height}))})),[2,c({results:O,stats:o})]}}))}))},e.prototype.forward=function(t,e){return void 0===e&&(e={}),Object(y.b)(this,void 0,void 0,(function(){var n;return Object(y.d)(this,(function(r){switch(r.label){case 0:return n=this.forwardInput,[4,bt(t)];case 1:return[4,n.apply(this,[r.sent(),e])];case 2:return[2,r.sent().results]}}))}))},e.prototype.forwardWithStats=function(t,e){return void 0===e&&(e={}),Object(y.b)(this,void 0,void 0,(function(){var n;return Object(y.d)(this,(function(r){switch(r.label){case 0:return n=this.forwardInput,[4,bt(t)];case 1:return[2,n.apply(this,[r.sent(),e])]}}))}))},e.prototype.getDefaultModelName=function(){return"mtcnn_model"},e.prototype.extractParamsFromWeigthMap=function(t){return Je(t)},e.prototype.extractParams=function(t){return Ve(t)},e}(Ot),an=[new D(1.603231,2.094468),new D(6.041143,7.080126),new D(2.882459,3.518061),new D(4.266906,5.178857),new D(9.041765,10.66308)],cn=[117.001,114.697,97.404],sn=function(t){function e(){var e={withSeparableConvs:!0,iouThreshold:.4,classes:["face"],anchors:an,meanRgb:cn,isFirstLayerConv2d:!0,filterSizes:[3,16,32,64,128,256,512]};return t.call(this,e)||this}return Object(y.c)(e,t),Object.defineProperty(e.prototype,"anchors",{get:function(){return this.config.anchors},enumerable:!0,configurable:!0}),e.prototype.locateFaces=function(t,e){return Object(y.b)(this,void 0,void 0,(function(){return Object(y.d)(this,(function(n){switch(n.label){case 0:return[4,this.detect(t,e)];case 1:return[2,n.sent().map((function(t){return new L(t.score,t.relativeBox,{width:t.imageWidth,height:t.imageHeight})}))]}}))}))},e.prototype.getDefaultModelName=function(){return"tiny_face_detector_model"},e.prototype.extractParamsFromWeigthMap=function(e){return t.prototype.extractParamsFromWeigthMap.call(this,e)},e}(We),un={ssdMobilenetv1:new Te,tinyFaceDetector:new sn,tinyYolov2:new Ue,mtcnn:new on,faceLandmark68Net:new ie,faceLandmark68TinyNet:new ce,faceRecognitionNet:new me,faceExpressionNet:new Gt,ageGenderNet:new re},fn=function(t){return un.ssdMobilenetv1.load(t)},hn=function(t){return un.faceLandmark68Net.load(t)},pn=function(t){return un.faceRecognitionNet.load(t)},ln=function(t){return un.faceExpressionNet.load(t)},dn=function(t){function e(e,n,r){var o=t.call(this)||this;return o.parentTask=e,o.input=n,o.extractedFaces=r,o}return Object(y.c)(e,t),e}(Ye),vn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(y.c)(e,t),e.prototype.run=function(){return Object(y.b)(this,void 0,void 0,(function(){var t,e,n=this;return Object(y.d)(this,(function(r){switch(r.label){case 0:return[4,this.parentTask];case 1:return[4,qe(t=r.sent(),this.input,(function(t){return Object(y.b)(n,void 0,void 0,(function(){return Object(y.d)(this,(function(e){switch(e.label){case 0:return[4,Promise.all(t.map((function(t){return un.faceExpressionNet.predictExpressions(t)})))];case 1:return[2,e.sent()]}}))}))}),this.extractedFaces)];case 2:return e=r.sent(),[2,t.map((function(t,n){return Vt(t,e[n])}))]}}))}))},e.prototype.withAgeAndGender=function(){return new wn(this,this.input)},e}(dn),mn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(y.c)(e,t),e.prototype.run=function(){return Object(y.b)(this,void 0,void 0,(function(){var t,e;return Object(y.d)(this,(function(n){switch(n.label){case 0:return[4,this.parentTask];case 1:return(t=n.sent())?[4,Ge(t,this.input,(function(t){return un.faceExpressionNet.predictExpressions(t)}),this.extractedFaces)]:[2];case 2:return e=n.sent(),[2,Vt(t,e)]}}))}))},e.prototype.withAgeAndGender=function(){return new _n(this,this.input)},e}(dn),bn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(y.c)(e,t),e.prototype.withAgeAndGender=function(){return new xn(this,this.input)},e.prototype.withFaceDescriptors=function(){return new En(this,this.input)},e}(vn),gn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(y.c)(e,t),e.prototype.withAgeAndGender=function(){return new Pn(this,this.input)},e.prototype.withFaceDescriptor=function(){return new jn(this,this.input)},e}(mn),yn=function(t){function e(e,n,r){var o=t.call(this)||this;return o.parentTask=e,o.input=n,o.extractedFaces=r,o}return Object(y.c)(e,t),e}(Ye),wn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(y.c)(e,t),e.prototype.run=function(){return Object(y.b)(this,void 0,void 0,(function(){var t,e,n=this;return Object(y.d)(this,(function(r){switch(r.label){case 0:return[4,this.parentTask];case 1:return[4,qe(t=r.sent(),this.input,(function(t){return Object(y.b)(n,void 0,void 0,(function(){return Object(y.d)(this,(function(e){switch(e.label){case 0:return[4,Promise.all(t.map((function(t){return un.ageGenderNet.predictAgeAndGender(t)})))];case 1:return[2,e.sent()]}}))}))}),this.extractedFaces)];case 2:return e=r.sent(),[2,t.map((function(t,n){var r=e[n],o=r.age;return ge(ye(t,r.gender,r.genderProbability),o)}))]}}))}))},e.prototype.withFaceExpressions=function(){return new vn(this,this.input)},e}(yn),_n=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(y.c)(e,t),e.prototype.run=function(){return Object(y.b)(this,void 0,void 0,(function(){var t,e,n,r,o;return Object(y.d)(this,(function(i){switch(i.label){case 0:return[4,this.parentTask];case 1:return(t=i.sent())?[4,Ge(t,this.input,(function(t){return un.ageGenderNet.predictAgeAndGender(t)}),this.extractedFaces)]:[2];case 2:return e=i.sent(),n=e.age,r=e.gender,o=e.genderProbability,[2,ge(ye(t,r,o),n)]}}))}))},e.prototype.withFaceExpressions=function(){return new mn(this,this.input)},e}(yn),xn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(y.c)(e,t),e.prototype.withFaceExpressions=function(){return new bn(this,this.input)},e.prototype.withFaceDescriptors=function(){return new En(this,this.input)},e}(wn),Pn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(y.c)(e,t),e.prototype.withFaceExpressions=function(){return new gn(this,this.input)},e.prototype.withFaceDescriptor=function(){return new jn(this,this.input)},e}(_n),On=function(t){function e(e,n){var r=t.call(this)||this;return r.parentTask=e,r.input=n,r}return Object(y.c)(e,t),e}(Ye),En=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(y.c)(e,t),e.prototype.run=function(){return Object(y.b)(this,void 0,void 0,(function(){var t;return Object(y.d)(this,(function(e){switch(e.label){case 0:return[4,this.parentTask];case 1:return[4,qe(t=e.sent(),this.input,(function(t){return Promise.all(t.map((function(t){return un.faceRecognitionNet.computeFaceDescriptor(t)})))}),null,(function(t){return t.landmarks.align(null,{useDlibAlignment:!0})}))];case 2:return[2,e.sent().map((function(e,n){return be(t[n],e)}))]}}))}))},e.prototype.withFaceExpressions=function(){return new bn(this,this.input)},e.prototype.withAgeAndGender=function(){return new xn(this,this.input)},e}(On),jn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(y.c)(e,t),e.prototype.run=function(){return Object(y.b)(this,void 0,void 0,(function(){var t,e;return Object(y.d)(this,(function(n){switch(n.label){case 0:return[4,this.parentTask];case 1:return(t=n.sent())?[4,Ge(t,this.input,(function(t){return un.faceRecognitionNet.computeFaceDescriptor(t)}),null,(function(t){return t.landmarks.align(null,{useDlibAlignment:!0})}))]:[2];case 2:return e=n.sent(),[2,be(t,e)]}}))}))},e.prototype.withFaceExpressions=function(){return new gn(this,this.input)},e.prototype.withAgeAndGender=function(){return new Pn(this,this.input)},e}(On),Mn=function(t){function e(e,n,r){var o=t.call(this)||this;return o.parentTask=e,o.input=n,o.useTinyLandmarkNet=r,o}return Object(y.c)(e,t),Object.defineProperty(e.prototype,"landmarkNet",{get:function(){return this.useTinyLandmarkNet?un.faceLandmark68TinyNet:un.faceLandmark68Net},enumerable:!0,configurable:!0}),e}(Ye),Sn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(y.c)(e,t),e.prototype.run=function(){return Object(y.b)(this,void 0,void 0,(function(){var t,e,n,r,o,i=this;return Object(y.d)(this,(function(a){switch(a.label){case 0:return[4,this.parentTask];case 1:return t=a.sent(),e=t.map((function(t){return t.detection})),this.input instanceof b.a?[4,yt(this.input,e)]:[3,3];case 2:return r=a.sent(),[3,5];case 3:return[4,gt(this.input,e)];case 4:r=a.sent(),a.label=5;case 5:return n=r,[4,Promise.all(n.map((function(t){return i.landmarkNet.detectLandmarks(t)})))];case 6:return o=a.sent(),n.forEach((function(t){return t instanceof b.a&&t.dispose()})),[2,t.map((function(t,e){return Xt(t,o[e])}))]}}))}))},e.prototype.withFaceExpressions=function(){return new bn(this,this.input)},e.prototype.withAgeAndGender=function(){return new xn(this,this.input)},e.prototype.withFaceDescriptors=function(){return new En(this,this.input)},e}(Mn),Tn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(y.c)(e,t),e.prototype.run=function(){return Object(y.b)(this,void 0,void 0,(function(){var t,e,n,r,o;return Object(y.d)(this,(function(i){switch(i.label){case 0:return[4,this.parentTask];case 1:return(t=i.sent())?(e=t.detection,this.input instanceof b.a?[4,yt(this.input,[e])]:[3,3]):[2];case 2:return r=i.sent(),[3,5];case 3:return[4,gt(this.input,[e])];case 4:r=i.sent(),i.label=5;case 5:return n=r,[4,this.landmarkNet.detectLandmarks(n[0])];case 6:return o=i.sent(),n.forEach((function(t){return t instanceof b.a&&t.dispose()})),[2,Xt(t,o)]}}))}))},e.prototype.withFaceExpressions=function(){return new gn(this,this.input)},e.prototype.withAgeAndGender=function(){return new Pn(this,this.input)},e.prototype.withFaceDescriptor=function(){return new jn(this,this.input)},e}(Mn),An=function(t){function e(e,n){void 0===n&&(n=new Se);var r=t.call(this)||this;return r.input=e,r.options=n,r}return Object(y.c)(e,t),e}(Ye),Dn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(y.c)(e,t),e.prototype.run=function(){return Object(y.b)(this,void 0,void 0,(function(){var t,e,n,r;return Object(y.d)(this,(function(o){switch(o.label){case 0:return e=(t=this).input,(n=t.options)instanceof we?[4,un.mtcnn.forward(e,n)]:[3,2];case 1:return[2,o.sent().map((function(t){return t.detection}))];case 2:if(!(r=n instanceof He?function(t){return un.tinyFaceDetector.locateFaces(t,n)}:n instanceof Se?function(t){return un.ssdMobilenetv1.locateFaces(t,n)}:n instanceof ze?function(t){return un.tinyYolov2.locateFaces(t,n)}:null))throw new Error("detectFaces - expected options to be instance of TinyFaceDetectorOptions | SsdMobilenetv1Options | MtcnnOptions | TinyYolov2Options");return[2,r(e)]}}))}))},e.prototype.runAndExtendWithFaceDetections=function(){var t=this;return new Promise((function(e){return Object(y.b)(t,void 0,void 0,(function(){var t;return Object(y.d)(this,(function(n){switch(n.label){case 0:return[4,this.run()];case 1:return t=n.sent(),[2,e(t.map((function(t){return J({},t)})))]}}))}))}))},e.prototype.withFaceLandmarks=function(t){return void 0===t&&(t=!1),new Sn(this.runAndExtendWithFaceDetections(),this.input,t)},e.prototype.withFaceExpressions=function(){return new vn(this.runAndExtendWithFaceDetections(),this.input)},e.prototype.withAgeAndGender=function(){return new wn(this.runAndExtendWithFaceDetections(),this.input)},e}(An);!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(y.c)(e,t),e.prototype.run=function(){return Object(y.b)(this,void 0,void 0,(function(){var t,e;return Object(y.d)(this,(function(n){switch(n.label){case 0:return[4,new Dn(this.input,this.options)];case 1:return t=n.sent(),e=t[0],t.forEach((function(t){t.score>e.score&&(e=t)})),[2,e]}}))}))},e.prototype.runAndExtendWithFaceDetection=function(){var t=this;return new Promise((function(e){return Object(y.b)(t,void 0,void 0,(function(){var t;return Object(y.d)(this,(function(n){switch(n.label){case 0:return[4,this.run()];case 1:return t=n.sent(),[2,e(t?J({},t):void 0)]}}))}))}))},e.prototype.withFaceLandmarks=function(t){return void 0===t&&(t=!1),new Tn(this.runAndExtendWithFaceDetection(),this.input,t)},e.prototype.withFaceExpressions=function(){return new mn(this.runAndExtendWithFaceDetection(),this.input)},e.prototype.withAgeAndGender=function(){return new _n(this.runAndExtendWithFaceDetection(),this.input)}}(An);function In(t,e){return void 0===e&&(e=new Se),new Dn(t,e)}!function(){function t(t,e){void 0===e&&(e=.6),this._distanceThreshold=e;var n=Array.isArray(t)?t:[t];if(!n.length)throw new Error("FaceRecognizer.constructor - expected atleast one input");var r=1,o=function(){return"person "+r++};this._labeledDescriptors=n.map((function(t){if(t instanceof G)return t;if(t instanceof Float32Array)return new G(o(),[t]);if(t.descriptor&&t.descriptor instanceof Float32Array)return new G(o(),[t.descriptor]);throw new Error("FaceRecognizer.constructor - expected inputs to be of type LabeledFaceDescriptors | WithFaceDescriptor | Float32Array | Array | Float32Array>")}))}Object.defineProperty(t.prototype,"labeledDescriptors",{get:function(){return this._labeledDescriptors},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"distanceThreshold",{get:function(){return this._distanceThreshold},enumerable:!0,configurable:!0}),t.prototype.computeMeanDistance=function(t,e){return e.map((function(e){return function(t,e){if(t.length!==e.length)throw new Error("euclideanDistance: arr1.length !== arr2.length");var n=Array.from(t),r=Array.from(e);return Math.sqrt(n.map((function(t,e){return t-r[e]})).reduce((function(t,e){return t+Math.pow(e,2)}),0))}(e,t)})).reduce((function(t,e){return t+e}),0)/(e.length||1)},t.prototype.matchDescriptor=function(t){var e=this;return this.labeledDescriptors.map((function(n){var r=n.descriptors,o=n.label;return new Y(o,e.computeMeanDistance(t,r))})).reduce((function(t,e){return t.distance.9&&t.expressions.happy<=1?n.style.display="none":n.style.display="block"})),clearInterval(i),a();case 6:case"end":return t.stop()}}),t)}))),200)},e=document.getElementById("inputVideo"),(n=document.getElementById("overlay")).width=e.offsetWidth,n.height=e.offsetHeight,r=new He,n.style.borderStyle="dotted",a();case 8:case"end":return t.stop()}}),t)})))).apply(this,arguments)}return Promise.all([(t=e,un.tinyFaceDetector.load(t)),hn(e),ln(e),pn(e),fn(e)]).then(function(){return n.apply(this,arguments)}()).catch((function(t){return console.error(t)})),Object(i.jsxs)(d,{children:[Object(i.jsx)(u.a,{children:Object(i.jsx)("title",{children:"Smile"})}),Object(i.jsxs)("section",{className:m.a.headingMd,children:[Object(i.jsx)("h1",{children:"Smile"}),Object(i.jsx)("video",{id:"inputVideo",autoPlay:!0,muted:!0,children:" "}),Object(i.jsx)("canvas",{className:m.a.canvas,id:"overlay"})]})]})}},Ruhs:function(t,e,n){t.exports=n("XlSv")},Tred:function(t,e,n){t.exports={container:"layout_container__2t4v2",header:"layout_header__2rhWq",backTohome:"layout_backTohome__10oyl"}},XlSv:function(t,e,n){"use strict";n("lSNA");e.__esModule=!0,e.defaultHead=f,e.default=void 0;var r,o=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==typeof t&&"function"!==typeof t)return{default:t};var e=u();if(e&&e.has(t))return e.get(t);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o)){var i=r?Object.getOwnPropertyDescriptor(t,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=t[o]}n.default=t,e&&e.set(t,n);return n}(n("BqPY")),i=(r=n("t6Az"))&&r.__esModule?r:{default:r},a=n("x+CX"),c=n("kqoU"),s=n("cJU3");function u(){if("function"!==typeof WeakMap)return null;var t=new WeakMap;return u=function(){return t},t}function f(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=[o.default.createElement("meta",{charSet:"utf-8"})];return t||e.push(o.default.createElement("meta",{name:"viewport",content:"width=device-width"})),e}function h(t,e){return"string"===typeof e||"number"===typeof e?t:e.type===o.default.Fragment?t.concat(o.default.Children.toArray(e.props.children).reduce((function(t,e){return"string"===typeof e||"number"===typeof e?t:t.concat(e)}),[])):t.concat(e)}var p=["name","httpEquiv","charSet","itemProp"];function l(t,e){return t.reduce((function(t,e){var n=o.default.Children.toArray(e.props.children);return t.concat(n)}),[]).reduce(h,[]).reverse().concat(f(e.inAmpMode)).filter(function(){var t=new Set,e=new Set,n=new Set,r={};return function(o){var i=!0,a=!1;if(o.key&&"number"!==typeof o.key&&o.key.indexOf("$")>0){a=!0;var c=o.key.slice(o.key.indexOf("$")+1);t.has(c)?i=!1:t.add(c)}switch(o.type){case"title":case"base":e.has(o.type)?i=!1:e.add(o.type);break;case"meta":for(var s=0,u=p.length;s1)for(var n=1;n0&&void 0!==arguments[0]?arguments[0]:{},e=t.ampFirst,n=void 0!==e&&e,r=t.hybrid,o=void 0!==r&&r,i=t.hasQuery,a=void 0!==i&&i;return n||o&&a}},dW39:function(t,e,n){"use strict";var r=n("J4zp"),o=n("RIqP"),i=n("FzWm");e.__esModule=!0,e.default=function(t){var e=t.src,n=t.sizes,i=t.unoptimized,c=void 0!==i&&i,h=t.priority,l=void 0!==h&&h,d=t.loading,m=t.className,b=t.quality,g=t.width,x=t.height,P=t.objectFit,O=t.objectPosition,E=t.loader,j=void 0===E?_:E,M=(0,a.default)(t,["src","sizes","unoptimized","priority","loading","className","quality","width","height","objectFit","objectPosition","loader"]),S=n?"responsive":"intrinsic",T=!1;"unsized"in M?(T=Boolean(M.unsized),delete M.unsized):"layout"in M&&(M.layout&&(S=M.layout),delete M.layout);0;var A=!l&&("lazy"===d||"undefined"===typeof d);e&&e.startsWith("data:")&&(c=!0,A=!1);var D,I,C,F=(0,p.useIntersection)({rootMargin:"200px",disabled:!A}),L=r(F,2),R=L[0],k=L[1],B=!A||k,N=w(g),z=w(x),W=w(b),U={visibility:B?"inherit":"hidden",position:"absolute",top:0,left:0,bottom:0,right:0,boxSizing:"border-box",padding:0,border:"none",margin:"auto",display:"block",width:0,height:0,minWidth:"100%",maxWidth:"100%",minHeight:"100%",maxHeight:"100%",objectFit:P,objectPosition:O};if("undefined"!==typeof N&&"undefined"!==typeof z&&"fill"!==S){var H=z/N,Y=isNaN(H)?"100%":"".concat(100*H,"%");"responsive"===S?(D={display:"block",overflow:"hidden",position:"relative",boxSizing:"border-box",margin:0},I={display:"block",boxSizing:"border-box",paddingTop:Y}):"intrinsic"===S?(D={display:"inline-block",maxWidth:"100%",overflow:"hidden",position:"relative",boxSizing:"border-box",margin:0},I={boxSizing:"border-box",display:"block",maxWidth:"100%"},C='')):"fixed"===S&&(D={overflow:"hidden",boxSizing:"border-box",display:"inline-block",position:"relative",width:N,height:z})}else"undefined"===typeof N&&"undefined"===typeof z&&"fill"===S&&(D={display:"block",overflow:"hidden",position:"absolute",top:0,left:0,bottom:0,right:0,boxSizing:"border-box",margin:0});var q={src:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",srcSet:void 0,sizes:void 0};B&&(q=function(t){var e=t.src,n=t.unoptimized,r=t.layout,i=t.width,a=t.quality,c=t.sizes,s=t.loader;if(n)return{src:e,srcSet:void 0,sizes:void 0};var u=function(t,e,n){if(n&&("fill"===e||"responsive"===e)){var r=o(n.matchAll(/(^|\s)(1?\d?\d)vw/g)).map((function(t){return parseInt(t[2])}));if(r.length){var i=.01*Math.min.apply(Math,o(r));return{widths:y.filter((function(t){return t>=v[0]*i})),kind:"w"}}return{widths:y,kind:"w"}}if("number"!==typeof t||"fill"===e||"responsive"===e)return{widths:v,kind:"w"};return{widths:o(new Set([t,2*t].map((function(t){return y.find((function(e){return e>=t}))||y[y.length-1]})))),kind:"x"}}(i,r,c),f=u.widths,h=u.kind,p=f.length-1;return{sizes:c||"w"!==h?c:"100vw",srcSet:f.map((function(t,n){return"".concat(s({src:e,quality:a,width:t})," ").concat("w"===h?t:n+1).concat(h)})).join(", "),src:s({src:e,quality:a,width:f[p]})}}({src:e,unoptimized:c,layout:S,width:N,quality:W,sizes:n,loader:j}));T&&(D=void 0,I=void 0,U=void 0);return s.default.createElement("div",{style:D},I?s.default.createElement("div",{style:I},C?s.default.createElement("img",{style:{maxWidth:"100%",display:"block",margin:0,border:"none",padding:0},alt:"","aria-hidden":!0,role:"presentation",src:"data:image/svg+xml;base64,".concat((0,f.toBase64)(C))}):null):null,s.default.createElement("img",Object.assign({},M,q,{decoding:"async",className:m,ref:R,style:U})),l?s.default.createElement(u.default,null,s.default.createElement("link",{key:"__nimg-"+q.src+q.srcSet+q.sizes,rel:"preload",as:"image",href:q.srcSet?void 0:q.src,imagesrcset:q.srcSet,imagesizes:q.sizes})):null)};var a=i(n("wSA3")),c=i(n("nfTt")),s=i(n("BqPY")),u=i(n("XlSv")),f=n("a8Ze"),h=n("D0IF"),p=n("9DAu");var l=new Map([["imgix",function(t){var e=t.root,n=t.src,r=t.width,o=t.quality,i=["auto=format","fit=max","w="+r],a="";o&&i.push("q="+o);i.length&&(a="?"+i.join("&"));return"".concat(e).concat(x(n)).concat(a)}],["cloudinary",function(t){var e=t.root,n=t.src,r=t.width,o=t.quality,i=["f_auto","c_limit","w_"+r,"q_"+(o||"auto")].join(",")+"/";return"".concat(e).concat(i).concat(x(n))}],["akamai",function(t){var e=t.root,n=t.src,r=t.width;return"".concat(e).concat(x(n),"?imwidth=").concat(r)}],["default",function(t){var e=t.root,n=t.src,r=t.width,o=t.quality;0;return"".concat(e,"?url=").concat(encodeURIComponent(n),"&w=").concat(r,"&q=").concat(o||75)}]]),d={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"https://cdn.statically.io/gh/HiltonWS/hiltonws.github.io/master/smile/image",loader:"default"}||h.imageConfigDefault,v=d.deviceSizes,m=d.imageSizes,b=d.loader,g=d.path,y=(d.domains,[].concat(o(v),o(m)));function w(t){return"number"===typeof t?t:"string"===typeof t?parseInt(t,10):void 0}function _(t){var e=l.get(b);if(e)return e((0,c.default)({root:g},t));throw new Error('Unknown "loader" found in "next.config.js". Expected: '.concat(h.VALID_LOADERS.join(", "),". Received: ").concat(b))}function x(t){return"/"===t[0]?t.slice(1):t}v.sort((function(t,e){return t-e})),y.sort((function(t,e){return t-e}))},djdT:function(t,e,n){t.exports=n("dW39")},fssf:function(t,e,n){"use strict";e.byteLength=function(t){var e=u(t),n=e[0],r=e[1];return 3*(n+r)/4-r},e.toByteArray=function(t){var e,n,r=u(t),a=r[0],c=r[1],s=new i(function(t,e,n){return 3*(e+n)/4-n}(0,a,c)),f=0,h=c>0?a-4:a;for(n=0;n>16&255,s[f++]=e>>8&255,s[f++]=255&e;2===c&&(e=o[t.charCodeAt(n)]<<2|o[t.charCodeAt(n+1)]>>4,s[f++]=255&e);1===c&&(e=o[t.charCodeAt(n)]<<10|o[t.charCodeAt(n+1)]<<4|o[t.charCodeAt(n+2)]>>2,s[f++]=e>>8&255,s[f++]=255&e);return s},e.fromByteArray=function(t){for(var e,n=t.length,o=n%3,i=[],a=16383,c=0,s=n-o;cs?s:c+a));1===o?(e=t[n-1],i.push(r[e>>2]+r[e<<4&63]+"==")):2===o&&(e=(t[n-2]<<8)+t[n-1],i.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"="));return i.join("")};for(var r=[],o=[],i="undefined"!==typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=0,s=a.length;c0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function f(t,e,n){for(var o,i,a=[],c=e;c>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return a.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},"jsv+":function(t,e){e.read=function(t,e,n,r,o){var i,a,c=8*o-r-1,s=(1<>1,f=-7,h=n?o-1:0,p=n?-1:1,l=t[e+h];for(h+=p,i=l&(1<<-f)-1,l>>=-f,f+=c;f>0;i=256*i+t[e+h],h+=p,f-=8);for(a=i&(1<<-f)-1,i>>=-f,f+=r;f>0;a=256*a+t[e+h],h+=p,f-=8);if(0===i)i=1-u;else{if(i===s)return a?NaN:1/0*(l?-1:1);a+=Math.pow(2,r),i-=u}return(l?-1:1)*a*Math.pow(2,i-r)},e.write=function(t,e,n,r,o,i){var a,c,s,u=8*i-o-1,f=(1<>1,p=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,l=r?0:i-1,d=r?1:-1,v=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(c=isNaN(e)?1:0,a=f):(a=Math.floor(Math.log(e)/Math.LN2),e*(s=Math.pow(2,-a))<1&&(a--,s*=2),(e+=a+h>=1?p/s:p*Math.pow(2,1-h))*s>=2&&(a++,s/=2),a+h>=f?(c=0,a=f):a+h>=1?(c=(e*s-1)*Math.pow(2,o),a+=h):(c=e*Math.pow(2,h-1)*Math.pow(2,o),a=0));o>=8;t[n+l]=255&c,l+=d,c/=256,o-=8);for(a=a<0;t[n+l]=255&a,l+=d,a/=256,u-=8);t[n+l-d]|=128*v}},jzzT:function(t,e){(function(e){t.exports=function(){var t={149:function(t){var e;e=function(){return this}();try{e=e||new Function("return this")()}catch(n){"object"===typeof window&&(e=window)}t.exports=e}},n={};function r(e){if(n[e])return n[e].exports;var o=n[e]={exports:{}},i=!0;try{t[e](o,o.exports,r),i=!1}finally{i&&delete n[e]}return o.exports}return r.ab=e+"/",r(149)}()}).call(this,"/")},lFXY:function(t,e,n){t.exports=n("0W9y")},lSNA:function(t,e){t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}},mrSG:function(t,e,n){"use strict";n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return a})),n.d(e,"d",(function(){return c})),n.d(e,"e",(function(){return s}));var r=function(t,e){return(r=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 o(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var i=function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=0||(o[n]=t[n]);return o}},"x+CX":function(t,e,n){"use strict";var r;e.__esModule=!0,e.AmpStateContext=void 0;var o=((r=n("BqPY"))&&r.__esModule?r:{default:r}).default.createContext({});e.AmpStateContext=o}},[["N6lM",0,2,3,1]]]); \ No newline at end of file +_N_E=(window.webpackJsonp_N_E=window.webpackJsonp_N_E||[]).push([[7],{"0W9y":function(t,e,n){"use strict";var r=n("J4zp"),o=n("TTt4");e.__esModule=!0,e.default=void 0;var i=o(n("BqPY")),a=n("TTnN"),c=n("a7Zl"),s=n("9DAu"),u={};function f(t,e,n,r){if(t&&(0,a.isLocalURL)(e)){t.prefetch(e,n,r).catch((function(t){0}));var o=r&&"undefined"!==typeof r.locale?r.locale:t&&t.locale;u[e+"%"+n+(o?"%"+o:"")]=!0}}var h=function(t){var e=!1!==t.prefetch,n=(0,c.useRouter)(),o=n&&n.pathname||"/",h=i.default.useMemo((function(){var e=(0,a.resolveHref)(o,t.href,!0),n=r(e,2),i=n[0],c=n[1];return{href:i,as:t.as?(0,a.resolveHref)(o,t.as):c||i}}),[o,t.href,t.as]),p=h.href,l=h.as,d=t.children,v=t.replace,m=t.shallow,b=t.scroll,g=t.locale;"string"===typeof d&&(d=i.default.createElement("a",null,d));var y=i.Children.only(d),w=y&&"object"===typeof y&&y.ref,_=(0,s.useIntersection)({rootMargin:"200px"}),x=r(_,2),P=x[0],O=x[1],E=i.default.useCallback((function(t){P(t),w&&("function"===typeof w?w(t):"object"===typeof w&&(w.current=t))}),[w,P]);(0,i.useEffect)((function(){var t=O&&e&&(0,a.isLocalURL)(p),r="undefined"!==typeof g?g:n&&n.locale,o=u[p+"%"+l+(r?"%"+r:"")];t&&!o&&f(n,p,l,{locale:r})}),[l,p,O,g,e,n]);var j={ref:E,onClick:function(t){y.props&&"function"===typeof y.props.onClick&&y.props.onClick(t),t.defaultPrevented||function(t,e,n,r,o,i,c,s){("A"!==t.currentTarget.nodeName||!function(t){var e=t.currentTarget.target;return e&&"_self"!==e||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which}(t)&&(0,a.isLocalURL)(n))&&(t.preventDefault(),null==c&&(c=r.indexOf("#")<0),e[o?"replace":"push"](n,r,{shallow:i,locale:s,scroll:c}).then((function(t){t&&c&&document.body.focus()})))}(t,n,p,l,v,m,b,g)},onMouseEnter:function(t){(0,a.isLocalURL)(p)&&(y.props&&"function"===typeof y.props.onMouseEnter&&y.props.onMouseEnter(t),f(n,p,l,{priority:!0}))}};if(t.passHref||"a"===y.type&&!("href"in y.props)){var M="undefined"!==typeof g?g:n&&n.locale,S=n&&n.isLocaleDomain&&(0,a.getDomainLocale)(l,M,n&&n.locales,n&&n.domainLocales);j.href=S||(0,a.addBasePath)((0,a.addLocale)(l,M,n&&n.defaultLocale))}return i.default.cloneElement(y,j)};e.default=h},1:function(t,e){},2:function(t,e){},"2tVS":function(t,e,n){"use strict";(function(t){var r=n("fssf"),o=n("jsv+"),i=n("Ik3D");function a(){return s.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function c(t,e){if(a()=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|t}function d(t,e){if(s.isBuffer(t))return t.length;if("undefined"!==typeof ArrayBuffer&&"function"===typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!==typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return W(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return U(t).length;default:if(r)return W(t).length;e=(""+e).toLowerCase(),r=!0}}function v(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return A(this,e,n);case"utf8":case"utf-8":return j(this,e,n);case"ascii":return S(this,e,n);case"latin1":case"binary":return T(this,e,n);case"base64":return E(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function m(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function b(t,e,n,r,o){if(0===t.length)return-1;if("string"===typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(o)return-1;n=t.length-1}else if(n<0){if(!o)return-1;n=0}if("string"===typeof e&&(e=s.from(e,r)),s.isBuffer(e))return 0===e.length?-1:g(t,e,n,r,o);if("number"===typeof e)return e&=255,s.TYPED_ARRAY_SUPPORT&&"function"===typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):g(t,[e],n,r,o);throw new TypeError("val must be string, number or Buffer")}function g(t,e,n,r,o){var i,a=1,c=t.length,s=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;a=2,c/=2,s/=2,n/=2}function u(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(o){var f=-1;for(i=n;ic&&(n=c-s),i=n;i>=0;i--){for(var h=!0,p=0;po&&(r=o):r=o;var i=e.length;if(i%2!==0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var a=0;a>8,o=n%256,i.push(o),i.push(r);return i}(e,t.length-n),t,n,r)}function E(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function j(t,e,n){n=Math.min(t.length,n);for(var r=[],o=e;o239?4:u>223?3:u>191?2:1;if(o+h<=n)switch(h){case 1:u<128&&(f=u);break;case 2:128===(192&(i=t[o+1]))&&(s=(31&u)<<6|63&i)>127&&(f=s);break;case 3:i=t[o+1],a=t[o+2],128===(192&i)&&128===(192&a)&&(s=(15&u)<<12|(63&i)<<6|63&a)>2047&&(s<55296||s>57343)&&(f=s);break;case 4:i=t[o+1],a=t[o+2],c=t[o+3],128===(192&i)&&128===(192&a)&&128===(192&c)&&(s=(15&u)<<18|(63&i)<<12|(63&a)<<6|63&c)>65535&&s<1114112&&(f=s)}null===f?(f=65533,h=1):f>65535&&(f-=65536,r.push(f>>>10&1023|55296),f=56320|1023&f),r.push(f),o+=h}return function(t){var e=t.length;if(e<=M)return String.fromCharCode.apply(String,t);var n="",r=0;for(;r0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),""},s.prototype.compare=function(t,e,n,r,o){if(!s.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),e<0||n>t.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&e>=n)return 0;if(r>=o)return-1;if(e>=n)return 1;if(this===t)return 0;for(var i=(o>>>=0)-(r>>>=0),a=(n>>>=0)-(e>>>=0),c=Math.min(i,a),u=this.slice(r,o),f=t.slice(e,n),h=0;ho)&&(n=o),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return y(this,t,e,n);case"utf8":case"utf-8":return w(this,t,e,n);case"ascii":return _(this,t,e,n);case"latin1":case"binary":return x(this,t,e,n);case"base64":return P(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,t,e,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var M=4096;function S(t,e,n){var r="";n=Math.min(t.length,n);for(var o=e;or)&&(n=r);for(var o="",i=e;in)throw new RangeError("Trying to access beyond buffer length")}function C(t,e,n,r,o,i){if(!s.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||et.length)throw new RangeError("Index out of range")}function F(t,e,n,r){e<0&&(e=65535+e+1);for(var o=0,i=Math.min(t.length-n,2);o>>8*(r?o:1-o)}function L(t,e,n,r){e<0&&(e=4294967295+e+1);for(var o=0,i=Math.min(t.length-n,4);o>>8*(r?o:3-o)&255}function R(t,e,n,r,o,i){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function k(t,e,n,r,i){return i||R(t,0,n,4),o.write(t,e,n,r,23,4),n+4}function B(t,e,n,r,i){return i||R(t,0,n,8),o.write(t,e,n,r,52,8),n+8}s.prototype.slice=function(t,e){var n,r=this.length;if((t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e0&&(o*=256);)r+=this[t+--e]*o;return r},s.prototype.readUInt8=function(t,e){return e||I(t,1,this.length),this[t]},s.prototype.readUInt16LE=function(t,e){return e||I(t,2,this.length),this[t]|this[t+1]<<8},s.prototype.readUInt16BE=function(t,e){return e||I(t,2,this.length),this[t]<<8|this[t+1]},s.prototype.readUInt32LE=function(t,e){return e||I(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},s.prototype.readUInt32BE=function(t,e){return e||I(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},s.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||I(t,e,this.length);for(var r=this[t],o=1,i=0;++i=(o*=128)&&(r-=Math.pow(2,8*e)),r},s.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||I(t,e,this.length);for(var r=e,o=1,i=this[t+--r];r>0&&(o*=256);)i+=this[t+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*e)),i},s.prototype.readInt8=function(t,e){return e||I(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},s.prototype.readInt16LE=function(t,e){e||I(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt16BE=function(t,e){e||I(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt32LE=function(t,e){return e||I(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},s.prototype.readInt32BE=function(t,e){return e||I(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},s.prototype.readFloatLE=function(t,e){return e||I(t,4,this.length),o.read(this,t,!0,23,4)},s.prototype.readFloatBE=function(t,e){return e||I(t,4,this.length),o.read(this,t,!1,23,4)},s.prototype.readDoubleLE=function(t,e){return e||I(t,8,this.length),o.read(this,t,!0,52,8)},s.prototype.readDoubleBE=function(t,e){return e||I(t,8,this.length),o.read(this,t,!1,52,8)},s.prototype.writeUIntLE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||C(this,t,e,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[e]=255&t;++i=0&&(i*=256);)this[e+o]=t/i&255;return e+n},s.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||C(this,t,e,1,255,0),s.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},s.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||C(this,t,e,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):F(this,t,e,!0),e+2},s.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||C(this,t,e,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):F(this,t,e,!1),e+2},s.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||C(this,t,e,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):L(this,t,e,!0),e+4},s.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||C(this,t,e,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):L(this,t,e,!1),e+4},s.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var o=Math.pow(2,8*n-1);C(this,t,e,n,o-1,-o)}var i=0,a=1,c=0;for(this[e]=255&t;++i>0)-c&255;return e+n},s.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var o=Math.pow(2,8*n-1);C(this,t,e,n,o-1,-o)}var i=n-1,a=1,c=0;for(this[e+i]=255&t;--i>=0&&(a*=256);)t<0&&0===c&&0!==this[e+i+1]&&(c=1),this[e+i]=(t/a>>0)-c&255;return e+n},s.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||C(this,t,e,1,127,-128),s.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},s.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||C(this,t,e,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):F(this,t,e,!0),e+2},s.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||C(this,t,e,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):F(this,t,e,!1),e+2},s.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||C(this,t,e,4,2147483647,-2147483648),s.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):L(this,t,e,!0),e+4},s.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||C(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):L(this,t,e,!1),e+4},s.prototype.writeFloatLE=function(t,e,n){return k(this,t,e,!0,n)},s.prototype.writeFloatBE=function(t,e,n){return k(this,t,e,!1,n)},s.prototype.writeDoubleLE=function(t,e,n){return B(this,t,e,!0,n)},s.prototype.writeDoubleBE=function(t,e,n){return B(this,t,e,!1,n)},s.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e=0;--o)t[o+e]=this[o+n];else if(i<1e3||!s.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"===typeof t)for(i=e;i55295&&n<57344){if(!o){if(n>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(e-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(e-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((e-=1)<0)break;i.push(n)}else if(n<2048){if((e-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function U(t){return r.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(N,"")).length<2)return"";for(;t.length%4!==0;)t+="=";return t}(t))}function H(t,e,n,r){for(var o=0;o=e.length||o>=t.length);++o)e[o+n]=t[o];return o}}).call(this,n("jzzT"))},3:function(t,e){},"7qA8":function(t,e,n){"use strict";function r(t){var e="";if(!t)try{t=n(!function(){var t=new Error("Cannot find module 'fs'");throw t.code="MODULE_NOT_FOUND",t}())}catch(r){e=r.toString()}return{readFile:t?function(e){return new Promise((function(n,r){t.readFile(e,(function(t,e){return t?r(t):n(e)}))}))}:function(){throw new Error("readFile - failed to require fs in nodejs environment with error: "+e)}}}n.d(e,"a",(function(){return r}))},"9DAu":function(t,e,n){"use strict";var r=n("J4zp");e.__esModule=!0,e.useIntersection=function(t){var e=t.rootMargin,n=t.disabled||!a,s=(0,o.useRef)(),u=(0,o.useState)(!1),f=r(u,2),h=f[0],p=f[1],l=(0,o.useCallback)((function(t){s.current&&(s.current(),s.current=void 0),n||h||t&&t.tagName&&(s.current=function(t,e,n){var r=function(t){var e=t.rootMargin||"",n=c.get(e);if(n)return n;var r=new Map,o=new IntersectionObserver((function(t){t.forEach((function(t){var e=r.get(t.target),n=t.isIntersecting||t.intersectionRatio>0;e&&n&&e(n)}))}),t);return c.set(e,n={id:e,observer:o,elements:r}),n}(n),o=r.id,i=r.observer,a=r.elements;return a.set(t,e),i.observe(t),function(){a.delete(t),i.unobserve(t),0===a.size&&(i.disconnect(),c.delete(o))}}(t,(function(t){return t&&p(t)}),{rootMargin:e}))}),[n,e,h]);return(0,o.useEffect)((function(){if(!a&&!h){var t=(0,i.requestIdleCallback)((function(){return p(!0)}));return function(){return(0,i.cancelIdleCallback)(t)}}}),[h]),[l,h]};var o=n("BqPY"),i=n("s4GJ"),a="undefined"!==typeof IntersectionObserver;var c=new Map},Bnag:function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},D0IF:function(t,e,n){"use strict";e.__esModule=!0,e.imageConfigDefault=e.VALID_LOADERS=void 0;e.VALID_LOADERS=["default","imgix","cloudinary","akamai"];e.imageConfigDefault={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"https://cdn.statically.io/gh/HiltonWS/hiltonws.github.io/1.1.1/smile/image",loader:"default",domains:[]}},EbDI:function(t,e){t.exports=function(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}},Ijbi:function(t,e,n){var r=n("WkPL");t.exports=function(t){if(Array.isArray(t))return r(t)}},Ik3D:function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},N6lM:function(t,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/",function(){return n("RNiq")}])},RIqP:function(t,e,n){var r=n("Ijbi"),o=n("EbDI"),i=n("ZhPi"),a=n("Bnag");t.exports=function(t){return r(t)||o(t)||i(t)||a()}},RNiq:function(t,e,n){"use strict";n.r(e),n.d(e,"default",(function(){return Fn}));var r=n("o0o1"),o=n.n(r),i=n("nKUr");function a(t,e,n,r,o,i,a){try{var c=t[i](a),s=c.value}catch(u){return void n(u)}c.done?e(s):Promise.resolve(s).then(r,o)}function c(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function c(t){a(i,r,o,c,s,"next",t)}function s(t){a(i,r,o,c,s,"throw",t)}c(void 0)}))}}var s=n("Ruhs"),u=n.n(s),f=(n("djdT"),n("Tred")),h=n.n(f),p=n("lFXY"),l=n.n(p);function d(t){var e=t.children;t.home;return Object(i.jsxs)("div",{className:h.a.container,children:[Object(i.jsx)(u.a,{children:Object(i.jsx)("link",{rel:"icon",href:"/favicon.ico"})}),Object(i.jsx)("header",{className:h.a.header}),Object(i.jsx)("main",{children:e}),Object(i.jsx)("div",{className:h.a.backToHome,children:Object(i.jsx)(l.a,{href:"/",children:Object(i.jsx)("a",{children:"\u2190 Back to home"})})})]})}var v=n("Z4Yb"),m=n.n(v),b=n("lT9W");function g(t,e,n){if(void 0===n&&(n=!1),t.beginPath(),e.slice(1).forEach((function(n,r){var o=n.x,i=n.y,a=e[r];t.moveTo(a.x,a.y),t.lineTo(o,i)})),n){var r=e[e.length-1],o=e[0];if(!r||!o)return;t.moveTo(r.x,r.y),t.lineTo(o.x,o.y)}t.stroke()}var y=n("mrSG"),w=function(){function t(t,e){if(!T(t)||!T(e))throw new Error("Dimensions.constructor - expected width and height to be valid numbers, instead have "+JSON.stringify({width:t,height:e}));this._width=t,this._height=e}return Object.defineProperty(t.prototype,"width",{get:function(){return this._width},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this._height},enumerable:!0,configurable:!0}),t.prototype.reverse=function(){return new t(1/this.width,1/this.height)},t}();function _(t,e){return t instanceof b.a&&t.shape.length===e}function x(t){return _(t,3)}function P(t){return _(t,4)}function O(t){return t%2===0}function E(t,e){void 0===e&&(e=2);var n=Math.pow(10,e);return Math.floor(t*n)/n}function j(t){return t&&t.width&&t.height}function M(t){return t.reduce((function(t,e){return t.add(e)}),new D(0,0)).div(new D(t.length,t.length))}function S(t,e,n){return Array(t).fill(0).map((function(t,r){return e+r*n}))}function T(t){return!!t&&t!==1/0&&t!==-1/0&&!isNaN(t)||0===t}function A(t){return T(t)&&0<=t&&t<=1}var D=function(){function t(t,e){this._x=t,this._y=e}return Object.defineProperty(t.prototype,"x",{get:function(){return this._x},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"y",{get:function(){return this._y},enumerable:!0,configurable:!0}),t.prototype.add=function(e){return new t(this.x+e.x,this.y+e.y)},t.prototype.sub=function(e){return new t(this.x-e.x,this.y-e.y)},t.prototype.mul=function(e){return new t(this.x*e.x,this.y*e.y)},t.prototype.div=function(e){return new t(this.x/e.x,this.y/e.y)},t.prototype.abs=function(){return new t(Math.abs(this.x),Math.abs(this.y))},t.prototype.magnitude=function(){return Math.sqrt(Math.pow(this.x,2)+Math.pow(this.y,2))},t.prototype.floor=function(){return new t(Math.floor(this.x),Math.floor(this.y))},t}(),I=function(){function t(e,n){void 0===n&&(n=!0);var r=e||{},o=[r.left,r.top,r.right,r.bottom].every(T),i=[r.x,r.y,r.width,r.height].every(T);if(!i&&!o)throw new Error("Box.constructor - expected box to be IBoundingBox | IRect, instead have "+JSON.stringify(r));var a=i?[r.x,r.y,r.width,r.height]:[r.left,r.top,r.right-r.left,r.bottom-r.top],c=a[0],s=a[1],u=a[2],f=a[3];t.assertIsValidBox({x:c,y:s,width:u,height:f},"Box.constructor",n),this._x=c,this._y=s,this._width=u,this._height=f}return t.isRect=function(t){return!!t&&[t.x,t.y,t.width,t.height].every(T)},t.assertIsValidBox=function(e,n,r){if(void 0===r&&(r=!1),!t.isRect(e))throw new Error(n+" - invalid box: "+JSON.stringify(e)+", expected object with properties x, y, width, height");if(!r&&(e.width<0||e.height<0))throw new Error(n+" - width ("+e.width+") and height ("+e.height+") must be positive numbers")},Object.defineProperty(t.prototype,"x",{get:function(){return this._x},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"y",{get:function(){return this._y},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this._width},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this._height},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"left",{get:function(){return this.x},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"top",{get:function(){return this.y},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){return this.x+this.width},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bottom",{get:function(){return this.y+this.height},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"area",{get:function(){return this.width*this.height},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"topLeft",{get:function(){return new D(this.left,this.top)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"topRight",{get:function(){return new D(this.right,this.top)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bottomLeft",{get:function(){return new D(this.left,this.bottom)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bottomRight",{get:function(){return new D(this.right,this.bottom)},enumerable:!0,configurable:!0}),t.prototype.round=function(){var e=[this.x,this.y,this.width,this.height].map((function(t){return Math.round(t)}));return new t({x:e[0],y:e[1],width:e[2],height:e[3]})},t.prototype.floor=function(){var e=[this.x,this.y,this.width,this.height].map((function(t){return Math.floor(t)}));return new t({x:e[0],y:e[1],width:e[2],height:e[3]})},t.prototype.toSquare=function(){var e=this,n=e.x,r=e.y,o=e.width,i=e.height,a=Math.abs(o-i);return oe&&(o=-s+e+n,s=e),u>t&&(i=-u+t+r,u=t),a<1&&(i=2-a,a=1),c<1&&(i=2-c,c=1),{dy:1,edy:i,dx:1,edx:o,y:c,ey:u,x:a,ex:s,w:n,h:r}},t.prototype.calibrate=function(e){return new t({left:this.left+e.left*this.width,top:this.top+e.top*this.height,right:this.right+e.right*this.width,bottom:this.bottom+e.bottom*this.height}).toSquare().round()},t}(),C=function(t){function e(e,n,r,o,i){return void 0===i&&(i=!1),t.call(this,{left:e,top:n,right:r,bottom:o},i)||this}return Object(y.c)(e,t),e}(I),F=function(){function t(t,e,n,r,o){this._imageDims=new w(o.width,o.height),this._score=t,this._classScore=e,this._className=n,this._box=new I(r).rescale(this._imageDims)}return Object.defineProperty(t.prototype,"score",{get:function(){return this._score},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"classScore",{get:function(){return this._classScore},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"className",{get:function(){return this._className},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"box",{get:function(){return this._box},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"imageDims",{get:function(){return this._imageDims},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"imageWidth",{get:function(){return this.imageDims.width},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"imageHeight",{get:function(){return this.imageDims.height},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"relativeBox",{get:function(){return new I(this._box).rescale(this.imageDims.reverse())},enumerable:!0,configurable:!0}),t.prototype.forSize=function(e,n){return new t(this.score,this.classScore,this.className,this.relativeBox,{width:e,height:n})},t}(),L=function(t){function e(e,n,r){return t.call(this,e,e,"",n,r)||this}return Object(y.c)(e,t),e.prototype.forSize=function(n,r){var o=t.prototype.forSize.call(this,n,r);return new e(o.score,o.relativeBox,o.imageDims)},e}(F);function R(t,e,n){void 0===n&&(n=!0);var r=Math.max(0,Math.min(t.right,e.right)-Math.max(t.left,e.left))*Math.max(0,Math.min(t.bottom,e.bottom)-Math.max(t.top,e.top));return n?r/(t.area+e.area-r):r/Math.min(t.area,e.area)}function k(t,e,n,r){void 0===r&&(r=!0);for(var o=e.map((function(t,e){return{score:t,boxIndex:e}})).sort((function(t,e){return t.score-e.score})).map((function(t){return t.boxIndex})),i=[],a=function(){var e=o.pop();i.push(e);for(var a=o,c=[],s=0;s0;)a();return i}function B(t,e){return b.L((function(){var n=e[0],r=e[1],o=e[2],i=b.n(Object(y.e)(t.shape.slice(0,3),[1]),n),a=b.n(Object(y.e)(t.shape.slice(0,3),[1]),r),c=b.n(Object(y.e)(t.shape.slice(0,3),[1]),o),s=b.h([i,a,c],3);return b.F(t,s)}))}function N(t){return 1/(1+Math.exp(-t))}var z=function(t){function e(e,n,r,o,i){return void 0===i&&(i=!1),t.call(this,{x:e,y:n,width:r,height:o},i)||this}return Object(y.c)(e,t),e}(I),W=function(){function t(t,e,n){void 0===n&&(n=new D(0,0));var r=e.width,o=e.height;this._imgDims=new w(r,o),this._shift=n,this._positions=t.map((function(t){return t.mul(new D(r,o)).add(n)}))}return Object.defineProperty(t.prototype,"shift",{get:function(){return new D(this._shift.x,this._shift.y)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"imageWidth",{get:function(){return this._imgDims.width},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"imageHeight",{get:function(){return this._imgDims.height},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"positions",{get:function(){return this._positions},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"relativePositions",{get:function(){var t=this;return this._positions.map((function(e){return e.sub(t._shift).div(new D(t.imageWidth,t.imageHeight))}))},enumerable:!0,configurable:!0}),t.prototype.forSize=function(t,e){return new this.constructor(this.relativePositions,{width:t,height:e})},t.prototype.shiftBy=function(t,e){return new this.constructor(this.relativePositions,this._imgDims,new D(t,e))},t.prototype.shiftByPoint=function(t){return this.shiftBy(t.x,t.y)},t.prototype.align=function(t,e){if(void 0===e&&(e={}),t){var n=t instanceof L?t.box.floor():new I(t);return this.shiftBy(n.x,n.y).align(null,e)}var r=Object.assign({},{useDlibAlignment:!1,minBoxPadding:.2},e),o=r.useDlibAlignment,i=r.minBoxPadding;return o?this.alignDlib():this.alignMinBbox(i)},t.prototype.alignDlib=function(){var t=this.getRefPointsForAlignment(),e=t[0],n=t[1],r=t[2],o=function(t){return r.sub(t).magnitude()},i=(o(e)+o(n))/2,a=Math.floor(i/.45),c=M(t),s=Math.floor(Math.max(0,c.x-.5*a)),u=Math.floor(Math.max(0,c.y-.43*a));return new z(s,u,Math.min(a,this.imageWidth+s),Math.min(a,this.imageHeight+u))},t.prototype.alignMinBbox=function(t){var e=function(t){var e=t.map((function(t){return t.x})),n=t.map((function(t){return t.y})),r=e.reduce((function(t,e){return e=3}function ht(t){var e=ot.getEnv(),n=e.Image,r=e.Video;return t instanceof n?new w(t.naturalWidth,t.naturalHeight):t instanceof r?new w(t.videoWidth,t.videoHeight):new w(t.width,t.height)}function pt(t){var e=t.width,n=t.height,r=(0,ot.getEnv().createCanvasElement)();return r.width=e,r.height=n,r}function lt(t,e){var n=ot.getEnv().ImageData;if(!(t instanceof n)&&!ft(t))throw new Error("createCanvasFromMedia - media has not finished loading yet");var r=e||ht(t),o=r.width,i=r.height,a=pt({width:o,height:i});return t instanceof n?at(a).putImageData(t,0,0):at(a).drawImage(t,0,0,o,i),a}function dt(t,e){return Object(y.b)(this,void 0,void 0,(function(){var n,r,o,i,a,c;return Object(y.d)(this,(function(s){switch(s.label){case 0:return n=e||ot.getEnv().createCanvasElement(),r=t.shape.slice(P(t)?1:0),o=r[0],i=r[1],a=r[2],c=b.L((function(){return t.as3D(o,i,a).toInt()})),[4,b.f.toPixels(c,n)];case 1:return s.sent(),c.dispose(),[2,n]}}))}))}function vt(t){var e=ot.getEnv(),n=e.Image,r=e.Canvas,o=e.Video;return t instanceof n||t instanceof r||t instanceof o}var mt=function(){function t(t,e){var n=this;if(void 0===e&&(e=!1),this._imageTensors=[],this._canvases=[],this._treatAsBatchInput=!1,this._inputDimensions=[],!Array.isArray(t))throw new Error("NetInput.constructor - expected inputs to be an Array of TResolvedNetInput or to be instanceof tf.Tensor4D, instead have "+t);this._treatAsBatchInput=e,this._batchSize=t.length,t.forEach((function(t,e){if(x(t))return n._imageTensors[e]=t,void(n._inputDimensions[e]=t.shape);if(P(t)){var r=t.shape[0];if(1!==r)throw new Error("NetInput - tf.Tensor4D with batchSize "+r+" passed, but not supported in input array");return n._imageTensors[e]=t,void(n._inputDimensions[e]=t.shape.slice(1))}var o=t instanceof ot.getEnv().Canvas?t:lt(t);n._canvases[e]=o,n._inputDimensions[e]=[o.height,o.width,3]}))}return Object.defineProperty(t.prototype,"imageTensors",{get:function(){return this._imageTensors},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"canvases",{get:function(){return this._canvases},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isBatchInput",{get:function(){return this.batchSize>1||this._treatAsBatchInput},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"batchSize",{get:function(){return this._batchSize},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"inputDimensions",{get:function(){return this._inputDimensions},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"inputSize",{get:function(){return this._inputSize},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"reshapedInputDimensions",{get:function(){var t=this;return S(this.batchSize,0,1).map((function(e,n){return t.getReshapedInputDimensions(n)}))},enumerable:!0,configurable:!0}),t.prototype.getInput=function(t){return this.canvases[t]||this.imageTensors[t]},t.prototype.getInputDimensions=function(t){return this._inputDimensions[t]},t.prototype.getInputHeight=function(t){return this._inputDimensions[t][0]},t.prototype.getInputWidth=function(t){return this._inputDimensions[t][1]},t.prototype.getReshapedInputDimensions=function(t){if("number"!==typeof this.inputSize)throw new Error("getReshapedInputDimensions - inputSize not set, toBatchTensor has not been called yet");return function(t,e){var n=t.width,r=t.height,o=e/Math.max(r,n);return new w(Math.round(n*o),Math.round(r*o))}({width:this.getInputWidth(t),height:this.getInputHeight(t)},this.inputSize)},t.prototype.toBatchTensor=function(t,e){var n=this;return void 0===e&&(e=!0),this._inputSize=t,b.L((function(){var r=S(n.batchSize,0,1).map((function(r){var o=n.getInput(r);if(o instanceof b.a){var i=P(o)?o:o.expandDims();return(i=function(t,e){return void 0===e&&(e=!1),b.L((function(){var n=t.shape.slice(1),r=n[0],o=n[1];if(r===o)return t;var i=Math.abs(r-o),a=Math.round(i*(e?.5:1)),c=r>o?2:1,s=function(e){var n=t.shape.slice();return n[c]=e,b.n(n,0)},u=s(a),f=i-u.shape[c],h=[e&&f?s(f):null,t,u].filter((function(t){return!!t})).map((function(t){return t.toFloat()}));return b.h(h,c)}))}(i,e)).shape[1]===t&&i.shape[2]===t||(i=b.o.resizeBilinear(i,[t,t])),i.as3D(t,t,3)}if(o instanceof ot.getEnv().Canvas)return b.f.fromPixels(function(t,e,n){void 0===n&&(n=!1);var r=ot.getEnv(),o=r.Image,i=r.Canvas;if(!(t instanceof o||t instanceof i))throw new Error("imageToSquare - expected arg0 to be HTMLImageElement | HTMLCanvasElement");var a=ht(t),c=e/Math.max(a.height,a.width),s=c*a.width,u=c*a.height,f=pt({width:e,height:e}),h=t instanceof i?t:lt(t),p=Math.abs(s-u)/2,l=n&&s1)throw new Error("extractFaces - batchSize > 1 not supported");return(i=o.getInput(0))instanceof n?(a=i,[3,4]):[3,2];case 2:return[4,dt(i)];case 3:a=s.sent(),s.label=4;case 4:r=a,s.label=5;case 5:return c=at(r),[2,e.map((function(t){return t instanceof L?t.forSize(r.width,r.height).box.floor():t})).map((function(t){return t.clipAtImageBorders(r.width,r.height)})).map((function(t){var e=t.x,n=t.y,r=t.width,o=t.height,i=pt({width:r,height:o});return at(i).putImageData(c.getImageData(e,n,r,o),0,0),i}))]}}))}))}function yt(t,e){return Object(y.b)(this,void 0,void 0,(function(){return Object(y.d)(this,(function(n){if(!x(t)&&!P(t))throw new Error("extractFaceTensors - expected image tensor to be 3D or 4D");if(P(t)&&t.shape[0]>1)throw new Error("extractFaceTensors - batchSize > 1 not supported");return[2,b.L((function(){var n=t.shape.slice(P(t)?1:0),r=n[0],o=n[1],i=n[2];return e.map((function(t){return t instanceof L?t.forSize(o,r).box:t})).map((function(t){return t.clipAtImageBorders(o,r)})).map((function(e){var n=e.x,a=e.y,c=e.width,s=e.height;return b.C(t.as3D(r,o,i),[a,n,0],[s,c,i])}))}))]}))}))}function wt(t,e){return Object(y.b)(this,void 0,void 0,(function(){var n;return Object(y.d)(this,(function(r){switch(r.label){case 0:return[4,(0,ot.getEnv().fetch)(t,e)];case 1:if(!((n=r.sent()).status<400))throw new Error("failed to fetch: ("+n.status+") "+n.statusText+", from url: "+n.url);return[2,n]}}))}))}function _t(t){return Object(y.b)(this,void 0,void 0,(function(){return Object(y.d)(this,(function(e){switch(e.label){case 0:return[4,wt(t)];case 1:return[2,e.sent().json()]}}))}))}function xt(t,e){var n=e+"-weights_manifest.json";if(!t)return{modelBaseUri:"",manifestUri:n};if("/"===t)return{modelBaseUri:"/",manifestUri:"/"+n};var r=t.startsWith("http://")?"http://":t.startsWith("https://")?"https://":"",o=(t=t.replace(r,"")).split("/").filter((function(t){return t})),i=t.endsWith(".json")?o[o.length-1]:n,a=r+(t.endsWith(".json")?o.slice(0,o.length-1):o).join("/");return{modelBaseUri:a=t.startsWith("/")?"/"+a:a,manifestUri:"/"===a?"/"+i:a+"/"+i}}function Pt(t,e){return Object(y.b)(this,void 0,void 0,(function(){var n,r,o,i;return Object(y.d)(this,(function(a){switch(a.label){case 0:return n=xt(t,e),r=n.manifestUri,o=n.modelBaseUri,[4,_t(r)];case 1:return i=a.sent(),[2,b.p.loadWeights(i,o)]}}))}))}var Ot=function(){function t(t){this._name=t,this._params=void 0,this._paramMappings=[]}return Object.defineProperty(t.prototype,"params",{get:function(){return this._params},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"paramMappings",{get:function(){return this._paramMappings},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isLoaded",{get:function(){return!!this.params},enumerable:!0,configurable:!0}),t.prototype.getParamFromPath=function(t){var e=this.traversePropertyPath(t);return e.obj[e.objProp]},t.prototype.reassignParamFromPath=function(t,e){var n=this.traversePropertyPath(t),r=n.obj,o=n.objProp;r[o].dispose(),r[o]=e},t.prototype.getParamList=function(){var t=this;return this._paramMappings.map((function(e){var n=e.paramPath;return{path:n,tensor:t.getParamFromPath(n)}}))},t.prototype.getTrainableParams=function(){return this.getParamList().filter((function(t){return t.tensor instanceof b.b}))},t.prototype.getFrozenParams=function(){return this.getParamList().filter((function(t){return!(t.tensor instanceof b.b)}))},t.prototype.variable=function(){var t=this;this.getFrozenParams().forEach((function(e){var n=e.path,r=e.tensor;t.reassignParamFromPath(n,r.variable())}))},t.prototype.freeze=function(){var t=this;this.getTrainableParams().forEach((function(e){var n=e.path,r=e.tensor,o=b.G(r.dataSync());r.dispose(),t.reassignParamFromPath(n,o)}))},t.prototype.dispose=function(t){void 0===t&&(t=!0),this.getParamList().forEach((function(e){if(t&&e.tensor.isDisposed)throw new Error("param tensor has already been disposed for path "+e.path);e.tensor.dispose()})),this._params=void 0},t.prototype.serializeParams=function(){return new Float32Array(this.getParamList().map((function(t){var e=t.tensor;return Array.from(e.dataSync())})).reduce((function(t,e){return t.concat(e)})))},t.prototype.load=function(t){return Object(y.b)(this,void 0,void 0,(function(){return Object(y.d)(this,(function(e){switch(e.label){case 0:return t instanceof Float32Array?(this.extractWeights(t),[2]):[4,this.loadFromUri(t)];case 1:return e.sent(),[2]}}))}))},t.prototype.loadFromUri=function(t){return Object(y.b)(this,void 0,void 0,(function(){var e;return Object(y.d)(this,(function(n){switch(n.label){case 0:if(t&&"string"!==typeof t)throw new Error(this._name+".loadFromUri - expected model uri");return[4,Pt(t,this.getDefaultModelName())];case 1:return e=n.sent(),this.loadFromWeightMap(e),[2]}}))}))},t.prototype.loadFromDisk=function(t){return Object(y.b)(this,void 0,void 0,(function(){var e,n,r,o,i,a,c,s,u,f;return Object(y.d)(this,(function(h){switch(h.label){case 0:if(t&&"string"!==typeof t)throw new Error(this._name+".loadFromDisk - expected model file path");return e=ot.getEnv().readFile,n=xt(t,this.getDefaultModelName()),r=n.manifestUri,o=n.modelBaseUri,i=function(t){return Promise.all(t.map((function(t){return e(t).then((function(t){return t.buffer}))})))},a=b.p.weightsLoaderFactory(i),u=(s=JSON).parse,[4,e(r)];case 1:return c=u.apply(s,[h.sent().toString()]),[4,a(c,o)];case 2:return f=h.sent(),this.loadFromWeightMap(f),[2]}}))}))},t.prototype.loadFromWeightMap=function(t){var e=this.extractParamsFromWeigthMap(t),n=e.paramMappings,r=e.params;this._paramMappings=n,this._params=r},t.prototype.extractWeights=function(t){var e=this.extractParams(t),n=e.paramMappings,r=e.params;this._paramMappings=n,this._params=r},t.prototype.traversePropertyPath=function(t){if(!this.params)throw new Error("traversePropertyPath - model has no loaded params");var e=t.split("/").reduce((function(e,n){if(!e.nextObj.hasOwnProperty(n))throw new Error("traversePropertyPath - object does not have property "+n+", for path "+t);return{obj:e.nextObj,objProp:n,nextObj:e.nextObj[n]}}),{nextObj:this.params}),n=e.obj,r=e.objProp;if(!n||!r||!(n[r]instanceof b.a))throw new Error("traversePropertyPath - parameter is not a tensor, for path "+t);return{obj:n,objProp:r}},t}();function Et(t,e,n){return b.L((function(){var r=b.z(t,e.depthwise_filter,e.pointwise_filter,n,"same");return r=b.c(r,e.bias)}))}function jt(t,e,n){return void 0===n&&(n=!1),b.L((function(){var r=b.w(n?b.c(b.i(t,e.conv0.filters,[2,2],"same"),e.conv0.bias):Et(t,e.conv0,[2,2])),o=Et(r,e.conv1,[1,1]),i=Et(b.w(b.c(r,o)),e.conv2,[1,1]);return b.w(b.c(r,b.c(o,i)))}))}function Mt(t,e,n,r){return void 0===n&&(n=!1),void 0===r&&(r=!0),b.L((function(){var o=b.w(n?b.c(b.i(t,e.conv0.filters,r?[2,2]:[1,1],"same"),e.conv0.bias):Et(t,e.conv0,r?[2,2]:[1,1])),i=Et(o,e.conv1,[1,1]),a=Et(b.w(b.c(o,i)),e.conv2,[1,1]),c=Et(b.w(b.c(o,b.c(i,a))),e.conv3,[1,1]);return b.w(b.c(o,b.c(i,b.c(a,c))))}))}function St(t,e,n,r){return void 0===n&&(n="same"),void 0===r&&(r=!1),b.L((function(){var o=b.c(b.i(t,e.filters,[1,1],n),e.bias);return r?b.w(o):o}))}function Tt(t,e){Object.keys(t).forEach((function(n){e.some((function(t){return t.originalPath===n}))||t[n].dispose()}))}function At(t,e){return function(n,r,o,i){var a=b.K(t(n*r*o*o),[o,o,n,r]),c=b.H(t(r));return e.push({paramPath:i+"/filters"},{paramPath:i+"/bias"}),{filters:a,bias:c}}}function Dt(t,e){return function(n,r,o){var i=b.I(t(n*r),[n,r]),a=b.H(t(r));return e.push({paramPath:o+"/weights"},{paramPath:o+"/bias"}),{weights:i,bias:a}}}var It=function(t,e,n){this.depthwise_filter=t,this.pointwise_filter=e,this.bias=n};function Ct(t,e){return function(n,r,o){var i=b.K(t(9*n),[3,3,n,1]),a=b.K(t(n*r),[1,1,n,r]),c=b.H(t(r));return e.push({paramPath:o+"/depthwise_filter"},{paramPath:o+"/pointwise_filter"},{paramPath:o+"/bias"}),new It(i,a,c)}}function Ft(t){return function(e){var n=t(e+"/depthwise_filter",4),r=t(e+"/pointwise_filter",4),o=t(e+"/bias",1);return new It(n,r,o)}}function Lt(t,e){return function(n,r,o){var i=t[n];if(!_(i,r))throw new Error("expected weightMap["+n+"] to be a Tensor"+r+"D, instead have "+i);return e.push({originalPath:n,paramPath:o||n}),i}}function Rt(t){var e=t;return{extractWeights:function(t){var n=e.slice(0,t);return e=e.slice(t),n},getRemainingWeights:function(){return e}}}function kt(t,e){var n=At(t,e),r=Ct(t,e);function o(t,e,o,i){return void 0===i&&(i=!1),{conv0:i?n(t,e,3,o+"/conv0"):r(t,e,o+"/conv0"),conv1:r(e,e,o+"/conv1"),conv2:r(e,e,o+"/conv2")}}return{extractDenseBlock3Params:o,extractDenseBlock4Params:function(t,e,n,i){void 0===i&&(i=!1);var a=o(t,e,n,i);return{conv0:a.conv0,conv1:a.conv1,conv2:a.conv2,conv3:r(e,e,n+"/conv3")}}}}function Bt(t){return function(e){return{filters:t(e+"/filters",4),bias:t(e+"/bias",1)}}}function Nt(t,e){var n=Lt(t,e),r=Bt(n),o=Ft(n);return{extractDenseBlock3Params:function(t,e){return void 0===e&&(e=!1),{conv0:e?r(t+"/conv0"):o(t+"/conv0"),conv1:o(t+"/conv1"),conv2:o(t+"/conv2")}},extractDenseBlock4Params:function(t,e){return void 0===e&&(e=!1),{conv0:e?r(t+"/conv0"):o(t+"/conv0"),conv1:o(t+"/conv1"),conv2:o(t+"/conv2"),conv3:o(t+"/conv3")}}}}var zt=function(t){function e(){return t.call(this,"FaceFeatureExtractor")||this}return Object(y.c)(e,t),e.prototype.forwardInput=function(t){var e=this.params;if(!e)throw new Error("FaceFeatureExtractor - load model before inference");return b.L((function(){var n=Mt(B(t.toBatchTensor(112,!0),[122.782,117.001,104.298]).div(b.y(255)),e.dense0,!0);return n=Mt(n,e.dense1),n=Mt(n,e.dense2),n=Mt(n,e.dense3),n=b.d(n,[7,7],[2,2],"valid")}))},e.prototype.forward=function(t){return Object(y.b)(this,void 0,void 0,(function(){var e;return Object(y.d)(this,(function(n){switch(n.label){case 0:return e=this.forwardInput,[4,bt(t)];case 1:return[2,e.apply(this,[n.sent()])]}}))}))},e.prototype.getDefaultModelName=function(){return"face_feature_extractor_model"},e.prototype.extractParamsFromWeigthMap=function(t){return function(t){var e=[],n=Nt(t,e).extractDenseBlock4Params,r={dense0:n("dense0",!0),dense1:n("dense1"),dense2:n("dense2"),dense3:n("dense3")};return Tt(t,e),{params:r,paramMappings:e}}(t)},e.prototype.extractParams=function(t){return function(t){var e=[],n=Rt(t),r=n.extractWeights,o=n.getRemainingWeights,i=kt(r,e).extractDenseBlock4Params,a=i(3,32,"dense0",!0),c=i(32,64,"dense1"),s=i(64,128,"dense2"),u=i(128,256,"dense3");if(0!==o().length)throw new Error("weights remaing after extract: "+o().length);return{paramMappings:e,params:{dense0:a,dense1:c,dense2:s,dense3:u}}}(t)},e}(Ot);function Wt(t,e){return b.L((function(){return b.c(b.q(t,e.weights),e.bias)}))}function Ut(t){var e={},n={};return Object.keys(t).forEach((function(r){(r.startsWith("fc")?n:e)[r]=t[r]})),{featureExtractorMap:e,classifierMap:n}}var Ht=function(t){function e(e,n){var r=t.call(this,e)||this;return r._faceFeatureExtractor=n,r}return Object(y.c)(e,t),Object.defineProperty(e.prototype,"faceFeatureExtractor",{get:function(){return this._faceFeatureExtractor},enumerable:!0,configurable:!0}),e.prototype.runNet=function(t){var e=this,n=this.params;if(!n)throw new Error(this._name+" - load model before inference");return b.L((function(){var r=t instanceof mt?e.faceFeatureExtractor.forwardInput(t):t;return Wt(r.as2D(r.shape[0],-1),n.fc)}))},e.prototype.dispose=function(e){void 0===e&&(e=!0),this.faceFeatureExtractor.dispose(e),t.prototype.dispose.call(this,e)},e.prototype.loadClassifierParams=function(t){var e=this.extractClassifierParams(t),n=e.params,r=e.paramMappings;this._params=n,this._paramMappings=r},e.prototype.extractClassifierParams=function(t){return function(t,e,n){var r=[],o=Rt(t),i=o.extractWeights,a=o.getRemainingWeights,c=Dt(i,r)(e,n,"fc");if(0!==a().length)throw new Error("weights remaing after extract: "+a().length);return{paramMappings:r,params:{fc:c}}}(t,this.getClassifierChannelsIn(),this.getClassifierChannelsOut())},e.prototype.extractParamsFromWeigthMap=function(t){var e=Ut(t),n=e.featureExtractorMap,r=e.classifierMap;return this.faceFeatureExtractor.loadFromWeightMap(n),function(t){var e,n=[],r=Lt(t,n),o={fc:(e="fc",{weights:r(e+"/weights",2),bias:r(e+"/bias",1)})};return Tt(t,n),{params:o,paramMappings:n}}(r)},e.prototype.extractParams=function(t){var e=this.getClassifierChannelsIn(),n=this.getClassifierChannelsOut(),r=n*e+n,o=t.slice(0,t.length-r),i=t.slice(t.length-r);return this.faceFeatureExtractor.extractWeights(o),this.extractClassifierParams(i)},e}(Ot),Yt=["neutral","happy","sad","angry","fearful","disgusted","surprised"],qt=function(){function t(t){var e=this;if(7!==t.length)throw new Error("FaceExpressions.constructor - expected probabilities.length to be 7, have: "+t.length);Yt.forEach((function(n,r){e[n]=t[r]}))}return t.prototype.asSortedArray=function(){var t=this;return Yt.map((function(e){return{expression:e,probability:t[e]}})).sort((function(t,e){return e.probability-t.probability}))},t}(),Gt=function(t){function e(e){return void 0===e&&(e=new zt),t.call(this,"FaceExpressionNet",e)||this}return Object(y.c)(e,t),e.prototype.forwardInput=function(t){var e=this;return b.L((function(){return b.D(e.runNet(t))}))},e.prototype.forward=function(t){return Object(y.b)(this,void 0,void 0,(function(){var e;return Object(y.d)(this,(function(n){switch(n.label){case 0:return e=this.forwardInput,[4,bt(t)];case 1:return[2,e.apply(this,[n.sent()])]}}))}))},e.prototype.predictExpressions=function(t){return Object(y.b)(this,void 0,void 0,(function(){var e,n,r,o,i=this;return Object(y.d)(this,(function(a){switch(a.label){case 0:return[4,bt(t)];case 1:return e=a.sent(),[4,this.forwardInput(e)];case 2:return n=a.sent(),[4,Promise.all(b.O(n).map((function(t){return Object(y.b)(i,void 0,void 0,(function(){var e;return Object(y.d)(this,(function(n){switch(n.label){case 0:return[4,t.data()];case 1:return e=n.sent(),t.dispose(),[2,e]}}))}))})))];case 3:return r=a.sent(),n.dispose(),o=r.map((function(t){return new qt(t)})),[2,e.isBatchInput?o:o[0]]}}))}))},e.prototype.getDefaultModelName=function(){return"face_expression_model"},e.prototype.getClassifierChannelsIn=function(){return 256},e.prototype.getClassifierChannelsOut=function(){return 7},e}(Ht);function Vt(t,e){var n={expressions:e};return Object.assign({},t,n)}function Jt(t){return V(t)&&t.landmarks instanceof W&&t.unshiftedLandmarks instanceof W&&t.alignedRect instanceof L}function Xt(t,e){var n=t.detection.box,r=e.shiftBy(n.x,n.y),o=r.align(),i=t.detection.imageDims,a={landmarks:r,unshiftedLandmarks:e,alignedRect:new L(t.detection.score,o.rescale(i.reverse()),i)};return Object.assign({},t,a)}var Kt=function(t){void 0===t&&(t={});var e=t.drawLines,n=void 0===e||e,r=t.drawPoints,o=void 0===r||r,i=t.lineWidth,a=t.lineColor,c=t.pointSize,s=t.pointColor;this.drawLines=n,this.drawPoints=o,this.lineWidth=i||1,this.pointSize=c||2,this.lineColor=a||"rgba(0, 255, 255, 1)",this.pointColor=s||"rgba(255, 0, 255, 1)"};!function(){function t(t,e){void 0===e&&(e={}),this.faceLandmarks=t,this.options=new Kt(e)}t.prototype.draw=function(t){var e=at(t),n=this.options,r=n.drawLines,o=n.drawPoints,i=n.lineWidth,a=n.lineColor,c=n.pointSize,s=n.pointColor;if(r&&this.faceLandmarks instanceof H&&(e.strokeStyle=a,e.lineWidth=i,g(e,this.faceLandmarks.getJawOutline()),g(e,this.faceLandmarks.getLeftEyeBrow()),g(e,this.faceLandmarks.getRightEyeBrow()),g(e,this.faceLandmarks.getNose()),g(e,this.faceLandmarks.getLeftEye(),!0),g(e,this.faceLandmarks.getRightEye(),!0),g(e,this.faceLandmarks.getMouth(),!0)),o){e.strokeStyle=s,e.fillStyle=s;this.faceLandmarks.positions.forEach((function(t){e.beginPath(),e.arc(t.x,t.y,c,0,2*Math.PI),e.fill()}))}}}();function Zt(t,e){var n=[],r=Rt(t),o=r.extractWeights,i=r.getRemainingWeights,a=function(t,e){var n=At(t,e),r=Ct(t,e);return{extractConvParams:n,extractSeparableConvParams:r,extractReductionBlockParams:function(t,e,o){return{separable_conv0:r(t,e,o+"/separable_conv0"),separable_conv1:r(e,e,o+"/separable_conv1"),expansion_conv:n(t,e,1,o+"/expansion_conv")}},extractMainBlockParams:function(t,e){return{separable_conv0:r(t,t,e+"/separable_conv0"),separable_conv1:r(t,t,e+"/separable_conv1"),separable_conv2:r(t,t,e+"/separable_conv2")}}}}(o,n),c=a.extractConvParams,s=a.extractSeparableConvParams,u=a.extractReductionBlockParams,f=a.extractMainBlockParams,h={conv_in:c(3,32,3,"entry_flow/conv_in"),reduction_block_0:u(32,64,"entry_flow/reduction_block_0"),reduction_block_1:u(64,128,"entry_flow/reduction_block_1")},p={};S(e,0,1).forEach((function(t){p["main_block_"+t]=f(128,"middle_flow/main_block_"+t)}));var l={reduction_block:u(128,256,"exit_flow/reduction_block"),separable_conv:s(256,512,"exit_flow/separable_conv")};if(0!==i().length)throw new Error("weights remaing after extract: "+i().length);return{paramMappings:n,params:{entry_flow:h,middle_flow:p,exit_flow:l}}}function Qt(t,e){var n=[],r=function(t,e){var n=Lt(t,e),r=Bt(n),o=Ft(n);return{extractConvParams:r,extractSeparableConvParams:o,extractReductionBlockParams:function(t){return{separable_conv0:o(t+"/separable_conv0"),separable_conv1:o(t+"/separable_conv1"),expansion_conv:r(t+"/expansion_conv")}},extractMainBlockParams:function(t){return{separable_conv0:o(t+"/separable_conv0"),separable_conv1:o(t+"/separable_conv1"),separable_conv2:o(t+"/separable_conv2")}}}}(t,n),o=r.extractConvParams,i=r.extractSeparableConvParams,a=r.extractReductionBlockParams,c=r.extractMainBlockParams,s={conv_in:o("entry_flow/conv_in"),reduction_block_0:a("entry_flow/reduction_block_0"),reduction_block_1:a("entry_flow/reduction_block_1")},u={};S(e,0,1).forEach((function(t){u["main_block_"+t]=c("middle_flow/main_block_"+t)}));var f={reduction_block:a("exit_flow/reduction_block"),separable_conv:i("exit_flow/separable_conv")};return Tt(t,n),{params:{entry_flow:s,middle_flow:u,exit_flow:f},paramMappings:n}}function $t(t,e,n){return b.c(b.i(t,e.filters,n,"same"),e.bias)}function te(t,e,n){void 0===n&&(n=!0);var r=n?b.w(t):t;return r=Et(r,e.separable_conv0,[1,1]),r=Et(b.w(r),e.separable_conv1,[1,1]),r=b.s(r,[3,3],[2,2],"same"),r=b.c(r,$t(t,e.expansion_conv,[2,2]))}var ee,ne=function(t){function e(e){var n=t.call(this,"TinyXception")||this;return n._numMainBlocks=e,n}return Object(y.c)(e,t),e.prototype.forwardInput=function(t){var e=this,n=this.params;if(!n)throw new Error("TinyXception - load model before inference");return b.L((function(){var r=B(t.toBatchTensor(112,!0),[122.782,117.001,104.298]).div(b.y(256)),o=b.w($t(r,n.entry_flow.conv_in,[2,2]));return o=te(o,n.entry_flow.reduction_block_0,!1),o=te(o,n.entry_flow.reduction_block_1),S(e._numMainBlocks,0,1).forEach((function(t){o=function(t,e){var n=Et(b.w(t),e.separable_conv0,[1,1]);return n=Et(b.w(n),e.separable_conv1,[1,1]),n=Et(b.w(n),e.separable_conv2,[1,1]),b.c(n,t)}(o,n.middle_flow["main_block_"+t])})),o=te(o,n.exit_flow.reduction_block),o=b.w(Et(o,n.exit_flow.separable_conv,[1,1]))}))},e.prototype.forward=function(t){return Object(y.b)(this,void 0,void 0,(function(){var e;return Object(y.d)(this,(function(n){switch(n.label){case 0:return e=this.forwardInput,[4,bt(t)];case 1:return[2,e.apply(this,[n.sent()])]}}))}))},e.prototype.getDefaultModelName=function(){return"tiny_xception_model"},e.prototype.extractParamsFromWeigthMap=function(t){return Qt(t,this._numMainBlocks)},e.prototype.extractParams=function(t){return Zt(t,this._numMainBlocks)},e}(Ot);!function(t){t.FEMALE="female",t.MALE="male"}(ee||(ee={}));var re=function(t){function e(e){void 0===e&&(e=new ne(2));var n=t.call(this,"AgeGenderNet")||this;return n._faceFeatureExtractor=e,n}return Object(y.c)(e,t),Object.defineProperty(e.prototype,"faceFeatureExtractor",{get:function(){return this._faceFeatureExtractor},enumerable:!0,configurable:!0}),e.prototype.runNet=function(t){var e=this,n=this.params;if(!n)throw new Error(this._name+" - load model before inference");return b.L((function(){var r=t instanceof mt?e.faceFeatureExtractor.forwardInput(t):t,o=b.d(r,[7,7],[2,2],"valid").as2D(r.shape[0],-1);return{age:Wt(o,n.fc.age).as1D(),gender:Wt(o,n.fc.gender)}}))},e.prototype.forwardInput=function(t){var e=this;return b.L((function(){var n=e.runNet(t),r=n.age,o=n.gender;return{age:r,gender:b.D(o)}}))},e.prototype.forward=function(t){return Object(y.b)(this,void 0,void 0,(function(){var e;return Object(y.d)(this,(function(n){switch(n.label){case 0:return e=this.forwardInput,[4,bt(t)];case 1:return[2,e.apply(this,[n.sent()])]}}))}))},e.prototype.predictAgeAndGender=function(t){return Object(y.b)(this,void 0,void 0,(function(){var e,n,r,o,i,a,c=this;return Object(y.d)(this,(function(s){switch(s.label){case 0:return[4,bt(t)];case 1:return e=s.sent(),[4,this.forwardInput(e)];case 2:return n=s.sent(),r=b.O(n.age),o=b.O(n.gender),i=r.map((function(t,e){return{ageTensor:t,genderTensor:o[e]}})),[4,Promise.all(i.map((function(t){var e=t.ageTensor,n=t.genderTensor;return Object(y.b)(c,void 0,void 0,(function(){var t,r,o,i,a;return Object(y.d)(this,(function(c){switch(c.label){case 0:return[4,e.data()];case 1:return t=c.sent()[0],[4,n.data()];case 2:return r=c.sent()[0],i=(o=r>.5)?ee.MALE:ee.FEMALE,a=o?r:1-r,e.dispose(),n.dispose(),[2,{age:t,gender:i,genderProbability:a}]}}))}))})))];case 3:return a=s.sent(),n.age.dispose(),n.gender.dispose(),[2,e.isBatchInput?a:a[0]]}}))}))},e.prototype.getDefaultModelName=function(){return"age_gender_model"},e.prototype.dispose=function(e){void 0===e&&(e=!0),this.faceFeatureExtractor.dispose(e),t.prototype.dispose.call(this,e)},e.prototype.loadClassifierParams=function(t){var e=this.extractClassifierParams(t),n=e.params,r=e.paramMappings;this._params=n,this._paramMappings=r},e.prototype.extractClassifierParams=function(t){return function(t){var e=[],n=Rt(t),r=n.extractWeights,o=n.getRemainingWeights,i=Dt(r,e),a=i(512,1,"fc/age"),c=i(512,2,"fc/gender");if(0!==o().length)throw new Error("weights remaing after extract: "+o().length);return{paramMappings:e,params:{fc:{age:a,gender:c}}}}(t)},e.prototype.extractParamsFromWeigthMap=function(t){var e=Ut(t),n=e.featureExtractorMap,r=e.classifierMap;return this.faceFeatureExtractor.loadFromWeightMap(n),function(t){var e=[],n=Lt(t,e);function r(t){return{weights:n(t+"/weights",2),bias:n(t+"/bias",1)}}var o={fc:{age:r("fc/age"),gender:r("fc/gender")}};return Tt(t,e),{params:o,paramMappings:e}}(r)},e.prototype.extractParams=function(t){var e=t.slice(0,t.length-1539),n=t.slice(t.length-1539);return this.faceFeatureExtractor.extractWeights(e),this.extractClassifierParams(n)},e}(Ot),oe=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(y.c)(e,t),e.prototype.postProcess=function(t,e,n){var r=n.map((function(t){var n=t.width,r=t.height,o=e/Math.max(r,n);return{width:n*o,height:r*o}})),o=r.length;return b.L((function(){var n=function(t,e){return b.E([b.n([68],t),b.n([68],e)],1).as2D(1,136).as1D()},i=function(t,e){var n=r[t],o=n.width,i=n.height;return e(o,i)?Math.abs(o-i)/2:0};return t.mul(b.n([o,136],e)).sub(b.E(Array.from(Array(o),(function(t,e){return n(function(t){return i(t,(function(t,e){return t 0");if("number"!==typeof this._scaleFactor||this._scaleFactor<=0||this._scaleFactor>=1)throw new Error(this._name+" - expected scaleFactor to be a number between 0 and 1");if("number"!==typeof this._maxNumScales||this._maxNumScales<0)throw new Error(this._name+" - expected maxNumScales to be a number > 0");if(!Array.isArray(this._scoreThresholds)||3!==this._scoreThresholds.length||this._scoreThresholds.some((function(t){return"number"!==typeof t})))throw new Error(this._name+" - expected scoreThresholds to be an array of numbers of length 3");if(this._scaleSteps&&(!Array.isArray(this._scaleSteps)||this._scaleSteps.some((function(t){return"number"!==typeof t}))))throw new Error(this._name+" - expected scaleSteps to be an array of numbers")}return Object.defineProperty(t.prototype,"minFaceSize",{get:function(){return this._minFaceSize},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"scaleFactor",{get:function(){return this._scaleFactor},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"maxNumScales",{get:function(){return this._maxNumScales},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"scoreThresholds",{get:function(){return this._scoreThresholds},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"scaleSteps",{get:function(){return this._scaleSteps},enumerable:!0,configurable:!0}),t}();function _e(t,e){function n(n,r,o,i,a){var c=b.K(t(n*r*o*o),[o,o,n,r]),s=b.H(t(r));return e.push({paramPath:i+"/filters"},{paramPath:i+"/"+(a?"batch_norm_offset":"bias")}),{filters:c,bias:s}}function r(t,e,r,o){var i=n(t,e,r,o,!0);return{filters:i.filters,batch_norm_offset:i.bias}}function o(n,o,i){return{depthwise_conv:function(n,r){var o=b.K(t(9*n),[3,3,n,1]),i=b.H(t(n)),a=b.H(t(n)),c=b.H(t(n)),s=b.H(t(n));return e.push({paramPath:r+"/filters"},{paramPath:r+"/batch_norm_scale"},{paramPath:r+"/batch_norm_offset"},{paramPath:r+"/batch_norm_mean"},{paramPath:r+"/batch_norm_variance"}),{filters:o,batch_norm_scale:i,batch_norm_offset:a,batch_norm_mean:c,batch_norm_variance:s}}(n,i+"/depthwise_conv"),pointwise_conv:r(n,o,1,i+"/pointwise_conv")}}return{extractMobilenetV1Params:function(){return{conv_0:r(3,32,3,"mobilenetv1/conv_0"),conv_1:o(32,64,"mobilenetv1/conv_1"),conv_2:o(64,128,"mobilenetv1/conv_2"),conv_3:o(128,128,"mobilenetv1/conv_3"),conv_4:o(128,256,"mobilenetv1/conv_4"),conv_5:o(256,256,"mobilenetv1/conv_5"),conv_6:o(256,512,"mobilenetv1/conv_6"),conv_7:o(512,512,"mobilenetv1/conv_7"),conv_8:o(512,512,"mobilenetv1/conv_8"),conv_9:o(512,512,"mobilenetv1/conv_9"),conv_10:o(512,512,"mobilenetv1/conv_10"),conv_11:o(512,512,"mobilenetv1/conv_11"),conv_12:o(512,1024,"mobilenetv1/conv_12"),conv_13:o(1024,1024,"mobilenetv1/conv_13")}},extractPredictionLayerParams:function(){return{conv_0:r(1024,256,1,"prediction_layer/conv_0"),conv_1:r(256,512,3,"prediction_layer/conv_1"),conv_2:r(512,128,1,"prediction_layer/conv_2"),conv_3:r(128,256,3,"prediction_layer/conv_3"),conv_4:r(256,128,1,"prediction_layer/conv_4"),conv_5:r(128,256,3,"prediction_layer/conv_5"),conv_6:r(256,64,1,"prediction_layer/conv_6"),conv_7:r(64,128,3,"prediction_layer/conv_7"),box_predictor_0:{box_encoding_predictor:n(512,12,1,"prediction_layer/box_predictor_0/box_encoding_predictor"),class_predictor:n(512,9,1,"prediction_layer/box_predictor_0/class_predictor")},box_predictor_1:{box_encoding_predictor:n(1024,24,1,"prediction_layer/box_predictor_1/box_encoding_predictor"),class_predictor:n(1024,18,1,"prediction_layer/box_predictor_1/class_predictor")},box_predictor_2:{box_encoding_predictor:n(512,24,1,"prediction_layer/box_predictor_2/box_encoding_predictor"),class_predictor:n(512,18,1,"prediction_layer/box_predictor_2/class_predictor")},box_predictor_3:{box_encoding_predictor:n(256,24,1,"prediction_layer/box_predictor_3/box_encoding_predictor"),class_predictor:n(256,18,1,"prediction_layer/box_predictor_3/class_predictor")},box_predictor_4:{box_encoding_predictor:n(256,24,1,"prediction_layer/box_predictor_4/box_encoding_predictor"),class_predictor:n(256,18,1,"prediction_layer/box_predictor_4/class_predictor")},box_predictor_5:{box_encoding_predictor:n(128,24,1,"prediction_layer/box_predictor_5/box_encoding_predictor"),class_predictor:n(128,18,1,"prediction_layer/box_predictor_5/class_predictor")}}}}}function xe(t){var e=[],n=function(t,e){var n=Lt(t,e);function r(t,e,r){return{filters:n(t+"/Conv2d_"+e+"_pointwise/weights",4,r+"/filters"),batch_norm_offset:n(t+"/Conv2d_"+e+"_pointwise/convolution_bn_offset",1,r+"/batch_norm_offset")}}function o(t){var e="mobilenetv1/conv_"+t,o="MobilenetV1/Conv2d_"+t+"_depthwise",i=e+"/depthwise_conv",a=e+"/pointwise_conv";return{depthwise_conv:{filters:n(o+"/depthwise_weights",4,i+"/filters"),batch_norm_scale:n(o+"/BatchNorm/gamma",1,i+"/batch_norm_scale"),batch_norm_offset:n(o+"/BatchNorm/beta",1,i+"/batch_norm_offset"),batch_norm_mean:n(o+"/BatchNorm/moving_mean",1,i+"/batch_norm_mean"),batch_norm_variance:n(o+"/BatchNorm/moving_variance",1,i+"/batch_norm_variance")},pointwise_conv:r("MobilenetV1",t,a)}}function i(t,e){return{filters:n(t+"/weights",4,e+"/filters"),bias:n(t+"/biases",1,e+"/bias")}}function a(t){return{box_encoding_predictor:i("Prediction/BoxPredictor_"+t+"/BoxEncodingPredictor","prediction_layer/box_predictor_"+t+"/box_encoding_predictor"),class_predictor:i("Prediction/BoxPredictor_"+t+"/ClassPredictor","prediction_layer/box_predictor_"+t+"/class_predictor")}}return{extractMobilenetV1Params:function(){return{conv_0:r("MobilenetV1",0,"mobilenetv1/conv_0"),conv_1:o(1),conv_2:o(2),conv_3:o(3),conv_4:o(4),conv_5:o(5),conv_6:o(6),conv_7:o(7),conv_8:o(8),conv_9:o(9),conv_10:o(10),conv_11:o(11),conv_12:o(12),conv_13:o(13)}},extractPredictionLayerParams:function(){return{conv_0:r("Prediction",0,"prediction_layer/conv_0"),conv_1:r("Prediction",1,"prediction_layer/conv_1"),conv_2:r("Prediction",2,"prediction_layer/conv_2"),conv_3:r("Prediction",3,"prediction_layer/conv_3"),conv_4:r("Prediction",4,"prediction_layer/conv_4"),conv_5:r("Prediction",5,"prediction_layer/conv_5"),conv_6:r("Prediction",6,"prediction_layer/conv_6"),conv_7:r("Prediction",7,"prediction_layer/conv_7"),box_predictor_0:a(0),box_predictor_1:a(1),box_predictor_2:a(2),box_predictor_3:a(3),box_predictor_4:a(4),box_predictor_5:a(5)}}}}(t,e),r=n.extractMobilenetV1Params,o=n.extractPredictionLayerParams,i=t["Output/extra_dim"];if(e.push({originalPath:"Output/extra_dim",paramPath:"output_layer/extra_dim"}),!x(i))throw new Error("expected weightMap['Output/extra_dim'] to be a Tensor3D, instead have "+i);var a={mobilenetv1:r(),prediction_layer:o(),output_layer:{extra_dim:i}};return Tt(t,e),{params:a,paramMappings:e}}function Pe(t,e,n){return b.L((function(){var r=b.i(t,e.filters,n,"same");return r=b.c(r,e.batch_norm_offset),b.g(r,0,6)}))}function Oe(t,e){return b.L((function(){var n=null,r=Pe(t,e.conv_0,[2,2]);if([e.conv_1,e.conv_2,e.conv_3,e.conv_4,e.conv_5,e.conv_6,e.conv_7,e.conv_8,e.conv_9,e.conv_10,e.conv_11,e.conv_12,e.conv_13].forEach((function(t,e){var o=e+1,i=function(t){return[2,4,6,12].some((function(e){return e===t}))?[2,2]:[1,1]}(o);r=Pe(r=function(t,e,n){return b.L((function(){var r=b.j(t,e.filters,n,"same");return r=b.e(r,e.batch_norm_mean,e.batch_norm_variance,e.batch_norm_offset,e.batch_norm_scale,.0010000000474974513),b.g(r,0,6)}))}(r,t.depthwise_conv,i),t.pointwise_conv,[1,1]),11===o&&(n=r)})),null===n)throw new Error("mobileNetV1 - output of conv layer 11 is null");return{out:r,conv11:n}}))}function Ee(t,e,n){var r=t.arraySync(),o=Math.min(r[e][0],r[e][2]),i=Math.min(r[e][1],r[e][3]),a=Math.max(r[e][0],r[e][2]),c=Math.max(r[e][1],r[e][3]),s=Math.min(r[n][0],r[n][2]),u=Math.min(r[n][1],r[n][3]),f=Math.max(r[n][0],r[n][2]),h=Math.max(r[n][1],r[n][3]),p=(a-o)*(c-i),l=(f-s)*(h-u);if(p<=0||l<=0)return 0;var d=Math.max(o,s),v=Math.max(i,u),m=Math.min(a,f),b=Math.min(c,h),g=Math.max(m-d,0)*Math.max(b-v,0);return g/(p+l-g)}function je(t,e){var n=function(t){var e=b.O(b.N(t,[1,0])),n=[b.F(e[2],e[0]),b.F(e[3],e[1])];return{sizes:n,centers:[b.c(e[0],b.k(n[0],b.y(2))),b.c(e[1],b.k(n[1],b.y(2)))]}}(t),r=n.sizes,o=n.centers,i=b.O(b.N(e,[1,0])),a=b.k(b.t(b.l(b.k(i[2],b.y(5))),r[0]),b.y(2)),c=b.c(b.t(b.k(i[0],b.y(10)),r[0]),o[0]),s=b.k(b.t(b.l(b.k(i[3],b.y(5))),r[1]),b.y(2)),u=b.c(b.t(b.k(i[1],b.y(10)),r[1]),o[1]);return b.N(b.E([b.F(c,a),b.F(u,s),b.c(c,a),b.c(u,s)]),[1,0])}function Me(t,e){return b.L((function(){var n=t.shape[0];return{boxPredictionEncoding:b.x(St(t,e.box_encoding_predictor),[n,-1,1,4]),classPrediction:b.x(St(t,e.class_predictor),[n,-1,3])}}))}var Se=function(){function t(t){var e=void 0===t?{}:t,n=e.minConfidence,r=e.maxResults;if(this._name="SsdMobilenetv1Options",this._minConfidence=n||.5,this._maxResults=r||100,"number"!==typeof this._minConfidence||this._minConfidence<=0||this._minConfidence>=1)throw new Error(this._name+" - expected minConfidence to be a number between 0 and 1");if("number"!==typeof this._maxResults)throw new Error(this._name+" - expected maxResults to be a number")}return Object.defineProperty(t.prototype,"minConfidence",{get:function(){return this._minConfidence},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"maxResults",{get:function(){return this._maxResults},enumerable:!0,configurable:!0}),t}(),Te=function(t){function e(){return t.call(this,"SsdMobilenetv1")||this}return Object(y.c)(e,t),e.prototype.forwardInput=function(t){var e=this.params;if(!e)throw new Error("SsdMobilenetv1 - load model before inference");return b.L((function(){var n=t.toBatchTensor(512,!1).toFloat(),r=Oe(b.F(b.t(n,b.y(.007843137718737125)),b.y(1)),e.mobilenetv1),o=function(t,e,n){return b.L((function(){var r=Pe(t,n.conv_0,[1,1]),o=Pe(r,n.conv_1,[2,2]),i=Pe(o,n.conv_2,[1,1]),a=Pe(i,n.conv_3,[2,2]),c=Pe(a,n.conv_4,[1,1]),s=Pe(c,n.conv_5,[2,2]),u=Pe(s,n.conv_6,[1,1]),f=Pe(u,n.conv_7,[2,2]),h=Me(e,n.box_predictor_0),p=Me(t,n.box_predictor_1),l=Me(o,n.box_predictor_2),d=Me(a,n.box_predictor_3),v=Me(s,n.box_predictor_4),m=Me(f,n.box_predictor_5);return{boxPredictions:b.h([h.boxPredictionEncoding,p.boxPredictionEncoding,l.boxPredictionEncoding,d.boxPredictionEncoding,v.boxPredictionEncoding,m.boxPredictionEncoding],1),classPredictions:b.h([h.classPrediction,p.classPrediction,l.classPrediction,d.classPrediction,v.classPrediction,m.classPrediction],1)}}))}(r.out,r.conv11,e.prediction_layer);return function(t,e,n){return b.L((function(){var r=t.shape[0],o=je(b.x(b.M(n.extra_dim,[r,1,1]),[-1,4]),b.x(t,[-1,4]));o=b.x(o,[r,o.shape[0]/r,4]);var i=b.A(b.B(e,[0,0,1],[-1,-1,-1])),a=b.B(i,[0,0,0],[-1,-1,1]);return a=b.x(a,[r,a.shape[1]]),{boxes:b.O(o),scores:b.O(a)}}))}(o.boxPredictions,o.classPredictions,e.output_layer)}))},e.prototype.forward=function(t){return Object(y.b)(this,void 0,void 0,(function(){var e;return Object(y.d)(this,(function(n){switch(n.label){case 0:return e=this.forwardInput,[4,bt(t)];case 1:return[2,e.apply(this,[n.sent()])]}}))}))},e.prototype.locateFaces=function(t,e){return void 0===e&&(e={}),Object(y.b)(this,void 0,void 0,(function(){var n,r,o,i,a,c,s,u,f,h,p,l,d,v,m,b,g,w,_,x;return Object(y.d)(this,(function(y){switch(y.label){case 0:return n=new Se(e),r=n.maxResults,o=n.minConfidence,[4,bt(t)];case 1:for(i=y.sent(),a=this.forwardInput(i),c=a.boxes,s=a.scores,u=c[0],f=s[0],h=1;ho})).sort((function(t,e){return e.score-t.score})),s=[];return c.forEach((function(e){if(!(s.length>=a)){for(var n=e.score,i=s.length-1;i>=0;--i){var c=Ee(t,e.boxIndex,s[i]);if(0!==c&&(e.score*=c<=r?1:0,e.score<=o))break}n===e.score&&s.push(e.boxIndex)}})),s}(u,p,r,.5,o),m=i.getReshapedInputDimensions(0),b=i.inputSize,g=b/m.width,w=b/m.height,_=u.arraySync(),x=v.map((function(t){var e=[Math.max(0,_[t][0]),Math.min(1,_[t][2])].map((function(t){return t*w})),n=e[0],r=e[1],o=[Math.max(0,_[t][1]),Math.min(1,_[t][3])].map((function(t){return t*g})),a=o[0],c=o[1];return new L(p[t],new z(a,n,c-a,r-n),{height:i.getInputHeight(0),width:i.getInputWidth(0)})})),u.dispose(),f.dispose(),[2,x]}}))}))},e.prototype.getDefaultModelName=function(){return"ssd_mobilenetv1_model"},e.prototype.extractParamsFromWeigthMap=function(t){return xe(t)},e.prototype.extractParams=function(t){return function(t){var e=[],n=Rt(t),r=n.extractWeights,o=n.getRemainingWeights,i=_e(r,e),a=i.extractMobilenetV1Params,c=i.extractPredictionLayerParams,s=a(),u=c(),f={extra_dim:b.J(r(20472),[1,5118,4])};if(e.push({paramPath:"output_layer/extra_dim"}),0!==o().length)throw new Error("weights remaing after extract: "+o().length);return{params:{mobilenetv1:s,prediction_layer:u,output_layer:f},paramMappings:e}}(t)},e}(Ot);!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(y.c)(e,t)}(Te);var Ae,De=[new D(.738768,.874946),new D(2.42204,2.65704),new D(4.30971,7.04493),new D(10.246,4.59428),new D(12.6868,11.8741)],Ie=[new D(1.603231,2.094468),new D(6.041143,7.080126),new D(2.882459,3.518061),new D(4.266906,5.178857),new D(9.041765,10.66308)],Ce=[117.001,114.697,97.404],Fe=function(t){return"number"===typeof t};function Le(t){return b.L((function(){var e=b.t(t,b.y(.10000000149011612));return b.c(b.w(b.F(t,e)),e)}))}function Re(t,e){return b.L((function(){var n=b.v(t,[[0,0],[1,1],[1,1],[0,0]]);return n=b.i(n,e.conv.filters,[1,1],"valid"),n=b.F(n,e.bn.sub),n=b.t(n,e.bn.truediv),Le(n=b.c(n,e.conv.bias))}))}function ke(t,e){return b.L((function(){var n=b.v(t,[[0,0],[1,1],[1,1],[0,0]]);return n=b.z(n,e.depthwise_filter,e.pointwise_filter,[1,1],"valid"),Le(n=b.c(n,e.bias))}))}function Be(t,e){var n=At(t,e);var r=Ct(t,e);return{extractConvParams:n,extractConvWithBatchNormParams:function(r,o,i){return{conv:n(r,o,3,i+"/conv"),bn:function(n,r){var o=b.H(t(n)),i=b.H(t(n));return e.push({paramPath:r+"/sub"},{paramPath:r+"/truediv"}),{sub:o,truediv:i}}(o,i+"/bn")}},extractSeparableConvParams:r}}function Ne(t,e){var n=Lt(t,e);function r(t){return{filters:n(t+"/filters",4),bias:n(t+"/bias",1)}}return{extractConvParams:r,extractConvWithBatchNormParams:function(t){return{conv:r(t+"/conv"),bn:function(t){return{sub:n(t+"/sub",1),truediv:n(t+"/truediv",1)}}(t+"/bn")}},extractSeparableConvParams:Ft(n)}}!function(t){t[t.XS=224]="XS",t[t.SM=320]="SM",t[t.MD=416]="MD",t[t.LG=608]="LG"}(Ae||(Ae={}));var ze=function(){function t(t){var e=void 0===t?{}:t,n=e.inputSize,r=e.scoreThreshold;if(this._name="TinyYolov2Options",this._inputSize=n||416,this._scoreThreshold=r||.5,"number"!==typeof this._inputSize||this._inputSize%32!==0)throw new Error(this._name+" - expected inputSize to be a number divisible by 32");if("number"!==typeof this._scoreThreshold||this._scoreThreshold<=0||this._scoreThreshold>=1)throw new Error(this._name+" - expected scoreThreshold to be a number between 0 and 1")}return Object.defineProperty(t.prototype,"inputSize",{get:function(){return this._inputSize},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"scoreThreshold",{get:function(){return this._scoreThreshold},enumerable:!0,configurable:!0}),t}(),We=function(t){function e(e){var n=t.call(this,"TinyYolov2")||this;return function(t){if(!t)throw new Error("invalid config: "+t);if("boolean"!==typeof t.withSeparableConvs)throw new Error("config.withSeparableConvs has to be a boolean, have: "+t.withSeparableConvs);if(!Fe(t.iouThreshold)||t.iouThreshold<0||t.iouThreshold>1)throw new Error("config.iouThreshold has to be a number between [0, 1], have: "+t.iouThreshold);if(!Array.isArray(t.classes)||!t.classes.length||!t.classes.every((function(t){return"string"===typeof t})))throw new Error("config.classes has to be an array class names: string[], have: "+JSON.stringify(t.classes));if(!Array.isArray(t.anchors)||!t.anchors.length||!t.anchors.map((function(t){return t||{}})).every((function(t){return Fe(t.x)&&Fe(t.y)})))throw new Error("config.anchors has to be an array of { x: number, y: number }, have: "+JSON.stringify(t.anchors));if(t.meanRgb&&(!Array.isArray(t.meanRgb)||3!==t.meanRgb.length||!t.meanRgb.every(Fe)))throw new Error("config.meanRgb has to be an array of shape [number, number, number], have: "+JSON.stringify(t.meanRgb))}(e),n._config=e,n}return Object(y.c)(e,t),Object.defineProperty(e.prototype,"config",{get:function(){return this._config},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"withClassScores",{get:function(){return this.config.withClassScores||this.config.classes.length>1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"boxEncodingSize",{get:function(){return 5+(this.withClassScores?this.config.classes.length:0)},enumerable:!0,configurable:!0}),e.prototype.runTinyYolov2=function(t,e){var n=Re(t,e.conv0);return n=Re(n=b.s(n,[2,2],[2,2],"same"),e.conv1),n=Re(n=b.s(n,[2,2],[2,2],"same"),e.conv2),n=Re(n=b.s(n,[2,2],[2,2],"same"),e.conv3),n=Re(n=b.s(n,[2,2],[2,2],"same"),e.conv4),n=Re(n=b.s(n,[2,2],[2,2],"same"),e.conv5),n=Re(n=b.s(n,[2,2],[1,1],"same"),e.conv6),St(n=Re(n,e.conv7),e.conv8,"valid",!1)},e.prototype.runMobilenet=function(t,e){var n=this.config.isFirstLayerConv2d?Le(St(t,e.conv0,"valid",!1)):ke(t,e.conv0);return n=ke(n=b.s(n,[2,2],[2,2],"same"),e.conv1),n=ke(n=b.s(n,[2,2],[2,2],"same"),e.conv2),n=ke(n=b.s(n,[2,2],[2,2],"same"),e.conv3),n=ke(n=b.s(n,[2,2],[2,2],"same"),e.conv4),n=ke(n=b.s(n,[2,2],[2,2],"same"),e.conv5),n=b.s(n,[2,2],[1,1],"same"),n=e.conv6?ke(n,e.conv6):n,St(n=e.conv7?ke(n,e.conv7):n,e.conv8,"valid",!1)},e.prototype.forwardInput=function(t,e){var n=this,r=this.params;if(!r)throw new Error("TinyYolov2 - load model before inference");return b.L((function(){var o=t.toBatchTensor(e,!1).toFloat();return o=(o=n.config.meanRgb?B(o,n.config.meanRgb):o).div(b.y(256)),n.config.withSeparableConvs?n.runMobilenet(o,r):n.runTinyYolov2(o,r)}))},e.prototype.forward=function(t,e){return Object(y.b)(this,void 0,void 0,(function(){var n;return Object(y.d)(this,(function(r){switch(r.label){case 0:return n=this.forwardInput,[4,bt(t)];case 1:return[4,n.apply(this,[r.sent(),e])];case 2:return[2,r.sent()]}}))}))},e.prototype.detect=function(t,e){return void 0===e&&(e={}),Object(y.b)(this,void 0,void 0,(function(){var n,r,o,i,a,c,s,u,f,h,p,l,d,v=this;return Object(y.d)(this,(function(m){switch(m.label){case 0:return n=new ze(e),r=n.inputSize,o=n.scoreThreshold,[4,bt(t)];case 1:return i=m.sent(),[4,this.forwardInput(i,r)];case 2:return a=m.sent(),c=b.L((function(){return b.O(a)[0].expandDims()})),s={width:i.getInputWidth(0),height:i.getInputHeight(0)},[4,this.extractBoxes(c,i.getReshapedInputDimensions(0),o)];case 3:return u=m.sent(),a.dispose(),c.dispose(),f=u.map((function(t){return t.box})),h=u.map((function(t){return t.score})),p=u.map((function(t){return t.classScore})),l=u.map((function(t){return v.config.classes[t.label]})),d=k(f.map((function(t){return t.rescale(r)})),h,this.config.iouThreshold,!0),[2,d.map((function(t){return new F(h[t],p[t],l[t],f[t],s)}))]}}))}))},e.prototype.getDefaultModelName=function(){return""},e.prototype.extractParamsFromWeigthMap=function(t){return function(t,e){var n,r=[],o=Ne(t,r),i=o.extractConvParams,a=o.extractConvWithBatchNormParams,c=o.extractSeparableConvParams;if(e.withSeparableConvs){var s=e.filterSizes&&e.filterSizes.length||9;n={conv0:e.isFirstLayerConv2d?i("conv0"):c("conv0"),conv1:c("conv1"),conv2:c("conv2"),conv3:c("conv3"),conv4:c("conv4"),conv5:c("conv5"),conv6:s>7?c("conv6"):void 0,conv7:s>8?c("conv7"):void 0,conv8:i("conv8")}}else n={conv0:a("conv0"),conv1:a("conv1"),conv2:a("conv2"),conv3:a("conv3"),conv4:a("conv4"),conv5:a("conv5"),conv6:a("conv6"),conv7:a("conv7"),conv8:i("conv8")};return Tt(t,r),{params:n,paramMappings:r}}(t,this.config)},e.prototype.extractParams=function(t){var n=this.config.filterSizes||e.DEFAULT_FILTER_SIZES,r=n?n.length:void 0;if(7!==r&&8!==r&&9!==r)throw new Error("TinyYolov2 - expected 7 | 8 | 9 convolutional filters, but found "+r+" filterSizes in config");return function(t,e,n,r){var o,i=Rt(t),a=i.extractWeights,c=i.getRemainingWeights,s=[],u=Be(a,s),f=u.extractConvParams,h=u.extractConvWithBatchNormParams,p=u.extractSeparableConvParams;if(e.withSeparableConvs){var l=r[0],d=r[1],v=r[2],m=r[3],b=r[4],g=r[5],y=r[6],w=r[7],_=r[8];o={conv0:e.isFirstLayerConv2d?f(l,d,3,"conv0"):p(l,d,"conv0"),conv1:p(d,v,"conv1"),conv2:p(v,m,"conv2"),conv3:p(m,b,"conv3"),conv4:p(b,g,"conv4"),conv5:p(g,y,"conv5"),conv6:w?p(y,w,"conv6"):void 0,conv7:_?p(w,_,"conv7"):void 0,conv8:f(_||w||y,5*n,1,"conv8")}}else l=r[0],d=r[1],v=r[2],m=r[3],b=r[4],g=r[5],y=r[6],w=r[7],_=r[8],o={conv0:h(l,d,"conv0"),conv1:h(d,v,"conv1"),conv2:h(v,m,"conv2"),conv3:h(m,b,"conv3"),conv4:h(b,g,"conv4"),conv5:h(g,y,"conv5"),conv6:h(y,w,"conv6"),conv7:h(w,_,"conv7"),conv8:f(_,5*n,1,"conv8")};if(0!==c().length)throw new Error("weights remaing after extract: "+c().length);return{params:o,paramMappings:s}}(t,this.config,this.boxEncodingSize,n)},e.prototype.extractBoxes=function(t,e,n){return Object(y.b)(this,void 0,void 0,(function(){var r,o,i,a,c,s,u,f,h,p,l,d,v,m,g,w,_,x,P,O,E,j,M,S,T,A,D,I,F,L=this;return Object(y.d)(this,(function(R){switch(R.label){case 0:return r=e.width,o=e.height,i=Math.max(r,o),a=i/r,c=i/o,s=t.shape[1],u=this.config.anchors.length,f=b.L((function(){var e=t.reshape([s,s,u,L.boxEncodingSize]);return[e.slice([0,0,0,0],[s,s,u,4]),e.slice([0,0,0,4],[s,s,u,1]),L.withClassScores?b.D(e.slice([0,0,0,5],[s,s,u,L.config.classes.length]),3):b.y(0)]})),h=f[0],p=f[1],l=f[2],d=[],[4,p.array()];case 1:return v=R.sent(),[4,h.array()];case 2:m=R.sent(),g=0,R.label=3;case 3:if(!(gn?(P=(w+N(m[g][w][_][0]))/s*a,O=(g+N(m[g][w][_][1]))/s*c,E=Math.exp(m[g][w][_][2])*this.config.anchors[_].x/s*a,j=Math.exp(m[g][w][_][3])*this.config.anchors[_].y/s*c,M=P-E/2,S=O-j/2,T={row:g,col:w,anchor:_},this.withClassScores?[4,this.extractPredictedClass(l,T)]:[3,7]):[3,9]):[3,10];case 6:return F=R.sent(),[3,8];case 7:F={classScore:1,label:0},R.label=8;case 8:D=(A=F).classScore,I=A.label,d.push(Object(y.a)({box:new C(M,S,M+E,S+j),score:x,classScore:x*D,label:I},T)),R.label=9;case 9:return _++,[3,5];case 10:return w++,[3,4];case 11:return g++,[3,3];case 12:return h.dispose(),p.dispose(),l.dispose(),[2,d]}}))}))},e.prototype.extractPredictedClass=function(t,e){return Object(y.b)(this,void 0,void 0,(function(){var n,r,o,i;return Object(y.d)(this,(function(a){switch(a.label){case 0:return n=e.row,r=e.col,o=e.anchor,[4,t.array()];case 1:return i=a.sent(),[2,Array(this.config.classes.length).fill(0).map((function(t,e){return i[n][r][o][e]})).map((function(t,e){return{classScore:t,label:e}})).reduce((function(t,e){return t.classScore>e.classScore?t:e}))]}}))}))},e.DEFAULT_FILTER_SIZES=[3,16,32,64,128,256,512,1024,1024],e}(Ot),Ue=function(t){function e(e){void 0===e&&(e=!0);var n=Object.assign({},{withSeparableConvs:e,iouThreshold:.4,classes:["face"]},e?{anchors:Ie,meanRgb:Ce}:{anchors:De,withClassScores:!0});return t.call(this,n)||this}return Object(y.c)(e,t),Object.defineProperty(e.prototype,"withSeparableConvs",{get:function(){return this.config.withSeparableConvs},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"anchors",{get:function(){return this.config.anchors},enumerable:!0,configurable:!0}),e.prototype.locateFaces=function(t,e){return Object(y.b)(this,void 0,void 0,(function(){return Object(y.d)(this,(function(n){switch(n.label){case 0:return[4,this.detect(t,e)];case 1:return[2,n.sent().map((function(t){return new L(t.score,t.relativeBox,{width:t.imageWidth,height:t.imageHeight})}))]}}))}))},e.prototype.getDefaultModelName=function(){return this.withSeparableConvs?"tiny_yolov2_separable_conv_model":"tiny_yolov2_model"},e.prototype.extractParamsFromWeigthMap=function(e){return t.prototype.extractParamsFromWeigthMap.call(this,e)},e}(We);var He=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._name="TinyFaceDetectorOptions",e}return Object(y.c)(e,t),e}(ze),Ye=function(){function t(){}return t.prototype.then=function(t){return Object(y.b)(this,void 0,void 0,(function(){var e;return Object(y.d)(this,(function(n){switch(n.label){case 0:return e=t,[4,this.run()];case 1:return[2,e.apply(void 0,[n.sent()])]}}))}))},t.prototype.run=function(){return Object(y.b)(this,void 0,void 0,(function(){return Object(y.d)(this,(function(t){throw new Error("ComposableTask - run is not implemented")}))}))},t}();function qe(t,e,n,r,o){return void 0===o&&(o=function(t){return t.alignedRect}),Object(y.b)(this,void 0,void 0,(function(){var i,a,c,s,u;return Object(y.d)(this,(function(f){switch(f.label){case 0:return i=t.map((function(t){return Jt(t)?o(t):t.detection})),(c=r)?[3,5]:e instanceof b.a?[4,yt(e,i)]:[3,2];case 1:return s=f.sent(),[3,4];case 2:return[4,gt(e,i)];case 3:s=f.sent(),f.label=4;case 4:c=s,f.label=5;case 5:return[4,n(a=c)];case 6:return u=f.sent(),a.forEach((function(t){return t instanceof b.a&&t.dispose()})),[2,u]}}))}))}function Ge(t,e,n,r,o){return Object(y.b)(this,void 0,void 0,(function(){var i=this;return Object(y.d)(this,(function(a){return[2,qe([t],e,(function(t){return Object(y.b)(i,void 0,void 0,(function(){return Object(y.d)(this,(function(e){return[2,n(t[0])]}))}))}),r,o)]}))}))}function Ve(t){var e=Rt(t),n=e.extractWeights,r=e.getRemainingWeights,o=[],i=function(t,e){var n=At(t,e),r=Dt(t,e);function o(n,r){var o=b.H(t(n));return e.push({paramPath:r}),o}function i(t,e,r){return void 0===r&&(r=!1),{conv1:n(t[0],t[1],3,e+"/conv1"),prelu1_alpha:o(t[1],e+"/prelu1_alpha"),conv2:n(t[1],t[2],3,e+"/conv2"),prelu2_alpha:o(t[2],e+"/prelu2_alpha"),conv3:n(t[2],t[3],r?2:3,e+"/conv3"),prelu3_alpha:o(t[3],e+"/prelu3_alpha")}}return{extractPNetParams:function(){var t=i([3,10,16,32],"pnet"),e=n(32,2,1,"pnet/conv4_1"),r=n(32,4,1,"pnet/conv4_2");return Object(y.a)(Object(y.a)({},t),{conv4_1:e,conv4_2:r})},extractRNetParams:function(){var t=i([3,28,48,64],"rnet",!0),e=r(576,128,"rnet/fc1"),n=o(128,"rnet/prelu4_alpha"),a=r(128,2,"rnet/fc2_1"),c=r(128,4,"rnet/fc2_2");return Object(y.a)(Object(y.a)({},t),{fc1:e,prelu4_alpha:n,fc2_1:a,fc2_2:c})},extractONetParams:function(){var t=i([3,32,64,64],"onet"),e=n(64,128,2,"onet/conv4"),a=o(128,"onet/prelu4_alpha"),c=r(1152,256,"onet/fc1"),s=o(256,"onet/prelu5_alpha"),u=r(256,2,"onet/fc2_1"),f=r(256,4,"onet/fc2_2"),h=r(256,10,"onet/fc2_3");return Object(y.a)(Object(y.a)({},t),{conv4:e,prelu4_alpha:a,fc1:c,prelu5_alpha:s,fc2_1:u,fc2_2:f,fc2_3:h})}}}(n,o),a=i.extractPNetParams,c=i.extractRNetParams,s=i.extractONetParams,u=a(),f=c(),h=s();if(0!==r().length)throw new Error("weights remaing after extract: "+r().length);return{params:{pnet:u,rnet:f,onet:h},paramMappings:o}}function Je(t){var e=[],n=function(t,e){var n=Lt(t,e);function r(t){return{filters:n(t+"/weights",4,t+"/filters"),bias:n(t+"/bias",1)}}function o(t){return{weights:n(t+"/weights",2),bias:n(t+"/bias",1)}}function i(t){return n(t,1)}function a(t){return{conv1:r(t+"/conv1"),prelu1_alpha:i(t+"/prelu1_alpha"),conv2:r(t+"/conv2"),prelu2_alpha:i(t+"/prelu2_alpha"),conv3:r(t+"/conv3"),prelu3_alpha:i(t+"/prelu3_alpha")}}return{extractPNetParams:function(){var t=a("pnet"),e=r("pnet/conv4_1"),n=r("pnet/conv4_2");return Object(y.a)(Object(y.a)({},t),{conv4_1:e,conv4_2:n})},extractRNetParams:function(){var t=a("rnet"),e=o("rnet/fc1"),n=i("rnet/prelu4_alpha"),r=o("rnet/fc2_1"),c=o("rnet/fc2_2");return Object(y.a)(Object(y.a)({},t),{fc1:e,prelu4_alpha:n,fc2_1:r,fc2_2:c})},extractONetParams:function(){var t=a("onet"),e=r("onet/conv4"),n=i("onet/prelu4_alpha"),c=o("onet/fc1"),s=i("onet/prelu5_alpha"),u=o("onet/fc2_1"),f=o("onet/fc2_2"),h=o("onet/fc2_3");return Object(y.a)(Object(y.a)({},t),{conv4:e,prelu4_alpha:n,fc1:c,prelu5_alpha:s,fc2_1:u,fc2_2:f,fc2_3:h})}}}(t,e),r=n.extractPNetParams,o=n.extractRNetParams,i=n.extractONetParams,a=r(),c=o(),s=i();return Tt(t,e),{params:{pnet:a,rnet:c,onet:s},paramMappings:e}}function Xe(t,e){var n=e[0],r=e[1];return{height:Math.floor(n*t),width:Math.floor(r*t)}}var Ke=function(t){function e(e,n,r,o){return t.call(this,{left:e,top:n,right:r,bottom:o},!0)||this}return Object(y.c)(e,t),e}(I);function Ze(t){return b.L((function(){return b.t(b.F(t,b.y(127.5)),b.y(.0078125))}))}function Qe(t,e){return b.L((function(){return b.c(b.w(t),b.t(e,b.u(b.w(b.u(t)))))}))}function $e(t,e,n){return void 0===n&&(n=!1),b.L((function(){var r=St(t,e.conv1,"valid");return r=Qe(r,e.prelu1_alpha),r=Qe(r=St(r=b.s(r,n?[2,2]:[3,3],[2,2],"same"),e.conv2,"valid"),e.prelu2_alpha),r=Qe(r=St(r=n?r:b.s(r,[3,3],[2,2],"valid"),e.conv3,"valid"),e.prelu3_alpha)}))}function tn(t,e,n,r,o){o.stage1=[];var i=e.map((function(e){return b.L((function(){var n={scale:e},o=function(t,e){return b.L((function(){var n=Xe(e,t.shape.slice(1)),r=n.height,o=n.width,i=Ze(b.o.resizeBilinear(t,[r,o]));return b.N(i,[0,2,1,3])}))}(t,e),i=Date.now(),a=function(t,e){return b.L((function(){var n=$e(t,e,!0),r=St(n,e.conv4_1,"valid"),o=b.m(b.r(r,3),3);return{prob:b.D(b.F(r,o),3),regions:St(n,e.conv4_2,"valid")}}))}(o,r),c=a.prob,s=a.regions;return n.pnet=Date.now()-i,{scoresTensor:b.O(b.O(c,3)[1])[0],regionsTensor:b.O(s)[0],scale:e,statsForScale:n}}))})).map((function(t){var e=t.scoresTensor,r=t.regionsTensor,i=t.scale,a=t.statsForScale,c=function(t,e,n,r){for(var o=[],i=t.arraySync(),a=0;a=r&&o.push(new D(c,a));return o.map((function(t){var r=new C(Math.round((2*t.y+1)/n),Math.round((2*t.x+1)/n),Math.round((2*t.y+12)/n),Math.round((2*t.x+12)/n)),o=i[t.y][t.x],a=e.arraySync();return{cell:r,score:o,region:new Ke(a[t.y][t.x][0],a[t.y][t.x][1],a[t.y][t.x][2],a[t.y][t.x][3])}}))}(e,r,i,n);if(e.dispose(),r.dispose(),!c.length)return o.stage1.push(a),[];var s=Date.now(),u=k(c.map((function(t){return t.cell})),c.map((function(t){return t.score})),.5);return a.nms=Date.now()-s,a.numBoxes=u.length,o.stage1.push(a),u.map((function(t){return c[t]}))})).reduce((function(t,e){return t.concat(e)}),[]),a=[],c=[];if(i.length>0){var s=Date.now(),u=k(i.map((function(t){return t.cell})),i.map((function(t){return t.score})),.7);o.stage1_nms=Date.now()-s,c=u.map((function(t){return i[t].score})),a=u.map((function(t){return i[t]})).map((function(t){var e=t.cell,n=t.region;return new C(e.left+n.left*e.width,e.top+n.top*e.height,e.right+n.right*e.width,e.bottom+n.bottom*e.height).toSquare().round()}))}return{boxes:a,scores:c}}function en(t,e,n){var r=n.width,o=n.height;return Object(y.b)(this,void 0,void 0,(function(){var n,i,a,c=this;return Object(y.d)(this,(function(s){switch(s.label){case 0:return n=at(t),[4,Promise.all(e.map((function(e){return Object(y.b)(c,void 0,void 0,(function(){var r,o,i,a,c,s,u,f;return Object(y.d)(this,(function(h){return r=e.padAtBorders(t.height,t.width),o=r.y,i=r.ey,a=r.x,c=r.ex,s=a-1,u=o-1,f=n.getImageData(s,u,c-s,i-u),[2,ot.isNodejs()?lt(f):createImageBitmap(f)]}))}))})))];case 1:return i=s.sent(),a=[],i.forEach((function(t){var e=at(pt({width:r,height:o}));e.drawImage(t,0,0,r,o);for(var n=e.getImageData(0,0,r,o).data,i=[],c=0;c1?b.h(c.map((function(t){return t.scores}))):c[0].scores,h=(f=Array).from,[4,s.data()];case 2:return u=h.apply(f,[y.sent()]),s.dispose(),p=u.map((function(t,e){return{score:t,idx:e}})).filter((function(t){return t.score>n})).map((function(t){return t.idx})),l=p.map((function(t){return e[t]})),d=p.map((function(t){return u[t]})),v=[],m=[],l.length>0&&(i=Date.now(),g=k(l,d,.7),o.stage2_nms=Date.now()-i,w=g.map((function(t){var e=c[p[t]].regions.arraySync();return new Ke(e[0][0],e[0][1],e[0][2],e[0][3])})),m=g.map((function(t){return d[t]})),v=g.map((function(t,e){return l[t].calibrate(w[e])}))),c.forEach((function(t){t.regions.dispose(),t.scores.dispose()})),[2,{boxes:v,scores:m}]}}))}))}function rn(t,e,n,r,o){return Object(y.b)(this,void 0,void 0,(function(){var i,a,c,s,u,f,h,p,l,d,v,m,g,w,_;return Object(y.d)(this,(function(y){switch(y.label){case 0:return i=Date.now(),[4,en(t,e,{width:48,height:48})];case 1:return a=y.sent(),o.stage3_extractImagePatches=Date.now()-i,i=Date.now(),c=a.map((function(t){var e=function(t,e){return b.L((function(){var n=$e(t,e);n=Qe(n=St(n=b.s(n,[2,2],[2,2],"same"),e.conv4,"valid"),e.prelu4_alpha);var r=Qe(Wt(b.x(n,[n.shape[0],e.fc1.weights.shape[0]]),e.fc1),e.prelu5_alpha),o=Wt(r,e.fc2_1),i=b.m(b.r(o,1),1),a=b.D(b.F(o,i),1),c=Wt(r,e.fc2_2),s=Wt(r,e.fc2_3);return{scores:b.O(a,1)[1],regions:c,points:s}}))}(t,r);return t.dispose(),e})),o.stage3_onet=Date.now()-i,s=c.length>1?b.h(c.map((function(t){return t.scores}))):c[0].scores,h=(f=Array).from,[4,s.data()];case 2:return u=h.apply(f,[y.sent()]),s.dispose(),p=u.map((function(t,e){return{score:t,idx:e}})).filter((function(t){return t.score>n})).map((function(t){return t.idx})),l=p.map((function(t){var e=c[t].regions.arraySync();return new Ke(e[0][0],e[0][1],e[0][2],e[0][3])})),d=p.map((function(t,n){return e[t].calibrate(l[n])})),v=p.map((function(t){return u[t]})),m=[],g=[],w=[],d.length>0&&(i=Date.now(),_=k(d,v,.7,!1),o.stage3_nms=Date.now()-i,m=_.map((function(t){return d[t]})),g=_.map((function(t){return v[t]})),w=_.map((function(t,e){return Array(5).fill(0).map((function(n,r){var o=c[t].points.arraySync();return new D(o[0][r]*(m[e].width+1)+m[e].left,o[0][r+5]*(m[e].height+1)+m[e].top)}))}))),c.forEach((function(t){t.regions.dispose(),t.scores.dispose(),t.points.dispose()})),[2,{boxes:m,scores:g,points:w}]}}))}))}var on=function(t){function e(){return t.call(this,"Mtcnn")||this}return Object(y.c)(e,t),e.prototype.load=function(e){return Object(y.b)(this,void 0,void 0,(function(){return Object(y.d)(this,(function(n){return console.warn("mtcnn is deprecated and will be removed soon"),[2,t.prototype.load.call(this,e)]}))}))},e.prototype.loadFromDisk=function(e){return Object(y.b)(this,void 0,void 0,(function(){return Object(y.d)(this,(function(n){return console.warn("mtcnn is deprecated and will be removed soon"),[2,t.prototype.loadFromDisk.call(this,e)]}))}))},e.prototype.forwardInput=function(t,e){return void 0===e&&(e={}),Object(y.b)(this,void 0,void 0,(function(){var n,r,o,i,a,c,s,u,f,h,p,l,d,v,m,g,w,_,x,P,O;return Object(y.d)(this,(function(y){switch(y.label){case 0:if(!(n=this.params))throw new Error("Mtcnn - load model before inference");if(!(r=t.canvases[0]))throw new Error("Mtcnn - inputCanvas is not defined, note that passing tensors into Mtcnn.forwardInput is not supported yet.");return o={},i=Date.now(),a=b.L((function(){return t=b.m(b.f.fromPixels(r)).toFloat(),b.L((function(){return b.E(b.O(t,3).reverse(),3)}));var t})),c=function(t){return a.dispose(),o.total=Date.now()-i,t},s=a.shape.slice(1),u=s[0],f=s[1],h=new we(e),p=h.minFaceSize,l=h.scaleFactor,d=h.maxNumScales,v=h.scoreThresholds,m=h.scaleSteps,g=(m||function(t,e,n){for(var r=n[0],o=n[1],i=12/t,a=[],c=Math.min(r,o)*i,s=0;c>=12;)a.push(i*Math.pow(e,s)),c*=e,s+=1;return a}(p,l,[u,f])).filter((function(t){var e=Xe(t,[u,f]);return Math.min(e.width,e.height)>12})).slice(0,d),o.scales=g,o.pyramid=g.map((function(t){return Xe(t,[u,f])})),w=Date.now(),[4,tn(a,g,v[0],n.pnet,o)];case 1:return _=y.sent(),o.total_stage1=Date.now()-w,_.boxes.length?(o.stage2_numInputBoxes=_.boxes.length,w=Date.now(),[4,nn(r,_.boxes,v[1],n.rnet,o)]):[2,c({results:[],stats:o})];case 2:return x=y.sent(),o.total_stage2=Date.now()-w,x.boxes.length?(o.stage3_numInputBoxes=x.boxes.length,w=Date.now(),[4,rn(r,x.boxes,v[2],n.onet,o)]):[2,c({results:[],stats:o})];case 3:return P=y.sent(),o.total_stage3=Date.now()-w,O=P.boxes.map((function(t,e){return Xt(J({},new L(P.scores[e],new z(t.left/f,t.top/u,t.width/f,t.height/u),{height:u,width:f})),new U(P.points[e].map((function(e){return e.sub(new D(t.left,t.top)).div(new D(t.width,t.height))})),{width:t.width,height:t.height}))})),[2,c({results:O,stats:o})]}}))}))},e.prototype.forward=function(t,e){return void 0===e&&(e={}),Object(y.b)(this,void 0,void 0,(function(){var n;return Object(y.d)(this,(function(r){switch(r.label){case 0:return n=this.forwardInput,[4,bt(t)];case 1:return[4,n.apply(this,[r.sent(),e])];case 2:return[2,r.sent().results]}}))}))},e.prototype.forwardWithStats=function(t,e){return void 0===e&&(e={}),Object(y.b)(this,void 0,void 0,(function(){var n;return Object(y.d)(this,(function(r){switch(r.label){case 0:return n=this.forwardInput,[4,bt(t)];case 1:return[2,n.apply(this,[r.sent(),e])]}}))}))},e.prototype.getDefaultModelName=function(){return"mtcnn_model"},e.prototype.extractParamsFromWeigthMap=function(t){return Je(t)},e.prototype.extractParams=function(t){return Ve(t)},e}(Ot),an=[new D(1.603231,2.094468),new D(6.041143,7.080126),new D(2.882459,3.518061),new D(4.266906,5.178857),new D(9.041765,10.66308)],cn=[117.001,114.697,97.404],sn=function(t){function e(){var e={withSeparableConvs:!0,iouThreshold:.4,classes:["face"],anchors:an,meanRgb:cn,isFirstLayerConv2d:!0,filterSizes:[3,16,32,64,128,256,512]};return t.call(this,e)||this}return Object(y.c)(e,t),Object.defineProperty(e.prototype,"anchors",{get:function(){return this.config.anchors},enumerable:!0,configurable:!0}),e.prototype.locateFaces=function(t,e){return Object(y.b)(this,void 0,void 0,(function(){return Object(y.d)(this,(function(n){switch(n.label){case 0:return[4,this.detect(t,e)];case 1:return[2,n.sent().map((function(t){return new L(t.score,t.relativeBox,{width:t.imageWidth,height:t.imageHeight})}))]}}))}))},e.prototype.getDefaultModelName=function(){return"tiny_face_detector_model"},e.prototype.extractParamsFromWeigthMap=function(e){return t.prototype.extractParamsFromWeigthMap.call(this,e)},e}(We),un={ssdMobilenetv1:new Te,tinyFaceDetector:new sn,tinyYolov2:new Ue,mtcnn:new on,faceLandmark68Net:new ie,faceLandmark68TinyNet:new ce,faceRecognitionNet:new me,faceExpressionNet:new Gt,ageGenderNet:new re},fn=function(t){return un.ssdMobilenetv1.load(t)},hn=function(t){return un.faceLandmark68Net.load(t)},pn=function(t){return un.faceRecognitionNet.load(t)},ln=function(t){return un.faceExpressionNet.load(t)},dn=function(t){function e(e,n,r){var o=t.call(this)||this;return o.parentTask=e,o.input=n,o.extractedFaces=r,o}return Object(y.c)(e,t),e}(Ye),vn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(y.c)(e,t),e.prototype.run=function(){return Object(y.b)(this,void 0,void 0,(function(){var t,e,n=this;return Object(y.d)(this,(function(r){switch(r.label){case 0:return[4,this.parentTask];case 1:return[4,qe(t=r.sent(),this.input,(function(t){return Object(y.b)(n,void 0,void 0,(function(){return Object(y.d)(this,(function(e){switch(e.label){case 0:return[4,Promise.all(t.map((function(t){return un.faceExpressionNet.predictExpressions(t)})))];case 1:return[2,e.sent()]}}))}))}),this.extractedFaces)];case 2:return e=r.sent(),[2,t.map((function(t,n){return Vt(t,e[n])}))]}}))}))},e.prototype.withAgeAndGender=function(){return new wn(this,this.input)},e}(dn),mn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(y.c)(e,t),e.prototype.run=function(){return Object(y.b)(this,void 0,void 0,(function(){var t,e;return Object(y.d)(this,(function(n){switch(n.label){case 0:return[4,this.parentTask];case 1:return(t=n.sent())?[4,Ge(t,this.input,(function(t){return un.faceExpressionNet.predictExpressions(t)}),this.extractedFaces)]:[2];case 2:return e=n.sent(),[2,Vt(t,e)]}}))}))},e.prototype.withAgeAndGender=function(){return new _n(this,this.input)},e}(dn),bn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(y.c)(e,t),e.prototype.withAgeAndGender=function(){return new xn(this,this.input)},e.prototype.withFaceDescriptors=function(){return new En(this,this.input)},e}(vn),gn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(y.c)(e,t),e.prototype.withAgeAndGender=function(){return new Pn(this,this.input)},e.prototype.withFaceDescriptor=function(){return new jn(this,this.input)},e}(mn),yn=function(t){function e(e,n,r){var o=t.call(this)||this;return o.parentTask=e,o.input=n,o.extractedFaces=r,o}return Object(y.c)(e,t),e}(Ye),wn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(y.c)(e,t),e.prototype.run=function(){return Object(y.b)(this,void 0,void 0,(function(){var t,e,n=this;return Object(y.d)(this,(function(r){switch(r.label){case 0:return[4,this.parentTask];case 1:return[4,qe(t=r.sent(),this.input,(function(t){return Object(y.b)(n,void 0,void 0,(function(){return Object(y.d)(this,(function(e){switch(e.label){case 0:return[4,Promise.all(t.map((function(t){return un.ageGenderNet.predictAgeAndGender(t)})))];case 1:return[2,e.sent()]}}))}))}),this.extractedFaces)];case 2:return e=r.sent(),[2,t.map((function(t,n){var r=e[n],o=r.age;return ge(ye(t,r.gender,r.genderProbability),o)}))]}}))}))},e.prototype.withFaceExpressions=function(){return new vn(this,this.input)},e}(yn),_n=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(y.c)(e,t),e.prototype.run=function(){return Object(y.b)(this,void 0,void 0,(function(){var t,e,n,r,o;return Object(y.d)(this,(function(i){switch(i.label){case 0:return[4,this.parentTask];case 1:return(t=i.sent())?[4,Ge(t,this.input,(function(t){return un.ageGenderNet.predictAgeAndGender(t)}),this.extractedFaces)]:[2];case 2:return e=i.sent(),n=e.age,r=e.gender,o=e.genderProbability,[2,ge(ye(t,r,o),n)]}}))}))},e.prototype.withFaceExpressions=function(){return new mn(this,this.input)},e}(yn),xn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(y.c)(e,t),e.prototype.withFaceExpressions=function(){return new bn(this,this.input)},e.prototype.withFaceDescriptors=function(){return new En(this,this.input)},e}(wn),Pn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(y.c)(e,t),e.prototype.withFaceExpressions=function(){return new gn(this,this.input)},e.prototype.withFaceDescriptor=function(){return new jn(this,this.input)},e}(_n),On=function(t){function e(e,n){var r=t.call(this)||this;return r.parentTask=e,r.input=n,r}return Object(y.c)(e,t),e}(Ye),En=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(y.c)(e,t),e.prototype.run=function(){return Object(y.b)(this,void 0,void 0,(function(){var t;return Object(y.d)(this,(function(e){switch(e.label){case 0:return[4,this.parentTask];case 1:return[4,qe(t=e.sent(),this.input,(function(t){return Promise.all(t.map((function(t){return un.faceRecognitionNet.computeFaceDescriptor(t)})))}),null,(function(t){return t.landmarks.align(null,{useDlibAlignment:!0})}))];case 2:return[2,e.sent().map((function(e,n){return be(t[n],e)}))]}}))}))},e.prototype.withFaceExpressions=function(){return new bn(this,this.input)},e.prototype.withAgeAndGender=function(){return new xn(this,this.input)},e}(On),jn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(y.c)(e,t),e.prototype.run=function(){return Object(y.b)(this,void 0,void 0,(function(){var t,e;return Object(y.d)(this,(function(n){switch(n.label){case 0:return[4,this.parentTask];case 1:return(t=n.sent())?[4,Ge(t,this.input,(function(t){return un.faceRecognitionNet.computeFaceDescriptor(t)}),null,(function(t){return t.landmarks.align(null,{useDlibAlignment:!0})}))]:[2];case 2:return e=n.sent(),[2,be(t,e)]}}))}))},e.prototype.withFaceExpressions=function(){return new gn(this,this.input)},e.prototype.withAgeAndGender=function(){return new Pn(this,this.input)},e}(On),Mn=function(t){function e(e,n,r){var o=t.call(this)||this;return o.parentTask=e,o.input=n,o.useTinyLandmarkNet=r,o}return Object(y.c)(e,t),Object.defineProperty(e.prototype,"landmarkNet",{get:function(){return this.useTinyLandmarkNet?un.faceLandmark68TinyNet:un.faceLandmark68Net},enumerable:!0,configurable:!0}),e}(Ye),Sn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(y.c)(e,t),e.prototype.run=function(){return Object(y.b)(this,void 0,void 0,(function(){var t,e,n,r,o,i=this;return Object(y.d)(this,(function(a){switch(a.label){case 0:return[4,this.parentTask];case 1:return t=a.sent(),e=t.map((function(t){return t.detection})),this.input instanceof b.a?[4,yt(this.input,e)]:[3,3];case 2:return r=a.sent(),[3,5];case 3:return[4,gt(this.input,e)];case 4:r=a.sent(),a.label=5;case 5:return n=r,[4,Promise.all(n.map((function(t){return i.landmarkNet.detectLandmarks(t)})))];case 6:return o=a.sent(),n.forEach((function(t){return t instanceof b.a&&t.dispose()})),[2,t.map((function(t,e){return Xt(t,o[e])}))]}}))}))},e.prototype.withFaceExpressions=function(){return new bn(this,this.input)},e.prototype.withAgeAndGender=function(){return new xn(this,this.input)},e.prototype.withFaceDescriptors=function(){return new En(this,this.input)},e}(Mn),Tn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(y.c)(e,t),e.prototype.run=function(){return Object(y.b)(this,void 0,void 0,(function(){var t,e,n,r,o;return Object(y.d)(this,(function(i){switch(i.label){case 0:return[4,this.parentTask];case 1:return(t=i.sent())?(e=t.detection,this.input instanceof b.a?[4,yt(this.input,[e])]:[3,3]):[2];case 2:return r=i.sent(),[3,5];case 3:return[4,gt(this.input,[e])];case 4:r=i.sent(),i.label=5;case 5:return n=r,[4,this.landmarkNet.detectLandmarks(n[0])];case 6:return o=i.sent(),n.forEach((function(t){return t instanceof b.a&&t.dispose()})),[2,Xt(t,o)]}}))}))},e.prototype.withFaceExpressions=function(){return new gn(this,this.input)},e.prototype.withAgeAndGender=function(){return new Pn(this,this.input)},e.prototype.withFaceDescriptor=function(){return new jn(this,this.input)},e}(Mn),An=function(t){function e(e,n){void 0===n&&(n=new Se);var r=t.call(this)||this;return r.input=e,r.options=n,r}return Object(y.c)(e,t),e}(Ye),Dn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(y.c)(e,t),e.prototype.run=function(){return Object(y.b)(this,void 0,void 0,(function(){var t,e,n,r;return Object(y.d)(this,(function(o){switch(o.label){case 0:return e=(t=this).input,(n=t.options)instanceof we?[4,un.mtcnn.forward(e,n)]:[3,2];case 1:return[2,o.sent().map((function(t){return t.detection}))];case 2:if(!(r=n instanceof He?function(t){return un.tinyFaceDetector.locateFaces(t,n)}:n instanceof Se?function(t){return un.ssdMobilenetv1.locateFaces(t,n)}:n instanceof ze?function(t){return un.tinyYolov2.locateFaces(t,n)}:null))throw new Error("detectFaces - expected options to be instance of TinyFaceDetectorOptions | SsdMobilenetv1Options | MtcnnOptions | TinyYolov2Options");return[2,r(e)]}}))}))},e.prototype.runAndExtendWithFaceDetections=function(){var t=this;return new Promise((function(e){return Object(y.b)(t,void 0,void 0,(function(){var t;return Object(y.d)(this,(function(n){switch(n.label){case 0:return[4,this.run()];case 1:return t=n.sent(),[2,e(t.map((function(t){return J({},t)})))]}}))}))}))},e.prototype.withFaceLandmarks=function(t){return void 0===t&&(t=!1),new Sn(this.runAndExtendWithFaceDetections(),this.input,t)},e.prototype.withFaceExpressions=function(){return new vn(this.runAndExtendWithFaceDetections(),this.input)},e.prototype.withAgeAndGender=function(){return new wn(this.runAndExtendWithFaceDetections(),this.input)},e}(An);!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(y.c)(e,t),e.prototype.run=function(){return Object(y.b)(this,void 0,void 0,(function(){var t,e;return Object(y.d)(this,(function(n){switch(n.label){case 0:return[4,new Dn(this.input,this.options)];case 1:return t=n.sent(),e=t[0],t.forEach((function(t){t.score>e.score&&(e=t)})),[2,e]}}))}))},e.prototype.runAndExtendWithFaceDetection=function(){var t=this;return new Promise((function(e){return Object(y.b)(t,void 0,void 0,(function(){var t;return Object(y.d)(this,(function(n){switch(n.label){case 0:return[4,this.run()];case 1:return t=n.sent(),[2,e(t?J({},t):void 0)]}}))}))}))},e.prototype.withFaceLandmarks=function(t){return void 0===t&&(t=!1),new Tn(this.runAndExtendWithFaceDetection(),this.input,t)},e.prototype.withFaceExpressions=function(){return new mn(this.runAndExtendWithFaceDetection(),this.input)},e.prototype.withAgeAndGender=function(){return new _n(this.runAndExtendWithFaceDetection(),this.input)}}(An);function In(t,e){return void 0===e&&(e=new Se),new Dn(t,e)}!function(){function t(t,e){void 0===e&&(e=.6),this._distanceThreshold=e;var n=Array.isArray(t)?t:[t];if(!n.length)throw new Error("FaceRecognizer.constructor - expected atleast one input");var r=1,o=function(){return"person "+r++};this._labeledDescriptors=n.map((function(t){if(t instanceof G)return t;if(t instanceof Float32Array)return new G(o(),[t]);if(t.descriptor&&t.descriptor instanceof Float32Array)return new G(o(),[t.descriptor]);throw new Error("FaceRecognizer.constructor - expected inputs to be of type LabeledFaceDescriptors | WithFaceDescriptor | Float32Array | Array | Float32Array>")}))}Object.defineProperty(t.prototype,"labeledDescriptors",{get:function(){return this._labeledDescriptors},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"distanceThreshold",{get:function(){return this._distanceThreshold},enumerable:!0,configurable:!0}),t.prototype.computeMeanDistance=function(t,e){return e.map((function(e){return function(t,e){if(t.length!==e.length)throw new Error("euclideanDistance: arr1.length !== arr2.length");var n=Array.from(t),r=Array.from(e);return Math.sqrt(n.map((function(t,e){return t-r[e]})).reduce((function(t,e){return t+Math.pow(e,2)}),0))}(e,t)})).reduce((function(t,e){return t+e}),0)/(e.length||1)},t.prototype.matchDescriptor=function(t){var e=this;return this.labeledDescriptors.map((function(n){var r=n.descriptors,o=n.label;return new Y(o,e.computeMeanDistance(t,r))})).reduce((function(t,e){return t.distance.9&&t.expressions.happy<=1?n.style.display="none":n.style.display="block"})),clearInterval(i),a();case 6:case"end":return t.stop()}}),t)}))),200)},e=document.getElementById("inputVideo"),(n=document.getElementById("overlay")).width=e.offsetWidth,n.height=e.offsetHeight,r=new He,n.style.borderStyle="dotted",a();case 8:case"end":return t.stop()}}),t)})))).apply(this,arguments)}return Promise.all([(t=e,un.tinyFaceDetector.load(t)),hn(e),ln(e),pn(e),fn(e)]).then(function(){return n.apply(this,arguments)}()).catch((function(t){return console.error(t)})),Object(i.jsxs)(d,{children:[Object(i.jsx)(u.a,{children:Object(i.jsx)("title",{children:"Smile"})}),Object(i.jsxs)("section",{className:m.a.headingMd,children:[Object(i.jsx)("h1",{children:"Smile"}),Object(i.jsx)("video",{id:"inputVideo",autoPlay:!0,muted:!0,children:" "}),Object(i.jsx)("canvas",{className:m.a.canvas,id:"overlay"})]})]})}},Ruhs:function(t,e,n){t.exports=n("XlSv")},Tred:function(t,e,n){t.exports={container:"layout_container__2t4v2",header:"layout_header__2rhWq",backTohome:"layout_backTohome__10oyl"}},XlSv:function(t,e,n){"use strict";n("lSNA");e.__esModule=!0,e.defaultHead=f,e.default=void 0;var r,o=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==typeof t&&"function"!==typeof t)return{default:t};var e=u();if(e&&e.has(t))return e.get(t);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o)){var i=r?Object.getOwnPropertyDescriptor(t,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=t[o]}n.default=t,e&&e.set(t,n);return n}(n("BqPY")),i=(r=n("t6Az"))&&r.__esModule?r:{default:r},a=n("x+CX"),c=n("kqoU"),s=n("cJU3");function u(){if("function"!==typeof WeakMap)return null;var t=new WeakMap;return u=function(){return t},t}function f(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=[o.default.createElement("meta",{charSet:"utf-8"})];return t||e.push(o.default.createElement("meta",{name:"viewport",content:"width=device-width"})),e}function h(t,e){return"string"===typeof e||"number"===typeof e?t:e.type===o.default.Fragment?t.concat(o.default.Children.toArray(e.props.children).reduce((function(t,e){return"string"===typeof e||"number"===typeof e?t:t.concat(e)}),[])):t.concat(e)}var p=["name","httpEquiv","charSet","itemProp"];function l(t,e){return t.reduce((function(t,e){var n=o.default.Children.toArray(e.props.children);return t.concat(n)}),[]).reduce(h,[]).reverse().concat(f(e.inAmpMode)).filter(function(){var t=new Set,e=new Set,n=new Set,r={};return function(o){var i=!0,a=!1;if(o.key&&"number"!==typeof o.key&&o.key.indexOf("$")>0){a=!0;var c=o.key.slice(o.key.indexOf("$")+1);t.has(c)?i=!1:t.add(c)}switch(o.type){case"title":case"base":e.has(o.type)?i=!1:e.add(o.type);break;case"meta":for(var s=0,u=p.length;s1)for(var n=1;n0&&void 0!==arguments[0]?arguments[0]:{},e=t.ampFirst,n=void 0!==e&&e,r=t.hybrid,o=void 0!==r&&r,i=t.hasQuery,a=void 0!==i&&i;return n||o&&a}},dW39:function(t,e,n){"use strict";var r=n("J4zp"),o=n("RIqP"),i=n("FzWm");e.__esModule=!0,e.default=function(t){var e=t.src,n=t.sizes,i=t.unoptimized,c=void 0!==i&&i,h=t.priority,l=void 0!==h&&h,d=t.loading,m=t.className,b=t.quality,g=t.width,x=t.height,P=t.objectFit,O=t.objectPosition,E=t.loader,j=void 0===E?_:E,M=(0,a.default)(t,["src","sizes","unoptimized","priority","loading","className","quality","width","height","objectFit","objectPosition","loader"]),S=n?"responsive":"intrinsic",T=!1;"unsized"in M?(T=Boolean(M.unsized),delete M.unsized):"layout"in M&&(M.layout&&(S=M.layout),delete M.layout);0;var A=!l&&("lazy"===d||"undefined"===typeof d);e&&e.startsWith("data:")&&(c=!0,A=!1);var D,I,C,F=(0,p.useIntersection)({rootMargin:"200px",disabled:!A}),L=r(F,2),R=L[0],k=L[1],B=!A||k,N=w(g),z=w(x),W=w(b),U={visibility:B?"inherit":"hidden",position:"absolute",top:0,left:0,bottom:0,right:0,boxSizing:"border-box",padding:0,border:"none",margin:"auto",display:"block",width:0,height:0,minWidth:"100%",maxWidth:"100%",minHeight:"100%",maxHeight:"100%",objectFit:P,objectPosition:O};if("undefined"!==typeof N&&"undefined"!==typeof z&&"fill"!==S){var H=z/N,Y=isNaN(H)?"100%":"".concat(100*H,"%");"responsive"===S?(D={display:"block",overflow:"hidden",position:"relative",boxSizing:"border-box",margin:0},I={display:"block",boxSizing:"border-box",paddingTop:Y}):"intrinsic"===S?(D={display:"inline-block",maxWidth:"100%",overflow:"hidden",position:"relative",boxSizing:"border-box",margin:0},I={boxSizing:"border-box",display:"block",maxWidth:"100%"},C='')):"fixed"===S&&(D={overflow:"hidden",boxSizing:"border-box",display:"inline-block",position:"relative",width:N,height:z})}else"undefined"===typeof N&&"undefined"===typeof z&&"fill"===S&&(D={display:"block",overflow:"hidden",position:"absolute",top:0,left:0,bottom:0,right:0,boxSizing:"border-box",margin:0});var q={src:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",srcSet:void 0,sizes:void 0};B&&(q=function(t){var e=t.src,n=t.unoptimized,r=t.layout,i=t.width,a=t.quality,c=t.sizes,s=t.loader;if(n)return{src:e,srcSet:void 0,sizes:void 0};var u=function(t,e,n){if(n&&("fill"===e||"responsive"===e)){var r=o(n.matchAll(/(^|\s)(1?\d?\d)vw/g)).map((function(t){return parseInt(t[2])}));if(r.length){var i=.01*Math.min.apply(Math,o(r));return{widths:y.filter((function(t){return t>=v[0]*i})),kind:"w"}}return{widths:y,kind:"w"}}if("number"!==typeof t||"fill"===e||"responsive"===e)return{widths:v,kind:"w"};return{widths:o(new Set([t,2*t].map((function(t){return y.find((function(e){return e>=t}))||y[y.length-1]})))),kind:"x"}}(i,r,c),f=u.widths,h=u.kind,p=f.length-1;return{sizes:c||"w"!==h?c:"100vw",srcSet:f.map((function(t,n){return"".concat(s({src:e,quality:a,width:t})," ").concat("w"===h?t:n+1).concat(h)})).join(", "),src:s({src:e,quality:a,width:f[p]})}}({src:e,unoptimized:c,layout:S,width:N,quality:W,sizes:n,loader:j}));T&&(D=void 0,I=void 0,U=void 0);return s.default.createElement("div",{style:D},I?s.default.createElement("div",{style:I},C?s.default.createElement("img",{style:{maxWidth:"100%",display:"block",margin:0,border:"none",padding:0},alt:"","aria-hidden":!0,role:"presentation",src:"data:image/svg+xml;base64,".concat((0,f.toBase64)(C))}):null):null,s.default.createElement("img",Object.assign({},M,q,{decoding:"async",className:m,ref:R,style:U})),l?s.default.createElement(u.default,null,s.default.createElement("link",{key:"__nimg-"+q.src+q.srcSet+q.sizes,rel:"preload",as:"image",href:q.srcSet?void 0:q.src,imagesrcset:q.srcSet,imagesizes:q.sizes})):null)};var a=i(n("wSA3")),c=i(n("nfTt")),s=i(n("BqPY")),u=i(n("XlSv")),f=n("a8Ze"),h=n("D0IF"),p=n("9DAu");var l=new Map([["imgix",function(t){var e=t.root,n=t.src,r=t.width,o=t.quality,i=["auto=format","fit=max","w="+r],a="";o&&i.push("q="+o);i.length&&(a="?"+i.join("&"));return"".concat(e).concat(x(n)).concat(a)}],["cloudinary",function(t){var e=t.root,n=t.src,r=t.width,o=t.quality,i=["f_auto","c_limit","w_"+r,"q_"+(o||"auto")].join(",")+"/";return"".concat(e).concat(i).concat(x(n))}],["akamai",function(t){var e=t.root,n=t.src,r=t.width;return"".concat(e).concat(x(n),"?imwidth=").concat(r)}],["default",function(t){var e=t.root,n=t.src,r=t.width,o=t.quality;0;return"".concat(e,"?url=").concat(encodeURIComponent(n),"&w=").concat(r,"&q=").concat(o||75)}]]),d={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"https://cdn.statically.io/gh/HiltonWS/hiltonws.github.io/1.1.1/smile/image",loader:"default"}||h.imageConfigDefault,v=d.deviceSizes,m=d.imageSizes,b=d.loader,g=d.path,y=(d.domains,[].concat(o(v),o(m)));function w(t){return"number"===typeof t?t:"string"===typeof t?parseInt(t,10):void 0}function _(t){var e=l.get(b);if(e)return e((0,c.default)({root:g},t));throw new Error('Unknown "loader" found in "next.config.js". Expected: '.concat(h.VALID_LOADERS.join(", "),". Received: ").concat(b))}function x(t){return"/"===t[0]?t.slice(1):t}v.sort((function(t,e){return t-e})),y.sort((function(t,e){return t-e}))},djdT:function(t,e,n){t.exports=n("dW39")},fssf:function(t,e,n){"use strict";e.byteLength=function(t){var e=u(t),n=e[0],r=e[1];return 3*(n+r)/4-r},e.toByteArray=function(t){var e,n,r=u(t),a=r[0],c=r[1],s=new i(function(t,e,n){return 3*(e+n)/4-n}(0,a,c)),f=0,h=c>0?a-4:a;for(n=0;n>16&255,s[f++]=e>>8&255,s[f++]=255&e;2===c&&(e=o[t.charCodeAt(n)]<<2|o[t.charCodeAt(n+1)]>>4,s[f++]=255&e);1===c&&(e=o[t.charCodeAt(n)]<<10|o[t.charCodeAt(n+1)]<<4|o[t.charCodeAt(n+2)]>>2,s[f++]=e>>8&255,s[f++]=255&e);return s},e.fromByteArray=function(t){for(var e,n=t.length,o=n%3,i=[],a=16383,c=0,s=n-o;cs?s:c+a));1===o?(e=t[n-1],i.push(r[e>>2]+r[e<<4&63]+"==")):2===o&&(e=(t[n-2]<<8)+t[n-1],i.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"="));return i.join("")};for(var r=[],o=[],i="undefined"!==typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=0,s=a.length;c0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function f(t,e,n){for(var o,i,a=[],c=e;c>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return a.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},"jsv+":function(t,e){e.read=function(t,e,n,r,o){var i,a,c=8*o-r-1,s=(1<>1,f=-7,h=n?o-1:0,p=n?-1:1,l=t[e+h];for(h+=p,i=l&(1<<-f)-1,l>>=-f,f+=c;f>0;i=256*i+t[e+h],h+=p,f-=8);for(a=i&(1<<-f)-1,i>>=-f,f+=r;f>0;a=256*a+t[e+h],h+=p,f-=8);if(0===i)i=1-u;else{if(i===s)return a?NaN:1/0*(l?-1:1);a+=Math.pow(2,r),i-=u}return(l?-1:1)*a*Math.pow(2,i-r)},e.write=function(t,e,n,r,o,i){var a,c,s,u=8*i-o-1,f=(1<>1,p=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,l=r?0:i-1,d=r?1:-1,v=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(c=isNaN(e)?1:0,a=f):(a=Math.floor(Math.log(e)/Math.LN2),e*(s=Math.pow(2,-a))<1&&(a--,s*=2),(e+=a+h>=1?p/s:p*Math.pow(2,1-h))*s>=2&&(a++,s/=2),a+h>=f?(c=0,a=f):a+h>=1?(c=(e*s-1)*Math.pow(2,o),a+=h):(c=e*Math.pow(2,h-1)*Math.pow(2,o),a=0));o>=8;t[n+l]=255&c,l+=d,c/=256,o-=8);for(a=a<0;t[n+l]=255&a,l+=d,a/=256,u-=8);t[n+l-d]|=128*v}},jzzT:function(t,e){(function(e){t.exports=function(){var t={149:function(t){var e;e=function(){return this}();try{e=e||new Function("return this")()}catch(n){"object"===typeof window&&(e=window)}t.exports=e}},n={};function r(e){if(n[e])return n[e].exports;var o=n[e]={exports:{}},i=!0;try{t[e](o,o.exports,r),i=!1}finally{i&&delete n[e]}return o.exports}return r.ab=e+"/",r(149)}()}).call(this,"/")},lFXY:function(t,e,n){t.exports=n("0W9y")},lSNA:function(t,e){t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}},mrSG:function(t,e,n){"use strict";n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return a})),n.d(e,"d",(function(){return c})),n.d(e,"e",(function(){return s}));var r=function(t,e){return(r=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 o(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var i=function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=0||(o[n]=t[n]);return o}},"x+CX":function(t,e,n){"use strict";var r;e.__esModule=!0,e.AmpStateContext=void 0;var o=((r=n("BqPY"))&&r.__esModule?r:{default:r}).default.createContext({});e.AmpStateContext=o}},[["N6lM",0,2,3,1]]]); \ No newline at end of file diff --git a/smile/static/chunks/pages/index.js b/smile/static/chunks/pages/index.js index f32bcbc..6de39e9 100644 --- a/smile/static/chunks/pages/index.js +++ b/smile/static/chunks/pages/index.js @@ -11694,7 +11694,7 @@ var VALID_LOADING_VALUES = ['lazy', 'eager', undefined]; var loaders = new Map([['imgix', imgixLoader], ['cloudinary', cloudinaryLoader], ['akamai', akamaiLoader], ['default', defaultLoader]]); var VALID_LAYOUT_VALUES = ['fill', 'fixed', 'intrinsic', 'responsive', undefined]; -var _ref2 = {"deviceSizes":[640,750,828,1080,1200,1920,2048,3840],"imageSizes":[16,32,48,64,96,128,256,384],"path":"https://cdn.statically.io/gh/HiltonWS/hiltonws.github.io/master/smile/image","loader":"default","domains":[]} || _imageConfig.imageConfigDefault, +var _ref2 = {"deviceSizes":[640,750,828,1080,1200,1920,2048,3840],"imageSizes":[16,32,48,64,96,128,256,384],"path":"https://cdn.statically.io/gh/HiltonWS/hiltonws.github.io/1.1.1/smile/image","loader":"default","domains":[]} || _imageConfig.imageConfigDefault, configDeviceSizes = _ref2.deviceSizes, configImageSizes = _ref2.imageSizes, configLoader = _ref2.loader, @@ -12896,7 +12896,7 @@ function getClientBuildManifest() { function getFilesForRoute(assetPrefix, route) { if (true) { return Promise.resolve({ - scripts: [assetPrefix + 'https://cdn.statically.io/gh/HiltonWS/hiltonws.github.io/master/smile/static/chunks/pages' + encodeURI((0, _getAssetPathFromRoute["default"])(route, '.js'))], + scripts: [assetPrefix + 'https://cdn.statically.io/gh/HiltonWS/hiltonws.github.io/1.1.1/smile/static/chunks/pages' + encodeURI((0, _getAssetPathFromRoute["default"])(route, '.js'))], // Styles are handled by `style-loader` in development: css: [] }); @@ -12908,7 +12908,7 @@ function getFilesForRoute(assetPrefix, route) { } var allFiles = manifest[route].map(function (entry) { - return assetPrefix + 'https://cdn.statically.io/gh/HiltonWS/hiltonws.github.io/master/smile/' + encodeURI(entry); + return assetPrefix + 'https://cdn.statically.io/gh/HiltonWS/hiltonws.github.io/1.1.1/smile/' + encodeURI(entry); }); return { scripts: allFiles.filter(function (v) { @@ -17823,7 +17823,7 @@ exports.__esModule=true;exports.normalizePathSep=normalizePathSep;exports.denorm /***/ (function(module, exports, __webpack_require__) { "use strict"; -exports.__esModule=true;exports.imageConfigDefault=exports.VALID_LOADERS=void 0;const VALID_LOADERS=['default','imgix','cloudinary','akamai'];exports.VALID_LOADERS=VALID_LOADERS;const imageConfigDefault={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:'https://cdn.statically.io/gh/HiltonWS/hiltonws.github.io/master/smile/image',loader:'default',domains:[]};exports.imageConfigDefault=imageConfigDefault; +exports.__esModule=true;exports.imageConfigDefault=exports.VALID_LOADERS=void 0;const VALID_LOADERS=['default','imgix','cloudinary','akamai'];exports.VALID_LOADERS=VALID_LOADERS;const imageConfigDefault={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:'https://cdn.statically.io/gh/HiltonWS/hiltonws.github.io/1.1.1/smile/image',loader:'default',domains:[]};exports.imageConfigDefault=imageConfigDefault; //# sourceMappingURL=image-config.js.map /***/ }), @@ -24711,7 +24711,7 @@ var _jsxFileName = "C:\\Personal\\Projects\\smile\\pages\\index.js"; function Home() { - var MODEL_URL = 'https://cdn.statically.io/gh/HiltonWS/hiltonws.github.io/master/smile/models'; + var MODEL_URL = 'https://cdn.statically.io/gh/HiltonWS/hiltonws.github.io/1.1.1/smile/models'; Promise.all([face_api_js__WEBPACK_IMPORTED_MODULE_6__["loadTinyFaceDetectorModel"](MODEL_URL), face_api_js__WEBPACK_IMPORTED_MODULE_6__["loadFaceLandmarkModel"](MODEL_URL), face_api_js__WEBPACK_IMPORTED_MODULE_6__["loadFaceExpressionModel"](MODEL_URL), face_api_js__WEBPACK_IMPORTED_MODULE_6__["loadFaceRecognitionModel"](MODEL_URL), face_api_js__WEBPACK_IMPORTED_MODULE_6__["loadSsdMobilenetv1Model"](MODEL_URL)]).then(start())["catch"](function (e) { return console.error(e); }); diff --git a/smile/static/webpack/pages/index.491b4fb933d4cf919ef8.hot-update.js b/smile/static/webpack/pages/index.491b4fb933d4cf919ef8.hot-update.js index a90edf8..6870287 100644 --- a/smile/static/webpack/pages/index.491b4fb933d4cf919ef8.hot-update.js +++ b/smile/static/webpack/pages/index.491b4fb933d4cf919ef8.hot-update.js @@ -33,7 +33,7 @@ var _jsxFileName = "C:\\Personal\\Projects\\smile\\pages\\index.js"; function Home() { - var MODEL_URL = 'https://cdn.statically.io/gh/HiltonWS/hiltonws.github.io/master/smile/models'; + var MODEL_URL = 'https://cdn.statically.io/gh/HiltonWS/hiltonws.github.io/1.1.1/smile/models'; Promise.all([face_api_js__WEBPACK_IMPORTED_MODULE_6__["loadTinyFaceDetectorModel"](MODEL_URL), face_api_js__WEBPACK_IMPORTED_MODULE_6__["loadFaceLandmarkModel"](MODEL_URL), face_api_js__WEBPACK_IMPORTED_MODULE_6__["loadFaceExpressionModel"](MODEL_URL), face_api_js__WEBPACK_IMPORTED_MODULE_6__["loadFaceRecognitionModel"](MODEL_URL), face_api_js__WEBPACK_IMPORTED_MODULE_6__["loadSsdMobilenetv1Model"](MODEL_URL)]).then(start())["catch"](function (e) { return console.error(e); }); diff --git a/smile/static/webpack/pages/index.5015baf78137206acd69.hot-update.js b/smile/static/webpack/pages/index.5015baf78137206acd69.hot-update.js index 7b52958..70a6562 100644 --- a/smile/static/webpack/pages/index.5015baf78137206acd69.hot-update.js +++ b/smile/static/webpack/pages/index.5015baf78137206acd69.hot-update.js @@ -33,7 +33,7 @@ var _jsxFileName = "C:\\Personal\\Projects\\smile\\pages\\index.js"; function Home() { - var MODEL_URL = 'https://cdn.statically.io/gh/HiltonWS/hiltonws.github.io/master/smile/models'; + var MODEL_URL = 'https://cdn.statically.io/gh/HiltonWS/hiltonws.github.io/1.1.1/smile/models'; Promise.all([face_api_js__WEBPACK_IMPORTED_MODULE_6__["loadTinyFaceDetectorModel"](MODEL_URL), face_api_js__WEBPACK_IMPORTED_MODULE_6__["loadFaceLandmarkModel"](MODEL_URL), face_api_js__WEBPACK_IMPORTED_MODULE_6__["loadFaceExpressionModel"](MODEL_URL), face_api_js__WEBPACK_IMPORTED_MODULE_6__["loadFaceRecognitionModel"](MODEL_URL), face_api_js__WEBPACK_IMPORTED_MODULE_6__["loadSsdMobilenetv1Model"](MODEL_URL)]).then(start())["catch"](function (e) { return console.error(e); }); diff --git a/smile/static/webpack/pages/index.5363400098b6da33c05e.hot-update.js b/smile/static/webpack/pages/index.5363400098b6da33c05e.hot-update.js index 690848f..00292ce 100644 --- a/smile/static/webpack/pages/index.5363400098b6da33c05e.hot-update.js +++ b/smile/static/webpack/pages/index.5363400098b6da33c05e.hot-update.js @@ -33,7 +33,7 @@ var _jsxFileName = "C:\\Personal\\Projects\\smile\\pages\\index.js"; function Home() { - var MODEL_URL = 'https://cdn.statically.io/gh/HiltonWS/hiltonws.github.io/master/smile/models'; + var MODEL_URL = 'https://cdn.statically.io/gh/HiltonWS/hiltonws.github.io/1.1.1/smile/models'; Promise.all([face_api_js__WEBPACK_IMPORTED_MODULE_6__["loadTinyFaceDetectorModel"](MODEL_URL), face_api_js__WEBPACK_IMPORTED_MODULE_6__["loadFaceLandmarkModel"](MODEL_URL), face_api_js__WEBPACK_IMPORTED_MODULE_6__["loadFaceExpressionModel"](MODEL_URL), face_api_js__WEBPACK_IMPORTED_MODULE_6__["loadFaceRecognitionModel"](MODEL_URL), face_api_js__WEBPACK_IMPORTED_MODULE_6__["loadSsdMobilenetv1Model"](MODEL_URL)]).then(start())["catch"](function (e) { return console.error(e); }); diff --git a/smile/static/webpack/pages/index.8cf23386544a5a00f331.hot-update.js b/smile/static/webpack/pages/index.8cf23386544a5a00f331.hot-update.js index 3332c7c..bd6386a 100644 --- a/smile/static/webpack/pages/index.8cf23386544a5a00f331.hot-update.js +++ b/smile/static/webpack/pages/index.8cf23386544a5a00f331.hot-update.js @@ -33,7 +33,7 @@ var _jsxFileName = "C:\\Personal\\Projects\\smile\\pages\\index.js"; function Home() { - var MODEL_URL = 'https://cdn.statically.io/gh/HiltonWS/hiltonws.github.io/master/smile/models'; + var MODEL_URL = 'https://cdn.statically.io/gh/HiltonWS/hiltonws.github.io/1.1.1/smile/models'; Promise.all([face_api_js__WEBPACK_IMPORTED_MODULE_6__["loadTinyFaceDetectorModel"](MODEL_URL), face_api_js__WEBPACK_IMPORTED_MODULE_6__["loadFaceLandmarkModel"](MODEL_URL), face_api_js__WEBPACK_IMPORTED_MODULE_6__["loadFaceExpressionModel"](MODEL_URL), face_api_js__WEBPACK_IMPORTED_MODULE_6__["loadFaceRecognitionModel"](MODEL_URL), face_api_js__WEBPACK_IMPORTED_MODULE_6__["loadSsdMobilenetv1Model"](MODEL_URL)]).then(start())["catch"](function (e) { return console.error(e); }); diff --git a/smile/static/webpack/pages/index.8fc7486c85ef5da06d0e.hot-update.js b/smile/static/webpack/pages/index.8fc7486c85ef5da06d0e.hot-update.js index bac3a51..bab5cc2 100644 --- a/smile/static/webpack/pages/index.8fc7486c85ef5da06d0e.hot-update.js +++ b/smile/static/webpack/pages/index.8fc7486c85ef5da06d0e.hot-update.js @@ -33,7 +33,7 @@ var _jsxFileName = "C:\\Personal\\Projects\\smile\\pages\\index.js"; function Home() { - var MODEL_URL = 'https://cdn.statically.io/gh/HiltonWS/hiltonws.github.io/master/smile/models'; + var MODEL_URL = 'https://cdn.statically.io/gh/HiltonWS/hiltonws.github.io/1.1.1/smile/models'; Promise.all([face_api_js__WEBPACK_IMPORTED_MODULE_6__["loadTinyFaceDetectorModel"](MODEL_URL), face_api_js__WEBPACK_IMPORTED_MODULE_6__["loadFaceLandmarkModel"](MODEL_URL), face_api_js__WEBPACK_IMPORTED_MODULE_6__["loadFaceExpressionModel"](MODEL_URL), face_api_js__WEBPACK_IMPORTED_MODULE_6__["loadFaceRecognitionModel"](MODEL_URL), face_api_js__WEBPACK_IMPORTED_MODULE_6__["loadSsdMobilenetv1Model"](MODEL_URL)]).then(start())["catch"](function (e) { return console.error(e); }); diff --git a/smile/static/webpack/pages/index.b7558025a3707b97279c.hot-update.js b/smile/static/webpack/pages/index.b7558025a3707b97279c.hot-update.js index 79c7ac9..7463ac5 100644 --- a/smile/static/webpack/pages/index.b7558025a3707b97279c.hot-update.js +++ b/smile/static/webpack/pages/index.b7558025a3707b97279c.hot-update.js @@ -33,7 +33,7 @@ var _jsxFileName = "C:\\Personal\\Projects\\smile\\pages\\index.js"; function Home() { - var MODEL_URL = 'https://cdn.statically.io/gh/HiltonWS/hiltonws.github.io/master/smile/models'; + var MODEL_URL = 'https://cdn.statically.io/gh/HiltonWS/hiltonws.github.io/1.1.1/smile/models'; Promise.all([face_api_js__WEBPACK_IMPORTED_MODULE_6__["loadTinyFaceDetectorModel"](MODEL_URL), face_api_js__WEBPACK_IMPORTED_MODULE_6__["loadFaceLandmarkModel"](MODEL_URL), face_api_js__WEBPACK_IMPORTED_MODULE_6__["loadFaceExpressionModel"](MODEL_URL), face_api_js__WEBPACK_IMPORTED_MODULE_6__["loadFaceRecognitionModel"](MODEL_URL), face_api_js__WEBPACK_IMPORTED_MODULE_6__["loadSsdMobilenetv1Model"](MODEL_URL)]).then(start())["catch"](function (e) { return console.error(e); }); diff --git a/smile/static/webpack/pages/index.f81065e179dfd7cb645b.hot-update.js b/smile/static/webpack/pages/index.f81065e179dfd7cb645b.hot-update.js index 2b0c6ca..12d4a6d 100644 --- a/smile/static/webpack/pages/index.f81065e179dfd7cb645b.hot-update.js +++ b/smile/static/webpack/pages/index.f81065e179dfd7cb645b.hot-update.js @@ -33,7 +33,7 @@ var _jsxFileName = "C:\\Personal\\Projects\\smile\\pages\\index.js"; function Home() { - var MODEL_URL = 'https://cdn.statically.io/gh/HiltonWS/hiltonws.github.io/master/smile/models'; + var MODEL_URL = 'https://cdn.statically.io/gh/HiltonWS/hiltonws.github.io/1.1.1/smile/models'; Promise.all([face_api_js__WEBPACK_IMPORTED_MODULE_6__["loadTinyFaceDetectorModel"](MODEL_URL), face_api_js__WEBPACK_IMPORTED_MODULE_6__["loadFaceLandmarkModel"](MODEL_URL), face_api_js__WEBPACK_IMPORTED_MODULE_6__["loadFaceExpressionModel"](MODEL_URL), face_api_js__WEBPACK_IMPORTED_MODULE_6__["loadFaceRecognitionModel"](MODEL_URL), face_api_js__WEBPACK_IMPORTED_MODULE_6__["loadSsdMobilenetv1Model"](MODEL_URL)]).then(start())["catch"](function (e) { return console.error(e); });