From 8bd7b5a8c7e342613b19d778cb3f6cadbd5ed8c0 Mon Sep 17 00:00:00 2001 From: Vanco Stojkov Date: Sun, 23 Jul 2017 19:50:02 +0200 Subject: [PATCH] code refactoring --- .env.example | 3 +- README.md | 55 +- client/.angular-cli.json | 5 +- client/dist/favicon.ico | Bin 5430 -> 0 bytes client/dist/index.html | 28 - .../inline.3c89334d6e0441532305.bundle.js | 1 - .../dist/main.9c4e9dde1a03a6e675e2.bundle.js | 1 - .../polyfills.7306ee46c4105d171c4b.bundle.js | 71 - .../styles.bfeff1bad27ba65b7c63.bundle.css | 1 - .../vendor.4012b002d18be9b60db9.bundle.js | 659 -------- client/package.json | 5 +- client/src/app/app.component.css | 0 client/src/app/app.component.html | 3 + client/src/app/app.component.spec.ts | 32 - client/src/app/app.component.ts | 33 +- client/src/styles.css | 43 +- client/yarn.lock | 29 +- data/entities/dayofweek.json | 58 + data/entities/holiday.json | 324 ++++ data/entities/time-zone.json | 1233 +++++++++++++++ data/entities/unit-time.json | 120 ++ data/intents/date.between.json | 454 ++++++ data/intents/date.check.json | 223 +++ data/intents/date.day_of_week.check.json | 378 +++++ data/intents/date.day_of_week.json | 317 ++++ data/intents/date.get.json | 339 ++++ data/intents/date.month.check.json | 237 +++ data/intents/date.month.get.json | 317 ++++ data/intents/date.since.json | 267 ++++ data/intents/date.until.json | 328 ++++ data/intents/date.year.check.json | 194 +++ data/intents/date.year.get.json | 177 +++ data/intents/time.check.json | 324 ++++ data/intents/time.convert.json | 466 ++++++ data/intents/time.get.json | 1385 +++++++++++++++++ data/intents/time.time_difference.json | 340 ++++ nodemon.json | 7 + package.json | 5 +- server/express.js | 8 - server/intents/date.js | 172 +- server/intents/index.js | 65 +- server/intents/time.js | 93 ++ server/util/google_api.js | 54 + server/util/helpers.js | 34 + server/util/index.js | 7 + server/websocket.js | 56 +- yarn.lock | 277 +++- 47 files changed, 8255 insertions(+), 973 deletions(-) delete mode 100644 client/dist/favicon.ico delete mode 100644 client/dist/index.html delete mode 100644 client/dist/inline.3c89334d6e0441532305.bundle.js delete mode 100644 client/dist/main.9c4e9dde1a03a6e675e2.bundle.js delete mode 100644 client/dist/polyfills.7306ee46c4105d171c4b.bundle.js delete mode 100644 client/dist/styles.bfeff1bad27ba65b7c63.bundle.css delete mode 100644 client/dist/vendor.4012b002d18be9b60db9.bundle.js delete mode 100644 client/src/app/app.component.css delete mode 100644 client/src/app/app.component.spec.ts create mode 100755 data/entities/dayofweek.json create mode 100755 data/entities/holiday.json create mode 100755 data/entities/time-zone.json create mode 100755 data/entities/unit-time.json create mode 100755 data/intents/date.between.json create mode 100755 data/intents/date.check.json create mode 100755 data/intents/date.day_of_week.check.json create mode 100755 data/intents/date.day_of_week.json create mode 100755 data/intents/date.get.json create mode 100755 data/intents/date.month.check.json create mode 100755 data/intents/date.month.get.json create mode 100755 data/intents/date.since.json create mode 100755 data/intents/date.until.json create mode 100755 data/intents/date.year.check.json create mode 100755 data/intents/date.year.get.json create mode 100755 data/intents/time.check.json create mode 100755 data/intents/time.convert.json create mode 100755 data/intents/time.get.json create mode 100755 data/intents/time.time_difference.json create mode 100644 nodemon.json create mode 100644 server/intents/time.js create mode 100644 server/util/google_api.js create mode 100644 server/util/helpers.js create mode 100644 server/util/index.js diff --git a/.env.example b/.env.example index 22c143d..eb36978 100644 --- a/.env.example +++ b/.env.example @@ -1,4 +1,5 @@ NODE_ENV=development PORT=4040 WSURL=http://localhost:4040 -APIAI_CLIENT_TOKEN=YOUR_API_AI_TOKEN +APIAI_CLIENT_TOKEN=YOUR_API_AI_CLIENT_ACCESS_TOKEN +GOOGLE_API_KEY=YOUR_GOOGLE_TIMEZONE_API_TOKEN diff --git a/README.md b/README.md index c935b0f..c92cba7 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,52 @@ -# Date Bot +# TiBot — The Date and Time Bot -A simple Date bot that answers date related questions like: -- how many days between today and November 21st -- Is it Monday today -- How many days until December -- etc. +A simple bot app which enables users to ask about the current date and time, calculate between dates, determine how many days until another date, etc. -Also API.AI's small talk agent included, which enables the bot to answers questions, well... related to small talk. +## Requirements + +The app is built using [Angular](https://angular.io/) on the front end, [Express](https://expressjs.com/) on the back end, and [API.AI](https://api.ai/)'s API to process and understand natural language. + +You will need: +- [Node.js](https://nodejs.org/en/), and [npm](https://docs.npmjs.com/getting-started/installing-node) or [Yarn](https://yarnpkg.com/en/) +- [API.AI account](https://console.api.ai/api-client/#/login) + +Once you've created your [API.AI account](https://console.api.ai/api-client/#/login) go ahead and create your [Agent](https://api.ai/docs/agents). + +You will also need [Google Maps API](https://developers.google.com/maps/get-started/) key, as we'll use some of their APIs to get data related to locations and timezones, specifically: +- The [Google Maps Geocoding API](https://developers.google.com/maps/documentation/geocoding/start) — to get location related data +- The [Google Time Zone API](https://developers.google.com/maps/documentation/timezone/intro) — to get location's timezone data + +## Getting Started + +You can start by cloning this repo: + +```shell +git clone +``` + +Create your `.env` file which contains your development environment, including the APIs keys, simply copy the `.env.sample` file to `.env` +```shell +cp .env.sample .env +``` +and update it accordingly with your API.AI and Google Maps API keys. + +Install server dependencies at the root of the directory, and start the Express app: +```shell +npm install +npm start +``` + +Install front end dependencies in the `./client` directory, and start the Angular app: +```shell +cd client +npm install +npm start +``` + +## The Front End + + + +Open [http://localhost:4200/](http://localhost:4200/) in your browser. ### Demo at https://the-date-bot.herokuapp.com/ diff --git a/client/.angular-cli.json b/client/.angular-cli.json index 347e4a2..8f0279e 100644 --- a/client/.angular-cli.json +++ b/client/.angular-cli.json @@ -21,7 +21,10 @@ "styles": [ "styles.css" ], - "scripts": [], + "scripts": [ + "../node_modules/moment/min/moment.min.js", + "../node_modules/moment-timezone/builds/moment-timezone-with-data.min.js" + ], "environmentSource": "environments/environment.ts", "environments": { "dev": "environments/environment.ts", diff --git a/client/dist/favicon.ico b/client/dist/favicon.ico deleted file mode 100644 index 8081c7ceaf2be08bf59010158c586170d9d2d517..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5430 zcmc(je{54#6vvCoAI3i*G5%$U7!sA3wtMZ$fH6V9C`=eXGJb@R1%(I_{vnZtpD{6n z5Pl{DmxzBDbrB>}`90e12m8T*36WoeDLA&SD_hw{H^wM!cl_RWcVA!I+x87ee975; z@4kD^=bYPn&pmG@(+JZ`rqQEKxW<}RzhW}I!|ulN=fmjVi@x{p$cC`)5$a!)X&U+blKNvN5tg=uLvuLnuqRM;Yc*swiexsoh#XPNu{9F#c`G zQLe{yWA(Y6(;>y|-efAy11k<09(@Oo1B2@0`PtZSkqK&${ zgEY}`W@t{%?9u5rF?}Y7OL{338l*JY#P!%MVQY@oqnItpZ}?s z!r?*kwuR{A@jg2Chlf0^{q*>8n5Ir~YWf*wmsh7B5&EpHfd5@xVaj&gqsdui^spyL zB|kUoblGoO7G(MuKTfa9?pGH0@QP^b#!lM1yHWLh*2iq#`C1TdrnO-d#?Oh@XV2HK zKA{`eo{--^K&MW66Lgsktfvn#cCAc*(}qsfhrvOjMGLE?`dHVipu1J3Kgr%g?cNa8 z)pkmC8DGH~fG+dlrp(5^-QBeEvkOvv#q7MBVLtm2oD^$lJZx--_=K&Ttd=-krx(Bb zcEoKJda@S!%%@`P-##$>*u%T*mh+QjV@)Qa=Mk1?#zLk+M4tIt%}wagT{5J%!tXAE;r{@=bb%nNVxvI+C+$t?!VJ@0d@HIyMJTI{vEw0Ul ze(ha!e&qANbTL1ZneNl45t=#Ot??C0MHjjgY8%*mGisN|S6%g3;Hlx#fMNcL<87MW zZ>6moo1YD?P!fJ#Jb(4)_cc50X5n0KoDYfdPoL^iV`k&o{LPyaoqMqk92wVM#_O0l z09$(A-D+gVIlq4TA&{1T@BsUH`Bm=r#l$Z51J-U&F32+hfUP-iLo=jg7Xmy+WLq6_tWv&`wDlz#`&)Jp~iQf zZP)tu>}pIIJKuw+$&t}GQuqMd%Z>0?t%&BM&Wo^4P^Y z)c6h^f2R>X8*}q|bblAF?@;%?2>$y+cMQbN{X$)^R>vtNq_5AB|0N5U*d^T?X9{xQnJYeU{ zoZL#obI;~Pp95f1`%X3D$Mh*4^?O?IT~7HqlWguezmg?Ybq|7>qQ(@pPHbE9V?f|( z+0xo!#m@Np9PljsyxBY-UA*{U*la#8Wz2sO|48_-5t8%_!n?S$zlGe+NA%?vmxjS- zHE5O3ZarU=X}$7>;Okp(UWXJxI%G_J-@IH;%5#Rt$(WUX?6*Ux!IRd$dLP6+SmPn= z8zjm4jGjN772R{FGkXwcNv8GBcZI#@Y2m{RNF_w8(Z%^A*!bS*!}s6sh*NnURytky humW;*g7R+&|Ledvc- - - - - TiBot - - - - - - - - -
- -
-
- - diff --git a/client/dist/inline.3c89334d6e0441532305.bundle.js b/client/dist/inline.3c89334d6e0441532305.bundle.js deleted file mode 100644 index 6bf2a48..0000000 --- a/client/dist/inline.3c89334d6e0441532305.bundle.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}var n=window.webpackJsonp;window.webpackJsonp=function(t,c,u){for(var a,i,f,l=0,s=[];l";for(e.style.display="none",n("d075").appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write(o+"script"+a+"document.F=Object"+o+"/script"+a),t.close(),s=t.F;r--;)delete s[u][i[r]];return s()};t.exports=Object.create||function(t,e){var n;return null!==t?(c[u]=r(t),n=new c,c[u]=null,n[a]=t):n=s(),void 0===e?n:o(n,e)}},"8D8H":function(t,e,n){var r=n("oeih"),o=Math.max,i=Math.min;t.exports=function(t,e){return t=r(t),t<0?o(t+e,0):i(t,e)}},"8WbS":function(t,e,n){var r=n("wCso"),o=n("DIVP"),i=n("KOrd"),a=r.has,c=r.key,u=function(t,e,n){if(a(t,e,n))return!0;var r=i(e);return null!==r&&u(t,r,n)};r.exp({hasMetadata:function(t,e){return u(t,o(e),arguments.length<3?void 0:c(arguments[2]))}})},"9GpA":function(t,e){t.exports=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t}},"9mGU":function(t,e,n){var r=n("Ds5P"),o=n("DIVP"),i=Object.preventExtensions;r(r.S,"Reflect",{preventExtensions:function(t){o(t);try{return i&&i(t),!0}catch(t){return!1}}})},"9vb1":function(t,e,n){var r=n("bN1p"),o=n("kkCw")("iterator"),i=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||i[o]===t)}},A16L:function(t,e,n){var r=n("R3AP");t.exports=function(t,e,n){for(var o in e)r(t,o,e[o],n);return t}},A52B:function(t,e,n){var r=n("x9zv"),o=n("Ds5P"),i=n("DIVP");o(o.S,"Reflect",{getOwnPropertyDescriptor:function(t,e){return r.f(i(t),e)}})},BbyF:function(t,e,n){var r=n("oeih"),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},CEne:function(t,e,n){"use strict";var r=n("OzIq"),o=n("lDLk"),i=n("bUqO"),a=n("kkCw")("species");t.exports=function(t){var e=r[t];i&&e&&!e[a]&&o.f(e,a,{configurable:!0,get:function(){return this}})}},"CVR+":function(t,e,n){var r=n("Ds5P"),o=n("XSOZ"),i=n("DIVP"),a=(n("OzIq").Reflect||{}).apply,c=Function.apply;r(r.S+r.F*!n("zgIt")(function(){a(function(){})}),"Reflect",{apply:function(t,e,n){var r=o(t),u=i(n);return a?a(r,e,u):c.call(r,e,u)}})},ChGr:function(t,e,n){n("yJ2x"),n("3q4u"),n("NHaJ"),n("v3hU"),n("zZHq"),n("vsh6"),n("8WbS"),n("yOtE"),n("EZ+5"),t.exports=n("7gX0").Reflect},DIVP:function(t,e,n){var r=n("UKM+");t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},Dgii:function(t,e,n){"use strict";var r=n("lDLk").f,o=n("7ylX"),i=n("A16L"),a=n("rFzY"),c=n("9GpA"),u=n("/whu"),s=n("vmSO"),f=n("uc2A"),l=n("KB1o"),p=n("CEne"),h=n("bUqO"),d=n("1aA0").fastKey,v=h?"_s":"size",y=function(t,e){var n,r=d(e);if("F"!==r)return t._i[r];for(n=t._f;n;n=n.n)if(n.k==e)return n};t.exports={getConstructor:function(t,e,n,f){var l=t(function(t,r){c(t,l,e,"_i"),t._i=o(null),t._f=void 0,t._l=void 0,t[v]=0,void 0!=r&&s(r,n,t[f],t)});return i(l.prototype,{clear:function(){for(var t=this,e=t._i,n=t._f;n;n=n.n)n.r=!0,n.p&&(n.p=n.p.n=void 0),delete e[n.i];t._f=t._l=void 0,t[v]=0},delete:function(t){var e=this,n=y(e,t);if(n){var r=n.n,o=n.p;delete e._i[n.i],n.r=!0,o&&(o.n=r),r&&(r.p=o),e._f==n&&(e._f=r),e._l==n&&(e._l=o),e[v]--}return!!n},forEach:function(t){c(this,l,"forEach");for(var e,n=a(t,arguments.length>1?arguments[1]:void 0,3);e=e?e.n:this._f;)for(n(e.v,e.k,this);e&&e.r;)e=e.p},has:function(t){return!!y(this,t)}}),h&&r(l.prototype,"size",{get:function(){return u(this[v])}}),l},def:function(t,e,n){var r,o,i=y(t,e);return i?i.v=n:(t._l=i={i:o=d(e,!0),k:e,v:n,p:r=t._l,n:void 0,r:!1},t._f||(t._f=i),r&&(r.n=i),t[v]++,"F"!==o&&(t._i[o]=i)),t},getEntry:y,setStrong:function(t,e,n){f(t,e,function(t,e){this._t=t,this._k=e,this._l=void 0},function(){for(var t=this,e=t._k,n=t._l;n&&n.r;)n=n.p;return t._t&&(t._l=n=n?n.n:t._t._f)?"keys"==e?l(0,n.k):"values"==e?l(0,n.v):l(0,[n.k,n.v]):(t._t=void 0,l(1))},n?"entries":"values",!n,!0),p(e)}}},Ds5P:function(t,e,n){var r=n("OzIq"),o=n("7gX0"),i=n("2p1q"),a=n("R3AP"),c=n("rFzY"),u="prototype",s=function(t,e,n){var f,l,p,h,d=t&s.F,v=t&s.G,y=t&s.S,g=t&s.P,k=t&s.B,m=v?r:y?r[e]||(r[e]={}):(r[e]||{})[u],b=v?o:o[e]||(o[e]={}),_=b[u]||(b[u]={});v&&(n=e);for(f in n)l=!d&&m&&void 0!==m[f],p=(l?m:n)[f],h=k&&l?c(p,r):g&&"function"==typeof p?c(Function.call,p):p,m&&a(m,f,p,t&s.U),b[f]!=p&&i(b,f,h),g&&_[f]!=p&&(_[f]=p)};r.core=o,s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,t.exports=s},DuR2:function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},"EZ+5":function(t,e,n){var r=n("wCso"),o=n("DIVP"),i=n("XSOZ"),a=r.key,c=r.set;r.exp({metadata:function(t,e){return function(n,r){c(t,e,(void 0!==r?o:i)(n),a(r))}}})},FryR:function(t,e,n){var r=n("/whu");t.exports=function(t){return Object(r(t))}},IRJ3:function(t,e,n){"use strict";var r=n("7ylX"),o=n("fU25"),i=n("yYvK"),a={};n("2p1q")(a,n("kkCw")("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=r(a,{next:o(1,n)}),i(t,e+" Iterator")}},JG34:function(t,e,n){var r=n("Ds5P"),o=n("DIVP"),i=Object.isExtensible;r(r.S,"Reflect",{isExtensible:function(t){return o(t),!i||i(t)}})},KB1o:function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},KOrd:function(t,e,n){var r=n("WBcL"),o=n("FryR"),i=n("mZON")("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),r(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},LhTa:function(t,e,n){var r=n("rFzY"),o=n("Q6Nf"),i=n("FryR"),a=n("BbyF"),c=n("plSV");t.exports=function(t,e){var n=1==t,u=2==t,s=3==t,f=4==t,l=6==t,p=5==t||l,h=e||c;return function(e,c,d){for(var v,y,g=i(e),k=o(g),m=r(c,d,3),b=a(k.length),_=0,w=n?h(e,b):u?h(e,0):void 0;b>_;_++)if((p||_ in k)&&(v=k[_],y=m(v,_,g),t))if(n)w[_]=y;else if(y)switch(t){case 3:return!0;case 5:return v;case 6:return _;case 2:w.push(v)}else if(f)return!1;return l?-1:s||f?f:w}}},MsuQ:function(t,e,n){"use strict";var r=n("Dgii");t.exports=n("0Rih")("Map",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{get:function(t){var e=r.getEntry(this,t);return e&&e.v},set:function(t,e){return r.def(this,0===t?0:t,e)}},r,!0)},NHaJ:function(t,e,n){var r=n("wCso"),o=n("DIVP"),i=n("KOrd"),a=r.has,c=r.get,u=r.key,s=function(t,e,n){if(a(t,e,n))return c(t,e,n);var r=i(e);return null!==r?s(t,r,n):void 0};r.exp({getMetadata:function(t,e){return s(t,o(e),arguments.length<3?void 0:u(arguments[2]))}})},OzIq:function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},PHCx:function(t,e){t.exports=function(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}},PHqh:function(t,e,n){var r=n("Q6Nf"),o=n("/whu");t.exports=function(t){return r(o(t))}},PuTd:function(t,e,n){var r=n("Ds5P"),o=n("KOrd"),i=n("DIVP");r(r.S,"Reflect",{getPrototypeOf:function(t){return o(i(t))}})},Q6Nf:function(t,e,n){var r=n("ydD5");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},QG7u:function(t,e,n){var r=n("vmSO");t.exports=function(t,e){var n=[];return r(t,!1,n.push,n,e),n}},QKXm:function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},Qh14:function(t,e,n){var r=n("ReGu"),o=n("QKXm");t.exports=Object.keys||function(t){return r(t,o)}},R3AP:function(t,e,n){var r=n("OzIq"),o=n("2p1q"),i=n("WBcL"),a=n("ulTY")("src"),c="toString",u=Function[c],s=(""+u).split(c);n("7gX0").inspectSource=function(t){return u.call(t)},(t.exports=function(t,e,n,c){var u="function"==typeof n;u&&(i(n,"name")||o(n,"name",e)),t[e]!==n&&(u&&(i(n,a)||o(n,a,t[e]?""+t[e]:s.join(String(e)))),t===r?t[e]=n:c?t[e]?t[e]=n:o(t,e,n):(delete t[e],o(t,e,n)))})(Function.prototype,c,function(){return"function"==typeof this&&this[a]||u.call(this)})},ReGu:function(t,e,n){var r=n("WBcL"),o=n("PHqh"),i=n("ot5s")(!1),a=n("mZON")("IE_PROTO");t.exports=function(t,e){var n,c=o(t),u=0,s=[];for(n in c)n!=a&&r(c,n)&&s.push(n);for(;e.length>u;)r(c,n=e[u++])&&(~i(s,n)||s.push(n));return s}},Rw4K:function(t,e,n){var r=n("Ds5P");r(r.S,"Reflect",{ownKeys:n("YUr7")})},SHe9:function(t,e,n){var r=n("wC1N"),o=n("kkCw")("iterator"),i=n("bN1p");t.exports=n("7gX0").getIteratorMethod=function(t){if(void 0!=t)return t[o]||t["@@iterator"]||i[r(t)]}},SPtU:function(t,e,n){function r(t,e){var n,c,f=arguments.length<3?t:arguments[2];return s(t)===f?t[e]:(n=o.f(t,e))?a(n,"value")?n.value:void 0!==n.get?n.get.call(f):void 0:u(c=i(t))?r(c,e,f):void 0}var o=n("x9zv"),i=n("KOrd"),a=n("WBcL"),c=n("Ds5P"),u=n("UKM+"),s=n("DIVP");c(c.S,"Reflect",{get:r})},"UKM+":function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},"V3l/":function(t,e){t.exports=!1},VWgF:function(t,e,n){var r=n("OzIq"),o="__core-js_shared__",i=r[o]||(r[o]={});t.exports=function(t){return i[t]||(i[t]={})}},WBcL:function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},WcO1:function(t,e,n){var r=n("ReGu"),o=n("QKXm").concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},X7aK:function(t,e,n){"use strict";var r=n("Ds5P"),o=n("DIVP"),i=function(t){this._t=o(t),this._i=0;var e,n=this._k=[];for(e in t)n.push(e)};n("IRJ3")(i,"Object",function(){var t,e=this,n=e._k;do{if(e._i>=n.length)return{value:void 0,done:!0}}while(!((t=n[e._i++])in e._t));return{value:t,done:!1}}),r(r.S,"Reflect",{enumerate:function(t){return new i(t)}})},XO1R:function(t,e,n){var r=n("ydD5");t.exports=Array.isArray||function(t){return"Array"==r(t)}},XS25:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("2tFN"),o=(n.n(r),n("ChGr")),i=(n.n(o),n("ZSR1"));n.n(i)},XSOZ:function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},XvUs:function(t,e,n){var r=n("DIVP");t.exports=function(t,e,n,o){try{return o?e(r(n)[0],n[1]):e(n)}catch(e){var i=t.return;throw void 0!==i&&r(i.call(t)),e}}},Y1N3:function(t,e){e.f=Object.getOwnPropertySymbols},Y1aA:function(t,e){e.f={}.propertyIsEnumerable},YUr7:function(t,e,n){var r=n("WcO1"),o=n("Y1N3"),i=n("DIVP"),a=n("OzIq").Reflect;t.exports=a&&a.ownKeys||function(t){var e=r.f(i(t)),n=o.f;return n?e.concat(n(t)):e}},ZDXm:function(t,e,n){"use strict";var r,o=n("LhTa")(0),i=n("R3AP"),a=n("1aA0"),c=n("oYd7"),u=n("fJSx"),s=n("UKM+"),f=a.getWeak,l=Object.isExtensible,p=u.ufstore,h={},d=function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},v={get:function(t){if(s(t)){var e=f(t);return!0===e?p(this).get(t):e?e[this._i]:void 0}},set:function(t,e){return u.def(this,t,e)}},y=t.exports=n("0Rih")("WeakMap",d,v,u,!0,!0);7!=(new y).set((Object.freeze||Object)(h),7).get(h)&&(r=u.getConstructor(d),c(r.prototype,v),a.NEED=!0,o(["delete","has","get","set"],function(t){var e=y.prototype,n=e[t];i(e,t,function(e,o){if(s(e)&&!l(e)){this._f||(this._f=new r);var i=this._f[t](e,o);return"set"==t?this:i}return n.call(this,e,o)})}))},ZSR1:function(t,e,n){(function(t){/** -* @license -* Copyright Google Inc. All Rights Reserved. -* -* Use of this source code is governed by an MIT-style license that can be -* found in the LICENSE file at https://angular.io/license -*/ -!function(t,e){e()}(0,function(){"use strict";function e(t,e){for(var n=t.length-1;n>=0;n--)"function"==typeof t[n]&&(t[n]=Zone.current.wrap(t[n],e+"_"+n));return t}function n(t,n){for(var r=t.constructor.name,o=function(o){var i=n[o],a=t[i];a&&(t[i]=function(t){var n=function(){return t.apply(this,e(arguments,r+"."+i))};return v(n,t),n}(a))},i=0;i=0&&"function"==typeof o[i.callbackIndex]){return Zone.current.scheduleMacroTask(i.name,o[i.callbackIndex],i,r,null)}return t.apply(e,o)}})}function d(t,e){var n=t[S("eventTasks")],r=[];if(n)for(var o=0;o1?new e(t,n):new e(t),a=Object.getOwnPropertyDescriptor(i,"onmessage");return a&&!1===a.configurable?(r=Object.create(i),["addEventListener","removeEventListener","send","close"].forEach(function(t){r[t]=function(){return i[t].apply(i,arguments)}})):r=i,o(r,["close","error","message","open"]),r};for(var n in e)t.WebSocket[n]=e[n]}function O(t){if(!j||I){var e="undefined"!=typeof WebSocket;if(D()){if(Z){o(window,ct,Object.getPrototypeOf(window)),o(Document.prototype,ct),void 0!==window.SVGElement&&o(window.SVGElement.prototype,ct),o(Element.prototype,ct),o(HTMLElement.prototype,ct),o(HTMLMediaElement.prototype,Y),o(HTMLFrameSetElement.prototype,W.concat(nt)),o(HTMLBodyElement.prototype,W.concat(nt)),o(HTMLFrameElement.prototype,et),o(HTMLIFrameElement.prototype,et);var n=window.HTMLMarqueeElement;n&&o(n.prototype,rt)}o(XMLHttpRequest.prototype,ot);var r=t.XMLHttpRequestEventTarget;r&&o(r&&r.prototype,ot),"undefined"!=typeof IDBIndex&&(o(IDBIndex.prototype,it),o(IDBRequest.prototype,it),o(IDBOpenDBRequest.prototype,it),o(IDBDatabase.prototype,it),o(IDBTransaction.prototype,it),o(IDBCursor.prototype,it)),e&&o(WebSocket.prototype,at)}else P(),l("XMLHttpRequest"),e&&T(t)}}function D(){if((Z||I)&&!Object.getOwnPropertyDescriptor(HTMLElement.prototype,"onclick")&&"undefined"!=typeof Element){var t=Object.getOwnPropertyDescriptor(Element.prototype,"onclick");if(t&&!t.configurable)return!1}var e=Object.getOwnPropertyDescriptor(XMLHttpRequest.prototype,"onreadystatechange");if(e){Object.defineProperty(XMLHttpRequest.prototype,"onreadystatechange",{enumerable:!0,configurable:!0,get:function(){return!0}});var n=new XMLHttpRequest,r=!!n.onreadystatechange;return Object.defineProperty(XMLHttpRequest.prototype,"onreadystatechange",e||{}),r}Object.defineProperty(XMLHttpRequest.prototype,"onreadystatechange",{enumerable:!0,configurable:!0,get:function(){return this[S("fakeonreadystatechange")]},set:function(t){this[S("fakeonreadystatechange")]=t}});var n=new XMLHttpRequest,o=function(){};n.onreadystatechange=o;var r=n[S("fakeonreadystatechange")]===o;return n.onreadystatechange=null,r}function P(){for(var t=function(t){var e=ct[t],n="on"+e;self.addEventListener(e,function(t){var e,r,o=t.target;for(r=o?o.constructor.name+"."+n:"unknown."+n;o;)o[n]&&!o[n][ut]&&(e=Zone.current.wrap(o[n],r),e[ut]=o[n],o[n]=e),o=o.parentElement},!0)},e=0;e",this._properties=e&&e.properties||{},this._zoneDelegate=new f(this,this._parent&&this._parent._zoneDelegate,e)}return r.assertZonePatched=function(){if(t.Promise!==E.ZoneAwarePromise)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")},Object.defineProperty(r,"root",{get:function(){for(var t=r.current;t.parent;)t=t.parent;return t},enumerable:!0,configurable:!0}),Object.defineProperty(r,"current",{get:function(){return x.zone},enumerable:!0,configurable:!0}),Object.defineProperty(r,"currentTask",{get:function(){return z},enumerable:!0,configurable:!0}),r.__load_patch=function(o,i){if(E.hasOwnProperty(o))throw Error("Already loaded patch: "+o);if(!t["__Zone_disable_"+o]){var a="Zone:"+o;e(a),E[o]=i(t,r,S),n(a,a)}},Object.defineProperty(r.prototype,"parent",{get:function(){return this._parent},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"name",{get:function(){return this._name},enumerable:!0,configurable:!0}),r.prototype.get=function(t){var e=this.getZoneWith(t);if(e)return e._properties[t]},r.prototype.getZoneWith=function(t){for(var e=this;e;){if(e._properties.hasOwnProperty(t))return e;e=e._parent}return null},r.prototype.fork=function(t){if(!t)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,t)},r.prototype.wrap=function(t,e){if("function"!=typeof t)throw new Error("Expecting function got: "+t);var n=this._zoneDelegate.intercept(this,t,e),r=this;return function(){return r.runGuarded(n,this,arguments,e)}},r.prototype.run=function(t,e,n,r){void 0===e&&(e=void 0),void 0===n&&(n=null),void 0===r&&(r=null),x={parent:x,zone:this};try{return this._zoneDelegate.invoke(this,t,e,n,r)}finally{x=x.parent}},r.prototype.runGuarded=function(t,e,n,r){void 0===e&&(e=null),void 0===n&&(n=null),void 0===r&&(r=null),x={parent:x,zone:this};try{try{return this._zoneDelegate.invoke(this,t,e,n,r)}catch(t){if(this._zoneDelegate.handleError(this,t))throw t}}finally{x=x.parent}},r.prototype.runTask=function(t,e,n){if(t.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(t.zone||g).name+"; Execution: "+this.name+")");if(t.state!==k||t.type!==P){var r=t.state!=_;r&&t._transitionTo(_,b),t.runCount++;var o=z;z=t,x={parent:x,zone:this};try{t.type==D&&t.data&&!t.data.isPeriodic&&(t.cancelFn=null);try{return this._zoneDelegate.invokeTask(this,t,e,n)}catch(t){if(this._zoneDelegate.handleError(this,t))throw t}}finally{t.state!==k&&t.state!==T&&(t.type==P||t.data&&t.data.isPeriodic?r&&t._transitionTo(b,_):(t.runCount=0,this._updateTaskCount(t,-1),r&&t._transitionTo(k,_,k))),x=x.parent,z=o}}},r.prototype.scheduleTask=function(t){if(t.zone&&t.zone!==this)for(var e=this;e;){if(e===t.zone)throw Error("can not reschedule task to "+this.name+" which is descendants of the original zone "+t.zone.name);e=e.parent}t._transitionTo(m,k);var n=[];t._zoneDelegates=n,t._zone=this;try{t=this._zoneDelegate.scheduleTask(this,t)}catch(e){throw t._transitionTo(T,m,k),this._zoneDelegate.handleError(this,e),e}return t._zoneDelegates===n&&this._updateTaskCount(t,1),t.state==m&&t._transitionTo(b,m),t},r.prototype.scheduleMicroTask=function(t,e,n,r){return this.scheduleTask(new l(O,t,e,n,r,null))},r.prototype.scheduleMacroTask=function(t,e,n,r,o){return this.scheduleTask(new l(D,t,e,n,r,o))},r.prototype.scheduleEventTask=function(t,e,n,r,o){return this.scheduleTask(new l(P,t,e,n,r,o))},r.prototype.cancelTask=function(t){if(t.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(t.zone||g).name+"; Execution: "+this.name+")");t._transitionTo(w,b,_);try{this._zoneDelegate.cancelTask(this,t)}catch(e){throw t._transitionTo(T,w),this._zoneDelegate.handleError(this,e),e}return this._updateTaskCount(t,-1),t._transitionTo(k,w),t.runCount=0,t},r.prototype._updateTaskCount=function(t,e){var n=t._zoneDelegates;-1==e&&(t._zoneDelegates=null);for(var r=0;r0,macroTask:n.macroTask>0,eventTask:n.eventTask>0,change:t};this.hasTask(this.zone,i)}},t}(),l=function(){function t(t,e,n,r,i,a){this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=t,this.source=e,this.data=r,this.scheduleFn=i,this.cancelFn=a,this.callback=n;var c=this;this.invoke=function(){j++;try{return c.runCount++,c.zone.runTask(c,this,arguments)}finally{1==j&&o(),j--}}}return Object.defineProperty(t.prototype,"zone",{get:function(){return this._zone},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){return this._state},enumerable:!0,configurable:!0}),t.prototype.cancelScheduleRequest=function(){this._transitionTo(k,m)},t.prototype._transitionTo=function(t,e,n){if(this._state!==e&&this._state!==n)throw new Error(this.type+" '"+this.source+"': can not transition to '"+t+"', expecting state '"+e+"'"+(n?" or '"+n+"'":"")+", was '"+this._state+"'.");this._state=t,t==k&&(this._zoneDelegates=null)},t.prototype.toString=function(){return this.data&&void 0!==this.data.handleId?this.data.handleId:Object.prototype.toString.call(this)},t.prototype.toJSON=function(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,invoke:this.invoke,scheduleFn:this.scheduleFn,cancelFn:this.cancelFn,runCount:this.runCount,callback:this.callback}},t}(),p=a("setTimeout"),h=a("Promise"),d=a("then"),v=[],y=!1,g={name:"NO ZONE"},k="notScheduled",m="scheduling",b="scheduled",_="running",w="canceling",T="unknown",O="microTask",D="macroTask",P="eventTask",E={},S={symbol:a,currentZoneFrame:function(){return x},onUnhandledError:i,microtaskDrainDone:i,scheduleMicroTask:r,showUncaughtError:function(){return!u[a("ignoreConsoleErrorUncaughtError")]},patchEventTargetMethods:function(){return!1},patchOnProperties:i,patchMethod:function(){return i}},x={parent:null,zone:new u(null,null)},z=null,j=0;n("Zone","Zone"),t.Zone=u}("undefined"!=typeof window&&window||"undefined"!=typeof self&&self||t);/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -Zone.__load_patch("ZoneAwarePromise",function(t,e,n){function r(t){n.onUnhandledError(t);try{var r=e[h("unhandledPromiseRejectionHandler")];r&&"function"==typeof r&&r.apply(this,[t])}catch(t){}}function o(t){return t&&t.then}function i(t){return t}function a(t){return D.reject(t)}function c(t,e){return function(n){try{u(t,e,n)}catch(e){u(t,!1,e)}}}function u(t,r,o){var i=O();if(t===o)throw new TypeError("Promise resolved with itself");if(t[g]===b){var a=null;try{"object"!=typeof o&&"function"!=typeof o||(a=o&&o.then)}catch(e){return i(function(){u(t,!1,e)})(),t}if(r!==w&&o instanceof D&&o.hasOwnProperty(g)&&o.hasOwnProperty(k)&&o[g]!==b)s(o),u(t,o[g],o[k]);else if(r!==w&&"function"==typeof a)try{a.apply(o,[i(c(t,r)),i(c(t,!1))])}catch(e){i(function(){u(t,!1,e)})()}else{t[g]=r;var l=t[k];t[k]=o,r===w&&o instanceof Error&&(o[h("currentTask")]=e.currentTask);for(var p=0;p0?arguments[0]:void 0)}},{add:function(t){return r.def(this,t=0===t?0:t,t)}},r)},"dm+7":function(t,e,n){var r=n("Ds5P");r(r.S,"Reflect",{has:function(t,e){return e in t}})},fJSx:function(t,e,n){"use strict";var r=n("A16L"),o=n("1aA0").getWeak,i=n("DIVP"),a=n("UKM+"),c=n("9GpA"),u=n("vmSO"),s=n("LhTa"),f=n("WBcL"),l=s(5),p=s(6),h=0,d=function(t){return t._l||(t._l=new v)},v=function(){this.a=[]},y=function(t,e){return l(t.a,function(t){return t[0]===e})};v.prototype={get:function(t){var e=y(this,t);if(e)return e[1]},has:function(t){return!!y(this,t)},set:function(t,e){var n=y(this,t);n?n[1]=e:this.a.push([t,e])},delete:function(t){var e=p(this.a,function(e){return e[0]===t});return~e&&this.a.splice(e,1),!!~e}},t.exports={getConstructor:function(t,e,n,i){var s=t(function(t,r){c(t,s,e,"_i"),t._i=h++,t._l=void 0,void 0!=r&&u(r,n,t[i],t)});return r(s.prototype,{delete:function(t){if(!a(t))return!1;var e=o(t);return!0===e?d(this).delete(t):e&&f(e,this._i)&&delete e[this._i]},has:function(t){if(!a(t))return!1;var e=o(t);return!0===e?d(this).has(t):e&&f(e,this._i)}}),s},def:function(t,e,n){var r=o(i(e),!0);return!0===r?d(t).set(e,n):r[t._i]=n,t},ufstore:d}},fU25:function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},gvDt:function(t,e,n){var r=n("UKM+"),o=n("DIVP"),i=function(t,e){if(o(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,r){try{r=n("rFzY")(Function.call,n("x9zv").f(Object.prototype,"__proto__").set,2),r(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,n){return i(t,n),e?t.__proto__=n:r(t,n),t}}({},!1):void 0),check:i}},jhxf:function(t,e,n){var r=n("UKM+"),o=n("OzIq").document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},kic5:function(t,e,n){var r=n("UKM+"),o=n("gvDt").set;t.exports=function(t,e,n){var i,a=e.constructor;return a!==n&&"function"==typeof a&&(i=a.prototype)!==n.prototype&&r(i)&&o&&o(t,i),t}},kkCw:function(t,e,n){var r=n("VWgF")("wks"),o=n("ulTY"),i=n("OzIq").Symbol,a="function"==typeof i;(t.exports=function(t){return r[t]||(r[t]=a&&i[t]||(a?i:o)("Symbol."+t))}).store=r},lDLk:function(t,e,n){var r=n("DIVP"),o=n("xZa+"),i=n("s4j0"),a=Object.defineProperty;e.f=n("bUqO")?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return a(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},mTp7:function(t,e,n){var r=n("Ds5P"),o=n("gvDt");o&&r(r.S,"Reflect",{setPrototypeOf:function(t,e){o.check(t,e);try{return o.set(t,e),!0}catch(t){return!1}}})},mZON:function(t,e,n){var r=n("VWgF")("keys"),o=n("ulTY");t.exports=function(t){return r[t]||(r[t]=o(t))}},oYd7:function(t,e,n){"use strict";var r=n("Qh14"),o=n("Y1N3"),i=n("Y1aA"),a=n("FryR"),c=n("Q6Nf"),u=Object.assign;t.exports=!u||n("zgIt")(function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!=u({},t)[n]||Object.keys(u({},e)).join("")!=r})?function(t,e){for(var n=a(t),u=arguments.length,s=1,f=o.f,l=i.f;u>s;)for(var p,h=c(arguments[s++]),d=f?r(h).concat(f(h)):r(h),v=d.length,y=0;v>y;)l.call(h,p=d[y++])&&(n[p]=h[p]);return n}:u},oeih:function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},ot5s:function(t,e,n){var r=n("PHqh"),o=n("BbyF"),i=n("8D8H");t.exports=function(t){return function(e,n,a){var c,u=r(e),s=o(u.length),f=i(a,s);if(t&&n!=n){for(;s>f;)if((c=u[f++])!=c)return!0}else for(;s>f;f++)if((t||f in u)&&u[f]===n)return t||f||0;return!t&&-1}}},plSV:function(t,e,n){var r=n("boo2");t.exports=function(t,e){return new(r(t))(e)}},qkyc:function(t,e,n){var r=n("kkCw")("iterator"),o=!1;try{var i=[7][r]();i.return=function(){o=!0},Array.from(i,function(){throw 2})}catch(t){}t.exports=function(t,e){if(!e&&!o)return!1;var n=!1;try{var i=[7],a=i[r]();a.next=function(){return{done:n=!0}},i[r]=function(){return a},t(i)}catch(t){}return n}},rFzY:function(t,e,n){var r=n("XSOZ");t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},s4j0:function(t,e,n){var r=n("UKM+");t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},twxM:function(t,e,n){var r=n("lDLk"),o=n("DIVP"),i=n("Qh14");t.exports=n("bUqO")?Object.defineProperties:function(t,e){o(t);for(var n,a=i(e),c=a.length,u=0;c>u;)r.f(t,n=a[u++],e[n]);return t}},uc2A:function(t,e,n){"use strict";var r=n("V3l/"),o=n("Ds5P"),i=n("R3AP"),a=n("2p1q"),c=n("WBcL"),u=n("bN1p"),s=n("IRJ3"),f=n("yYvK"),l=n("KOrd"),p=n("kkCw")("iterator"),h=!([].keys&&"next"in[].keys()),d="keys",v="values",y=function(){return this};t.exports=function(t,e,n,g,k,m,b){s(n,e,g);var _,w,T,O=function(t){if(!h&&t in S)return S[t];switch(t){case d:case v:return function(){return new n(this,t)}}return function(){return new n(this,t)}},D=e+" Iterator",P=k==v,E=!1,S=t.prototype,x=S[p]||S["@@iterator"]||k&&S[k],z=x||O(k),j=k?P?O("entries"):z:void 0,Z="Array"==e?S.entries||x:x;if(Z&&(T=l(Z.call(new t)))!==Object.prototype&&(f(T,D,!0),r||c(T,p)||a(T,p,y)),P&&x&&x.name!==v&&(E=!0,z=function(){return x.call(this)}),r&&!b||!h&&!E&&S[p]||a(S,p,z),u[e]=z,u[D]=y,k)if(_={values:P?z:O(v),keys:m?z:O(d),entries:j},b)for(w in _)w in S||i(S,w,_[w]);else o(o.P+o.F*(h||E),e,_);return _}},ulTY:function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},v3hU:function(t,e,n){var r=n("dSUw"),o=n("QG7u"),i=n("wCso"),a=n("DIVP"),c=n("KOrd"),u=i.keys,s=i.key,f=function(t,e){var n=u(t,e),i=c(t);if(null===i)return n;var a=f(i,e);return a.length?n.length?o(new r(n.concat(a))):a:n};i.exp({getMetadataKeys:function(t){return f(a(t),arguments.length<2?void 0:s(arguments[1]))}})},vmSO:function(t,e,n){var r=n("rFzY"),o=n("XvUs"),i=n("9vb1"),a=n("DIVP"),c=n("BbyF"),u=n("SHe9"),s={},f={},e=t.exports=function(t,e,n,l,p){var h,d,v,y,g=p?function(){return t}:u(t),k=r(n,l,e?2:1),m=0;if("function"!=typeof g)throw TypeError(t+" is not iterable!");if(i(g)){for(h=c(t.length);h>m;m++)if((y=e?k(a(d=t[m])[0],d[1]):k(t[m]))===s||y===f)return y}else for(v=g.call(t);!(d=v.next()).done;)if((y=o(v,k,d.value,e))===s||y===f)return y};e.BREAK=s,e.RETURN=f},vmSu:function(t,e,n){var r=n("Ds5P"),o=n("7ylX"),i=n("XSOZ"),a=n("DIVP"),c=n("UKM+"),u=n("zgIt"),s=n("ZtwE"),f=(n("OzIq").Reflect||{}).construct,l=u(function(){function t(){}return!(f(function(){},[],t)instanceof t)}),p=!u(function(){f(function(){})});r(r.S+r.F*(l||p),"Reflect",{construct:function(t,e){i(t),a(e);var n=arguments.length<3?t:i(arguments[2]);if(p&&!l)return f(t,e,n);if(t==n){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var r=[null];return r.push.apply(r,e),new(s.apply(t,r))}var u=n.prototype,h=o(c(u)?u:Object.prototype),d=Function.apply.call(t,h,e);return c(d)?d:h}})},vsh6:function(t,e,n){var r=n("wCso"),o=n("DIVP"),i=r.keys,a=r.key;r.exp({getOwnMetadataKeys:function(t){return i(o(t),arguments.length<2?void 0:a(arguments[1]))}})},wC1N:function(t,e,n){var r=n("ydD5"),o=n("kkCw")("toStringTag"),i="Arguments"==r(function(){return arguments}()),a=function(t,e){try{return t[e]}catch(t){}};t.exports=function(t){var e,n,c;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=a(e=Object(t),o))?n:i?r(e):"Object"==(c=r(e))&&"function"==typeof e.callee?"Arguments":c}},wCso:function(t,e,n){var r=n("MsuQ"),o=n("Ds5P"),i=n("VWgF")("metadata"),a=i.store||(i.store=new(n("ZDXm"))),c=function(t,e,n){var o=a.get(t);if(!o){if(!n)return;a.set(t,o=new r)}var i=o.get(e);if(!i){if(!n)return;o.set(e,i=new r)}return i},u=function(t,e,n){var r=c(e,n,!1);return void 0!==r&&r.has(t)},s=function(t,e,n){var r=c(e,n,!1);return void 0===r?void 0:r.get(t)},f=function(t,e,n,r){c(n,r,!0).set(t,e)},l=function(t,e){var n=c(t,e,!1),r=[];return n&&n.forEach(function(t,e){r.push(e)}),r},p=function(t){return void 0===t||"symbol"==typeof t?t:String(t)},h=function(t){o(o.S,"Reflect",t)};t.exports={store:a,map:c,has:u,get:s,set:f,keys:l,key:p,exp:h}},x9zv:function(t,e,n){var r=n("Y1aA"),o=n("fU25"),i=n("PHqh"),a=n("s4j0"),c=n("WBcL"),u=n("xZa+"),s=Object.getOwnPropertyDescriptor;e.f=n("bUqO")?s:function(t,e){if(t=i(t),e=a(e,!0),u)try{return s(t,e)}catch(t){}if(c(t,e))return o(!r.f.call(t,e),t[e])}},"xZa+":function(t,e,n){t.exports=!n("bUqO")&&!n("zgIt")(function(){return 7!=Object.defineProperty(n("jhxf")("div"),"a",{get:function(){return 7}}).a})},yJ2x:function(t,e,n){var r=n("wCso"),o=n("DIVP"),i=r.key,a=r.set;r.exp({defineMetadata:function(t,e,n,r){a(t,e,o(n),i(r))}})},yOtE:function(t,e,n){var r=n("wCso"),o=n("DIVP"),i=r.has,a=r.key;r.exp({hasOwnMetadata:function(t,e){return i(t,o(e),arguments.length<3?void 0:a(arguments[2]))}})},yYvK:function(t,e,n){var r=n("lDLk").f,o=n("WBcL"),i=n("kkCw")("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},ydD5:function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},yx1U:function(t,e,n){var r=n("Ds5P"),o=n("x9zv").f,i=n("DIVP");r(r.S,"Reflect",{deleteProperty:function(t,e){var n=o(i(t),e);return!(n&&!n.configurable)&&delete t[e]}})},zZHq:function(t,e,n){var r=n("wCso"),o=n("DIVP"),i=r.get,a=r.key;r.exp({getOwnMetadata:function(t,e){return i(t,o(e),arguments.length<3?void 0:a(arguments[2]))}})},zgIt:function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}}},[1]); \ No newline at end of file diff --git a/client/dist/styles.bfeff1bad27ba65b7c63.bundle.css b/client/dist/styles.bfeff1bad27ba65b7c63.bundle.css deleted file mode 100644 index 0513cd8..0000000 --- a/client/dist/styles.bfeff1bad27ba65b7c63.bundle.css +++ /dev/null @@ -1 +0,0 @@ -body{font:14px arial,sans-serif}.msgs,body{margin:0;padding:0}.msgs{list-style:none;position:absolute;top:0;left:0;width:100%;height:calc(100% - 60px);overflow-y:scroll}.msgs li{display:inline-block;float:left;margin:15px;padding:15px;background:#efefef;border-radius:5px;clear:both;font-weight:300;max-width:75%;line-height:18px}.msgs li.bot{float:right;background:#6666fe;color:#fff}.msgs li.bot span{font-weight:700;display:inline-block;position:relative;-webkit-animation:typing ease-in-out;animation:typing ease-in-out;-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-direction:alternate;animation-direction:alternate}.msgs li.bot span:nth-child(2){-webkit-animation-delay:.1s;animation-delay:.1s}.msgs li.bot span:nth-child(3){-webkit-animation-delay:.2s;animation-delay:.2s}.chat-input{position:absolute;bottom:0;left:0;width:100%;height:60px}.chat-input-text{width:100%;height:60px;font-size:16px;font-weight:300;margin:0;border:0;padding:0 10px;box-sizing:border-box;border-top:1px solid #d3d3d3;outline:0}.chat-input-text:focus{box-shadow:0 -1px 3px rgba(0,0,0,.1)}@-webkit-keyframes typing{0%{-webkit-transform:translate(0);transform:translate(0)}to{-webkit-transform:translateY(-4px);transform:translateY(-4px)}}@keyframes typing{0%{-webkit-transform:translate(0);transform:translate(0)}to{-webkit-transform:translateY(-4px);transform:translateY(-4px)}} \ No newline at end of file diff --git a/client/dist/vendor.4012b002d18be9b60db9.bundle.js b/client/dist/vendor.4012b002d18be9b60db9.bundle.js deleted file mode 100644 index 49cd544..0000000 --- a/client/dist/vendor.4012b002d18be9b60db9.bundle.js +++ /dev/null @@ -1,659 +0,0 @@ -webpackJsonp([3,4],{"+3eL":function(t,e,n){"use strict";function r(){try{return i.apply(this,arguments)}catch(t){return s.errorObject.e=t,s.errorObject}}function o(t){return i=t,r}var i,s=n("WhVc");e.tryCatch=o},"+Y2e":function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},o=n("EEr4"),i=n("mmVS"),s=n("rCTf"),a=n("B00U"),u=n("VOfZ"),c=n("MQMf"),l=n("+3eL"),p=n("WhVc"),f=n("KLoZ"),h=function(t){function e(e,n){if(e instanceof s.Observable)t.call(this,n,e);else{if(t.call(this),this.WebSocketCtor=u.root.WebSocket,this._output=new o.Subject,"string"==typeof e?this.url=e:f.assign(this,e),!this.WebSocketCtor)throw new Error("no WebSocket constructor can be found");this.destination=new c.ReplaySubject}}return r(e,t),e.prototype.resultSelector=function(t){return JSON.parse(t.data)},e.create=function(t){return new e(t)},e.prototype.lift=function(t){var n=new e(this,this.destination);return n.operator=t,n},e.prototype._resetState=function(){this.socket=null,this.source||(this.destination=new c.ReplaySubject),this._output=new o.Subject},e.prototype.multiplex=function(t,e,n){var r=this;return new s.Observable(function(o){var i=l.tryCatch(t)();i===p.errorObject?o.error(p.errorObject.e):r.next(i);var s=r.subscribe(function(t){var e=l.tryCatch(n)(t);e===p.errorObject?o.error(p.errorObject.e):e&&o.next(t)},function(t){return o.error(t)},function(){return o.complete()});return function(){var t=l.tryCatch(e)();t===p.errorObject?o.error(p.errorObject.e):r.next(t),s.unsubscribe()}})},e.prototype._connectSocket=function(){var t=this,e=this.WebSocketCtor,n=this._output,r=null;try{r=this.protocol?new e(this.url,this.protocol):new e(this.url),this.socket=r,this.binaryType&&(this.socket.binaryType=this.binaryType)}catch(t){return void n.error(t)}var o=new a.Subscription(function(){t.socket=null,r&&1===r.readyState&&r.close()});r.onopen=function(e){var s=t.openObserver;s&&s.next(e);var a=t.destination;t.destination=i.Subscriber.create(function(t){return 1===r.readyState&&r.send(t)},function(e){var o=t.closingObserver;o&&o.next(void 0),e&&e.code?r.close(e.code,e.reason):n.error(new TypeError("WebSocketSubject.error must be called with an object with an error code, and an optional reason: { code: number, reason: string }")),t._resetState()},function(){var e=t.closingObserver;e&&e.next(void 0),r.close(),t._resetState()}),a&&a instanceof c.ReplaySubject&&o.add(a.subscribe(t.destination))},r.onerror=function(e){t._resetState(),n.error(e)},r.onclose=function(e){t._resetState();var r=t.closeObserver;r&&r.next(e),e.wasClean?n.complete():n.error(e)},r.onmessage=function(e){var r=l.tryCatch(t.resultSelector)(e);r===p.errorObject?n.error(p.errorObject.e):n.next(r)}},e.prototype._subscribe=function(t){var e=this,n=this.source;if(n)return n.subscribe(t);this.socket||this._connectSocket();var r=new a.Subscription;return r.add(this._output.subscribe(t)),r.add(function(){var t=e.socket;0===e._output.observers.length&&(t&&1===t.readyState&&t.close(),e._resetState())}),r},e.prototype.unsubscribe=function(){var e=this,n=e.source,r=e.socket;r&&1===r.readyState&&(r.close(),this._resetState()),t.prototype.unsubscribe.call(this),n||(this.destination=new c.ReplaySubject)},e}(o.AnonymousSubject);e.WebSocketSubject=h},"+ayw":function(t,e,n){"use strict";function r(){return new s.Subject}function o(){return i.multicast.call(this,r).refCount()}var i=n("emOw"),s=n("EEr4");e.share=o},"/8te":function(t,e,n){"use strict";var r=n("Gb0N");e.range=r.RangeObservable.create},"10Gq":function(t,e,n){"use strict";var r=n("rCTf"),o=n("Cx8F");r.Observable.prototype.retryWhen=o.retryWhen},"1KT0":function(t,e,n){"use strict";var r=n("kkb0");e.merge=r.mergeStatic},"1r8+":function(t,e,n){"use strict";e.isArrayLike=function(t){return t&&"number"==typeof t.length}},"2Je8":function(t,e,n){"use strict";function r(t,e){return t&&e.startsWith(t)?e.substring(t.length):e}function o(t){return t.replace(/\/index.html$/,"")}function i(t,e,n){var r="="+t;if(e.indexOf(r)>-1)return r;if(r=n.getPluralCategory(t),e.indexOf(r)>-1)return r;if(e.indexOf("other")>-1)return"other";throw new Error('No plural message found for value "'+t+'"')}function s(t,e){"string"==typeof e&&(e=parseInt(e,10));var n=e,r=n.toString().replace(/^[^.]*\.?/,""),o=Math.floor(Math.abs(n)),i=r.length,s=parseInt(r,10),a=parseInt(n.toString().replace(/^[^.]*\.?|0+$/g,""),10)||0;switch(t.split("-")[0].toLowerCase()){case"af":case"asa":case"az":case"bem":case"bez":case"bg":case"brx":case"ce":case"cgg":case"chr":case"ckb":case"ee":case"el":case"eo":case"es":case"eu":case"fo":case"fur":case"gsw":case"ha":case"haw":case"hu":case"jgo":case"jmc":case"ka":case"kk":case"kkj":case"kl":case"ks":case"ksb":case"ky":case"lb":case"lg":case"mas":case"mgo":case"ml":case"mn":case"nb":case"nd":case"ne":case"nn":case"nnh":case"nyn":case"om":case"or":case"os":case"ps":case"rm":case"rof":case"rwk":case"saq":case"seh":case"sn":case"so":case"sq":case"ta":case"te":case"teo":case"tk":case"tr":case"ug":case"uz":case"vo":case"vun":case"wae":case"xog":return 1===n?H.One:H.Other;case"ak":case"ln":case"mg":case"pa":case"ti":return n===Math.floor(n)&&n>=0&&n<=1?H.One:H.Other;case"am":case"as":case"bn":case"fa":case"gu":case"hi":case"kn":case"mr":case"zu":return 0===o||1===n?H.One:H.Other;case"ar":return 0===n?H.Zero:1===n?H.One:2===n?H.Two:n%100===Math.floor(n%100)&&n%100>=3&&n%100<=10?H.Few:n%100===Math.floor(n%100)&&n%100>=11&&n%100<=99?H.Many:H.Other;case"ast":case"ca":case"de":case"en":case"et":case"fi":case"fy":case"gl":case"it":case"nl":case"sv":case"sw":case"ur":case"yi":return 1===o&&0===i?H.One:H.Other;case"be":return n%10==1&&n%100!=11?H.One:n%10===Math.floor(n%10)&&n%10>=2&&n%10<=4&&!(n%100>=12&&n%100<=14)?H.Few:n%10==0||n%10===Math.floor(n%10)&&n%10>=5&&n%10<=9||n%100===Math.floor(n%100)&&n%100>=11&&n%100<=14?H.Many:H.Other;case"br":return n%10==1&&n%100!=11&&n%100!=71&&n%100!=91?H.One:n%10==2&&n%100!=12&&n%100!=72&&n%100!=92?H.Two:n%10===Math.floor(n%10)&&(n%10>=3&&n%10<=4||n%10==9)&&!(n%100>=10&&n%100<=19||n%100>=70&&n%100<=79||n%100>=90&&n%100<=99)?H.Few:0!==n&&n%1e6==0?H.Many:H.Other;case"bs":case"hr":case"sr":return 0===i&&o%10==1&&o%100!=11||s%10==1&&s%100!=11?H.One:0===i&&o%10===Math.floor(o%10)&&o%10>=2&&o%10<=4&&!(o%100>=12&&o%100<=14)||s%10===Math.floor(s%10)&&s%10>=2&&s%10<=4&&!(s%100>=12&&s%100<=14)?H.Few:H.Other;case"cs":case"sk":return 1===o&&0===i?H.One:o===Math.floor(o)&&o>=2&&o<=4&&0===i?H.Few:0!==i?H.Many:H.Other;case"cy":return 0===n?H.Zero:1===n?H.One:2===n?H.Two:3===n?H.Few:6===n?H.Many:H.Other;case"da":return 1===n||0!==a&&(0===o||1===o)?H.One:H.Other;case"dsb":case"hsb":return 0===i&&o%100==1||s%100==1?H.One:0===i&&o%100==2||s%100==2?H.Two:0===i&&o%100===Math.floor(o%100)&&o%100>=3&&o%100<=4||s%100===Math.floor(s%100)&&s%100>=3&&s%100<=4?H.Few:H.Other;case"ff":case"fr":case"hy":case"kab":return 0===o||1===o?H.One:H.Other;case"fil":return 0===i&&(1===o||2===o||3===o)||0===i&&o%10!=4&&o%10!=6&&o%10!=9||0!==i&&s%10!=4&&s%10!=6&&s%10!=9?H.One:H.Other;case"ga":return 1===n?H.One:2===n?H.Two:n===Math.floor(n)&&n>=3&&n<=6?H.Few:n===Math.floor(n)&&n>=7&&n<=10?H.Many:H.Other;case"gd":return 1===n||11===n?H.One:2===n||12===n?H.Two:n===Math.floor(n)&&(n>=3&&n<=10||n>=13&&n<=19)?H.Few:H.Other;case"gv":return 0===i&&o%10==1?H.One:0===i&&o%10==2?H.Two:0!==i||o%100!=0&&o%100!=20&&o%100!=40&&o%100!=60&&o%100!=80?0!==i?H.Many:H.Other:H.Few;case"he":return 1===o&&0===i?H.One:2===o&&0===i?H.Two:0!==i||n>=0&&n<=10||n%10!=0?H.Other:H.Many;case"is":return 0===a&&o%10==1&&o%100!=11||0!==a?H.One:H.Other;case"ksh":return 0===n?H.Zero:1===n?H.One:H.Other;case"kw":case"naq":case"se":case"smn":return 1===n?H.One:2===n?H.Two:H.Other;case"lag":return 0===n?H.Zero:0!==o&&1!==o||0===n?H.Other:H.One;case"lt":return n%10!=1||n%100>=11&&n%100<=19?n%10===Math.floor(n%10)&&n%10>=2&&n%10<=9&&!(n%100>=11&&n%100<=19)?H.Few:0!==s?H.Many:H.Other:H.One;case"lv":case"prg":return n%10==0||n%100===Math.floor(n%100)&&n%100>=11&&n%100<=19||2===i&&s%100===Math.floor(s%100)&&s%100>=11&&s%100<=19?H.Zero:n%10==1&&n%100!=11||2===i&&s%10==1&&s%100!=11||2!==i&&s%10==1?H.One:H.Other;case"mk":return 0===i&&o%10==1||s%10==1?H.One:H.Other;case"mt":return 1===n?H.One:0===n||n%100===Math.floor(n%100)&&n%100>=2&&n%100<=10?H.Few:n%100===Math.floor(n%100)&&n%100>=11&&n%100<=19?H.Many:H.Other;case"pl":return 1===o&&0===i?H.One:0===i&&o%10===Math.floor(o%10)&&o%10>=2&&o%10<=4&&!(o%100>=12&&o%100<=14)?H.Few:0===i&&1!==o&&o%10===Math.floor(o%10)&&o%10>=0&&o%10<=1||0===i&&o%10===Math.floor(o%10)&&o%10>=5&&o%10<=9||0===i&&o%100===Math.floor(o%100)&&o%100>=12&&o%100<=14?H.Many:H.Other;case"pt":return n===Math.floor(n)&&n>=0&&n<=2&&2!==n?H.One:H.Other;case"ro":return 1===o&&0===i?H.One:0!==i||0===n||1!==n&&n%100===Math.floor(n%100)&&n%100>=1&&n%100<=19?H.Few:H.Other;case"ru":case"uk":return 0===i&&o%10==1&&o%100!=11?H.One:0===i&&o%10===Math.floor(o%10)&&o%10>=2&&o%10<=4&&!(o%100>=12&&o%100<=14)?H.Few:0===i&&o%10==0||0===i&&o%10===Math.floor(o%10)&&o%10>=5&&o%10<=9||0===i&&o%100===Math.floor(o%100)&&o%100>=11&&o%100<=14?H.Many:H.Other;case"shi":return 0===o||1===n?H.One:n===Math.floor(n)&&n>=2&&n<=10?H.Few:H.Other;case"si":return 0===n||1===n||0===o&&1===s?H.One:H.Other;case"sl":return 0===i&&o%100==1?H.One:0===i&&o%100==2?H.Two:0===i&&o%100===Math.floor(o%100)&&o%100>=3&&o%100<=4||0!==i?H.Few:H.Other;case"tzm":return n===Math.floor(n)&&n>=0&&n<=1||n===Math.floor(n)&&n>=11&&n<=99?H.One:H.Other;default:return H.Other}}function a(t){return t.name||typeof t}/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -function u(t,e){return Error("InvalidPipeArgument: '"+e+"' for pipe '"+n.i(k.X)(t)+"'")}function c(t){return t?t[0].toUpperCase()+t.substr(1).toLowerCase():t}function l(t){return function(e,n){var r=t(e,n);return 1==r.length?"0"+r:r}}function p(t){return function(e,n){return t(e,n).split(" ")[1]}}function f(t){return function(e,n){return t(e,n).split(" ")[0]}}function h(t,e,n){return new Intl.DateTimeFormat(e,n).format(t).replace(/[\u200e\u200f]/g,"")}function d(t){var e={hour:"2-digit",hour12:!1,timeZoneName:t};return function(t,n){var r=h(t,n,e);return r?r.substring(3):""}}function y(t,e){return t.hour12=e,t}function v(t,e){var n={};return n[t]=2===e?"2-digit":"numeric",n}function m(t,e){var n={};return n[t]=e<4?e>1?"short":"narrow":"long",n}function g(t){return t.reduce(function(t,e){return Object.assign({},t,e)},{})}function b(t){return function(e,n){return h(e,n,t)}}function _(t,e,n){var r=ht[t];if(r)return r(e,n);var o=t,i=yt.get(o);if(!i){i=[];var s=void 0;ft.exec(t);for(var a=t;a;)s=ft.exec(a),s?(i=i.concat(s.slice(1)),a=i.pop()):(i.push(a),a=null);yt.set(o,i)}return i.reduce(function(t,r){var o=dt[r];return t+(o?o(e,n):w(r))},"")}function w(t){return"''"===t?"'":t.replace(/(^'|'$)/g,"").replace(/''/g,"'")}function C(t,e,n,r,o,i,s){if(void 0===i&&(i=null),void 0===s&&(s=!1),null==n)return null;if("number"!=typeof(n="string"==typeof n&&E(n)?+n:n))throw u(t,n);var a=void 0,c=void 0,l=void 0;if(r!==lt.Currency&&(a=1,c=0,l=3),o){var p=o.match(mt);if(null===p)throw new Error(o+" is not a valid digit info for number pipes");null!=p[1]&&(a=O(p[1])),null!=p[3]&&(c=O(p[3])),null!=p[5]&&(l=O(p[5]))}return pt.format(n,e,r,{minimumIntegerDigits:a,minimumFractionDigits:c,maximumFractionDigits:l,currency:i,currencyAsSymbol:s})}function O(t){var e=parseInt(t);if(isNaN(e))throw new Error("Invalid integer literal when parsing "+t);return e}function E(t){return!isNaN(t-parseFloat(t))}function x(t){return null==t||""===t}function S(t){return t instanceof Date&&!isNaN(t.valueOf())}function P(t){var e=new Date(0),n=0,r=0,o=t[8]?e.setUTCFullYear:e.setFullYear,i=t[8]?e.setUTCHours:e.setHours;t[9]&&(n=A(t[9]+t[10]),r=A(t[9]+t[11])),o.call(e,A(t[1]),A(t[2])-1,A(t[3]));var s=A(t[4]||"0")-n,a=A(t[5]||"0")-r,u=A(t[6]||"0"),c=Math.round(1e3*parseFloat("0."+(t[7]||0)));return i.call(e,s,a,u,c),e}function A(t){return parseInt(t,10)}var T=n("TToO"),k=n("3j3K");n.d(e,"b",function(){return F}),n.d(e,"a",function(){return I}),n.d(e,"d",function(){return Tt}),n.d(e,"g",function(){return L}),n.d(e,"h",function(){return G}),n.d(e,"i",function(){return z}),n.d(e,"c",function(){return kt}),n.d(e,"f",function(){return Vt}),n.d(e,"e",function(){return V});/** - * @license Angular v4.2.6 - * (c) 2010-2017 Google, Inc. https://angular.io/ - * License: MIT - */ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -var V=function(){function t(){}return t.prototype.getBaseHrefFromDOM=function(){},t.prototype.onPopState=function(t){},t.prototype.onHashChange=function(t){},t.prototype.pathname=function(){},t.prototype.search=function(){},t.prototype.hash=function(){},t.prototype.replaceState=function(t,e,n){},t.prototype.pushState=function(t,e,n){},t.prototype.forward=function(){},t.prototype.back=function(){},t}(),N=(new k.I("Location Initialized"),function(){function t(){}return t.prototype.path=function(t){},t.prototype.prepareExternalUrl=function(t){},t.prototype.pushState=function(t,e,n,r){},t.prototype.replaceState=function(t,e,n,r){},t.prototype.forward=function(){},t.prototype.back=function(){},t.prototype.onPopState=function(t){},t.prototype.getBaseHref=function(){},t}()),j=new k.I("appBaseHref"),M=function(){function t(e){var n=this;this._subject=new k.V,this._platformStrategy=e;var r=this._platformStrategy.getBaseHref();this._baseHref=t.stripTrailingSlash(o(r)),this._platformStrategy.onPopState(function(t){n._subject.emit({url:n.path(!0),pop:!0,type:t.type})})}return t.prototype.path=function(t){return void 0===t&&(t=!1),this.normalize(this._platformStrategy.path(t))},t.prototype.isCurrentPathEqualTo=function(e,n){return void 0===n&&(n=""),this.path()==this.normalize(e+t.normalizeQueryParams(n))},t.prototype.normalize=function(e){return t.stripTrailingSlash(r(this._baseHref,o(e)))},t.prototype.prepareExternalUrl=function(t){return t&&"/"!==t[0]&&(t="/"+t),this._platformStrategy.prepareExternalUrl(t)},t.prototype.go=function(t,e){void 0===e&&(e=""),this._platformStrategy.pushState(null,"",t,e)},t.prototype.replaceState=function(t,e){void 0===e&&(e=""),this._platformStrategy.replaceState(null,"",t,e)},t.prototype.forward=function(){this._platformStrategy.forward()},t.prototype.back=function(){this._platformStrategy.back()},t.prototype.subscribe=function(t,e,n){return this._subject.subscribe({next:t,error:e,complete:n})},t.normalizeQueryParams=function(t){return t&&"?"!==t[0]?"?"+t:t},t.joinWithSlash=function(t,e){if(0==t.length)return e;if(0==e.length)return t;var n=0;return t.endsWith("/")&&n++,e.startsWith("/")&&n++,2==n?t+e.substring(1):1==n?t+e:t+"/"+e},t.stripTrailingSlash=function(t){var e=t.match(/#|\?|$/),n=e&&e.index||t.length,r=n-("/"===t[n-1]?1:0);return t.slice(0,r)+t.slice(n)},t}();M.decorators=[{type:k.D}],M.ctorParameters=function(){return[{type:N}]};/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -var R=function(t){function e(e,n){var r=t.call(this)||this;return r._platformLocation=e,r._baseHref="",null!=n&&(r._baseHref=n),r}return T.a(e,t),e.prototype.onPopState=function(t){this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t)},e.prototype.getBaseHref=function(){return this._baseHref},e.prototype.path=function(t){void 0===t&&(t=!1);var e=this._platformLocation.hash;return null==e&&(e="#"),e.length>0?e.substring(1):e},e.prototype.prepareExternalUrl=function(t){var e=M.joinWithSlash(this._baseHref,t);return e.length>0?"#"+e:e},e.prototype.pushState=function(t,e,n,r){var o=this.prepareExternalUrl(n+M.normalizeQueryParams(r));0==o.length&&(o=this._platformLocation.pathname),this._platformLocation.pushState(t,e,o)},e.prototype.replaceState=function(t,e,n,r){var o=this.prepareExternalUrl(n+M.normalizeQueryParams(r));0==o.length&&(o=this._platformLocation.pathname),this._platformLocation.replaceState(t,e,o)},e.prototype.forward=function(){this._platformLocation.forward()},e.prototype.back=function(){this._platformLocation.back()},e}(N);R.decorators=[{type:k.D}],R.ctorParameters=function(){return[{type:V},{type:void 0,decorators:[{type:k.L},{type:k.H,args:[j]}]}]};/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -var D=function(t){function e(e,n){var r=t.call(this)||this;if(r._platformLocation=e,null==n&&(n=r._platformLocation.getBaseHrefFromDOM()),null==n)throw new Error("No base href set. Please provide a value for the APP_BASE_HREF token or add a base element to the document.");return r._baseHref=n,r}return T.a(e,t),e.prototype.onPopState=function(t){this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t)},e.prototype.getBaseHref=function(){return this._baseHref},e.prototype.prepareExternalUrl=function(t){return M.joinWithSlash(this._baseHref,t)},e.prototype.path=function(t){void 0===t&&(t=!1);var e=this._platformLocation.pathname+M.normalizeQueryParams(this._platformLocation.search),n=this._platformLocation.hash;return n&&t?""+e+n:e},e.prototype.pushState=function(t,e,n,r){var o=this.prepareExternalUrl(n+M.normalizeQueryParams(r));this._platformLocation.pushState(t,e,o)},e.prototype.replaceState=function(t,e,n,r){var o=this.prepareExternalUrl(n+M.normalizeQueryParams(r));this._platformLocation.replaceState(t,e,o)},e.prototype.forward=function(){this._platformLocation.forward()},e.prototype.back=function(){this._platformLocation.back()},e}(N);D.decorators=[{type:k.D}],D.ctorParameters=function(){return[{type:V},{type:void 0,decorators:[{type:k.L},{type:k.H,args:[j]}]}]};/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -var I=function(){function t(){}return t.prototype.getPluralCategory=function(t){},t}(),F=function(t){function e(e){var n=t.call(this)||this;return n.locale=e,n}return T.a(e,t),e.prototype.getPluralCategory=function(t){switch(s(this.locale,t)){case H.Zero:return"zero";case H.One:return"one";case H.Two:return"two";case H.Few:return"few";case H.Many:return"many";default:return"other"}},e}(I);F.decorators=[{type:k.D}],F.ctorParameters=function(){return[{type:void 0,decorators:[{type:k.H,args:[k.h]}]}]};var H={};H.Zero=0,H.One=1,H.Two=2,H.Few=3,H.Many=4,H.Other=5,H[H.Zero]="Zero",H[H.One]="One",H[H.Two]="Two",H[H.Few]="Few",H[H.Many]="Many",H[H.Other]="Other";/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -var L=function(){function t(t,e,n,r){this._iterableDiffers=t,this._keyValueDiffers=e,this._ngEl=n,this._renderer=r,this._initialClasses=[]}return Object.defineProperty(t.prototype,"klass",{set:function(t){this._applyInitialClasses(!0),this._initialClasses="string"==typeof t?t.split(/\s+/):[],this._applyInitialClasses(!1),this._applyClasses(this._rawClass,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ngClass",{set:function(t){this._cleanupClasses(this._rawClass),this._iterableDiffer=null,this._keyValueDiffer=null,this._rawClass="string"==typeof t?t.split(/\s+/):t,this._rawClass&&(n.i(k.W)(this._rawClass)?this._iterableDiffer=this._iterableDiffers.find(this._rawClass).create():this._keyValueDiffer=this._keyValueDiffers.find(this._rawClass).create())},enumerable:!0,configurable:!0}),t.prototype.ngDoCheck=function(){if(this._iterableDiffer){var t=this._iterableDiffer.diff(this._rawClass);t&&this._applyIterableChanges(t)}else if(this._keyValueDiffer){var e=this._keyValueDiffer.diff(this._rawClass);e&&this._applyKeyValueChanges(e)}},t.prototype._cleanupClasses=function(t){this._applyClasses(t,!0),this._applyInitialClasses(!1)},t.prototype._applyKeyValueChanges=function(t){var e=this;t.forEachAddedItem(function(t){return e._toggleClass(t.key,t.currentValue)}),t.forEachChangedItem(function(t){return e._toggleClass(t.key,t.currentValue)}),t.forEachRemovedItem(function(t){t.previousValue&&e._toggleClass(t.key,!1)})},t.prototype._applyIterableChanges=function(t){var e=this;t.forEachAddedItem(function(t){if("string"!=typeof t.item)throw new Error("NgClass can only toggle CSS classes expressed as strings, got "+n.i(k.X)(t.item));e._toggleClass(t.item,!0)}),t.forEachRemovedItem(function(t){return e._toggleClass(t.item,!1)})},t.prototype._applyInitialClasses=function(t){var e=this;this._initialClasses.forEach(function(n){return e._toggleClass(n,!t)})},t.prototype._applyClasses=function(t,e){var n=this;t&&(Array.isArray(t)||t instanceof Set?t.forEach(function(t){return n._toggleClass(t,!e)}):Object.keys(t).forEach(function(r){null!=t[r]&&n._toggleClass(r,!e)}))},t.prototype._toggleClass=function(t,e){var n=this;(t=t.trim())&&t.split(/\s+/g).forEach(function(t){n._renderer.setElementClass(n._ngEl.nativeElement,t,!!e)})},t}();L.decorators=[{type:k.Y,args:[{selector:"[ngClass]"}]}],L.ctorParameters=function(){return[{type:k.m},{type:k.o},{type:k.Z},{type:k._0}]},L.propDecorators={klass:[{type:k._1,args:["class"]}],ngClass:[{type:k._1}]};/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -var U=function(){function t(t){this._viewContainerRef=t,this._componentRef=null,this._moduleRef=null}return t.prototype.ngOnChanges=function(t){if(this._viewContainerRef.clear(),this._componentRef=null,this.ngComponentOutlet){var e=this.ngComponentOutletInjector||this._viewContainerRef.parentInjector;if(t.ngComponentOutletNgModuleFactory)if(this._moduleRef&&this._moduleRef.destroy(),this.ngComponentOutletNgModuleFactory){var n=e.get(k.g);this._moduleRef=this.ngComponentOutletNgModuleFactory.create(n.injector)}else this._moduleRef=null;var r=this._moduleRef?this._moduleRef.componentFactoryResolver:e.get(k.e),o=r.resolveComponentFactory(this.ngComponentOutlet);this._componentRef=this._viewContainerRef.createComponent(o,this._viewContainerRef.length,e,this.ngComponentOutletContent)}},t.prototype.ngOnDestroy=function(){this._moduleRef&&this._moduleRef.destroy()},t}();U.decorators=[{type:k.Y,args:[{selector:"[ngComponentOutlet]"}]}],U.ctorParameters=function(){return[{type:k._2}]},U.propDecorators={ngComponentOutlet:[{type:k._1}],ngComponentOutletInjector:[{type:k._1}],ngComponentOutletContent:[{type:k._1}],ngComponentOutletNgModuleFactory:[{type:k._1}]};/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -var B=function(){function t(t,e,n,r){this.$implicit=t,this.ngForOf=e,this.index=n,this.count=r}return Object.defineProperty(t.prototype,"first",{get:function(){return 0===this.index},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"last",{get:function(){return this.index===this.count-1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"even",{get:function(){return this.index%2==0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"odd",{get:function(){return!this.even},enumerable:!0,configurable:!0}),t}(),G=function(){function t(t,e,n){this._viewContainer=t,this._template=e,this._differs=n,this._differ=null}return Object.defineProperty(t.prototype,"ngForTrackBy",{get:function(){return this._trackByFn},set:function(t){n.i(k.O)()&&null!=t&&"function"!=typeof t&&console&&console.warn&&console.warn("trackBy must be a function, but received "+JSON.stringify(t)+". See https://angular.io/docs/ts/latest/api/common/index/NgFor-directive.html#!#change-propagation for more information."),this._trackByFn=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ngForTemplate",{set:function(t){t&&(this._template=t)},enumerable:!0,configurable:!0}),t.prototype.ngOnChanges=function(t){if("ngForOf"in t){var e=t.ngForOf.currentValue;if(!this._differ&&e)try{this._differ=this._differs.find(e).create(this.ngForTrackBy)}catch(t){throw new Error("Cannot find a differ supporting object '"+e+"' of type '"+a(e)+"'. NgFor only supports binding to Iterables such as Arrays.")}}},t.prototype.ngDoCheck=function(){if(this._differ){var t=this._differ.diff(this.ngForOf);t&&this._applyChanges(t)}},t.prototype._applyChanges=function(t){var e=this,n=[];t.forEachOperation(function(t,r,o){if(null==t.previousIndex){var i=e._viewContainer.createEmbeddedView(e._template,new B(null,e.ngForOf,-1,-1),o),s=new q(t,i);n.push(s)}else if(null==o)e._viewContainer.remove(r);else{var i=e._viewContainer.get(r);e._viewContainer.move(i,o);var s=new q(t,i);n.push(s)}});for(var r=0;r-1)return e.push(t[n]),e;e.push(t[n])}return e}function C(t){if(t.length>1){return" ("+w(t.slice().reverse()).map(function(t){return s(t.token)}).join(" -> ")+")"}return""}function O(t,e,n,r){var o=[e],i=n(o),s=r?_(i,r):Error(i);return s.addKey=E,s.keys=o,s.injectors=[t],s.constructResolvingMessage=n,s[Po]=r,s}function E(t,e){this.injectors.push(t),this.keys.push(e),this.message=this.constructResolvingMessage(this.keys)}function x(t,e){return O(t,e,function(t){return"No provider for "+s(t[0].token)+"!"+C(t)})}function S(t,e){return O(t,e,function(t){return"Cannot instantiate cyclic dependency!"+C(t)})}function P(t,e,n,r){return O(t,r,function(t){var n=s(t[0].token);return e.message+": Error during instantiation of "+n+"!"+C(t)+"."},e)}function A(t){return Error("Invalid provider - only instances of Provider and Type are allowed, got: "+t)}function T(t,e){for(var n=[],r=0,o=e.length;r-1&&t.splice(n,1)}function dt(t){return t.reduce(function(t,e){var n=Array.isArray(e)?dt(e):e;return t.concat(n)},[])}function yt(t,e,n){if(!t)throw new Error("Cannot find '"+n+"' in '"+e+"'");return t}function vt(t,e,n){t.childNodes.forEach(function(t){t instanceof Wi&&(e(t)&&n.push(t),vt(t,e,n))})}function mt(t,e,n){t instanceof Wi&&t.childNodes.forEach(function(t){e(t)&&n.push(t),t instanceof Wi&&mt(t,e,n)})}function gt(t){return Qi.get(t)||null}function bt(t){Qi.set(t.nativeNode,t)}function _t(t){Qi.delete(t.nativeNode)}/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -function wt(t,e){var n=Ct(t),r=Ct(e);if(n&&r)return Ot(t,e,wt);var o=t&&("object"==typeof t||"function"==typeof t),s=e&&("object"==typeof e||"function"==typeof e);return!(n||!o||r||!s)||i(t,e)}function Ct(t){return!!xt(t)&&(Array.isArray(t)||!(t instanceof Map)&&r()in t)}function Ot(t,e,n){for(var o=t[r()](),i=e[r()]();;){var s=o.next(),a=i.next();if(s.done&&a.done)return!0;if(s.done||a.done)return!1;if(!n(s.value,a.value))return!1}}function Et(t,e){if(Array.isArray(t))for(var n=0;n0&&Ee(t,e,0,n)&&(h=!0),f>1&&Ee(t,e,1,r)&&(h=!0),f>2&&Ee(t,e,2,o)&&(h=!0),f>3&&Ee(t,e,3,i)&&(h=!0),f>4&&Ee(t,e,4,s)&&(h=!0),f>5&&Ee(t,e,5,a)&&(h=!0),f>6&&Ee(t,e,6,u)&&(h=!0),f>7&&Ee(t,e,7,c)&&(h=!0),f>8&&Ee(t,e,8,l)&&(h=!0),f>9&&Ee(t,e,9,p)&&(h=!0),h}function Oe(t,e,n){for(var r=!1,o=0;o0?o[n-1]:null,r)}function Fe(t,e){var n=$t(e);if(n&&n!==t&&!(16&e.state)){e.state|=16;var r=n.template._projectedViews;r||(r=n.template._projectedViews=[]),r.push(e),He(e.parent.def,e.parentNodeDef)}}function He(t,e){if(!(4&e.flags)){t.nodeFlags|=4,e.flags|=4;for(var n=e.parent;n;)n.childFlags|=4,n=n.parent}}function Le(t,e){var n=t.viewContainer._embeddedViews;if((null==e||e>=n.length)&&(e=n.length-1),e<0)return null;var r=n[e];return r.viewContainerParent=null,Ze(n,e),_s.dirtyParentQueries(r),qe(r),r}function Ue(t){if(16&t.state){var e=$t(t);if(e){var n=e.template._projectedViews;n&&(Ze(n,n.indexOf(t)),_s.dirtyParentQueries(t))}}}function Be(t,e,n){var r=t.viewContainer._embeddedViews,o=r[e];return Ze(r,e),null==n&&(n=r.length),ze(r,n,o),_s.dirtyParentQueries(o),qe(o),Ge(t,n>0?r[n-1]:null,o),o}function Ge(t,e,n){var r=e?te(e,e.def.lastRenderRootNode):t.renderElement;le(n,2,n.renderer.parentNode(r),n.renderer.nextSibling(r),void 0)}function qe(t){le(t,3,null,null,void 0)}function ze(t,e,n){e>=t.length?t.push(n):t.splice(e,0,n)}function Ze(t,e){e>=t.length-1?t.pop():t.splice(e,1)}function Ye(t,e,n,r,o,i){return new Ns(t,e,n,r,o,i)}function We(t,e,n){return new Ms(t,e,n)}function Qe(t){return new Rs(t)}function Ke(t,e){return new Ds(t,e)}function Je(t,e){return new Is(t,e)}function $e(t,e){var n=t.def.nodes[e];if(1&n.flags){var r=jt(t,n.index);return n.element.template?r.template:r.renderElement}if(2&n.flags)return Nt(t,n.index).renderText;if(20240&n.flags)return Mt(t,n.index).instance;throw new Error("Illegal state: read nodeValue for node index "+e)}function Xe(t){return new Fs(t.renderer)}function tn(t,e,n,r){return new Hs(t,e,n,r)}function en(t,e,n,r,o,i,s){var a=[];if(i)for(var u in i){var c=i[u],l=c[0],p=c[1];a[l]={flags:8,name:u,nonMinifiedName:p,ns:null,securityContext:null,suffix:null}}var f=[];if(s)for(var h in s)f.push({type:1,propName:h,target:null,eventName:s[h]});return t|=16384,rn(t,e,n,r,r,o,a,f)}function nn(t,e,n,r,o){return rn(t,e,0,n,r,o)}function rn(t,e,n,r,o,i,s,a){var u=ie(e),c=u.matchedQueries,l=u.references,p=u.matchedQueryIds;a||(a=[]),s||(s=[]);var f=se(i);return{index:-1,parent:null,renderParent:null,bindingIndex:-1,outputIndex:-1,flags:t,childFlags:0,directChildFlags:0,childMatchedQueries:0,matchedQueries:c,matchedQueryIds:p,references:l,ngContentIndex:-1,childCount:n,bindings:s,bindingFlags:ve(s),outputs:a,element:null,provider:{token:r,value:o,deps:f},text:null,query:null,ngContent:null}}function on(t,e){return 4096&e.flags?Ys:pn(t,e)}function sn(t,e){for(var n=t;n.parent&&!ne(n);)n=n.parent;return fn(n.parent,Xt(n),!0,e.provider.value,e.provider.deps)}function an(t,e){var n=(32768&e.flags)>0,r=fn(t,e.parent,n,e.provider.value,e.provider.deps);if(e.outputs.length)for(var o=0;o0&&Zt(t,e,0,n)&&(d=!0,y=vn(t,f,e,0,n,y)),v>1&&Zt(t,e,1,r)&&(d=!0,y=vn(t,f,e,1,r,y)),v>2&&Zt(t,e,2,o)&&(d=!0,y=vn(t,f,e,2,o,y)),v>3&&Zt(t,e,3,i)&&(d=!0,y=vn(t,f,e,3,i,y)),v>4&&Zt(t,e,4,s)&&(d=!0,y=vn(t,f,e,4,s,y)),v>5&&Zt(t,e,5,a)&&(d=!0,y=vn(t,f,e,5,a,y)),v>6&&Zt(t,e,6,u)&&(d=!0,y=vn(t,f,e,6,u,y)),v>7&&Zt(t,e,7,c)&&(d=!0,y=vn(t,f,e,7,c,y)),v>8&&Zt(t,e,8,l)&&(d=!0,y=vn(t,f,e,8,l,y)),v>9&&Zt(t,e,9,p)&&(d=!0,y=vn(t,f,e,9,p,y)),y&&h.ngOnChanges(y),2&t.state&&65536&e.flags&&h.ngOnInit(),262144&e.flags&&h.ngDoCheck(),d}function ln(t,e,n){for(var r=Mt(t,e.index),o=r.instance,i=!1,s=void 0,a=0;a0,o=e.provider;switch(201347067&e.flags){case 512:n=fn(t,e.parent,r,o.value,o.deps);break;case 1024:n=hn(t,e.parent,r,o.value,o.deps);break;case 2048:n=dn(t,e.parent,r,o.deps[0]);break;case 256:n=o.value}return n}function fn(t,e,n,r,o){var i,s=o.length;switch(s){case 0:i=new r;break;case 1:i=new r(dn(t,e,n,o[0]));break;case 2:i=new r(dn(t,e,n,o[0]),dn(t,e,n,o[1]));break;case 3:i=new r(dn(t,e,n,o[0]),dn(t,e,n,o[1]),dn(t,e,n,o[2]));break;default:for(var a=new Array(s),u=0;u0&&Yt(t,e,0,n)&&(h=!0),d>1&&Yt(t,e,1,r)&&(h=!0),d>2&&Yt(t,e,2,o)&&(h=!0),d>3&&Yt(t,e,3,i)&&(h=!0),d>4&&Yt(t,e,4,s)&&(h=!0),d>5&&Yt(t,e,5,a)&&(h=!0),d>6&&Yt(t,e,6,u)&&(h=!0),d>7&&Yt(t,e,7,c)&&(h=!0),d>8&&Yt(t,e,8,l)&&(h=!0),d>9&&Yt(t,e,9,p)&&(h=!0),h){var y=Rt(t,e.index),v=void 0;switch(201347067&e.flags){case 32:v=new Array(f.length),d>0&&(v[0]=n),d>1&&(v[1]=r),d>2&&(v[2]=o),d>3&&(v[3]=i),d>4&&(v[4]=s),d>5&&(v[5]=a),d>6&&(v[6]=u),d>7&&(v[7]=c),d>8&&(v[8]=l),d>9&&(v[9]=p);break;case 64:v={},d>0&&(v[f[0].name]=n),d>1&&(v[f[1].name]=r),d>2&&(v[f[2].name]=o),d>3&&(v[f[3].name]=i),d>4&&(v[f[4].name]=s),d>5&&(v[f[5].name]=a),d>6&&(v[f[6].name]=u),d>7&&(v[f[7].name]=c),d>8&&(v[f[8].name]=l),d>9&&(v[f[9].name]=p);break;case 128:var m=n;switch(d){case 1:v=m.transform(n);break;case 2:v=m.transform(r);break;case 3:v=m.transform(r,o);break;case 4:v=m.transform(r,o,i);break;case 5:v=m.transform(r,o,i,s);break;case 6:v=m.transform(r,o,i,s,a);break;case 7:v=m.transform(r,o,i,s,a,u);break;case 8:v=m.transform(r,o,i,s,a,u,c);break;case 9:v=m.transform(r,o,i,s,a,u,c,l);break;case 10:v=m.transform(r,o,i,s,a,u,c,l,p)}}y.value=v}return h}function Vn(t,e,n){for(var r=e.bindings,o=!1,i=0;i0&&Yt(t,e,0,n)&&(f=!0),d>1&&Yt(t,e,1,r)&&(f=!0),d>2&&Yt(t,e,2,o)&&(f=!0),d>3&&Yt(t,e,3,i)&&(f=!0),d>4&&Yt(t,e,4,s)&&(f=!0),d>5&&Yt(t,e,5,a)&&(f=!0),d>6&&Yt(t,e,6,u)&&(f=!0),d>7&&Yt(t,e,7,c)&&(f=!0),d>8&&Yt(t,e,8,l)&&(f=!0),d>9&&Yt(t,e,9,p)&&(f=!0),f){var y=e.text.prefix;d>0&&(y+=Dn(n,h[0])),d>1&&(y+=Dn(r,h[1])),d>2&&(y+=Dn(o,h[2])),d>3&&(y+=Dn(i,h[3])),d>4&&(y+=Dn(s,h[4])),d>5&&(y+=Dn(a,h[5])),d>6&&(y+=Dn(u,h[6])),d>7&&(y+=Dn(c,h[7])),d>8&&(y+=Dn(l,h[8])),d>9&&(y+=Dn(p,h[9]));var v=Nt(t,e.index).renderText;t.renderer.setValue(v,y)}return f}function Rn(t,e,n){for(var r=e.bindings,o=!1,i=0;ic.index+c.childCount;){var d=c.parent;d&&(d.childFlags|=c.childFlags,d.childMatchedQueries|=c.childMatchedQueries),c=d}var y=e[h];y.index=h,y.parent=c,y.bindingIndex=o,y.outputIndex=i;var v=void 0;if(v=c&&1&c.flags&&!c.element.name?c.renderParent:c,y.renderParent=v,y.element){var m=y.element;m.publicProviders=c?c.element.publicProviders:Object.create(null),m.allProviders=m.publicProviders,l=!1,p=!1}if(Fn(c,y,e.length),s|=y.flags,u|=y.matchedQueryIds,y.element&&y.element.template&&(u|=y.element.template.nodeMatchedQueries),c?(c.childFlags|=y.flags,c.directChildFlags|=y.flags,c.childMatchedQueries|=y.matchedQueryIds,y.element&&y.element.template&&(c.childMatchedQueries|=y.element.template.nodeMatchedQueries)):a|=y.flags,o+=y.bindings.length,i+=y.outputs.length,!v&&3&y.flags&&(f=y),20224&y.flags){l||(l=!0,c.element.publicProviders=Object.create(c.element.publicProviders),c.element.allProviders=c.element.publicProviders);var g=0!=(8192&y.flags),b=0!=(32768&y.flags);!g||b?c.element.publicProviders[Gt(y.provider.token)]=y:(p||(p=!0,c.element.allProviders=Object.create(c.element.publicProviders)),c.element.allProviders[Gt(y.provider.token)]=y),b&&(c.element.componentProvider=y)}y.childCount&&(c=y)}for(;c;){var d=c.parent;d&&(d.childFlags|=c.childFlags,d.childMatchedQueries|=c.childMatchedQueries),c=d}var _=function(t,n,r,o){return e[n].element.handleEvent(t,r,o)};return{factory:null,nodeFlags:s,rootNodeFlags:a,nodeMatchedQueries:u,flags:t,nodes:e,updateDirectives:n||ws,updateRenderer:r||ws,handleEvent:_||ws,bindingCount:o,outputCount:i,lastRenderRootNode:f}}function Fn(t,e,n){var r=e.element&&e.element.template;if(r){if(!r.lastRenderRootNode)throw new Error("Illegal State: Embedded templates without nodes are not allowed!");if(r.lastRenderRootNode&&16777216&r.lastRenderRootNode.flags)throw new Error("Illegal State: Last root node of a template can't have embedded views, at index "+e.index+"!")}if(20224&e.flags){if(0==(1&(t?t.flags:0)))throw new Error("Illegal State: Provider/Directive nodes need to be children of elements or anchors, at index "+e.index+"!")}if(e.query){if(67108864&e.flags&&(!t||0==(16384&t.flags)))throw new Error("Illegal State: Content Query nodes need to be children of directives, at index "+e.index+"!");if(134217728&e.flags&&t)throw new Error("Illegal State: View Query nodes have to be top level nodes, at index "+e.index+"!")}if(e.childCount){var o=t?t.index+t.childCount:n-1;if(e.index<=o&&e.index+e.childCount>o)throw new Error("Illegal State: childCount of node leads outside of parent, at index "+e.index+"!")}}function Hn(t,e,n,r){var o=Bn(t.root,t.renderer,t,e,n);return Gn(o,t.component,r),qn(o),o}function Ln(t,e,n){var r=Bn(t,t.renderer,null,null,e);return Gn(r,n,n),qn(r),r}function Un(t,e,n,r){var o,i=e.element.componentRendererType;return o=i?t.root.rendererFactory.createRenderer(r,i):t.root.renderer,Bn(t.root,o,t,e.element.componentProvider,n)}function Bn(t,e,n,r,o){var i=new Array(o.nodes.length),s=o.outputCount?new Array(o.outputCount):null;return{def:o,parent:n,viewContainerParent:null,parentNodeDef:r,context:null,component:null,nodes:i,state:13,root:t,renderer:e,oldValues:new Array(o.bindingCount),disposables:s}}function Gn(t,e,n){t.component=e,t.context=n}function qn(t){var e;if(ne(t)){var n=t.parentNodeDef;e=jt(t.parent,n.parent.index).renderElement}for(var r=t.def,o=t.nodes,i=0;i0&&Wt(t,e,0,n),f>1&&Wt(t,e,1,r),f>2&&Wt(t,e,2,o),f>3&&Wt(t,e,3,i),f>4&&Wt(t,e,4,s),f>5&&Wt(t,e,5,a),f>6&&Wt(t,e,6,u),f>7&&Wt(t,e,7,c),f>8&&Wt(t,e,8,l),f>9&&Wt(t,e,9,p)}function Xn(t,e,n){for(var r=0;r=this._providers.length)throw k(t);return this._providers[t]},t.prototype._new=function(t){if(this._constructionCounter++>this._getMaxNumberOfObjects())throw S(this,t.key);return this._instantiateProvider(t)},t.prototype._getMaxNumberOfObjects=function(){return this.objs.length},t.prototype._instantiateProvider=function(t){if(t.multiProvider){for(var e=new Array(t.resolvedFactories.length),n=0;n0)t._bootstrapComponents.forEach(function(t){return e.bootstrap(t)});else{if(!t.instance.ngDoBootstrap)throw new Error("The module "+s(t.instance.constructor)+' was bootstrapped, but it does not declare "@NgModule.bootstrap" components nor a "ngDoBootstrap" method. Please define one of these.');t.instance.ngDoBootstrap(e)}this._modules.push(t)},e}(Pi);Ai.decorators=[{type:go}],Ai.ctorParameters=function(){return[{type:xo}]};var Ti=function(){function t(){}return t.prototype.bootstrap=function(t,e){},t.prototype.tick=function(){},t.prototype.componentTypes=function(){},t.prototype.components=function(){},t.prototype.attachView=function(t){},t.prototype.detachView=function(t){},t.prototype.viewCount=function(){},t.prototype.isStable=function(){},t}(),ki=function(t){function e(e,r,i,s,a,u){var c=t.call(this)||this;c._zone=e,c._console=r,c._injector=i,c._exceptionHandler=s,c._componentFactoryResolver=a,c._initStatus=u,c._bootstrapListeners=[],c._rootComponents=[],c._rootComponentTypes=[],c._views=[],c._runningTick=!1,c._enforceNoNewChanges=!1,c._stable=!0,c._enforceNoNewChanges=at(),c._zone.onMicrotaskEmpty.subscribe({next:function(){c._zone.run(function(){c.tick()})}});var l=new qr.Observable(function(t){c._stable=c._zone.isStable&&!c._zone.hasPendingMacrotasks&&!c._zone.hasPendingMicrotasks,c._zone.runOutsideAngular(function(){t.next(c._stable),t.complete()})}),p=new qr.Observable(function(t){var e=c._zone.onStable.subscribe(function(){mi.assertNotInAngularZone(),o(function(){c._stable||c._zone.hasPendingMacrotasks||c._zone.hasPendingMicrotasks||(c._stable=!0,t.next(!0))})}),n=c._zone.onUnstable.subscribe(function(){mi.assertInAngularZone(),c._stable&&(c._stable=!1,c._zone.runOutsideAngular(function(){t.next(!1)}))});return function(){e.unsubscribe(),n.unsubscribe()}});return c._isStable=n.i(zr.merge)(l,Zr.share.call(p)),c}return Gr.a(e,t),e.prototype.attachView=function(t){var e=t;this._views.push(e),e.attachToAppRef(this)},e.prototype.detachView=function(t){var e=t;ht(this._views,e),e.detachFromAppRef()},e.prototype.bootstrap=function(t,e){var n=this;if(!this._initStatus.done)throw new Error("Cannot bootstrap as there are still asynchronous initializers running. Bootstrap components in the `ngDoBootstrap` method of the root module.");var r;r=t instanceof ri?t:this._componentFactoryResolver.resolveComponentFactory(t),this._rootComponentTypes.push(r.componentType);var o=r instanceof li?null:this._injector.get(pi),i=e||r.selector,s=r.create(xo.NULL,[],i,o);s.onDestroy(function(){n._unloadComponent(s)});var a=s.injector.get(gi,null);return a&&s.injector.get(bi).registerApplication(s.location.nativeElement,a),this._loadComponent(s),at()&&this._console.log("Angular is running in the development mode. Call enableProdMode() to enable the production mode."),s},e.prototype._loadComponent=function(t){this.attachView(t.hostView),this.tick(),this._rootComponents.push(t),this._injector.get($o,[]).concat(this._bootstrapListeners).forEach(function(e){return e(t)})},e.prototype._unloadComponent=function(t){this.detachView(t.hostView),ht(this._rootComponents,t)},e.prototype.tick=function(){if(this._runningTick)throw new Error("ApplicationRef.tick is called recursively");var t=e._tickScope();try{this._runningTick=!0,this._views.forEach(function(t){return t.detectChanges()}),this._enforceNoNewChanges&&this._views.forEach(function(t){return t.checkNoChanges()})}catch(t){this._exceptionHandler.handleError(t)}finally{this._runningTick=!1,yi(t)}},e.prototype.ngOnDestroy=function(){this._views.slice().forEach(function(t){return t.destroy()})},Object.defineProperty(e.prototype,"viewCount",{get:function(){return this._views.length},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"componentTypes",{get:function(){return this._rootComponentTypes},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"components",{get:function(){return this._rootComponents},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isStable",{get:function(){return this._isStable},enumerable:!0,configurable:!0}),e}(Ti);ki._tickScope=di("ApplicationRef#tick()"),ki.decorators=[{type:go}],ki.ctorParameters=function(){return[{type:mi},{type:Xo},{type:xo},{type:To},{type:si},{type:Yo}]};/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -var Vi=(function(){function t(t,e,n,r,o,i){this.id=t,this.templateUrl=e,this.slotCount=n,this.encapsulation=r,this.styles=o,this.animations=i}}(),function(){function t(){}t.prototype.injector=function(){},t.prototype.component=function(){},t.prototype.providerTokens=function(){},t.prototype.references=function(){},t.prototype.context=function(){},t.prototype.source=function(){}}(),function(){function t(){}return t.prototype.selectRootElement=function(t,e){},t.prototype.createElement=function(t,e,n){},t.prototype.createViewRoot=function(t){},t.prototype.createTemplateAnchor=function(t,e){},t.prototype.createText=function(t,e,n){},t.prototype.projectNodes=function(t,e){},t.prototype.attachViewAfter=function(t,e){},t.prototype.detachView=function(t){},t.prototype.destroyView=function(t,e){},t.prototype.listen=function(t,e,n){},t.prototype.listenGlobal=function(t,e,n){},t.prototype.setElementProperty=function(t,e,n){},t.prototype.setElementAttribute=function(t,e,n){},t.prototype.setBindingDebugInfo=function(t,e,n){},t.prototype.setElementClass=function(t,e,n){},t.prototype.setElementStyle=function(t,e,n){},t.prototype.invokeElementMethod=function(t,e,n){},t.prototype.setText=function(t,e){},t.prototype.animate=function(t,e,n,r,o,i,s){},t}()),Ni=(new Qr("Renderer2Interceptor"),function(){function t(){}t.prototype.renderComponent=function(t){}}(),function(){function t(){}return t.prototype.createRenderer=function(t,e){},t.prototype.begin=function(){},t.prototype.end=function(){},t.prototype.whenRenderingDone=function(){},t}()),ji={};ji.Important=1,ji.DashCase=2,ji[ji.Important]="Important",ji[ji.DashCase]="DashCase";var Mi=function(){function t(){}return t.prototype.data=function(){},t.prototype.destroy=function(){},t.prototype.createElement=function(t,e){},t.prototype.createComment=function(t){},t.prototype.createText=function(t){},t.prototype.appendChild=function(t,e){},t.prototype.insertBefore=function(t,e,n){},t.prototype.removeChild=function(t,e){},t.prototype.selectRootElement=function(t){},t.prototype.parentNode=function(t){},t.prototype.nextSibling=function(t){},t.prototype.setAttribute=function(t,e,n,r){},t.prototype.removeAttribute=function(t,e,n){},t.prototype.addClass=function(t,e){},t.prototype.removeClass=function(t,e){},t.prototype.setStyle=function(t,e,n,r){},t.prototype.removeStyle=function(t,e,n){},t.prototype.setProperty=function(t,e,n){},t.prototype.setValue=function(t,e){},t.prototype.listen=function(t,e,n){},t}(),Ri=function(){function t(t){this.nativeElement=t}return t}(),Di=(function(){function t(){}t.prototype.load=function(t){}}(),new Map,function(){function t(){this._dirty=!0,this._results=[],this._emitter=new vi}return Object.defineProperty(t.prototype,"changes",{get:function(){return this._emitter},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"length",{get:function(){return this._results.length},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"first",{get:function(){return this._results[0]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"last",{get:function(){return this._results[this.length-1]},enumerable:!0,configurable:!0}),t.prototype.map=function(t){return this._results.map(t)},t.prototype.filter=function(t){return this._results.filter(t)},t.prototype.find=function(t){return this._results.find(t)},t.prototype.reduce=function(t,e){return this._results.reduce(t,e)},t.prototype.forEach=function(t){this._results.forEach(t)},t.prototype.some=function(t){return this._results.some(t)},t.prototype.toArray=function(){return this._results.slice()},t.prototype[r()]=function(){return this._results[r()]()},t.prototype.toString=function(){return this._results.toString()},t.prototype.reset=function(t){this._results=dt(t),this._dirty=!1},t.prototype.notifyOnChanges=function(){this._emitter.emit(this)},t.prototype.setDirty=function(){this._dirty=!0},Object.defineProperty(t.prototype,"dirty",{get:function(){return this._dirty},enumerable:!0,configurable:!0}),t}()),Ii="#",Fi="NgFactory",Hi=function(){function t(){}return t}(),Li={factoryPathPrefix:"",factoryPathSuffix:".ngfactory"},Ui=function(){function t(t,e){this._compiler=t,this._config=e||Li}return t.prototype.load=function(t){return this._compiler instanceof ti?this.loadFactory(t):this.loadAndCompile(t)},t.prototype.loadAndCompile=function(t){var e=this,r=t.split(Ii),o=r[0],i=r[1];return void 0===i&&(i="default"),n("/fcW")(o).then(function(t){return t[i]}).then(function(t){return yt(t,o,i)}).then(function(t){return e._compiler.compileModuleAsync(t)})},t.prototype.loadFactory=function(t){var e=t.split(Ii),r=e[0],o=e[1],i=Fi;return void 0===o&&(o="default",i=""),n("/fcW")(this._config.factoryPathPrefix+r+this._config.factoryPathSuffix).then(function(t){return t[o+i]}).then(function(t){return yt(t,r,o)})},t}();Ui.decorators=[{type:go}],Ui.ctorParameters=function(){return[{type:ti},{type:Hi,decorators:[{type:mo}]}]};/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -var Bi=function(){function t(){}return t.prototype.elementRef=function(){},t.prototype.createEmbeddedView=function(t){},t}(),Gi=function(){function t(){}return t.prototype.element=function(){},t.prototype.injector=function(){},t.prototype.parentInjector=function(){},t.prototype.clear=function(){},t.prototype.get=function(t){},t.prototype.length=function(){},t.prototype.createEmbeddedView=function(t,e,n){},t.prototype.createComponent=function(t,e,n,r,o){},t.prototype.insert=function(t,e){},t.prototype.move=function(t,e){},t.prototype.indexOf=function(t){},t.prototype.remove=function(t){},t.prototype.detach=function(t){},t}(),qi=function(){function t(){}return t.prototype.markForCheck=function(){},t.prototype.detach=function(){},t.prototype.detectChanges=function(){},t.prototype.checkNoChanges=function(){},t.prototype.reattach=function(){},t}(),zi=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Gr.a(e,t),e.prototype.destroy=function(){},e.prototype.destroyed=function(){},e.prototype.onDestroy=function(t){},e}(qi),Zi=(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Gr.a(e,t),e.prototype.context=function(){},e.prototype.rootNodes=function(){}}(zi),function(){function t(t,e){this.name=t,this.callback=e}return t}()),Yi=function(){function t(t,e,n){this._debugContext=n,this.nativeNode=t,e&&e instanceof Wi?e.addChild(this):this.parent=null,this.listeners=[]}return Object.defineProperty(t.prototype,"injector",{get:function(){return this._debugContext.injector},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"componentInstance",{get:function(){return this._debugContext.component},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"context",{get:function(){return this._debugContext.context},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"references",{get:function(){return this._debugContext.references},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"providerTokens",{get:function(){return this._debugContext.providerTokens},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"source",{get:function(){return"Deprecated since v4"},enumerable:!0,configurable:!0}),t}(),Wi=function(t){function e(e,n,r){var o=t.call(this,e,n,r)||this;return o.properties={},o.attributes={},o.classes={},o.styles={},o.childNodes=[],o.nativeElement=e,o}return Gr.a(e,t),e.prototype.addChild=function(t){t&&(this.childNodes.push(t),t.parent=this)},e.prototype.removeChild=function(t){var e=this.childNodes.indexOf(t);-1!==e&&(t.parent=null,this.childNodes.splice(e,1))},e.prototype.insertChildrenAfter=function(t,e){var n=this,r=this.childNodes.indexOf(t);-1!==r&&((o=this.childNodes).splice.apply(o,[r+1,0].concat(e)),e.forEach(function(t){t.parent&&t.parent.removeChild(t),t.parent=n}));var o},e.prototype.insertBefore=function(t,e){var n=this.childNodes.indexOf(t);-1===n?this.addChild(e):(e.parent&&e.parent.removeChild(e),e.parent=this,this.childNodes.splice(n,0,e))},e.prototype.query=function(t){return this.queryAll(t)[0]||null},e.prototype.queryAll=function(t){var e=[];return vt(this,t,e),e},e.prototype.queryAllNodes=function(t){var e=[];return mt(this,t,e),e},Object.defineProperty(e.prototype,"children",{get:function(){return this.childNodes.filter(function(t){return t instanceof e})},enumerable:!0,configurable:!0}),e.prototype.triggerEventHandler=function(t,e){this.listeners.forEach(function(n){n.name==t&&n.callback(e)})},e}(Yi),Qi=new Map,Ki=function(){function t(t){this.wrapped=t}return t.wrap=function(e){return new t(e)},t}(),Ji=(function(){function t(){this.hasWrappedValue=!1}t.prototype.unwrap=function(t){return t instanceof Ki?(this.hasWrappedValue=!0,t.wrapped):t},t.prototype.reset=function(){this.hasWrappedValue=!1}}(),function(){function t(t,e,n){this.previousValue=t,this.currentValue=e,this.firstChange=n}return t.prototype.isFirstChange=function(){return this.firstChange},t}()),$i=function(){function t(){}return t.prototype.supports=function(t){return Ct(t)},t.prototype.create=function(t,e){return new ts(e||t)},t}(),Xi=function(t,e){return e},ts=function(){function t(t){this._length=0,this._collection=null,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=t||Xi}return Object.defineProperty(t.prototype,"collection",{get:function(){return this._collection},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"length",{get:function(){return this._length},enumerable:!0,configurable:!0}),t.prototype.forEachItem=function(t){var e;for(e=this._itHead;null!==e;e=e._next)t(e)},t.prototype.forEachOperation=function(t){for(var e=this._itHead,n=this._removalsHead,r=0,o=null;e||n;){var i=!n||e&&e.currentIndex"+s(this.currentIndex)+"]"},t}(),ns=function(){function t(){this._head=null,this._tail=null}return t.prototype.add=function(t){null===this._head?(this._head=this._tail=t,t._nextDup=null,t._prevDup=null):(this._tail._nextDup=t,t._prevDup=this._tail,t._nextDup=null,this._tail=t)},t.prototype.get=function(t,e){var n;for(n=this._head;null!==n;n=n._nextDup)if((null===e||e<=n.currentIndex)&&i(n.trackById,t))return n;return null},t.prototype.remove=function(t){var e=t._prevDup,n=t._nextDup;return null===e?this._head=n:e._nextDup=n,null===n?this._tail=e:n._prevDup=e,null===this._head},t}(),rs=function(){function t(){this.map=new Map}return t.prototype.put=function(t){var e=t.trackById,n=this.map.get(e);n||(n=new ns,this.map.set(e,n)),n.add(t)},t.prototype.get=function(t,e){var n=t,r=this.map.get(n);return r?r.get(t,e):null},t.prototype.remove=function(t){var e=t.trackById;return this.map.get(e).remove(t)&&this.map.delete(e),t},Object.defineProperty(t.prototype,"isEmpty",{get:function(){return 0===this.map.size},enumerable:!0,configurable:!0}),t.prototype.clear=function(){this.map.clear()},t.prototype.toString=function(){return"_DuplicateMap("+s(this.map)+")"},t}(),os=function(){function t(){}return t.prototype.supports=function(t){return t instanceof Map||xt(t)},t.prototype.create=function(t){return new is},t}(),is=function(){function t(){this._records=new Map,this._mapHead=null,this._appendAfter=null,this._previousMapHead=null,this._changesHead=null,this._changesTail=null,this._additionsHead=null,this._additionsTail=null,this._removalsHead=null,this._removalsTail=null}return Object.defineProperty(t.prototype,"isDirty",{get:function(){return null!==this._additionsHead||null!==this._changesHead||null!==this._removalsHead},enumerable:!0,configurable:!0}),t.prototype.forEachItem=function(t){var e;for(e=this._mapHead;null!==e;e=e._next)t(e)},t.prototype.forEachPreviousItem=function(t){var e;for(e=this._previousMapHead;null!==e;e=e._nextPrevious)t(e)},t.prototype.forEachChangedItem=function(t){var e;for(e=this._changesHead;null!==e;e=e._nextChanged)t(e)},t.prototype.forEachAddedItem=function(t){var e;for(e=this._additionsHead;null!==e;e=e._nextAdded)t(e)},t.prototype.forEachRemovedItem=function(t){var e;for(e=this._removalsHead;null!==e;e=e._nextRemoved)t(e)},t.prototype.diff=function(t){if(t){if(!(t instanceof Map||xt(t)))throw new Error("Error trying to diff '"+s(t)+"'. Only maps and objects are allowed")}else t=new Map;return this.check(t)?this:null},t.prototype.onDestroy=function(){},t.prototype.check=function(t){var e=this;this._reset();var n=this._mapHead;if(this._appendAfter=null,this._forEach(t,function(t,r){if(n&&n.key===r)e._maybeAddToChanges(n,t),e._appendAfter=n,n=n._next;else{var o=e._getOrCreateRecordForKey(r,t);n=e._insertBeforeOrAppend(n,o)}}),n){n._prev&&(n._prev._next=null),this._removalsHead=n;for(var r=n;null!==r;r=r._nextRemoved)r===this._mapHead&&(this._mapHead=null),this._records.delete(r.key),r._nextRemoved=r._next,r.previousValue=r.currentValue,r.currentValue=null,r._prev=null,r._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty},t.prototype._insertBeforeOrAppend=function(t,e){if(t){var n=t._prev;return e._next=t,e._prev=n,t._prev=e,n&&(n._next=e),t===this._mapHead&&(this._mapHead=e),this._appendAfter=t,t}return this._appendAfter?(this._appendAfter._next=e,e._prev=this._appendAfter):this._mapHead=e,this._appendAfter=e,null},t.prototype._getOrCreateRecordForKey=function(t,e){if(this._records.has(t)){var n=this._records.get(t);this._maybeAddToChanges(n,e);var r=n._prev,o=n._next;return r&&(r._next=o),o&&(o._prev=r),n._next=null,n._prev=null,n}var i=new ss(t);return this._records.set(t,i),i.currentValue=e,this._addToAdditions(i),i},t.prototype._reset=function(){if(this.isDirty){var t=void 0;for(this._previousMapHead=this._mapHead,t=this._previousMapHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._changesHead;null!==t;t=t._nextChanged)t.previousValue=t.currentValue;for(t=this._additionsHead;null!=t;t=t._nextAdded)t.previousValue=t.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}},t.prototype._maybeAddToChanges=function(t,e){i(e,t.currentValue)||(t.previousValue=t.currentValue,t.currentValue=e,this._addToChanges(t))},t.prototype._addToAdditions=function(t){null===this._additionsHead?this._additionsHead=this._additionsTail=t:(this._additionsTail._nextAdded=t,this._additionsTail=t)},t.prototype._addToChanges=function(t){null===this._changesHead?this._changesHead=this._changesTail=t:(this._changesTail._nextChanged=t,this._changesTail=t)},t.prototype._forEach=function(t,e){t instanceof Map?t.forEach(e):Object.keys(t).forEach(function(n){return e(t[n],n)})},t}(),ss=function(){function t(t){this.key=t,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}return t}(),as=function(){function t(t){this.factories=t}return t.create=function(e,n){if(null!=n){var r=n.factories.slice();return e=e.concat(r),new t(e)}return new t(e)},t.extend=function(e){return{provide:t,useFactory:function(n){if(!n)throw new Error("Cannot extend IterableDiffers without a parent injector");return t.create(e,n)},deps:[[t,new _o,new mo]]}},t.prototype.find=function(t){var e=this.factories.find(function(e){return e.supports(t)});if(null!=e)return e;throw new Error("Cannot find a differ supporting object '"+t+"' of type '"+Pt(t)+"'")},t}(),us=function(){function t(t){this.factories=t}return t.create=function(e,n){if(n){var r=n.factories.slice();e=e.concat(r)}return new t(e)},t.extend=function(e){return{provide:t,useFactory:function(n){if(!n)throw new Error("Cannot extend KeyValueDiffers without a parent injector");return t.create(e,n)},deps:[[t,new _o,new mo]]}},t.prototype.find=function(t){var e=this.factories.find(function(e){return e.supports(t)});if(e)return e;throw new Error("Cannot find a differ supporting object '"+t+"'")},t}(),cs=[new os],ls=[new $i],ps=new as(ls),fs=new us(cs),hs=[{provide:Jo,useValue:"unknown"},Ai,{provide:Pi,useExisting:Ai},{provide:Do,useFactory:At,deps:[]},bi,Xo],ds=ct(null,"core",hs),ys=new Qr("LocaleId"),vs=(new Qr("Translations"),new Qr("TranslationsFormat"),{});vs.Error=0,vs.Warning=1,vs.Ignore=2,vs[vs.Error]="Error",vs[vs.Warning]="Warning",vs[vs.Ignore]="Ignore";var ms=function(){function t(t){}return t}();ms.decorators=[{type:po,args:[{providers:[ki,{provide:Ti,useExisting:ki},Yo,ti,Qo,{provide:as,useFactory:Tt},{provide:us,useFactory:kt},{provide:ys,useFactory:Vt,deps:[[new vo(ys),new mo,new _o]]}]}]}],ms.ctorParameters=function(){return[{type:Ti}]};var gs={};gs.NONE=0,gs.HTML=1,gs.STYLE=2,gs.SCRIPT=3,gs.URL=4,gs.RESOURCE_URL=5,gs[gs.NONE]="NONE",gs[gs.HTML]="HTML",gs[gs.STYLE]="STYLE",gs[gs.SCRIPT]="SCRIPT",gs[gs.URL]="URL",gs[gs.RESOURCE_URL]="RESOURCE_URL";var bs=function(){function t(){}return t.prototype.sanitize=function(t,e){},t}(),_s=(function(){function t(){}t.prototype.view=function(){},t.prototype.nodeIndex=function(){},t.prototype.injector=function(){},t.prototype.component=function(){},t.prototype.providerTokens=function(){},t.prototype.references=function(){},t.prototype.context=function(){},t.prototype.componentRenderElement=function(){},t.prototype.renderNode=function(){},t.prototype.logError=function(t){for(var e=[],n=1;n=0;e--){var n=Le(this._data,e);_s.destroyView(n)}},t.prototype.get=function(t){var e=this._embeddedViews[t];if(e){var n=new Rs(e);return n.attachToViewContainerRef(this),n}return null},Object.defineProperty(t.prototype,"length",{get:function(){return this._embeddedViews.length},enumerable:!0,configurable:!0}),t.prototype.createEmbeddedView=function(t,e,n){var r=t.createEmbeddedView(e||{});return this.insert(r,n),r},t.prototype.createComponent=function(t,e,n,r,o){var i=n||this.parentInjector;o||t instanceof li||(o=i.get(pi));var s=t.create(i,r,void 0,o);return this.insert(s.hostView,e),s},t.prototype.insert=function(t,e){var n=t,r=n._view;return Ie(this._view,this._data,e,r),n.attachToViewContainerRef(this),t},t.prototype.move=function(t,e){var n=this._embeddedViews.indexOf(t._view);return Be(this._data,n,e),t},t.prototype.indexOf=function(t){return this._embeddedViews.indexOf(t._view)},t.prototype.remove=function(t){var e=Le(this._data,t);e&&_s.destroyView(e)},t.prototype.detach=function(t){var e=Le(this._data,t);return e?new Rs(e):null},t}(),Rs=function(){function t(t){this._view=t,this._viewContainerRef=null,this._appRef=null}return Object.defineProperty(t.prototype,"rootNodes",{get:function(){return ce(this._view)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"context",{get:function(){return this._view.context},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"destroyed",{get:function(){return 0!=(128&this._view.state)},enumerable:!0,configurable:!0}),t.prototype.markForCheck=function(){Qt(this._view)},t.prototype.detach=function(){this._view.state&=-5},t.prototype.detectChanges=function(){var t=this._view.root.rendererFactory;t.begin&&t.begin(),_s.checkAndUpdateView(this._view),t.end&&t.end()},t.prototype.checkNoChanges=function(){_s.checkNoChangesView(this._view)},t.prototype.reattach=function(){this._view.state|=4},t.prototype.onDestroy=function(t){this._view.disposables||(this._view.disposables=[]),this._view.disposables.push(t)},t.prototype.destroy=function(){this._appRef?this._appRef.detachView(this):this._viewContainerRef&&this._viewContainerRef.detach(this._viewContainerRef.indexOf(this)),_s.destroyView(this._view)},t.prototype.detachFromAppRef=function(){this._appRef=null,qe(this._view),_s.dirtyParentQueries(this._view)},t.prototype.attachToAppRef=function(t){if(this._viewContainerRef)throw new Error("This view is already attached to a ViewContainer!");this._appRef=t},t.prototype.attachToViewContainerRef=function(t){if(this._appRef)throw new Error("This view is already attached directly to the ApplicationRef!");this._viewContainerRef=t},t}(),Ds=function(t){function e(e,n){var r=t.call(this)||this;return r._parentView=e,r._def=n,r}return Gr.a(e,t),e.prototype.createEmbeddedView=function(t){return new Rs(_s.createEmbeddedView(this._parentView,this._def,this._def.element.template,t))},Object.defineProperty(e.prototype,"elementRef",{get:function(){return new Ri(jt(this._parentView,this._def.index).renderElement)},enumerable:!0,configurable:!0}),e}(Bi),Is=function(){function t(t,e){this.view=t,this.elDef=e}return t.prototype.get=function(t,e){void 0===e&&(e=xo.THROW_IF_NOT_FOUND);var n=!!this.elDef&&0!=(33554432&this.elDef.flags);return _s.resolveDep(this.view,this.elDef,n,{flags:0,token:t,tokenKey:Gt(t)},e)},t}(),Fs=function(){function t(t){this.delegate=t}return t.prototype.selectRootElement=function(t){return this.delegate.selectRootElement(t)},t.prototype.createElement=function(t,e){var n=ye(e),r=n[0],o=n[1],i=this.delegate.createElement(o,r);return t&&this.delegate.appendChild(t,i),i},t.prototype.createViewRoot=function(t){return t},t.prototype.createTemplateAnchor=function(t){var e=this.delegate.createComment("");return t&&this.delegate.appendChild(t,e),e},t.prototype.createText=function(t,e){var n=this.delegate.createText(e);return t&&this.delegate.appendChild(t,n),n},t.prototype.projectNodes=function(t,e){for(var n=0;n0){t.split("&").forEach(function(t){var n=t.indexOf("="),r=-1==n?[t,""]:[t.slice(0,n),t.slice(n+1)],o=r[0],i=r[1],s=e.get(o)||[];s.push(i),e.set(o,s)})}return e}function a(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/gi,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%2B/gi,"+").replace(/%3D/gi,"=").replace(/%3F/gi,"?").replace(/%2F/gi,"/")}function u(){var t="object"==typeof window?window:{};return null===I&&(I=t[D]={}),I}function c(t){var e=new N;return Object.keys(t).forEach(function(n){var r=t[n];r&&Array.isArray(r)?r.forEach(function(t){return e.append(n,t.toString())}):e.append(n,r.toString())}),e}/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -function l(t,e){return t.createConnection(e).response}function p(t,e,n,r){var o=t;return e?o.merge(new Q({method:e.method||n,url:e.url||r,search:e.search,params:e.params,headers:e.headers,body:e.body,withCredentials:e.withCredentials,responseType:e.responseType})):o.merge(new Q({method:n,url:r}))}/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -function f(){return new Y}function h(t,e){return new rt(t,e)}function d(t,e){return new ot(t,e)}var y=n("TToO"),v=n("3j3K"),m=n("rCTf"),g=(n.n(m),n("Qbdm"));n.d(e,"a",function(){return b}),n.d(e,"f",function(){return W}),n.d(e,"h",function(){return K}),n.d(e,"g",function(){return Q}),n.d(e,"c",function(){return P}),n.d(e,"b",function(){return S}),n.d(e,"i",function(){return rt}),n.d(e,"k",function(){return it}),n.d(e,"d",function(){return T}),n.d(e,"e",function(){return f}),n.d(e,"j",function(){return h});/** - * @license Angular v4.2.6 - * (c) 2010-2017 Google, Inc. https://angular.io/ - * License: MIT - */ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -var b=function(){function t(){}return t.prototype.build=function(){return new XMLHttpRequest},t}();b.decorators=[{type:v.D}],b.ctorParameters=function(){return[]};var _={};_.Get=0,_.Post=1,_.Put=2,_.Delete=3,_.Options=4,_.Head=5,_.Patch=6,_[_.Get]="Get",_[_.Post]="Post",_[_.Put]="Put",_[_.Delete]="Delete",_[_.Options]="Options",_[_.Head]="Head",_[_.Patch]="Patch";var w={};w.Unsent=0,w.Open=1,w.HeadersReceived=2,w.Loading=3,w.Done=4,w.Cancelled=5,w[w.Unsent]="Unsent",w[w.Open]="Open",w[w.HeadersReceived]="HeadersReceived",w[w.Loading]="Loading",w[w.Done]="Done",w[w.Cancelled]="Cancelled";var C={};C.Basic=0,C.Cors=1,C.Default=2,C.Error=3,C.Opaque=4,C[C.Basic]="Basic",C[C.Cors]="Cors",C[C.Default]="Default",C[C.Error]="Error",C[C.Opaque]="Opaque";var O={};O.NONE=0,O.JSON=1,O.FORM=2,O.FORM_DATA=3,O.TEXT=4,O.BLOB=5,O.ARRAY_BUFFER=6,O[O.NONE]="NONE",O[O.JSON]="JSON",O[O.FORM]="FORM",O[O.FORM_DATA]="FORM_DATA",O[O.TEXT]="TEXT",O[O.BLOB]="BLOB",O[O.ARRAY_BUFFER]="ARRAY_BUFFER";var E={};E.Text=0,E.Json=1,E.ArrayBuffer=2,E.Blob=3,E[E.Text]="Text",E[E.Json]="Json",E[E.ArrayBuffer]="ArrayBuffer",E[E.Blob]="Blob";var x=function(){function t(e){var n=this;if(this._headers=new Map,this._normalizedNames=new Map,e)return e instanceof t?void e.forEach(function(t,e){t.forEach(function(t){return n.append(e,t)})}):void Object.keys(e).forEach(function(t){var r=Array.isArray(e[t])?e[t]:[e[t]];n.delete(t),r.forEach(function(e){return n.append(t,e)})})}return t.fromResponseHeaderString=function(e){var n=new t;return e.split("\n").forEach(function(t){var e=t.indexOf(":");if(e>0){var r=t.slice(0,e),o=t.slice(e+1).trim();n.set(r,o)}}),n},t.prototype.append=function(t,e){var n=this.getAll(t);null===n?this.set(t,e):n.push(e)},t.prototype.delete=function(t){var e=t.toLowerCase();this._normalizedNames.delete(e),this._headers.delete(e)},t.prototype.forEach=function(t){var e=this;this._headers.forEach(function(n,r){return t(n,e._normalizedNames.get(r),e._headers)})},t.prototype.get=function(t){var e=this.getAll(t);return null===e?null:e.length>0?e[0]:null},t.prototype.has=function(t){return this._headers.has(t.toLowerCase())},t.prototype.keys=function(){return Array.from(this._normalizedNames.values())},t.prototype.set=function(t,e){Array.isArray(e)?e.length&&this._headers.set(t.toLowerCase(),[e.join(",")]):this._headers.set(t.toLowerCase(),[e]),this.mayBeSetNormalizedName(t)},t.prototype.values=function(){return Array.from(this._headers.values())},t.prototype.toJSON=function(){var t=this,e={};return this._headers.forEach(function(n,r){var o=[];n.forEach(function(t){return o.push.apply(o,t.split(","))}),e[t._normalizedNames.get(r)]=o}),e},t.prototype.getAll=function(t){return this.has(t)?this._headers.get(t.toLowerCase())||null:null},t.prototype.entries=function(){throw new Error('"entries" method is not implemented on Headers class')},t.prototype.mayBeSetNormalizedName=function(t){var e=t.toLowerCase();this._normalizedNames.has(e)||this._normalizedNames.set(e,t)},t}(),S=function(){function t(t){void 0===t&&(t={});var e=t.body,n=t.status,r=t.headers,o=t.statusText,i=t.type,s=t.url;this.body=null!=e?e:null,this.status=null!=n?n:null,this.headers=null!=r?r:null,this.statusText=null!=o?o:null,this.type=null!=i?i:null,this.url=null!=s?s:null}return t.prototype.merge=function(e){return new t({body:e&&null!=e.body?e.body:this.body,status:e&&null!=e.status?e.status:this.status,headers:e&&null!=e.headers?e.headers:this.headers,statusText:e&&null!=e.statusText?e.statusText:this.statusText,type:e&&null!=e.type?e.type:this.type,url:e&&null!=e.url?e.url:this.url})},t}(),P=function(t){function e(){return t.call(this,{status:200,statusText:"Ok",type:C.Default,headers:new x})||this}return y.a(e,t),e}(S);P.decorators=[{type:v.D}],P.ctorParameters=function(){return[]};/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -var A=function(){function t(){}return t.prototype.createConnection=function(t){},t}(),T=(function(){function t(){}}(),function(){function t(){}return t.prototype.configureRequest=function(t){},t}()),k=function(t){return t>=200&&t<300},V=function(){function t(){}return t.prototype.encodeKey=function(t){return a(t)},t.prototype.encodeValue=function(t){return a(t)},t}(),N=function(){function t(t,e){void 0===t&&(t=""),void 0===e&&(e=new V),this.rawParams=t,this.queryEncoder=e,this.paramsMap=s(t)}return t.prototype.clone=function(){var e=new t("",this.queryEncoder);return e.appendAll(this),e},t.prototype.has=function(t){return this.paramsMap.has(t)},t.prototype.get=function(t){var e=this.paramsMap.get(t);return Array.isArray(e)?e[0]:null},t.prototype.getAll=function(t){return this.paramsMap.get(t)||[]},t.prototype.set=function(t,e){if(void 0===e||null===e)return void this.delete(t);var n=this.paramsMap.get(t)||[];n.length=0,n.push(e),this.paramsMap.set(t,n)},t.prototype.setAll=function(t){var e=this;t.paramsMap.forEach(function(t,n){var r=e.paramsMap.get(n)||[];r.length=0,r.push(t[0]),e.paramsMap.set(n,r)})},t.prototype.append=function(t,e){if(void 0!==e&&null!==e){var n=this.paramsMap.get(t)||[];n.push(e),this.paramsMap.set(t,n)}},t.prototype.appendAll=function(t){var e=this;t.paramsMap.forEach(function(t,n){for(var r=e.paramsMap.get(n)||[],o=0;o=200&&n.status<=299,n.statusText=e.statusText,n.headers=e.headers,n.type=e.type,n.url=e.url,n}return y.a(e,t),e.prototype.toString=function(){return"Response with status: "+this.status+" "+this.statusText+" for URL: "+this.url},e}(j),R=0,D="__ng_jsonp__",I=null,F=function(){function t(){}return t.prototype.build=function(t){var e=document.createElement("script");return e.src=t,e},t.prototype.nextRequestID=function(){return"__req"+R++},t.prototype.requestCallback=function(t){return D+"."+t+".finished"},t.prototype.exposeConnection=function(t,e){u()[t]=e},t.prototype.removeConnection=function(t){u()[t]=null},t.prototype.send=function(t){document.body.appendChild(t)},t.prototype.cleanup=function(t){t.parentNode&&t.parentNode.removeChild(t)},t}();F.decorators=[{type:v.D}],F.ctorParameters=function(){return[]};/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -var H="JSONP injected script did not invoke callback.",L="JSONP requests must use GET request method.",U=function(){function t(){}return t.prototype.finished=function(t){},t}(),B=function(t){function e(e,n,r){var o=t.call(this)||this;if(o._dom=n,o.baseResponseOptions=r,o._finished=!1,e.method!==_.Get)throw new TypeError(L);return o.request=e,o.response=new m.Observable(function(t){o.readyState=w.Loading;var i=o._id=n.nextRequestID();n.exposeConnection(i,o);var s=n.requestCallback(o._id),a=e.url;a.indexOf("=JSONP_CALLBACK&")>-1?a=a.replace("=JSONP_CALLBACK&","="+s+"&"):a.lastIndexOf("=JSONP_CALLBACK")===a.length-"=JSONP_CALLBACK".length&&(a=a.substring(0,a.length-"=JSONP_CALLBACK".length)+"="+s);var u=o._script=n.build(a),c=function(e){if(o.readyState!==w.Cancelled){if(o.readyState=w.Done,n.cleanup(u),!o._finished){var i=new S({body:H,type:C.Error,url:a});return r&&(i=r.merge(i)),void t.error(new M(i))}var s=new S({body:o._responseData,url:a});o.baseResponseOptions&&(s=o.baseResponseOptions.merge(s)),t.next(new M(s)),t.complete()}},l=function(e){if(o.readyState!==w.Cancelled){o.readyState=w.Done,n.cleanup(u);var i=new S({body:e.message,type:C.Error});r&&(i=r.merge(i)),t.error(new M(i))}};return u.addEventListener("load",c),u.addEventListener("error",l),n.send(u),function(){o.readyState=w.Cancelled,u.removeEventListener("load",c),u.removeEventListener("error",l),o._dom.cleanup(u)}}),o}return y.a(e,t),e.prototype.finished=function(t){this._finished=!0,this._dom.removeConnection(this._id),this.readyState!==w.Cancelled&&(this._responseData=t)},e}(U),G=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return y.a(e,t),e}(A),q=function(t){function e(e,n){var r=t.call(this)||this;return r._browserJSONP=e,r._baseResponseOptions=n,r}return y.a(e,t),e.prototype.createConnection=function(t){return new B(t,this._browserJSONP,this._baseResponseOptions)},e}(G);q.decorators=[{type:v.D}],q.ctorParameters=function(){return[{type:F},{type:S}]};/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -var z=/^\)\]\}',?\n/,Z=function(){function t(t,e,n){var r=this;this.request=t,this.response=new m.Observable(function(i){var s=e.build();s.open(_[t.method].toUpperCase(),t.url),null!=t.withCredentials&&(s.withCredentials=t.withCredentials);var a=function(){var e=1223===s.status?204:s.status,r=null;204!==e&&"string"==typeof(r=void 0===s.response?s.responseText:s.response)&&(r=r.replace(z,"")),0===e&&(e=r?200:0);var a=x.fromResponseHeaderString(s.getAllResponseHeaders()),u=o(s)||t.url,c=s.statusText||"OK",l=new S({body:r,status:e,headers:a,statusText:c,url:u});null!=n&&(l=n.merge(l));var p=new M(l);if(p.ok=k(e),p.ok)return i.next(p),void i.complete();i.error(p)},u=function(t){var e=new S({body:t,type:C.Error,status:s.status,statusText:s.statusText});null!=n&&(e=n.merge(e)),i.error(new M(e))};if(r.setDetectedContentType(t,s),null==t.headers&&(t.headers=new x),t.headers.has("Accept")||t.headers.append("Accept","application/json, text/plain, */*"),t.headers.forEach(function(t,e){return s.setRequestHeader(e,t.join(","))}),null!=t.responseType&&null!=s.responseType)switch(t.responseType){case E.ArrayBuffer:s.responseType="arraybuffer";break;case E.Json:s.responseType="json";break;case E.Text:s.responseType="text";break;case E.Blob:s.responseType="blob";break;default:throw new Error("The selected responseType is not supported")}return s.addEventListener("load",a),s.addEventListener("error",u),s.send(r.request.getBody()),function(){s.removeEventListener("load",a),s.removeEventListener("error",u),s.abort()}})}return t.prototype.setDetectedContentType=function(t,e){if(null==t.headers||null==t.headers.get("Content-Type"))switch(t.contentType){case O.NONE:break;case O.JSON:e.setRequestHeader("content-type","application/json");break;case O.FORM:e.setRequestHeader("content-type","application/x-www-form-urlencoded;charset=UTF-8");break;case O.TEXT:e.setRequestHeader("content-type","text/plain");break;case O.BLOB:var n=t.blob();n.type&&e.setRequestHeader("content-type",n.type)}},t}(),Y=function(){function t(t,e){void 0===t&&(t="XSRF-TOKEN"),void 0===e&&(e="X-XSRF-TOKEN"),this._cookieName=t,this._headerName=e}return t.prototype.configureRequest=function(t){var e=n.i(g.t)().getCookie(this._cookieName);e&&t.headers.set(this._headerName,e)},t}(),W=function(){function t(t,e,n){this._browserXHR=t,this._baseResponseOptions=e,this._xsrfStrategy=n}return t.prototype.createConnection=function(t){return this._xsrfStrategy.configureRequest(t),new Z(t,this._browserXHR,this._baseResponseOptions)},t}();W.decorators=[{type:v.D}],W.ctorParameters=function(){return[{type:b},{type:S},{type:T}]};/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -var Q=function(){function t(t){void 0===t&&(t={});var e=t.method,n=t.headers,o=t.body,i=t.url,s=t.search,a=t.params,u=t.withCredentials,c=t.responseType;this.method=null!=e?r(e):null,this.headers=null!=n?n:null,this.body=null!=o?o:null,this.url=null!=i?i:null,this.params=this._mergeSearchParams(a||s),this.withCredentials=null!=u?u:null,this.responseType=null!=c?c:null}return Object.defineProperty(t.prototype,"search",{get:function(){return this.params},set:function(t){this.params=t},enumerable:!0,configurable:!0}),t.prototype.merge=function(e){return new t({method:e&&null!=e.method?e.method:this.method,headers:e&&null!=e.headers?e.headers:new x(this.headers),body:e&&null!=e.body?e.body:this.body,url:e&&null!=e.url?e.url:this.url,params:e&&this._mergeSearchParams(e.params||e.search),withCredentials:e&&null!=e.withCredentials?e.withCredentials:this.withCredentials,responseType:e&&null!=e.responseType?e.responseType:this.responseType})},t.prototype._mergeSearchParams=function(t){return t?t instanceof N?t.clone():"string"==typeof t?new N(t):this._parseParams(t):this.params},t.prototype._parseParams=function(t){var e=this;void 0===t&&(t={});var n=new N;return Object.keys(t).forEach(function(r){var o=t[r];Array.isArray(o)?o.forEach(function(t){return e._appendParam(r,t,n)}):e._appendParam(r,o,n)}),n},t.prototype._appendParam=function(t,e,n){"string"!=typeof e&&(e=JSON.stringify(e)),n.append(t,e)},t}(),K=function(t){function e(){return t.call(this,{method:_.Get,headers:new x})||this}return y.a(e,t),e}(Q);K.decorators=[{type:v.D}],K.ctorParameters=function(){return[]};/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -var J=function(t){function e(e){var n=t.call(this)||this,o=e.url;n.url=e.url;var i=e.params||e.search;if(i){var s=void 0;if(s="object"!=typeof i||i instanceof N?i.toString():c(i).toString(),s.length>0){var a="?";-1!=n.url.indexOf("?")&&(a="&"==n.url[n.url.length-1]?"":"&"),n.url=o+a+s}}return n._body=e.body,n.method=r(e.method),n.headers=new x(e.headers),n.contentType=n.detectContentType(),n.withCredentials=e.withCredentials,n.responseType=e.responseType,n}return y.a(e,t),e.prototype.detectContentType=function(){switch(this.headers.get("content-type")){case"application/json":return O.JSON;case"application/x-www-form-urlencoded":return O.FORM;case"multipart/form-data":return O.FORM_DATA;case"text/plain":case"text/html":return O.TEXT;case"application/octet-stream":return this._body instanceof nt?O.ARRAY_BUFFER:O.BLOB;default:return this.detectContentTypeFromBody()}},e.prototype.detectContentTypeFromBody=function(){return null==this._body?O.NONE:this._body instanceof N?O.FORM:this._body instanceof tt?O.FORM_DATA:this._body instanceof et?O.BLOB:this._body instanceof nt?O.ARRAY_BUFFER:this._body&&"object"==typeof this._body?O.JSON:O.TEXT},e.prototype.getBody=function(){switch(this.contentType){case O.JSON:case O.FORM:return this.text();case O.FORM_DATA:return this._body;case O.TEXT:return this.text();case O.BLOB:return this.blob();case O.ARRAY_BUFFER:return this.arrayBuffer();default:return null}},e}(j),$=function(){},X="object"==typeof window?window:$,tt=X.FormData||$,et=X.Blob||$,nt=X.ArrayBuffer||$,rt=function(){function t(t,e){this._backend=t,this._defaultOptions=e}return t.prototype.request=function(t,e){var n;if("string"==typeof t)n=l(this._backend,new J(p(this._defaultOptions,e,_.Get,t)));else{if(!(t instanceof J))throw new Error("First argument must be a url string or Request instance.");n=l(this._backend,t)}return n},t.prototype.get=function(t,e){return this.request(new J(p(this._defaultOptions,e,_.Get,t)))},t.prototype.post=function(t,e,n){return this.request(new J(p(this._defaultOptions.merge(new Q({body:e})),n,_.Post,t)))},t.prototype.put=function(t,e,n){return this.request(new J(p(this._defaultOptions.merge(new Q({body:e})),n,_.Put,t)))},t.prototype.delete=function(t,e){return this.request(new J(p(this._defaultOptions,e,_.Delete,t)))},t.prototype.patch=function(t,e,n){return this.request(new J(p(this._defaultOptions.merge(new Q({body:e})),n,_.Patch,t)))},t.prototype.head=function(t,e){return this.request(new J(p(this._defaultOptions,e,_.Head,t)))},t.prototype.options=function(t,e){return this.request(new J(p(this._defaultOptions,e,_.Options,t)))},t}();rt.decorators=[{type:v.D}],rt.ctorParameters=function(){return[{type:A},{type:Q}]};var ot=function(t){function e(e,n){return t.call(this,e,n)||this}return y.a(e,t),e.prototype.request=function(t,e){if("string"==typeof t&&(t=new J(p(this._defaultOptions,e,_.Get,t))),!(t instanceof J))throw new Error("First argument must be a url string or Request instance.");if(t.method!==_.Get)throw new Error("JSONP requests must use GET request method.");return l(this._backend,t)},e}(rt);ot.decorators=[{type:v.D}],ot.ctorParameters=function(){return[{type:A},{type:Q}]};var it=function(){function t(){}return t}();it.decorators=[{type:v.E,args:[{providers:[{provide:rt,useFactory:h,deps:[W,Q]},b,{provide:Q,useClass:K},{provide:S,useClass:P},W,{provide:T,useFactory:f}]}]}],it.ctorParameters=function(){return[]};var st=function(){function t(){}return t}();st.decorators=[{type:v.E,args:[{providers:[{provide:ot,useFactory:d,deps:[G,Q]},F,{provide:Q,useClass:K},{provide:S,useClass:P},{provide:G,useClass:q}]}]}],st.ctorParameters=function(){return[]};/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -new v.F("4.2.6")},GIjk:function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},o=function(t){function e(e){t.call(this),this.errors=e;var n=Error.call(this,e?e.length+" errors occurred during unsubscription:\n "+e.map(function(t,e){return e+1+") "+t.toString()}).join("\n "):"");this.name=n.name="UnsubscriptionError",this.stack=n.stack,this.message=n.message}return r(e,t),e}(Error);e.UnsubscriptionError=o},Gb0N:function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},o=n("rCTf"),i=function(t){function e(e,n,r){t.call(this),this.start=e,this._count=n,this.scheduler=r}return r(e,t),e.create=function(t,n,r){return void 0===t&&(t=0),void 0===n&&(n=0),new e(t,n,r)},e.dispatch=function(t){var e=t.start,n=t.index,r=t.count,o=t.subscriber;if(n>=r)return void o.complete();o.next(e),o.closed||(t.index=n+1,t.start=e+1,this.schedule(t))},e.prototype._subscribe=function(t){var n=0,r=this.start,o=this._count,i=this.scheduler;if(i)return i.schedule(e.dispatch,0,{index:n,count:o,start:r,subscriber:t});for(;;){if(n++>=o){t.complete();break}if(t.next(r++),t.closed)break}},e}(o.Observable);e.RangeObservable=i},HcJ8:function(t,e,n){"use strict";var r=n("rCTf"),o=n("XO5T");r.Observable.prototype.mergeMap=o.mergeMap,r.Observable.prototype.flatMap=o.mergeMap},ICpg:function(t,e,n){"use strict";function r(t){return null!=t&&"object"==typeof t}e.isObject=r},IZVw:function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},o=function(t){function e(){var e=t.call(this,"object unsubscribed");this.name=e.name="ObjectUnsubscribedError",this.stack=e.stack,this.message=e.message}return r(e,t),e}(Error);e.ObjectUnsubscribedError=o},Ji1B:function(t,e,n){"use strict";function r(t,e){return void 0===e&&(e=0),this.lift(new a(t,e))}var o=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=n("mmVS"),s=n("8GmM");e.observeOn=r;var a=function(){function t(t,e){void 0===e&&(e=0),this.scheduler=t,this.delay=e}return t.prototype.call=function(t,e){return e.subscribe(new u(t,this.scheduler,this.delay))},t}();e.ObserveOnOperator=a;var u=function(t){function e(e,n,r){void 0===r&&(r=0),t.call(this,e),this.scheduler=n,this.delay=r}return o(e,t),e.dispatch=function(t){var e=t.notification,n=t.destination;e.observe(n),this.unsubscribe()},e.prototype.scheduleMessage=function(t){this.add(this.scheduler.schedule(e.dispatch,this.delay,new c(t,this.destination)))},e.prototype._next=function(t){this.scheduleMessage(s.Notification.createNext(t))},e.prototype._error=function(t){this.scheduleMessage(s.Notification.createError(t))},e.prototype._complete=function(){this.scheduleMessage(s.Notification.createComplete())},e}(i.Subscriber);e.ObserveOnSubscriber=u;var c=function(){function t(t,e){this.notification=t,this.destination=e}return t}();e.ObserveOnMessage=c},KLoZ:function(t,e,n){"use strict";function r(t){for(var e=[],n=1;ne&&(i=Math.max(i,o-e)),i>0&&r.splice(0,i),r},e}(o.Subject);e.ReplaySubject=l;var p=function(){function t(t,e){this.time=t,this.value=e}return t}()},NVOs:function(t,e,n){"use strict";/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -function r(t){return null==t||0===t.length}function o(t){return null!=t}function i(t){var e=n.i(M._7)(t)?n.i(D.fromPromise)(t):t;if(!n.i(M._8)(e))throw new Error("Expected validator to return Promise or Observable.");return e}function s(t,e){return e.map(function(e){return e(t)})}function a(t,e){return e.map(function(e){return e(t)})}function u(t){var e=t.reduce(function(t,e){return null!=e?Object.assign({},t,e):t},{});return 0===Object.keys(e).length?null:e}function c(){return/android (\d+)/.test((n.i(F.t)()?n.i(F.t)().getUserAgent():"").toLowerCase())}/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -function l(t){return t.validate?function(e){return t.validate(e)}:t}function p(t){return t.validate?function(e){return t.validate(e)}:t}/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -function f(){throw new Error("unimplemented")}function h(t,e){return null==t?""+e:(e&&"object"==typeof e&&(e="Object"),(t+": "+e).slice(0,50))}function d(t){return t.split(":")[0]}function y(t,e){return null==t?""+e:("string"==typeof e&&(e="'"+e+"'"),e&&"object"==typeof e&&(e="Object"),(t+": "+e).slice(0,50))}function v(t){return t.split(":")[0]}/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -function m(t,e){return e.path.concat([t])}function g(t,e){t||C(e,"Cannot find control with"),e.valueAccessor||C(e,"No value accessor for form control with"),t.validator=q.compose([t.validator,e.validator]),t.asyncValidator=q.composeAsync([t.asyncValidator,e.asyncValidator]),e.valueAccessor.writeValue(t.value),e.valueAccessor.registerOnChange(function(n){e.viewToModelUpdate(n),t.markAsDirty(),t.setValue(n,{emitModelToViewChange:!1})}),e.valueAccessor.registerOnTouched(function(){return t.markAsTouched()}),t.registerOnChange(function(t,n){e.valueAccessor.writeValue(t),n&&e.viewToModelUpdate(t)}),e.valueAccessor.setDisabledState&&t.registerOnDisabledChange(function(t){e.valueAccessor.setDisabledState(t)}),e._rawValidators.forEach(function(e){e.registerOnValidatorChange&&e.registerOnValidatorChange(function(){return t.updateValueAndValidity()})}),e._rawAsyncValidators.forEach(function(e){e.registerOnValidatorChange&&e.registerOnValidatorChange(function(){return t.updateValueAndValidity()})})}function b(t,e){e.valueAccessor.registerOnChange(function(){return w(e)}),e.valueAccessor.registerOnTouched(function(){return w(e)}),e._rawValidators.forEach(function(t){t.registerOnValidatorChange&&t.registerOnValidatorChange(null)}),e._rawAsyncValidators.forEach(function(t){t.registerOnValidatorChange&&t.registerOnValidatorChange(null)}),t&&t._clearChangeFns()}function _(t,e){null==t&&C(e,"Cannot find control with"),t.validator=q.compose([t.validator,e.validator]),t.asyncValidator=q.composeAsync([t.asyncValidator,e.asyncValidator])}function w(t){return C(t,"There is no FormControl instance attached to form control element with")}function C(t,e){var n;throw n=t.path.length>1?"path: '"+t.path.join(" -> ")+"'":t.path[0]?"name: '"+t.path+"'":"unspecified name attribute",new Error(e+" "+n)}function O(t){return null!=t?q.compose(t.map(l)):null}function E(t){return null!=t?q.composeAsync(t.map(p)):null}function x(t,e){if(!t.hasOwnProperty("model"))return!1;var r=t.model;return!!r.isFirstChange()||!n.i(M._12)(e,r.currentValue)}function S(t){return pt.some(function(e){return t.constructor===e})}function P(t,e){if(!e)return null;var n=void 0,r=void 0,o=void 0;return e.forEach(function(e){e.constructor===K?n=e:S(e)?(r&&C(t,"More than one built-in value accessor matches form control with"),r=e):(o&&C(t,"More than one custom value accessor matches form control with"),o=e)}),o||(r||(n||(C(t,"No valid value accessor for form control with"),null)))}function A(t,e,n){return null==e?null:(e instanceof Array||(e=e.split(n)),e instanceof Array&&0===e.length?null:e.reduce(function(t,e){return t instanceof Ot?t.controls[e]||null:t instanceof Et?t.at(e)||null:null},t))}function T(t){return Array.isArray(t)?O(t):t||null}function k(t){return Array.isArray(t)?E(t):t||null}function V(t,e){var n=t.indexOf(e);n>-1&&t.splice(n,1)}function N(t){return!(t instanceof Ut||t instanceof Ht||t instanceof Gt)}var j=n("TToO"),M=n("3j3K"),R=n("7rB9"),D=(n.n(R),n("ioK+")),I=(n.n(D),n("xAJs")),F=(n.n(I),n("Qbdm"));n.d(e,"f",function(){return L}),n.d(e,"j",function(){return z}),n.d(e,"i",function(){return Q}),n.d(e,"h",function(){return K}),n.d(e,"l",function(){return X}),n.d(e,"m",function(){return yt}),n.d(e,"g",function(){return vt}),n.d(e,"e",function(){return Pt}),n.d(e,"k",function(){return Mt}),n.d(e,"c",function(){return le}),n.d(e,"b",function(){return ce}),n.d(e,"d",function(){return ie}),n.d(e,"a",function(){return et});/** - * @license Angular v4.2.6 - * (c) 2010-2017 Google, Inc. https://angular.io/ - * License: MIT - */ -/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -var H=function(){function t(){}return t.prototype.control=function(){},Object.defineProperty(t.prototype,"value",{get:function(){return this.control?this.control.value:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"valid",{get:function(){return this.control?this.control.valid:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"invalid",{get:function(){return this.control?this.control.invalid:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pending",{get:function(){return this.control?this.control.pending:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"errors",{get:function(){return this.control?this.control.errors:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pristine",{get:function(){return this.control?this.control.pristine:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dirty",{get:function(){return this.control?this.control.dirty:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"touched",{get:function(){return this.control?this.control.touched:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"untouched",{get:function(){return this.control?this.control.untouched:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disabled",{get:function(){return this.control?this.control.disabled:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"enabled",{get:function(){return this.control?this.control.enabled:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"statusChanges",{get:function(){return this.control?this.control.statusChanges:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"valueChanges",{get:function(){return this.control?this.control.valueChanges:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"path",{get:function(){return null},enumerable:!0,configurable:!0}),t.prototype.reset=function(t){void 0===t&&(t=void 0),this.control&&this.control.reset(t)},t.prototype.hasError=function(t,e){return!!this.control&&this.control.hasError(t,e)},t.prototype.getError=function(t,e){return this.control?this.control.getError(t,e):null},t}(),L=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return j.a(e,t),Object.defineProperty(e.prototype,"formDirective",{get:function(){return null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return null},enumerable:!0,configurable:!0}),e}(H),U=new M.I("NgValidators"),B=new M.I("NgAsyncValidators"),G=/^(?=.{1,254}$)(?=.{1,64}@)[-!#$%&'*+\/0-9=?A-Z^_`a-z{|}~]+(\.[-!#$%&'*+\/0-9=?A-Z^_`a-z{|}~]+)*@[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?(\.[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*$/,q=function(){function t(){}return t.min=function(t){return function(e){if(r(e.value)||r(t))return null;var n=parseFloat(e.value);return!isNaN(n)&&nt?{max:{max:t,actual:e.value}}:null}},t.required=function(t){return r(t.value)?{required:!0}:null},t.requiredTrue=function(t){return!0===t.value?null:{required:!0}},t.email=function(t){return G.test(t.value)?null:{email:!0}},t.minLength=function(t){return function(e){if(r(e.value))return null;var n=e.value?e.value.length:0;return nt?{maxlength:{requiredLength:t,actualLength:n}}:null}},t.pattern=function(e){if(!e)return t.nullValidator;var n,o;return"string"==typeof e?(o="^"+e+"$",n=new RegExp(o)):(o=e.toString(),n=e),function(t){if(r(t.value))return null;var e=t.value;return n.test(e)?null:{pattern:{requiredPattern:o,actualValue:e}}}},t.nullValidator=function(t){return null},t.compose=function(t){if(!t)return null;var e=t.filter(o);return 0==e.length?null:function(t){return u(s(t,e))}},t.composeAsync=function(t){if(!t)return null;var e=t.filter(o);return 0==e.length?null:function(t){var r=a(t,e).map(i);return I.map.call(n.i(R.forkJoin)(r),u)}},t}(),z=new M.I("NgValueAccessor"),Z={provide:z,useExisting:n.i(M._11)(function(){return Y}),multi:!0},Y=function(){function t(t,e){this._renderer=t,this._elementRef=e,this.onChange=function(t){},this.onTouched=function(){}}return t.prototype.writeValue=function(t){this._renderer.setElementProperty(this._elementRef.nativeElement,"checked",t)},t.prototype.registerOnChange=function(t){this.onChange=t},t.prototype.registerOnTouched=function(t){this.onTouched=t},t.prototype.setDisabledState=function(t){this._renderer.setElementProperty(this._elementRef.nativeElement,"disabled",t)},t}();Y.decorators=[{type:M.Y,args:[{selector:"input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]",host:{"(change)":"onChange($event.target.checked)","(blur)":"onTouched()"},providers:[Z]}]}],Y.ctorParameters=function(){return[{type:M._0},{type:M.Z}]};/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -var W={provide:z,useExisting:n.i(M._11)(function(){return K}),multi:!0},Q=new M.I("CompositionEventMode"),K=function(){function t(t,e,n){this._renderer=t,this._elementRef=e,this._compositionMode=n,this.onChange=function(t){},this.onTouched=function(){},this._composing=!1,null==this._compositionMode&&(this._compositionMode=!c())}return t.prototype.writeValue=function(t){var e=null==t?"":t;this._renderer.setElementProperty(this._elementRef.nativeElement,"value",e)},t.prototype.registerOnChange=function(t){this.onChange=t},t.prototype.registerOnTouched=function(t){this.onTouched=t},t.prototype.setDisabledState=function(t){this._renderer.setElementProperty(this._elementRef.nativeElement,"disabled",t)},t.prototype._handleInput=function(t){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(t)},t.prototype._compositionStart=function(){this._composing=!0},t.prototype._compositionEnd=function(t){this._composing=!1,this._compositionMode&&this.onChange(t)},t}();K.decorators=[{type:M.Y,args:[{selector:"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]",host:{"(input)":"_handleInput($event.target.value)","(blur)":"onTouched()","(compositionstart)":"_compositionStart()","(compositionend)":"_compositionEnd($event.target.value)"},providers:[W]}]}],K.ctorParameters=function(){return[{type:M._0},{type:M.Z},{type:void 0,decorators:[{type:M.L},{type:M.H,args:[Q]}]}]};/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -var J={provide:z,useExisting:n.i(M._11)(function(){return $}),multi:!0},$=function(){function t(t,e){this._renderer=t,this._elementRef=e,this.onChange=function(t){},this.onTouched=function(){}}return t.prototype.writeValue=function(t){var e=null==t?"":t;this._renderer.setElementProperty(this._elementRef.nativeElement,"value",e)},t.prototype.registerOnChange=function(t){this.onChange=function(e){t(""==e?null:parseFloat(e))}},t.prototype.registerOnTouched=function(t){this.onTouched=t},t.prototype.setDisabledState=function(t){this._renderer.setElementProperty(this._elementRef.nativeElement,"disabled",t)},t}();$.decorators=[{type:M.Y,args:[{selector:"input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]",host:{"(change)":"onChange($event.target.value)","(input)":"onChange($event.target.value)","(blur)":"onTouched()"},providers:[J]}]}],$.ctorParameters=function(){return[{type:M._0},{type:M.Z}]};var X=function(t){function e(){var e=t.apply(this,arguments)||this;return e._parent=null,e.name=null,e.valueAccessor=null,e._rawValidators=[],e._rawAsyncValidators=[],e}return j.a(e,t),Object.defineProperty(e.prototype,"validator",{get:function(){return f()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"asyncValidator",{get:function(){return f()},enumerable:!0,configurable:!0}),e.prototype.viewToModelUpdate=function(t){},e}(H),tt={provide:z,useExisting:n.i(M._11)(function(){return nt}),multi:!0},et=function(){function t(){this._accessors=[]}return t.prototype.add=function(t,e){this._accessors.push([t,e])},t.prototype.remove=function(t){for(var e=this._accessors.length-1;e>=0;--e)if(this._accessors[e][1]===t)return void this._accessors.splice(e,1)},t.prototype.select=function(t){var e=this;this._accessors.forEach(function(n){e._isSameGroup(n,t)&&n[1]!==t&&n[1].fireUncheck(t.value)})},t.prototype._isSameGroup=function(t,e){return!!t[0].control&&(t[0]._parent===e._control._parent&&t[1].name===e.name)},t}();et.decorators=[{type:M.D}],et.ctorParameters=function(){return[]};var nt=function(){function t(t,e,n,r){this._renderer=t,this._elementRef=e,this._registry=n,this._injector=r,this.onChange=function(){},this.onTouched=function(){}}return t.prototype.ngOnInit=function(){this._control=this._injector.get(X),this._checkName(),this._registry.add(this._control,this)},t.prototype.ngOnDestroy=function(){this._registry.remove(this)},t.prototype.writeValue=function(t){this._state=t===this.value,this._renderer.setElementProperty(this._elementRef.nativeElement,"checked",this._state)},t.prototype.registerOnChange=function(t){var e=this;this._fn=t,this.onChange=function(){t(e.value),e._registry.select(e)}},t.prototype.fireUncheck=function(t){this.writeValue(t)},t.prototype.registerOnTouched=function(t){this.onTouched=t},t.prototype.setDisabledState=function(t){this._renderer.setElementProperty(this._elementRef.nativeElement,"disabled",t)},t.prototype._checkName=function(){this.name&&this.formControlName&&this.name!==this.formControlName&&this._throwNameError(),!this.name&&this.formControlName&&(this.name=this.formControlName)},t.prototype._throwNameError=function(){throw new Error('\n If you define both a name and a formControlName attribute on your radio button, their values\n must match. Ex: \n ')},t}();nt.decorators=[{type:M.Y,args:[{selector:"input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]",host:{"(change)":"onChange()","(blur)":"onTouched()"},providers:[tt]}]}],nt.ctorParameters=function(){return[{type:M._0},{type:M.Z},{type:et},{type:M.A}]},nt.propDecorators={name:[{type:M._1}],formControlName:[{type:M._1}],value:[{type:M._1}]};/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -var rt={provide:z,useExisting:n.i(M._11)(function(){return ot}),multi:!0},ot=function(){function t(t,e){this._renderer=t,this._elementRef=e,this.onChange=function(t){},this.onTouched=function(){}}return t.prototype.writeValue=function(t){this._renderer.setElementProperty(this._elementRef.nativeElement,"value",parseFloat(t))},t.prototype.registerOnChange=function(t){this.onChange=function(e){t(""==e?null:parseFloat(e))}},t.prototype.registerOnTouched=function(t){this.onTouched=t},t.prototype.setDisabledState=function(t){this._renderer.setElementProperty(this._elementRef.nativeElement,"disabled",t)},t}();ot.decorators=[{type:M.Y,args:[{selector:"input[type=range][formControlName],input[type=range][formControl],input[type=range][ngModel]",host:{"(change)":"onChange($event.target.value)","(input)":"onChange($event.target.value)","(blur)":"onTouched()"},providers:[rt]}]}],ot.ctorParameters=function(){return[{type:M._0},{type:M.Z}]};/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -var it={provide:z,useExisting:n.i(M._11)(function(){return st}),multi:!0},st=function(){function t(t,e){this._renderer=t,this._elementRef=e,this._optionMap=new Map,this._idCounter=0,this.onChange=function(t){},this.onTouched=function(){},this._compareWith=M._12}return Object.defineProperty(t.prototype,"compareWith",{set:function(t){if("function"!=typeof t)throw new Error("compareWith must be a function, but received "+JSON.stringify(t));this._compareWith=t},enumerable:!0,configurable:!0}),t.prototype.writeValue=function(t){this.value=t;var e=this._getOptionId(t);null==e&&this._renderer.setElementProperty(this._elementRef.nativeElement,"selectedIndex",-1);var n=h(e,t);this._renderer.setElementProperty(this._elementRef.nativeElement,"value",n)},t.prototype.registerOnChange=function(t){var e=this;this.onChange=function(n){e.value=n,t(e._getOptionValue(n))}},t.prototype.registerOnTouched=function(t){this.onTouched=t},t.prototype.setDisabledState=function(t){this._renderer.setElementProperty(this._elementRef.nativeElement,"disabled",t)},t.prototype._registerOption=function(){return(this._idCounter++).toString()},t.prototype._getOptionId=function(t){for(var e=0,n=Array.from(this._optionMap.keys());e-1)}}else n=function(t,e){t._setSelected(!1)};this._optionMap.forEach(n)},t.prototype.registerOnChange=function(t){var e=this;this.onChange=function(n){var r=[];if(n.hasOwnProperty("selectedOptions"))for(var o=n.selectedOptions,i=0;i0||this.disabled},e.prototype._checkAllValuesPresent=function(t){this._forEachChild(function(e,n){if(void 0===t[n])throw new Error("Must supply a value for form control with name: '"+n+"'.")})},e}(wt),Et=function(t){function e(e,n,r){var o=t.call(this,n||null,r||null)||this;return o.controls=e,o._initObservables(),o._setUpControls(),o.updateValueAndValidity({onlySelf:!0,emitEvent:!1}),o}return j.a(e,t),e.prototype.at=function(t){return this.controls[t]},e.prototype.push=function(t){this.controls.push(t),this._registerControl(t),this.updateValueAndValidity(),this._onCollectionChange()},e.prototype.insert=function(t,e){this.controls.splice(t,0,e),this._registerControl(e),this.updateValueAndValidity(),this._onCollectionChange()},e.prototype.removeAt=function(t){this.controls[t]&&this.controls[t]._registerOnCollectionChange(function(){}),this.controls.splice(t,1),this.updateValueAndValidity(),this._onCollectionChange()},e.prototype.setControl=function(t,e){this.controls[t]&&this.controls[t]._registerOnCollectionChange(function(){}),this.controls.splice(t,1),e&&(this.controls.splice(t,0,e),this._registerControl(e)),this.updateValueAndValidity(),this._onCollectionChange()},Object.defineProperty(e.prototype,"length",{get:function(){return this.controls.length},enumerable:!0,configurable:!0}),e.prototype.setValue=function(t,e){var n=this;void 0===e&&(e={}),this._checkAllValuesPresent(t),t.forEach(function(t,r){n._throwIfControlMissing(r),n.at(r).setValue(t,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)},e.prototype.patchValue=function(t,e){var n=this;void 0===e&&(e={}),t.forEach(function(t,r){n.at(r)&&n.at(r).patchValue(t,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)},e.prototype.reset=function(t,e){void 0===t&&(t=[]),void 0===e&&(e={}),this._forEachChild(function(n,r){n.reset(t[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e),this._updatePristine(e),this._updateTouched(e)},e.prototype.getRawValue=function(){return this.controls.map(function(t){return t instanceof Ct?t.value:t.getRawValue()})},e.prototype._throwIfControlMissing=function(t){if(!this.controls.length)throw new Error("\n There are no form controls registered with this array yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n ");if(!this.at(t))throw new Error("Cannot find form control at index "+t)},e.prototype._forEachChild=function(t){this.controls.forEach(function(e,n){t(e,n)})},e.prototype._updateValue=function(){var t=this;this._value=this.controls.filter(function(e){return e.enabled||t.disabled}).map(function(t){return t.value})},e.prototype._anyControls=function(t){return this.controls.some(function(e){return e.enabled&&t(e)})},e.prototype._setUpControls=function(){var t=this;this._forEachChild(function(e){return t._registerControl(e)})},e.prototype._checkAllValuesPresent=function(t){this._forEachChild(function(e,n){if(void 0===t[n])throw new Error("Must supply a value for form control at index: "+n+".")})},e.prototype._allControlsDisabled=function(){for(var t=0,e=this.controls;t0||this.disabled},e.prototype._registerControl=function(t){t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)},e}(wt),xt={provide:L,useExisting:n.i(M._11)(function(){return Pt})},St=Promise.resolve(null),Pt=function(t){function e(e,n){var r=t.call(this)||this;return r._submitted=!1,r.ngSubmit=new M.V,r.form=new Ot({},O(e),E(n)),r}return j.a(e,t),Object.defineProperty(e.prototype,"submitted",{get:function(){return this._submitted},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"formDirective",{get:function(){return this},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"control",{get:function(){return this.form},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return[]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"controls",{get:function(){return this.form.controls},enumerable:!0,configurable:!0}),e.prototype.addControl=function(t){var e=this;St.then(function(){var n=e._findContainer(t.path);t._control=n.registerControl(t.name,t.control),g(t.control,t),t.control.updateValueAndValidity({emitEvent:!1})})},e.prototype.getControl=function(t){return this.form.get(t.path)},e.prototype.removeControl=function(t){var e=this;St.then(function(){var n=e._findContainer(t.path);n&&n.removeControl(t.name)})},e.prototype.addFormGroup=function(t){var e=this;St.then(function(){var n=e._findContainer(t.path),r=new Ot({});_(r,t),n.registerControl(t.name,r),r.updateValueAndValidity({emitEvent:!1})})},e.prototype.removeFormGroup=function(t){var e=this;St.then(function(){var n=e._findContainer(t.path);n&&n.removeControl(t.name)})},e.prototype.getFormGroup=function(t){return this.form.get(t.path)},e.prototype.updateModel=function(t,e){var n=this;St.then(function(){n.form.get(t.path).setValue(e)})},e.prototype.setValue=function(t){this.control.setValue(t)},e.prototype.onSubmit=function(t){return this._submitted=!0,this.ngSubmit.emit(t),!1},e.prototype.onReset=function(){this.resetForm()},e.prototype.resetForm=function(t){void 0===t&&(t=void 0),this.form.reset(t),this._submitted=!1},e.prototype._findContainer=function(t){return t.pop(),t.length?this.form.get(t):this.form},e}(L);Pt.decorators=[{type:M.Y,args:[{selector:"form:not([ngNoForm]):not([formGroup]),ngForm,[ngForm]",providers:[xt],host:{"(submit)":"onSubmit($event)","(reset)":"onReset()"},outputs:["ngSubmit"],exportAs:"ngForm"}]}],Pt.ctorParameters=function(){return[{type:Array,decorators:[{type:M.L},{type:M._13},{type:M.H,args:[U]}]},{type:Array,decorators:[{type:M.L},{type:M._13},{type:M.H,args:[B]}]}]};/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -var At={formControlName:'\n
\n \n
\n\n In your class:\n\n this.myGroup = new FormGroup({\n firstName: new FormControl()\n });',formGroupName:'\n
\n
\n \n
\n
\n\n In your class:\n\n this.myGroup = new FormGroup({\n person: new FormGroup({ firstName: new FormControl() })\n });',formArrayName:'\n
\n
\n
\n \n
\n
\n
\n\n In your class:\n\n this.cityArray = new FormArray([new FormControl(\'SF\')]);\n this.myGroup = new FormGroup({\n cities: this.cityArray\n });',ngModelGroup:'\n
\n
\n \n
\n
',ngModelWithFormGroup:'\n
\n \n \n
\n '},Tt=function(){function t(){}return t.modelParentException=function(){throw new Error('\n ngModel cannot be used to register form controls with a parent formGroup directive. Try using\n formGroup\'s partner directive "formControlName" instead. Example:\n\n '+At.formControlName+"\n\n Or, if you'd like to avoid registering this form control, indicate that it's standalone in ngModelOptions:\n\n Example:\n\n "+At.ngModelWithFormGroup)},t.formGroupNameException=function(){throw new Error("\n ngModel cannot be used to register form controls with a parent formGroupName or formArrayName directive.\n\n Option 1: Use formControlName instead of ngModel (reactive strategy):\n\n "+At.formGroupName+"\n\n Option 2: Update ngModel's parent be ngModelGroup (template-driven strategy):\n\n "+At.ngModelGroup)},t.missingNameException=function(){throw new Error('If ngModel is used within a form tag, either the name attribute must be set or the form\n control must be defined as \'standalone\' in ngModelOptions.\n\n Example 1: \n Example 2: ')},t.modelGroupParentException=function(){throw new Error("\n ngModelGroup cannot be used with a parent formGroup directive.\n\n Option 1: Use formGroupName instead of ngModelGroup (reactive strategy):\n\n "+At.formGroupName+"\n\n Option 2: Use a regular form tag instead of the formGroup directive (template-driven strategy):\n\n "+At.ngModelGroup)},t}(),kt={provide:L,useExisting:n.i(M._11)(function(){return Vt})},Vt=function(t){function e(e,n,r){var o=t.call(this)||this;return o._parent=e,o._validators=n,o._asyncValidators=r,o}return j.a(e,t),e.prototype._checkParentType=function(){this._parent instanceof e||this._parent instanceof Pt||Tt.modelGroupParentException()},e}(ft);Vt.decorators=[{type:M.Y,args:[{selector:"[ngModelGroup]",providers:[kt],exportAs:"ngModelGroup"}]}],Vt.ctorParameters=function(){return[{type:L,decorators:[{type:M._4},{type:M.U}]},{type:Array,decorators:[{type:M.L},{type:M._13},{type:M.H,args:[U]}]},{type:Array,decorators:[{type:M.L},{type:M._13},{type:M.H,args:[B]}]}]},Vt.propDecorators={name:[{type:M._1,args:["ngModelGroup"]}]};/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -var Nt={provide:X,useExisting:n.i(M._11)(function(){return Mt})},jt=Promise.resolve(null),Mt=function(t){function e(e,n,r,o){var i=t.call(this)||this;return i._control=new Ct,i._registered=!1,i.update=new M.V,i._parent=e,i._rawValidators=n||[],i._rawAsyncValidators=r||[],i.valueAccessor=P(i,o),i}return j.a(e,t),e.prototype.ngOnChanges=function(t){this._checkForErrors(),this._registered||this._setUpControl(),"isDisabled"in t&&this._updateDisabled(t),x(t,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)},e.prototype.ngOnDestroy=function(){this.formDirective&&this.formDirective.removeControl(this)},Object.defineProperty(e.prototype,"control",{get:function(){return this._control},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return this._parent?m(this.name,this._parent):[this.name]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"formDirective",{get:function(){return this._parent?this._parent.formDirective:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"validator",{get:function(){return O(this._rawValidators)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"asyncValidator",{get:function(){return E(this._rawAsyncValidators)},enumerable:!0,configurable:!0}),e.prototype.viewToModelUpdate=function(t){this.viewModel=t,this.update.emit(t)},e.prototype._setUpControl=function(){this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0},e.prototype._isStandalone=function(){return!this._parent||!(!this.options||!this.options.standalone)},e.prototype._setUpStandalone=function(){g(this._control,this),this._control.updateValueAndValidity({emitEvent:!1})},e.prototype._checkForErrors=function(){this._isStandalone()||this._checkParentType(),this._checkName()},e.prototype._checkParentType=function(){!(this._parent instanceof Vt)&&this._parent instanceof ft?Tt.formGroupNameException():this._parent instanceof Vt||this._parent instanceof Pt||Tt.modelParentException()},e.prototype._checkName=function(){this.options&&this.options.name&&(this.name=this.options.name),this._isStandalone()||this.name||Tt.missingNameException()},e.prototype._updateValue=function(t){var e=this;jt.then(function(){e.control.setValue(t,{emitViewToModelChange:!1})})},e.prototype._updateDisabled=function(t){var e=this,n=t.isDisabled.currentValue,r=""===n||n&&"false"!==n;jt.then(function(){r&&!e.control.disabled?e.control.disable():!r&&e.control.disabled&&e.control.enable()})},e}(X);Mt.decorators=[{type:M.Y,args:[{selector:"[ngModel]:not([formControlName]):not([formControl])",providers:[Nt],exportAs:"ngModel"}]}],Mt.ctorParameters=function(){return[{type:L,decorators:[{type:M.L},{type:M._4}]},{type:Array,decorators:[{type:M.L},{type:M._13},{type:M.H,args:[U]}]},{type:Array,decorators:[{type:M.L},{type:M._13},{type:M.H,args:[B]}]},{type:Array,decorators:[{type:M.L},{type:M._13},{type:M.H,args:[z]}]}]},Mt.propDecorators={name:[{type:M._1}],isDisabled:[{type:M._1,args:["disabled"]}],model:[{type:M._1,args:["ngModel"]}],options:[{type:M._1,args:["ngModelOptions"]}],update:[{type:M._14,args:["ngModelChange"]}]};/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -var Rt=function(){function t(){}return t.controlParentException=function(){throw new Error("formControlName must be used with a parent formGroup directive. You'll want to add a formGroup\n directive and pass it an existing FormGroup instance (you can create one in your class).\n\n Example:\n\n "+At.formControlName)},t.ngModelGroupException=function(){throw new Error('formControlName cannot be used with an ngModelGroup parent. It is only compatible with parents\n that also have a "form" prefix: formGroupName, formArrayName, or formGroup.\n\n Option 1: Update the parent to be formGroupName (reactive form strategy)\n\n '+At.formGroupName+"\n\n Option 2: Use ngModel instead of formControlName (template-driven strategy)\n\n "+At.ngModelGroup)},t.missingFormException=function(){throw new Error("formGroup expects a FormGroup instance. Please pass one in.\n\n Example:\n\n "+At.formControlName)},t.groupParentException=function(){throw new Error("formGroupName must be used with a parent formGroup directive. You'll want to add a formGroup\n directive and pass it an existing FormGroup instance (you can create one in your class).\n\n Example:\n\n "+At.formGroupName)},t.arrayParentException=function(){throw new Error("formArrayName must be used with a parent formGroup directive. You'll want to add a formGroup\n directive and pass it an existing FormGroup instance (you can create one in your class).\n\n Example:\n\n "+At.formArrayName)},t.disabledAttrWarning=function(){console.warn("\n It looks like you're using the disabled attribute with a reactive form directive. If you set disabled to true\n when you set up this control in your component class, the disabled attribute will actually be set in the DOM for\n you. We recommend using this approach to avoid 'changed after checked' errors.\n \n Example: \n form = new FormGroup({\n first: new FormControl({value: 'Nancy', disabled: true}, Validators.required),\n last: new FormControl('Drew', Validators.required)\n });\n ")},t}(),Dt={provide:X,useExisting:n.i(M._11)(function(){return It})},It=function(t){function e(e,n,r){var o=t.call(this)||this;return o.update=new M.V,o._rawValidators=e||[],o._rawAsyncValidators=n||[],o.valueAccessor=P(o,r),o}return j.a(e,t),Object.defineProperty(e.prototype,"isDisabled",{set:function(t){Rt.disabledAttrWarning()},enumerable:!0,configurable:!0}),e.prototype.ngOnChanges=function(t){this._isControlChanged(t)&&(g(this.form,this),this.control.disabled&&this.valueAccessor.setDisabledState&&this.valueAccessor.setDisabledState(!0),this.form.updateValueAndValidity({emitEvent:!1})),x(t,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)},Object.defineProperty(e.prototype,"path",{get:function(){return[]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"validator",{get:function(){return O(this._rawValidators)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"asyncValidator",{get:function(){return E(this._rawAsyncValidators)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"control",{get:function(){return this.form},enumerable:!0,configurable:!0}),e.prototype.viewToModelUpdate=function(t){this.viewModel=t,this.update.emit(t)},e.prototype._isControlChanged=function(t){return t.hasOwnProperty("form")},e}(X);It.decorators=[{type:M.Y,args:[{selector:"[formControl]",providers:[Dt],exportAs:"ngForm"}]}],It.ctorParameters=function(){return[{type:Array,decorators:[{type:M.L},{type:M._13},{type:M.H,args:[U]}]},{type:Array,decorators:[{type:M.L},{type:M._13},{type:M.H,args:[B]}]},{type:Array,decorators:[{type:M.L},{type:M._13},{type:M.H,args:[z]}]}]},It.propDecorators={form:[{type:M._1,args:["formControl"]}],model:[{type:M._1,args:["ngModel"]}],update:[{type:M._14,args:["ngModelChange"]}],isDisabled:[{type:M._1,args:["disabled"]}]};/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -var Ft={provide:L,useExisting:n.i(M._11)(function(){return Ht})},Ht=function(t){function e(e,n){var r=t.call(this)||this;return r._validators=e,r._asyncValidators=n,r._submitted=!1,r.directives=[],r.form=null,r.ngSubmit=new M.V,r}return j.a(e,t),e.prototype.ngOnChanges=function(t){this._checkFormPresent(),t.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations())},Object.defineProperty(e.prototype,"submitted",{get:function(){return this._submitted},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"formDirective",{get:function(){return this},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"control",{get:function(){return this.form},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return[]},enumerable:!0,configurable:!0}),e.prototype.addControl=function(t){var e=this.form.get(t.path);return g(e,t),e.updateValueAndValidity({emitEvent:!1}),this.directives.push(t),e},e.prototype.getControl=function(t){return this.form.get(t.path)},e.prototype.removeControl=function(t){V(this.directives,t)},e.prototype.addFormGroup=function(t){var e=this.form.get(t.path);_(e,t),e.updateValueAndValidity({emitEvent:!1})},e.prototype.removeFormGroup=function(t){},e.prototype.getFormGroup=function(t){return this.form.get(t.path)},e.prototype.addFormArray=function(t){var e=this.form.get(t.path);_(e,t),e.updateValueAndValidity({emitEvent:!1})},e.prototype.removeFormArray=function(t){},e.prototype.getFormArray=function(t){return this.form.get(t.path)},e.prototype.updateModel=function(t,e){this.form.get(t.path).setValue(e)},e.prototype.onSubmit=function(t){return this._submitted=!0,this.ngSubmit.emit(t),!1},e.prototype.onReset=function(){this.resetForm()},e.prototype.resetForm=function(t){void 0===t&&(t=void 0),this.form.reset(t),this._submitted=!1},e.prototype._updateDomValue=function(){var t=this;this.directives.forEach(function(e){var n=t.form.get(e.path);e._control!==n&&(b(e._control,e),n&&g(n,e),e._control=n)}),this.form._updateTreeValidity({emitEvent:!1})},e.prototype._updateRegistrations=function(){var t=this;this.form._registerOnCollectionChange(function(){return t._updateDomValue()}),this._oldForm&&this._oldForm._registerOnCollectionChange(function(){}),this._oldForm=this.form},e.prototype._updateValidators=function(){var t=O(this._validators);this.form.validator=q.compose([this.form.validator,t]);var e=E(this._asyncValidators);this.form.asyncValidator=q.composeAsync([this.form.asyncValidator,e])},e.prototype._checkFormPresent=function(){this.form||Rt.missingFormException()},e}(L);Ht.decorators=[{type:M.Y,args:[{selector:"[formGroup]",providers:[Ft],host:{"(submit)":"onSubmit($event)","(reset)":"onReset()"},exportAs:"ngForm"}]}],Ht.ctorParameters=function(){return[{type:Array,decorators:[{type:M.L},{type:M._13},{type:M.H,args:[U]}]},{type:Array,decorators:[{type:M.L},{type:M._13},{type:M.H,args:[B]}]}]},Ht.propDecorators={form:[{type:M._1,args:["formGroup"]}],ngSubmit:[{type:M._14}]};/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -var Lt={provide:L,useExisting:n.i(M._11)(function(){return Ut})},Ut=function(t){function e(e,n,r){var o=t.call(this)||this;return o._parent=e,o._validators=n,o._asyncValidators=r,o}return j.a(e,t),e.prototype._checkParentType=function(){N(this._parent)&&Rt.groupParentException()},e}(ft);Ut.decorators=[{type:M.Y,args:[{selector:"[formGroupName]",providers:[Lt]}]}],Ut.ctorParameters=function(){return[{type:L,decorators:[{type:M.L},{type:M._4},{type:M.U}]},{type:Array,decorators:[{type:M.L},{type:M._13},{type:M.H,args:[U]}]},{type:Array,decorators:[{type:M.L},{type:M._13},{type:M.H,args:[B]}]}]},Ut.propDecorators={name:[{type:M._1,args:["formGroupName"]}]};var Bt={provide:L,useExisting:n.i(M._11)(function(){return Gt})},Gt=function(t){function e(e,n,r){var o=t.call(this)||this;return o._parent=e,o._validators=n,o._asyncValidators=r,o}return j.a(e,t),e.prototype.ngOnInit=function(){this._checkParentType(),this.formDirective.addFormArray(this)},e.prototype.ngOnDestroy=function(){this.formDirective&&this.formDirective.removeFormArray(this)},Object.defineProperty(e.prototype,"control",{get:function(){return this.formDirective.getFormArray(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"formDirective",{get:function(){return this._parent?this._parent.formDirective:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return m(this.name,this._parent)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"validator",{get:function(){return O(this._validators)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"asyncValidator",{get:function(){return E(this._asyncValidators)},enumerable:!0,configurable:!0}),e.prototype._checkParentType=function(){N(this._parent)&&Rt.arrayParentException()},e}(L);Gt.decorators=[{type:M.Y,args:[{selector:"[formArrayName]",providers:[Bt]}]}],Gt.ctorParameters=function(){return[{type:L,decorators:[{type:M.L},{type:M._4},{type:M.U}]},{type:Array,decorators:[{type:M.L},{type:M._13},{type:M.H,args:[U]}]},{type:Array,decorators:[{type:M.L},{type:M._13},{type:M.H,args:[B]}]}]},Gt.propDecorators={name:[{type:M._1,args:["formArrayName"]}]};/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -var qt={provide:X,useExisting:n.i(M._11)(function(){return zt})},zt=function(t){function e(e,n,r,o){var i=t.call(this)||this;return i._added=!1,i.update=new M.V,i._parent=e,i._rawValidators=n||[],i._rawAsyncValidators=r||[],i.valueAccessor=P(i,o),i}return j.a(e,t),Object.defineProperty(e.prototype,"isDisabled",{set:function(t){Rt.disabledAttrWarning()},enumerable:!0,configurable:!0}),e.prototype.ngOnChanges=function(t){this._added||this._setUpControl(),x(t,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))},e.prototype.ngOnDestroy=function(){this.formDirective&&this.formDirective.removeControl(this)},e.prototype.viewToModelUpdate=function(t){this.viewModel=t,this.update.emit(t)},Object.defineProperty(e.prototype,"path",{get:function(){return m(this.name,this._parent)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"formDirective",{get:function(){return this._parent?this._parent.formDirective:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"validator",{get:function(){return O(this._rawValidators)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"asyncValidator",{get:function(){return E(this._rawAsyncValidators)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"control",{get:function(){return this._control},enumerable:!0,configurable:!0}),e.prototype._checkParentType=function(){!(this._parent instanceof Ut)&&this._parent instanceof ft?Rt.ngModelGroupException():this._parent instanceof Ut||this._parent instanceof Ht||this._parent instanceof Gt||Rt.controlParentException()},e.prototype._setUpControl=function(){this._checkParentType(),this._control=this.formDirective.addControl(this),this.control.disabled&&this.valueAccessor.setDisabledState&&this.valueAccessor.setDisabledState(!0),this._added=!0},e}(X);zt.decorators=[{type:M.Y,args:[{selector:"[formControlName]",providers:[qt]}]}],zt.ctorParameters=function(){return[{type:L,decorators:[{type:M.L},{type:M._4},{type:M.U}]},{type:Array,decorators:[{type:M.L},{type:M._13},{type:M.H,args:[U]}]},{type:Array,decorators:[{type:M.L},{type:M._13},{type:M.H,args:[B]}]},{type:Array,decorators:[{type:M.L},{type:M._13},{type:M.H,args:[z]}]}]},zt.propDecorators={name:[{type:M._1,args:["formControlName"]}],model:[{type:M._1,args:["ngModel"]}],update:[{type:M._14,args:["ngModelChange"]}],isDisabled:[{type:M._1,args:["disabled"]}]};/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -var Zt={provide:U,useExisting:n.i(M._11)(function(){return Wt}),multi:!0},Yt={provide:U,useExisting:n.i(M._11)(function(){return Qt}),multi:!0},Wt=function(){function t(){}return Object.defineProperty(t.prototype,"required",{get:function(){return this._required},set:function(t){this._required=null!=t&&!1!==t&&""+t!="false",this._onChange&&this._onChange()},enumerable:!0,configurable:!0}),t.prototype.validate=function(t){return this.required?q.required(t):null},t.prototype.registerOnValidatorChange=function(t){this._onChange=t},t}();Wt.decorators=[{type:M.Y,args:[{selector:":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]",providers:[Zt],host:{"[attr.required]":'required ? "" : null'}}]}],Wt.ctorParameters=function(){return[]},Wt.propDecorators={required:[{type:M._1}]};var Qt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return j.a(e,t),e.prototype.validate=function(t){return this.required?q.requiredTrue(t):null},e}(Wt);Qt.decorators=[{type:M.Y,args:[{selector:"input[type=checkbox][required][formControlName],input[type=checkbox][required][formControl],input[type=checkbox][required][ngModel]",providers:[Yt],host:{"[attr.required]":'required ? "" : null'}}]}],Qt.ctorParameters=function(){return[]};var Kt={provide:U,useExisting:n.i(M._11)(function(){return Jt}),multi:!0},Jt=function(){function t(){}return Object.defineProperty(t.prototype,"email",{set:function(t){this._enabled=""===t||!0===t||"true"===t,this._onChange&&this._onChange()},enumerable:!0,configurable:!0}),t.prototype.validate=function(t){return this._enabled?q.email(t):null},t.prototype.registerOnValidatorChange=function(t){this._onChange=t},t}();Jt.decorators=[{type:M.Y,args:[{selector:"[email][formControlName],[email][formControl],[email][ngModel]",providers:[Kt]}]}],Jt.ctorParameters=function(){return[]},Jt.propDecorators={email:[{type:M._1}]};var $t={provide:U,useExisting:n.i(M._11)(function(){return Xt}),multi:!0},Xt=function(){function t(){}return t.prototype.ngOnChanges=function(t){"minlength"in t&&(this._createValidator(),this._onChange&&this._onChange())},t.prototype.validate=function(t){return null==this.minlength?null:this._validator(t)},t.prototype.registerOnValidatorChange=function(t){this._onChange=t},t.prototype._createValidator=function(){this._validator=q.minLength(parseInt(this.minlength,10))},t}();Xt.decorators=[{type:M.Y,args:[{selector:"[minlength][formControlName],[minlength][formControl],[minlength][ngModel]",providers:[$t],host:{"[attr.minlength]":"minlength ? minlength : null"}}]}],Xt.ctorParameters=function(){return[]},Xt.propDecorators={minlength:[{type:M._1}]};var te={provide:U,useExisting:n.i(M._11)(function(){return ee}),multi:!0},ee=function(){function t(){}return t.prototype.ngOnChanges=function(t){"maxlength"in t&&(this._createValidator(),this._onChange&&this._onChange())},t.prototype.validate=function(t){return null!=this.maxlength?this._validator(t):null},t.prototype.registerOnValidatorChange=function(t){this._onChange=t},t.prototype._createValidator=function(){this._validator=q.maxLength(parseInt(this.maxlength,10))},t}();ee.decorators=[{type:M.Y,args:[{selector:"[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]",providers:[te],host:{"[attr.maxlength]":"maxlength ? maxlength : null"}}]}],ee.ctorParameters=function(){return[]},ee.propDecorators={maxlength:[{type:M._1}]};var ne={provide:U,useExisting:n.i(M._11)(function(){return re}),multi:!0},re=function(){function t(){}return t.prototype.ngOnChanges=function(t){"pattern"in t&&(this._createValidator(),this._onChange&&this._onChange())},t.prototype.validate=function(t){return this._validator(t)},t.prototype.registerOnValidatorChange=function(t){this._onChange=t},t.prototype._createValidator=function(){this._validator=q.pattern(this.pattern)},t}();re.decorators=[{type:M.Y,args:[{selector:"[pattern][formControlName],[pattern][formControl],[pattern][ngModel]",providers:[ne],host:{"[attr.pattern]":"pattern ? pattern : null"}}]}],re.ctorParameters=function(){return[]},re.propDecorators={pattern:[{type:M._1}]};/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -var oe=function(){function t(){}return t.prototype.group=function(t,e){void 0===e&&(e=null);var n=this._reduceControls(t),r=null!=e?e.validator:null,o=null!=e?e.asyncValidator:null;return new Ot(n,r,o)},t.prototype.control=function(t,e,n){return new Ct(t,e,n)},t.prototype.array=function(t,e,n){var r=this,o=t.map(function(t){return r._createControl(t)});return new Et(o,e,n)},t.prototype._reduceControls=function(t){var e=this,n={};return Object.keys(t).forEach(function(r){n[r]=e._createControl(t[r])}),n},t.prototype._createControl=function(t){if(t instanceof Ct||t instanceof Ot||t instanceof Et)return t;if(Array.isArray(t)){var e=t[0],n=t.length>1?t[1]:null,r=t.length>2?t[2]:null;return this.control(e,n,r)}return this.control(t)},t}();oe.decorators=[{type:M.D}],oe.ctorParameters=function(){return[]};/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -var ie=(new M.F("4.2.6"),function(){function t(){}return t}());ie.decorators=[{type:M.Y,args:[{selector:"form:not([ngNoForm]):not([ngNativeValidate])",host:{novalidate:""}}]}],ie.ctorParameters=function(){return[]};/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -var se=[ie,at,lt,K,$,ot,Y,st,ct,nt,yt,vt,Wt,Xt,ee,re,Qt,Jt],ae=[Mt,Vt,Pt],ue=[It,Ht,zt,Ut,Gt],ce=function(){function t(){}return t}();ce.decorators=[{type:M.E,args:[{declarations:se,exports:se}]}],ce.ctorParameters=function(){return[]};/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -var le=function(){function t(){}return t}();le.decorators=[{type:M.E,args:[{declarations:ae,providers:[et],exports:[ce,ae]}]}],le.ctorParameters=function(){return[]};var pe=function(){function t(){}return t}();pe.decorators=[{type:M.E,args:[{declarations:[ue],providers:[oe,et],exports:[ce,ue]}]}],pe.ctorParameters=function(){return[]}},P3oE:function(t,e,n){"use strict";function r(t){return!o.isArray(t)&&t-parseFloat(t)+1>=0}var o=n("Xajo");e.isNumeric=r},POFt:function(t,e,n){"use strict";function r(t){return 0===t?new a.EmptyObservable:this.lift(new u(t))}var o=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=n("mmVS"),s=n("8Z8y"),a=n("jBEF");e.take=r;var u=function(){function t(t){if(this.total=t,this.total<0)throw new s.ArgumentOutOfRangeError}return t.prototype.call=function(t,e){return e.subscribe(new c(t,this.total))},t}(),c=function(t){function e(e,n){t.call(this,e),this.total=n,this.count=0}return o(e,t),e.prototype._next=function(t){var e=this.total,n=++this.count;n<=e&&(this.destination.next(t),n===e&&(this.destination.complete(),this.unsubscribe()))},e}(i.Subscriber)},PutI:function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},o=n("cwzr"),i=function(t){function e(e,n){t.call(this,e,n),this.scheduler=e,this.work=n}return r(e,t),e.prototype.schedule=function(e,n){return void 0===n&&(n=0),n>0?t.prototype.schedule.call(this,e,n):(this.delay=n,this.state=e,this.scheduler.flush(this),this)},e.prototype.execute=function(e,n){return n>0||this.closed?t.prototype.execute.call(this,e,n):this._execute(e,n)},e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0?t.prototype.requestAsyncId.call(this,e,n,r):e.flush(this)},e}(o.AsyncAction);e.QueueAction=i},Qbdm:function(t,e,n){"use strict";function r(){return I}function o(t){I||(I=t)}function i(){return Z||(Z=document.querySelector("base"))?Z.getAttribute("href"):null}function s(t){return q||(q=document.createElement("a")),q.setAttribute("href",t),"/"===q.pathname.charAt(0)?q.pathname:"/"+q.pathname}function a(t,e){e=encodeURIComponent(e);for(var n=0,r=t.split(";");n/g,">")}function S(t){Nt.attributeMap(t).forEach(function(e,n){"xmlns:ns1"!==n&&0!==n.indexOf("ns1:")||Nt.removeAttribute(t,n)});for(var e=0,n=Nt.childNodesAsList(t);e0},e.prototype.tagName=function(t){return t.tagName},e.prototype.attributeMap=function(t){for(var e=new Map,n=t.attributes,r=0;r-1},e}(ut);xt.decorators=[{type:R.D}],xt.ctorParameters=function(){return[{type:void 0,decorators:[{type:R.H,args:[Y]}]},{type:Et,decorators:[{type:R.H,args:[Ot]}]}]};/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -var St=["alt","control","meta","shift"],Pt={alt:function(t){return t.altKey},control:function(t){return t.ctrlKey},meta:function(t){return t.metaKey},shift:function(t){return t.shiftKey}},At=function(t){function e(e){return t.call(this,e)||this}return j.a(e,t),e.prototype.supports=function(t){return null!=e.parseEventName(t)},e.prototype.addEventListener=function(t,n,o){var i=e.parseEventName(n),s=e.eventCallback(i.fullKey,o,this.manager.getZone());return this.manager.getZone().runOutsideAngular(function(){return r().onAndCancel(t,i.domEventName,s)})},e.parseEventName=function(t){var n=t.toLowerCase().split("."),r=n.shift();if(0===n.length||"keydown"!==r&&"keyup"!==r)return null;var o=e._normalizeKey(n.pop()),i="";if(St.forEach(function(t){var e=n.indexOf(t);e>-1&&(n.splice(e,1),i+=t+".")}),i+=o,0!=n.length||0===o.length)return null;var s={};return s.domEventName=r,s.fullKey=i,s},e.getEventFullKey=function(t){var e="",n=r().getEventKey(t);return n=n.toLowerCase()," "===n?n="space":"."===n&&(n="dot"),St.forEach(function(r){if(r!=n){(0,Pt[r])(t)&&(e+=r+".")}}),e+=n},e.eventCallback=function(t,n,r){return function(o){e.getEventFullKey(o)===t&&r.runGuarded(function(){return n(o)})}},e._normalizeKey=function(t){switch(t){case"esc":return"escape";default:return t}},e}(ut);At.decorators=[{type:R.D}],At.ctorParameters=function(){return[{type:void 0,decorators:[{type:R.H,args:[Y]}]}]};/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -var Tt=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:\/?#]*(?:[\/?#]|$))/gi,kt=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+\/]+=*$/i,Vt=null,Nt=null,jt=C("area,br,col,hr,img,wbr"),Mt=C("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),Rt=C("rp,rt"),Dt=O(Rt,Mt),It=O(Mt,C("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),Ft=O(Rt,C("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),Ht=O(jt,It,Ft,Dt),Lt=C("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),Ut=C("srcset"),Bt=C("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),Gt=O(Lt,Ut,Bt),qt=function(){function t(){this.sanitizedSomething=!1,this.buf=[]}return t.prototype.sanitizeChildren=function(t){for(var e=t.firstChild;e;)if(Nt.isElementNode(e)?this.startElement(e):Nt.isTextNode(e)?this.chars(Nt.nodeValue(e)):this.sanitizedSomething=!0,Nt.firstChild(e))e=Nt.firstChild(e);else for(;e;){Nt.isElementNode(e)&&this.endElement(e);var n=E(e,Nt.nextSibling(e));if(n){e=n;break}e=E(e,Nt.parentElement(e))}return this.buf.join("")},t.prototype.startElement=function(t){var e=this,n=Nt.nodeName(t).toLowerCase();if(!Ht.hasOwnProperty(n))return void(this.sanitizedSomething=!0);this.buf.push("<"),this.buf.push(n),Nt.attributeMap(t).forEach(function(t,n){var r=n.toLowerCase();if(!Gt.hasOwnProperty(r))return void(e.sanitizedSomething=!0);Lt[r]&&(t=b(t)),Ut[r]&&(t=_(t)),e.buf.push(" "),e.buf.push(n),e.buf.push('="'),e.buf.push(x(t)),e.buf.push('"')}),this.buf.push(">")},t.prototype.endElement=function(t){var e=Nt.nodeName(t).toLowerCase();Ht.hasOwnProperty(e)&&!jt.hasOwnProperty(e)&&(this.buf.push(""))},t.prototype.chars=function(t){this.buf.push(x(t))},t}(),zt=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Zt=/([^\#-~ |!])/g,Yt="[-,.\"'%_!# a-zA-Z0-9]+",Wt="(?:matrix|translate|scale|rotate|skew|perspective)(?:X|Y|3d)?",Qt="(?:rgb|hsl)a?",Kt="(?:repeating-)?(?:linear|radial)-gradient",Jt="(?:calc|attr)",$t="\\([-0-9.%, #a-zA-Z]+\\)",Xt=new RegExp("^("+Yt+"|(?:"+Wt+"|"+Qt+"|"+Kt+"|"+Jt+")"+$t+")$","g"),te=/^url\(([^)]+)\)$/,ee=function(){function t(){}return t.prototype.sanitize=function(t,e){},t.prototype.bypassSecurityTrustHtml=function(t){},t.prototype.bypassSecurityTrustStyle=function(t){},t.prototype.bypassSecurityTrustScript=function(t){},t.prototype.bypassSecurityTrustUrl=function(t){},t.prototype.bypassSecurityTrustResourceUrl=function(t){},t}(),ne=function(t){function e(e){var n=t.call(this)||this;return n._doc=e,n}return j.a(e,t),e.prototype.sanitize=function(t,e){if(null==e)return null;switch(t){case R.P.NONE:return e;case R.P.HTML:return e instanceof oe?e.changingThisBreaksApplicationSecurity:(this.checkNotSafeValue(e,"HTML"),P(this._doc,String(e)));case R.P.STYLE:return e instanceof ie?e.changingThisBreaksApplicationSecurity:(this.checkNotSafeValue(e,"Style"),T(e));case R.P.SCRIPT:if(e instanceof se)return e.changingThisBreaksApplicationSecurity;throw this.checkNotSafeValue(e,"Script"),new Error("unsafe value used in a script context");case R.P.URL:return e instanceof ue||e instanceof ae?e.changingThisBreaksApplicationSecurity:(this.checkNotSafeValue(e,"URL"),b(String(e)));case R.P.RESOURCE_URL:if(e instanceof ue)return e.changingThisBreaksApplicationSecurity;throw this.checkNotSafeValue(e,"ResourceURL"),new Error("unsafe value used in a resource URL context (see http://g.co/ng/security#xss)");default:throw new Error("Unexpected SecurityContext "+t+" (see http://g.co/ng/security#xss)")}},e.prototype.checkNotSafeValue=function(t,e){if(t instanceof re)throw new Error("Required a safe "+e+", got a "+t.getTypeName()+" (see http://g.co/ng/security#xss)")},e.prototype.bypassSecurityTrustHtml=function(t){return new oe(t)},e.prototype.bypassSecurityTrustStyle=function(t){return new ie(t)},e.prototype.bypassSecurityTrustScript=function(t){return new se(t)},e.prototype.bypassSecurityTrustUrl=function(t){return new ae(t)},e.prototype.bypassSecurityTrustResourceUrl=function(t){return new ue(t)},e}(ee);ne.decorators=[{type:R.D}],ne.ctorParameters=function(){return[{type:void 0,decorators:[{type:R.H,args:[Y]}]}]};var re=function(){function t(t){this.changingThisBreaksApplicationSecurity=t}return t.prototype.getTypeName=function(){},t.prototype.toString=function(){return"SafeValue must use [property]=binding: "+this.changingThisBreaksApplicationSecurity+" (see http://g.co/ng/security#xss)"},t}(),oe=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return j.a(e,t),e.prototype.getTypeName=function(){return"HTML"},e}(re),ie=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return j.a(e,t),e.prototype.getTypeName=function(){return"Style"},e}(re),se=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return j.a(e,t),e.prototype.getTypeName=function(){return"Script"},e}(re),ae=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return j.a(e,t),e.prototype.getTypeName=function(){return"URL"},e}(re),ue=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return j.a(e,t),e.prototype.getTypeName=function(){return"ResourceURL"},e}(re),ce=[{provide:R.Q,useValue:M.f},{provide:R.R,useValue:k,multi:!0},{provide:M.e,useClass:W},{provide:Y,useFactory:N,deps:[]}],le=[{provide:R.q,useExisting:ee},{provide:ee,useClass:ne}],pe=n.i(R.S)(R.T,"browser",ce),fe=function(){function t(t){if(t)throw new Error("BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module, import CommonModule instead.")}return t.withServerTransition=function(e){return{ngModule:t,providers:[{provide:R.k,useValue:e.appId},{provide:K,useExisting:R.k},J]}},t}();fe.decorators=[{type:R.E,args:[{providers:[le,{provide:R.u,useFactory:V,deps:[]},{provide:st,useClass:wt,multi:!0},{provide:st,useClass:At,multi:!0},{provide:st,useClass:xt,multi:!0},{provide:Ot,useClass:Et},vt,{provide:R.s,useExisting:vt},{provide:ct,useExisting:lt},lt,R.t,at,it,Q,X],exports:[M.d,R.C]}]}],fe.ctorParameters=function(){return[{type:fe,decorators:[{type:R.L},{type:R.U}]}]};/** - * @license - * Copyright Google Inc. All Rights Reserved. - * - * Use of this source code is governed by an MIT-style license that can be - * found in the LICENSE file at https://angular.io/license - */ -var he="undefined"!=typeof window&&window||{},de=function(){function t(t,e){this.msPerTick=t,this.numTicks=e}return t}();(function(){function t(t){this.appRef=t.injector.get(R.B)}t.prototype.timeChangeDetection=function(t){var e=t&&t.record,n="Change Detection",o=null!=he.console.profile;e&&o&&he.console.profile(n);for(var i=r().performanceNow(),s=0;s<5||r().performanceNow()-i<500;)this.appRef.tick(),s++;var a=r().performanceNow();e&&o&&he.console.profileEnd(n);var u=(a-i)/s;return he.console.log("ran "+s+" change detection cycles"),he.console.log(u.toFixed(2)+" ms per check"),new de(u,s)}})(),function(){function t(){}t.all=function(){return function(t){return!0}},t.css=function(t){return function(e){return null!=e.nativeElement&&r().elementMatches(e.nativeElement,t)}},t.directive=function(t){return function(e){return-1!==e.providerTokens.indexOf(t)}}}(),new R.F("4.2.6")},QqRK:function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},o=n("mmVS"),i=function(t){function e(e,n,r){t.call(this),this.parent=e,this.outerValue=n,this.outerIndex=r,this.index=0}return r(e,t),e.prototype._next=function(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this.index++,this)},e.prototype._error=function(t){this.parent.notifyError(t,this),this.unsubscribe()},e.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},e}(o.Subscriber);e.InnerSubscriber=i},RA5l:function(t,e,n){"use strict";var r=n("PutI"),o=n("C0+T");e.queue=new o.QueueScheduler(r.QueueAction)},RRVv:function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},o=n("rCTf"),i=function(t){function e(e,n){t.call(this),this.value=e,this.scheduler=n,this._isScalar=!0,n&&(this._isScalar=!1)}return r(e,t),e.create=function(t,n){return new e(t,n)},e.dispatch=function(t){var e=t.done,n=t.value,r=t.subscriber;if(e)return void r.complete();r.next(n),r.closed||(t.done=!0,this.schedule(t))},e.prototype._subscribe=function(t){var n=this.value,r=this.scheduler;if(r)return r.schedule(e.dispatch,0,{done:!1,value:n,subscriber:t});t.next(n),t.closed||t.complete()},e}(o.Observable);e.ScalarObservable=i},RYQg:function(t,e,n){"use strict";function r(){for(var t=[],e=0;ethis.index},t.prototype.hasCompleted=function(){return this.array.length===this.index},t}(),v=function(t){function e(e,n,r){t.call(this,e),this.parent=n,this.observable=r,this.stillUnsubscribed=!0,this.buffer=[],this.isComplete=!1}return i(e,t),e.prototype[p.iterator]=function(){return this},e.prototype.next=function(){var t=this.buffer;return 0===t.length&&this.isComplete?{value:null,done:!0}:{value:t.shift(),done:!1}},e.prototype.hasValue=function(){return this.buffer.length>0},e.prototype.hasCompleted=function(){return 0===this.buffer.length&&this.isComplete},e.prototype.notifyComplete=function(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()},e.prototype.notifyNext=function(t,e,n,r,o){this.buffer.push(e),this.parent.checkIterators()},e.prototype.subscribe=function(t,e){return l.subscribeToResult(this,this.observable,this,e)},e}(c.OuterSubscriber)},SKH6:function(t,e,n){"use strict";function r(t){return"function"==typeof t}e.isFunction=r},T3fU:function(t,e,n){"use strict";var r=n("rCTf"),o=n("q+cp");r.Observable.prototype.takeUntil=o.takeUntil},TToO:function(t,e,n){"use strict";function r(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}e.a=r;/*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. -Licensed under the Apache License, Version 2.0 (the "License"); you may not use -this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - -THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - -See the Apache Version 2.0 License for specific language governing permissions -and limitations under the License. -***************************************************************************** */ -var o=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])};Object.assign},VOfZ:function(t,e,n){"use strict";(function(t){var n="undefined"!=typeof window&&window,r="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,o=void 0!==t&&t,i=n||o||r;e.root=i,function(){if(!i)throw new Error("RxJS could not find any global context (window, self, global)")}()}).call(e,n("DuR2"))},WhVc:function(t,e,n){"use strict";e.errorObject={e:{}}},XO5T:function(t,e,n){"use strict";function r(t,e,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),"number"==typeof e&&(n=e,e=null),this.lift(new a(t,e,n))}var o=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=n("CURp"),s=n("wAkD");e.mergeMap=r;var a=function(){function t(t,e,n){void 0===n&&(n=Number.POSITIVE_INFINITY),this.project=t,this.resultSelector=e,this.concurrent=n}return t.prototype.call=function(t,e){return e.subscribe(new u(t,this.project,this.resultSelector,this.concurrent))},t}();e.MergeMapOperator=a;var u=function(t){function e(e,n,r,o){void 0===o&&(o=Number.POSITIVE_INFINITY),t.call(this,e),this.project=n,this.resultSelector=r,this.concurrent=o,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}return o(e,t),e.prototype._next=function(t){this.active0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},e}(s.OuterSubscriber);e.MergeMapSubscriber=u},Xajo:function(t,e,n){"use strict";e.isArray=Array.isArray||function(t){return t&&"number"==typeof t.length}},Yh8Q:function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},o=n("rCTf"),i=n("RRVv"),s=n("jBEF"),a=n("fWbP"),u=function(t){function e(e,n){t.call(this),this.array=e,this.scheduler=n,n||1!==e.length||(this._isScalar=!0,this.value=e[0])}return r(e,t),e.create=function(t,n){return new e(t,n)},e.of=function(){for(var t=[],n=0;n1?new e(t,r):1===o?new i.ScalarObservable(t[0],r):new s.EmptyObservable(r)},e.dispatch=function(t){var e=t.array,n=t.index,r=t.count,o=t.subscriber;if(n>=r)return void o.complete();o.next(e[n]),o.closed||(t.index=n+1,this.schedule(t))},e.prototype._subscribe=function(t){var n=this.array,r=n.length,o=this.scheduler;if(o)return o.schedule(e.dispatch,0,{array:n,index:0,count:r,subscriber:t});for(var i=0;i0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},e}(i.OuterSubscriber);e.MergeAllSubscriber=u},cdmN:function(t,e,n){"use strict";function r(t){var e=t.Symbol;if("function"==typeof e)return e.iterator||(e.iterator=e("iterator polyfill")),e.iterator;var n=t.Set;if(n&&"function"==typeof(new n)["@@iterator"])return"@@iterator";var r=t.Map;if(r)for(var o=Object.getOwnPropertyNames(r.prototype),i=0;i1&&"number"==typeof t[t.length-1]&&(n=t.pop())):"number"==typeof o&&(n=t.pop()),null===r&&1===t.length&&t[0]instanceof i.Observable?t[0]:new s.ArrayObservable(t,r).lift(new a.MergeAllOperator(n))}var i=n("rCTf"),s=n("Yh8Q"),a=n("cbuX"),u=n("fWbP");e.merge=r,e.mergeStatic=o},lHsB:function(t,e,n){"use strict";function r(t,e,n){if(t){if(t instanceof o.Subscriber)return t;if(t[i.rxSubscriber])return t[i.rxSubscriber]()}return t||e||n?new o.Subscriber(t,e,n):new o.Subscriber(s.empty)}var o=n("mmVS"),i=n("r8ZY"),s=n("yrou");e.toSubscriber=r},"lh/Z":function(t,e,n){"use strict";var r=n("rCTf"),o=n("3eju");r.Observable.webSocket=o.webSocket},mbVC:function(t,e,n){"use strict";function r(t){var e,n=t.Symbol;return"function"==typeof n?n.observable?e=n.observable:(e=n("observable"),n.observable=e):e="@@observable",e}var o=n("VOfZ");e.getSymbolObservable=r,e.observable=r(o.root),e.$$observable=e.observable},mmVS:function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},o=n("SKH6"),i=n("B00U"),s=n("yrou"),a=n("r8ZY"),u=function(t){function e(n,r,o){switch(t.call(this),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=s.empty;break;case 1:if(!n){this.destination=s.empty;break}if("object"==typeof n){n instanceof e?(this.destination=n,this.destination.add(this)):(this.syncErrorThrowable=!0,this.destination=new c(this,n));break}default:this.syncErrorThrowable=!0,this.destination=new c(this,n,r,o)}}return r(e,t),e.prototype[a.rxSubscriber]=function(){return this},e.create=function(t,n,r){var o=new e(t,n,r);return o.syncErrorThrowable=!1,o},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this))},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},e.prototype._unsubscribeAndRecycle=function(){var t=this,e=t._parent,n=t._parents;return this._parent=null,this._parents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parent=e,this._parents=n,this},e}(i.Subscription);e.Subscriber=u;var c=function(t){function e(e,n,r,i){t.call(this),this._parentSubscriber=e;var a,u=this;o.isFunction(n)?a=n:n&&(a=n.next,r=n.error,i=n.complete,n!==s.empty&&(u=Object.create(n),o.isFunction(u.unsubscribe)&&this.add(u.unsubscribe.bind(u)),u.unsubscribe=this.unsubscribe.bind(this))),this._context=u,this._next=a,this._error=r,this._complete=i}return r(e,t),e.prototype.next=function(t){if(!this.isStopped&&this._next){var e=this._parentSubscriber;e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}},e.prototype.error=function(t){if(!this.isStopped){var e=this._parentSubscriber;if(this._error)e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else{if(!e.syncErrorThrowable)throw this.unsubscribe(),t;e.syncErrorValue=t,e.syncErrorThrown=!0,this.unsubscribe()}}},e.prototype.complete=function(){var t=this;if(!this.isStopped){var e=this._parentSubscriber;if(this._complete){var n=function(){return t._complete.call(t._context)};e.syncErrorThrowable?(this.__tryOrSetError(e,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},e.prototype.__tryOrUnsub=function(t,e){try{t.call(this._context,e)}catch(t){throw this.unsubscribe(),t}},e.prototype.__tryOrSetError=function(t,e,n){try{e.call(this._context,n)}catch(e){return t.syncErrorValue=e,t.syncErrorThrown=!0,!0}return!1},e.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},e}(u)},"q+cp":function(t,e,n){"use strict";function r(t){return this.lift(new a(t))}var o=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=n("wAkD"),s=n("CURp");e.takeUntil=r;var a=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){return e.subscribe(new u(t,this.notifier))},t}(),u=function(t){function e(e,n){t.call(this,e),this.notifier=n,this.add(s.subscribeToResult(this,n))}return o(e,t),e.prototype.notifyNext=function(t,e,n,r,o){this.complete()},e.prototype.notifyComplete=function(){},e}(i.OuterSubscriber)},r8ZY:function(t,e,n){"use strict";var r=n("VOfZ"),o=r.root.Symbol;e.rxSubscriber="function"==typeof o&&"function"==typeof o.for?o.for("rxSubscriber"):"@@rxSubscriber",e.$$rxSubscriber=e.rxSubscriber},rCTf:function(t,e,n){"use strict";var r=n("VOfZ"),o=n("lHsB"),i=n("mbVC"),s=function(){function t(t){this._isScalar=!1,t&&(this._subscribe=t)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(t,e,n){var r=this.operator,i=o.toSubscriber(t,e,n);if(r?r.call(i,this.source):i.add(this.source?this._subscribe(i):this._trySubscribe(i)),i.syncErrorThrowable&&(i.syncErrorThrowable=!1,i.syncErrorThrown))throw i.syncErrorValue;return i},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.syncErrorThrown=!0,t.syncErrorValue=e,t.error(e)}},t.prototype.forEach=function(t,e){var n=this;if(e||(r.root.Rx&&r.root.Rx.config&&r.root.Rx.config.Promise?e=r.root.Rx.config.Promise:r.root.Promise&&(e=r.root.Promise)),!e)throw new Error("no Promise impl found");return new e(function(e,r){var o;o=n.subscribe(function(e){if(o)try{t(e)}catch(t){r(t),o.unsubscribe()}else t(e)},r,e)})},t.prototype._subscribe=function(t){return this.source.subscribe(t)},t.prototype[i.observable]=function(){return this},t.create=function(e){return new t(e)},t}();e.Observable=s},sIYO:function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},o=n("EEr4"),i=n("rCTf"),s=n("mmVS"),a=n("B00U"),u=function(t){function e(e,n){t.call(this),this.source=e,this.subjectFactory=n,this._refCount=0,this._isComplete=!1}return r(e,t),e.prototype._subscribe=function(t){return this.getSubject().subscribe(t)},e.prototype.getSubject=function(){var t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject},e.prototype.connect=function(){var t=this._connection;return t||(this._isComplete=!1,t=this._connection=new a.Subscription,t.add(this.source.subscribe(new l(this.getSubject(),this))),t.closed?(this._connection=null,t=a.Subscription.EMPTY):this._connection=t),t},e.prototype.refCount=function(){return this.lift(new p(this))},e}(i.Observable);e.ConnectableObservable=u;var c=u.prototype;e.connectableObservableDescriptor={operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:c._subscribe},_isComplete:{value:c._isComplete,writable:!0},getSubject:{value:c.getSubject},connect:{value:c.connect},refCount:{value:c.refCount}};var l=function(t){function e(e,n){t.call(this,e),this.connectable=n}return r(e,t),e.prototype._error=function(e){this._unsubscribe(),t.prototype._error.call(this,e)},e.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._connection;t._refCount=0,t._subject=null,t._connection=null,e&&e.unsubscribe()}},e}(o.SubjectSubscriber),p=function(){function t(t){this.connectable=t}return t.prototype.call=function(t,e){var n=this.connectable;n._refCount++;var r=new f(t,n),o=e.subscribe(r);return r.closed||(r.connection=n.connect()),o},t}(),f=function(t){function e(e,n){t.call(this,e),this.connectable=n}return r(e,t),e.prototype._unsubscribe=function(){var t=this.connectable;if(!t)return void(this.connection=null);this.connectable=null;var e=t._refCount;if(e<=0)return void(this.connection=null);if(t._refCount=e-1,e>1)return void(this.connection=null);var n=this.connection,r=t._connection;this.connection=null,!r||n&&r!==n||r.unsubscribe()},e}(s.Subscriber)},t2qv:function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},o=n("rCTf"),i=n("jBEF"),s=n("Xajo"),a=n("CURp"),u=n("wAkD"),c=function(t){function e(e,n){t.call(this),this.sources=e,this.resultSelector=n}return r(e,t),e.create=function(){for(var t=[],n=0;n +
  • + ⏰ I'm a date bot — ask me something about date! +
  • { - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ - AppComponent - ], - }).compileComponents(); - })); - - it('should create the app', async(() => { - const fixture = TestBed.createComponent(AppComponent); - const app = fixture.debugElement.componentInstance; - expect(app).toBeTruthy(); - })); - - it(`should have as title 'app works!'`, async(() => { - const fixture = TestBed.createComponent(AppComponent); - const app = fixture.debugElement.componentInstance; - expect(app.title).toEqual('app works!'); - })); - - it('should render title in a h1 tag', async(() => { - const fixture = TestBed.createComponent(AppComponent); - fixture.detectChanges(); - const compiled = fixture.debugElement.nativeElement; - expect(compiled.querySelector('h1').textContent).toContain('app works!'); - })); -}); diff --git a/client/src/app/app.component.ts b/client/src/app/app.component.ts index 26be792..5f1d0ce 100644 --- a/client/src/app/app.component.ts +++ b/client/src/app/app.component.ts @@ -7,30 +7,37 @@ import 'rxjs/add/operator/take'; import 'rxjs/add/operator/filter'; import 'rxjs/add/operator/retryWhen'; import 'rxjs/add/operator/mergeMap'; +import 'rxjs/add/operator/delayWhen'; import 'rxjs/add/observable/zip'; import 'rxjs/add/observable/range'; import 'rxjs/add/observable/timer'; +import 'rxjs/add/observable/interval'; import 'rxjs/add/observable/dom/webSocket'; +import * as moment from 'moment'; +import 'moment-timezone'; + @Component({ - selector: 'app-root', - templateUrl: './app.component.html', - styleUrls: ['./app.component.css'] + selector: 'body', + templateUrl: './app.component.html' }) export class AppComponent implements OnInit, OnDestroy { private ngUnsubscribe$: Subject = new Subject(); private ws$: Subject; private wsSessionId: string; private wsUrl: string = environment.wsUrl; + private timezone: string = moment.tz.guess(); @ViewChild('chatMsgs') private chatScrollContainer: ElementRef; userMsg: string = ''; msgs: Array = []; botIsTyping: boolean = false; + constructor(private bodyEl: ElementRef) { } + ngOnInit() { // - // The websocket Observable + // The WebSocket Observable this.ws$ = Observable.webSocket(this.wsUrl); // @@ -47,19 +54,23 @@ export class AppComponent implements OnInit, OnDestroy { this.ws$.takeUntil(this.ngUnsubscribe$) .filter(r => r.type === 'bot') .retryWhen(err$ => - Observable.zip(err$, Observable.range(1, 3), (e, n) => n) - // .do(n => console.log('retrying ' + n)) + Observable.zip(err$, Observable.range(1, 10), (e, n) => n) .mergeMap(retryCount => Observable.timer(1000 * retryCount)) ) + .delayWhen(input => Observable.interval(100 + input.msg.length * 10)) .subscribe( - (msg) => this.pushMsg(msg), - (err) => console.log(err), - () => console.log('complete') + (msg) => this.pushMsg(msg) ); } onSubmit() { - const input = { type: 'user', sessionId: this.wsSessionId, msg: this.userMsg }; + const input = { + type: 'user', + sessionId: this.wsSessionId, + msg: this.userMsg, + tz: this.timezone + }; + this.ws$.next(JSON.stringify(input)); this.pushMsg(input, true); this.botIsTyping = true; @@ -75,7 +86,7 @@ export class AppComponent implements OnInit, OnDestroy { private scrollChatToBottom() { setTimeout(() => { try { - this.chatScrollContainer.nativeElement.scrollTop = this.chatScrollContainer.nativeElement.scrollHeight; + this.bodyEl.nativeElement.scrollTop = this.bodyEl.nativeElement.scrollHeight; } catch(err) { } }, 0); } diff --git a/client/src/styles.css b/client/src/styles.css index e571834..704cda3 100644 --- a/client/src/styles.css +++ b/client/src/styles.css @@ -1,39 +1,43 @@ -/* You can add global styles to this file, and also import other style files */ +html { + height: 100%; +} body { margin: 0; - padding: 0; font: 14px arial, sans-serif; + height: 100%; } .msgs { list-style: none; margin: 0; - padding: 0; - position: absolute; - top: 0; - left: 0; width: 100%; - height: calc(100% - 60px); - overflow-y: scroll; + min-height: calc(100% - 80px); + padding: 0 0 80px; + + display: flex; + -webkit-flex-direction: column; + flex-direction: column; + + align-items: flex-end; + justify-content: flex-end; } .msgs li { - display: inline-block; - float: left; margin: 15px; padding: 15px; background: #efefef; border-radius: 5px; - clear: both; font-weight: 300; max-width:75%; + width: auto; line-height: 18px; + align-self: flex-start; } .msgs li.bot { - float: right; background: #6666fe; color: #fff; + align-self: flex-end; } .msgs li.bot span { @@ -47,16 +51,6 @@ body { animation-direction: alternate; } -/*.msgs li.bot span:after { - content: ''; - display: block; - position: absolute; - width: 3px; - height: 3px; - background: #fff; - border-radius: 5px; -}*/ - .msgs li.bot span:nth-child(2) { animation-delay: .1s } @@ -65,7 +59,7 @@ body { } .chat-input { - position: absolute; + position: fixed; bottom: 0; left: 0; width: 100%; @@ -82,11 +76,12 @@ body { padding: 0 10px; box-sizing: border-box; border-top: 1px solid lightgray; + border-radius: 0; outline: 0; } .chat-input-text:focus { - box-shadow: 0 -1px 3px rgba(0, 0, 0, .1) + box-shadow: 0 0 7px rgba(0, 0, 0, .15) } @keyframes typing { diff --git a/client/yarn.lock b/client/yarn.lock index 1018ab7..9d9a232 100644 --- a/client/yarn.lock +++ b/client/yarn.lock @@ -145,6 +145,12 @@ version "2.5.38" resolved "https://registry.yarnpkg.com/@types/jasmine/-/jasmine-2.5.38.tgz#a4379124c4921d4e21de54ec74669c9e9b356717" +"@types/moment-timezone@^0.2.34": + version "0.2.34" + resolved "https://registry.yarnpkg.com/@types/moment-timezone/-/moment-timezone-0.2.34.tgz#948e0aff82742a31dd63714d1aac9616bc375053" + dependencies: + moment ">=2.14.0" + "@types/node@^6.0.46", "@types/node@~6.0.60": version "6.0.79" resolved "https://registry.yarnpkg.com/@types/node/-/node-6.0.79.tgz#5efe7d4a6d8c453c7e9eaf55d931f4a22fac5169" @@ -3127,6 +3133,16 @@ mkdirp@0.5.x, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkd dependencies: minimist "0.0.8" +moment-timezone@^0.5.13: + version "0.5.13" + resolved "https://registry.yarnpkg.com/moment-timezone/-/moment-timezone-0.5.13.tgz#99ce5c7d827262eb0f1f702044177f60745d7b90" + dependencies: + moment ">= 2.9.0" + +"moment@>= 2.9.0", moment@>=2.14.0, moment@^2.18.1: + version "2.18.1" + resolved "https://registry.yarnpkg.com/moment/-/moment-2.18.1.tgz#c36193dd3ce1c2eed2adb7c802dbbc77a81b1c0f" + ms@0.7.1: version "0.7.1" resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.1.tgz#9cd13c03adbff25b65effde7ce864ee952017098" @@ -3328,11 +3344,11 @@ oauth-sign@~0.8.1: version "0.8.2" resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" -object-assign@4.1.0, object-assign@^4.0.1: +object-assign@4.1.0, object-assign@^4.0.1, object-assign@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.0.tgz#7a3b3d0e98063d43f4c03f2e8ae6cd51a86883a0" -object-assign@^4.1.0, object-assign@^4.1.1: +object-assign@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" @@ -5359,20 +5375,13 @@ write-file-atomic@^2.0.0: imurmurhash "^0.1.4" slide "^1.1.5" -ws@1.1.1: +ws@1.1.1, ws@^1.0.1: version "1.1.1" resolved "https://registry.yarnpkg.com/ws/-/ws-1.1.1.tgz#082ddb6c641e85d4bb451f03d52f06eabdb1f018" dependencies: options ">=0.0.5" ultron "1.0.x" -ws@^1.0.1: - version "1.1.4" - resolved "https://registry.yarnpkg.com/ws/-/ws-1.1.4.tgz#57f40d036832e5f5055662a397c4de76ed66bf61" - dependencies: - options ">=0.0.5" - ultron "1.0.x" - wtf-8@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/wtf-8/-/wtf-8-1.0.0.tgz#392d8ba2d0f1c34d1ee2d630f15d0efb68e1048a" diff --git a/data/entities/dayofweek.json b/data/entities/dayofweek.json new file mode 100755 index 0000000..ff1ba6f --- /dev/null +++ b/data/entities/dayofweek.json @@ -0,0 +1,58 @@ +{ + "id": "7992998d-fb7d-49ec-b608-20276f5cff52", + "name": "dayofweek", + "isOverridable": true, + "entries": [ + { + "value": "Monday", + "synonyms": [ + "Monday", + "Mon" + ] + }, + { + "value": "Tuesday", + "synonyms": [ + "Tuesday", + "Tue" + ] + }, + { + "value": "Wednesday", + "synonyms": [ + "Wednesday", + "Wed" + ] + }, + { + "value": "Thursday", + "synonyms": [ + "Thursday", + "Thu" + ] + }, + { + "value": "Friday", + "synonyms": [ + "Friday", + "Fri" + ] + }, + { + "value": "Saturday", + "synonyms": [ + "Saturday", + "Sat" + ] + }, + { + "value": "Sunday", + "synonyms": [ + "Sunday", + "Sun" + ] + } + ], + "isEnum": false, + "automatedExpansion": false +} \ No newline at end of file diff --git a/data/entities/holiday.json b/data/entities/holiday.json new file mode 100755 index 0000000..f3bb508 --- /dev/null +++ b/data/entities/holiday.json @@ -0,0 +1,324 @@ +{ + "id": "c6a0f03a-ec18-4d78-8876-99b3edcff2c5", + "name": "holiday", + "isOverridable": true, + "entries": [ + { + "value": "Thanksgiving day", + "synonyms": [ + "Thanksgiving", + "Thanksgiving day" + ] + }, + { + "value": "Halloween", + "synonyms": [ + "Halloween" + ] + }, + { + "value": "Columbus Day", + "synonyms": [ + "Columbus day", + "Columbus" + ] + }, + { + "value": "Black Friday", + "synonyms": [ + "Black Friday" + ] + }, + { + "value": "New Year\u0027s Eve", + "synonyms": [ + "New Years Eve", + "New Year\u0027s Eve", + "New Year s Eve", + "New Year Eve" + ] + }, + { + "value": "Easter", + "synonyms": [ + "Easter", + "Easter Sunday" + ] + }, + { + "value": "New Year", + "synonyms": [ + "New Year" + ] + }, + { + "value": "Christmas Eve", + "synonyms": [ + "christmas eve" + ] + }, + { + "value": "Christmas", + "synonyms": [ + "Christmas", + "Christmases", + "X mas", + "x-mas", + "Xmas", + "Merry Christmas", + "Merry X mas", + "Merry x-mas", + "Merry Xmas" + ] + }, + { + "value": "New Year", + "synonyms": [ + "New Years", + "New Year s", + "New Year\u0027s", + "New Year" + ] + }, + { + "value": "Valentine\u0027s Day", + "synonyms": [ + "Valentine day", + "Valentine s day", + "Valentines day", + "Valentine\u0027s day", + "Saint Valentine", + "Saint Valentine day", + "Saint Valentine s day", + "Saint Valentine\u0027s day", + "Saint Valentines day", + "St Valentine s day", + "St Valentine\u0027s day", + "St Valentines day", + "Valentine" + ] + }, + { + "value": "Martin Luther King", + "synonyms": [ + "Martin Luther King Birthday", + "Martin Luther King s Birthday", + "Martin Luther King" + ] + }, + { + "value": "Washington\u0027s Birthday", + "synonyms": [ + "Washington s Birthday", + "Washington s Birthday day", + "Presidents Day", + "President s Day", + "Washington\u0027s Birthday" + ] + }, + { + "value": "Memorial Day", + "synonyms": [ + "Memorial Day" + ] + }, + { + "value": "Independence Day", + "synonyms": [ + "Independence Day" + ] + }, + { + "value": "Labor Day", + "synonyms": [ + "Labor Day" + ] + }, + { + "value": "Veterans Day", + "synonyms": [ + "Veteran\u0027s Day", + "Veteran s Day", + "Veteran Day", + "Day of Veterans", + "Day of Veteran\u0027s", + "Day of Veteran s", + "Veterans Day" + ] + }, + { + "value": "Saint Patrick\u0027s Day", + "synonyms": [ + "Saint s Patrick s Day", + "Saint s Patrick Day", + "Saint Patrick s Day", + "Saint Patrick Day", + "St. Patrick s Day", + "St. Patrick Day", + "St Patrick s Day", + "St Patrick Day", + "Patrick s Day" + ] + }, + { + "value": "Women day", + "synonyms": [ + "Women s day", + "day of Woomen", + "Woomen day" + ] + }, + { + "value": "Fools\u0027 Day", + "synonyms": [ + "Fools Day", + "Fool s Day", + "Fool\u0027s Day", + "April Fools\u0027 Day", + "April Fools Day", + "April Fool s Day", + "April Fool\u0027s Day", + "Fools\u0027 Day" + ] + }, + { + "value": "Earth Day", + "synonyms": [ + "Earth Day" + ] + }, + { + "value": "Arbor Day", + "synonyms": [ + "Arbor Day" + ] + }, + { + "value": "May Day", + "synonyms": [ + "May Day" + ] + }, + { + "value": "Cinco de Mayo", + "synonyms": [ + "Cinco de Mayo" + ] + }, + { + "value": "Mother\u0027s Day", + "synonyms": [ + "Mother s Day", + "Mother\u0027s Day" + ] + }, + { + "value": "Children\u0027s Day", + "synonyms": [ + "Children s Day", + "Children\u0027s Day" + ] + }, + { + "value": "Flag Day", + "synonyms": [ + "Flag Day" + ] + }, + { + "value": "Helen Keller Day", + "synonyms": [ + "Helen Keller Day" + ] + }, + { + "value": "Father\u0027s Day", + "synonyms": [ + "Father s Day", + "Father\u0027s Day" + ] + }, + { + "value": "Equality Day", + "synonyms": [ + "Women\u0027s Equality Day", + "Women s Equality Day", + "Equality Day" + ] + }, + { + "value": "Patriot Day", + "synonyms": [ + "Patriot Day" + ] + }, + { + "value": "Citizenship Day", + "synonyms": [ + "Constitution Day", + "Citizenship Day" + ] + }, + { + "value": "German-American Day", + "synonyms": [ + "German American Day", + "German-American Day" + ] + }, + { + "value": "Leif Erikson Day", + "synonyms": [ + "Leif Erikson Day" + ] + }, + { + "value": "Election Day", + "synonyms": [ + "Election Day" + ] + }, + { + "value": "Pearl Harbor Day", + "synonyms": [ + "Pearl Harbor Remembrance Day", + "Pearl Harbor Day", + "Pearl Harbor Day" + ] + }, + { + "value": "Vernal Equinox", + "synonyms": [ + "spring equinox", + "vernal equinox" + ] + }, + { + "value": "Autumnal Equinox", + "synonyms": [ + "autumn equinox", + "autumnal equinox" + ] + }, + { + "value": "Winter Solstice", + "synonyms": [ + "winter solstice" + ] + }, + { + "value": "Summer Solstice", + "synonyms": [ + "summer solstice" + ] + }, + { + "value": "Labour Day", + "synonyms": [ + "Labour Day" + ] + } + ], + "isEnum": false, + "automatedExpansion": false +} \ No newline at end of file diff --git a/data/entities/time-zone.json b/data/entities/time-zone.json new file mode 100755 index 0000000..f4e4f9b --- /dev/null +++ b/data/entities/time-zone.json @@ -0,0 +1,1233 @@ +{ + "id": "e9c22258-c888-488e-9579-5f8c59731a59", + "name": "time-zone", + "isOverridable": true, + "entries": [ + { + "value": "ACDT", + "synonyms": [ + "ACDT" + ] + }, + { + "value": "ACST", + "synonyms": [ + "ACST" + ] + }, + { + "value": "ACT", + "synonyms": [ + "ACT" + ] + }, + { + "value": "ACT", + "synonyms": [ + "ACT" + ] + }, + { + "value": "ADT", + "synonyms": [ + "ADT" + ] + }, + { + "value": "AEDT", + "synonyms": [ + "AEDT" + ] + }, + { + "value": "AEST", + "synonyms": [ + "AEST" + ] + }, + { + "value": "AFT", + "synonyms": [ + "AFT" + ] + }, + { + "value": "AKDT", + "synonyms": [ + "AKDT" + ] + }, + { + "value": "AKST", + "synonyms": [ + "AKST" + ] + }, + { + "value": "AMST", + "synonyms": [ + "AMST" + ] + }, + { + "value": "AMT", + "synonyms": [ + "AMT" + ] + }, + { + "value": "AMT", + "synonyms": [ + "AMT" + ] + }, + { + "value": "ART", + "synonyms": [ + "ART" + ] + }, + { + "value": "AST", + "synonyms": [ + "AST" + ] + }, + { + "value": "AST", + "synonyms": [ + "AST" + ] + }, + { + "value": "AWDT", + "synonyms": [ + "AWDT" + ] + }, + { + "value": "AWST", + "synonyms": [ + "AWST" + ] + }, + { + "value": "AZOST", + "synonyms": [ + "AZOST" + ] + }, + { + "value": "AZT", + "synonyms": [ + "AZT" + ] + }, + { + "value": "BDT", + "synonyms": [ + "BDT" + ] + }, + { + "value": "BDT", + "synonyms": [ + "BDT" + ] + }, + { + "value": "BIOT", + "synonyms": [ + "BIOT" + ] + }, + { + "value": "BIT", + "synonyms": [ + "BIT" + ] + }, + { + "value": "BOT", + "synonyms": [ + "BOT" + ] + }, + { + "value": "BRST", + "synonyms": [ + "BRST" + ] + }, + { + "value": "BRT", + "synonyms": [ + "BRT" + ] + }, + { + "value": "BST", + "synonyms": [ + "BST" + ] + }, + { + "value": "BST", + "synonyms": [ + "BST" + ] + }, + { + "value": "BST", + "synonyms": [ + "BST" + ] + }, + { + "value": "BTT", + "synonyms": [ + "BTT" + ] + }, + { + "value": "CAT", + "synonyms": [ + "CAT" + ] + }, + { + "value": "CCT", + "synonyms": [ + "CCT" + ] + }, + { + "value": "CDT", + "synonyms": [ + "CDT" + ] + }, + { + "value": "CDT", + "synonyms": [ + "CDT" + ] + }, + { + "value": "CEDT", + "synonyms": [ + "CEDT" + ] + }, + { + "value": "CEST", + "synonyms": [ + "CEST" + ] + }, + { + "value": "CET", + "synonyms": [ + "CET" + ] + }, + { + "value": "CHADT", + "synonyms": [ + "CHADT" + ] + }, + { + "value": "CHAST", + "synonyms": [ + "CHAST" + ] + }, + { + "value": "CHOT", + "synonyms": [ + "CHOT" + ] + }, + { + "value": "ChST", + "synonyms": [ + "ChST" + ] + }, + { + "value": "CHUT", + "synonyms": [ + "CHUT" + ] + }, + { + "value": "CIST", + "synonyms": [ + "CIST" + ] + }, + { + "value": "CIT", + "synonyms": [ + "CIT" + ] + }, + { + "value": "CKT", + "synonyms": [ + "CKT" + ] + }, + { + "value": "CLST", + "synonyms": [ + "CLST" + ] + }, + { + "value": "CLT", + "synonyms": [ + "CLT" + ] + }, + { + "value": "COST", + "synonyms": [ + "COST" + ] + }, + { + "value": "COT", + "synonyms": [ + "COT" + ] + }, + { + "value": "CST", + "synonyms": [ + "CST" + ] + }, + { + "value": "CST", + "synonyms": [ + "CST" + ] + }, + { + "value": "CST", + "synonyms": [ + "CST" + ] + }, + { + "value": "CST", + "synonyms": [ + "CST" + ] + }, + { + "value": "CST", + "synonyms": [ + "CST" + ] + }, + { + "value": "CT", + "synonyms": [ + "CT" + ] + }, + { + "value": "CVT", + "synonyms": [ + "CVT" + ] + }, + { + "value": "CWST", + "synonyms": [ + "CWST" + ] + }, + { + "value": "CXT", + "synonyms": [ + "CXT" + ] + }, + { + "value": "DAVT", + "synonyms": [ + "DAVT" + ] + }, + { + "value": "DDUT", + "synonyms": [ + "DDUT" + ] + }, + { + "value": "DFT", + "synonyms": [ + "DFT" + ] + }, + { + "value": "EASST", + "synonyms": [ + "EASST" + ] + }, + { + "value": "EAST", + "synonyms": [ + "EAST" + ] + }, + { + "value": "EAT", + "synonyms": [ + "EAT" + ] + }, + { + "value": "ECT", + "synonyms": [ + "ECT" + ] + }, + { + "value": "ECT", + "synonyms": [ + "ECT" + ] + }, + { + "value": "EDT", + "synonyms": [ + "EDT" + ] + }, + { + "value": "EEDT", + "synonyms": [ + "EEDT" + ] + }, + { + "value": "EEST", + "synonyms": [ + "EEST" + ] + }, + { + "value": "EET", + "synonyms": [ + "EET" + ] + }, + { + "value": "EGST", + "synonyms": [ + "EGST" + ] + }, + { + "value": "EGT", + "synonyms": [ + "EGT" + ] + }, + { + "value": "EIT", + "synonyms": [ + "EIT" + ] + }, + { + "value": "EST", + "synonyms": [ + "EST" + ] + }, + { + "value": "EST", + "synonyms": [ + "EST" + ] + }, + { + "value": "FET", + "synonyms": [ + "FET" + ] + }, + { + "value": "FJT", + "synonyms": [ + "FJT" + ] + }, + { + "value": "FKST", + "synonyms": [ + "FKST" + ] + }, + { + "value": "FKST", + "synonyms": [ + "FKST" + ] + }, + { + "value": "FKT", + "synonyms": [ + "FKT" + ] + }, + { + "value": "FNT", + "synonyms": [ + "FNT" + ] + }, + { + "value": "GALT", + "synonyms": [ + "GALT" + ] + }, + { + "value": "GAMT", + "synonyms": [ + "GAMT" + ] + }, + { + "value": "GET", + "synonyms": [ + "GET" + ] + }, + { + "value": "GFT", + "synonyms": [ + "GFT" + ] + }, + { + "value": "GILT", + "synonyms": [ + "GILT" + ] + }, + { + "value": "GIT", + "synonyms": [ + "GIT" + ] + }, + { + "value": "GMT", + "synonyms": [ + "GMT" + ] + }, + { + "value": "GST", + "synonyms": [ + "GST" + ] + }, + { + "value": "GST", + "synonyms": [ + "GST" + ] + }, + { + "value": "GYT", + "synonyms": [ + "GYT" + ] + }, + { + "value": "HADT", + "synonyms": [ + "HADT" + ] + }, + { + "value": "HAEC", + "synonyms": [ + "HAEC" + ] + }, + { + "value": "HAST", + "synonyms": [ + "HAST" + ] + }, + { + "value": "HKT", + "synonyms": [ + "HKT" + ] + }, + { + "value": "HMT", + "synonyms": [ + "HMT" + ] + }, + { + "value": "HOVT", + "synonyms": [ + "HOVT" + ] + }, + { + "value": "HST", + "synonyms": [ + "HST" + ] + }, + { + "value": "IBST", + "synonyms": [ + "IBST" + ] + }, + { + "value": "ICT", + "synonyms": [ + "ICT" + ] + }, + { + "value": "IDT", + "synonyms": [ + "IDT" + ] + }, + { + "value": "IOT", + "synonyms": [ + "IOT" + ] + }, + { + "value": "IRDT", + "synonyms": [ + "IRDT" + ] + }, + { + "value": "IRKT", + "synonyms": [ + "IRKT" + ] + }, + { + "value": "IRST", + "synonyms": [ + "IRST" + ] + }, + { + "value": "IST", + "synonyms": [ + "IST" + ] + }, + { + "value": "IST", + "synonyms": [ + "IST" + ] + }, + { + "value": "IST", + "synonyms": [ + "IST" + ] + }, + { + "value": "JST", + "synonyms": [ + "JST" + ] + }, + { + "value": "KGT", + "synonyms": [ + "KGT" + ] + }, + { + "value": "KOST", + "synonyms": [ + "KOST" + ] + }, + { + "value": "KRAT", + "synonyms": [ + "KRAT" + ] + }, + { + "value": "KST", + "synonyms": [ + "KST" + ] + }, + { + "value": "LHST", + "synonyms": [ + "LHST" + ] + }, + { + "value": "LHST", + "synonyms": [ + "LHST" + ] + }, + { + "value": "LINT", + "synonyms": [ + "LINT" + ] + }, + { + "value": "MAGT", + "synonyms": [ + "MAGT" + ] + }, + { + "value": "MART", + "synonyms": [ + "MART" + ] + }, + { + "value": "MAWT", + "synonyms": [ + "MAWT" + ] + }, + { + "value": "MDT", + "synonyms": [ + "MDT" + ] + }, + { + "value": "MET", + "synonyms": [ + "MET" + ] + }, + { + "value": "MEST", + "synonyms": [ + "MEST" + ] + }, + { + "value": "MHT", + "synonyms": [ + "MHT" + ] + }, + { + "value": "MIST", + "synonyms": [ + "MIST" + ] + }, + { + "value": "MIT", + "synonyms": [ + "MIT" + ] + }, + { + "value": "MMT", + "synonyms": [ + "MMT" + ] + }, + { + "value": "MSK", + "synonyms": [ + "MSK" + ] + }, + { + "value": "MST", + "synonyms": [ + "MST" + ] + }, + { + "value": "MST", + "synonyms": [ + "MST" + ] + }, + { + "value": "MST", + "synonyms": [ + "MST" + ] + }, + { + "value": "MUT", + "synonyms": [ + "MUT" + ] + }, + { + "value": "MVT", + "synonyms": [ + "MVT" + ] + }, + { + "value": "MYT", + "synonyms": [ + "MYT" + ] + }, + { + "value": "NCT", + "synonyms": [ + "NCT" + ] + }, + { + "value": "NDT", + "synonyms": [ + "NDT" + ] + }, + { + "value": "NFT", + "synonyms": [ + "NFT" + ] + }, + { + "value": "NPT", + "synonyms": [ + "NPT" + ] + }, + { + "value": "NST", + "synonyms": [ + "NST" + ] + }, + { + "value": "NT", + "synonyms": [ + "NT" + ] + }, + { + "value": "NUT", + "synonyms": [ + "NUT" + ] + }, + { + "value": "NZDT", + "synonyms": [ + "NZDT" + ] + }, + { + "value": "NZST", + "synonyms": [ + "NZST" + ] + }, + { + "value": "OMST", + "synonyms": [ + "OMST" + ] + }, + { + "value": "ORAT", + "synonyms": [ + "ORAT" + ] + }, + { + "value": "PDT", + "synonyms": [ + "PDT" + ] + }, + { + "value": "PET", + "synonyms": [ + "PET" + ] + }, + { + "value": "PETT", + "synonyms": [ + "PETT" + ] + }, + { + "value": "PGT", + "synonyms": [ + "PGT" + ] + }, + { + "value": "PHOT", + "synonyms": [ + "PHOT" + ] + }, + { + "value": "PKT", + "synonyms": [ + "PKT" + ] + }, + { + "value": "PMDT", + "synonyms": [ + "PMDT" + ] + }, + { + "value": "PMST", + "synonyms": [ + "PMST" + ] + }, + { + "value": "PONT", + "synonyms": [ + "PONT" + ] + }, + { + "value": "PST", + "synonyms": [ + "PST" + ] + }, + { + "value": "PST", + "synonyms": [ + "PST" + ] + }, + { + "value": "PYST", + "synonyms": [ + "PYST" + ] + }, + { + "value": "PYT", + "synonyms": [ + "PYT" + ] + }, + { + "value": "RET", + "synonyms": [ + "RET" + ] + }, + { + "value": "ROTT", + "synonyms": [ + "ROTT" + ] + }, + { + "value": "SAKT", + "synonyms": [ + "SAKT" + ] + }, + { + "value": "SAMT", + "synonyms": [ + "SAMT" + ] + }, + { + "value": "SAST", + "synonyms": [ + "SAST" + ] + }, + { + "value": "SBT", + "synonyms": [ + "SBT" + ] + }, + { + "value": "SCT", + "synonyms": [ + "SCT" + ] + }, + { + "value": "SGT", + "synonyms": [ + "SGT" + ] + }, + { + "value": "SLST", + "synonyms": [ + "SLST" + ] + }, + { + "value": "SRET", + "synonyms": [ + "SRET" + ] + }, + { + "value": "SRT", + "synonyms": [ + "SRT" + ] + }, + { + "value": "SST", + "synonyms": [ + "SST" + ] + }, + { + "value": "SST", + "synonyms": [ + "SST" + ] + }, + { + "value": "SYOT", + "synonyms": [ + "SYOT" + ] + }, + { + "value": "TAHT", + "synonyms": [ + "TAHT" + ] + }, + { + "value": "THA", + "synonyms": [ + "THA" + ] + }, + { + "value": "TFT", + "synonyms": [ + "TFT" + ] + }, + { + "value": "TJT", + "synonyms": [ + "TJT" + ] + }, + { + "value": "TKT", + "synonyms": [ + "TKT" + ] + }, + { + "value": "TLT", + "synonyms": [ + "TLT" + ] + }, + { + "value": "TMT", + "synonyms": [ + "TMT" + ] + }, + { + "value": "TOT", + "synonyms": [ + "TOT" + ] + }, + { + "value": "TVT", + "synonyms": [ + "TVT" + ] + }, + { + "value": "UCT", + "synonyms": [ + "UCT" + ] + }, + { + "value": "ULAT", + "synonyms": [ + "ULAT" + ] + }, + { + "value": "USZ1", + "synonyms": [ + "USZ1" + ] + }, + { + "value": "UTC", + "synonyms": [ + "UTC" + ] + }, + { + "value": "UYST", + "synonyms": [ + "UYST" + ] + }, + { + "value": "UYT", + "synonyms": [ + "UYT" + ] + }, + { + "value": "UZT", + "synonyms": [ + "UZT" + ] + }, + { + "value": "VET", + "synonyms": [ + "VET" + ] + }, + { + "value": "VLAT", + "synonyms": [ + "VLAT" + ] + }, + { + "value": "VOLT", + "synonyms": [ + "VOLT" + ] + }, + { + "value": "VOST", + "synonyms": [ + "VOST" + ] + }, + { + "value": "VUT", + "synonyms": [ + "VUT" + ] + }, + { + "value": "WAKT", + "synonyms": [ + "WAKT" + ] + }, + { + "value": "WAST", + "synonyms": [ + "WAST" + ] + }, + { + "value": "WAT", + "synonyms": [ + "WAT" + ] + }, + { + "value": "WEDT", + "synonyms": [ + "WEDT" + ] + }, + { + "value": "WEST", + "synonyms": [ + "WEST" + ] + }, + { + "value": "WET", + "synonyms": [ + "WET" + ] + }, + { + "value": "WIT", + "synonyms": [ + "WIT" + ] + }, + { + "value": "WST", + "synonyms": [ + "WST" + ] + }, + { + "value": "YAKT", + "synonyms": [ + "YAKT" + ] + }, + { + "value": "YEKT", + "synonyms": [ + "YEKT" + ] + }, + { + "value": "Z", + "synonyms": [ + "Z" + ] + } + ], + "isEnum": false, + "automatedExpansion": false +} \ No newline at end of file diff --git a/data/entities/unit-time.json b/data/entities/unit-time.json new file mode 100755 index 0000000..fa85225 --- /dev/null +++ b/data/entities/unit-time.json @@ -0,0 +1,120 @@ +{ + "id": "8370497e-5d89-483d-9720-be6694e1010f", + "name": "unit-time", + "isOverridable": true, + "entries": [ + { + "value": "day", + "synonyms": [ + "day", + "days" + ] + }, + { + "value": "week", + "synonyms": [ + "week", + "weeks", + "wks", + "wk" + ] + }, + { + "value": "month", + "synonyms": [ + "month", + "months", + "mo" + ] + }, + { + "value": "year", + "synonyms": [ + "year", + "years" + ] + }, + { + "value": "decade", + "synonyms": [ + "decade", + "decades" + ] + }, + { + "value": "century", + "synonyms": [ + "century", + "centuries" + ] + }, + { + "value": "fortnight", + "synonyms": [ + "fortnight", + "fortnights" + ] + }, + { + "value": "leap year", + "synonyms": [ + "leap year", + "leap years" + ] + }, + { + "value": "millenium", + "synonyms": [ + "millenium", + "milleniums" + ] + }, + { + "value": "second", + "synonyms": [ + "sec", + "second", + "seconds" + ] + }, + { + "value": "millisecond", + "synonyms": [ + "ms", + "millisec", + "millisecond", + "milliseconds" + ] + }, + { + "value": "hour", + "synonyms": [ + "hour", + "hours" + ] + }, + { + "value": "sidereal day", + "synonyms": [ + "sidereal day", + "sidereal days" + ] + }, + { + "value": "sidereal year", + "synonyms": [ + "sidereal year", + "sidereal years" + ] + }, + { + "value": "minute", + "synonyms": [ + "minutes", + "minute" + ] + } + ], + "isEnum": false, + "automatedExpansion": false +} \ No newline at end of file diff --git a/data/intents/date.between.json b/data/intents/date.between.json new file mode 100755 index 0000000..c2513e6 --- /dev/null +++ b/data/intents/date.between.json @@ -0,0 +1,454 @@ +{ + "userSays": [ + { + "id": "27fa2e9b-b743-4d31-9c58-ee8d7ec1193b", + "data": [ + { + "text": "how many " + }, + { + "text": "days", + "alias": "unit", + "meta": "@unit-time", + "userDefined": true + }, + { + "text": " between " + }, + { + "text": "today", + "alias": "date-1", + "meta": "@sys.date", + "userDefined": true + }, + { + "text": " and " + }, + { + "text": "New Year", + "alias": "date-2", + "meta": "@sys.date", + "userDefined": true + } + ], + "isTemplate": false, + "count": 1 + }, + { + "id": "f2441987-94e1-4103-a726-fb6cc9bd8b85", + "data": [ + { + "text": "i wonder how many " + }, + { + "text": "months", + "alias": "unit", + "meta": "@unit-time", + "userDefined": true + }, + { + "text": " are there between " + }, + { + "text": "Thanksgiving", + "alias": "date-1", + "meta": "@sys.date", + "userDefined": true + }, + { + "text": " and " + }, + { + "text": "Labour Day", + "alias": "date-2", + "meta": "@sys.date", + "userDefined": true + } + ], + "isTemplate": false, + "count": 1 + }, + { + "id": "a5f6f448-5486-43ff-9d87-35c9035d44a6", + "data": [ + { + "text": "how many " + }, + { + "text": "days", + "alias": "unit", + "meta": "@unit-time", + "userDefined": true + }, + { + "text": " are between " + }, + { + "text": "November 13", + "alias": "date-1", + "meta": "@sys.date", + "userDefined": true + }, + { + "text": " and " + }, + { + "text": "July 22", + "alias": "date-2", + "meta": "@sys.date", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "9ec6e926-0d5b-41c6-91d6-cc770cfa89ea", + "data": [ + { + "text": "tell me the number of " + }, + { + "text": "weeks", + "alias": "unit", + "meta": "@unit-time", + "userDefined": true + }, + { + "text": " between " + }, + { + "text": "today", + "alias": "date-1", + "meta": "@sys.date", + "userDefined": true + }, + { + "text": " and " + }, + { + "text": "January 1st", + "alias": "date-2", + "meta": "@sys.date", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "aeda0b1b-1f72-41ab-a424-e7089b39f026", + "data": [ + { + "text": "count the number of " + }, + { + "text": "hours", + "alias": "unit", + "meta": "@unit-time", + "userDefined": true + }, + { + "text": " between " + }, + { + "text": "June 5", + "alias": "date-1", + "meta": "@sys.date", + "userDefined": true + }, + { + "text": " and " + }, + { + "text": "June 14", + "alias": "date-2", + "meta": "@sys.date", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "18b6a175-cbea-4ed5-b89b-c4a2dabb49bd", + "data": [ + { + "text": "calculate the number of " + }, + { + "text": "minutes", + "alias": "unit", + "meta": "@unit-time", + "userDefined": true + }, + { + "text": " between " + }, + { + "text": "today", + "alias": "date-1", + "meta": "@sys.date", + "userDefined": true + }, + { + "text": " and " + }, + { + "text": "Wednesday", + "alias": "date-2", + "meta": "@sys.date", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "a025dce1-f5f9-4f02-8969-7212fdaaaab3", + "data": [ + { + "text": "number of " + }, + { + "text": "seconds", + "alias": "unit", + "meta": "@unit-time", + "userDefined": true + }, + { + "text": " between " + }, + { + "text": "today", + "alias": "date-1", + "meta": "@sys.date", + "userDefined": true + }, + { + "text": " and " + }, + { + "text": "April 1st", + "alias": "date-2", + "meta": "@sys.date", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "e2bda7cd-9633-454a-a448-1105c25efb59", + "data": [ + { + "text": "I need to know the number of " + }, + { + "text": "days", + "alias": "unit", + "meta": "@unit-time", + "userDefined": true + }, + { + "text": " between " + }, + { + "text": "today", + "alias": "date-1", + "meta": "@sys.date", + "userDefined": true + }, + { + "text": " and the " + }, + { + "text": "next Friday", + "alias": "date-2", + "meta": "@sys.date", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "e829e07e-0661-47b1-944f-c257be03f778", + "data": [ + { + "text": "how many " + }, + { + "text": "months", + "alias": "unit", + "meta": "@unit-time", + "userDefined": true + }, + { + "text": " are there between " + }, + { + "text": "January 2013", + "alias": "date-1", + "meta": "@sys.date", + "userDefined": true + }, + { + "text": " and " + }, + { + "text": "August 2017", + "alias": "date-2", + "meta": "@sys.date", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "fa91b82b-1e81-4b72-b9d7-d6d16e9cc1e7", + "data": [ + { + "text": "what is the number of " + }, + { + "text": "years", + "alias": "unit", + "meta": "@unit-time", + "userDefined": true + }, + { + "text": " between " + }, + { + "text": "2017", + "alias": "date-1", + "meta": "@sys.date", + "userDefined": true + }, + { + "text": " and " + }, + { + "text": "2048", + "alias": "date-2", + "meta": "@sys.date", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "006f1520-6e98-4f00-9c8c-a5dee7b61330", + "data": [ + { + "text": "evaluate how many " + }, + { + "text": "days", + "alias": "unit", + "meta": "@unit-time", + "userDefined": true + }, + { + "text": " are between " + }, + { + "text": "today", + "alias": "date-1", + "meta": "@sys.date", + "userDefined": true + }, + { + "text": " and " + }, + { + "text": "February 14 2018", + "alias": "date-2", + "meta": "@sys.date", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "19a9ace2-cb0a-40ce-9ecb-f9d0efd0744b", + "data": [ + { + "text": "compute the number of " + }, + { + "text": "seconds", + "alias": "unit", + "meta": "@unit-time", + "userDefined": true + }, + { + "text": " between " + }, + { + "text": "today", + "alias": "date-1", + "meta": "@sys.date", + "userDefined": true + }, + { + "text": " and " + }, + { + "text": "March 7 2017", + "alias": "date-2", + "meta": "@sys.date", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + } + ], + "id": "3d9a9ad2-47b1-4de8-908c-398c5b006abd", + "name": "date.between", + "auto": true, + "contexts": [], + "responses": [ + { + "resetContexts": false, + "action": "date.between", + "affectedContexts": [], + "parameters": [ + { + "dataType": "@sys.date", + "name": "date-1", + "value": "$date-1", + "isList": false + }, + { + "dataType": "@sys.date", + "name": "date-2", + "value": "$date-2" + }, + { + "dataType": "@unit-time", + "name": "unit", + "value": "$unit", + "isList": false + } + ], + "messages": [ + { + "type": 0, + "speech": [] + } + ], + "defaultResponsePlatforms": {} + } + ], + "priority": 500000, + "webhookUsed": false, + "webhookForSlotFilling": false, + "fallbackIntent": false, + "events": [] +} \ No newline at end of file diff --git a/data/intents/date.check.json b/data/intents/date.check.json new file mode 100755 index 0000000..b5f9faa --- /dev/null +++ b/data/intents/date.check.json @@ -0,0 +1,223 @@ +{ + "userSays": [ + { + "id": "d526e4fc-6461-402d-9511-8c1f34b4dcfe", + "data": [ + { + "text": "is it " + }, + { + "text": "New Year", + "alias": "date", + "meta": "@sys.date", + "userDefined": true + }, + { + "text": " in " + }, + { + "text": "Korea", + "alias": "location", + "meta": "@sys.location", + "userDefined": true + } + ], + "isTemplate": false, + "count": 1 + }, + { + "id": "f1023960-9fa8-4e3c-a63a-aaf0873fdd47", + "data": [ + { + "text": "is it the ", + "userDefined": false + }, + { + "text": "21st of February", + "alias": "date", + "meta": "@sys.date", + "userDefined": true + } + ], + "isTemplate": false, + "count": 1 + }, + { + "id": "85f64d35-c525-4eb4-888b-dbf54007ac10", + "data": [ + { + "text": "is it the " + }, + { + "text": "21st of February", + "alias": "date", + "meta": "@sys.date", + "userDefined": false + }, + { + "text": " in " + }, + { + "text": "Moscow", + "alias": "location", + "meta": "@sys.location", + "userDefined": false + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "077dc88b-3e0c-435a-aca6-86e2147cfd85", + "data": [ + { + "text": "is it " + }, + { + "text": "Thanksgiving", + "alias": "date", + "meta": "@sys.date", + "userDefined": true + }, + { + "text": " today" + } + ], + "isTemplate": false, + "count": 1 + }, + { + "id": "1efd47aa-f5e3-4644-9f63-a17a4a9d07e5", + "data": [ + { + "text": "is it " + }, + { + "text": "June 19th", + "alias": "date", + "meta": "@sys.date", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "1c9005be-f939-4774-91ca-1e7ab691f29e", + "data": [ + { + "text": "tell me is it " + }, + { + "text": "September 8", + "alias": "date", + "meta": "@sys.date", + "userDefined": true + }, + { + "text": " in " + }, + { + "text": "Munich", + "alias": "location", + "meta": "@sys.location", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "999be7f8-7a02-4e66-bfb2-c4766a89dffb", + "data": [ + { + "text": "I\u0027d like to know if it\u0027s " + }, + { + "text": "January 2018", + "alias": "date", + "meta": "@sys.date", + "userDefined": true + }, + { + "text": " now" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "9416bed0-bb2d-4b14-8eb7-110e61471d78", + "data": [ + { + "text": "is today " + }, + { + "text": "28th", + "alias": "date", + "meta": "@sys.date", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "6919fa93-5067-4089-91e2-a4ed1bcbfb6d", + "data": [ + { + "text": "are we in " + }, + { + "text": "March 2017", + "alias": "date", + "meta": "@sys.date", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + } + ], + "id": "745517dd-a698-40d5-8823-34e4520494c4", + "name": "date.check", + "auto": true, + "contexts": [], + "responses": [ + { + "resetContexts": false, + "action": "date.check", + "affectedContexts": [ + { + "name": "date-check", + "parameters": {}, + "lifespan": 5 + } + ], + "parameters": [ + { + "dataType": "@sys.date", + "name": "date", + "value": "$date" + }, + { + "dataType": "@sys.location", + "name": "location", + "value": "$location" + } + ], + "messages": [ + { + "type": 0, + "speech": [] + } + ], + "defaultResponsePlatforms": {} + } + ], + "priority": 500000, + "webhookUsed": false, + "webhookForSlotFilling": false, + "fallbackIntent": false, + "events": [] +} \ No newline at end of file diff --git a/data/intents/date.day_of_week.check.json b/data/intents/date.day_of_week.check.json new file mode 100755 index 0000000..a649115 --- /dev/null +++ b/data/intents/date.day_of_week.check.json @@ -0,0 +1,378 @@ +{ + "userSays": [ + { + "id": "f7e77a48-f740-4a0d-ad80-36d4b4249858", + "data": [ + { + "text": "is it " + }, + { + "text": "Friday", + "alias": "dayofweek", + "meta": "@dayofweek", + "userDefined": false + }, + { + "text": " " + }, + { + "text": "tomorrow", + "alias": "date", + "meta": "@sys.date", + "userDefined": false + }, + { + "text": " in " + }, + { + "text": "Moscow", + "alias": "location", + "meta": "@sys.location", + "userDefined": false + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "37e29c68-369b-4477-b5cc-75c8d937e025", + "data": [ + { + "text": "is " + }, + { + "text": "New Year", + "alias": "date", + "meta": "@sys.date", + "userDefined": true + }, + { + "text": " " + }, + { + "text": "Sunday", + "alias": "dayofweek", + "meta": "@dayofweek", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "e625d125-e2ab-4ae0-a695-f0cd6fa90ab9", + "data": [ + { + "text": "check if " + }, + { + "text": "Thanksgiving", + "alias": "date", + "meta": "@sys.date", + "userDefined": true + }, + { + "text": " is " + }, + { + "text": "Tuesday", + "alias": "dayofweek", + "meta": "@dayofweek", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "c0a38b1f-c8f8-4a12-9880-fbb015a0a7b8", + "data": [ + { + "text": "is " + }, + { + "text": "March 24", + "alias": "date", + "meta": "@sys.date", + "userDefined": true + }, + { + "text": " " + }, + { + "text": "Friday", + "alias": "dayofweek", + "meta": "@dayofweek", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "4dde8c07-ec4e-436d-b348-a09074a528b0", + "data": [ + { + "text": "is " + }, + { + "text": "24 of July", + "alias": "date", + "meta": "@sys.date", + "userDefined": true + }, + { + "text": " " + }, + { + "text": "Wednesday", + "alias": "dayofweek", + "meta": "@dayofweek", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "021b070f-a470-442d-8745-39371e7c2647", + "data": [ + { + "text": "is " + }, + { + "text": "it", + "meta": "@sys.ignore", + "userDefined": true + }, + { + "text": " " + }, + { + "text": "Monday", + "alias": "dayofweek", + "meta": "@dayofweek", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "36c3feed-9e9b-40d8-aa68-53108afe5872", + "data": [ + { + "text": "tomorrow", + "alias": "date", + "meta": "@sys.date", + "userDefined": true + }, + { + "text": " is " + }, + { + "text": "Friday", + "alias": "dayofweek", + "meta": "@dayofweek", + "userDefined": true + }, + { + "text": " isn\u0027t it" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "494288ce-1a4f-4ceb-904f-93a449832888", + "data": [ + { + "text": "is " + }, + { + "text": "it", + "meta": "@sys.ignore", + "userDefined": false + }, + { + "text": " " + }, + { + "text": "Friday", + "alias": "dayofweek", + "meta": "@dayofweek", + "userDefined": false + }, + { + "text": " " + }, + { + "text": "tomorrow", + "alias": "date", + "meta": "@sys.date", + "userDefined": false + }, + { + "text": " in " + }, + { + "text": "Moscow", + "alias": "location", + "meta": "@sys.location", + "userDefined": false + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "3db57ec4-f180-4d01-818d-1434d71e8cf4", + "data": [ + { + "text": "check if " + }, + { + "text": "13th of November", + "alias": "date", + "meta": "@sys.date", + "userDefined": true + }, + { + "text": " is Wednesday" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "95140697-b4b0-4c44-a1f7-6bcdaf258ecf", + "data": [ + { + "text": "is " + }, + { + "text": "today", + "alias": "date", + "meta": "@sys.date", + "userDefined": false + }, + { + "text": " a " + }, + { + "text": "Thursday", + "alias": "dayofweek", + "meta": "@dayofweek", + "userDefined": false + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "8159f81e-e38b-4979-a91f-6db002152bfc", + "data": [ + { + "text": "tell me if " + }, + { + "text": "today", + "alias": "date", + "meta": "@sys.date", + "userDefined": true + }, + { + "text": " is " + }, + { + "text": "Monday", + "alias": "dayofweek", + "meta": "@dayofweek", + "userDefined": true + }, + { + "text": " in " + }, + { + "text": "Paris", + "alias": "location", + "meta": "@sys.location", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "fa46a111-02a8-407a-b952-f38efc58ce20", + "data": [ + { + "text": "is it " + }, + { + "text": "Friday", + "alias": "dayofweek", + "meta": "@dayofweek", + "userDefined": false + }, + { + "text": " " + }, + { + "text": "tomorrow", + "alias": "date", + "meta": "@sys.date", + "userDefined": false + } + ], + "isTemplate": false, + "count": 0 + } + ], + "id": "081f756a-8767-4ce6-bf38-e84cf0ac7ca3", + "name": "date.day_of_week.check", + "auto": true, + "contexts": [], + "responses": [ + { + "resetContexts": false, + "action": "date.day_of_week.check", + "affectedContexts": [ + { + "name": "date-check", + "parameters": {}, + "lifespan": 5 + } + ], + "parameters": [ + { + "dataType": "@dayofweek", + "name": "dayofweek", + "value": "$dayofweek" + }, + { + "dataType": "@sys.date", + "name": "date", + "value": "$date" + }, + { + "dataType": "@sys.location", + "name": "location", + "value": "$location" + } + ], + "messages": [ + { + "type": 0, + "speech": [] + } + ], + "defaultResponsePlatforms": {} + } + ], + "priority": 500000, + "webhookUsed": false, + "webhookForSlotFilling": false, + "fallbackIntent": false, + "events": [] +} \ No newline at end of file diff --git a/data/intents/date.day_of_week.json b/data/intents/date.day_of_week.json new file mode 100755 index 0000000..d97ed56 --- /dev/null +++ b/data/intents/date.day_of_week.json @@ -0,0 +1,317 @@ +{ + "userSays": [ + { + "id": "42406909-4142-4445-985a-642f06998903", + "data": [ + { + "text": "what day of the week is it " + }, + { + "text": "today", + "alias": "date-time", + "meta": "@sys.date-time", + "userDefined": false + }, + { + "text": " in " + }, + { + "text": "Sydney", + "alias": "location", + "meta": "@sys.location", + "userDefined": false + } + ], + "isTemplate": false, + "count": 2 + }, + { + "id": "145d2a03-36b8-4883-a037-fef7c570b665", + "data": [ + { + "text": "what day of the week is it " + }, + { + "text": "today", + "alias": "date-time", + "meta": "@sys.date-time", + "userDefined": false + }, + { + "text": " in " + }, + { + "text": "London", + "alias": "location", + "meta": "@sys.location", + "userDefined": false + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "694c5508-3c3f-4237-9791-e3d15bd44a40", + "data": [ + { + "text": "what day of the week is " + }, + { + "text": "New Year", + "alias": "date-time", + "meta": "@sys.date-time", + "userDefined": true + } + ], + "isTemplate": false, + "count": 1 + }, + { + "id": "a83052a4-b7a3-455a-898f-be3cf1479ca5", + "data": [ + { + "text": "day of the week " + }, + { + "text": "Thanksgiving", + "alias": "date-time", + "meta": "@sys.date-time", + "userDefined": false + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "3d00ff55-d004-4c51-88c9-0d37ebc6134f", + "data": [ + { + "text": "what day of week is it in " + }, + { + "text": "Paris", + "alias": "location", + "meta": "@sys.location", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "809bd984-9f66-452a-ae72-004a564df1e8", + "data": [ + { + "text": "what day " + }, + { + "text": "of", + "meta": "@sys.ignore", + "userDefined": false + }, + { + "text": " " + }, + { + "text": "the week", + "meta": "@sys.ignore", + "userDefined": false + }, + { + "text": " is " + }, + { + "text": "today", + "alias": "date-time", + "meta": "@sys.date-time", + "userDefined": false + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "e26c3d59-a1ef-418e-b938-1ad4f3a10f5d", + "data": [ + { + "text": "today\u0027s", + "alias": "date-time", + "meta": "@sys.date-time", + "userDefined": false + }, + { + "text": " day " + }, + { + "text": "of", + "meta": "@sys.ignore", + "userDefined": false + }, + { + "text": " " + }, + { + "text": "the week", + "meta": "@sys.ignore", + "userDefined": false + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "daa4bca6-a281-44db-b3ee-4c724b815e4d", + "data": [ + { + "text": "day " + }, + { + "text": "of", + "meta": "@sys.ignore", + "userDefined": false + }, + { + "text": " " + }, + { + "text": "the week", + "meta": "@sys.ignore", + "userDefined": false + }, + { + "text": " in " + }, + { + "text": "New York", + "alias": "location", + "meta": "@sys.location", + "userDefined": false + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "29d2f8b2-3c71-4cfe-a666-ddd2d64fb4f2", + "data": [ + { + "text": "what day " + }, + { + "text": "of", + "meta": "@sys.ignore", + "userDefined": false + }, + { + "text": " " + }, + { + "text": "the week", + "meta": "@sys.ignore", + "userDefined": false + }, + { + "text": " is " + }, + { + "text": "it", + "meta": "@sys.ignore", + "userDefined": false + }, + { + "text": " " + }, + { + "text": "today", + "alias": "date-time", + "meta": "@sys.date-time", + "userDefined": false + }, + { + "text": " in " + }, + { + "text": "London", + "alias": "location", + "meta": "@sys.location", + "userDefined": false + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "e1fa0bbc-806d-4a15-8a55-0f2d80ab06d7", + "data": [ + { + "text": "day " + }, + { + "text": "of", + "meta": "@sys.ignore", + "userDefined": false + }, + { + "text": " " + }, + { + "text": "the week", + "meta": "@sys.ignore", + "userDefined": false + }, + { + "text": " " + }, + { + "text": "today", + "alias": "date-time", + "meta": "@sys.date-time", + "userDefined": false + } + ], + "isTemplate": false, + "count": 0 + } + ], + "id": "dd90a647-6419-41e5-b26f-a7bc2024105c", + "name": "date.day_of_week", + "auto": true, + "contexts": [], + "responses": [ + { + "resetContexts": false, + "action": "date.day_of_week", + "affectedContexts": [ + { + "name": "date-check", + "parameters": {}, + "lifespan": 5 + } + ], + "parameters": [ + { + "dataType": "@sys.location", + "name": "location", + "value": "$location" + }, + { + "dataType": "@sys.date-time", + "name": "date-time", + "value": "$date-time" + } + ], + "messages": [ + { + "type": 0, + "speech": [] + } + ], + "defaultResponsePlatforms": {} + } + ], + "priority": 500000, + "webhookUsed": false, + "webhookForSlotFilling": false, + "fallbackIntent": false, + "events": [] +} \ No newline at end of file diff --git a/data/intents/date.get.json b/data/intents/date.get.json new file mode 100755 index 0000000..031c95d --- /dev/null +++ b/data/intents/date.get.json @@ -0,0 +1,339 @@ +{ + "userSays": [ + { + "id": "d65d0629-0a11-4648-b63a-02632d294e16", + "data": [ + { + "text": "what date is " + }, + { + "text": "tomorrow", + "alias": "date", + "meta": "@sys.date", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "9b7a43af-7487-44cc-ba6a-12433a8b0d13", + "data": [ + { + "text": "do you know what " + }, + { + "text": "day", + "meta": "@sys.ignore", + "userDefined": false + }, + { + "text": " it is" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "a3e8829f-7c49-422b-8d9f-fe6cd9863f92", + "data": [ + { + "text": "show me the date" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "1e279428-6896-4744-87d6-17e9d4c57d29", + "data": [ + { + "text": "what is the date" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "dce83725-49c2-4e2e-b92c-5564035f61fa", + "data": [ + { + "text": "current date" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "87806536-9020-436f-a156-5c84b063472b", + "data": [ + { + "text": "date " + }, + { + "text": "today", + "alias": "date", + "meta": "@sys.date", + "userDefined": false + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "e0b2725d-598a-469a-b9d2-fe661dafdcfd", + "data": [ + { + "text": "date now" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "922fa733-403a-4d58-8b2d-2233bb31fcb0", + "data": [ + { + "text": "the date" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "1b7ac52d-54bb-4032-8371-c4a1f5162f81", + "data": [ + { + "text": "what " + }, + { + "text": "day", + "meta": "@sys.ignore", + "userDefined": false + }, + { + "text": " is it" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "fdd53327-860a-489d-84dd-e491a36c18d0", + "data": [ + { + "text": "today\u0027s", + "alias": "date", + "meta": "@sys.date", + "userDefined": true + }, + { + "text": " date" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "0a30df79-2587-46c1-8137-733cd0668c76", + "data": [ + { + "text": "what date is " + }, + { + "text": "today", + "alias": "date", + "meta": "@sys.date", + "userDefined": false + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "9edd3080-21f8-4e8d-a460-4c6d3f0385e7", + "data": [ + { + "text": "what will be the date " + }, + { + "text": "30 days from now", + "alias": "date", + "meta": "@sys.date", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "fd5dc77f-890f-419d-b44c-b5830b4a9f31", + "data": [ + { + "text": "tomorrow\u0027s", + "alias": "date", + "meta": "@sys.date", + "userDefined": false + }, + { + "text": " date" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "685ec170-811f-4f03-888b-971143c2bd58", + "data": [ + { + "text": "can you tell me the date" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "e8d64942-402a-4857-bff3-6195af0be5d9", + "data": [ + { + "text": "tell me the date " + }, + { + "text": "19 weeks from today", + "alias": "date", + "meta": "@sys.date", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "763d092d-03ee-4cd0-ac73-1808dc96cc4b", + "data": [ + { + "text": "what is the current date" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "17ccbdcd-a32d-4fa1-bfd1-c73d66271dc7", + "data": [ + { + "text": "do you know what " + }, + { + "text": "day", + "meta": "@sys.ignore", + "userDefined": false + }, + { + "text": " is it" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "8a96aa76-d8db-4061-bbd0-4016222bddf1", + "data": [ + { + "text": "what is the day " + }, + { + "text": "after tomorrow", + "alias": "date", + "meta": "@sys.date", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "6cefd963-b88e-4c13-abd1-8dfae697e7f1", + "data": [ + { + "text": "what date is it on " + }, + { + "text": "Thursday", + "alias": "date", + "meta": "@sys.date", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "145efc9b-24fa-4ac0-a68f-96677996f3f9", + "data": [ + { + "text": "what day was " + }, + { + "text": "yesterday", + "alias": "date", + "meta": "@sys.date", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "e581f0c2-dd76-4bdc-bf5a-a202701d3369", + "data": [ + { + "text": "what date is the " + }, + { + "text": "next Friday", + "alias": "date", + "meta": "@sys.date", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + } + ], + "id": "944dec71-13fc-4633-b22f-5f2806f26c5b", + "name": "date.get", + "auto": true, + "contexts": [], + "responses": [ + { + "resetContexts": false, + "action": "date.get", + "affectedContexts": [ + { + "name": "date-get", + "parameters": {}, + "lifespan": 5 + } + ], + "parameters": [ + { + "dataType": "@sys.date", + "name": "date", + "value": "$date" + } + ], + "messages": [ + { + "type": 0, + "speech": [] + } + ] + } + ], + "priority": 500000, + "webhookUsed": false, + "webhookForSlotFilling": false, + "fallbackIntent": false, + "events": [] +} \ No newline at end of file diff --git a/data/intents/date.month.check.json b/data/intents/date.month.check.json new file mode 100755 index 0000000..0192414 --- /dev/null +++ b/data/intents/date.month.check.json @@ -0,0 +1,237 @@ +{ + "userSays": [ + { + "id": "1b4a4fc4-8ed8-486f-abb2-6a88ef63a6bb", + "data": [ + { + "text": "February", + "alias": "date-period", + "meta": "@sys.date-period", + "userDefined": true + }, + { + "text": " is coming isn\u0027t it" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "2d78b195-1b32-4034-b32a-c8853f801116", + "data": [ + { + "text": "do you know if it\u0027s " + }, + { + "text": "March", + "alias": "date-period", + "meta": "@sys.date-period", + "userDefined": true + }, + { + "text": " now" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "e8881dbe-26b5-431b-b87a-0454496732f6", + "data": [ + { + "text": "today is " + }, + { + "text": "February", + "alias": "date-period", + "meta": "@sys.date-period", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "c9d96c64-4a66-468e-aad5-6cf134571aa1", + "data": [ + { + "text": "it\u0027s " + }, + { + "text": "December", + "alias": "date-period", + "meta": "@sys.date-period", + "userDefined": true + }, + { + "text": " right" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "93cfb2c6-9f06-45b9-82f1-6878abb545a7", + "data": [ + { + "text": "could you tell if it\u0027s " + }, + { + "text": "May", + "alias": "date-period", + "meta": "@sys.date-period", + "userDefined": true + }, + { + "text": " now" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "a85d63f5-7c29-46bf-abb3-e814ac6361db", + "data": [ + { + "text": "tell me if it\u0027s " + }, + { + "text": "July", + "alias": "date-period", + "meta": "@sys.date-period", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "b607465e-f525-42e3-bee1-f1742f8cae74", + "data": [ + { + "text": "is " + }, + { + "text": "it", + "meta": "@sys.ignore", + "userDefined": true + }, + { + "text": " " + }, + { + "text": "May", + "alias": "date-period", + "meta": "@sys.date-period", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "10a24c90-9faa-4cb5-8157-0fc7b6a2e8c5", + "data": [ + { + "text": "check if " + }, + { + "text": "it", + "meta": "@sys.ignore", + "userDefined": true + }, + { + "text": "\u0027s " + }, + { + "text": "April", + "alias": "date-period", + "meta": "@sys.date-period", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "b86dcdfb-36c4-4cab-ad83-a591acb1abb7", + "data": [ + { + "text": "is " + }, + { + "text": "it", + "meta": "@sys.ignore", + "userDefined": true + }, + { + "text": " still " + }, + { + "text": "June", + "alias": "date-period", + "meta": "@sys.date-period", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "fbaad9f5-4a6a-48ba-ac93-87316d5d4673", + "data": [ + { + "text": "is " + }, + { + "text": "it", + "meta": "@sys.ignore", + "userDefined": true + }, + { + "text": " " + }, + { + "text": "August", + "alias": "date-period", + "meta": "@sys.date-period", + "userDefined": true + }, + { + "text": " already" + } + ], + "isTemplate": false, + "count": 0 + } + ], + "id": "53e740b3-1f06-4699-bd80-d98d6ff94230", + "name": "date.month.check", + "auto": true, + "contexts": [], + "responses": [ + { + "resetContexts": false, + "action": "date.month.check", + "affectedContexts": [], + "parameters": [ + { + "dataType": "@sys.date-period", + "name": "date-period", + "value": "$date-period" + } + ], + "messages": [ + { + "type": 0, + "speech": [] + } + ] + } + ], + "priority": 500000, + "webhookUsed": false, + "webhookForSlotFilling": false, + "fallbackIntent": false, + "events": [] +} \ No newline at end of file diff --git a/data/intents/date.month.get.json b/data/intents/date.month.get.json new file mode 100755 index 0000000..fcc411c --- /dev/null +++ b/data/intents/date.month.get.json @@ -0,0 +1,317 @@ +{ + "userSays": [ + { + "id": "95947ce3-7084-4787-9593-9537b3159fdb", + "data": [ + { + "text": "I", + "meta": "@sys.ignore", + "userDefined": false + }, + { + "text": "\u0027" + }, + { + "text": "d", + "meta": "@sys.ignore", + "userDefined": false + }, + { + "text": " " + }, + { + "text": "like", + "meta": "@sys.ignore", + "userDefined": false + }, + { + "text": " " + }, + { + "text": "to", + "meta": "@sys.ignore", + "userDefined": false + }, + { + "text": " know what " + }, + { + "text": "month", + "meta": "@sys.ignore", + "userDefined": false + }, + { + "text": " is " + }, + { + "text": "it", + "meta": "@sys.ignore", + "userDefined": false + }, + { + "text": " " + }, + { + "text": "now", + "meta": "@sys.ignore", + "userDefined": false + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "eb67c46f-4f0c-4b13-aaba-051f4103da19", + "data": [ + { + "text": "current month", + "meta": "@sys.ignore", + "userDefined": false + }, + { + "text": " please" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "14df5fd1-644b-4063-8196-da31ea68a263", + "data": [ + { + "text": "do you know the " + }, + { + "text": "current month", + "meta": "@sys.ignore", + "userDefined": false + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "7fffee89-7164-4e56-8b65-4615f5fb887c", + "data": [ + { + "text": "could", + "meta": "@sys.ignore", + "userDefined": false + }, + { + "text": " you " + }, + { + "text": "tell", + "meta": "@sys.ignore", + "userDefined": false + }, + { + "text": " " + }, + { + "text": "me", + "meta": "@sys.ignore", + "userDefined": false + }, + { + "text": " what " + }, + { + "text": "month", + "meta": "@sys.ignore", + "userDefined": false + }, + { + "text": " is " + }, + { + "text": "it", + "meta": "@sys.ignore", + "userDefined": false + }, + { + "text": " " + }, + { + "text": "now", + "meta": "@sys.ignore", + "userDefined": false + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "8ac5d76d-d8c8-4e08-a9a3-5973b98526cf", + "data": [ + { + "text": "tell", + "meta": "@sys.ignore", + "userDefined": false + }, + { + "text": " " + }, + { + "text": "me", + "meta": "@sys.ignore", + "userDefined": false + }, + { + "text": " the " + }, + { + "text": "current month", + "meta": "@sys.ignore", + "userDefined": false + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "05f4a352-2dac-4992-a4fd-829aa2fb8e90", + "data": [ + { + "text": "what\u0027" + }, + { + "text": "s", + "meta": "@sys.ignore", + "userDefined": false + }, + { + "text": " the " + }, + { + "text": "current month", + "meta": "@sys.ignore", + "userDefined": false + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "f60c881e-f336-4021-957d-440c74a31d2d", + "data": [ + { + "text": "what " + }, + { + "text": "month", + "meta": "@sys.ignore", + "userDefined": false + }, + { + "text": " is " + }, + { + "text": "it", + "meta": "@sys.ignore", + "userDefined": false + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "95c4598c-5547-4c43-ba30-a49a6b392fb9", + "data": [ + { + "text": "what " + }, + { + "text": "month", + "meta": "@sys.ignore", + "userDefined": false + }, + { + "text": " is " + }, + { + "text": "it", + "meta": "@sys.ignore", + "userDefined": false + }, + { + "text": " now" + } + ], + "isTemplate": false, + "count": 1 + }, + { + "id": "f0810d15-83fe-4b8c-b6c9-b4156108d8e1", + "data": [ + { + "text": "tell me what is the " + }, + { + "text": "month", + "meta": "@sys.ignore", + "userDefined": false + }, + { + "text": " right now" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "86d67a16-39ad-46d3-a7d5-d6211ba41222", + "data": [ + { + "text": "what " + }, + { + "text": "month", + "meta": "@sys.ignore", + "userDefined": false + }, + { + "text": " is " + }, + { + "text": "it", + "meta": "@sys.ignore", + "userDefined": false + }, + { + "text": " " + }, + { + "text": "today", + "meta": "@sys.ignore", + "userDefined": false + } + ], + "isTemplate": false, + "count": 0 + } + ], + "id": "2df69fb0-ba8e-4d81-ac89-830b0fad6b05", + "name": "date.month.get", + "auto": true, + "contexts": [], + "responses": [ + { + "resetContexts": false, + "action": "date.month.get", + "affectedContexts": [], + "parameters": [], + "messages": [ + { + "type": 0, + "speech": [] + } + ] + } + ], + "priority": 500000, + "webhookUsed": false, + "webhookForSlotFilling": false, + "fallbackIntent": false +} \ No newline at end of file diff --git a/data/intents/date.since.json b/data/intents/date.since.json new file mode 100755 index 0000000..752ccf4 --- /dev/null +++ b/data/intents/date.since.json @@ -0,0 +1,267 @@ +{ + "userSays": [ + { + "id": "89b655cc-c4c0-4cf5-8ffb-e44555e0c9e6", + "data": [ + { + "text": "how do I know how many " + }, + { + "text": "minutes", + "alias": "unit", + "meta": "@unit-time", + "userDefined": true + }, + { + "text": " passed since the year " + }, + { + "text": "2013", + "alias": "date", + "meta": "@sys.date", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "d60d91ec-52a8-482a-a024-57cc3c532eaf", + "data": [ + { + "text": "count the number of " + }, + { + "text": "months", + "alias": "unit", + "meta": "@unit-time", + "userDefined": true + }, + { + "text": " it\u0027s been since " + }, + { + "text": "2015", + "alias": "date", + "meta": "@sys.date", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "27949f92-da5d-4e33-93ee-65676bb5c08a", + "data": [ + { + "text": "how " + }, + { + "text": "many", + "meta": "@sys.ignore", + "userDefined": true + }, + { + "text": " " + }, + { + "text": "days", + "alias": "unit", + "meta": "@unit-time", + "userDefined": true + }, + { + "text": " since " + }, + { + "text": "September 7", + "alias": "date", + "meta": "@sys.date", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "61887b21-2a18-4a24-b858-66e7ed93a4d5", + "data": [ + { + "text": "calculate how " + }, + { + "text": "many", + "meta": "@sys.ignore", + "userDefined": true + }, + { + "text": " " + }, + { + "text": "weeks", + "alias": "unit", + "meta": "@unit-time", + "userDefined": true + }, + { + "text": " it\u0027s been since " + }, + { + "text": "last Friday", + "alias": "date", + "meta": "@sys.date", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "47618ce9-53c0-44f8-be1d-e10a830e44c5", + "data": [ + { + "text": "tell", + "meta": "@sys.ignore", + "userDefined": true + }, + { + "text": " " + }, + { + "text": "me", + "meta": "@sys.ignore", + "userDefined": true + }, + { + "text": " how " + }, + { + "text": "many", + "meta": "@sys.ignore", + "userDefined": true + }, + { + "text": " " + }, + { + "text": "hours", + "alias": "unit", + "meta": "@unit-time", + "userDefined": true + }, + { + "text": " have passed since " + }, + { + "text": "June 11th", + "alias": "date", + "meta": "@sys.date", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "91d0c616-94b9-4580-8dde-8efa46fe49f9", + "data": [ + { + "text": "check how " + }, + { + "text": "many", + "meta": "@sys.ignore", + "userDefined": true + }, + { + "text": " " + }, + { + "text": "seconds", + "alias": "unit", + "meta": "@unit-time", + "userDefined": true + }, + { + "text": " it\u0027s been since " + }, + { + "text": "yesterday", + "alias": "date", + "meta": "@sys.date", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "1cec8ba3-2ac0-4171-99a4-9d9eb1c6ce44", + "data": [ + { + "text": "how " + }, + { + "text": "many", + "meta": "@sys.ignore", + "userDefined": true + }, + { + "text": " " + }, + { + "text": "months", + "alias": "unit", + "meta": "@unit-time", + "userDefined": true + }, + { + "text": " have passed since " + }, + { + "text": "April 1st 2014", + "alias": "date", + "meta": "@sys.date", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + } + ], + "id": "324ee2f7-56e6-44da-b11c-bb3703ff8335", + "name": "date.since", + "auto": true, + "contexts": [], + "responses": [ + { + "resetContexts": false, + "action": "date.since", + "affectedContexts": [], + "parameters": [ + { + "dataType": "@sys.date", + "name": "date", + "value": "$date" + }, + { + "dataType": "@unit-time", + "name": "unit", + "value": "$unit" + } + ], + "messages": [ + { + "type": 0, + "speech": [] + } + ], + "defaultResponsePlatforms": {} + } + ], + "priority": 500000, + "webhookUsed": false, + "webhookForSlotFilling": false, + "fallbackIntent": false, + "events": [] +} \ No newline at end of file diff --git a/data/intents/date.until.json b/data/intents/date.until.json new file mode 100755 index 0000000..f40028b --- /dev/null +++ b/data/intents/date.until.json @@ -0,0 +1,328 @@ +{ + "userSays": [ + { + "id": "493e7b43-619a-42e6-b48b-f451491119ae", + "data": [ + { + "text": "how many " + }, + { + "text": "months", + "alias": "unit", + "meta": "@unit-time", + "userDefined": true + }, + { + "text": " till " + }, + { + "text": "New Year", + "alias": "date", + "meta": "@sys.date", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "e66f5984-f5c1-4c6f-b51a-2e472de73319", + "data": [ + { + "text": "how many " + }, + { + "text": "days", + "alias": "unit", + "meta": "@unit-time", + "userDefined": true + }, + { + "text": " until " + }, + { + "text": "Friday", + "alias": "date", + "meta": "@sys.date", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "688a7bf0-a5d7-4add-be42-b7617920962e", + "data": [ + { + "text": "calculate number of " + }, + { + "text": "days", + "alias": "unit", + "meta": "@unit-time", + "userDefined": true + }, + { + "text": " before " + }, + { + "text": "July 22", + "alias": "date", + "meta": "@sys.date", + "userDefined": true + } + ], + "isTemplate": false, + "count": 1 + }, + { + "id": "0ad85dc3-7940-4e12-92a1-9b4c942c051b", + "data": [ + { + "text": "check how many " + }, + { + "text": "weeks", + "alias": "unit", + "meta": "@unit-time", + "userDefined": true + }, + { + "text": " till " + }, + { + "text": "September 5th", + "alias": "date", + "meta": "@sys.date", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "60342861-ec10-4f90-84c5-f8e7fced8b3f", + "data": [ + { + "text": "how many " + }, + { + "text": "hours", + "alias": "unit", + "meta": "@unit-time", + "userDefined": true + }, + { + "text": " until " + }, + { + "text": "tomorrow", + "alias": "date", + "meta": "@sys.date", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "8574f41f-49da-48ea-9702-797f069c98fa", + "data": [ + { + "text": "how many " + }, + { + "text": "weeks", + "alias": "unit", + "meta": "@unit-time", + "userDefined": true + }, + { + "text": " is it until " + }, + { + "text": "next month", + "alias": "date", + "meta": "@sys.date", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "7acbc56a-3bdc-40d1-9a3a-86bb3afedae5", + "data": [ + { + "text": "how long until " + }, + { + "text": "November 13", + "alias": "date", + "meta": "@sys.date", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "9398fb31-e575-411c-a963-e26fb50b0681", + "data": [ + { + "text": "number of " + }, + { + "text": "days", + "alias": "unit", + "meta": "@unit-time", + "userDefined": true + }, + { + "text": " before the " + }, + { + "text": "end of the month", + "alias": "date", + "meta": "@sys.date", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "8150739a-c85b-4c1e-9b10-b23424f4ef65", + "data": [ + { + "text": "days", + "alias": "unit", + "meta": "@unit-time", + "userDefined": true + }, + { + "text": " until " + }, + { + "text": "January 1st", + "alias": "date", + "meta": "@sys.date", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "7e9bd85f-aba5-4b97-ab72-6c7a985c2603", + "data": [ + { + "text": "tell me how many " + }, + { + "text": "weeks", + "alias": "unit", + "meta": "@unit-time", + "userDefined": true + }, + { + "text": " do we have before " + }, + { + "text": "April 11th", + "alias": "date", + "meta": "@sys.date", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "1ece9056-5356-431e-bbb0-dce2fa166b2e", + "data": [ + { + "text": "count how many " + }, + { + "text": "months", + "alias": "unit", + "meta": "@unit-time", + "userDefined": true + }, + { + "text": " is it before " + }, + { + "text": "December 2020", + "alias": "date", + "meta": "@sys.date", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "09d2e030-b5a0-4c19-bc8d-abb54ccaed9f", + "data": [ + { + "text": "how many " + }, + { + "text": "days", + "alias": "unit", + "meta": "@unit-time", + "userDefined": true + }, + { + "text": " left till the " + }, + { + "text": "end of the year", + "alias": "date", + "meta": "@sys.date", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + } + ], + "id": "3ba82076-16d4-4d54-99f2-ba0f97345486", + "name": "date.until", + "auto": true, + "contexts": [], + "responses": [ + { + "resetContexts": false, + "action": "date.until", + "affectedContexts": [], + "parameters": [ + { + "dataType": "@sys.date", + "name": "date", + "value": "$date" + }, + { + "dataType": "@unit-time", + "name": "unit", + "value": "$unit", + "isList": false + } + ], + "messages": [ + { + "type": 0, + "speech": [] + } + ], + "defaultResponsePlatforms": {} + } + ], + "priority": 500000, + "webhookUsed": false, + "webhookForSlotFilling": false, + "fallbackIntent": false, + "events": [] +} \ No newline at end of file diff --git a/data/intents/date.year.check.json b/data/intents/date.year.check.json new file mode 100755 index 0000000..ffeb5e2 --- /dev/null +++ b/data/intents/date.year.check.json @@ -0,0 +1,194 @@ +{ + "userSays": [ + { + "id": "9ceeca5c-03a2-43c5-ad9e-5abc042b5c77", + "data": [ + { + "text": "now it\u0027s " + }, + { + "text": "1989", + "alias": "date-period", + "meta": "@sys.date-period", + "userDefined": true + }, + { + "text": " year right" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "654232cb-a244-4708-bdf1-3287e63c4eb9", + "data": [ + { + "text": "is nowadays " + }, + { + "text": "1990", + "alias": "date-period", + "meta": "@sys.date-period", + "userDefined": true + }, + { + "text": " year" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "dd21c92e-824f-46f9-8b4f-5366d76f1943", + "data": [ + { + "text": "tell me if it\u0027s year " + }, + { + "text": "2018", + "alias": "date-period", + "meta": "@sys.date-period", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "eaf485fd-0ad1-4d81-ae9e-e23058f20b71", + "data": [ + { + "text": "it\u0027s " + }, + { + "text": "2019", + "alias": "date-period", + "meta": "@sys.date-period", + "userDefined": true + }, + { + "text": " isn\u0027t it" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "d8389c0f-8094-4bbc-a264-8ac90e10d01c", + "data": [ + { + "text": "is " + }, + { + "text": "it", + "meta": "@sys.ignore", + "userDefined": true + }, + { + "text": " " + }, + { + "text": "2015", + "alias": "date-period", + "meta": "@sys.date-period", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "68f2595c-c8c8-48a6-8a82-e5f7c454ab0b", + "data": [ + { + "text": "is " + }, + { + "text": "it", + "meta": "@sys.ignore", + "userDefined": true + }, + { + "text": " " + }, + { + "text": "year", + "meta": "@sys.ignore", + "userDefined": true + }, + { + "text": " " + }, + { + "text": "2017", + "alias": "date-period", + "meta": "@sys.date-period", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "ee66ebee-2cbc-449d-8ddd-3240c6df4ab1", + "data": [ + { + "text": "check if " + }, + { + "text": "it", + "meta": "@sys.ignore", + "userDefined": true + }, + { + "text": "\u0027s " + }, + { + "text": "year", + "meta": "@sys.ignore", + "userDefined": true + }, + { + "text": " " + }, + { + "text": "2016", + "alias": "date-period", + "meta": "@sys.date-period", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + } + ], + "id": "df0a36bc-f4bc-45bd-9770-1dec0d384f03", + "name": "date.year.check", + "auto": true, + "contexts": [], + "responses": [ + { + "resetContexts": false, + "action": "date.year.check", + "affectedContexts": [], + "parameters": [ + { + "dataType": "@sys.date-period", + "name": "date-period", + "value": "$date-period" + } + ], + "messages": [ + { + "type": 0, + "speech": [] + } + ] + } + ], + "priority": 500000, + "webhookUsed": false, + "webhookForSlotFilling": false, + "fallbackIntent": false, + "events": [] +} \ No newline at end of file diff --git a/data/intents/date.year.get.json b/data/intents/date.year.get.json new file mode 100755 index 0000000..3ce054a --- /dev/null +++ b/data/intents/date.year.get.json @@ -0,0 +1,177 @@ +{ + "userSays": [ + { + "id": "966424a0-ddb6-4ac5-a75a-7ad63422e947", + "data": [ + { + "text": "I wonder which " + }, + { + "text": "year", + "meta": "@sys.ignore", + "userDefined": false + }, + { + "text": " are " + }, + { + "text": "we", + "meta": "@sys.ignore", + "userDefined": false + }, + { + "text": " in" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "d39552b1-cc18-49c8-870a-af89b194a187", + "data": [ + { + "text": "what year is it" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "a9b428c9-fdb0-4a6c-b3f7-5e5b60416176", + "data": [ + { + "text": "what is the current " + }, + { + "text": "year", + "meta": "@sys.ignore", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "2318c059-7bc6-43fb-a097-5fbf96472d48", + "data": [ + { + "text": "what " + }, + { + "text": "year", + "meta": "@sys.ignore", + "userDefined": true + }, + { + "text": " is " + }, + { + "text": "it", + "meta": "@sys.ignore", + "userDefined": true + }, + { + "text": " " + }, + { + "text": "today", + "meta": "@sys.ignore", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "8136b297-c8d1-42fa-bb6f-5b55e233f03c", + "data": [ + { + "text": "tell me the current " + }, + { + "text": "year", + "meta": "@sys.ignore", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "6e85e6a8-7482-4d5d-9fe4-81f27e34280d", + "data": [ + { + "text": "I want " + }, + { + "text": "to", + "meta": "@sys.ignore", + "userDefined": false + }, + { + "text": " know " + }, + { + "text": "the", + "meta": "@sys.ignore", + "userDefined": false + }, + { + "text": " " + }, + { + "text": "current year", + "meta": "@sys.ignore", + "userDefined": false + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "fa07262d-e6f6-44c7-81da-ce477991854a", + "data": [ + { + "text": "year now" + } + ], + "isTemplate": false, + "count": 1 + }, + { + "id": "91054a18-6ad3-4ba9-a976-b03b48e92555", + "data": [ + { + "text": "current year", + "meta": "@sys.ignore", + "userDefined": false + } + ], + "isTemplate": false, + "count": 0 + } + ], + "id": "b508b91d-7b72-4c3f-bb0e-aeefd2c29ed7", + "name": "date.year.get", + "auto": true, + "contexts": [], + "responses": [ + { + "resetContexts": false, + "action": "date.year.get", + "affectedContexts": [], + "parameters": [], + "messages": [ + { + "type": 0, + "speech": [] + } + ] + } + ], + "priority": 500000, + "webhookUsed": false, + "webhookForSlotFilling": false, + "fallbackIntent": false, + "events": [] +} \ No newline at end of file diff --git a/data/intents/time.check.json b/data/intents/time.check.json new file mode 100755 index 0000000..88e76d3 --- /dev/null +++ b/data/intents/time.check.json @@ -0,0 +1,324 @@ +{ + "userSays": [ + { + "id": "6f545a60-e465-455f-9cb0-ff60a2e8a821", + "data": [ + { + "text": "it\u0027s " + }, + { + "text": "5 o\u0027clock", + "alias": "time", + "meta": "@sys.time", + "userDefined": true + }, + { + "text": " in " + }, + { + "text": "London", + "alias": "location", + "meta": "@sys.location", + "userDefined": true + }, + { + "text": " right" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "ad8b0a3d-4552-48bf-a23e-ec0937c87332", + "data": [ + { + "text": "check if it\u0027s " + }, + { + "text": "9 pm", + "alias": "time", + "meta": "@sys.time", + "userDefined": false + }, + { + "text": " " + }, + { + "text": "in", + "meta": "@sys.ignore", + "userDefined": false + }, + { + "text": " " + }, + { + "text": "Amsterdam", + "alias": "location", + "meta": "@sys.location", + "userDefined": false + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "bbfc7d82-ead1-44fb-a618-d0057e36e27b", + "data": [ + { + "text": "can you take a look and check if it\u0027s " + }, + { + "text": "7 pm", + "alias": "time", + "meta": "@sys.time", + "userDefined": true + }, + { + "text": " in " + }, + { + "text": "Moscow", + "alias": "location", + "meta": "@sys.location", + "userDefined": true + }, + { + "text": " already" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "13aadda0-b3bb-4a2c-bcb7-3fb48a3069ec", + "data": [ + { + "text": "check if it\u0027s " + }, + { + "text": "6 am", + "alias": "time", + "meta": "@sys.time", + "userDefined": true + }, + { + "text": " in " + }, + { + "text": "Palo Alto", + "alias": "location", + "meta": "@sys.location", + "userDefined": true + }, + { + "text": " now" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "09ff41ce-f65b-409f-814a-0d6ae2517ee6", + "data": [ + { + "text": "is " + }, + { + "text": "it", + "meta": "@sys.ignore", + "userDefined": false + }, + { + "text": " " + }, + { + "text": "5 pm", + "alias": "time", + "meta": "@sys.time", + "userDefined": false + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "677ec7dc-4d40-498e-b94c-47cd911ad6a5", + "data": [ + { + "text": "is " + }, + { + "text": "it", + "meta": "@sys.ignore", + "userDefined": false + }, + { + "text": " " + }, + { + "text": "6 o\u0027clock", + "alias": "time", + "meta": "@sys.time", + "userDefined": false + }, + { + "text": " right now" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "9d8abf90-f412-4cf6-91c9-b8604ab6a167", + "data": [ + { + "text": "is " + }, + { + "text": "it", + "meta": "@sys.ignore", + "userDefined": false + }, + { + "text": " " + }, + { + "text": "5 o\u0027clock in the morning", + "alias": "time", + "meta": "@sys.time", + "userDefined": false + }, + { + "text": " now" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "c6b38a0a-e3ef-4c27-a4da-f37e452893c6", + "data": [ + { + "text": "is " + }, + { + "text": "it", + "meta": "@sys.ignore", + "userDefined": false + }, + { + "text": " " + }, + { + "text": "3 p m", + "alias": "time", + "meta": "@sys.time", + "userDefined": false + }, + { + "text": " in " + }, + { + "text": "London", + "alias": "location", + "meta": "@sys.location", + "userDefined": false + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "03487e60-7ead-47e2-9f80-de23747683ed", + "data": [ + { + "text": "is " + }, + { + "text": "it", + "meta": "@sys.ignore", + "userDefined": false + }, + { + "text": " " + }, + { + "text": "4 pm", + "alias": "time", + "meta": "@sys.time", + "userDefined": false + }, + { + "text": " in " + }, + { + "text": "New York", + "alias": "location", + "meta": "@sys.location", + "userDefined": false + }, + { + "text": " now" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "5e5cc6fb-3eb0-4a83-87fa-e8214bd81ee9", + "data": [ + { + "text": "check if it\u0027s " + }, + { + "text": "5 pm", + "alias": "time", + "meta": "@sys.time", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + } + ], + "id": "6c9dab2c-351f-4a4c-98e5-49b8dc5d8b05", + "name": "time.check", + "auto": true, + "contexts": [], + "responses": [ + { + "resetContexts": false, + "action": "time.check", + "affectedContexts": [ + { + "name": "time", + "parameters": {}, + "lifespan": 5 + } + ], + "parameters": [ + { + "dataType": "@sys.time", + "name": "time", + "value": "$time" + }, + { + "dataType": "@sys.location", + "name": "location", + "value": "$location" + } + ], + "messages": [ + { + "type": 0, + "speech": [] + } + ] + } + ], + "priority": 500000, + "webhookUsed": false, + "webhookForSlotFilling": false, + "fallbackIntent": false, + "events": [] +} \ No newline at end of file diff --git a/data/intents/time.convert.json b/data/intents/time.convert.json new file mode 100755 index 0000000..d30c86b --- /dev/null +++ b/data/intents/time.convert.json @@ -0,0 +1,466 @@ +{ + "userSays": [ + { + "id": "94945295-f6fe-4301-8147-c81b4b3b06ca", + "data": [ + { + "text": "what time is it in " + }, + { + "text": "LA", + "alias": "location-to", + "meta": "@sys.location", + "userDefined": true + }, + { + "text": " when it\u0027s " + }, + { + "text": "midday", + "alias": "time-from", + "meta": "@sys.time", + "userDefined": true + }, + { + "text": " in " + }, + { + "text": "Moscow", + "alias": "location-from", + "meta": "@sys.location", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "4b5697f8-6fd1-42d2-9866-fc9e08a32024", + "data": [ + { + "text": "can", + "meta": "@sys.ignore", + "userDefined": false + }, + { + "text": " you convert time" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "6756fed6-8e8d-4992-af20-5227991fe792", + "data": [ + { + "text": "I want to convert time" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "342d544b-a9c8-4d25-bfe7-6505f3714cc1", + "data": [ + { + "text": "time converter" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "4b332847-f850-46f9-b394-37a3b3acc93b", + "data": [ + { + "text": "what " + }, + { + "text": "time", + "meta": "@sys.ignore", + "userDefined": true + }, + { + "text": " is " + }, + { + "text": "in", + "meta": "@sys.ignore", + "userDefined": true + }, + { + "text": " " + }, + { + "text": "Moscow", + "alias": "location-to", + "meta": "@sys.location", + "userDefined": true + }, + { + "text": " " + }, + { + "text": "when", + "meta": "@sys.ignore", + "userDefined": true + }, + { + "text": " " + }, + { + "text": "it", + "meta": "@sys.ignore", + "userDefined": true + }, + { + "text": "\u0027s " + }, + { + "text": "5 am", + "alias": "time-from", + "meta": "@sys.time", + "userDefined": true + }, + { + "text": " " + }, + { + "text": "in", + "meta": "@sys.ignore", + "userDefined": true + }, + { + "text": " " + }, + { + "text": "Palo Alto", + "alias": "location-from", + "meta": "@sys.location", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "0078194f-3448-46dc-aec1-91edfd99474a", + "data": [ + { + "text": "what time is in " + }, + { + "text": "London", + "alias": "location-to", + "meta": "@sys.location", + "userDefined": true + }, + { + "text": " when " + }, + { + "text": "it", + "meta": "@sys.ignore", + "userDefined": true + }, + { + "text": " is " + }, + { + "text": "5 pm", + "alias": "time-from", + "meta": "@sys.time", + "userDefined": true + }, + { + "text": " in " + }, + { + "text": "New York", + "alias": "location-from", + "meta": "@sys.location", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "5952e687-8cf0-40b2-bfea-50052f8d0b3f", + "data": [ + { + "text": "when " + }, + { + "text": "it\u0027s", + "meta": "@sys.ignore", + "userDefined": true + }, + { + "text": " " + }, + { + "text": "6 am", + "alias": "time-from", + "meta": "@sys.time", + "userDefined": true + }, + { + "text": " in " + }, + { + "text": "Moscow", + "alias": "location-from", + "meta": "@sys.location", + "userDefined": true + }, + { + "text": " what time is " + }, + { + "text": "it", + "meta": "@sys.ignore", + "userDefined": true + }, + { + "text": " in " + }, + { + "text": "Tokyo", + "alias": "location-to", + "meta": "@sys.location", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "fb5d0a1f-f28e-492c-8eb4-25a978128985", + "data": [ + { + "text": "what time is in " + }, + { + "text": "France", + "alias": "location-to", + "meta": "@sys.location", + "userDefined": true + }, + { + "text": " when " + }, + { + "text": "it", + "meta": "@sys.ignore", + "userDefined": true + }, + { + "text": " is " + }, + { + "text": "6 am", + "alias": "time-from", + "meta": "@sys.time", + "userDefined": true + }, + { + "text": " in " + }, + { + "text": "Portugal", + "alias": "location-from", + "meta": "@sys.location", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "fe51b137-7553-41b1-bf21-48b8a5f8fe23", + "data": [ + { + "text": "when " + }, + { + "text": "it\u0027s", + "meta": "@sys.ignore", + "userDefined": true + }, + { + "text": " " + }, + { + "text": "11 a.m.", + "alias": "time-from", + "meta": "@sys.time", + "userDefined": true + }, + { + "text": " in " + }, + { + "text": "USA", + "alias": "location-from", + "meta": "@sys.location", + "userDefined": true + }, + { + "text": " what time is " + }, + { + "text": "it", + "meta": "@sys.ignore", + "userDefined": true + }, + { + "text": " in " + }, + { + "text": "Australia", + "alias": "location-to", + "meta": "@sys.location", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "8a90f73b-7c82-40a1-84b6-a1e50812944d", + "data": [ + { + "text": "convert " + }, + { + "text": "Moscow", + "alias": "location-from", + "meta": "@sys.location", + "userDefined": true + }, + { + "text": " time in " + }, + { + "text": "Tokyo", + "alias": "location-to", + "meta": "@sys.location", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "cf696578-b924-4795-9514-45c4acccf4f2", + "data": [ + { + "text": "convert " + }, + { + "text": "London", + "alias": "location-from", + "meta": "@sys.location", + "userDefined": true + }, + { + "text": " time" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "772d6f71-32aa-47af-aed7-b259174ec637", + "data": [ + { + "text": "convert time" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "894eee9c-3233-4872-ba3d-87f69cc66f85", + "data": [ + { + "text": "what time is it in " + }, + { + "text": "Miami", + "alias": "location-to", + "meta": "@sys.location", + "userDefined": true + }, + { + "text": " when it\u0027s " + }, + { + "text": "11 am", + "alias": "time-from", + "meta": "@sys.time", + "userDefined": true + }, + { + "text": " in " + }, + { + "text": "Tbilisi", + "alias": "location-from", + "meta": "@sys.location", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + } + ], + "id": "59174733-e8e2-4a5e-adfc-7b65234aa0f0", + "name": "time.convert", + "auto": true, + "contexts": [], + "responses": [ + { + "resetContexts": false, + "action": "time.convert", + "affectedContexts": [ + { + "name": "convert-time", + "parameters": {}, + "lifespan": 5 + } + ], + "parameters": [ + { + "required": false, + "dataType": "@sys.time", + "name": "time-from", + "value": "$time-from", + "defaultValue": "" + }, + { + "dataType": "@sys.location", + "name": "location-from", + "value": "$location-from" + }, + { + "dataType": "@sys.location", + "name": "location-to", + "value": "$location-to" + } + ], + "messages": [ + { + "type": 0, + "speech": [] + } + ] + } + ], + "priority": 500000, + "webhookUsed": false, + "webhookForSlotFilling": false, + "fallbackIntent": false, + "events": [] +} \ No newline at end of file diff --git a/data/intents/time.get.json b/data/intents/time.get.json new file mode 100755 index 0000000..32a7bb5 --- /dev/null +++ b/data/intents/time.get.json @@ -0,0 +1,1385 @@ +{ + "userSays": [ + { + "id": "6acb0228-7a7b-49f7-a545-05132dfac00d", + "data": [ + { + "text": "hey " + }, + { + "text": "what\u0027s", + "meta": "@sys.ignore", + "userDefined": false + }, + { + "text": " the time now" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "f9661312-0479-46d6-9b53-fb72cc068c11", + "data": [ + { + "text": "so what time is " + }, + { + "text": "it", + "meta": "@sys.ignore", + "userDefined": false + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "ad14992b-178c-4c27-b7f8-4389eb1e553b", + "data": [ + { + "text": "what is the time " + }, + { + "text": "right now", + "meta": "@sys.ignore", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "b28d4280-f389-4c95-b0ca-0bd1da0eadd4", + "data": [ + { + "text": "what time is " + }, + { + "text": "it", + "meta": "@sys.ignore", + "userDefined": true + }, + { + "text": " my clock doesn\u0027t " + }, + { + "text": "work", + "meta": "@sys.ignore", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "ad45a7cc-1e8f-4dd4-b6c7-c76e22646c60", + "data": [ + { + "text": "what time is it in " + }, + { + "text": "Mountain View", + "alias": "location", + "meta": "@sys.location", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "2c7e7a07-cfff-496b-add7-94c51ba5e198", + "data": [ + { + "text": "what\u0027s", + "meta": "@sys.ignore", + "userDefined": false + }, + { + "text": " the time " + }, + { + "text": "right now", + "meta": "@sys.ignore", + "userDefined": false + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "1a471c1a-f7b5-4184-a750-048501a59c3a", + "data": [ + { + "text": "can you tell me the time" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "809057a7-fb68-4ac0-8234-0b1b8d4ad44c", + "data": [ + { + "text": "is " + }, + { + "text": "it", + "meta": "@sys.ignore", + "userDefined": false + }, + { + "text": " " + }, + { + "text": "late", + "meta": "@sys.ignore", + "userDefined": false + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "39cb377f-cdd8-4249-91e2-dbf057a61575", + "data": [ + { + "text": "ok what is the time" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "6713bfcd-b9a3-4e45-bb23-fb5708de3471", + "data": [ + { + "text": "can you tell me what time is " + }, + { + "text": "it", + "meta": "@sys.ignore", + "userDefined": false + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "b243ef79-635d-43df-a624-0cc96ce8ed5d", + "data": [ + { + "text": "time clock" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "02e34b1e-e1be-4857-b49e-77529265b5e5", + "data": [ + { + "text": "check the " + }, + { + "text": "current", + "meta": "@sys.ignore", + "userDefined": true + }, + { + "text": " time" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "e4513960-6fb1-461b-ab2c-116a4de84aee", + "data": [ + { + "text": "alright what time" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "5889f115-7c18-41dd-83d4-d07cb84a5e2a", + "data": [ + { + "text": "what time is " + }, + { + "text": "it", + "meta": "@sys.ignore", + "userDefined": false + }, + { + "text": " please" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "d3b9af61-e83f-4d78-8989-76b1f85cfe7e", + "data": [ + { + "text": "ok what time" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "c3be0591-7307-4bee-9b2c-b18940c9240c", + "data": [ + { + "text": "tell me the time" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "1031feb9-455d-4eb3-8535-923bf0a1b96b", + "data": [ + { + "text": "time in " + }, + { + "text": "London", + "alias": "location", + "meta": "@sys.location", + "userDefined": false + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "b0ccdda9-11eb-4a5f-9202-4064d7757114", + "data": [ + { + "text": "what\u0027s the time now" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "73046878-a108-46f8-abd1-962148776ae4", + "data": [ + { + "text": "can you tell the time" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "8f0a9d3e-9fc9-4f58-a9dd-92ea9edd4d01", + "data": [ + { + "text": "can you tell me what time is it" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "7157e0e7-28bf-4ea7-bab0-03c8ab65010e", + "data": [ + { + "text": "show me what time is " + }, + { + "text": "it", + "meta": "@sys.ignore", + "userDefined": false + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "d919b283-d464-4770-b92e-3cfbc87e68dd", + "data": [ + { + "text": "ok " + }, + { + "text": "what\u0027s", + "meta": "@sys.ignore", + "userDefined": false + }, + { + "text": " the time" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "862c877e-af20-4652-8f73-bbe85de7cc35", + "data": [ + { + "text": "current", + "meta": "@sys.ignore", + "userDefined": true + }, + { + "text": " time" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "78fa4dd6-0926-4eb6-b4c2-ae131e0e172b", + "data": [ + { + "text": "what\u0027s", + "meta": "@sys.ignore", + "userDefined": false + }, + { + "text": " the time please" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "ecbf6c72-95bc-402c-a197-651ded5add15", + "data": [ + { + "text": "what is the time now" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "2828f26d-dd30-42b0-87b8-d36567ba112e", + "data": [ + { + "text": "I said what time is " + }, + { + "text": "it", + "meta": "@sys.ignore", + "userDefined": false + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "d3825da8-f7e4-495d-a58d-c19a1bdff9bc", + "data": [ + { + "text": "hello", + "meta": "@sys.ignore", + "userDefined": false + }, + { + "text": " " + }, + { + "text": "what\u0027s", + "meta": "@sys.ignore", + "userDefined": false + }, + { + "text": " the time" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "56b208e1-cc6e-44fe-88ed-b8312f59e8e3", + "data": [ + { + "text": "tell me what time is it" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "c634da57-6e5c-4f10-bd4e-fb25b05b6041", + "data": [ + { + "text": "clock" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "6ce71ce2-2971-4e88-a708-de1d0df4dcfb", + "data": [ + { + "text": "what\u0027s the time in " + }, + { + "text": "New York", + "alias": "location", + "meta": "@sys.location", + "userDefined": false + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "4fa5b100-9164-4922-a361-a90a001f8f42", + "data": [ + { + "text": "time " + }, + { + "text": "right now", + "meta": "@sys.ignore", + "userDefined": false + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "117186e4-3db3-4a0f-a8dd-284d7ef069f8", + "data": [ + { + "text": "tell me what is the time now" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "013d005f-c4d6-404c-b25d-d61c7123e48b", + "data": [ + { + "text": "what time " + }, + { + "text": "it", + "meta": "@sys.ignore", + "userDefined": true + }, + { + "text": " is" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "3d3c171e-20d6-4777-9430-cf4595ee260a", + "data": [ + { + "text": "you know what time is " + }, + { + "text": "it", + "meta": "@sys.ignore", + "userDefined": false + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "d37bf338-9a08-4888-830a-41c62aef7995", + "data": [ + { + "text": "London", + "alias": "location", + "meta": "@sys.location", + "userDefined": true + }, + { + "text": " time right now" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "c8340818-9926-497a-95ca-35348064a3fd", + "data": [ + { + "text": "tell me the time in " + }, + { + "text": "Bangalore", + "alias": "location", + "meta": "@sys.location", + "userDefined": false + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "0bcf9283-fc2f-4327-ae2e-13615b8f2104", + "data": [ + { + "text": "show me the time" + } + ], + "isTemplate": false, + "count": 1 + }, + { + "id": "daa116d9-da44-4322-8699-56a41b128846", + "data": [ + { + "text": "what\u0027s the time in " + }, + { + "text": "London", + "alias": "location", + "meta": "@sys.location", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "3e6a63d4-b625-41af-a639-210daf972f7d", + "data": [ + { + "text": "what\u0027s", + "meta": "@sys.ignore", + "userDefined": false + }, + { + "text": " time " + }, + { + "text": "right now", + "meta": "@sys.ignore", + "userDefined": false + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "9ad8dfd2-94d6-423b-9d11-fb9c824e8ae5", + "data": [ + { + "text": "tell the time" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "2d16666d-70ff-451d-99ad-7f1fe86390d7", + "data": [ + { + "text": "what time " + }, + { + "text": "right now", + "meta": "@sys.ignore", + "userDefined": false + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "15e7ac91-b5b7-4403-a292-7a9633ca86bc", + "data": [ + { + "text": "what\u0027s the time" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "88e921dc-c153-4aa9-9988-334bbc61873f", + "data": [ + { + "text": "what time is it" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "79715a3b-1ac6-43d2-9422-b501c973c79d", + "data": [ + { + "text": "check time" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "38472cd4-1146-4464-bdef-df432d201542", + "data": [ + { + "text": "what time is " + }, + { + "text": "it", + "meta": "@sys.ignore", + "userDefined": false + }, + { + "text": " " + }, + { + "text": "here", + "meta": "@sys.ignore", + "userDefined": false + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "36b499e5-075c-4786-8fd8-b25d0c3422de", + "data": [ + { + "text": "how much time is " + }, + { + "text": "it", + "meta": "@sys.ignore", + "userDefined": false + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "bd907166-c834-48e7-abe0-117035afa8a1", + "data": [ + { + "text": "is " + }, + { + "text": "it", + "meta": "@sys.ignore", + "userDefined": false + }, + { + "text": " too " + }, + { + "text": "late", + "meta": "@sys.ignore", + "userDefined": false + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "29fbd454-2f1e-43b6-a7ef-f4d095b5de35", + "data": [ + { + "text": "you know what time " + }, + { + "text": "it", + "meta": "@sys.ignore", + "userDefined": false + }, + { + "text": " is" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "264ab4d2-7f43-40b4-8833-593670d23c19", + "data": [ + { + "text": "hello", + "meta": "@sys.ignore", + "userDefined": false + }, + { + "text": " what time is " + }, + { + "text": "it", + "meta": "@sys.ignore", + "userDefined": false + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "2dc5a8d6-c5d1-4d00-8296-9a21bbd3d3f3", + "data": [ + { + "text": "please tell me the time" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "5864b627-df1b-4781-91d5-e3a39dd9223e", + "data": [ + { + "text": "ok what time is " + }, + { + "text": "it", + "meta": "@sys.ignore", + "userDefined": false + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "9fadbd3b-b965-4e5b-9679-712d0e9cddd0", + "data": [ + { + "text": "what time is " + }, + { + "text": "it", + "meta": "@sys.ignore", + "userDefined": false + }, + { + "text": " in " + }, + { + "text": "New York", + "alias": "location", + "meta": "@sys.location", + "userDefined": false + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "171f5b7c-fc18-4acc-83e0-fe6c2991bd6f", + "data": [ + { + "text": "is " + }, + { + "text": "it", + "meta": "@sys.ignore", + "userDefined": false + }, + { + "text": " " + }, + { + "text": "late", + "meta": "@sys.ignore", + "userDefined": false + }, + { + "text": " in " + }, + { + "text": "Paris", + "alias": "location", + "meta": "@sys.location", + "userDefined": false + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "faf14210-2104-45f7-8d96-2545b5cdfba7", + "data": [ + { + "text": "and what time is " + }, + { + "text": "it", + "meta": "@sys.ignore", + "userDefined": false + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "2550f3d7-17c1-4a66-b80d-da87a964f871", + "data": [ + { + "text": "what time is " + }, + { + "text": "it", + "meta": "@sys.ignore", + "userDefined": true + }, + { + "text": " now" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "3cdf0a7d-9536-474b-98e4-97fb1ccbcc07", + "data": [ + { + "text": "what is the time in" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "53cdf10c-dd1a-4371-8a0b-32168e837e6a", + "data": [ + { + "text": "what time is " + }, + { + "text": "it", + "meta": "@sys.ignore", + "userDefined": true + }, + { + "text": " in " + }, + { + "text": "London", + "alias": "location", + "meta": "@sys.location", + "userDefined": true + } + ], + "isTemplate": false, + "count": 1 + }, + { + "id": "8271e14e-6883-4ab5-b446-dd17519ee9a9", + "data": [ + { + "text": "what is the time" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "b3619309-fdda-464f-a632-f4c9792086da", + "data": [ + { + "text": "what time is " + }, + { + "text": "it", + "meta": "@sys.ignore", + "userDefined": false + }, + { + "text": " there" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "54219a84-02e4-45f1-8049-7b55c69a1ee9", + "data": [ + { + "text": "what time is that" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "f56b27af-27e5-4e4a-b37b-4725ad52518f", + "data": [ + { + "text": "tell me the time please" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "e85605ad-8710-4d16-9e5b-9dbfc66bec47", + "data": [ + { + "text": "what\u0027s", + "meta": "@sys.ignore", + "userDefined": true + }, + { + "text": " the time" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "caf87aba-dde1-491c-bce8-ec1b0262483a", + "data": [ + { + "text": "time check" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "15e51b77-1cad-400d-a8ff-9a03275f2c38", + "data": [ + { + "text": "what is the time in " + }, + { + "text": "New York", + "alias": "location", + "meta": "@sys.location", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "ce1d21af-6bf8-4780-aa44-02c439d883b3", + "data": [ + { + "text": "do you know what time is " + }, + { + "text": "it", + "meta": "@sys.ignore", + "userDefined": false + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "632fa0b2-a8e4-438a-93dc-d5ba0de119e0", + "data": [ + { + "text": "is " + }, + { + "text": "it", + "meta": "@sys.ignore", + "userDefined": false + }, + { + "text": " getting " + }, + { + "text": "late", + "meta": "@sys.ignore", + "userDefined": false + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "5147bd5d-3250-4bdf-a64c-0acabb01dde7", + "data": [ + { + "text": "so " + }, + { + "text": "what\u0027s", + "meta": "@sys.ignore", + "userDefined": false + }, + { + "text": " the time" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "031d20a7-5be1-46b2-b3d6-a631599df36e", + "data": [ + { + "text": "show me the clock" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "0bc599eb-7bd3-4a0b-b6c8-185efad04041", + "data": [ + { + "text": "what is the " + }, + { + "text": "current", + "meta": "@sys.ignore", + "userDefined": false + }, + { + "text": " time" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "e000eaf2-2c3e-481b-9b54-8e78b0afeef9", + "data": [ + { + "text": "what\u0027s", + "meta": "@sys.ignore", + "userDefined": false + }, + { + "text": " the time in" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "9d348007-600f-4369-8ca5-0ef342601bf2", + "data": [ + { + "text": "tell me what time is " + }, + { + "text": "it", + "meta": "@sys.ignore", + "userDefined": false + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "c91406f3-195d-49a7-b9ef-9f76540804b1", + "data": [ + { + "text": "do you know what time " + }, + { + "text": "it", + "meta": "@sys.ignore", + "userDefined": false + }, + { + "text": " is" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "9e7b1a34-2547-4589-85b9-04d447fc72f4", + "data": [ + { + "text": "what is time " + }, + { + "text": "right now", + "meta": "@sys.ignore", + "userDefined": false + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "e2606db0-08df-4f61-90b9-b17bf0eb29cf", + "data": [ + { + "text": "what time " + }, + { + "text": "it", + "meta": "@sys.ignore", + "userDefined": false + }, + { + "text": " is now" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "e42022c9-21c3-4295-ba05-7ecc00dec3a7", + "data": [ + { + "text": "time please" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "62e116f1-60de-4e4d-ba44-28d49e1a8387", + "data": [ + { + "text": "what is " + }, + { + "text": "New York", + "alias": "location", + "meta": "@sys.location", + "userDefined": true + }, + { + "text": " time" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "98a2f817-e90a-4986-8212-bd83baf92a77", + "data": [ + { + "text": "hey what time is " + }, + { + "text": "it", + "meta": "@sys.ignore", + "userDefined": false + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "186bf97d-9feb-46f2-90eb-2fd4f3f20592", + "data": [ + { + "text": "what is the exact time" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "e4b1ee08-667a-4ff7-922a-c9a185bed557", + "data": [ + { + "text": "do u know what time is" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "4299e27d-bd1b-490d-a5bb-830f3ea574da", + "data": [ + { + "text": "current time in " + }, + { + "text": "New York", + "alias": "location", + "meta": "@sys.location", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "8665cda5-97d1-4ff7-8668-4ada5c0b7ce7", + "data": [ + { + "text": "what the time now" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "b634326e-d214-4536-85a2-a39a0d274d23", + "data": [ + { + "text": "Vegas", + "alias": "location", + "meta": "@sys.location", + "userDefined": false + }, + { + "text": " " + }, + { + "text": "time now", + "meta": "@sys.ignore", + "userDefined": false + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "ecd893a2-ab7d-4f50-a555-86c4e8e4147d", + "data": [ + { + "text": "so " + }, + { + "text": "what\u0027s", + "meta": "@sys.ignore", + "userDefined": false + }, + { + "text": " the time now" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "0a11c1cc-59c6-47a2-bc2e-163ec9b04b44", + "data": [ + { + "text": "so what time is " + }, + { + "text": "it", + "meta": "@sys.ignore", + "userDefined": false + }, + { + "text": " now" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "b41a0673-09e3-407f-bd5f-0e6f130781c1", + "data": [ + { + "text": "do you know the time" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "8fde33c0-5d06-49af-9d5a-4c2618d02ba7", + "data": [ + { + "text": "what time is " + }, + { + "text": "it", + "meta": "@sys.ignore", + "userDefined": false + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "091597d7-71d6-49dc-b845-0cf6987f74d0", + "data": [ + { + "text": "what time is " + }, + { + "text": "it", + "meta": "@sys.ignore", + "userDefined": true + }, + { + "text": " " + }, + { + "text": "right now", + "meta": "@sys.ignore", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "a7a850b8-9ca3-42a5-b8bd-478b9e86ffdd", + "data": [ + { + "text": "what\u0027s", + "meta": "@sys.ignore", + "userDefined": true + }, + { + "text": " time now" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "2d789761-5d54-498c-9e92-db5fecdc13f2", + "data": [ + { + "text": "time" + } + ], + "isTemplate": false, + "count": 0 + } + ], + "id": "8183dd29-f3be-4839-b604-d97d4aaaa0aa", + "name": "time.get", + "auto": true, + "contexts": [], + "responses": [ + { + "resetContexts": false, + "action": "time.get", + "affectedContexts": [ + { + "name": "time", + "parameters": {}, + "lifespan": 5 + } + ], + "parameters": [ + { + "dataType": "@sys.location", + "name": "location", + "value": "$location" + } + ], + "messages": [ + { + "type": 0, + "speech": [] + } + ] + } + ], + "priority": 500000, + "webhookUsed": false, + "webhookForSlotFilling": false, + "fallbackIntent": false, + "events": [] +} \ No newline at end of file diff --git a/data/intents/time.time_difference.json b/data/intents/time.time_difference.json new file mode 100755 index 0000000..3fe55e2 --- /dev/null +++ b/data/intents/time.time_difference.json @@ -0,0 +1,340 @@ +{ + "userSays": [ + { + "id": "5f7cca0f-0872-4831-8a6a-019dccc6a5bd", + "data": [ + { + "text": "find time difference " + }, + { + "text": "Paris", + "alias": "location-1", + "meta": "@sys.location", + "userDefined": true + }, + { + "text": " " + }, + { + "text": "Milan", + "alias": "location-2", + "meta": "@sys.location", + "userDefined": true + } + ], + "isTemplate": false, + "count": 4 + }, + { + "id": "0277c606-1340-47a4-b01d-7f5ee1ddb2eb", + "data": [ + { + "text": "find time difference ", + "userDefined": false + }, + { + "text": "Paris", + "alias": "location-1", + "meta": "@sys.location", + "userDefined": false + }, + { + "text": " ", + "userDefined": false + }, + { + "text": "Sydney", + "alias": "location-2", + "meta": "@sys.location", + "userDefined": false + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "c42f8371-dea5-4c75-a1e1-c3ad81618dbc", + "data": [ + { + "text": "find time difference " + }, + { + "text": "Los Angeles", + "alias": "location-1", + "meta": "@sys.location", + "userDefined": false + }, + { + "text": " " + }, + { + "text": "Sydney", + "alias": "location-2", + "meta": "@sys.location", + "userDefined": false + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "a2b5d12b-4bc0-4667-a57b-7b686ba56b97", + "data": [ + { + "text": "find time difference " + }, + { + "text": "Los Angeles", + "alias": "location-1", + "meta": "@sys.location", + "userDefined": false + }, + { + "text": " and " + }, + { + "text": "Sydney", + "alias": "location-2", + "meta": "@sys.location", + "userDefined": false + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "c9728678-55b6-40bf-bd65-0d8091745619", + "data": [ + { + "text": "what is the time difference between ", + "userDefined": false + }, + { + "text": "Los Angeles", + "alias": "location-1", + "meta": "@sys.location", + "userDefined": false + }, + { + "text": " and ", + "userDefined": false + }, + { + "text": "Sydney", + "alias": "location-2", + "meta": "@sys.location", + "userDefined": false + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "403d94e8-44d4-437c-ad97-50fdac80e188", + "data": [ + { + "text": "tell " + }, + { + "text": "me", + "meta": "@sys.ignore", + "userDefined": true + }, + { + "text": " " + }, + { + "text": "time", + "meta": "@sys.ignore", + "userDefined": true + }, + { + "text": " difference between " + }, + { + "text": "Singapore", + "alias": "location-1", + "meta": "@sys.location", + "userDefined": true + }, + { + "text": " and " + }, + { + "text": "Munich", + "alias": "location-2", + "meta": "@sys.location", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "78fa0f5c-851b-4b56-bcff-fd9bae577842", + "data": [ + { + "text": "time difference between " + }, + { + "text": "Moscow", + "alias": "location-1", + "meta": "@sys.location", + "userDefined": true + }, + { + "text": " and " + }, + { + "text": "London", + "alias": "location-2", + "meta": "@sys.location", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "2fdb132d-d98f-4486-8a63-0937a61de9df", + "data": [ + { + "text": "time difference " + }, + { + "text": "Tokyo", + "alias": "location-1", + "meta": "@sys.location", + "userDefined": true + }, + { + "text": " and " + }, + { + "text": "New York", + "alias": "location-2", + "meta": "@sys.location", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "cce17d12-9c52-4e87-a34d-1d8ceae381d6", + "data": [ + { + "text": "Dresden", + "alias": "location-1", + "meta": "@sys.location", + "userDefined": true + }, + { + "text": " and " + }, + { + "text": "New York", + "alias": "location-2", + "meta": "@sys.location", + "userDefined": true + }, + { + "text": " time difference" + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "29b0d3ea-76d5-4039-8bab-37fdda624246", + "data": [ + { + "text": "what is the time difference between " + }, + { + "text": "Tokyo", + "alias": "location-1", + "meta": "@sys.location", + "userDefined": true + }, + { + "text": " and " + }, + { + "text": "Berlin", + "alias": "location-2", + "meta": "@sys.location", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + }, + { + "id": "91961a31-f0ca-40e1-85a3-53517453578e", + "data": [ + { + "text": "tell me the time difference between " + }, + { + "text": "Amsterdam", + "alias": "location-1", + "meta": "@sys.location", + "userDefined": true + }, + { + "text": " and " + }, + { + "text": "London", + "alias": "location-2", + "meta": "@sys.location", + "userDefined": true + } + ], + "isTemplate": false, + "count": 0 + } + ], + "id": "63eb3eac-2493-4fa7-b5dd-057912f2daa3", + "name": "time.time_difference", + "auto": true, + "contexts": [], + "responses": [ + { + "resetContexts": false, + "action": "time.time_difference", + "affectedContexts": [ + { + "name": "time-difference", + "parameters": {}, + "lifespan": 5 + } + ], + "parameters": [ + { + "dataType": "@sys.location", + "name": "location-1", + "value": "$location-1" + }, + { + "dataType": "@sys.location", + "name": "location-2", + "value": "$location-2" + } + ], + "messages": [ + { + "type": 0, + "speech": [] + } + ], + "defaultResponsePlatforms": {} + } + ], + "priority": 500000, + "webhookUsed": false, + "webhookForSlotFilling": false, + "fallbackIntent": false, + "events": [] +} \ No newline at end of file diff --git a/nodemon.json b/nodemon.json new file mode 100644 index 0000000..a44d5b6 --- /dev/null +++ b/nodemon.json @@ -0,0 +1,7 @@ +{ + "verbose": false, + "ignore": [ + ".git", + "node_modules/**/node_modules" + ] +} diff --git a/package.json b/package.json index 949d712..6b3870f 100644 --- a/package.json +++ b/package.json @@ -4,8 +4,7 @@ "description": "Rxjs Websockets", "main": "index.js", "scripts": { - "start": "node index.js", - "test": "echo \"Error: no test specified\" && exit 1" + "start": "nodemon index.js" }, "author": "Vanco Stojkov ", "license": "ISC", @@ -15,6 +14,8 @@ "dotenv": "^4.0.0", "express": "^4.15.3", "moment": "^2.18.1", + "moment-timezone": "^0.5.13", + "request": "^2.81.0", "rxjs": "^5.4.2", "uuid": "^3.1.0", "ws": "^3.0.0" diff --git a/server/express.js b/server/express.js index 6065d7d..682aede 100644 --- a/server/express.js +++ b/server/express.js @@ -2,14 +2,6 @@ const express = require('express'); const compression = require('compression'); const app = express(); -// const router = express.Router(); -// -// router.use('/*', function(req, res){ -// return res.sendFile('index.html', { -// root: 'client/dist/' -// }); -// }); -// app.use(router); app.use(compression()); app.use(express.static('client/dist')) diff --git a/server/intents/date.js b/server/intents/date.js index aa2e489..e56ed7a 100644 --- a/server/intents/date.js +++ b/server/intents/date.js @@ -1,60 +1,111 @@ -const moment = require('moment'); - -const daysOfWeekByDay = { - 'Sunday': 0, - 'Monday': 1, - 'Tuesday': 2, - 'Wednesday': 3, - 'Thursday': 4, - 'Friday': 5, - 'Saturday': 6 -}; - -const daysOfWeekByIndex = Object.keys(daysOfWeekByDay) - .reduce((acc, d, ix) => { - acc[ix] = d; - return acc; - }, {}); +const moment = require('moment-timezone'); -const plural = (num, unit) => num + ' ' + unit + (+num !== 1 ? 's' : ''); +const { + pluralize, + getTZ, + getLocation, + fetchTZ +} = require('../util').helpers; module.exports = { - "date.between": (pars) => { + + "date.between": (pars, tz) => { + // ex: how many days between today and New Year const date1 = moment(pars['date-1']); const date2 = moment(pars['date-2']); const unit = pars.unit; const diff = Math.abs(date1.diff(date2, unit)); - return `There are ${plural(diff, unit)} between ` + date1.format('MMMM Do YYYY') + ' and ' + date2.format('MMMM Do YYYY'); + return `There are ${pluralize(diff, unit)} between ` + date1.format('MMMM Do YYYY') + ' and ' + date2.format('MMMM Do YYYY'); }, - "date.check": (pars) => { + + "date.check": (pars, tz) => { + // ex: is it New Year in Korea + // ex: is it the 21st of February const { location } = pars; - const date = moment(pars.date); - const now = moment(); + const utz = getTZ(tz); + + return fetchTZ(location, utz) + .then(tz => { + const date = moment.tz(pars.date, tz); + const now = moment.tz(tz); - return now.format("MM-DD-YYYY") === date.format("MM-DD-YYYY") - ? 'Yes' : 'No'; + return now.format("MM-DD-YYYY") === date.format("MM-DD-YYYY") + ? `Yes, it's ${now.format("MMMM Do YYYY")} + ${location ? 'in ' + getLocation(location) : ''} + ` + : `No, it's ${now.format("MMMM Do YYYY")} + ${location ? 'in ' + getLocation(location) : ''} + `; + }); }, - "date.day_of_week": (pars) => { - const { date, location } = pars; - return daysOfWeekByIndex[moment(date).format('e')]; + "date.day_of_week": (pars, tz) => { + // ex: what day of the week is it today in London + const { location } = pars; + const date = pars['date-time']; + const utz = getTZ(tz); + + return fetchTZ(location, utz) + .then(tz => { + const nowUTC = moment.tz(utz).utc(); + const dt = (date + ? moment.utc(date) + .hour(nowUTC.hour()) + .minute(nowUTC.minute()) + .second(nowUTC.second()) + : moment + ).tz(utz); + + return 'It\'s ' + dt.tz(tz).format('dddd'); + }); }, - "date.day_of_week.check": (pars) => { - const { dayofweek, location } = pars; - const date = moment(pars.date); - const realDayOfWeek = date.format('e'); - - return +daysOfWeekByDay[dayofweek] === +realDayOfWeek - ? `Yes, it's ${daysOfWeekByIndex[realDayOfWeek]}` - : `No, it's ${daysOfWeekByIndex[realDayOfWeek]}`; + + "date.day_of_week.check": (pars, tz) => { + // ex: is it Friday tomorrow in Moscow + const { dayofweek, location, date } = pars; + const utz = getTZ(tz); + + return fetchTZ(location, utz) + .then(tz => { + const nowUTC = moment.tz(utz).utc(); + const dt = (date + ? moment.utc(date) + .hour(nowUTC.hour()) + .minute(nowUTC.minute()) + .second(nowUTC.second()) + : moment + ).tz(utz); + + const realDayOfWeek = dt.tz(tz).format('dddd'); + + return dayofweek === realDayOfWeek + ? ` + Yes, it's + ${realDayOfWeek} + ` + : `No, it's ${realDayOfWeek}` + }) }, - "date.get": (pars) => { - const date = pars.date ? moment(date) : moment(); - return date.format('MMMM Do YYYY'); + "date.get": (pars, tz) => { + // ex: what date is tomorrow + const { date } = pars; + console.log(pars); + const nowUTC = moment.tz(tz).utc(); + const dt = (date + ? moment.utc(date) + .hour(nowUTC.hour()) + .minute(nowUTC.minute()) + .second(nowUTC.second()) + : moment + ).tz(tz); + + return dt.format('MMMM Do YYYY'); }, - "date.month.check": (pars) => { + + "date.month.check": (pars, tz) => { + // ex: do you know if it's March now const [start, end] = pars['date-period'].split("/"); const now = moment(); const month = +moment(start).format('M'); @@ -63,24 +114,39 @@ module.exports = { ? 'Yes, it\'s ' + now.format('MMMM') : 'No, it\'s ' + now.format('MMMM'); }, - "date.month.get": () =>'It\'s ' + moment().format('MMMM'), - "date.since": (pars) => { - const { unit } = pars; - const date = moment(pars.date); - const now = moment(); - const diff = Math.abs(now.diff(date, unit)); - return `${plural(diff, unit)} since ` + date.format('MMMM Do YYYY'); + // ex: I'd like to know what month is it now + "date.month.get": (pars, tz) =>'It\'s ' + moment().format('MMMM'), + + "date.since": (pars, tz) => { + // ex: how do I know how many minutes passed since the year 2013 + const date = pars.date; + const unit = pars.unit || 'hour'; + const dt = moment.tz(date, tz); + + // const [yr, mo, day] = date.split("-"); + // if (yr) dt.year(yr); + // if (mo) dt.month(mo - 1); + // if (day) dt.date(day); + + const now = moment.tz(tz); + const diff = Math.abs(now.diff(dt, unit)); + + return `${pluralize(diff, unit)} since ` + dt.format('MMMM Do YYYY'); }, - "date.until": (pars) => { + + "date.until": (pars, tz) => { + // ex: how many months till New Year const now = moment(); const date = moment(pars['date']); - const unit = pars.unit; + const unit = pars.unit || 'hour'; const diff = Math.abs(now.diff(date, unit)); - return `${plural(diff, unit)} until ${date.format('MMMM Do YYYY')}`; + return `${pluralize(diff, unit)} until ${date.format('MMMM Do YYYY')}`; }, - "date.year.check": (pars) => { + + "date.year.check": (pars, tz) => { + // ex: now it's 1989 year right const [start, end] = pars['date-period'].split("/"); const now = moment(); const year = +moment(start).format('YYYY'); @@ -89,5 +155,7 @@ module.exports = { ? 'Yes, it\'s ' + now.format('YYYY') : 'No, it\'s ' + now.format('YYYY'); }, - "date.year.get": () => 'The current year is ' + moment().format('YYYY'), + + // ex: I wonder which year are we in + "date.year.get": (pars, tz) => 'The current year is ' + moment().format('YYYY'), }; diff --git a/server/intents/index.js b/server/intents/index.js index b25023a..599b629 100644 --- a/server/intents/index.js +++ b/server/intents/index.js @@ -1,14 +1,63 @@ +const apiai = require("apiai")(process.env.APIAI_CLIENT_TOKEN); +const uuidv4 = require('uuid/v4'); + +// include and merge all intents: const date = require('./date'); +const time = require('./time'); +const intents = Object.assign({}, date, time); + +// Process intents at API.AI, and get action and parameters +const callApiAi = (text, sessionId, tz) => new Promise((resolve, reject) => { + const request = apiai.textRequest(text, { sessionId: sessionId, timezone: tz }); -// merge all intent actions -const intents = Object.assign({}, date); + request.on('response', response => resolve(response)); + request.on('error', error => reject(error)); + request.end(); +}); -function doIntent(action, pars) { - const unrecognizedActionMsg = 'I don\t understand that. Can you try again?'; +// Process the action +const doIntent = (response, tz) => { + const { parameters, action, fulfillment } = response.result; - return intents[action] - ? intents[action](pars) - : null; + return new Promise((resolve, reject) => { + if (intents[action]) { + return resolve(intents[action](parameters, tz)); + } else if (fulfillment.speech) { + return resolve(fulfillment.speech); + } + return reject(handleUnknownAnswer()); + }); } -module.exports = doIntent; +const handleUnknownAnswer = (err) => { + const msgs = [ + 'Didn\'t quite catch what you said?', + 'Donno', + 'Can you try again?', + 'Sorry, can\'t help you with that?' + ]; + + return msgs[~~(Math.random() * msgs.length)]; +}; + +const processRequest = (msg) => new Promise((resolve, reject) => { + // try/catch to make sure we don't crush on invalid JSON msgs + try { + const input = JSON.parse(msg); + + // process our users' request only + if (input.type === 'user' && input.msg) { + const sessionId = input.sessionId || uuidv4(); + const tz = input.tz; + + callApiAi(input.msg, sessionId, tz) + .then(response => doIntent(response, tz)) + .then(answer => resolve(answer)) + .catch(err => resolve(handleUnknownAnswer(err))) + } + } catch (err) { + resolve(handleUnknownAnswer(err)); + } +}); + +module.exports = processRequest; diff --git a/server/intents/time.js b/server/intents/time.js new file mode 100644 index 0000000..fcffe3b --- /dev/null +++ b/server/intents/time.js @@ -0,0 +1,93 @@ +const moment = require('moment-timezone'); + +const { + pluralize, + getTZ, + getLocation, + fetchTZ +} = require('../util').helpers; + +module.exports = { + + "time.check": (pars, tz) => { + // it's 5 o'clock in London + const { time, location } = pars; + const utz = getTZ(tz); + + return fetchTZ(location, utz) + .then(tz => { + const now = moment.tz(tz); + const [hh, mm, ss] = time.split(':').map(e => +e); + + return hh === +now.hour() + ? ` + Yes, it's ${now.format('mm')} minutes past ${now.format('h a')} + ${location ? ' in ' + getLocation(location) : ''} + ` + : ` + No, it's ${now.format('h:mm a')} + ${location ? ' in ' + getLocation(location) : ''} + `; + }); + }, + + "time.convert": (pars, tz) => { + // convert Moscow time in Tokyo + const locationFrom = pars['location-from']; + const locationTo = pars['location-to']; + const timeFrom = pars['time-from']; + const utz = getTZ(tz); + + return Promise.all([fetchTZ(locationFrom, utz), fetchTZ(locationTo, utz)]) + .then(([tzFrom, tzTo]) => { + const [hh, mm, ss] = (timeFrom ? timeFrom : moment.tz(tzFrom).format('H:m:s')) + .split(':') + .map(e => +e); + + const fromDt = moment.tz(tzFrom).hour(hh).minute(mm); + const toDt = moment.tz(tzFrom).hour(hh).minute(mm).tz(tzTo); + + return `${timeFrom ? 'When it\'s' : 'It\'s'} + ${fromDt.format('h:mm a')} in ${getLocation(locationFrom)}, + ${timeFrom ? 'it\'s' : 'and'} + ${toDt.format('h:mm a')} in ${getLocation(locationTo)} + `; + }); + + }, + "time.get": (pars, tz) => { + // what time is it + // what time is it in Mountain View + const { location } = pars; + const utz = getTZ(tz); + + return fetchTZ(location, utz) + .then(tz => { + const now = moment.tz(tz); + + return `It's ${now.format('h:mm a')} ${location ? 'in ' + getLocation(location) : ''}`; + }); + }, + "time.time_difference": (pars, tz) => { + // find time difference Paris Milan + const location1 = pars['location-1']; + const location2 = pars['location-2']; + const utz = getTZ(tz); + + return Promise.all([fetchTZ(location1, utz), fetchTZ(location2, utz)]) + .then(([tz1, tz2]) => { + const [h1, m1] = moment.tz(tz1).format('Z').split(":").map(e => +e); + const [h2, m2] = moment.tz(tz2).format('Z').split(":").map(e => +e); + const hDiff = h2 - h1; + const mDiff = m2 - m1; + + return ` + ${hDiff > 0 ? getLocation(location2) : getLocation(location1)} is + ${pluralize(Math.abs(hDiff), 'hour')} + ${mDiff ? ' and ' + pluralize(Math.abs(mDiff), 'minute') : ''} + ahead of + ${hDiff > 0 ? getLocation(location1) : getLocation(location2)} + `; + }); + } +}; diff --git a/server/util/google_api.js b/server/util/google_api.js new file mode 100644 index 0000000..190df46 --- /dev/null +++ b/server/util/google_api.js @@ -0,0 +1,54 @@ +const request = require('request'); + +const TIMESTAMP = Math.round(Date.now() / 1000); +const GEOCODE_API_URL = +`https://maps.googleapis.com/maps/api/geocode/json?key=${process.env.GOOGLE_API_KEY}`; +const TIMEZONE_API_URL = `https://maps.googleapis.com/maps/api/timezone/json?key=${process.env.GOOGLE_API_KEY}×tamp=${TIMESTAMP}`; + +function geocode(query) { + return new Promise((resolve, reject) => { + const url = `${GEOCODE_API_URL}&address=${query}`; + + request(url, function(error, resp, body) { + if (error) { + reject(error); + } else { + const response = JSON.parse(body); + + if (response.results && response.results.length) { + const result = response.results[0]; + resolve(result.geometry.location); + } else { + reject(new Error(`No location results found for ${query}`)); + } + } + }); + }) +} + +function latlng(location) { + return new Promise((resolve, reject) => { + const url = `${TIMEZONE_API_URL}&location=${location.lat},${location.lng}`; + + request(url, function(error, resp, body) { + if (error) { + reject(error); + } else { + const response = JSON.parse(body); + + if (response.status === "OK") { + resolve(response.timeZoneId); + } else { + reject(new Error(`No TZ results found for location: ${location.lat},${location.lng}`)); + } + } + }); + }); +} + +const timezone = (query) => + geocode(query) + .then(location => latlng(location)) + .catch(err => err); + +module.exports = timezone; diff --git a/server/util/helpers.js b/server/util/helpers.js new file mode 100644 index 0000000..d7f6b9b --- /dev/null +++ b/server/util/helpers.js @@ -0,0 +1,34 @@ +const moment = require('moment-timezone'); +const timezone = require('./google_api'); + +// Pluralize a unit +const pluralize = (num, unit) => num + ' ' + unit + (+num !== 1 ? 's' : ''); + +// Fallback for timezones +const getTZ = (tz) => !!moment.tz.zone(tz) ? tz : moment.tz.guess(); + +// Location string out of location object {city: ..., country: ...} -> "City, Country" +const getLocation = (location) => + ['city', 'country'] + .map(ent => location[ent] ? location[ent] : '') + .filter(el => !!el) + .join(", "); + +// Fetch timezone from Google's Timezone API, or fallback to the user's TZ +const fetchTZ = (location, fallbackTZ) => new Promise((resolve) => { + if (!location) return resolve(getTZ(fallbackTZ)); + + // get only city and/or country + const validLoc = getLocation(location); + + timezone(validLoc) + .then(tz => resolve(tz)) + .catch(err => resolve(getTZ(tz))); +}); + +module.exports = { + pluralize, + getTZ, + getLocation, + fetchTZ +}; diff --git a/server/util/index.js b/server/util/index.js new file mode 100644 index 0000000..548d290 --- /dev/null +++ b/server/util/index.js @@ -0,0 +1,7 @@ +const timezone = require('./google_api'); +const helpers = require('./helpers'); + +module.exports = { + timezone, + helpers +} diff --git a/server/websocket.js b/server/websocket.js index 02d005b..63c2c15 100644 --- a/server/websocket.js +++ b/server/websocket.js @@ -1,62 +1,18 @@ const server = require('./'); -const doIntent = require('./intents'); +const processRequest = require('./intents'); const WebSocket = require('ws'); -const apiai = require("apiai")(process.env.APIAI_CLIENT_TOKEN); const uuidv4 = require('uuid/v4'); -const util = require('util') const wss = new WebSocket.Server({server: server}); wss.on('connection', (ws) => { - ws.on('message', (msg) => { - try { - const input = JSON.parse(msg); + ws.on('message', (msg) => + processRequest(msg) + .then(answer => ws.send(JSON.stringify({type: 'bot', msg: answer}))) + ); - if (input.type === 'user' && input.msg) { - const sessionId = input.sessionId || uuidv4(); - - callApiAi(input.msg, sessionId) - .then((response) => { - const { parameters, action, fulfillment } = response.result; - const output = doIntent(action, parameters); - - if (output) { - return ws.send(JSON.stringify({type: 'bot', msg: output})); - } else if (fulfillment.speech) { - return ws.send(JSON.stringify({type: 'bot', msg: fulfillment.speech})); - } - - throw new Error('Can\'t understand that'); - }) - .catch(error => - ws.send(JSON.stringify({type: 'bot', msg: 'Didn\'t quite get that?'})) - ); - } - } catch (err) { - // TODO: handle JSON.parse error - ws.send(JSON.stringify({type: 'bot', msg: 'Didn\'t quite get that?'})) - } - }); - - // TODO: generate ws session ids w/ uuid or sth. + // Generate sessionId ws.send(JSON.stringify({type: 'sessionId', msg: uuidv4()})); - // ws.send(JSON.stringify({type: 'bot', msg: 'Hi there!'})); - ws.send(JSON.stringify({type: 'bot', msg: '⏰ I\'m a date bot — ask me something about date!'})); }); -function callApiAi(text, sessionId) { - return new Promise((resolve, reject) => { - try { - // TODO: generate ws session ids w/ uuid or sth. - const request = apiai.textRequest(text, { sessionId: sessionId }); - - request.on('response', response => resolve(response)); - request.on('error', error => reject(error)); - request.end(); - } catch (err) { - reject(err); - } - }); -} - module.exports = wss; diff --git a/yarn.lock b/yarn.lock index f641f71..57e41ce 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9,6 +9,13 @@ accepts@~1.3.3: mime-types "~2.1.11" negotiator "0.6.1" +ajv@^4.9.1: + version "4.11.8" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.8.tgz#82ffb02b29e662ae53bdc20af15947706739c536" + dependencies: + co "^4.6.0" + json-stable-stringify "^1.0.1" + apiai@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/apiai/-/apiai-4.0.2.tgz#9a4d6921877e43cee4719eb73609da1d520ac857" @@ -17,10 +24,60 @@ array-flatten@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" +asn1@~0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" + +assert-plus@1.0.0, assert-plus@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + +assert-plus@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234" + +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + +aws-sign2@~0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f" + +aws4@^1.2.1: + version "1.6.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.6.0.tgz#83ef5ca860b2b32e4a0deedee8c771b9db57471e" + +bcrypt-pbkdf@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz#63bc5dcb61331b92bc05fd528953c33462a06f8d" + dependencies: + tweetnacl "^0.14.3" + +boom@2.x.x: + version "2.10.1" + resolved "https://registry.yarnpkg.com/boom/-/boom-2.10.1.tgz#39c8918ceff5799f83f9492a848f625add0c766f" + dependencies: + hoek "2.x.x" + bytes@2.5.0: version "2.5.0" resolved "https://registry.yarnpkg.com/bytes/-/bytes-2.5.0.tgz#4c9423ea2d252c270c41b2bdefeff9bb6b62c06a" +caseless@~0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" + +co@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" + +combined-stream@^1.0.5, combined-stream@~1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.5.tgz#938370a57b4a51dea2c77c15d5c5fdf895164009" + dependencies: + delayed-stream "~1.0.0" + compressible@~2.0.10: version "2.0.10" resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.10.tgz#feda1c7f7617912732b29bf8cf26252a20b9eecd" @@ -55,6 +112,18 @@ cookie@0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.3.1.tgz#e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb" +cryptiles@2.x.x: + version "2.0.5" + resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8" + dependencies: + boom "2.x.x" + +dashdash@^1.12.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" + dependencies: + assert-plus "^1.0.0" + debug@2.6.7: version "2.6.7" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.7.tgz#92bad1f6d05bbb6bba22cca88bcd0ec894c2861e" @@ -67,6 +136,10 @@ debug@2.6.8: dependencies: ms "2.0.0" +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + depd@1.1.0, depd@~1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.0.tgz#e1bd82c6aab6ced965b97b88b17ed3e528ca18c3" @@ -79,6 +152,12 @@ dotenv@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-4.0.0.tgz#864ef1379aced55ce6f95debecdce179f7a0cd1d" +ecc-jsbn@~0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" + dependencies: + jsbn "~0.1.0" + ee-first@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" @@ -128,6 +207,14 @@ express@^4.15.3: utils-merge "1.0.0" vary "~1.1.1" +extend@~3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444" + +extsprintf@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.0.2.tgz#e1080e0658e300b06294990cc70e1502235fd550" + finalhandler@~1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.0.3.tgz#ef47e77950e999780e86022a560e3217e0d0cc89" @@ -140,6 +227,18 @@ finalhandler@~1.0.3: statuses "~1.3.1" unpipe "~1.0.0" +forever-agent@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" + +form-data@~2.1.1: + version "2.1.4" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.1.4.tgz#33c183acf193276ecaa98143a69e94bfee1750d1" + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.5" + mime-types "^2.1.12" + forwarded@~0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.0.tgz#19ef9874c4ae1c297bcf078fde63a09b66a84363" @@ -148,6 +247,36 @@ fresh@0.5.0: version "0.5.0" resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.0.tgz#f474ca5e6a9246d6fd8e0953cfa9b9c805afa78e" +getpass@^0.1.1: + version "0.1.7" + resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" + dependencies: + assert-plus "^1.0.0" + +har-schema@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-1.0.5.tgz#d263135f43307c02c602afc8fe95970c0151369e" + +har-validator@~4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-4.2.1.tgz#33481d0f1bbff600dd203d75812a6a5fba002e2a" + dependencies: + ajv "^4.9.1" + har-schema "^1.0.5" + +hawk@~3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4" + dependencies: + boom "2.x.x" + cryptiles "2.x.x" + hoek "2.x.x" + sntp "1.x.x" + +hoek@2.x.x: + version "2.16.3" + resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed" + http-errors@~1.6.1: version "1.6.1" resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.1.tgz#5f8b8ed98aca545656bf572997387f904a722257" @@ -157,6 +286,14 @@ http-errors@~1.6.1: setprototypeof "1.0.3" statuses ">= 1.3.1 < 2" +http-signature@~1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf" + dependencies: + assert-plus "^0.2.0" + jsprim "^1.2.2" + sshpk "^1.7.0" + inherits@2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" @@ -165,6 +302,45 @@ ipaddr.js@1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.3.0.tgz#1e03a52fdad83a8bbb2b25cbf4998b4cffcd3dec" +is-typedarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + +isstream@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + +jsbn@~0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" + +json-schema@0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" + +json-stable-stringify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" + dependencies: + jsonify "~0.0.0" + +json-stringify-safe@~5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + +jsonify@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" + +jsprim@^1.2.2: + version "1.4.0" + resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.0.tgz#a3b87e40298d8c380552d8cc7628a0bb95a22918" + dependencies: + assert-plus "1.0.0" + extsprintf "1.0.2" + json-schema "0.2.3" + verror "1.3.6" + media-typer@0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" @@ -181,7 +357,7 @@ methods@~1.1.2: version "1.27.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.27.0.tgz#820f572296bbd20ec25ed55e5b5de869e5436eb1" -mime-types@~2.1.11, mime-types@~2.1.15: +mime-types@^2.1.12, mime-types@~2.1.11, mime-types@~2.1.15, mime-types@~2.1.7: version "2.1.15" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.15.tgz#a4ebf5064094569237b8cf70046776d09fc92aed" dependencies: @@ -191,7 +367,13 @@ mime@1.3.4: version "1.3.4" resolved "https://registry.yarnpkg.com/mime/-/mime-1.3.4.tgz#115f9e3b6b3daf2959983cb38f149a2d40eb5d53" -moment@^2.18.1: +moment-timezone@^0.5.13: + version "0.5.13" + resolved "https://registry.yarnpkg.com/moment-timezone/-/moment-timezone-0.5.13.tgz#99ce5c7d827262eb0f1f702044177f60745d7b90" + dependencies: + moment ">= 2.9.0" + +"moment@>= 2.9.0", moment@^2.18.1: version "2.18.1" resolved "https://registry.yarnpkg.com/moment/-/moment-2.18.1.tgz#c36193dd3ce1c2eed2adb7c802dbbc77a81b1c0f" @@ -203,6 +385,10 @@ negotiator@0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.1.tgz#2b327184e8992101177b28563fb5e7102acd0ca9" +oauth-sign@~0.8.1: + version "0.8.2" + resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" + on-finished@~2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" @@ -221,6 +407,10 @@ path-to-regexp@0.1.7: version "0.1.7" resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" +performance-now@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-0.2.0.tgz#33ef30c5c77d4ea21c5a53869d91b56d8f2555e5" + proxy-addr@~1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-1.1.4.tgz#27e545f6960a44a627d9b44467e35c1b6b4ce2f3" @@ -228,7 +418,11 @@ proxy-addr@~1.1.4: forwarded "~0.1.0" ipaddr.js "1.3.0" -qs@6.4.0: +punycode@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" + +qs@6.4.0, qs@~6.4.0: version "6.4.0" resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233" @@ -236,13 +430,40 @@ range-parser@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e" +request@^2.81.0: + version "2.81.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.81.0.tgz#c6928946a0e06c5f8d6f8a9333469ffda46298a0" + dependencies: + aws-sign2 "~0.6.0" + aws4 "^1.2.1" + caseless "~0.12.0" + combined-stream "~1.0.5" + extend "~3.0.0" + forever-agent "~0.6.1" + form-data "~2.1.1" + har-validator "~4.2.1" + hawk "~3.1.3" + http-signature "~1.1.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.7" + oauth-sign "~0.8.1" + performance-now "^0.2.0" + qs "~6.4.0" + safe-buffer "^5.0.1" + stringstream "~0.0.4" + tough-cookie "~2.3.0" + tunnel-agent "^0.6.0" + uuid "^3.0.0" + rxjs@^5.4.2: version "5.4.2" resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-5.4.2.tgz#2a3236fcbf03df57bae06fd6972fd99e5c08fcf7" dependencies: symbol-observable "^1.0.1" -safe-buffer@5.1.1: +safe-buffer@5.1.1, safe-buffer@^5.0.1: version "5.1.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853" @@ -281,14 +502,54 @@ setprototypeof@1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.0.3.tgz#66567e37043eeb4f04d91bd658c0cbefb55b8e04" +sntp@1.x.x: + version "1.0.9" + resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198" + dependencies: + hoek "2.x.x" + +sshpk@^1.7.0: + version "1.13.1" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.13.1.tgz#512df6da6287144316dc4c18fe1cf1d940739be3" + dependencies: + asn1 "~0.2.3" + assert-plus "^1.0.0" + dashdash "^1.12.0" + getpass "^0.1.1" + optionalDependencies: + bcrypt-pbkdf "^1.0.0" + ecc-jsbn "~0.1.1" + jsbn "~0.1.0" + tweetnacl "~0.14.0" + "statuses@>= 1.3.1 < 2", statuses@~1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.3.1.tgz#faf51b9eb74aaef3b3acf4ad5f61abf24cb7b93e" +stringstream@~0.0.4: + version "0.0.5" + resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" + symbol-observable@^1.0.1: version "1.0.4" resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.0.4.tgz#29bf615d4aa7121bdd898b22d4b3f9bc4e2aa03d" +tough-cookie@~2.3.0: + version "2.3.2" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.2.tgz#f081f76e4c85720e6c37a5faced737150d84072a" + dependencies: + punycode "^1.4.1" + +tunnel-agent@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + dependencies: + safe-buffer "^5.0.1" + +tweetnacl@^0.14.3, tweetnacl@~0.14.0: + version "0.14.5" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" + type-is@~1.6.15: version "1.6.15" resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.15.tgz#cab10fb4909e441c82842eafe1ad646c81804410" @@ -308,7 +569,7 @@ utils-merge@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.0.tgz#0294fb922bb9375153541c4f7096231f287c8af8" -uuid@^3.1.0: +uuid@^3.0.0, uuid@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.1.0.tgz#3dd3d3e790abc24d7b0d3a034ffababe28ebbc04" @@ -316,6 +577,12 @@ vary@~1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.1.tgz#67535ebb694c1d52257457984665323f587e8d37" +verror@1.3.6: + version "1.3.6" + resolved "https://registry.yarnpkg.com/verror/-/verror-1.3.6.tgz#cff5df12946d297d2baaefaa2689e25be01c005c" + dependencies: + extsprintf "1.0.2" + ws@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/ws/-/ws-3.0.0.tgz#98ddb00056c8390cb751e7788788497f99103b6c"