diff --git a/04465328.60318411.js b/04465328.60318411.js deleted file mode 100644 index b9aca78e256f..000000000000 --- a/04465328.60318411.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[4],{141:function(e,a,t){"use strict";t.r(a),t.d(a,"frontMatter",(function(){return p})),t.d(a,"metadata",(function(){return c})),t.d(a,"rightToc",(function(){return o})),t.d(a,"default",(function(){return l}));var n=t(2),r=t(9),i=(t(0),t(180)),p={title:"Core",sidebar_label:"Usage"},c={id:"core/usage",title:"Core",description:"The firebasecore plugin is responsible for connecting your Flutter app to your Firebase project. The plugin must be",source:"@site/../docs/core/usage.mdx",permalink:"/docs/core/usage",editUrl:"https://github.com/FirebaseExtended/flutterfire/edit/master/docs/../docs/core/usage.mdx",sidebar_label:"Usage",sidebar:"main",previous:{title:"Cloud Firestore",permalink:"/docs/firestore/usage"}},o=[{value:"Installation",id:"installation",children:[]},{value:"Default Firebase app",id:"default-firebase-app",children:[]},{value:"Secondary Firebase apps",id:"secondary-firebase-apps",children:[{value:"Initializing secondary apps",id:"initializing-secondary-apps",children:[]},{value:"Accessing secondary apps",id:"accessing-secondary-apps",children:[]},{value:"Using app instances",id:"using-app-instances",children:[]},{value:"Deleting instances",id:"deleting-instances",children:[]}]}],s={rightToc:o};function l(e){var a=e.components,t=Object(r.a)(e,["components"]);return Object(i.b)("wrapper",Object(n.a)({},s,t,{components:a,mdxType:"MDXLayout"}),Object(i.b)("p",null,"The ",Object(i.b)("a",Object(n.a)({parentName:"p"},{href:"!firebase_core"}),Object(i.b)("inlineCode",{parentName:"a"},"firebase_core"))," plugin is responsible for connecting your Flutter app to your Firebase project. The plugin must be\ninstalled and initialized before the usage of any other FlutterFire plugins. It provides basic functionality such\nas:"),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},Object(i.b)("a",Object(n.a)({parentName:"li"},{href:"/docs/overview#initializing-flutterfire"}),"Initializing FlutterFire"),"."),Object(i.b)("li",{parentName:"ul"},"Creating ",Object(i.b)("a",Object(n.a)({parentName:"li"},{href:"#secondary-firebase-apps"}),"Secondary Firebase App Instances"),".")),Object(i.b)("h2",{id:"installation"},"Installation"),Object(i.b)("p",null,"The ",Object(i.b)("a",Object(n.a)({parentName:"p"},{href:"!firebase_core"}),Object(i.b)("inlineCode",{parentName:"a"},"firebase_core"))," plugin can be installed by following the ",Object(i.b)("a",Object(n.a)({parentName:"p"},{href:"/docs/overview"}),"Getting Started")," documentation. Once installed,\nimport the plugin:"),Object(i.b)("pre",null,Object(i.b)("code",Object(n.a)({parentName:"pre"},{className:"language-dart"}),"import 'package:firebase_core/firebase_core.dart';\n")),Object(i.b)("h2",{id:"default-firebase-app"},"Default Firebase app"),Object(i.b)("p",null,"FlutterFire requires a default Firebase app to be present before initialization, otherwise an exception will be thrown.\nThe steps for setting up a default app for your platform can be found in the ",Object(i.b)("a",Object(n.a)({parentName:"p"},{href:"/docs/overview"}),"Getting Started")," documentation."),Object(i.b)("p",null,"Some plugins such as Analytics & Performance Monitoring are only compatible with the default Firebase app, however,\nplugins such as Authentication can take advantage of ",Object(i.b)("a",Object(n.a)({parentName:"p"},{href:"#secondary-firebase-apps"}),"Secondary Firebase Apps"),",\nallowing you to use multiple Firebase projects at once."),Object(i.b)("p",null,"To access the default app, call the ",Object(i.b)("a",Object(n.a)({parentName:"p"},{href:"!firebase_core.initializeApp"}),Object(i.b)("inlineCode",{parentName:"a"},"initializeApp"))," or ",Object(i.b)("a",Object(n.a)({parentName:"p"},{href:"!firebase_core.app"}),Object(i.b)("inlineCode",{parentName:"a"},"app"))," method on the ",Object(i.b)("a",Object(n.a)({parentName:"p"},{href:"!firebase_core"}),Object(i.b)("inlineCode",{parentName:"a"},"Firebase"))," class:"),Object(i.b)("pre",null,Object(i.b)("code",Object(n.a)({parentName:"pre"},{className:"language-dart"}),"FirebaseApp defaultApp = await Firebase.initializeApp();\n// or\nFirebaseApp defaultApp = Firebase.app();\n")),Object(i.b)("h2",{id:"secondary-firebase-apps"},"Secondary Firebase apps"),Object(i.b)("p",null,"Some FlutterFire plugins allow the usage of secondary Firebase apps, letting you interchange the project the\nplugin uses. Currently, the Firebase SDKs provide functionality for using secondary apps with the following services:"),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},"Authentication."),Object(i.b)("li",{parentName:"ul"},"Realtime Database."),Object(i.b)("li",{parentName:"ul"},"Cloud Firestore."),Object(i.b)("li",{parentName:"ul"},"Cloud Functions."),Object(i.b)("li",{parentName:"ul"},"Cloud Storage."),Object(i.b)("li",{parentName:"ul"},"Instance ID."),Object(i.b)("li",{parentName:"ul"},"ML Kit Natural Language."),Object(i.b)("li",{parentName:"ul"},"ML Kit Vision."),Object(i.b)("li",{parentName:"ul"},"Remote Config.")),Object(i.b)("h3",{id:"initializing-secondary-apps"},"Initializing secondary apps"),Object(i.b)("p",null,"To initialize a secondary app, call the ",Object(i.b)("a",Object(n.a)({parentName:"p"},{href:"!firebase_core.Firebase.initializeApp"}),Object(i.b)("inlineCode",{parentName:"a"},"initializeApp"))," method with a name and options:"),Object(i.b)("pre",null,Object(i.b)("code",Object(n.a)({parentName:"pre"},{className:"language-dart"}),"await Firebase.initializeApp(\n name: 'SecondaryApp',\n options: const FirebaseOptions(\n appId: 'my_appId',\n apiKey: 'my_apiKey',\n messagingSenderId: 'my_messagingSenderId',\n projectId: 'my_projectId'\n )\n);\n")),Object(i.b)("p",null,"At a minimum, you must provide the ",Object(i.b)("inlineCode",{parentName:"p"},"appId"),", ",Object(i.b)("inlineCode",{parentName:"p"},"apiKey"),", ",Object(i.b)("inlineCode",{parentName:"p"},"messagingSenderId")," and ",Object(i.b)("inlineCode",{parentName:"p"},"projectId"),". Although the other options\nare not required, it is recommended you view the ",Object(i.b)("a",Object(n.a)({parentName:"p"},{href:"!firebase_core_platform_interface.FirebaseOptions"}),Object(i.b)("inlineCode",{parentName:"a"},"FirebaseOptions"))," reference API for the full list of options available."),Object(i.b)("h3",{id:"accessing-secondary-apps"},"Accessing secondary apps"),Object(i.b)("p",null,"Once initialized, secondary apps can be accessed via the ",Object(i.b)("a",Object(n.a)({parentName:"p"},{href:"!firebase_core.FirebaseApp"}),Object(i.b)("inlineCode",{parentName:"a"},"app"))," method on ",Object(i.b)("a",Object(n.a)({parentName:"p"},{href:"!firebase_core"}),Object(i.b)("inlineCode",{parentName:"a"},"FirebaseCore")),":"),Object(i.b)("pre",null,Object(i.b)("code",Object(n.a)({parentName:"pre"},{className:"language-dart"}),"FirebaseApp secondaryApp = Firebase.app('SecondaryApp');\n")),Object(i.b)("p",null,"Attempting to access an app that does not exist will throw an exception."),Object(i.b)("p",null,"It is also possible to get all existing apps at once via the ",Object(i.b)("a",Object(n.a)({parentName:"p"},{href:"!firebase_core.Firebase.apps"}),Object(i.b)("inlineCode",{parentName:"a"},"apps"))," static property on ",Object(i.b)("a",Object(n.a)({parentName:"p"},{href:"!firebase_core.Firebase"}),Object(i.b)("inlineCode",{parentName:"a"},"Firebase"))," class:"),Object(i.b)("pre",null,Object(i.b)("code",Object(n.a)({parentName:"pre"},{className:"language-dart"}),"List apps = Firebase.apps;\n\napps.forEach((app) {\n print('App name: ${app.name}');\n});\n")),Object(i.b)("h3",{id:"using-app-instances"},"Using app instances"),Object(i.b)("p",null,"Each FlutterFire plugin provides a streamlined approach for using the default app as well as secondary apps (if applicable).\nThe convenient way to use the default app is by accessing the ",Object(i.b)("inlineCode",{parentName:"p"},"instance")," property on each plugin base class. For example\nif using Cloud Firestore:"),Object(i.b)("pre",null,Object(i.b)("code",Object(n.a)({parentName:"pre"},{className:"language-dart"}),"// Access Firestore using the default Firebase app:\nFirestore firestore = Firestore.instance;\n\nfirestore\n .collection('users')\n .snapshots()\n .listen((QuerySnapshot snapshot) {\n // Query snapshot of the users collection on the default Firebase app\n });\n")),Object(i.b)("p",null,"If instead you'd like to use a secondary app, pass it to the ",Object(i.b)("inlineCode",{parentName:"p"},"instanceFor")," static method on each plugin base class. For\nexample if using Cloud Firestore:"),Object(i.b)("pre",null,Object(i.b)("code",Object(n.a)({parentName:"pre"},{className:"language-dart"}),"FirebaseApp secondaryApp = Firebase.app('SecondaryApp');\n\nFirestore firestore = Firestore.instanceFor(\n app: secondaryApp\n);\n\nfirestore\n .collection('users')\n .snapshots()\n .listen((QuerySnapshot snapshot) {\n // Query snapshot of the users collection on the SecondaryApp\n });\n")),Object(i.b)("h3",{id:"deleting-instances"},"Deleting instances"),Object(i.b)("p",null,"If you no longer need a secondary app, you can delete it by calling the ",Object(i.b)("a",Object(n.a)({parentName:"p"},{href:"!firebase_core.FirebaseApp.delete"}),Object(i.b)("inlineCode",{parentName:"a"},"delete"))," method on the ",Object(i.b)("inlineCode",{parentName:"p"},"FirebaseApp")," instance:"),Object(i.b)("pre",null,Object(i.b)("code",Object(n.a)({parentName:"pre"},{className:"language-dart"}),"FirebaseApp secondaryApp = Firebase.app('SecondaryApp');\n\nawait secondaryApp.delete();\n")),Object(i.b)("p",null,"Any plugin usage attempting to use a deleted app will throw an exception. The default app cannot be deleted and will\nthrow an exception if deleted."))}l.isMDXComponent=!0},180:function(e,a,t){"use strict";t.d(a,"a",(function(){return b})),t.d(a,"b",(function(){return f}));var n=t(0),r=t.n(n);function i(e,a,t){return a in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}function p(e,a){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),t.push.apply(t,n)}return t}function c(e){for(var a=1;a=0||(r[t]=e[t]);return r}(e,a);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var s=r.a.createContext({}),l=function(e){var a=r.a.useContext(s),t=a;return e&&(t="function"==typeof e?e(a):c(c({},a),e)),t},b=function(e){var a=l(e.components);return r.a.createElement(s.Provider,{value:a},e.children)},u={inlineCode:"code",wrapper:function(e){var a=e.children;return r.a.createElement(r.a.Fragment,{},a)}},d=r.a.forwardRef((function(e,a){var t=e.components,n=e.mdxType,i=e.originalType,p=e.parentName,s=o(e,["components","mdxType","originalType","parentName"]),b=l(t),d=n,f=b["".concat(p,".").concat(d)]||b[d]||u[d]||i;return t?r.a.createElement(f,c(c({ref:a},s),{},{components:t})):r.a.createElement(f,c({ref:a},s))}));function f(e,a){var t=arguments,n=a&&a.mdxType;if("string"==typeof e||n){var i=t.length,p=new Array(i);p[0]=d;var c={};for(var o in a)hasOwnProperty.call(a,o)&&(c[o]=a[o]);c.originalType=e,c.mdxType="string"==typeof e?e:n,p[1]=c;for(var s=2;s apps = Firebase.apps;\n\napps.forEach((app) {\n print('App name: ${app.name}');\n});\n")),Object(i.b)("h3",{id:"using-app-instances"},"Using app instances"),Object(i.b)("p",null,"Each FlutterFire plugin provides a streamlined approach for using the default app as well as secondary apps (if applicable).\nThe convenient way to use the default app is by accessing the ",Object(i.b)("inlineCode",{parentName:"p"},"instance")," property on each plugin base class. For example\nif using Cloud Firestore:"),Object(i.b)("pre",null,Object(i.b)("code",Object(n.a)({parentName:"pre"},{className:"language-dart"}),"// Access Firestore using the default Firebase app:\nFirestore firestore = Firestore.instance;\n\nfirestore\n .collection('users')\n .snapshots()\n .listen((QuerySnapshot snapshot) {\n // Query snapshot of the users collection on the default Firebase app\n });\n")),Object(i.b)("p",null,"If instead you'd like to use a secondary app, pass it to the ",Object(i.b)("inlineCode",{parentName:"p"},"instanceFor")," static method on each plugin base class. For\nexample if using Cloud Firestore:"),Object(i.b)("pre",null,Object(i.b)("code",Object(n.a)({parentName:"pre"},{className:"language-dart"}),"FirebaseApp secondaryApp = Firebase.app('SecondaryApp');\n\nFirestore firestore = Firestore.instanceFor(\n app: secondaryApp\n);\n\nfirestore\n .collection('users')\n .snapshots()\n .listen((QuerySnapshot snapshot) {\n // Query snapshot of the users collection on the SecondaryApp\n });\n")),Object(i.b)("h3",{id:"deleting-instances"},"Deleting instances"),Object(i.b)("p",null,"If you no longer need a secondary app, you can delete it by calling the ",Object(i.b)("a",Object(n.a)({parentName:"p"},{href:"!firebase_core.FirebaseApp.delete"}),Object(i.b)("inlineCode",{parentName:"a"},"delete"))," method on the ",Object(i.b)("inlineCode",{parentName:"p"},"FirebaseApp")," instance:"),Object(i.b)("pre",null,Object(i.b)("code",Object(n.a)({parentName:"pre"},{className:"language-dart"}),"FirebaseApp secondaryApp = Firebase.app('SecondaryApp');\n\nawait secondaryApp.delete();\n")),Object(i.b)("p",null,"Any plugin usage attempting to use a deleted app will throw an exception. The default app cannot be deleted and will\nthrow an exception if deleted."))}l.isMDXComponent=!0},185:function(e,a,t){"use strict";t.d(a,"a",(function(){return b})),t.d(a,"b",(function(){return f}));var n=t(0),r=t.n(n);function i(e,a,t){return a in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}function p(e,a){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),t.push.apply(t,n)}return t}function c(e){for(var a=1;a=0||(r[t]=e[t]);return r}(e,a);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var s=r.a.createContext({}),l=function(e){var a=r.a.useContext(s),t=a;return e&&(t="function"==typeof e?e(a):c(c({},a),e)),t},b=function(e){var a=l(e.components);return r.a.createElement(s.Provider,{value:a},e.children)},u={inlineCode:"code",wrapper:function(e){var a=e.children;return r.a.createElement(r.a.Fragment,{},a)}},d=r.a.forwardRef((function(e,a){var t=e.components,n=e.mdxType,i=e.originalType,p=e.parentName,s=o(e,["components","mdxType","originalType","parentName"]),b=l(t),d=n,f=b["".concat(p,".").concat(d)]||b[d]||u[d]||i;return t?r.a.createElement(f,c(c({ref:a},s),{},{components:t})):r.a.createElement(f,c({ref:a},s))}));function f(e,a){var t=arguments,n=a&&a.mdxType;if("string"==typeof e||n){var i=t.length,p=new Array(i);p[0]=d;var c={};for(var o in a)hasOwnProperty.call(a,o)&&(c[o]=a[o]);c.originalType=e,c.mdxType="string"==typeof e?e:n,p[1]=c;for(var s=2;s=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var l=o.a.createContext({}),u=function(e){var t=o.a.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):c(c({},t),e)),r},p=function(e){var t=u(e.components);return o.a.createElement(l.Provider,{value:t},e.children)},s={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},b=o.a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,a=e.originalType,i=e.parentName,l=d(e,["components","mdxType","originalType","parentName"]),p=u(r),b=n,f=p["".concat(i,".").concat(b)]||p[b]||s[b]||a;return r?o.a.createElement(f,c(c({ref:t},l),{},{components:r})):o.a.createElement(f,c({ref:t},l))}));function f(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var a=r.length,i=new Array(a);i[0]=b;var c={};for(var d in t)hasOwnProperty.call(t,d)&&(c[d]=t[d]);c.originalType=e,c.mdxType="string"==typeof e?e:n,i[1]=c;for(var l=2;l0)&&(e.unobserve(r),e.disconnect(),n())}))}))).observe(r))},to:p})):o.a.createElement("a",Object.assign({href:p},!y&&{target:"_blank",rel:"noopener noreferrer"},s))}},185:function(t,e,r){"use strict";r.d(e,"a",(function(){return o}));r(191);var n=r(181);function o(t){var e=(Object(n.a)().siteConfig||{}).baseUrl,r=void 0===e?"/":e;if(!t)return t;return/^(https?:|\/\/)/.test(t)?t:t.startsWith("/")?r+t.slice(1):r+t}},187:function(t,e,r){"use strict";function n(t){return!1===/^(https?:|\/\/|mailto:|tel:)/.test(t)}r.d(e,"a",(function(){return n}))},188:function(t,e,r){var n=r(17);n(n.S+n.F,"Object",{assign:r(255)})},191:function(t,e,r){"use strict";var n=r(17),o=r(35),i=r(214),a="".startsWith;n(n.P+n.F*r(215)("startsWith"),"String",{startsWith:function(t){var e=i(this,t,"startsWith"),r=o(Math.min(arguments.length>1?arguments[1]:void 0,e.length)),n=String(t);return a?a.call(e,n,r):e.slice(r,r+n.length)===n}})},202:function(t,e,r){"use strict";var n=r(0),o=r.n(n),i=r(252);e.a=function(t){return o.a.createElement(i.a,t)}},203:function(t,e){e.f=Object.getOwnPropertySymbols},204:function(t,e,r){var n=r(82),o=r(55).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,o)}},214:function(t,e,r){var n=r(74),o=r(29);t.exports=function(t,e,r){if(n(e))throw TypeError("String#"+r+" doesn't accept regex!");return String(o(t))}},215:function(t,e,r){var n=r(3)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(r){try{return e[n]=!1,!"/./"[t](e)}catch(o){}}return!0}},221:function(t,e,r){var n=r(70),o=r(51),i=r(26),a=r(76),c=r(25),u=r(80),s=Object.getOwnPropertyDescriptor;e.f=r(11)?s:function(t,e){if(t=i(t),e=a(e,!0),u)try{return s(t,e)}catch(r){}if(c(t,e))return o(!n.f.call(t,e),t[e])}},222:function(t,e,r){e.f=r(3)},223:function(t,e,r){var n=r(21);t.exports=Array.isArray||function(t){return"Array"==n(t)}},252:function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return ht}));var n,o,i,a,c=r(13),u=r.n(c),s=r(253),f=r.n(s),l=r(254),p=r.n(l),y=r(0),d=r.n(y),h=r(54),b=r.n(h),m="bodyAttributes",v="htmlAttributes",g="titleAttributes",w={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title"},O=(Object.keys(w).map((function(t){return w[t]})),"charset"),T="cssText",S="href",E="http-equiv",A="innerHTML",j="itemprop",C="name",P="property",x="rel",k="src",I="target",L={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},N="defaultTitle",M="defer",R="encodeSpecialCharacters",_="onChangeClientState",F="titleTemplate",D=Object.keys(L).reduce((function(t,e){return t[L[e]]=e,t}),{}),q=[w.NOSCRIPT,w.SCRIPT,w.STYLE],B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},H=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},Y=function(){function t(t,e){for(var r=0;r=0||Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r},K=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e},z=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return!1===e?String(t):String(t).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")},J=function(t){var e=X(t,w.TITLE),r=X(t,F);if(r&&e)return r.replace(/%s/g,(function(){return Array.isArray(e)?e.join(""):e}));var n=X(t,N);return e||n||void 0},V=function(t){return X(t,_)||function(){}},$=function(t,e){return e.filter((function(e){return void 0!==e[t]})).map((function(e){return e[t]})).reduce((function(t,e){return W({},t,e)}),{})},G=function(t,e){return e.filter((function(t){return void 0!==t[w.BASE]})).map((function(t){return t[w.BASE]})).reverse().reduce((function(e,r){if(!e.length)for(var n=Object.keys(r),o=0;o=0;r--){var n=t[r];if(n.hasOwnProperty(e))return n[e]}return null},Z=(n=Date.now(),function(t){var e=Date.now();e-n>16?(n=e,t(e)):setTimeout((function(){Z(t)}),0)}),tt=function(t){return clearTimeout(t)},et="undefined"!=typeof window?window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||Z:t.requestAnimationFrame||Z,rt="undefined"!=typeof window?window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||tt:t.cancelAnimationFrame||tt,nt=function(t){return console&&"function"==typeof console.warn&&console.warn(t)},ot=null,it=function(t,e){var r=t.baseTag,n=t.bodyAttributes,o=t.htmlAttributes,i=t.linkTags,a=t.metaTags,c=t.noscriptTags,u=t.onChangeClientState,s=t.scriptTags,f=t.styleTags,l=t.title,p=t.titleAttributes;ut(w.BODY,n),ut(w.HTML,o),ct(l,p);var y={baseTag:st(w.BASE,r),linkTags:st(w.LINK,i),metaTags:st(w.META,a),noscriptTags:st(w.NOSCRIPT,c),scriptTags:st(w.SCRIPT,s),styleTags:st(w.STYLE,f)},d={},h={};Object.keys(y).forEach((function(t){var e=y[t],r=e.newTags,n=e.oldTags;r.length&&(d[t]=r),n.length&&(h[t]=y[t].oldTags)})),e&&e(),u(t,d,h)},at=function(t){return Array.isArray(t)?t.join(""):t},ct=function(t,e){void 0!==t&&document.title!==t&&(document.title=at(t)),ut(w.TITLE,e)},ut=function(t,e){var r=document.getElementsByTagName(t)[0];if(r){for(var n=r.getAttribute("data-react-helmet"),o=n?n.split(","):[],i=[].concat(o),a=Object.keys(e),c=0;c=0;l--)r.removeAttribute(i[l]);o.length===i.length?r.removeAttribute("data-react-helmet"):r.getAttribute("data-react-helmet")!==a.join(",")&&r.setAttribute("data-react-helmet",a.join(","))}},st=function(t,e){var r=document.head||document.querySelector(w.HEAD),n=r.querySelectorAll(t+"[data-react-helmet]"),o=Array.prototype.slice.call(n),i=[],a=void 0;return e&&e.length&&e.forEach((function(e){var r=document.createElement(t);for(var n in e)if(e.hasOwnProperty(n))if(n===A)r.innerHTML=e.innerHTML;else if(n===T)r.styleSheet?r.styleSheet.cssText=e.cssText:r.appendChild(document.createTextNode(e.cssText));else{var c=void 0===e[n]?"":e[n];r.setAttribute(n,c)}r.setAttribute("data-react-helmet","true"),o.some((function(t,e){return a=e,r.isEqualNode(t)}))?o.splice(a,1):i.push(r)})),o.forEach((function(t){return t.parentNode.removeChild(t)})),i.forEach((function(t){return r.appendChild(t)})),{oldTags:o,newTags:i}},ft=function(t){return Object.keys(t).reduce((function(e,r){var n=void 0!==t[r]?r+'="'+t[r]+'"':""+r;return e?e+" "+n:n}),"")},lt=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(t).reduce((function(e,r){return e[L[r]||r]=t[r],e}),e)},pt=function(t,e,r){switch(t){case w.TITLE:return{toComponent:function(){return t=e.title,r=e.titleAttributes,(n={key:t})["data-react-helmet"]=!0,o=lt(r,n),[d.a.createElement(w.TITLE,o,t)];var t,r,n,o},toString:function(){return function(t,e,r,n){var o=ft(r),i=at(e);return o?"<"+t+' data-react-helmet="true" '+o+">"+z(i,n)+"":"<"+t+' data-react-helmet="true">'+z(i,n)+""}(t,e.title,e.titleAttributes,r)}};case m:case v:return{toComponent:function(){return lt(e)},toString:function(){return ft(e)}};default:return{toComponent:function(){return function(t,e){return e.map((function(e,r){var n,o=((n={key:r})["data-react-helmet"]=!0,n);return Object.keys(e).forEach((function(t){var r=L[t]||t;if(r===A||r===T){var n=e.innerHTML||e.cssText;o.dangerouslySetInnerHTML={__html:n}}else o[r]=e[t]})),d.a.createElement(t,o)}))}(t,e)},toString:function(){return function(t,e,r){return e.reduce((function(e,n){var o=Object.keys(n).filter((function(t){return!(t===A||t===T)})).reduce((function(t,e){var o=void 0===n[e]?e:e+'="'+z(n[e],r)+'"';return t?t+" "+o:o}),""),i=n.innerHTML||n.cssText||"",a=-1===q.indexOf(t);return e+"<"+t+' data-react-helmet="true" '+o+(a?"/>":">"+i+"")}),"")}(t,e,r)}}}},yt=function(t){var e=t.baseTag,r=t.bodyAttributes,n=t.encode,o=t.htmlAttributes,i=t.linkTags,a=t.metaTags,c=t.noscriptTags,u=t.scriptTags,s=t.styleTags,f=t.title,l=void 0===f?"":f,p=t.titleAttributes;return{base:pt(w.BASE,e,n),bodyAttributes:pt(m,r,n),htmlAttributes:pt(v,o,n),link:pt(w.LINK,i,n),meta:pt(w.META,a,n),noscript:pt(w.NOSCRIPT,c,n),script:pt(w.SCRIPT,u,n),style:pt(w.STYLE,s,n),title:pt(w.TITLE,{title:l,titleAttributes:p},n)}},dt=f()((function(t){return{baseTag:G([S,I],t),bodyAttributes:$(m,t),defer:X(t,M),encode:X(t,R),htmlAttributes:$(v,t),linkTags:Q(w.LINK,[x,S],t),metaTags:Q(w.META,[C,O,E,P,j],t),noscriptTags:Q(w.NOSCRIPT,[A],t),onChangeClientState:V(t),scriptTags:Q(w.SCRIPT,[k,A],t),styleTags:Q(w.STYLE,[T],t),title:J(t),titleAttributes:$(g,t)}}),(function(t){ot&&rt(ot),t.defer?ot=et((function(){it(t,(function(){ot=null}))})):(it(t),ot=null)}),yt)((function(){return null})),ht=(o=dt,a=i=function(t){function e(){return H(this,e),K(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.shouldComponentUpdate=function(t){return!p()(this.props,t)},e.prototype.mapNestedChildrenToProps=function(t,e){if(!e)return null;switch(t.type){case w.SCRIPT:case w.NOSCRIPT:return{innerHTML:e};case w.STYLE:return{cssText:e}}throw new Error("<"+t.type+" /> elements are self-closing and can not contain children. Refer to our API for more information.")},e.prototype.flattenArrayTypeChildren=function(t){var e,r=t.child,n=t.arrayTypeChildren,o=t.newChildProps,i=t.nestedChildren;return W({},n,((e={})[r.type]=[].concat(n[r.type]||[],[W({},o,this.mapNestedChildrenToProps(r,i))]),e))},e.prototype.mapObjectTypeChildren=function(t){var e,r,n=t.child,o=t.newProps,i=t.newChildProps,a=t.nestedChildren;switch(n.type){case w.TITLE:return W({},o,((e={})[n.type]=a,e.titleAttributes=W({},i),e));case w.BODY:return W({},o,{bodyAttributes:W({},i)});case w.HTML:return W({},o,{htmlAttributes:W({},i)})}return W({},o,((r={})[n.type]=W({},i),r))},e.prototype.mapArrayTypeChildrenToProps=function(t,e){var r=W({},e);return Object.keys(t).forEach((function(e){var n;r=W({},r,((n={})[e]=t[e],n))})),r},e.prototype.warnOnInvalidChildren=function(t,e){return!0},e.prototype.mapChildrenToProps=function(t,e){var r=this,n={};return d.a.Children.forEach(t,(function(t){if(t&&t.props){var o=t.props,i=o.children,a=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(t).reduce((function(e,r){return e[D[r]||r]=t[r],e}),e)}(U(o,["children"]));switch(r.warnOnInvalidChildren(t,i),t.type){case w.LINK:case w.META:case w.NOSCRIPT:case w.SCRIPT:case w.STYLE:n=r.flattenArrayTypeChildren({child:t,arrayTypeChildren:n,newChildProps:a,nestedChildren:i});break;default:e=r.mapObjectTypeChildren({child:t,newProps:e,newChildProps:a,nestedChildren:i})}}})),e=this.mapArrayTypeChildrenToProps(n,e)},e.prototype.render=function(){var t=this.props,e=t.children,r=U(t,["children"]),n=W({},r);return e&&(n=this.mapChildrenToProps(e,n)),d.a.createElement(o,n)},Y(e,null,[{key:"canUseDOM",set:function(t){o.canUseDOM=t}}]),e}(d.a.Component),i.propTypes={base:u.a.object,bodyAttributes:u.a.object,children:u.a.oneOfType([u.a.arrayOf(u.a.node),u.a.node]),defaultTitle:u.a.string,defer:u.a.bool,encodeSpecialCharacters:u.a.bool,htmlAttributes:u.a.object,link:u.a.arrayOf(u.a.object),meta:u.a.arrayOf(u.a.object),noscript:u.a.arrayOf(u.a.object),onChangeClientState:u.a.func,script:u.a.arrayOf(u.a.object),style:u.a.arrayOf(u.a.object),title:u.a.string,titleAttributes:u.a.object,titleTemplate:u.a.string},i.defaultProps={defer:!0,encodeSpecialCharacters:!0},i.peek=o.peek,i.rewind=function(){var t=o.rewind();return t||(t=yt({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}})),t},a);ht.renderStatic=ht.rewind}).call(this,r(69))},253:function(t,e,r){"use strict";var n,o=r(0),i=(n=o)&&"object"==typeof n&&"default"in n?n.default:n;function a(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var c=!("undefined"==typeof window||!window.document||!window.document.createElement);t.exports=function(t,e,r){if("function"!=typeof t)throw new Error("Expected reducePropsToState to be a function.");if("function"!=typeof e)throw new Error("Expected handleStateChangeOnClient to be a function.");if(void 0!==r&&"function"!=typeof r)throw new Error("Expected mapStateOnServer to either be undefined or a function.");return function(n){if("function"!=typeof n)throw new Error("Expected WrappedComponent to be a React component.");var u,s=[];function f(){u=t(s.map((function(t){return t.props}))),l.canUseDOM?e(u):r&&(u=r(u))}var l=function(t){var e,r;function o(){return t.apply(this,arguments)||this}r=t,(e=o).prototype=Object.create(r.prototype),e.prototype.constructor=e,e.__proto__=r,o.peek=function(){return u},o.rewind=function(){if(o.canUseDOM)throw new Error("You may only call rewind() on the server. Call peek() to read the current state.");var t=u;return u=void 0,s=[],t};var a=o.prototype;return a.UNSAFE_componentWillMount=function(){s.push(this),f()},a.componentDidUpdate=function(){f()},a.componentWillUnmount=function(){var t=s.indexOf(this);s.splice(t,1),f()},a.render=function(){return i.createElement(n,this.props)},o}(o.PureComponent);return a(l,"displayName","SideEffect("+function(t){return t.displayName||t.name||"Component"}(n)+")"),a(l,"canUseDOM",c),l}}},254:function(t,e){var r="undefined"!=typeof Element,n="function"==typeof Map,o="function"==typeof Set,i="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;t.exports=function(t,e){try{return function t(e,a){if(e===a)return!0;if(e&&a&&"object"==typeof e&&"object"==typeof a){if(e.constructor!==a.constructor)return!1;var c,u,s,f;if(Array.isArray(e)){if((c=e.length)!=a.length)return!1;for(u=c;0!=u--;)if(!t(e[u],a[u]))return!1;return!0}if(n&&e instanceof Map&&a instanceof Map){if(e.size!==a.size)return!1;for(f=e.entries();!(u=f.next()).done;)if(!a.has(u.value[0]))return!1;for(f=e.entries();!(u=f.next()).done;)if(!t(u.value[1],a.get(u.value[0])))return!1;return!0}if(o&&e instanceof Set&&a instanceof Set){if(e.size!==a.size)return!1;for(f=e.entries();!(u=f.next()).done;)if(!a.has(u.value[0]))return!1;return!0}if(i&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(a)){if((c=e.length)!=a.length)return!1;for(u=c;0!=u--;)if(e[u]!==a[u])return!1;return!0}if(e.constructor===RegExp)return e.source===a.source&&e.flags===a.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===a.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===a.toString();if((c=(s=Object.keys(e)).length)!==Object.keys(a).length)return!1;for(u=c;0!=u--;)if(!Object.prototype.hasOwnProperty.call(a,s[u]))return!1;if(r&&e instanceof Element)return!1;for(u=c;0!=u--;)if(("_owner"!==s[u]&&"__v"!==s[u]&&"__o"!==s[u]||!e.$$typeof)&&!t(e[s[u]],a[s[u]]))return!1;return!0}return e!=e&&a!=a}(t,e)}catch(a){if((a.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw a}}},255:function(t,e,r){"use strict";var n=r(11),o=r(27),i=r(203),a=r(70),c=r(49),u=r(78),s=Object.assign;t.exports=!s||r(18)((function(){var t={},e={},r=Symbol(),n="abcdefghijklmnopqrst";return t[r]=7,n.split("").forEach((function(t){e[t]=t})),7!=s({},t)[r]||Object.keys(s({},e)).join("")!=n}))?function(t,e){for(var r=c(t),s=arguments.length,f=1,l=i.f,p=a.f;s>f;)for(var y,d=u(arguments[f++]),h=l?o(d).concat(l(d)):o(d),b=h.length,m=0;b>m;)y=h[m++],n&&!p.call(d,y)||(r[y]=d[y]);return r}:s},258:function(t,e,r){"use strict";var n=r(6),o=r(25),i=r(11),a=r(17),c=r(14),u=r(259).KEY,s=r(18),f=r(39),l=r(41),p=r(38),y=r(3),d=r(222),h=r(260),b=r(261),m=r(223),v=r(8),g=r(12),w=r(49),O=r(26),T=r(76),S=r(51),E=r(81),A=r(262),j=r(221),C=r(203),P=r(23),x=r(27),k=j.f,I=P.f,L=A.f,N=n.Symbol,M=n.JSON,R=M&&M.stringify,_=y("_hidden"),F=y("toPrimitive"),D={}.propertyIsEnumerable,q=f("symbol-registry"),B=f("symbols"),H=f("op-symbols"),Y=Object.prototype,W="function"==typeof N&&!!C.f,U=n.QObject,K=!U||!U.prototype||!U.prototype.findChild,z=i&&s((function(){return 7!=E(I({},"a",{get:function(){return I(this,"a",{value:7}).a}})).a}))?function(t,e,r){var n=k(Y,e);n&&delete Y[e],I(t,e,r),n&&t!==Y&&I(Y,e,n)}:I,J=function(t){var e=B[t]=E(N.prototype);return e._k=t,e},V=W&&"symbol"==typeof N.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof N},$=function(t,e,r){return t===Y&&$(H,e,r),v(t),e=T(e,!0),v(r),o(B,e)?(r.enumerable?(o(t,_)&&t[_][e]&&(t[_][e]=!1),r=E(r,{enumerable:S(0,!1)})):(o(t,_)||I(t,_,S(1,{})),t[_][e]=!0),z(t,e,r)):I(t,e,r)},G=function(t,e){v(t);for(var r,n=b(e=O(e)),o=0,i=n.length;i>o;)$(t,r=n[o++],e[r]);return t},Q=function(t){var e=D.call(this,t=T(t,!0));return!(this===Y&&o(B,t)&&!o(H,t))&&(!(e||!o(this,t)||!o(B,t)||o(this,_)&&this[_][t])||e)},X=function(t,e){if(t=O(t),e=T(e,!0),t!==Y||!o(B,e)||o(H,e)){var r=k(t,e);return!r||!o(B,e)||o(t,_)&&t[_][e]||(r.enumerable=!0),r}},Z=function(t){for(var e,r=L(O(t)),n=[],i=0;r.length>i;)o(B,e=r[i++])||e==_||e==u||n.push(e);return n},tt=function(t){for(var e,r=t===Y,n=L(r?H:O(t)),i=[],a=0;n.length>a;)!o(B,e=n[a++])||r&&!o(Y,e)||i.push(B[e]);return i};W||(c((N=function(){if(this instanceof N)throw TypeError("Symbol is not a constructor!");var t=p(arguments.length>0?arguments[0]:void 0),e=function(r){this===Y&&e.call(H,r),o(this,_)&&o(this[_],t)&&(this[_][t]=!1),z(this,t,S(1,r))};return i&&K&&z(Y,t,{configurable:!0,set:e}),J(t)}).prototype,"toString",(function(){return this._k})),j.f=X,P.f=$,r(204).f=A.f=Z,r(70).f=Q,C.f=tt,i&&!r(37)&&c(Y,"propertyIsEnumerable",Q,!0),d.f=function(t){return J(y(t))}),a(a.G+a.W+a.F*!W,{Symbol:N});for(var et="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),rt=0;et.length>rt;)y(et[rt++]);for(var nt=x(y.store),ot=0;nt.length>ot;)h(nt[ot++]);a(a.S+a.F*!W,"Symbol",{for:function(t){return o(q,t+="")?q[t]:q[t]=N(t)},keyFor:function(t){if(!V(t))throw TypeError(t+" is not a symbol!");for(var e in q)if(q[e]===t)return e},useSetter:function(){K=!0},useSimple:function(){K=!1}}),a(a.S+a.F*!W,"Object",{create:function(t,e){return void 0===e?E(t):G(E(t),e)},defineProperty:$,defineProperties:G,getOwnPropertyDescriptor:X,getOwnPropertyNames:Z,getOwnPropertySymbols:tt});var it=s((function(){C.f(1)}));a(a.S+a.F*it,"Object",{getOwnPropertySymbols:function(t){return C.f(w(t))}}),M&&a(a.S+a.F*(!W||s((function(){var t=N();return"[null]"!=R([t])||"{}"!=R({a:t})||"{}"!=R(Object(t))}))),"JSON",{stringify:function(t){for(var e,r,n=[t],o=1;arguments.length>o;)n.push(arguments[o++]);if(r=e=n[1],(g(e)||void 0!==t)&&!V(t))return m(e)||(e=function(t,e){if("function"==typeof r&&(e=r.call(this,t,e)),!V(e))return e}),n[1]=e,R.apply(M,n)}}),N.prototype[F]||r(10)(N.prototype,F,N.prototype.valueOf),l(N,"Symbol"),l(Math,"Math",!0),l(n.JSON,"JSON",!0)},259:function(t,e,r){var n=r(38)("meta"),o=r(12),i=r(25),a=r(23).f,c=0,u=Object.isExtensible||function(){return!0},s=!r(18)((function(){return u(Object.preventExtensions({}))})),f=function(t){a(t,n,{value:{i:"O"+ ++c,w:{}}})},l=t.exports={KEY:n,NEED:!1,fastKey:function(t,e){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!i(t,n)){if(!u(t))return"F";if(!e)return"E";f(t)}return t[n].i},getWeak:function(t,e){if(!i(t,n)){if(!u(t))return!0;if(!e)return!1;f(t)}return t[n].w},onFreeze:function(t){return s&&l.NEED&&u(t)&&!i(t,n)&&f(t),t}}},260:function(t,e,r){var n=r(6),o=r(15),i=r(37),a=r(222),c=r(23).f;t.exports=function(t){var e=o.Symbol||(o.Symbol=i?{}:n.Symbol||{});"_"==t.charAt(0)||t in e||c(e,t,{value:a.f(t)})}},261:function(t,e,r){var n=r(27),o=r(203),i=r(70);t.exports=function(t){var e=n(t),r=o.f;if(r)for(var a,c=r(t),u=i.f,s=0;c.length>s;)u.call(t,a=c[s++])&&e.push(a);return e}},262:function(t,e,r){var n=r(26),o=r(204).f,i={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return a&&"[object Window]"==i.call(t)?function(t){try{return o(t)}catch(e){return a.slice()}}(t):o(n(t))}}}]); \ No newline at end of file +/*! For license information please see 1.37d6b62d.js.LICENSE.txt */ +(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{186:function(t,e,r){"use strict";var n=r(0),o=r(57);e.a=function(){return Object(n.useContext)(o.a)}},187:function(t,e,r){var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var t=[],e=0;e0)&&(e.unobserve(r),e.disconnect(),n())}))}))).observe(r))},to:p})):o.a.createElement("a",Object.assign({href:p},!y&&{target:"_blank",rel:"noopener noreferrer"},s))}},190:function(t,e,r){"use strict";r.d(e,"a",(function(){return o}));r(196);var n=r(186);function o(t){var e=(Object(n.a)().siteConfig||{}).baseUrl,r=void 0===e?"/":e;if(!t)return t;return/^(https?:|\/\/)/.test(t)?t:t.startsWith("/")?r+t.slice(1):r+t}},192:function(t,e,r){"use strict";function n(t){return!1===/^(https?:|\/\/|mailto:|tel:)/.test(t)}r.d(e,"a",(function(){return n}))},193:function(t,e,r){var n=r(17);n(n.S+n.F,"Object",{assign:r(260)})},196:function(t,e,r){"use strict";var n=r(17),o=r(35),i=r(219),a="".startsWith;n(n.P+n.F*r(220)("startsWith"),"String",{startsWith:function(t){var e=i(this,t,"startsWith"),r=o(Math.min(arguments.length>1?arguments[1]:void 0,e.length)),n=String(t);return a?a.call(e,n,r):e.slice(r,r+n.length)===n}})},207:function(t,e,r){"use strict";var n=r(0),o=r.n(n),i=r(257);e.a=function(t){return o.a.createElement(i.a,t)}},208:function(t,e){e.f=Object.getOwnPropertySymbols},209:function(t,e,r){var n=r(82),o=r(55).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,o)}},219:function(t,e,r){var n=r(74),o=r(29);t.exports=function(t,e,r){if(n(e))throw TypeError("String#"+r+" doesn't accept regex!");return String(o(t))}},220:function(t,e,r){var n=r(3)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(r){try{return e[n]=!1,!"/./"[t](e)}catch(o){}}return!0}},226:function(t,e,r){var n=r(70),o=r(51),i=r(26),a=r(76),c=r(25),u=r(80),s=Object.getOwnPropertyDescriptor;e.f=r(11)?s:function(t,e){if(t=i(t),e=a(e,!0),u)try{return s(t,e)}catch(r){}if(c(t,e))return o(!n.f.call(t,e),t[e])}},227:function(t,e,r){e.f=r(3)},228:function(t,e,r){var n=r(21);t.exports=Array.isArray||function(t){return"Array"==n(t)}},257:function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return ht}));var n,o,i,a,c=r(13),u=r.n(c),s=r(258),f=r.n(s),l=r(259),p=r.n(l),y=r(0),d=r.n(y),h=r(54),b=r.n(h),m="bodyAttributes",v="htmlAttributes",g="titleAttributes",w={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title"},O=(Object.keys(w).map((function(t){return w[t]})),"charset"),T="cssText",S="href",E="http-equiv",A="innerHTML",j="itemprop",C="name",P="property",x="rel",k="src",I="target",L={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},N="defaultTitle",M="defer",R="encodeSpecialCharacters",_="onChangeClientState",F="titleTemplate",D=Object.keys(L).reduce((function(t,e){return t[L[e]]=e,t}),{}),q=[w.NOSCRIPT,w.SCRIPT,w.STYLE],B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},H=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},Y=function(){function t(t,e){for(var r=0;r=0||Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r},K=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e},z=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return!1===e?String(t):String(t).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")},J=function(t){var e=X(t,w.TITLE),r=X(t,F);if(r&&e)return r.replace(/%s/g,(function(){return Array.isArray(e)?e.join(""):e}));var n=X(t,N);return e||n||void 0},V=function(t){return X(t,_)||function(){}},$=function(t,e){return e.filter((function(e){return void 0!==e[t]})).map((function(e){return e[t]})).reduce((function(t,e){return W({},t,e)}),{})},G=function(t,e){return e.filter((function(t){return void 0!==t[w.BASE]})).map((function(t){return t[w.BASE]})).reverse().reduce((function(e,r){if(!e.length)for(var n=Object.keys(r),o=0;o=0;r--){var n=t[r];if(n.hasOwnProperty(e))return n[e]}return null},Z=(n=Date.now(),function(t){var e=Date.now();e-n>16?(n=e,t(e)):setTimeout((function(){Z(t)}),0)}),tt=function(t){return clearTimeout(t)},et="undefined"!=typeof window?window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||Z:t.requestAnimationFrame||Z,rt="undefined"!=typeof window?window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||tt:t.cancelAnimationFrame||tt,nt=function(t){return console&&"function"==typeof console.warn&&console.warn(t)},ot=null,it=function(t,e){var r=t.baseTag,n=t.bodyAttributes,o=t.htmlAttributes,i=t.linkTags,a=t.metaTags,c=t.noscriptTags,u=t.onChangeClientState,s=t.scriptTags,f=t.styleTags,l=t.title,p=t.titleAttributes;ut(w.BODY,n),ut(w.HTML,o),ct(l,p);var y={baseTag:st(w.BASE,r),linkTags:st(w.LINK,i),metaTags:st(w.META,a),noscriptTags:st(w.NOSCRIPT,c),scriptTags:st(w.SCRIPT,s),styleTags:st(w.STYLE,f)},d={},h={};Object.keys(y).forEach((function(t){var e=y[t],r=e.newTags,n=e.oldTags;r.length&&(d[t]=r),n.length&&(h[t]=y[t].oldTags)})),e&&e(),u(t,d,h)},at=function(t){return Array.isArray(t)?t.join(""):t},ct=function(t,e){void 0!==t&&document.title!==t&&(document.title=at(t)),ut(w.TITLE,e)},ut=function(t,e){var r=document.getElementsByTagName(t)[0];if(r){for(var n=r.getAttribute("data-react-helmet"),o=n?n.split(","):[],i=[].concat(o),a=Object.keys(e),c=0;c=0;l--)r.removeAttribute(i[l]);o.length===i.length?r.removeAttribute("data-react-helmet"):r.getAttribute("data-react-helmet")!==a.join(",")&&r.setAttribute("data-react-helmet",a.join(","))}},st=function(t,e){var r=document.head||document.querySelector(w.HEAD),n=r.querySelectorAll(t+"[data-react-helmet]"),o=Array.prototype.slice.call(n),i=[],a=void 0;return e&&e.length&&e.forEach((function(e){var r=document.createElement(t);for(var n in e)if(e.hasOwnProperty(n))if(n===A)r.innerHTML=e.innerHTML;else if(n===T)r.styleSheet?r.styleSheet.cssText=e.cssText:r.appendChild(document.createTextNode(e.cssText));else{var c=void 0===e[n]?"":e[n];r.setAttribute(n,c)}r.setAttribute("data-react-helmet","true"),o.some((function(t,e){return a=e,r.isEqualNode(t)}))?o.splice(a,1):i.push(r)})),o.forEach((function(t){return t.parentNode.removeChild(t)})),i.forEach((function(t){return r.appendChild(t)})),{oldTags:o,newTags:i}},ft=function(t){return Object.keys(t).reduce((function(e,r){var n=void 0!==t[r]?r+'="'+t[r]+'"':""+r;return e?e+" "+n:n}),"")},lt=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(t).reduce((function(e,r){return e[L[r]||r]=t[r],e}),e)},pt=function(t,e,r){switch(t){case w.TITLE:return{toComponent:function(){return t=e.title,r=e.titleAttributes,(n={key:t})["data-react-helmet"]=!0,o=lt(r,n),[d.a.createElement(w.TITLE,o,t)];var t,r,n,o},toString:function(){return function(t,e,r,n){var o=ft(r),i=at(e);return o?"<"+t+' data-react-helmet="true" '+o+">"+z(i,n)+"":"<"+t+' data-react-helmet="true">'+z(i,n)+""}(t,e.title,e.titleAttributes,r)}};case m:case v:return{toComponent:function(){return lt(e)},toString:function(){return ft(e)}};default:return{toComponent:function(){return function(t,e){return e.map((function(e,r){var n,o=((n={key:r})["data-react-helmet"]=!0,n);return Object.keys(e).forEach((function(t){var r=L[t]||t;if(r===A||r===T){var n=e.innerHTML||e.cssText;o.dangerouslySetInnerHTML={__html:n}}else o[r]=e[t]})),d.a.createElement(t,o)}))}(t,e)},toString:function(){return function(t,e,r){return e.reduce((function(e,n){var o=Object.keys(n).filter((function(t){return!(t===A||t===T)})).reduce((function(t,e){var o=void 0===n[e]?e:e+'="'+z(n[e],r)+'"';return t?t+" "+o:o}),""),i=n.innerHTML||n.cssText||"",a=-1===q.indexOf(t);return e+"<"+t+' data-react-helmet="true" '+o+(a?"/>":">"+i+"")}),"")}(t,e,r)}}}},yt=function(t){var e=t.baseTag,r=t.bodyAttributes,n=t.encode,o=t.htmlAttributes,i=t.linkTags,a=t.metaTags,c=t.noscriptTags,u=t.scriptTags,s=t.styleTags,f=t.title,l=void 0===f?"":f,p=t.titleAttributes;return{base:pt(w.BASE,e,n),bodyAttributes:pt(m,r,n),htmlAttributes:pt(v,o,n),link:pt(w.LINK,i,n),meta:pt(w.META,a,n),noscript:pt(w.NOSCRIPT,c,n),script:pt(w.SCRIPT,u,n),style:pt(w.STYLE,s,n),title:pt(w.TITLE,{title:l,titleAttributes:p},n)}},dt=f()((function(t){return{baseTag:G([S,I],t),bodyAttributes:$(m,t),defer:X(t,M),encode:X(t,R),htmlAttributes:$(v,t),linkTags:Q(w.LINK,[x,S],t),metaTags:Q(w.META,[C,O,E,P,j],t),noscriptTags:Q(w.NOSCRIPT,[A],t),onChangeClientState:V(t),scriptTags:Q(w.SCRIPT,[k,A],t),styleTags:Q(w.STYLE,[T],t),title:J(t),titleAttributes:$(g,t)}}),(function(t){ot&&rt(ot),t.defer?ot=et((function(){it(t,(function(){ot=null}))})):(it(t),ot=null)}),yt)((function(){return null})),ht=(o=dt,a=i=function(t){function e(){return H(this,e),K(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.shouldComponentUpdate=function(t){return!p()(this.props,t)},e.prototype.mapNestedChildrenToProps=function(t,e){if(!e)return null;switch(t.type){case w.SCRIPT:case w.NOSCRIPT:return{innerHTML:e};case w.STYLE:return{cssText:e}}throw new Error("<"+t.type+" /> elements are self-closing and can not contain children. Refer to our API for more information.")},e.prototype.flattenArrayTypeChildren=function(t){var e,r=t.child,n=t.arrayTypeChildren,o=t.newChildProps,i=t.nestedChildren;return W({},n,((e={})[r.type]=[].concat(n[r.type]||[],[W({},o,this.mapNestedChildrenToProps(r,i))]),e))},e.prototype.mapObjectTypeChildren=function(t){var e,r,n=t.child,o=t.newProps,i=t.newChildProps,a=t.nestedChildren;switch(n.type){case w.TITLE:return W({},o,((e={})[n.type]=a,e.titleAttributes=W({},i),e));case w.BODY:return W({},o,{bodyAttributes:W({},i)});case w.HTML:return W({},o,{htmlAttributes:W({},i)})}return W({},o,((r={})[n.type]=W({},i),r))},e.prototype.mapArrayTypeChildrenToProps=function(t,e){var r=W({},e);return Object.keys(t).forEach((function(e){var n;r=W({},r,((n={})[e]=t[e],n))})),r},e.prototype.warnOnInvalidChildren=function(t,e){return!0},e.prototype.mapChildrenToProps=function(t,e){var r=this,n={};return d.a.Children.forEach(t,(function(t){if(t&&t.props){var o=t.props,i=o.children,a=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(t).reduce((function(e,r){return e[D[r]||r]=t[r],e}),e)}(U(o,["children"]));switch(r.warnOnInvalidChildren(t,i),t.type){case w.LINK:case w.META:case w.NOSCRIPT:case w.SCRIPT:case w.STYLE:n=r.flattenArrayTypeChildren({child:t,arrayTypeChildren:n,newChildProps:a,nestedChildren:i});break;default:e=r.mapObjectTypeChildren({child:t,newProps:e,newChildProps:a,nestedChildren:i})}}})),e=this.mapArrayTypeChildrenToProps(n,e)},e.prototype.render=function(){var t=this.props,e=t.children,r=U(t,["children"]),n=W({},r);return e&&(n=this.mapChildrenToProps(e,n)),d.a.createElement(o,n)},Y(e,null,[{key:"canUseDOM",set:function(t){o.canUseDOM=t}}]),e}(d.a.Component),i.propTypes={base:u.a.object,bodyAttributes:u.a.object,children:u.a.oneOfType([u.a.arrayOf(u.a.node),u.a.node]),defaultTitle:u.a.string,defer:u.a.bool,encodeSpecialCharacters:u.a.bool,htmlAttributes:u.a.object,link:u.a.arrayOf(u.a.object),meta:u.a.arrayOf(u.a.object),noscript:u.a.arrayOf(u.a.object),onChangeClientState:u.a.func,script:u.a.arrayOf(u.a.object),style:u.a.arrayOf(u.a.object),title:u.a.string,titleAttributes:u.a.object,titleTemplate:u.a.string},i.defaultProps={defer:!0,encodeSpecialCharacters:!0},i.peek=o.peek,i.rewind=function(){var t=o.rewind();return t||(t=yt({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}})),t},a);ht.renderStatic=ht.rewind}).call(this,r(69))},258:function(t,e,r){"use strict";var n,o=r(0),i=(n=o)&&"object"==typeof n&&"default"in n?n.default:n;function a(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var c=!("undefined"==typeof window||!window.document||!window.document.createElement);t.exports=function(t,e,r){if("function"!=typeof t)throw new Error("Expected reducePropsToState to be a function.");if("function"!=typeof e)throw new Error("Expected handleStateChangeOnClient to be a function.");if(void 0!==r&&"function"!=typeof r)throw new Error("Expected mapStateOnServer to either be undefined or a function.");return function(n){if("function"!=typeof n)throw new Error("Expected WrappedComponent to be a React component.");var u,s=[];function f(){u=t(s.map((function(t){return t.props}))),l.canUseDOM?e(u):r&&(u=r(u))}var l=function(t){var e,r;function o(){return t.apply(this,arguments)||this}r=t,(e=o).prototype=Object.create(r.prototype),e.prototype.constructor=e,e.__proto__=r,o.peek=function(){return u},o.rewind=function(){if(o.canUseDOM)throw new Error("You may only call rewind() on the server. Call peek() to read the current state.");var t=u;return u=void 0,s=[],t};var a=o.prototype;return a.UNSAFE_componentWillMount=function(){s.push(this),f()},a.componentDidUpdate=function(){f()},a.componentWillUnmount=function(){var t=s.indexOf(this);s.splice(t,1),f()},a.render=function(){return i.createElement(n,this.props)},o}(o.PureComponent);return a(l,"displayName","SideEffect("+function(t){return t.displayName||t.name||"Component"}(n)+")"),a(l,"canUseDOM",c),l}}},259:function(t,e){var r="undefined"!=typeof Element,n="function"==typeof Map,o="function"==typeof Set,i="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;t.exports=function(t,e){try{return function t(e,a){if(e===a)return!0;if(e&&a&&"object"==typeof e&&"object"==typeof a){if(e.constructor!==a.constructor)return!1;var c,u,s,f;if(Array.isArray(e)){if((c=e.length)!=a.length)return!1;for(u=c;0!=u--;)if(!t(e[u],a[u]))return!1;return!0}if(n&&e instanceof Map&&a instanceof Map){if(e.size!==a.size)return!1;for(f=e.entries();!(u=f.next()).done;)if(!a.has(u.value[0]))return!1;for(f=e.entries();!(u=f.next()).done;)if(!t(u.value[1],a.get(u.value[0])))return!1;return!0}if(o&&e instanceof Set&&a instanceof Set){if(e.size!==a.size)return!1;for(f=e.entries();!(u=f.next()).done;)if(!a.has(u.value[0]))return!1;return!0}if(i&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(a)){if((c=e.length)!=a.length)return!1;for(u=c;0!=u--;)if(e[u]!==a[u])return!1;return!0}if(e.constructor===RegExp)return e.source===a.source&&e.flags===a.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===a.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===a.toString();if((c=(s=Object.keys(e)).length)!==Object.keys(a).length)return!1;for(u=c;0!=u--;)if(!Object.prototype.hasOwnProperty.call(a,s[u]))return!1;if(r&&e instanceof Element)return!1;for(u=c;0!=u--;)if(("_owner"!==s[u]&&"__v"!==s[u]&&"__o"!==s[u]||!e.$$typeof)&&!t(e[s[u]],a[s[u]]))return!1;return!0}return e!=e&&a!=a}(t,e)}catch(a){if((a.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw a}}},260:function(t,e,r){"use strict";var n=r(11),o=r(27),i=r(208),a=r(70),c=r(49),u=r(78),s=Object.assign;t.exports=!s||r(18)((function(){var t={},e={},r=Symbol(),n="abcdefghijklmnopqrst";return t[r]=7,n.split("").forEach((function(t){e[t]=t})),7!=s({},t)[r]||Object.keys(s({},e)).join("")!=n}))?function(t,e){for(var r=c(t),s=arguments.length,f=1,l=i.f,p=a.f;s>f;)for(var y,d=u(arguments[f++]),h=l?o(d).concat(l(d)):o(d),b=h.length,m=0;b>m;)y=h[m++],n&&!p.call(d,y)||(r[y]=d[y]);return r}:s},263:function(t,e,r){"use strict";var n=r(6),o=r(25),i=r(11),a=r(17),c=r(14),u=r(264).KEY,s=r(18),f=r(39),l=r(41),p=r(38),y=r(3),d=r(227),h=r(265),b=r(266),m=r(228),v=r(8),g=r(12),w=r(49),O=r(26),T=r(76),S=r(51),E=r(81),A=r(267),j=r(226),C=r(208),P=r(23),x=r(27),k=j.f,I=P.f,L=A.f,N=n.Symbol,M=n.JSON,R=M&&M.stringify,_=y("_hidden"),F=y("toPrimitive"),D={}.propertyIsEnumerable,q=f("symbol-registry"),B=f("symbols"),H=f("op-symbols"),Y=Object.prototype,W="function"==typeof N&&!!C.f,U=n.QObject,K=!U||!U.prototype||!U.prototype.findChild,z=i&&s((function(){return 7!=E(I({},"a",{get:function(){return I(this,"a",{value:7}).a}})).a}))?function(t,e,r){var n=k(Y,e);n&&delete Y[e],I(t,e,r),n&&t!==Y&&I(Y,e,n)}:I,J=function(t){var e=B[t]=E(N.prototype);return e._k=t,e},V=W&&"symbol"==typeof N.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof N},$=function(t,e,r){return t===Y&&$(H,e,r),v(t),e=T(e,!0),v(r),o(B,e)?(r.enumerable?(o(t,_)&&t[_][e]&&(t[_][e]=!1),r=E(r,{enumerable:S(0,!1)})):(o(t,_)||I(t,_,S(1,{})),t[_][e]=!0),z(t,e,r)):I(t,e,r)},G=function(t,e){v(t);for(var r,n=b(e=O(e)),o=0,i=n.length;i>o;)$(t,r=n[o++],e[r]);return t},Q=function(t){var e=D.call(this,t=T(t,!0));return!(this===Y&&o(B,t)&&!o(H,t))&&(!(e||!o(this,t)||!o(B,t)||o(this,_)&&this[_][t])||e)},X=function(t,e){if(t=O(t),e=T(e,!0),t!==Y||!o(B,e)||o(H,e)){var r=k(t,e);return!r||!o(B,e)||o(t,_)&&t[_][e]||(r.enumerable=!0),r}},Z=function(t){for(var e,r=L(O(t)),n=[],i=0;r.length>i;)o(B,e=r[i++])||e==_||e==u||n.push(e);return n},tt=function(t){for(var e,r=t===Y,n=L(r?H:O(t)),i=[],a=0;n.length>a;)!o(B,e=n[a++])||r&&!o(Y,e)||i.push(B[e]);return i};W||(c((N=function(){if(this instanceof N)throw TypeError("Symbol is not a constructor!");var t=p(arguments.length>0?arguments[0]:void 0),e=function(r){this===Y&&e.call(H,r),o(this,_)&&o(this[_],t)&&(this[_][t]=!1),z(this,t,S(1,r))};return i&&K&&z(Y,t,{configurable:!0,set:e}),J(t)}).prototype,"toString",(function(){return this._k})),j.f=X,P.f=$,r(209).f=A.f=Z,r(70).f=Q,C.f=tt,i&&!r(37)&&c(Y,"propertyIsEnumerable",Q,!0),d.f=function(t){return J(y(t))}),a(a.G+a.W+a.F*!W,{Symbol:N});for(var et="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),rt=0;et.length>rt;)y(et[rt++]);for(var nt=x(y.store),ot=0;nt.length>ot;)h(nt[ot++]);a(a.S+a.F*!W,"Symbol",{for:function(t){return o(q,t+="")?q[t]:q[t]=N(t)},keyFor:function(t){if(!V(t))throw TypeError(t+" is not a symbol!");for(var e in q)if(q[e]===t)return e},useSetter:function(){K=!0},useSimple:function(){K=!1}}),a(a.S+a.F*!W,"Object",{create:function(t,e){return void 0===e?E(t):G(E(t),e)},defineProperty:$,defineProperties:G,getOwnPropertyDescriptor:X,getOwnPropertyNames:Z,getOwnPropertySymbols:tt});var it=s((function(){C.f(1)}));a(a.S+a.F*it,"Object",{getOwnPropertySymbols:function(t){return C.f(w(t))}}),M&&a(a.S+a.F*(!W||s((function(){var t=N();return"[null]"!=R([t])||"{}"!=R({a:t})||"{}"!=R(Object(t))}))),"JSON",{stringify:function(t){for(var e,r,n=[t],o=1;arguments.length>o;)n.push(arguments[o++]);if(r=e=n[1],(g(e)||void 0!==t)&&!V(t))return m(e)||(e=function(t,e){if("function"==typeof r&&(e=r.call(this,t,e)),!V(e))return e}),n[1]=e,R.apply(M,n)}}),N.prototype[F]||r(10)(N.prototype,F,N.prototype.valueOf),l(N,"Symbol"),l(Math,"Math",!0),l(n.JSON,"JSON",!0)},264:function(t,e,r){var n=r(38)("meta"),o=r(12),i=r(25),a=r(23).f,c=0,u=Object.isExtensible||function(){return!0},s=!r(18)((function(){return u(Object.preventExtensions({}))})),f=function(t){a(t,n,{value:{i:"O"+ ++c,w:{}}})},l=t.exports={KEY:n,NEED:!1,fastKey:function(t,e){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!i(t,n)){if(!u(t))return"F";if(!e)return"E";f(t)}return t[n].i},getWeak:function(t,e){if(!i(t,n)){if(!u(t))return!0;if(!e)return!1;f(t)}return t[n].w},onFreeze:function(t){return s&&l.NEED&&u(t)&&!i(t,n)&&f(t),t}}},265:function(t,e,r){var n=r(6),o=r(15),i=r(37),a=r(227),c=r(23).f;t.exports=function(t){var e=o.Symbol||(o.Symbol=i?{}:n.Symbol||{});"_"==t.charAt(0)||t in e||c(e,t,{value:a.f(t)})}},266:function(t,e,r){var n=r(27),o=r(208),i=r(70);t.exports=function(t){var e=n(t),r=o.f;if(r)for(var a,c=r(t),u=i.f,s=0;c.length>s;)u.call(t,a=c[s++])&&e.push(a);return e}},267:function(t,e,r){var n=r(26),o=r(209).f,i={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return a&&"[object Window]"==i.call(t)?function(t){try{return o(t)}catch(e){return a.slice()}}(t):o(n(t))}}}]); \ No newline at end of file diff --git a/1.5e72a75a.js.LICENSE.txt b/1.37d6b62d.js.LICENSE.txt similarity index 100% rename from 1.5e72a75a.js.LICENSE.txt rename to 1.37d6b62d.js.LICENSE.txt diff --git a/14d2fb43.160a3711.js b/14d2fb43.160a3711.js new file mode 100644 index 000000000000..508a5481dd2b --- /dev/null +++ b/14d2fb43.160a3711.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[7],{144:function(e,t,n){"use strict";n.r(t),n.d(t,"frontMatter",(function(){return i})),n.d(t,"metadata",(function(){return c})),n.d(t,"rightToc",(function(){return l})),n.d(t,"default",(function(){return d}));var a=n(2),o=n(9),r=(n(0),n(185)),i={title:"Social Authentication",sidebar_label:"Social Auth"},c={id:"auth/social",title:"Social Authentication",description:"Social authentication is a multi-step authentication flow, allowing you to sign a user into an account or link",source:"@site/../docs/auth/social.mdx",permalink:"/docs/auth/social",editUrl:"https://github.com/FirebaseExtended/flutterfire/edit/master/docs/../docs/auth/social.mdx",sidebar_label:"Social Auth"},l=[{value:"Google",id:"google",children:[]},{value:"Facebook",id:"facebook",children:[]}],s=function(e){return function(t){return console.warn("Component "+e+" was not imported, exported, or provided by MDXProvider as global scope"),Object(r.b)("div",t)}},b=s("Tabs"),u=s("TabItem"),p={rightToc:l};function d(e){var t=e.components,n=Object(o.a)(e,["components"]);return Object(r.b)("wrapper",Object(a.a)({},p,n,{components:t,mdxType:"MDXLayout"}),Object(r.b)("p",null,"Social authentication is a multi-step authentication flow, allowing you to sign a user into an account or link\nthem with an existing one."),Object(r.b)("p",null,"Both native platforms and web support creating a credential which can then be passed to the ",Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"!firebase_auth.FirebaseAuth.signInWithCredential"}),Object(r.b)("inlineCode",{parentName:"a"},"signInWithCredential")),"\nor ",Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"!firebase_auth.User.linkWithCredential"}),Object(r.b)("inlineCode",{parentName:"a"},"linkWithCredential"))," methods. Alternatively on web platforms, you can trigger the authentication process via\na popup or redirect."),Object(r.b)("h2",{id:"google"},"Google"),Object(r.b)("p",null,"Most configuration is already setup when using Google Sign-In with Firebase, however you need to ensure your machines\nSHA1 key has been configured for use with Android. You can see view how to generate the key on the\n",Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"overview"}),"Getting Started")," documentation."),Object(r.b)("p",null,'Ensure the "Google" sign-in provider is enabled on the ',Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"https://console.firebase.google.com/project/_/authentication/providers"}),"Firebase Console"),"."),Object(r.b)("blockquote",null,Object(r.b)("p",{parentName:"blockquote"},"If your user signs in with Google, after having already manually registered an account, their authentication provider will automatically\nchange to Google, due to Firebase Authentications concept of trusted providers. You can find out more about\nthis ",Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"https://groups.google.com/g/firebase-talk/c/ms_NVQem_Cw/m/8g7BFk1IAAAJ"}),"here"),".")),Object(r.b)(b,{defaultValue:"native",values:[{label:"Native",value:"native"},{label:"Web",value:"web"}],mdxType:"Tabs"},Object(r.b)(u,{value:"native",mdxType:"TabItem"},Object(r.b)("p",null,"On native platforms, a 3rd party library is required to trigger the authentication flow."),Object(r.b)("p",null,"Install the official ",Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"https://pub.dev/packages/google_sign_in"}),Object(r.b)("inlineCode",{parentName:"a"},"google_sign_in"))," plugin:"),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml",metastring:'title="pubspec.yaml"',title:'"pubspec.yaml"'}),'dependencies:\n google_sign_in: "{{ external.google_sign_in }}"\n')),Object(r.b)("p",null,"Once installed, trigger the sign-in flow and create a new credential:"),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-dart"}),"import 'package:google_sign_in/google_sign_in.dart';\n\nFuture signInWithGoogle() async {\n // Trigger the authenticaion flow\n final GoogleSignInAccount googleUser = await GoogleSignIn().signIn();\n\n // Obtain the auth details from the request\n final GoogleSignInAuthentication googleAuth = await googleUser.authentication;\n\n // Create a new credential\n final GoogleAuthCredential credential = GoogleAuthProvider.credential(\n accessToken: googleAuth.accessToken,\n idToken: googleAuth.idToken,\n );\n\n // Once signed in, return the UserCredential\n return await FirebaseAuth.instance.signInWithCredential(credential);\n}\n"))),Object(r.b)(u,{value:"web",mdxType:"TabItem"},Object(r.b)("p",null,"On the web, the Firebase SDK provides support for automatically handling the authentication flow using your Firebase project. For example:"),Object(r.b)("p",null,"Create a Google auth provider, providing any additional ",Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"https://developers.google.com/identity/protocols/oauth2/scopes"}),"permission scope"),"\nyou wish to obtain from the user:"),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-dart"}),"GoogleAuthProvider googleProvider = GoogleAuthProvider();\n\ngoogleProvider.addScope('https://www.googleapis.com/auth/contacts.readonly');\ngoogleProvider.setCustomParameters({\n 'login_hint': 'user@example.com'\n});\n")),Object(r.b)("p",null,"Provide the credential to the ",Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"!firebase_auth.FirebaseAuth.signInWithPopup"}),Object(r.b)("inlineCode",{parentName:"a"},"signInWithPopup"))," method. This will trigger a new\nwindow to appear prompting the user to sign-in to your project:"),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-dart"}),"Future signInWithGoogle() async {\n // Create a new provider\n GoogleAuthProvider googleProvider = GoogleAuthProvider();\n\n googleProvider.addScope('https://www.googleapis.com/auth/contacts.readonly');\n googleProvider.setCustomParameters({\n 'login_hint': 'user@example.com'\n });\n\n // Once signed in, return the UserCredential\n return await FirebaseAuth.instance.signInWithPopup(googleProvider);\n}\n")))),Object(r.b)("h2",{id:"facebook"},"Facebook"),Object(r.b)("p",null,"Before getting started setup your ",Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"https://developers.facebook.com/apps/"}),"Facebook Developer App")," and follow the setup process to enable Facebook Login."),Object(r.b)("p",null,'Ensure the "Facebook" sign-in provider is enabled on the ',Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"https://console.firebase.google.com/project/_/authentication/providers"}),"Firebase Console"),".\nwith the Facebook App ID and Secret set."),Object(r.b)(b,{defaultValue:"native",values:[{label:"Native",value:"native"},{label:"Web",value:"web"}],mdxType:"Tabs"},Object(r.b)(u,{value:"native",mdxType:"TabItem"},Object(r.b)("p",null,"On native platforms, a 3rd party library is required to both install the Facebook SDK and trigger the authentication flow."),Object(r.b)("p",null,"Install the ",Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"https://pub.dev/packages/flutter_facebook_auth"}),Object(r.b)("inlineCode",{parentName:"a"},"flutter_facebook_auth"))," plugin:"),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml",metastring:'title="pubspec.yaml"',title:'"pubspec.yaml"'}),'dependencies:\n flutter_facebook_auth: "{{ external.flutter_facebook_auth }}"\n')),Object(r.b)("p",null,"You will need to follow the steps in the plugin documentation to ensure that both the Android & iOS Facebook SDKs have been initialized\ncorrectly. Once complete, trigger the sign-in flow, create a Facebook credential and sign the user in:"),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-dart"}),"import 'package:flutter_facebook_auth/flutter_facebook_auth.dart';\n\nFuture signInWithFacebook() async {\n // Trigger the sign-in flow\n final LoginResult result = await FacebookAuth.instance.login();\n\n // Create a credential from the access token\n final FacebookAuthCredential facebookAuthCredential =\n FacebookAuthProvider.credential(result.accessToken.token);\n\n // Once signed in, return the UserCredential\n return await FirebaseAuth.instance.signInWithCredential(facebookAuthCredential);\n}\n"))),Object(r.b)(u,{value:"web",mdxType:"TabItem"},Object(r.b)("p",null,"On the web, the Firebase SDK provides support for automatically handling the authentication flow using the\nFacebook application details provided on the Firebase console. For example:"),Object(r.b)("p",null,"Create a Facebook provider, providing any additional ",Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"https://developers.facebook.com/docs/facebook-login/permissions/"}),"permission scope"),"\nyou wish to obtain from the user:"),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-dart"}),"FacebookAuthProvider facebookProvider = FacebookAuthProvider();\n\nfacebookProvider.addScope('email');\nfacebookProvider.setCustomParameters({\n 'display': 'popup',\n});\n")),Object(r.b)("p",null,"Provide the credential to the ",Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"!firebase_auth.FirebaseAuth.signInWithPopup"}),Object(r.b)("inlineCode",{parentName:"a"},"signInWithPopup"))," method. This will trigger a new\nwindow to appear prompting the user to sign-in to your Facebook application:"),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-dart"}),"Future signInWithFacebook() async {\n // Create a new provider\n FacebookAuthProvider facebookProvider = FacebookAuthProvider();\n\n facebookProvider.addScope('email');\n facebookProvider.setCustomParameters({\n 'display': 'popup',\n });\n\n // Once signed in, return the UserCredential\n return await FirebaseAuth.instance.signInWithPopup(facebookProvider);\n}\n")))))}d.isMDXComponent=!0},185:function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return g}));var a=n(0),o=n.n(a);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function c(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var s=o.a.createContext({}),b=function(e){var t=o.a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):c(c({},t),e)),n},u=function(e){var t=b(e.components);return o.a.createElement(s.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},d=o.a.forwardRef((function(e,t){var n=e.components,a=e.mdxType,r=e.originalType,i=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),u=b(n),d=a,g=u["".concat(i,".").concat(d)]||u[d]||p[d]||r;return n?o.a.createElement(g,c(c({ref:t},s),{},{components:n})):o.a.createElement(g,c({ref:t},s))}));function g(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var r=n.length,i=new Array(r);i[0]=d;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:a,i[1]=c;for(var s=2;s signInWithGoogle() async {\n // Trigger the authenticaion flow\n final GoogleSignInAccount googleUser = await GoogleSignIn().signIn();\n\n // Obtain the auth details from the request\n final GoogleSignInAuthentication googleAuth = await googleUser.authentication;\n\n // Create a new credential\n final GoogleAuthCredential credential = GoogleAuthProvider.credential(\n accessToken: googleAuth.accessToken,\n idToken: googleAuth.idToken,\n );\n\n // Once signed in, return the UserCredential\n return await FirebaseAuth.instance.signInWithCredential(credential);\n}\n"))),Object(r.b)(b,{value:"web",mdxType:"TabItem"},Object(r.b)("p",null,"On the web, the Firebase SDK provides support for automatically handling the authentication flow using your Firebase project. For example:"),Object(r.b)("p",null,"Create a Google auth provider, providing any additional ",Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"https://developers.google.com/identity/protocols/oauth2/scopes"}),"permission scope"),"\nyou wish to obtain from the user:"),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-dart"}),"GoogleAuthProvider googleProvider = GoogleAuthProvider();\n\ngoogleProvider.addScope('https://www.googleapis.com/auth/contacts.readonly');\ngoogleProvider.setCustomParameters({\n 'login_hint': 'user@example.com'\n});\n")),Object(r.b)("p",null,"Provide the credential to the ",Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"!firebase_auth.FirebaseAuth.signInWithPopup"}),Object(r.b)("inlineCode",{parentName:"a"},"signInWithPopup"))," method. This will trigger a new\nwindow to appear prompting the user to sign-in to your project:"),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-dart"}),"Future signInWithGoogle() async {\n // Create a new provider\n GoogleAuthProvider googleProvider = GoogleAuthProvider();\n\n googleProvider.addScope('https://www.googleapis.com/auth/contacts.readonly');\n googleProvider.setCustomParameters({\n 'login_hint': 'user@example.com'\n });\n\n // Once signed in, return the UserCredential\n return await FirebaseAuth.instance.signInWithPopup(googleProvider);\n}\n")))),Object(r.b)("h2",{id:"facebook"},"Facebook"),Object(r.b)("p",null,"Before getting started setup your ",Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"https://developers.facebook.com/apps/"}),"Facebook Developer App")," and follow the setup process to enable Facebook Login."),Object(r.b)("p",null,'Ensure the "Facebook" sign-in provider is enabled on the ',Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"https://console.firebase.google.com/project/_/authentication/providers"}),"Firebase Console"),".\nwith the Facebook App ID and Secret set."),Object(r.b)(u,{defaultValue:"native",values:[{label:"Native",value:"native"},{label:"Web",value:"web"}],mdxType:"Tabs"},Object(r.b)(b,{value:"native",mdxType:"TabItem"},Object(r.b)("p",null,"On native platforms, a 3rd party library is required to both install the Facebook SDK and trigger the authentication flow."),Object(r.b)("p",null,"Install the ",Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"https://pub.dev/packages/flutter_facebook_auth"}),Object(r.b)("inlineCode",{parentName:"a"},"flutter_facebook_auth"))," plugin:"),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml",metastring:'title="pubspec.yaml"',title:'"pubspec.yaml"'}),'dependencies:\n flutter_facebook_auth: "{{ external.flutter_facebook_auth }}"\n')),Object(r.b)("p",null,"You will need to follow the steps in the plugin documentation to ensure that both the Android & iOS Facebook SDKs have been initialized\ncorrectly. Once complete, trigger the sign-in flow, create a Facebook credential and sign the user in:"),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-dart"}),"import 'package:flutter_facebook_auth/flutter_facebook_auth.dart';\n\nFuture signInWithFacebook() async {\n // Trigger the sign-in flow\n final LoginResult result = await FacebookAuth.instance.login();\n\n // Create a credential from the access token\n final FacebookAuthCredential facebookAuthCredential =\n FacebookAuthProvider.credential(result.accessToken.token);\n\n // Once signed in, return the UserCredential\n return await FirebaseAuth.instance.signInWithCredential(facebookAuthCredential);\n}\n"))),Object(r.b)(b,{value:"web",mdxType:"TabItem"},Object(r.b)("p",null,"On the web, the Firebase SDK provides support for automatically handling the authentication flow using the\nFacebook application details provided on the Firebase console. For example:"),Object(r.b)("p",null,"Create a Facebook provider, providing any additional ",Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"https://developers.facebook.com/docs/facebook-login/permissions/"}),"permission scope"),"\nyou wish to obtain from the user:"),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-dart"}),"FacebookAuthProvider facebookProvider = FacebookAuthProvider();\n\nfacebookProvider.addScope('email');\nfacebookProvider.setCustomParameters({\n 'display': 'popup',\n});\n")),Object(r.b)("p",null,"Provide the credential to the ",Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"!firebase_auth.FirebaseAuth.signInWithPopup"}),Object(r.b)("inlineCode",{parentName:"a"},"signInWithPopup"))," method. This will trigger a new\nwindow to appear prompting the user to sign-in to your Facebook application:"),Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-dart"}),"Future signInWithFacebook() async {\n // Create a new provider\n FacebookAuthProvider facebookProvider = FacebookAuthProvider();\n\n facebookProvider.addScope('email');\n facebookProvider.setCustomParameters({\n 'display': 'popup',\n });\n\n // Once signed in, return the UserCredential\n return await FirebaseAuth.instance.signInWithPopup(facebookProvider);\n}\n")))))}d.isMDXComponent=!0},180:function(e,t,n){"use strict";n.d(t,"a",(function(){return b})),n.d(t,"b",(function(){return g}));var a=n(0),o=n.n(a);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function c(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var s=o.a.createContext({}),u=function(e){var t=o.a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):c(c({},t),e)),n},b=function(e){var t=u(e.components);return o.a.createElement(s.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},d=o.a.forwardRef((function(e,t){var n=e.components,a=e.mdxType,r=e.originalType,i=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),b=u(n),d=a,g=b["".concat(i,".").concat(d)]||b[d]||p[d]||r;return n?o.a.createElement(g,c(c({ref:t},s),{},{components:n})):o.a.createElement(g,c({ref:t},s))}));function g(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var r=n.length,i=new Array(r);i[0]=d;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:a,i[1]=c;for(var s=2;s _AppState();\n}\n\nclass _AppState extends State {\n // Set default `_initialized` and `_error` state to false\n bool _initialized = false;\n bool _error = false;\n\n // Define an async function to initialize FlutterFire\n void initializeFlutterFire() async {\n try {\n // Wait for Firebase to initialize and set `_initialized` state to true\n await Firebase.initializeApp();\n setState(() {\n _initialized = true;\n });\n } catch(e) {\n // Set `_error` state to true if Firebase initialization fails\n setState(() {\n _error = true;\n });\n }\n }\n\n @override\n void initState() {\n initializeFlutterFire();\n super.initState();\n }\n\n @override\n Widget build(BuildContext context) {\n // Show error message if initialization failed\n if(_error) {\n return SomethingWentWrong();\n }\n\n // Show a loader until FlutterFire is initialized\n if (!_initialized) {\n return Loading();\n }\n\n return MyAwesomeApp();\n }\n}\n")))),Object(i.b)("p",null,"Once initialized, you're ready to get started using FlutterFire!"),Object(i.b)("h2",{id:"overriding-native-sdk-versions"},"Overriding Native SDK Versions"),Object(i.b)("p",null,"FlutterFire internally sets the versions of the native SDKs that each module uses. Each release is tested against a fixed\nset of SDK version to ensure everything works as expected."),Object(i.b)("p",null,"If you wish to change these versions, you can manually override the native SDK versions"),Object(i.b)("h3",{id:"android"},"Android"),Object(i.b)("p",null,"In the ",Object(i.b)("inlineCode",{parentName:"p"},"/android/app/build.gradle")," file, you can provide your own versions using the options shown below:"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-groovy"}),"project.ext {\n set('FlutterFire', [\n FirebaseSDKVersion: '21.1.0'\n ])\n}\n")),Object(i.b)("h3",{id:"ios"},"iOS"),Object(i.b)("p",null,"Open your ",Object(i.b)("inlineCode",{parentName:"p"},"/ios/Podfile")," and add any of the globals below to the top of the file:"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-ruby"}),"# Override Firebase SDK Version\n$FirebaseSDKVersion = '21.1.0'\n")),Object(i.b)("h2",{id:"next-steps"},"Next Steps"),Object(i.b)("p",null,"On its own the ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"!firebase_core"}),Object(i.b)("inlineCode",{parentName:"a"},"firebase_core"))," plugin provides basic functionality for usage with Firebase. FlutterFire is broken down\ninto several individual installable plugins that allow you to integrate with a specific Firebase service."),Object(i.b)("p",null,"The table below lists all of the currently supported plugins. You can follow the documentation for each plugin to\nget started:"),Object(i.b)("table",null,Object(i.b)("thead",{parentName:"table"},Object(i.b)("tr",{parentName:"thead"},Object(i.b)("th",Object(a.a)({parentName:"tr"},{align:"center"}),"Firebase"),Object(i.b)("th",Object(a.a)({parentName:"tr"},{align:null}),"Description"),Object(i.b)("th",Object(a.a)({parentName:"tr"},{align:"center"}),"FlutterFire Plugin"))),Object(i.b)("tbody",{parentName:"table"},Object(i.b)("tr",{parentName:"tbody"},Object(i.b)("td",Object(a.a)({parentName:"tr"},{align:"center"}),Object(i.b)("strong",{parentName:"td"},"Authentication")),Object(i.b)("td",Object(a.a)({parentName:"tr"},{align:null}),"Using Firebase Authentication you can authenticate users to your app using several methods such as passwords, phone numbers, and popular federated providers like Google, Facebook, and more. ",Object(i.b)("br",null),Object(i.b)("br",null)," ",Object(i.b)("a",Object(a.a)({parentName:"td"},{href:"/docs/auth/overview"}),"View documentation ","\xbb")),Object(i.b)("td",Object(a.a)({parentName:"tr"},{align:"center"}),Object(i.b)("a",Object(a.a)({parentName:"td"},{href:"https://pub.dartlang.org/packages/firebase_auth"}),"firebase_auth"))),Object(i.b)("tr",{parentName:"tbody"},Object(i.b)("td",Object(a.a)({parentName:"tr"},{align:"center"}),Object(i.b)("strong",{parentName:"td"},"Cloud Firestore")),Object(i.b)("td",Object(a.a)({parentName:"tr"},{align:null}),"Cloud Firestore is a flexible, scalable database for mobile, web, and server development from Firebase and Google Cloud Platform. Cloud Firestore also offers seamless integration with other Firebase and Google Cloud Platform products, including Cloud Functions. ",Object(i.b)("br",null),Object(i.b)("br",null)," ",Object(i.b)("a",Object(a.a)({parentName:"td"},{href:"/docs/firestore/overview"}),"View documentation ","\xbb")),Object(i.b)("td",Object(a.a)({parentName:"tr"},{align:"center"}),Object(i.b)("a",Object(a.a)({parentName:"td"},{href:"https://pub.dartlang.org/packages/cloud_firestore"}),"cloud_firestore"))),Object(i.b)("tr",{parentName:"tbody"},Object(i.b)("td",Object(a.a)({parentName:"tr"},{align:"center"}),Object(i.b)("strong",{parentName:"td"},"Core")),Object(i.b)("td",Object(a.a)({parentName:"tr"},{align:null}),"The ",Object(i.b)("inlineCode",{parentName:"td"},"firebase_core")," plugin is used to initialize FlutterFire and connect your application with multiple Firebase projects. ",Object(i.b)("br",null),Object(i.b)("br",null)," ",Object(i.b)("a",Object(a.a)({parentName:"td"},{href:"/docs/core/usage"}),"View documentation ","\xbb")),Object(i.b)("td",Object(a.a)({parentName:"tr"},{align:"center"}),Object(i.b)("a",Object(a.a)({parentName:"td"},{href:"https://pub.dartlang.org/packages/firebase_core"}),"firebase_core"))))))}d.isMDXComponent=!0},180:function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return m}));var a=n(0),r=n.n(a);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var c=r.a.createContext({}),s=function(e){var t=r.a.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},u=function(e){var t=s(e.components);return r.a.createElement(c.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},d=r.a.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,o=e.parentName,c=b(e,["components","mdxType","originalType","parentName"]),u=s(n),d=a,m=u["".concat(o,".").concat(d)]||u[d]||p[d]||i;return n?r.a.createElement(m,l(l({ref:t},c),{},{components:n})):r.a.createElement(m,l({ref:t},c))}));function m(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=d;var l={};for(var b in t)hasOwnProperty.call(t,b)&&(l[b]=t[b]);l.originalType=e,l.mdxType="string"==typeof e?e:a,o[1]=l;for(var c=2;c _AppState();\n}\n\nclass _AppState extends State {\n // Set default `_initialized` and `_error` state to false\n bool _initialized = false;\n bool _error = false;\n\n // Define an async function to initialize FlutterFire\n void initializeFlutterFire() async {\n try {\n // Wait for Firebase to initialize and set `_initialized` state to true\n await Firebase.initializeApp();\n setState(() {\n _initialized = true;\n });\n } catch(e) {\n // Set `_error` state to true if Firebase initialization fails\n setState(() {\n _error = true;\n });\n }\n }\n\n @override\n void initState() {\n initializeFlutterFire();\n super.initState();\n }\n\n @override\n Widget build(BuildContext context) {\n // Show error message if initialization failed\n if(_error) {\n return SomethingWentWrong();\n }\n\n // Show a loader until FlutterFire is initialized\n if (!_initialized) {\n return Loading();\n }\n\n return MyAwesomeApp();\n }\n}\n")))),Object(i.b)("p",null,"Once initialized, you're ready to get started using FlutterFire!"),Object(i.b)("h2",{id:"overriding-native-sdk-versions"},"Overriding Native SDK Versions"),Object(i.b)("p",null,"FlutterFire internally sets the versions of the native SDKs that each module uses. Each release is tested against a fixed\nset of SDK version to ensure everything works as expected."),Object(i.b)("p",null,"If you wish to change these versions, you can manually override the native SDK versions"),Object(i.b)("h3",{id:"android"},"Android"),Object(i.b)("p",null,"In the ",Object(i.b)("inlineCode",{parentName:"p"},"/android/app/build.gradle")," file, you can provide your own versions using the options shown below:"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-groovy"}),"project.ext {\n set('FlutterFire', [\n FirebaseSDKVersion: '21.1.0'\n ])\n}\n")),Object(i.b)("h3",{id:"ios"},"iOS"),Object(i.b)("p",null,"Open your ",Object(i.b)("inlineCode",{parentName:"p"},"/ios/Podfile")," and add any of the globals below to the top of the file:"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-ruby"}),"# Override Firebase SDK Version\n$FirebaseSDKVersion = '21.1.0'\n")),Object(i.b)("h2",{id:"next-steps"},"Next Steps"),Object(i.b)("p",null,"On its own the ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"!firebase_core"}),Object(i.b)("inlineCode",{parentName:"a"},"firebase_core"))," plugin provides basic functionality for usage with Firebase. FlutterFire is broken down\ninto several individual installable plugins that allow you to integrate with a specific Firebase service."),Object(i.b)("p",null,"The table below lists all of the currently supported plugins. You can follow the documentation for each plugin to\nget started:"),Object(i.b)("table",null,Object(i.b)("thead",{parentName:"table"},Object(i.b)("tr",{parentName:"thead"},Object(i.b)("th",Object(a.a)({parentName:"tr"},{align:"center"}),"Firebase"),Object(i.b)("th",Object(a.a)({parentName:"tr"},{align:null}),"Description"),Object(i.b)("th",Object(a.a)({parentName:"tr"},{align:"center"}),"FlutterFire Plugin"))),Object(i.b)("tbody",{parentName:"table"},Object(i.b)("tr",{parentName:"tbody"},Object(i.b)("td",Object(a.a)({parentName:"tr"},{align:"center"}),Object(i.b)("strong",{parentName:"td"},"Authentication")),Object(i.b)("td",Object(a.a)({parentName:"tr"},{align:null}),"Using Firebase Authentication you can authenticate users to your app using several methods such as passwords, phone numbers, and popular federated providers like Google, Facebook, and more. ",Object(i.b)("br",null),Object(i.b)("br",null)," ",Object(i.b)("a",Object(a.a)({parentName:"td"},{href:"/docs/auth/overview"}),"View documentation ","\xbb")),Object(i.b)("td",Object(a.a)({parentName:"tr"},{align:"center"}),Object(i.b)("a",Object(a.a)({parentName:"td"},{href:"https://pub.dartlang.org/packages/firebase_auth"}),"firebase_auth"))),Object(i.b)("tr",{parentName:"tbody"},Object(i.b)("td",Object(a.a)({parentName:"tr"},{align:"center"}),Object(i.b)("strong",{parentName:"td"},"Cloud Firestore")),Object(i.b)("td",Object(a.a)({parentName:"tr"},{align:null}),"Cloud Firestore is a flexible, scalable database for mobile, web, and server development from Firebase and Google Cloud Platform. Cloud Firestore also offers seamless integration with other Firebase and Google Cloud Platform products, including Cloud Functions. ",Object(i.b)("br",null),Object(i.b)("br",null)," ",Object(i.b)("a",Object(a.a)({parentName:"td"},{href:"/docs/firestore/overview"}),"View documentation ","\xbb")),Object(i.b)("td",Object(a.a)({parentName:"tr"},{align:"center"}),Object(i.b)("a",Object(a.a)({parentName:"td"},{href:"https://pub.dartlang.org/packages/cloud_firestore"}),"cloud_firestore"))),Object(i.b)("tr",{parentName:"tbody"},Object(i.b)("td",Object(a.a)({parentName:"tr"},{align:"center"}),Object(i.b)("strong",{parentName:"td"},"Core")),Object(i.b)("td",Object(a.a)({parentName:"tr"},{align:null}),"The ",Object(i.b)("inlineCode",{parentName:"td"},"firebase_core")," plugin is used to initialize FlutterFire and connect your application with multiple Firebase projects. ",Object(i.b)("br",null),Object(i.b)("br",null)," ",Object(i.b)("a",Object(a.a)({parentName:"td"},{href:"/docs/core/usage"}),"View documentation ","\xbb")),Object(i.b)("td",Object(a.a)({parentName:"tr"},{align:"center"}),Object(i.b)("a",Object(a.a)({parentName:"td"},{href:"https://pub.dartlang.org/packages/firebase_core"}),"firebase_core"))))))}d.isMDXComponent=!0},185:function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return m}));var a=n(0),r=n.n(a);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var c=r.a.createContext({}),s=function(e){var t=r.a.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},u=function(e){var t=s(e.components);return r.a.createElement(c.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},d=r.a.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,o=e.parentName,c=b(e,["components","mdxType","originalType","parentName"]),u=s(n),d=a,m=u["".concat(o,".").concat(d)]||u[d]||p[d]||i;return n?r.a.createElement(m,l(l({ref:t},c),{},{components:n})):r.a.createElement(m,l({ref:t},c))}));function m(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=d;var l={};for(var b in t)hasOwnProperty.call(t,b)&&(l[b]=t[b]);l.originalType=e,l.mdxType="string"==typeof e?e:a,o[1]=l;for(var c=2;c=0&&r<=a&&(t=l),e+=1}return t}();if(i){var m=0,o=!1;for(l=document.getElementsByClassName(e);m=0&&r<=a&&(t=l),e+=1}return t}();if(i){var m=0,o=!1;for(l=document.getElementsByClassName(e);m=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var l=r.a.createContext({}),u=function(e){var t=r.a.useContext(l),a=t;return e&&(a="function"==typeof e?e(t):o(o({},t),e)),a},b=function(e){var t=u(e.components);return r.a.createElement(l.Provider,{value:t},e.children)},h={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},p=r.a.forwardRef((function(e,t){var a=e.components,n=e.mdxType,i=e.originalType,s=e.parentName,l=c(e,["components","mdxType","originalType","parentName"]),b=u(a),p=n,d=b["".concat(s,".").concat(p)]||b[p]||h[p]||i;return a?r.a.createElement(d,o(o({ref:t},l),{},{components:a})):r.a.createElement(d,o({ref:t},l))}));function d(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var i=a.length,s=new Array(i);s[0]=p;var o={};for(var c in t)hasOwnProperty.call(t,c)&&(o[c]=t[c]);o.originalType=e,o.mdxType="string"==typeof e?e:n,s[1]=o;for(var l=2;l=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var l=r.a.createContext({}),u=function(e){var t=r.a.useContext(l),a=t;return e&&(a="function"==typeof e?e(t):o(o({},t),e)),a},b=function(e){var t=u(e.components);return r.a.createElement(l.Provider,{value:t},e.children)},h={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},p=r.a.forwardRef((function(e,t){var a=e.components,n=e.mdxType,i=e.originalType,s=e.parentName,l=c(e,["components","mdxType","originalType","parentName"]),b=u(a),p=n,d=b["".concat(s,".").concat(p)]||b[p]||h[p]||i;return a?r.a.createElement(d,o(o({ref:t},l),{},{components:a})):r.a.createElement(d,o({ref:t},l))}));function d(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var i=a.length,s=new Array(i);s[0]=p;var o={};for(var c in t)hasOwnProperty.call(t,c)&&(o[c]=t[c]);o.originalType=e,o.mdxType="string"==typeof e?e:n,s[1]=o;for(var l=2;l\n ...\n \n

Page Not Found

We could not find what you were looking for.

Please contact the owner of the site that linked you to the original URL and let them know their link is broken.

- - - + + + \ No newline at end of file diff --git a/423bdd3e.2e795162.js b/423bdd3e.c8b0df12.js similarity index 92% rename from 423bdd3e.2e795162.js rename to 423bdd3e.c8b0df12.js index ae71ffb2a4dc..5196a2826569 100644 --- a/423bdd3e.2e795162.js +++ b/423bdd3e.c8b0df12.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[19],{160:function(e,n,t){"use strict";t.r(n),t.d(n,"frontMatter",(function(){return i})),t.d(n,"metadata",(function(){return c})),t.d(n,"rightToc",(function(){return p})),t.d(n,"default",(function(){return s}));var r=t(2),a=t(9),o=(t(0),t(180)),i={title:"In-App Messaging",sidebar_label:"Usage"},c={id:"in-app-messaging/usage",title:"In-App Messaging",description:"In-App Messaging usage",source:"@site/../docs/in-app-messaging/usage.mdx",permalink:"/docs/in-app-messaging/usage",editUrl:"https://github.com/FirebaseExtended/flutterfire/edit/master/docs/../docs/in-app-messaging/usage.mdx",sidebar_label:"Usage"},p=[],u={rightToc:p};function s(e){var n=e.components,t=Object(a.a)(e,["components"]);return Object(o.b)("wrapper",Object(r.a)({},u,t,{components:n,mdxType:"MDXLayout"}),Object(o.b)("p",null,"In-App Messaging usage"))}s.isMDXComponent=!0},180:function(e,n,t){"use strict";t.d(n,"a",(function(){return l})),t.d(n,"b",(function(){return d}));var r=t(0),a=t.n(r);function o(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function i(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function c(e){for(var n=1;n=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var u=a.a.createContext({}),s=function(e){var n=a.a.useContext(u),t=n;return e&&(t="function"==typeof e?e(n):c(c({},n),e)),t},l=function(e){var n=s(e.components);return a.a.createElement(u.Provider,{value:n},e.children)},f={inlineCode:"code",wrapper:function(e){var n=e.children;return a.a.createElement(a.a.Fragment,{},n)}},g=a.a.forwardRef((function(e,n){var t=e.components,r=e.mdxType,o=e.originalType,i=e.parentName,u=p(e,["components","mdxType","originalType","parentName"]),l=s(t),g=r,d=l["".concat(i,".").concat(g)]||l[g]||f[g]||o;return t?a.a.createElement(d,c(c({ref:n},u),{},{components:t})):a.a.createElement(d,c({ref:n},u))}));function d(e,n){var t=arguments,r=n&&n.mdxType;if("string"==typeof e||r){var o=t.length,i=new Array(o);i[0]=g;var c={};for(var p in n)hasOwnProperty.call(n,p)&&(c[p]=n[p]);c.originalType=e,c.mdxType="string"==typeof e?e:r,i[1]=c;for(var u=2;u=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var u=a.a.createContext({}),s=function(e){var n=a.a.useContext(u),t=n;return e&&(t="function"==typeof e?e(n):c(c({},n),e)),t},l=function(e){var n=s(e.components);return a.a.createElement(u.Provider,{value:n},e.children)},f={inlineCode:"code",wrapper:function(e){var n=e.children;return a.a.createElement(a.a.Fragment,{},n)}},g=a.a.forwardRef((function(e,n){var t=e.components,r=e.mdxType,o=e.originalType,i=e.parentName,u=p(e,["components","mdxType","originalType","parentName"]),l=s(t),g=r,d=l["".concat(i,".").concat(g)]||l[g]||f[g]||o;return t?a.a.createElement(d,c(c({ref:n},u),{},{components:t})):a.a.createElement(d,c({ref:n},u))}));function d(e,n){var t=arguments,r=n&&n.mdxType;if("string"==typeof e||r){var o=t.length,i=new Array(o);i[0]=g;var c={};for(var p in n)hasOwnProperty.call(n,p)&&(c[p]=n[p]);c.originalType=e,c.mdxType="string"==typeof e?e:r,i[1]=c;for(var u=2;u=0&&i<=n&&(t=o),e+=1}return t}();if(l){var c=0,s=!1;for(o=document.getElementsByClassName(e);c0&&o.a.createElement("li",{className:p()("menu__list-item",{"menu__list-item--collapsed":m}),key:d},o.a.createElement("a",Object(u.a)({className:p()("menu__link",{"menu__link--sublist":i,"menu__link--active":i&&!t.collapsed}),href:"#!",onClick:i?j:void 0},l),d),o.a.createElement("ul",{className:"menu__list"},c.map((function(e){return o.a.createElement(E,{tabIndex:m?"-1":"0",key:e.label,item:e,onItemClick:n,collapsible:i,activePath:a})}))));case"link":default:return o.a.createElement("li",{className:"menu__list-item",key:d},o.a.createElement(g.a,Object(u.a)({className:p()("menu__link",{"menu__link--active":s===a}),to:s},Object(b.a)(s)?{isNavLink:!0,exact:!0,onClick:n}:{target:"_blank",rel:"noreferrer noopener"},l),d))}}var O=function(e){var t,n,i=Object(r.useState)(!1),l=i[0],c=i[1],s=Object(a.a)(),f=s.siteConfig,d=(f=void 0===f?{}:f).themeConfig.navbar,b=(d=void 0===d?{}:d).title,w=d.hideOnScroll,O=void 0!==w&&w,j=s.isClient,k=Object(m.a)(),S=k.logoLink,x=k.logoLinkProps,P=k.logoImageUrl,C=k.logoAlt,T=Object(h.a)().isAnnouncementBarClosed,N=Object(y.a)().scrollY,L=e.docsSidebars,M=e.path,A=e.sidebar,R=e.sidebarCollapsible;if(Object(v.a)(l),!A)return null;var D=L[A];if(!D)throw new Error('Cannot find the sidebar "'+A+'" in the sidebar config!');return R&&D.forEach((function(e){return function e(t,n){var r=t.items,o=t.href;switch(t.type){case"category":var i=r.map((function(t){return e(t,n)})).filter((function(e){return e})).length>0;return t.collapsed=!i,i;case"link":default:return o===n}}(e,M)})),o.a.createElement("div",{className:p()(_.a.sidebar,(t={},t[_.a.sidebarWithHideableNavbar]=O,t))},O&&o.a.createElement(g.a,Object(u.a)({tabIndex:"-1",className:_.a.sidebarLogo,to:S},x),null!=P&&o.a.createElement("img",{key:j,src:P,alt:C}),null!=b&&o.a.createElement("strong",null,b)),o.a.createElement("div",{className:p()("menu","menu--responsive",_.a.menu,(n={"menu--show":l},n[_.a.menuWithAnnouncementBar]=!T&&0===N,n))},o.a.createElement("button",{"aria-label":l?"Close Menu":"Open Menu","aria-haspopup":"true",className:"button button--secondary button--sm menu__button",type:"button",onClick:function(){c(!l)}},l?o.a.createElement("span",{className:p()(_.a.sidebarMenuIcon,_.a.sidebarMenuCloseIcon)},"\xd7"):o.a.createElement("svg",{"aria-label":"Menu",className:_.a.sidebarMenuIcon,xmlns:"http://www.w3.org/2000/svg",height:24,width:24,viewBox:"0 0 32 32",role:"img",focusable:"false"},o.a.createElement("title",null,"Menu"),o.a.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"2",d:"M4 7h22M4 15h22M4 23h22"}))),o.a.createElement("ul",{className:"menu__list"},D.map((function(e){return o.a.createElement(E,{key:e.label,item:e,onItemClick:function(e){e.target.blur(),c(!1)},collapsible:R,activePath:M})})))))},j=n(368),k=n(213),S=n(194),x=n(151),P=n.n(x);t.default=function(e){var t=e.route,n=e.docsMetadata,r=e.location,u=e.content,f=n.permalinkToSidebar,d=n.docsSidebars,p=n.version,h=n.isHomePage,v=n.homePagePath,m=h?{}:t.routes.find((function(e){return Object(S.a)(r.pathname,e)}))||{},y=h?u.metadata.sidebar:f[m.path],g=Object(a.a)(),b=g.siteConfig,w=(b=void 0===b?{}:b).themeConfig,_=(w=void 0===w?{}:w).sidebarCollapsible,E=void 0===_||_,x=g.isClient;return h||0!==Object.keys(m).length?o.a.createElement(c.a,{version:p,key:x},o.a.createElement("div",{className:P.a.docPage},y&&o.a.createElement("div",{className:P.a.docSidebarContainer},o.a.createElement(O,{docsSidebars:d,path:h?v:m.path,sidebar:y,sidebarCollapsible:E})),o.a.createElement("main",{className:P.a.docMainContainer},o.a.createElement(i.a,{components:j.a},h?o.a.createElement(s.default,{content:u}):Object(l.a)(t.routes))))):o.a.createElement(k.default,e)}},180:function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"b",(function(){return h}));var r=n(0),o=n.n(r);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var s=o.a.createContext({}),u=function(e){var t=o.a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},f=function(e){var t=u(e.components);return o.a.createElement(s.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},p=o.a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,a=e.parentName,s=c(e,["components","mdxType","originalType","parentName"]),f=u(n),p=r,h=f["".concat(a,".").concat(p)]||f[p]||d[p]||i;return n?o.a.createElement(h,l(l({ref:t},s),{},{components:n})):o.a.createElement(h,l({ref:t},s))}));function h(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,a=new Array(i);a[0]=p;var l={};for(var c in t)hasOwnProperty.call(t,c)&&(l[c]=t[c]);l.originalType=e,l.mdxType="string"==typeof e?e:r,a[1]=l;for(var s=2;s=0;l--)(o=e[l])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function c(e,t){return function(n,r){t(n,r,e)}}function s(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function u(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(t){i(t)}}function l(e){try{c(r.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,l)}c((r=r.apply(e,t||[])).next())}))}function f(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function v(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(l){o={error:l}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function m(){for(var e=[],t=0;t1||l(e,t)}))})}function l(e,t){try{(n=o[e](t)).value instanceof g?Promise.resolve(n.value.v).then(c,s):u(i[0][2],n)}catch(r){u(i[0][3],r)}var n}function c(e){l("next",e)}function s(e){l("throw",e)}function u(e,t){e(t),i.shift(),i.length&&l(i[0][0],i[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:g(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function _(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function E(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function O(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function j(e){return e&&e.__esModule?e:{default:e}}function k(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function S(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},213:function(e,t,n){"use strict";n.r(t);var r=n(0),o=n.n(r),i=n(193);t.default=function(){return o.a.createElement(i.a,{title:"Page Not Found"},o.a.createElement("div",{className:"container margin-vert--xl"},o.a.createElement("div",{className:"row"},o.a.createElement("div",{className:"col col--6 col--offset-3"},o.a.createElement("h1",{className:"hero__title"},"Page Not Found"),o.a.createElement("p",null,"We could not find what you were looking for."),o.a.createElement("p",null,"Please contact the owner of the site that linked you to the original URL and let them know their link is broken.")))))}},229:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isClient="object"==typeof window,t.on=function(e){for(var t=[],n=1;n1?arguments[1]:void 0)}}),n(77)("find")},271:function(e,t,n){var r=n(28),o=n(78),i=n(49),a=n(35),l=n(272);e.exports=function(e,t){var n=1==e,c=2==e,s=3==e,u=4==e,f=6==e,d=5==e||f,p=t||l;return function(t,l,h){for(var v,m,y=i(t),g=o(y),b=r(l,h,3),w=a(g.length),_=0,E=n?p(t,w):c?p(t,0):void 0;w>_;_++)if((d||_ in g)&&(m=b(v=g[_],_,y),e))if(n)E[_]=m;else if(m)switch(e){case 3:return!0;case 5:return v;case 6:return _;case 2:E.push(v)}else if(u)return!1;return f?-1:s||u?u:E}}},272:function(e,t,n){var r=n(273);e.exports=function(e,t){return new(r(e))(t)}},273:function(e,t,n){var r=n(12),o=n(223),i=n(3)("species");e.exports=function(e){var t;return o(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!o(t.prototype)||(t=void 0),r(t)&&null===(t=t[i])&&(t=void 0)),void 0===t?Array:t}},274:function(e,t,n){"use strict";var r=n(17),o=n(83)(!0);r(r.P,"Array",{includes:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),n(77)("includes")},275:function(e,t,n){"use strict";var r=n(17),o=n(214);r(r.P+r.F*n(215)("includes"),"String",{includes:function(e){return!!~o(this,e,"includes").indexOf(e,arguments.length>1?arguments[1]:void 0)}})},276:function(e,t,n){"use strict";var r=n(8),o=n(35),i=n(75),a=n(71);n(73)("match",1,(function(e,t,n,l){return[function(n){var r=e(this),o=null==n?void 0:n[t];return void 0!==o?o.call(n,r):new RegExp(n)[t](String(r))},function(e){var t=l(n,e,this);if(t.done)return t.value;var c=r(e),s=String(this);if(!c.global)return a(c,s);var u=c.unicode;c.lastIndex=0;for(var f,d=[],p=0;null!==(f=a(c,s));){var h=String(f[0]);d[p]=h,""===h&&(c.lastIndex=i(s,o(c.lastIndex),u)),p++}return 0===p?null:d}]}))},277:function(e,t,n){var r;r=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=6)}([function(e,t){e.exports=function(e){var t;if("SELECT"===e.nodeName)e.focus(),t=e.value;else if("INPUT"===e.nodeName||"TEXTAREA"===e.nodeName){var n=e.hasAttribute("readonly");n||e.setAttribute("readonly",""),e.select(),e.setSelectionRange(0,e.value.length),n||e.removeAttribute("readonly"),t=e.value}else{e.hasAttribute("contenteditable")&&e.focus();var r=window.getSelection(),o=document.createRange();o.selectNodeContents(e),r.removeAllRanges(),r.addRange(o),t=r.toString()}return t}},function(e,t){function n(){}n.prototype={on:function(e,t,n){var r=this.e||(this.e={});return(r[e]||(r[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){var r=this;function o(){r.off(e,o),t.apply(n,arguments)}return o._=t,this.on(e,o,n)},emit:function(e){for(var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),r=0,o=n.length;r0&&void 0!==arguments[0]?arguments[0]:{};this.action=e.action,this.container=e.container,this.emitter=e.emitter,this.target=e.target,this.text=e.text,this.trigger=e.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function(){var e=this,t="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return e.removeFake()},this.fakeHandler=this.container.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[t?"right":"left"]="-9999px";var n=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.style.top=n+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,this.container.appendChild(this.fakeElem),this.selectedText=o()(this.fakeElem),this.copyText()}},{key:"removeFake",value:function(){this.fakeHandler&&(this.container.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(this.container.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=o()(this.target),this.copyText()}},{key:"copyText",value:function(){var e=void 0;try{e=document.execCommand(this.action)}catch(t){e=!1}this.handleResult(e)}},{key:"handleResult",value:function(e){this.emitter.emit(e?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.trigger&&this.trigger.focus(),document.activeElement.blur(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=e,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(e){if(void 0!==e){if(!e||"object"!==(void 0===e?"undefined":i(e))||1!==e.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&e.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(e.hasAttribute("readonly")||e.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=e}},get:function(){return this._target}}]),e}(),c=n(1),s=n.n(c),u=n(2),f=n.n(u),d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof e.action?e.action:this.defaultAction,this.target="function"==typeof e.target?e.target:this.defaultTarget,this.text="function"==typeof e.text?e.text:this.defaultText,this.container="object"===d(e.container)?e.container:document.body}},{key:"listenClick",value:function(e){var t=this;this.listener=f()(e,"click",(function(e){return t.onClick(e)}))}},{key:"onClick",value:function(e){var t=e.delegateTarget||e.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new l({action:this.action(t),target:this.target(t),text:this.text(t),container:this.container,trigger:t,emitter:this})}},{key:"defaultAction",value:function(e){return v("action",e)}},{key:"defaultTarget",value:function(e){var t=v("target",e);if(t)return document.querySelector(t)}},{key:"defaultText",value:function(e){return v("text",e)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}],[{key:"isSupported",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],t="string"==typeof e?[e]:e,n=!!document.queryCommandSupported;return t.forEach((function(e){n=n&&!!document.queryCommandSupported(e)})),n}}]),t}(s.a);function v(e,t){var n="data-clipboard-"+e;if(t.hasAttribute(n))return t.getAttribute(n)}t.default=h}]).default},e.exports=r()},278:function(e,t){e.exports.parse=function(e){var t=e.split(",").map((function(e){return function(e){if(/^-?\d+$/.test(e))return parseInt(e,10);var t;if(t=e.match(/^(-?\d+)(-|\.\.\.?|\u2025|\u2026|\u22EF)(-?\d+)$/)){var n=t[1],r=t[2],o=t[3];if(n&&o){var i=[],a=(n=parseInt(n))<(o=parseInt(o))?1:-1;"-"!=r&&".."!=r&&"\u2025"!=r||(o+=a);for(var l=n;l!=o;l+=a)i.push(l);return i}}return[]}(e)}));return 0===t.length?[]:1===t.length?Array.isArray(t[0])?t[0]:t:t.reduce((function(e,t){return Array.isArray(e)||(e=[e]),Array.isArray(t)||(t=[t]),e.concat(t)}))}},279:function(e,t,n){"use strict";var r=n(9),o=n(0),i=n.n(o),a=n(182),l=n.n(a),c=n(181),s=(n(148),n(149)),u=n.n(s);t.a=function(e){return function(t){var n,o=t.id,a=Object(r.a)(t,["id"]),s=Object(c.a)().siteConfig,f=(s=void 0===s?{}:s).themeConfig,d=(f=void 0===f?{}:f).navbar,p=(d=void 0===d?{}:d).hideOnScroll,h=void 0!==p&&p;return o?i.a.createElement(e,a,i.a.createElement("a",{"aria-hidden":"true",tabIndex:"-1",className:l()("anchor",(n={},n[u.a.enhancedAnchor]=!h,n)),id:o}),a.children,i.a.createElement("a",{"aria-hidden":"true",tabIndex:"-1",className:"hash-link",href:"#"+o,title:"Direct link to heading"},"#")):i.a.createElement(e,a)}}},280:function(e,t,n){"use strict";var r=n(0),o=n.n(r);t.a=function(e){return o.a.createElement("div",null,e.children)}},281:function(e,t,n){"use strict";var r=n(2),o=(n(188),n(0)),i=n.n(o),a=n(282),l=n.n(a);t.a=function(e){var t=e.alt,n=e.className,o=e.img;return i.a.createElement(l.a,Object(r.a)({},e,{alt:t,className:n,height:o.src.height||100,width:o.src.width||100,placeholder:{lqip:o.preSrc},src:o.src.src,srcSet:o.src.images.map((function(e){return Object.assign({},e,{src:e.path})}))}))}},282:function(e,t,n){"use strict";var r;t.__esModule=!0,t.default=void 0;var o=((r=n(283))&&r.__esModule?r:{default:r}).default;t.default=o},283:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=l(n(0)),o=l(n(284)),i=l(n(292)),a=l(n(297));function l(e){return e&&e.__esModule?e:{default:e}}function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var u=function(e){return r.default.createElement(o.default,e)};u.defaultProps=function(e){for(var t=1;t1?(0,s.guessMaxImageWidth)(n.state.dimensions):0,supportsWebp:s.supportsWebp}),t=n.props.getUrl,r=t?t(e):e.src,o=n.props.shouldAutoDownload(function(e){for(var t=1;t needs a DOM element to compute boundaries. The child you passed is neither a DOM element (e.g.
) nor does it use the innerRef prop.\n\nSee https://goo.gl/LrBNgw for more info.")}(n,e._ref),e._handleScroll=e._handleScroll.bind(e),e.scrollableAncestor=e._findScrollableAncestor(),e.scrollEventListenerUnsubscribe=Object(r.a)(e.scrollableAncestor,"scroll",e._handleScroll,{passive:!0}),e.resizeEventListenerUnsubscribe=Object(r.a)(window,"resize",e._handleScroll,{passive:!0}),e._handleScroll(null)})))}},{key:"componentDidUpdate",value:function(){var e=this;n.getWindow()&&this.scrollableAncestor&&(this.cancelOnNextTick||(this.cancelOnNextTick=v((function(){e.cancelOnNextTick=null,e._handleScroll(null)}))))}},{key:"componentWillUnmount",value:function(){n.getWindow()&&(this.scrollEventListenerUnsubscribe&&this.scrollEventListenerUnsubscribe(),this.resizeEventListenerUnsubscribe&&this.resizeEventListenerUnsubscribe(),this.cancelOnNextTick&&this.cancelOnNextTick())}},{key:"_findScrollableAncestor",value:function(){var t=this.props,n=t.horizontal,r=t.scrollableAncestor;if(r)return function(t){return"window"===t?e.window:t}(r);for(var o=this._ref;o.parentNode;){if((o=o.parentNode)===document.body)return window;var i=window.getComputedStyle(o),a=(n?i.getPropertyValue("overflow-x"):i.getPropertyValue("overflow-y"))||i.getPropertyValue("overflow");if("auto"===a||"scroll"===a)return o}return window}},{key:"_handleScroll",value:function(e){if(this._ref){var t=this._getBounds(),n=function(e){return e.viewportBottom-e.viewportTop==0?"invisible":e.viewportTop<=e.waypointTop&&e.waypointTop<=e.viewportBottom||e.viewportTop<=e.waypointBottom&&e.waypointBottom<=e.viewportBottom||e.waypointTop<=e.viewportTop&&e.viewportBottom<=e.waypointBottom?"inside":e.viewportBottom1?t.join(" "):t[0],style:e}}},289:function(e,t,n){"use strict";t.__esModule=!0,t.xhrLoader=t.imageLoader=t.timeout=t.combineCancel=void 0;var r=n(290);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}t.combineCancel=function(e,t){if(!t)return e;var n=e.then((function(e){return e}),(function(e){return e}));return n.cancel=function(){e.cancel(),t.cancel()},n};t.timeout=function(e){var t,n=new Promise((function(n){t=setTimeout(n,e)}));return n.cancel=function(){clearTimeout(t),t=void 0},n};var a=function(e){var t=new Image,n=new Promise((function(n,r){t.onload=n,t.onabort=t.onerror=function(){return r({})},t.src=e}));return n.cancel=function(){if(!t)throw new Error("Already canceled");t.onload=t.onabort=t.onerror=void 0,t.src="",t=void 0},n};t.imageLoader=a;t.xhrLoader=function(e,t){var n=new r.UnfetchAbortController,l=n.signal,c=new Promise((function(n,c){return(0,r.unfetch)(e,function(e){for(var t=1;ts){var d=document.getElementsByTagName("body")[0],p=s-o;n=(d.clientHeight>u||d.clientHeight>l)&&p<=15?a-p:o/s*a}else n=o;return n*f};t.bytesToSize=function(e){var t=["Bytes","KB","MB","GB","TB"];if(0===e)return"n/a";var n=parseInt(Math.floor(Math.log(e)/Math.log(1024)),10);return 0===n?e+" "+t[n]:(e/Math.pow(1024,n)).toFixed(1)+" "+t[n]};var i=function(){if(r)return!1;var e=document.createElement("canvas");return!(!e.getContext||!e.getContext("2d"))&&0===e.toDataURL("image/webp").indexOf("data:image/webp")}();t.supportsWebp=i;var a=function(e){return"webp"===e.format||e.src&&e.src.match(/\.webp($|\?.*)/i)};t.selectSrc=function(e){var t,n,r=e.srcSet,o=e.maxImageWidth,i=e.supportsWebp;if(0===r.length)throw new Error("Need at least one item in srcSet");if(i)0===(t=r.filter(a)).length&&(t=r);else if(0===(t=r.filter((function(e){return!a(e)}))).length)throw new Error("Need at least one supported format item in srcSet");var l=t.filter((function(e){return e.width>=o}));return 0===l.length?(l=t,n=Math.max.apply(null,l.map((function(e){return e.width})))):n=Math.min.apply(null,l.map((function(e){return e.width}))),t.filter((function(e){return e.width===n}))[0]};t.fallbackParams=function(e){var t=e.srcSet,n=e.getUrl;if(!r)return{};var o=t.filter((function(e){return!a(e)})),i=o[0];return{nsSrcSet:o.map((function(e){return(n?n(e):e.src)+" "+e.width+"w"})).join(","),nsSrc:n?n(i):i.src,ssr:r}}},292:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,o=s(n(293)),i=s(n(294)),a=s(n(295)),l=s(n(296)),c=n(206);function s(e){return e&&e.__esModule?e:{default:e}}var u=c.icons.load,f=c.icons.loading,d=c.icons.loaded,p=c.icons.error,h=c.icons.noicon,v=c.icons.offline,m=((r={})[u]=o.default,r[f]=l.default,r[d]=null,r[p]=a.default,r[h]=null,r[v]=i.default,r);t.default=m},293:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=i(n(0)),o=i(n(195));function i(e){return e&&e.__esModule?e:{default:e}}function a(){return(a=Object.assign||function(e){for(var t=1;t-1},P.prototype.set=function(e,t){var n=this.__data__,r=T(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},C.prototype.clear=function(){this.__data__={hash:new x,map:new(O||P),string:new x}},C.prototype.delete=function(e){return M(this,e).delete(e)},C.prototype.get=function(e){return M(this,e).get(e)},C.prototype.has=function(e){return M(this,e).has(e)},C.prototype.set=function(e,t){return M(this,e).set(e,t),this};var R=B((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(H(e))return S?S.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var n=[];return o.test(e)&&n.push(""),e.replace(i,(function(e,t,r,o){n.push(r?o.replace(a,"$1"):t||e)})),n}));function D(e){if("string"==typeof e||H(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function B(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a),a};return n.cache=new(B.Cache||C),n}B.Cache=C;var I=Array.isArray;function z(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function H(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==b.call(e)}e.exports=function(e,t,n){var r=null==e?void 0:N(e,t);return void 0===r?n:r}}).call(this,n(69))},303:function(e,t){!function(){if("undefined"!=typeof window&&"undefined"!=typeof document&&"undefined"!=typeof HTMLElement){var e=!1;try{var t=document.createElement("div");t.addEventListener("focus",(function(e){e.preventDefault(),e.stopPropagation()}),!0),t.focus(Object.defineProperty({},"preventScroll",{get:function(){e=!0}}))}catch(n){}if(void 0===HTMLElement.prototype.nativeFocus&&!e){HTMLElement.prototype.nativeFocus=HTMLElement.prototype.focus;HTMLElement.prototype.focus=function(e){var t=window.scrollY||window.pageYOffset;this.nativeFocus(),e&&e.preventScroll&&setTimeout((function(){window.scroll(window.scrollX||window.pageXOffset,t)}),0)}}}}()},304:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(207),o=n(0),i=r.__importDefault(n(305)),a=n(229);t.default=function(e,t){void 0===e&&(e=1/0),void 0===t&&(t=1/0);var n=i.default({width:a.isClient?window.innerWidth:e,height:a.isClient?window.innerHeight:t}),r=n[0],l=n[1];return o.useEffect((function(){if(a.isClient){var e=function(){l({width:window.innerWidth,height:window.innerHeight})};return window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}}),[]),r}},305:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(207),o=n(0),i=r.__importDefault(n(306));t.default=function(e){var t=o.useRef(0),n=o.useState(e),r=n[0],a=n[1],l=o.useCallback((function(e){cancelAnimationFrame(t.current),t.current=requestAnimationFrame((function(){a(e)}))}),[]);return i.default((function(){cancelAnimationFrame(t.current)})),[r,l]}},306:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(207),o=n(0),i=r.__importDefault(n(307));t.default=function(e){var t=o.useRef(e);t.current=e,i.default((function(){return function(){return t.current()}}))}},307:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);t.default=function(e){r.useEffect(e,[])}},308:function(e,t,n){"use strict";e.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,o,i;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(o=r;0!=o--;)if(!e(t[o],n[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(i=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(o=r;0!=o--;)if(!Object.prototype.hasOwnProperty.call(n,i[o]))return!1;for(o=r;0!=o--;){var a=i[o];if(("_owner"!==a||!t.$$typeof)&&!e(t[a],n[a]))return!1}return!0}return t!=t&&n!=n}},309:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(229).isClient?window:null,i=function(e){return!!e.addEventListener},a=function(e){return!!e.on};t.default=function(e,t,n,l){void 0===n&&(n=o),r.useEffect((function(){if(t&&n)return i(n)?n.addEventListener(e,t,l):a(n)&&n.on(e,t,l),function(){i(n)?n.removeEventListener(e,t,l):a(n)&&n.off(e,t,l)}}),[e,t,n,JSON.stringify(l)])}},367:function(e,t,n){"use strict";var r=n(2),o=(n(274),n(275),n(79),n(192),n(276),n(220),n(0)),i=n.n(o),a=n(182),l=n.n(a),c={plain:{backgroundColor:"#2a2734",color:"#9a86fd"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#6c6783"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#e09142"}},{types:["property","function"],style:{color:"#9a86fd"}},{types:["tag-id","selector","atrule-id"],style:{color:"#eeebff"}},{types:["attr-name"],style:{color:"#c4b9fe"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","at-rule","placeholder","variable"],style:{color:"#ffcc99"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#c4b9fe"}}]},s={Prism:n(53).a,theme:c};function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(){return(f=Object.assign||function(e){for(var t=1;t0&&e[n-1]===t?e:e.concat(t)},v=function(e,t){var n=e.plain,r=Object.create(null),o=e.styles.reduce((function(e,n){var r=n.languages,o=n.style;return r&&!r.includes(t)||n.types.forEach((function(t){var n=f({},e[t],o);e[t]=n})),e}),r);return o.root=n,o.plain=f({},n,{backgroundColor:null}),o};function m(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&-1===t.indexOf(r)&&(n[r]=e[r]);return n}var y=function(e){function t(){for(var t=this,n=[],r=arguments.length;r--;)n[r]=arguments[r];e.apply(this,n),u(this,"getThemeDict",(function(e){if(void 0!==t.themeDict&&e.theme===t.prevTheme&&e.language===t.prevLanguage)return t.themeDict;t.prevTheme=e.theme,t.prevLanguage=e.language;var n=e.theme?v(e.theme,e.language):void 0;return t.themeDict=n})),u(this,"getLineProps",(function(e){var n=e.key,r=e.className,o=e.style,i=f({},m(e,["key","className","style","line"]),{className:"token-line",style:void 0,key:void 0}),a=t.getThemeDict(t.props);return void 0!==a&&(i.style=a.plain),void 0!==o&&(i.style=void 0!==i.style?f({},i.style,o):o),void 0!==n&&(i.key=n),r&&(i.className+=" "+r),i})),u(this,"getStyleForToken",(function(e){var n=e.types,r=e.empty,o=n.length,i=t.getThemeDict(t.props);if(void 0!==i){if(1===o&&"plain"===n[0])return r?{display:"inline-block"}:void 0;if(1===o&&!r)return i[n[0]];var a=r?{display:"inline-block"}:{},l=n.map((function(e){return i[e]}));return Object.assign.apply(Object,[a].concat(l))}})),u(this,"getTokenProps",(function(e){var n=e.key,r=e.className,o=e.style,i=e.token,a=f({},m(e,["key","className","style","token"]),{className:"token "+i.types.join(" "),children:i.content,style:t.getStyleForToken(i),key:void 0});return void 0!==o&&(a.style=void 0!==a.style?f({},a.style,o):o),void 0!==n&&(a.key=n),r&&(a.className+=" "+r),a}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.render=function(){var e=this.props,t=e.Prism,n=e.language,r=e.code,o=e.children,i=this.getThemeDict(this.props),a=t.languages[n];return o({tokens:function(e){for(var t=[[]],n=[e],r=[0],o=[e.length],i=0,a=0,l=[],c=[l];a>-1;){for(;(i=r[a]++)0?u:["plain"],s=f):(u=h(u,f.type),f.alias&&(u=h(u,f.alias)),s=f.content),"string"==typeof s){var v=s.split(d),m=v.length;l.push({types:u,content:v[0]});for(var y=1;y0}))}a&&T.test(a)&&(j=a.match(T)[0].split("title=")[1].replace(/"+/g,"")),Object(o.useEffect)((function(){var e;return w.current&&(e=new b.a(w.current,{target:function(){return g.current}})),function(){e&&e.destroy()}}),[w.current,g.current]);var L=n&&n.replace(/language-/,"");!L&&u.defaultLanguage&&(L=u.defaultLanguage);var M=t.replace(/\n$/,"");if(0===O.length&&void 0!==L){for(var A,R="",D=function(e){switch(e){case"js":case"javascript":case"ts":case"typescript":return C(["js","jsBlock"]);case"jsx":case"tsx":return C(["js","jsBlock","jsx"]);case"html":return C(["js","jsBlock","html"]);case"python":case"py":return C(["python"]);default:return C()}}(L),B=t.replace(/\n$/,"").split("\n"),I=0;I=0&&i<=n&&(t=o),e+=1}return t}();if(l){var c=0,s=!1;for(o=document.getElementsByClassName(e);c0&&o.a.createElement("li",{className:p()("menu__list-item",{"menu__list-item--collapsed":m}),key:d},o.a.createElement("a",Object(u.a)({className:p()("menu__link",{"menu__link--sublist":i,"menu__link--active":i&&!t.collapsed}),href:"#!",onClick:i?j:void 0},l),d),o.a.createElement("ul",{className:"menu__list"},c.map((function(e){return o.a.createElement(E,{tabIndex:m?"-1":"0",key:e.label,item:e,onItemClick:n,collapsible:i,activePath:a})}))));case"link":default:return o.a.createElement("li",{className:"menu__list-item",key:d},o.a.createElement(g.a,Object(u.a)({className:p()("menu__link",{"menu__link--active":s===a}),to:s},Object(b.a)(s)?{isNavLink:!0,exact:!0,onClick:n}:{target:"_blank",rel:"noreferrer noopener"},l),d))}}var O=function(e){var t,n,i=Object(r.useState)(!1),l=i[0],c=i[1],s=Object(a.a)(),f=s.siteConfig,d=(f=void 0===f?{}:f).themeConfig.navbar,b=(d=void 0===d?{}:d).title,w=d.hideOnScroll,O=void 0!==w&&w,j=s.isClient,k=Object(m.a)(),S=k.logoLink,x=k.logoLinkProps,P=k.logoImageUrl,C=k.logoAlt,T=Object(h.a)().isAnnouncementBarClosed,N=Object(y.a)().scrollY,L=e.docsSidebars,M=e.path,A=e.sidebar,R=e.sidebarCollapsible;if(Object(v.a)(l),!A)return null;var D=L[A];if(!D)throw new Error('Cannot find the sidebar "'+A+'" in the sidebar config!');return R&&D.forEach((function(e){return function e(t,n){var r=t.items,o=t.href;switch(t.type){case"category":var i=r.map((function(t){return e(t,n)})).filter((function(e){return e})).length>0;return t.collapsed=!i,i;case"link":default:return o===n}}(e,M)})),o.a.createElement("div",{className:p()(_.a.sidebar,(t={},t[_.a.sidebarWithHideableNavbar]=O,t))},O&&o.a.createElement(g.a,Object(u.a)({tabIndex:"-1",className:_.a.sidebarLogo,to:S},x),null!=P&&o.a.createElement("img",{key:j,src:P,alt:C}),null!=b&&o.a.createElement("strong",null,b)),o.a.createElement("div",{className:p()("menu","menu--responsive",_.a.menu,(n={"menu--show":l},n[_.a.menuWithAnnouncementBar]=!T&&0===N,n))},o.a.createElement("button",{"aria-label":l?"Close Menu":"Open Menu","aria-haspopup":"true",className:"button button--secondary button--sm menu__button",type:"button",onClick:function(){c(!l)}},l?o.a.createElement("span",{className:p()(_.a.sidebarMenuIcon,_.a.sidebarMenuCloseIcon)},"\xd7"):o.a.createElement("svg",{"aria-label":"Menu",className:_.a.sidebarMenuIcon,xmlns:"http://www.w3.org/2000/svg",height:24,width:24,viewBox:"0 0 32 32",role:"img",focusable:"false"},o.a.createElement("title",null,"Menu"),o.a.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"2",d:"M4 7h22M4 15h22M4 23h22"}))),o.a.createElement("ul",{className:"menu__list"},D.map((function(e){return o.a.createElement(E,{key:e.label,item:e,onItemClick:function(e){e.target.blur(),c(!1)},collapsible:R,activePath:M})})))))},j=n(373),k=n(218),S=n(199),x=n(152),P=n.n(x);t.default=function(e){var t=e.route,n=e.docsMetadata,r=e.location,u=e.content,f=n.permalinkToSidebar,d=n.docsSidebars,p=n.version,h=n.isHomePage,v=n.homePagePath,m=h?{}:t.routes.find((function(e){return Object(S.a)(r.pathname,e)}))||{},y=h?u.metadata.sidebar:f[m.path],g=Object(a.a)(),b=g.siteConfig,w=(b=void 0===b?{}:b).themeConfig,_=(w=void 0===w?{}:w).sidebarCollapsible,E=void 0===_||_,x=g.isClient;return h||0!==Object.keys(m).length?o.a.createElement(c.a,{version:p,key:x},o.a.createElement("div",{className:P.a.docPage},y&&o.a.createElement("div",{className:P.a.docSidebarContainer},o.a.createElement(O,{docsSidebars:d,path:h?v:m.path,sidebar:y,sidebarCollapsible:E})),o.a.createElement("main",{className:P.a.docMainContainer},o.a.createElement(i.a,{components:j.a},h?o.a.createElement(s.default,{content:u}):Object(l.a)(t.routes))))):o.a.createElement(k.default,e)}},185:function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"b",(function(){return h}));var r=n(0),o=n.n(r);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var s=o.a.createContext({}),u=function(e){var t=o.a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},f=function(e){var t=u(e.components);return o.a.createElement(s.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},p=o.a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,a=e.parentName,s=c(e,["components","mdxType","originalType","parentName"]),f=u(n),p=r,h=f["".concat(a,".").concat(p)]||f[p]||d[p]||i;return n?o.a.createElement(h,l(l({ref:t},s),{},{components:n})):o.a.createElement(h,l({ref:t},s))}));function h(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,a=new Array(i);a[0]=p;var l={};for(var c in t)hasOwnProperty.call(t,c)&&(l[c]=t[c]);l.originalType=e,l.mdxType="string"==typeof e?e:r,a[1]=l;for(var s=2;s=0;l--)(o=e[l])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function c(e,t){return function(n,r){t(n,r,e)}}function s(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function u(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(t){i(t)}}function l(e){try{c(r.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,l)}c((r=r.apply(e,t||[])).next())}))}function f(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function l(i){return function(l){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function v(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(l){o={error:l}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function m(){for(var e=[],t=0;t1||l(e,t)}))})}function l(e,t){try{(n=o[e](t)).value instanceof g?Promise.resolve(n.value.v).then(c,s):u(i[0][2],n)}catch(r){u(i[0][3],r)}var n}function c(e){l("next",e)}function s(e){l("throw",e)}function u(e,t){e(t),i.shift(),i.length&&l(i[0][0],i[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:g(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function _(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=h(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function E(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function O(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function j(e){return e&&e.__esModule?e:{default:e}}function k(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function S(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},218:function(e,t,n){"use strict";n.r(t);var r=n(0),o=n.n(r),i=n(198);t.default=function(){return o.a.createElement(i.a,{title:"Page Not Found"},o.a.createElement("div",{className:"container margin-vert--xl"},o.a.createElement("div",{className:"row"},o.a.createElement("div",{className:"col col--6 col--offset-3"},o.a.createElement("h1",{className:"hero__title"},"Page Not Found"),o.a.createElement("p",null,"We could not find what you were looking for."),o.a.createElement("p",null,"Please contact the owner of the site that linked you to the original URL and let them know their link is broken.")))))}},234:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isClient="object"==typeof window,t.on=function(e){for(var t=[],n=1;n1?arguments[1]:void 0)}}),n(77)("find")},276:function(e,t,n){var r=n(28),o=n(78),i=n(49),a=n(35),l=n(277);e.exports=function(e,t){var n=1==e,c=2==e,s=3==e,u=4==e,f=6==e,d=5==e||f,p=t||l;return function(t,l,h){for(var v,m,y=i(t),g=o(y),b=r(l,h,3),w=a(g.length),_=0,E=n?p(t,w):c?p(t,0):void 0;w>_;_++)if((d||_ in g)&&(m=b(v=g[_],_,y),e))if(n)E[_]=m;else if(m)switch(e){case 3:return!0;case 5:return v;case 6:return _;case 2:E.push(v)}else if(u)return!1;return f?-1:s||u?u:E}}},277:function(e,t,n){var r=n(278);e.exports=function(e,t){return new(r(e))(t)}},278:function(e,t,n){var r=n(12),o=n(228),i=n(3)("species");e.exports=function(e){var t;return o(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!o(t.prototype)||(t=void 0),r(t)&&null===(t=t[i])&&(t=void 0)),void 0===t?Array:t}},279:function(e,t,n){"use strict";var r=n(17),o=n(83)(!0);r(r.P,"Array",{includes:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),n(77)("includes")},280:function(e,t,n){"use strict";var r=n(17),o=n(219);r(r.P+r.F*n(220)("includes"),"String",{includes:function(e){return!!~o(this,e,"includes").indexOf(e,arguments.length>1?arguments[1]:void 0)}})},281:function(e,t,n){"use strict";var r=n(8),o=n(35),i=n(75),a=n(71);n(73)("match",1,(function(e,t,n,l){return[function(n){var r=e(this),o=null==n?void 0:n[t];return void 0!==o?o.call(n,r):new RegExp(n)[t](String(r))},function(e){var t=l(n,e,this);if(t.done)return t.value;var c=r(e),s=String(this);if(!c.global)return a(c,s);var u=c.unicode;c.lastIndex=0;for(var f,d=[],p=0;null!==(f=a(c,s));){var h=String(f[0]);d[p]=h,""===h&&(c.lastIndex=i(s,o(c.lastIndex),u)),p++}return 0===p?null:d}]}))},282:function(e,t,n){var r;r=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=6)}([function(e,t){e.exports=function(e){var t;if("SELECT"===e.nodeName)e.focus(),t=e.value;else if("INPUT"===e.nodeName||"TEXTAREA"===e.nodeName){var n=e.hasAttribute("readonly");n||e.setAttribute("readonly",""),e.select(),e.setSelectionRange(0,e.value.length),n||e.removeAttribute("readonly"),t=e.value}else{e.hasAttribute("contenteditable")&&e.focus();var r=window.getSelection(),o=document.createRange();o.selectNodeContents(e),r.removeAllRanges(),r.addRange(o),t=r.toString()}return t}},function(e,t){function n(){}n.prototype={on:function(e,t,n){var r=this.e||(this.e={});return(r[e]||(r[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){var r=this;function o(){r.off(e,o),t.apply(n,arguments)}return o._=t,this.on(e,o,n)},emit:function(e){for(var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),r=0,o=n.length;r0&&void 0!==arguments[0]?arguments[0]:{};this.action=e.action,this.container=e.container,this.emitter=e.emitter,this.target=e.target,this.text=e.text,this.trigger=e.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function(){var e=this,t="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return e.removeFake()},this.fakeHandler=this.container.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[t?"right":"left"]="-9999px";var n=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.style.top=n+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,this.container.appendChild(this.fakeElem),this.selectedText=o()(this.fakeElem),this.copyText()}},{key:"removeFake",value:function(){this.fakeHandler&&(this.container.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(this.container.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=o()(this.target),this.copyText()}},{key:"copyText",value:function(){var e=void 0;try{e=document.execCommand(this.action)}catch(t){e=!1}this.handleResult(e)}},{key:"handleResult",value:function(e){this.emitter.emit(e?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.trigger&&this.trigger.focus(),document.activeElement.blur(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=e,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(e){if(void 0!==e){if(!e||"object"!==(void 0===e?"undefined":i(e))||1!==e.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&e.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(e.hasAttribute("readonly")||e.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=e}},get:function(){return this._target}}]),e}(),c=n(1),s=n.n(c),u=n(2),f=n.n(u),d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof e.action?e.action:this.defaultAction,this.target="function"==typeof e.target?e.target:this.defaultTarget,this.text="function"==typeof e.text?e.text:this.defaultText,this.container="object"===d(e.container)?e.container:document.body}},{key:"listenClick",value:function(e){var t=this;this.listener=f()(e,"click",(function(e){return t.onClick(e)}))}},{key:"onClick",value:function(e){var t=e.delegateTarget||e.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new l({action:this.action(t),target:this.target(t),text:this.text(t),container:this.container,trigger:t,emitter:this})}},{key:"defaultAction",value:function(e){return v("action",e)}},{key:"defaultTarget",value:function(e){var t=v("target",e);if(t)return document.querySelector(t)}},{key:"defaultText",value:function(e){return v("text",e)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}],[{key:"isSupported",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],t="string"==typeof e?[e]:e,n=!!document.queryCommandSupported;return t.forEach((function(e){n=n&&!!document.queryCommandSupported(e)})),n}}]),t}(s.a);function v(e,t){var n="data-clipboard-"+e;if(t.hasAttribute(n))return t.getAttribute(n)}t.default=h}]).default},e.exports=r()},283:function(e,t){e.exports.parse=function(e){var t=e.split(",").map((function(e){return function(e){if(/^-?\d+$/.test(e))return parseInt(e,10);var t;if(t=e.match(/^(-?\d+)(-|\.\.\.?|\u2025|\u2026|\u22EF)(-?\d+)$/)){var n=t[1],r=t[2],o=t[3];if(n&&o){var i=[],a=(n=parseInt(n))<(o=parseInt(o))?1:-1;"-"!=r&&".."!=r&&"\u2025"!=r||(o+=a);for(var l=n;l!=o;l+=a)i.push(l);return i}}return[]}(e)}));return 0===t.length?[]:1===t.length?Array.isArray(t[0])?t[0]:t:t.reduce((function(e,t){return Array.isArray(e)||(e=[e]),Array.isArray(t)||(t=[t]),e.concat(t)}))}},284:function(e,t,n){"use strict";var r=n(9),o=n(0),i=n.n(o),a=n(187),l=n.n(a),c=n(186),s=(n(149),n(150)),u=n.n(s);t.a=function(e){return function(t){var n,o=t.id,a=Object(r.a)(t,["id"]),s=Object(c.a)().siteConfig,f=(s=void 0===s?{}:s).themeConfig,d=(f=void 0===f?{}:f).navbar,p=(d=void 0===d?{}:d).hideOnScroll,h=void 0!==p&&p;return o?i.a.createElement(e,a,i.a.createElement("a",{"aria-hidden":"true",tabIndex:"-1",className:l()("anchor",(n={},n[u.a.enhancedAnchor]=!h,n)),id:o}),a.children,i.a.createElement("a",{"aria-hidden":"true",tabIndex:"-1",className:"hash-link",href:"#"+o,title:"Direct link to heading"},"#")):i.a.createElement(e,a)}}},285:function(e,t,n){"use strict";var r=n(0),o=n.n(r);t.a=function(e){return o.a.createElement("div",null,e.children)}},286:function(e,t,n){"use strict";var r=n(2),o=(n(193),n(0)),i=n.n(o),a=n(287),l=n.n(a);t.a=function(e){var t=e.alt,n=e.className,o=e.img;return i.a.createElement(l.a,Object(r.a)({},e,{alt:t,className:n,height:o.src.height||100,width:o.src.width||100,placeholder:{lqip:o.preSrc},src:o.src.src,srcSet:o.src.images.map((function(e){return Object.assign({},e,{src:e.path})}))}))}},287:function(e,t,n){"use strict";var r;t.__esModule=!0,t.default=void 0;var o=((r=n(288))&&r.__esModule?r:{default:r}).default;t.default=o},288:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=l(n(0)),o=l(n(289)),i=l(n(297)),a=l(n(302));function l(e){return e&&e.__esModule?e:{default:e}}function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var u=function(e){return r.default.createElement(o.default,e)};u.defaultProps=function(e){for(var t=1;t1?(0,s.guessMaxImageWidth)(n.state.dimensions):0,supportsWebp:s.supportsWebp}),t=n.props.getUrl,r=t?t(e):e.src,o=n.props.shouldAutoDownload(function(e){for(var t=1;t needs a DOM element to compute boundaries. The child you passed is neither a DOM element (e.g.
) nor does it use the innerRef prop.\n\nSee https://goo.gl/LrBNgw for more info.")}(n,e._ref),e._handleScroll=e._handleScroll.bind(e),e.scrollableAncestor=e._findScrollableAncestor(),e.scrollEventListenerUnsubscribe=Object(r.a)(e.scrollableAncestor,"scroll",e._handleScroll,{passive:!0}),e.resizeEventListenerUnsubscribe=Object(r.a)(window,"resize",e._handleScroll,{passive:!0}),e._handleScroll(null)})))}},{key:"componentDidUpdate",value:function(){var e=this;n.getWindow()&&this.scrollableAncestor&&(this.cancelOnNextTick||(this.cancelOnNextTick=v((function(){e.cancelOnNextTick=null,e._handleScroll(null)}))))}},{key:"componentWillUnmount",value:function(){n.getWindow()&&(this.scrollEventListenerUnsubscribe&&this.scrollEventListenerUnsubscribe(),this.resizeEventListenerUnsubscribe&&this.resizeEventListenerUnsubscribe(),this.cancelOnNextTick&&this.cancelOnNextTick())}},{key:"_findScrollableAncestor",value:function(){var t=this.props,n=t.horizontal,r=t.scrollableAncestor;if(r)return function(t){return"window"===t?e.window:t}(r);for(var o=this._ref;o.parentNode;){if((o=o.parentNode)===document.body)return window;var i=window.getComputedStyle(o),a=(n?i.getPropertyValue("overflow-x"):i.getPropertyValue("overflow-y"))||i.getPropertyValue("overflow");if("auto"===a||"scroll"===a)return o}return window}},{key:"_handleScroll",value:function(e){if(this._ref){var t=this._getBounds(),n=function(e){return e.viewportBottom-e.viewportTop==0?"invisible":e.viewportTop<=e.waypointTop&&e.waypointTop<=e.viewportBottom||e.viewportTop<=e.waypointBottom&&e.waypointBottom<=e.viewportBottom||e.waypointTop<=e.viewportTop&&e.viewportBottom<=e.waypointBottom?"inside":e.viewportBottom1?t.join(" "):t[0],style:e}}},294:function(e,t,n){"use strict";t.__esModule=!0,t.xhrLoader=t.imageLoader=t.timeout=t.combineCancel=void 0;var r=n(295);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}t.combineCancel=function(e,t){if(!t)return e;var n=e.then((function(e){return e}),(function(e){return e}));return n.cancel=function(){e.cancel(),t.cancel()},n};t.timeout=function(e){var t,n=new Promise((function(n){t=setTimeout(n,e)}));return n.cancel=function(){clearTimeout(t),t=void 0},n};var a=function(e){var t=new Image,n=new Promise((function(n,r){t.onload=n,t.onabort=t.onerror=function(){return r({})},t.src=e}));return n.cancel=function(){if(!t)throw new Error("Already canceled");t.onload=t.onabort=t.onerror=void 0,t.src="",t=void 0},n};t.imageLoader=a;t.xhrLoader=function(e,t){var n=new r.UnfetchAbortController,l=n.signal,c=new Promise((function(n,c){return(0,r.unfetch)(e,function(e){for(var t=1;ts){var d=document.getElementsByTagName("body")[0],p=s-o;n=(d.clientHeight>u||d.clientHeight>l)&&p<=15?a-p:o/s*a}else n=o;return n*f};t.bytesToSize=function(e){var t=["Bytes","KB","MB","GB","TB"];if(0===e)return"n/a";var n=parseInt(Math.floor(Math.log(e)/Math.log(1024)),10);return 0===n?e+" "+t[n]:(e/Math.pow(1024,n)).toFixed(1)+" "+t[n]};var i=function(){if(r)return!1;var e=document.createElement("canvas");return!(!e.getContext||!e.getContext("2d"))&&0===e.toDataURL("image/webp").indexOf("data:image/webp")}();t.supportsWebp=i;var a=function(e){return"webp"===e.format||e.src&&e.src.match(/\.webp($|\?.*)/i)};t.selectSrc=function(e){var t,n,r=e.srcSet,o=e.maxImageWidth,i=e.supportsWebp;if(0===r.length)throw new Error("Need at least one item in srcSet");if(i)0===(t=r.filter(a)).length&&(t=r);else if(0===(t=r.filter((function(e){return!a(e)}))).length)throw new Error("Need at least one supported format item in srcSet");var l=t.filter((function(e){return e.width>=o}));return 0===l.length?(l=t,n=Math.max.apply(null,l.map((function(e){return e.width})))):n=Math.min.apply(null,l.map((function(e){return e.width}))),t.filter((function(e){return e.width===n}))[0]};t.fallbackParams=function(e){var t=e.srcSet,n=e.getUrl;if(!r)return{};var o=t.filter((function(e){return!a(e)})),i=o[0];return{nsSrcSet:o.map((function(e){return(n?n(e):e.src)+" "+e.width+"w"})).join(","),nsSrc:n?n(i):i.src,ssr:r}}},297:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,o=s(n(298)),i=s(n(299)),a=s(n(300)),l=s(n(301)),c=n(211);function s(e){return e&&e.__esModule?e:{default:e}}var u=c.icons.load,f=c.icons.loading,d=c.icons.loaded,p=c.icons.error,h=c.icons.noicon,v=c.icons.offline,m=((r={})[u]=o.default,r[f]=l.default,r[d]=null,r[p]=a.default,r[h]=null,r[v]=i.default,r);t.default=m},298:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=i(n(0)),o=i(n(200));function i(e){return e&&e.__esModule?e:{default:e}}function a(){return(a=Object.assign||function(e){for(var t=1;t-1},P.prototype.set=function(e,t){var n=this.__data__,r=T(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},C.prototype.clear=function(){this.__data__={hash:new x,map:new(O||P),string:new x}},C.prototype.delete=function(e){return M(this,e).delete(e)},C.prototype.get=function(e){return M(this,e).get(e)},C.prototype.has=function(e){return M(this,e).has(e)},C.prototype.set=function(e,t){return M(this,e).set(e,t),this};var R=B((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(H(e))return S?S.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var n=[];return o.test(e)&&n.push(""),e.replace(i,(function(e,t,r,o){n.push(r?o.replace(a,"$1"):t||e)})),n}));function D(e){if("string"==typeof e||H(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function B(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a),a};return n.cache=new(B.Cache||C),n}B.Cache=C;var I=Array.isArray;function z(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function H(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==b.call(e)}e.exports=function(e,t,n){var r=null==e?void 0:N(e,t);return void 0===r?n:r}}).call(this,n(69))},308:function(e,t){!function(){if("undefined"!=typeof window&&"undefined"!=typeof document&&"undefined"!=typeof HTMLElement){var e=!1;try{var t=document.createElement("div");t.addEventListener("focus",(function(e){e.preventDefault(),e.stopPropagation()}),!0),t.focus(Object.defineProperty({},"preventScroll",{get:function(){e=!0}}))}catch(n){}if(void 0===HTMLElement.prototype.nativeFocus&&!e){HTMLElement.prototype.nativeFocus=HTMLElement.prototype.focus;HTMLElement.prototype.focus=function(e){var t=window.scrollY||window.pageYOffset;this.nativeFocus(),e&&e.preventScroll&&setTimeout((function(){window.scroll(window.scrollX||window.pageXOffset,t)}),0)}}}}()},309:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(212),o=n(0),i=r.__importDefault(n(310)),a=n(234);t.default=function(e,t){void 0===e&&(e=1/0),void 0===t&&(t=1/0);var n=i.default({width:a.isClient?window.innerWidth:e,height:a.isClient?window.innerHeight:t}),r=n[0],l=n[1];return o.useEffect((function(){if(a.isClient){var e=function(){l({width:window.innerWidth,height:window.innerHeight})};return window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}}),[]),r}},310:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(212),o=n(0),i=r.__importDefault(n(311));t.default=function(e){var t=o.useRef(0),n=o.useState(e),r=n[0],a=n[1],l=o.useCallback((function(e){cancelAnimationFrame(t.current),t.current=requestAnimationFrame((function(){a(e)}))}),[]);return i.default((function(){cancelAnimationFrame(t.current)})),[r,l]}},311:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(212),o=n(0),i=r.__importDefault(n(312));t.default=function(e){var t=o.useRef(e);t.current=e,i.default((function(){return function(){return t.current()}}))}},312:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);t.default=function(e){r.useEffect(e,[])}},313:function(e,t,n){"use strict";e.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,o,i;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(o=r;0!=o--;)if(!e(t[o],n[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(i=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(o=r;0!=o--;)if(!Object.prototype.hasOwnProperty.call(n,i[o]))return!1;for(o=r;0!=o--;){var a=i[o];if(("_owner"!==a||!t.$$typeof)&&!e(t[a],n[a]))return!1}return!0}return t!=t&&n!=n}},314:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(234).isClient?window:null,i=function(e){return!!e.addEventListener},a=function(e){return!!e.on};t.default=function(e,t,n,l){void 0===n&&(n=o),r.useEffect((function(){if(t&&n)return i(n)?n.addEventListener(e,t,l):a(n)&&n.on(e,t,l),function(){i(n)?n.removeEventListener(e,t,l):a(n)&&n.off(e,t,l)}}),[e,t,n,JSON.stringify(l)])}},372:function(e,t,n){"use strict";var r=n(2),o=(n(279),n(280),n(79),n(197),n(281),n(225),n(0)),i=n.n(o),a=n(187),l=n.n(a),c={plain:{backgroundColor:"#2a2734",color:"#9a86fd"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#6c6783"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#e09142"}},{types:["property","function"],style:{color:"#9a86fd"}},{types:["tag-id","selector","atrule-id"],style:{color:"#eeebff"}},{types:["attr-name"],style:{color:"#c4b9fe"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","at-rule","placeholder","variable"],style:{color:"#ffcc99"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#c4b9fe"}}]},s={Prism:n(53).a,theme:c};function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(){return(f=Object.assign||function(e){for(var t=1;t0&&e[n-1]===t?e:e.concat(t)},v=function(e,t){var n=e.plain,r=Object.create(null),o=e.styles.reduce((function(e,n){var r=n.languages,o=n.style;return r&&!r.includes(t)||n.types.forEach((function(t){var n=f({},e[t],o);e[t]=n})),e}),r);return o.root=n,o.plain=f({},n,{backgroundColor:null}),o};function m(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&-1===t.indexOf(r)&&(n[r]=e[r]);return n}var y=function(e){function t(){for(var t=this,n=[],r=arguments.length;r--;)n[r]=arguments[r];e.apply(this,n),u(this,"getThemeDict",(function(e){if(void 0!==t.themeDict&&e.theme===t.prevTheme&&e.language===t.prevLanguage)return t.themeDict;t.prevTheme=e.theme,t.prevLanguage=e.language;var n=e.theme?v(e.theme,e.language):void 0;return t.themeDict=n})),u(this,"getLineProps",(function(e){var n=e.key,r=e.className,o=e.style,i=f({},m(e,["key","className","style","line"]),{className:"token-line",style:void 0,key:void 0}),a=t.getThemeDict(t.props);return void 0!==a&&(i.style=a.plain),void 0!==o&&(i.style=void 0!==i.style?f({},i.style,o):o),void 0!==n&&(i.key=n),r&&(i.className+=" "+r),i})),u(this,"getStyleForToken",(function(e){var n=e.types,r=e.empty,o=n.length,i=t.getThemeDict(t.props);if(void 0!==i){if(1===o&&"plain"===n[0])return r?{display:"inline-block"}:void 0;if(1===o&&!r)return i[n[0]];var a=r?{display:"inline-block"}:{},l=n.map((function(e){return i[e]}));return Object.assign.apply(Object,[a].concat(l))}})),u(this,"getTokenProps",(function(e){var n=e.key,r=e.className,o=e.style,i=e.token,a=f({},m(e,["key","className","style","token"]),{className:"token "+i.types.join(" "),children:i.content,style:t.getStyleForToken(i),key:void 0});return void 0!==o&&(a.style=void 0!==a.style?f({},a.style,o):o),void 0!==n&&(a.key=n),r&&(a.className+=" "+r),a}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.render=function(){var e=this.props,t=e.Prism,n=e.language,r=e.code,o=e.children,i=this.getThemeDict(this.props),a=t.languages[n];return o({tokens:function(e){for(var t=[[]],n=[e],r=[0],o=[e.length],i=0,a=0,l=[],c=[l];a>-1;){for(;(i=r[a]++)0?u:["plain"],s=f):(u=h(u,f.type),f.alias&&(u=h(u,f.alias)),s=f.content),"string"==typeof s){var v=s.split(d),m=v.length;l.push({types:u,content:v[0]});for(var y=1;y0}))}a&&T.test(a)&&(j=a.match(T)[0].split("title=")[1].replace(/"+/g,"")),Object(o.useEffect)((function(){var e;return w.current&&(e=new b.a(w.current,{target:function(){return g.current}})),function(){e&&e.destroy()}}),[w.current,g.current]);var L=n&&n.replace(/language-/,"");!L&&u.defaultLanguage&&(L=u.defaultLanguage);var M=t.replace(/\n$/,"");if(0===O.length&&void 0!==L){for(var A,R="",D=function(e){switch(e){case"js":case"javascript":case"ts":case"typescript":return C(["js","jsBlock"]);case"jsx":case"tsx":return C(["js","jsBlock","jsx"]);case"html":return C(["js","jsBlock","html"]);case"python":case"py":return C(["python"]);default:return C()}}(L),B=t.replace(/\n$/,"").split("\n"),I=0;IverifyPhoneNumber",id:"native-verifyphonenumber",children:[]},{value:"Web: signInWithPhoneNumber",id:"web-signinwithphonenumber",children:[]}]},{value:"Testing",id:"testing",children:[]}],b={rightToc:l};function s(e){var t=e.components,n=Object(a.a)(e,["components"]);return Object(r.b)("wrapper",Object(i.a)({},b,n,{components:t,mdxType:"MDXLayout"}),Object(r.b)("p",null,"Phone authentication allows users to sign in to Firebase using their phone as the authenticator. An SMS message is sent\nto the user (using the provided phone number) containing a unique code. Once the code has been authorized, the user is able to sign\ninto Firebase."),Object(r.b)("blockquote",null,Object(r.b)("p",{parentName:"blockquote"},"Phone numbers that end users provide for authentication will be sent and stored by Google to improve spam and abuse\nprevention across Google service, including to, but not limited to Firebase. Developers should ensure they have the\nappropriate end-user conset prior to using the Firebase Authentication phone number sign-in service.authentication")),Object(r.b)("p",null,"Firebase Phone Authentication is not supported in all countries. Please see their ",Object(r.b)("a",Object(i.a)({parentName:"p"},{href:"https://firebase.google.com/support/faq/#develop"}),"FAQs")," for more information"),Object(r.b)("h2",{id:"setup"},"Setup"),Object(r.b)("p",null,"Before starting with Phone Authentication, ensure you have followed these steps:"),Object(r.b)("ol",null,Object(r.b)("li",{parentName:"ol"},"Enable Phone as a Sign-In method in the ",Object(r.b)("a",Object(i.a)({parentName:"li"},{href:"https://console.firebase.google.com/u/0/project/_/authentication/providers"}),"Firebase console"),"."),Object(r.b)("li",{parentName:"ol"},Object(r.b)("strong",{parentName:"li"},"Android"),": If you haven't already set your app's SHA-1 hash in the ",Object(r.b)("a",Object(i.a)({parentName:"li"},{href:"https://console.firebase.google.com/"}),"Firebase console"),", do so.\nSee ",Object(r.b)("a",Object(i.a)({parentName:"li"},{href:"https://developers.google.com/android/guides/client-auth"}),"Authenticating Your Client")," for information about finding your app's SHA-1 hash."),Object(r.b)("li",{parentName:"ol"},Object(r.b)("strong",{parentName:"li"},"iOS"),": In XCode, ",Object(r.b)("a",Object(i.a)({parentName:"li"},{href:"http://help.apple.com/xcode/mac/current/#/devdfd3d04a1"}),"enable push notifications")," for your project & ensure\nyour APNs authentication key is ",Object(r.b)("a",Object(i.a)({parentName:"li"},{href:"https://firebase.google.com/docs/cloud-messaging/ios/certs"}),"configured with Firebase Cloud Messaging (FCM)"),".\nTo view an indepth explaination of this step, view the ",Object(r.b)("a",Object(i.a)({parentName:"li"},{href:"https://firebase.google.com/docs/auth/ios/phone-auth"}),"Firebase iOS Phone Auth")," documentation."),Object(r.b)("li",{parentName:"ol"},Object(r.b)("strong",{parentName:"li"},"Web"),": Ensure that you have added your applications domian on the ",Object(r.b)("a",Object(i.a)({parentName:"li"},{href:"https://console.firebase.google.com/"}),"Firebase console"),", under\n",Object(r.b)("strong",{parentName:"li"},"OAuth redirect domains"),".")),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"Note"),"; Phone number sign-in is only available for use on real devices and the web. To test your authentication flow on device emulators,\nplease see ",Object(r.b)("a",Object(i.a)({parentName:"p"},{href:"#testing"}),"Testing"),"."),Object(r.b)("h2",{id:"usage"},"Usage"),Object(r.b)("p",null,"FlutterFire provides two individual ways to sign a user in with their phone number. Native (e.g. Android & iOS) platforms provide\ndifferent functionality to validating a phone number than the web, therefore two methods exist for each platform exclusively:"),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},Object(r.b)("strong",{parentName:"li"},"Native Platform"),": ",Object(r.b)("a",Object(i.a)({parentName:"li"},{href:"!firebase_auth.FirebaseAuth.verifyPhoneNumber"}),Object(r.b)("inlineCode",{parentName:"a"},"verifyPhoneNumber")),"."),Object(r.b)("li",{parentName:"ul"},Object(r.b)("strong",{parentName:"li"},"Web Platform"),": ",Object(r.b)("a",Object(i.a)({parentName:"li"},{href:"!firebase_auth.FirebaseAuth.signInWithPhoneNumber"}),Object(r.b)("inlineCode",{parentName:"a"},"signInWithPhoneNumber")),".")),Object(r.b)("h3",{id:"native-verifyphonenumber"},"Native: ",Object(r.b)("inlineCode",{parentName:"h3"},"verifyPhoneNumber")),Object(r.b)("p",null,"On native platforms, the users phone number must be first verified and then the user can either sign-in or link their account with a\n",Object(r.b)("a",Object(i.a)({parentName:"p"},{href:"!firebase_auth_platform_interface.PhoneAuthCredential"}),Object(r.b)("inlineCode",{parentName:"a"},"PhoneAuthCredential")),"."),Object(r.b)("p",null,"First you must prompt the user for their phone number. Once provided, call the ",Object(r.b)("inlineCode",{parentName:"p"},"verifyPhoneNumber()")," method:"),Object(r.b)("pre",null,Object(r.b)("code",Object(i.a)({parentName:"pre"},{className:"language-dart"}),"await FirebaseAuth.instance.verifyPhoneNumber(\n phoneNumber: '+44 7123 123 456',\n verificationCompleted: (PhoneAuthCredential credential) {},\n verificationFailed: (FirebaseAuthException e) {},\n codeSent: (String verificationId, int resendToken) {},\n codeAutoRetrievalTimeout: (String verificationId) {},\n);\n")),Object(r.b)("p",null,"There are 4 seperate callbacks that you must handle, each will determine how you update the application UI:"),Object(r.b)("ol",null,Object(r.b)("li",{parentName:"ol"},Object(r.b)("strong",{parentName:"li"},Object(r.b)("a",Object(i.a)({parentName:"strong"},{href:"#verificationCompleted"}),"verificationCompleted")),": Automatic handling of the SMS code on Android devices."),Object(r.b)("li",{parentName:"ol"},Object(r.b)("strong",{parentName:"li"},Object(r.b)("a",Object(i.a)({parentName:"strong"},{href:"#verificationFailed"}),"verificationFailed")),": Handle failure events such as invalid phone numbers or whethehr the SMS quota has been exceeded."),Object(r.b)("li",{parentName:"ol"},Object(r.b)("strong",{parentName:"li"},Object(r.b)("a",Object(i.a)({parentName:"strong"},{href:"#codeSent"}),"codeSent")),": Handle when a code has been sent to the device from Firebase, used to prompt users to enter the code."),Object(r.b)("li",{parentName:"ol"},Object(r.b)("strong",{parentName:"li"},Object(r.b)("a",Object(i.a)({parentName:"strong"},{href:"#codeAutoRetrievalTimeout"}),"codeAutoRetrievalTimeout")),": Handle a timeout of when automatic SMS code handling fails.")),Object(r.b)("h4",{id:"verificationcompleted"},"verificationCompleted"),Object(r.b)("p",null,"This handler will only be called on Android devices which support automatic SMS code resolution."),Object(r.b)("p",null,"When the SMS code is delivered to the device Android will automatically verify the SMS code without\nrequiring the user to manually input the code. If this event occurs, a ",Object(r.b)("inlineCode",{parentName:"p"},"PhoneAuthCredential")," is automatically provided which can be\nused to sign-in with or link the users phone number."),Object(r.b)("pre",null,Object(r.b)("code",Object(i.a)({parentName:"pre"},{className:"language-dart"}),"FirebaseAuth auth = FirebaseAuth.instance;\n\nawait auth.verifyPhoneNumber(\n phoneNumber: '+44 7123 123 456',\n verificationCompleted: (PhoneAuthCredential credential) async {\n // ANDROID ONLY!\n\n // Sign the user in (or link) with the auto-generated credential\n await auth.signInWithCredential(credential);\n },\n);\n")),Object(r.b)("h4",{id:"verificationfailed"},"verificationFailed"),Object(r.b)("p",null,"If Firebase returns an error, for example for an incorrect phone number or if the SMS quota for the project has exceeded,\na ",Object(r.b)("inlineCode",{parentName:"p"},"FirebaseAuthException")," will be sent to this handler. In this case, you would prompt your user something went wrong depending on the error\ncode."),Object(r.b)("pre",null,Object(r.b)("code",Object(i.a)({parentName:"pre"},{className:"language-dart"}),"FirebaseAuth auth = FirebaseAuth.instance;\n\nawait auth.verifyPhoneNumber(\n phoneNumber: '+44 7123 123 456',\n verificationFailed: (FirebaseAuthException e) {\n if (e.code == 'invalid-phone-number') {\n print('The provided phone number is not valid.');\n }\n\n // Handle other errors\n },\n);\n")),Object(r.b)("h4",{id:"codesent"},"codeSent"),Object(r.b)("p",null,"When Firebase sends an SMS code to the device, this handler is triggered with a ",Object(r.b)("inlineCode",{parentName:"p"},"verificationId")," and ",Object(r.b)("inlineCode",{parentName:"p"},"resendToken"),"."),Object(r.b)("p",null,"Once triggered, it would be a good time to update your application UI to prompt the user to enter the SMS code they're expecting.\nOnce the SMS code has been entered, you can combine the verification ID with the SMS code to create a new ",Object(r.b)("inlineCode",{parentName:"p"},"PhoneAuthCredential"),":"),Object(r.b)("pre",null,Object(r.b)("code",Object(i.a)({parentName:"pre"},{className:"language-dart"}),"FirebaseAuth auth = FirebaseAuth.instance;\n\nawait auth.verifyPhoneNumber(\n phoneNumber: '+44 7123 123 456',\n codeSent: (String verificationId, int resendToken) async {\n // Update the UI - wait for the user to enter the SMS code\n String smsCode = 'xxxx';\n\n // Create a PhoneAuthCredential with the code\n PhoneAuthCredential phoneAuthCredential = PhoneAuthProvider.credential(verificationId, smsCode);\n\n // Sign the user in (or link) with the credential\n await auth.signInWithCredential(phoneAuthCredential);\n },\n);\n")),Object(r.b)("p",null,"By default, Firebase will not re-send a new SMS message if it has been recently sent. You can however override this behaviour\nby re-calling the ",Object(r.b)("inlineCode",{parentName:"p"},"verifyPhoneNumber")," method with the resend token to the ",Object(r.b)("inlineCode",{parentName:"p"},"forceResendingToken")," argument.\nIf successful, the SMS message will be resent."),Object(r.b)("h4",{id:"codeautoretrievaltimeout"},"codeAutoRetrievalTimeout"),Object(r.b)("p",null,"On Android devices which support automatic SMS code resolution, this handler will be called if the device has not automatically\nresolved an SMS message within a certain timeframe. Once the timeframe has passed, the device will no longer attempt to resolve\nany incoming messages."),Object(r.b)("p",null,"By default, the device waits for 30 seconds however this can be customized with the ",Object(r.b)("inlineCode",{parentName:"p"},"timeout")," argument:"),Object(r.b)("pre",null,Object(r.b)("code",Object(i.a)({parentName:"pre"},{className:"language-dart"}),"FirebaseAuth auth = FirebaseAuth.instance;\n\nawait auth.verifyPhoneNumber(\n phoneNumber: '+44 7123 123 456',\n timeout: const Duration(seconds: 60),\n codeAutoRetrievalTimeout: (String verificationId) {\n // Auto-resolution timed out...\n },\n);\n")),Object(r.b)("h3",{id:"web-signinwithphonenumber"},"Web: ",Object(r.b)("inlineCode",{parentName:"h3"},"signInWithPhoneNumber")),Object(r.b)("p",null,"TODO"),Object(r.b)("h2",{id:"testing"},"Testing"),Object(r.b)("p",null,"Firebase provides support for locally testing phone numbers:"),Object(r.b)("ol",null,Object(r.b)("li",{parentName:"ol"},'On the Firebase Console, select the "Phone" authentication provider and click on the "Phone numbers for testing" dropdown.'),Object(r.b)("li",{parentName:"ol"},"Enter a new phone number (e.g. ",Object(r.b)("inlineCode",{parentName:"li"},"+44 7444 555666"),") and a test code (e.g. ",Object(r.b)("inlineCode",{parentName:"li"},"123456"),").")),Object(r.b)("p",null,"If providing a test phone number to either the ",Object(r.b)("inlineCode",{parentName:"p"},"verifyPhoneNumber")," or ",Object(r.b)("inlineCode",{parentName:"p"},"signInWithPhoneNumber")," methods, no SMS will actually be sent. You\ncan instead provide the test code directly to the ",Object(r.b)("inlineCode",{parentName:"p"},"PhoneAuthProvider")," or with ",Object(r.b)("inlineCode",{parentName:"p"},"signInWithPhoneNumber"),"s confirmation result handler."))}s.isMDXComponent=!0},185:function(e,t,n){"use strict";n.d(t,"a",(function(){return h})),n.d(t,"b",(function(){return p}));var i=n(0),a=n.n(i);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function c(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var b=a.a.createContext({}),s=function(e){var t=a.a.useContext(b),n=t;return e&&(n="function"==typeof e?e(t):c(c({},t),e)),n},h=function(e){var t=s(e.components);return a.a.createElement(b.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},d=a.a.forwardRef((function(e,t){var n=e.components,i=e.mdxType,r=e.originalType,o=e.parentName,b=l(e,["components","mdxType","originalType","parentName"]),h=s(n),d=i,p=h["".concat(o,".").concat(d)]||h[d]||u[d]||r;return n?a.a.createElement(p,c(c({ref:t},b),{},{components:n})):a.a.createElement(p,c({ref:t},b))}));function p(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var r=n.length,o=new Array(r);o[0]=d;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:i,o[1]=c;for(var b=2;bverifyPhoneNumber",id:"native-verifyphonenumber",children:[]},{value:"Web: signInWithPhoneNumber",id:"web-signinwithphonenumber",children:[]}]},{value:"Testing",id:"testing",children:[]}],b={rightToc:l};function s(e){var t=e.components,n=Object(a.a)(e,["components"]);return Object(r.b)("wrapper",Object(i.a)({},b,n,{components:t,mdxType:"MDXLayout"}),Object(r.b)("p",null,"Phone authentication allows users to sign in to Firebase using their phone as the authenticator. An SMS message is sent\nto the user (using the provided phone number) containing a unique code. Once the code has been authorized, the user is able to sign\ninto Firebase."),Object(r.b)("blockquote",null,Object(r.b)("p",{parentName:"blockquote"},"Phone numbers that end users provide for authentication will be sent and stored by Google to improve spam and abuse\nprevention across Google service, including to, but not limited to Firebase. Developers should ensure they have the\nappropriate end-user conset prior to using the Firebase Authentication phone number sign-in service.authentication")),Object(r.b)("p",null,"Firebase Phone Authentication is not supported in all countries. Please see their ",Object(r.b)("a",Object(i.a)({parentName:"p"},{href:"https://firebase.google.com/support/faq/#develop"}),"FAQs")," for more information"),Object(r.b)("h2",{id:"setup"},"Setup"),Object(r.b)("p",null,"Before starting with Phone Authentication, ensure you have followed these steps:"),Object(r.b)("ol",null,Object(r.b)("li",{parentName:"ol"},"Enable Phone as a Sign-In method in the ",Object(r.b)("a",Object(i.a)({parentName:"li"},{href:"https://console.firebase.google.com/u/0/project/_/authentication/providers"}),"Firebase console"),"."),Object(r.b)("li",{parentName:"ol"},Object(r.b)("strong",{parentName:"li"},"Android"),": If you haven't already set your app's SHA-1 hash in the ",Object(r.b)("a",Object(i.a)({parentName:"li"},{href:"https://console.firebase.google.com/"}),"Firebase console"),", do so.\nSee ",Object(r.b)("a",Object(i.a)({parentName:"li"},{href:"https://developers.google.com/android/guides/client-auth"}),"Authenticating Your Client")," for information about finding your app's SHA-1 hash."),Object(r.b)("li",{parentName:"ol"},Object(r.b)("strong",{parentName:"li"},"iOS"),": In XCode, ",Object(r.b)("a",Object(i.a)({parentName:"li"},{href:"http://help.apple.com/xcode/mac/current/#/devdfd3d04a1"}),"enable push notifications")," for your project & ensure\nyour APNs authentication key is ",Object(r.b)("a",Object(i.a)({parentName:"li"},{href:"https://firebase.google.com/docs/cloud-messaging/ios/certs"}),"configured with Firebase Cloud Messaging (FCM)"),".\nTo view an indepth explaination of this step, view the ",Object(r.b)("a",Object(i.a)({parentName:"li"},{href:"https://firebase.google.com/docs/auth/ios/phone-auth"}),"Firebase iOS Phone Auth")," documentation."),Object(r.b)("li",{parentName:"ol"},Object(r.b)("strong",{parentName:"li"},"Web"),": Ensure that you have added your applications domian on the ",Object(r.b)("a",Object(i.a)({parentName:"li"},{href:"https://console.firebase.google.com/"}),"Firebase console"),", under\n",Object(r.b)("strong",{parentName:"li"},"OAuth redirect domains"),".")),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"Note"),"; Phone number sign-in is only available for use on real devices and the web. To test your authentication flow on device emulators,\nplease see ",Object(r.b)("a",Object(i.a)({parentName:"p"},{href:"#testing"}),"Testing"),"."),Object(r.b)("h2",{id:"usage"},"Usage"),Object(r.b)("p",null,"FlutterFire provides two individual ways to sign a user in with their phone number. Native (e.g. Android & iOS) platforms provide\ndifferent functionality to validating a phone number than the web, therefore two methods exist for each platform exclusively:"),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},Object(r.b)("strong",{parentName:"li"},"Native Platform"),": ",Object(r.b)("a",Object(i.a)({parentName:"li"},{href:"!firebase_auth.FirebaseAuth.verifyPhoneNumber"}),Object(r.b)("inlineCode",{parentName:"a"},"verifyPhoneNumber")),"."),Object(r.b)("li",{parentName:"ul"},Object(r.b)("strong",{parentName:"li"},"Web Platform"),": ",Object(r.b)("a",Object(i.a)({parentName:"li"},{href:"!firebase_auth.FirebaseAuth.signInWithPhoneNumber"}),Object(r.b)("inlineCode",{parentName:"a"},"signInWithPhoneNumber")),".")),Object(r.b)("h3",{id:"native-verifyphonenumber"},"Native: ",Object(r.b)("inlineCode",{parentName:"h3"},"verifyPhoneNumber")),Object(r.b)("p",null,"On native platforms, the users phone number must be first verified and then the user can either sign-in or link their account with a\n",Object(r.b)("a",Object(i.a)({parentName:"p"},{href:"!firebase_auth_platform_interface.PhoneAuthCredential"}),Object(r.b)("inlineCode",{parentName:"a"},"PhoneAuthCredential")),"."),Object(r.b)("p",null,"First you must prompt the user for their phone number. Once provided, call the ",Object(r.b)("inlineCode",{parentName:"p"},"verifyPhoneNumber()")," method:"),Object(r.b)("pre",null,Object(r.b)("code",Object(i.a)({parentName:"pre"},{className:"language-dart"}),"await FirebaseAuth.instance.verifyPhoneNumber(\n phoneNumber: '+44 7123 123 456',\n verificationCompleted: (PhoneAuthCredential credential) {},\n verificationFailed: (FirebaseAuthException e) {},\n codeSent: (String verificationId, int resendToken) {},\n codeAutoRetrievalTimeout: (String verificationId) {},\n);\n")),Object(r.b)("p",null,"There are 4 seperate callbacks that you must handle, each will determine how you update the application UI:"),Object(r.b)("ol",null,Object(r.b)("li",{parentName:"ol"},Object(r.b)("strong",{parentName:"li"},Object(r.b)("a",Object(i.a)({parentName:"strong"},{href:"#verificationCompleted"}),"verificationCompleted")),": Automatic handling of the SMS code on Android devices."),Object(r.b)("li",{parentName:"ol"},Object(r.b)("strong",{parentName:"li"},Object(r.b)("a",Object(i.a)({parentName:"strong"},{href:"#verificationFailed"}),"verificationFailed")),": Handle failure events such as invalid phone numbers or whethehr the SMS quota has been exceeded."),Object(r.b)("li",{parentName:"ol"},Object(r.b)("strong",{parentName:"li"},Object(r.b)("a",Object(i.a)({parentName:"strong"},{href:"#codeSent"}),"codeSent")),": Handle when a code has been sent to the device from Firebase, used to prompt users to enter the code."),Object(r.b)("li",{parentName:"ol"},Object(r.b)("strong",{parentName:"li"},Object(r.b)("a",Object(i.a)({parentName:"strong"},{href:"#codeAutoRetrievalTimeout"}),"codeAutoRetrievalTimeout")),": Handle a timeout of when automatic SMS code handling fails.")),Object(r.b)("h4",{id:"verificationcompleted"},"verificationCompleted"),Object(r.b)("p",null,"This handler will only be called on Android devices which support automatic SMS code resolution."),Object(r.b)("p",null,"When the SMS code is delivered to the device Android will automatically verify the SMS code without\nrequiring the user to manually input the code. If this event occurs, a ",Object(r.b)("inlineCode",{parentName:"p"},"PhoneAuthCredential")," is automatically provided which can be\nused to sign-in with or link the users phone number."),Object(r.b)("pre",null,Object(r.b)("code",Object(i.a)({parentName:"pre"},{className:"language-dart"}),"FirebaseAuth auth = FirebaseAuth.instance;\n\nawait auth.verifyPhoneNumber(\n phoneNumber: '+44 7123 123 456',\n verificationCompleted: (PhoneAuthCredential credential) async {\n // ANDROID ONLY!\n\n // Sign the user in (or link) with the auto-generated credential\n await auth.signInWithCredential(credential);\n },\n);\n")),Object(r.b)("h4",{id:"verificationfailed"},"verificationFailed"),Object(r.b)("p",null,"If Firebase returns an error, for example for an incorrect phone number or if the SMS quota for the project has exceeded,\na ",Object(r.b)("inlineCode",{parentName:"p"},"FirebaseAuthException")," will be sent to this handler. In this case, you would prompt your user something went wrong depending on the error\ncode."),Object(r.b)("pre",null,Object(r.b)("code",Object(i.a)({parentName:"pre"},{className:"language-dart"}),"FirebaseAuth auth = FirebaseAuth.instance;\n\nawait auth.verifyPhoneNumber(\n phoneNumber: '+44 7123 123 456',\n verificationFailed: (FirebaseAuthException e) {\n if (e.code == 'invalid-phone-number') {\n print('The provided phone number is not valid.');\n }\n\n // Handle other errors\n },\n);\n")),Object(r.b)("h4",{id:"codesent"},"codeSent"),Object(r.b)("p",null,"When Firebase sends an SMS code to the device, this handler is triggered with a ",Object(r.b)("inlineCode",{parentName:"p"},"verificationId")," and ",Object(r.b)("inlineCode",{parentName:"p"},"resendToken"),"."),Object(r.b)("p",null,"Once triggered, it would be a good time to update your application UI to prompt the user to enter the SMS code they're expecting.\nOnce the SMS code has been entered, you can combine the verification ID with the SMS code to create a new ",Object(r.b)("inlineCode",{parentName:"p"},"PhoneAuthCredential"),":"),Object(r.b)("pre",null,Object(r.b)("code",Object(i.a)({parentName:"pre"},{className:"language-dart"}),"FirebaseAuth auth = FirebaseAuth.instance;\n\nawait auth.verifyPhoneNumber(\n phoneNumber: '+44 7123 123 456',\n codeSent: (String verificationId, int resendToken) async {\n // Update the UI - wait for the user to enter the SMS code\n String smsCode = 'xxxx';\n\n // Create a PhoneAuthCredential with the code\n PhoneAuthCredential phoneAuthCredential = PhoneAuthProvider.credential(verificationId, smsCode);\n\n // Sign the user in (or link) with the credential\n await auth.signInWithCredential(phoneAuthCredential);\n },\n);\n")),Object(r.b)("p",null,"By default, Firebase will not re-send a new SMS message if it has been recently sent. You can however override this behaviour\nby re-calling the ",Object(r.b)("inlineCode",{parentName:"p"},"verifyPhoneNumber")," method with the resend token to the ",Object(r.b)("inlineCode",{parentName:"p"},"forceResendingToken")," argument.\nIf successful, the SMS message will be resent."),Object(r.b)("h4",{id:"codeautoretrievaltimeout"},"codeAutoRetrievalTimeout"),Object(r.b)("p",null,"On Android devices which support automatic SMS code resolution, this handler will be called if the device has not automatically\nresolved an SMS message within a certain timeframe. Once the timeframe has passed, the device will no longer attempt to resolve\nany incoming messages."),Object(r.b)("p",null,"By default, the device waits for 30 seconds however this can be customized with the ",Object(r.b)("inlineCode",{parentName:"p"},"timeout")," argument:"),Object(r.b)("pre",null,Object(r.b)("code",Object(i.a)({parentName:"pre"},{className:"language-dart"}),"FirebaseAuth auth = FirebaseAuth.instance;\n\nawait auth.verifyPhoneNumber(\n phoneNumber: '+44 7123 123 456',\n timeout: const Duration(seconds: 60),\n codeAutoRetrievalTimeout: (String verificationId) {\n // Auto-resolution timed out...\n },\n);\n")),Object(r.b)("h3",{id:"web-signinwithphonenumber"},"Web: ",Object(r.b)("inlineCode",{parentName:"h3"},"signInWithPhoneNumber")),Object(r.b)("p",null,"TODO"),Object(r.b)("h2",{id:"testing"},"Testing"),Object(r.b)("p",null,"Firebase provides support for locally testing phone numbers:"),Object(r.b)("ol",null,Object(r.b)("li",{parentName:"ol"},'On the Firebase Console, select the "Phone" authentication provider and click on the "Phone numbers for testing" dropdown.'),Object(r.b)("li",{parentName:"ol"},"Enter a new phone number (e.g. ",Object(r.b)("inlineCode",{parentName:"li"},"+44 7444 555666"),") and a test code (e.g. ",Object(r.b)("inlineCode",{parentName:"li"},"123456"),").")),Object(r.b)("p",null,"If providing a test phone number to either the ",Object(r.b)("inlineCode",{parentName:"p"},"verifyPhoneNumber")," or ",Object(r.b)("inlineCode",{parentName:"p"},"signInWithPhoneNumber")," methods, no SMS will actually be sent. You\ncan instead provide the test code directly to the ",Object(r.b)("inlineCode",{parentName:"p"},"PhoneAuthProvider")," or with ",Object(r.b)("inlineCode",{parentName:"p"},"signInWithPhoneNumber"),"s confirmation result handler."))}s.isMDXComponent=!0},180:function(e,t,n){"use strict";n.d(t,"a",(function(){return h})),n.d(t,"b",(function(){return p}));var i=n(0),a=n.n(i);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function c(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var b=a.a.createContext({}),s=function(e){var t=a.a.useContext(b),n=t;return e&&(n="function"==typeof e?e(t):c(c({},t),e)),n},h=function(e){var t=s(e.components);return a.a.createElement(b.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},d=a.a.forwardRef((function(e,t){var n=e.components,i=e.mdxType,r=e.originalType,o=e.parentName,b=l(e,["components","mdxType","originalType","parentName"]),h=s(n),d=i,p=h["".concat(o,".").concat(d)]||h[d]||u[d]||r;return n?a.a.createElement(p,c(c({ref:t},b),{},{components:n})):a.a.createElement(p,c({ref:t},b))}));function p(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var r=n.length,o=new Array(r);o[0]=d;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:i,o[1]=c;for(var b=2;b";var i=document.createElement("div");i.appendChild(document.createTextNode(e)),n=n||"";var s=document.createElement("div");s.appendChild(document.createTextNode(n));var a=document.createElement("div");return a.appendChild(document.createTextNode(t)),a.innerHTML.replace(RegExp(r(i.innerHTML),"g"),e).replace(RegExp(r(s.innerHTML),"g"),n)}}},186:function(t,e,n){"use strict";t.exports={element:null}},211:function(t,e,n){"use strict";var i=n(354),s=/\s+/;function r(t,e,n,i){var r;if(!n)return this;for(e=e.split(s),n=i?function(t,e){return t.bind?t.bind(e):function(){t.apply(e,[].slice.call(arguments,0))}}(n,i):n,this._callbacks=this._callbacks||{};r=e.shift();)this._callbacks[r]=this._callbacks[r]||{sync:[],async:[]},this._callbacks[r][t].push(n);return this}function a(t,e,n){return function(){for(var i,s=0,r=t.length;!i&&s]*>/,g=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,m=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,v=/^(?:body|html)$/i,y=/([A-Z])/g,b=["val","css","html","text","data","width","height","offset"],w=l.createElement("table"),x=l.createElement("tr"),C={tr:l.createElement("tbody"),tbody:w,thead:w,tfoot:w,td:x,th:x,"*":l.createElement("div")},_=/complete|loaded|interactive/,S=/^[\w-]*$/,E={},A=E.toString,k={},O=l.createElement("div"),T={tabindex:"tabIndex",readonly:"readOnly",for:"htmlFor",class:"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},$=Array.isArray||function(t){return t instanceof Array};function N(t){return null==t?String(t):E[A.call(t)]||"object"}function D(t){return"function"==N(t)}function L(t){return null!=t&&t==t.window}function P(t){return null!=t&&t.nodeType==t.DOCUMENT_NODE}function I(t){return"object"==N(t)}function R(t){return I(t)&&!L(t)&&Object.getPrototypeOf(t)==Object.prototype}function H(t){var e=!!t&&"length"in t&&t.length,i=n.type(t);return"function"!=i&&!L(t)&&("array"==i||0===e||"number"==typeof e&&e>0&&e-1 in t)}function M(t){return t.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()}function F(t){return t in p?p[t]:p[t]=new RegExp("(^|\\s)"+t+"(\\s|$)")}function V(t,e){return"number"!=typeof e||f[M(t)]?e:e+"px"}function q(t){return"children"in t?c.call(t.children):n.map(t.childNodes,(function(t){if(1==t.nodeType)return t}))}function B(t,e){var n,i=t?t.length:0;for(n=0;n")),void 0===e&&(e=d.test(t)&&RegExp.$1),e in C||(e="*"),(a=C[e]).innerHTML=""+t,s=n.each(c.call(a.childNodes),(function(){a.removeChild(this)}))),R(i)&&(r=n(s),n.each(i,(function(t,e){b.indexOf(t)>-1?r[t](e):r.attr(t,e)}))),s},k.Z=function(t,e){return new B(t,e)},k.isZ=function(t){return t instanceof k.Z},k.init=function(t,e){var i,s;if(!t)return k.Z();if("string"==typeof t)if("<"==(t=t.trim())[0]&&d.test(t))i=k.fragment(t,RegExp.$1,e),t=null;else{if(void 0!==e)return n(e).find(t);i=k.qsa(l,t)}else{if(D(t))return n(l).ready(t);if(k.isZ(t))return t;if($(t))s=t,i=u.call(s,(function(t){return null!=t}));else if(I(t))i=[t],t=null;else if(d.test(t))i=k.fragment(t.trim(),RegExp.$1,e),t=null;else{if(void 0!==e)return n(e).find(t);i=k.qsa(l,t)}}return k.Z(i,t)},(n=function(t,e){return k.init(t,e)}).extend=function(t){var e,n=c.call(arguments,1);return"boolean"==typeof t&&(e=t,t=n.shift()),n.forEach((function(n){j(t,n,e)})),t},k.qsa=function(t,e){var n,i="#"==e[0],s=!i&&"."==e[0],r=i||s?e.slice(1):e,a=S.test(r);return t.getElementById&&a&&i?(n=t.getElementById(r))?[n]:[]:1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType?[]:c.call(a&&!i&&t.getElementsByClassName?s?t.getElementsByClassName(r):t.getElementsByTagName(e):t.querySelectorAll(e))},n.contains=l.documentElement.contains?function(t,e){return t!==e&&t.contains(e)}:function(t,e){for(;e&&(e=e.parentNode);)if(e===t)return!0;return!1},n.type=N,n.isFunction=D,n.isWindow=L,n.isArray=$,n.isPlainObject=R,n.isEmptyObject=function(t){var e;for(e in t)return!1;return!0},n.isNumeric=function(t){var e=Number(t),n=typeof t;return null!=t&&"boolean"!=n&&("string"!=n||t.length)&&!isNaN(e)&&isFinite(e)||!1},n.inArray=function(t,e,n){return a.indexOf.call(e,t,n)},n.camelCase=s,n.trim=function(t){return null==t?"":String.prototype.trim.call(t)},n.uuid=0,n.support={},n.expr={},n.noop=function(){},n.map=function(t,e){var i,s,r,a,o=[];if(H(t))for(s=0;s0?n.fn.concat.apply([],a):a},n.each=function(t,e){var n,i;if(H(t)){for(n=0;n=0?t:t+this.length]},toArray:function(){return this.get()},size:function(){return this.length},remove:function(){return this.each((function(){null!=this.parentNode&&this.parentNode.removeChild(this)}))},each:function(t){return a.every.call(this,(function(e,n){return!1!==t.call(e,n,e)})),this},filter:function(t){return D(t)?this.not(this.not(t)):n(u.call(this,(function(e){return k.matches(e,t)})))},add:function(t,e){return n(r(this.concat(n(t,e))))},is:function(t){return this.length>0&&k.matches(this[0],t)},not:function(t){var e=[];if(D(t)&&void 0!==t.call)this.each((function(n){t.call(this,n)||e.push(this)}));else{var i="string"==typeof t?this.filter(t):H(t)&&D(t.item)?c.call(t):n(t);this.forEach((function(t){i.indexOf(t)<0&&e.push(t)}))}return n(e)},has:function(t){return this.filter((function(){return I(t)?n.contains(this,t):n(this).find(t).size()}))},eq:function(t){return-1===t?this.slice(t):this.slice(t,+t+1)},first:function(){var t=this[0];return t&&!I(t)?t:n(t)},last:function(){var t=this[this.length-1];return t&&!I(t)?t:n(t)},find:function(t){var e=this;return t?"object"==typeof t?n(t).filter((function(){var t=this;return a.some.call(e,(function(e){return n.contains(e,t)}))})):1==this.length?n(k.qsa(this[0],t)):this.map((function(){return k.qsa(this,t)})):n()},closest:function(t,e){var i=[],s="object"==typeof t&&n(t);return this.each((function(n,r){for(;r&&!(s?s.indexOf(r)>=0:k.matches(r,t));)r=r!==e&&!P(r)&&r.parentNode;r&&i.indexOf(r)<0&&i.push(r)})),n(i)},parents:function(t){for(var e=[],i=this;i.length>0;)i=n.map(i,(function(t){if((t=t.parentNode)&&!P(t)&&e.indexOf(t)<0)return e.push(t),t}));return K(e,t)},parent:function(t){return K(r(this.pluck("parentNode")),t)},children:function(t){return K(this.map((function(){return q(this)})),t)},contents:function(){return this.map((function(){return this.contentDocument||c.call(this.childNodes)}))},siblings:function(t){return K(this.map((function(t,e){return u.call(q(e.parentNode),(function(t){return t!==e}))})),t)},empty:function(){return this.each((function(){this.innerHTML=""}))},pluck:function(t){return n.map(this,(function(e){return e[t]}))},show:function(){return this.each((function(){var t,e,n;"none"==this.style.display&&(this.style.display=""),"none"==getComputedStyle(this,"").getPropertyValue("display")&&(this.style.display=(t=this.nodeName,h[t]||(e=l.createElement(t),l.body.appendChild(e),n=getComputedStyle(e,"").getPropertyValue("display"),e.parentNode.removeChild(e),"none"==n&&(n="block"),h[t]=n),h[t]))}))},replaceWith:function(t){return this.before(t).remove()},wrap:function(t){var e=D(t);if(this[0]&&!e)var i=n(t).get(0),s=i.parentNode||this.length>1;return this.each((function(r){n(this).wrapAll(e?t.call(this,r):s?i.cloneNode(!0):i)}))},wrapAll:function(t){if(this[0]){var e;for(n(this[0]).before(t=n(t));(e=t.children()).length;)t=e.first();n(t).append(this)}return this},wrapInner:function(t){var e=D(t);return this.each((function(i){var s=n(this),r=s.contents(),a=e?t.call(this,i):t;r.length?r.wrapAll(a):s.append(a)}))},unwrap:function(){return this.parent().each((function(){n(this).replaceWith(n(this).children())})),this},clone:function(){return this.map((function(){return this.cloneNode(!0)}))},hide:function(){return this.css("display","none")},toggle:function(t){return this.each((function(){var e=n(this);(void 0===t?"none"==e.css("display"):t)?e.show():e.hide()}))},prev:function(t){return n(this.pluck("previousElementSibling")).filter(t||"*")},next:function(t){return n(this.pluck("nextElementSibling")).filter(t||"*")},html:function(t){return 0 in arguments?this.each((function(e){var i=this.innerHTML;n(this).empty().append(z(this,t,e,i))})):0 in this?this[0].innerHTML:null},text:function(t){return 0 in arguments?this.each((function(e){var n=z(this,t,e,this.textContent);this.textContent=null==n?"":""+n})):0 in this?this.pluck("textContent").join(""):null},attr:function(t,n){var i;return"string"!=typeof t||1 in arguments?this.each((function(i){if(1===this.nodeType)if(I(t))for(e in t)U(this,e,t[e]);else U(this,t,z(this,n,i,this.getAttribute(t)))})):0 in this&&1==this[0].nodeType&&null!=(i=this[0].getAttribute(t))?i:void 0},removeAttr:function(t){return this.each((function(){1===this.nodeType&&t.split(" ").forEach((function(t){U(this,t)}),this)}))},prop:function(t,e){return t=T[t]||t,1 in arguments?this.each((function(n){this[t]=z(this,e,n,this[t])})):this[0]&&this[0][t]},removeProp:function(t){return t=T[t]||t,this.each((function(){delete this[t]}))},data:function(t,e){var n="data-"+t.replace(y,"-$1").toLowerCase(),i=1 in arguments?this.attr(n,e):this.attr(n);return null!==i?Q(i):void 0},val:function(t){return 0 in arguments?(null==t&&(t=""),this.each((function(e){this.value=z(this,t,e,this.value)}))):this[0]&&(this[0].multiple?n(this[0]).find("option").filter((function(){return this.selected})).pluck("value"):this[0].value)},offset:function(e){if(e)return this.each((function(t){var i=n(this),s=z(this,e,t,i.offset()),r=i.offsetParent().offset(),a={top:s.top-r.top,left:s.left-r.left};"static"==i.css("position")&&(a.position="relative"),i.css(a)}));if(!this.length)return null;if(l.documentElement!==this[0]&&!n.contains(l.documentElement,this[0]))return{top:0,left:0};var i=this[0].getBoundingClientRect();return{left:i.left+t.pageXOffset,top:i.top+t.pageYOffset,width:Math.round(i.width),height:Math.round(i.height)}},css:function(t,i){if(arguments.length<2){var r=this[0];if("string"==typeof t){if(!r)return;return r.style[s(t)]||getComputedStyle(r,"").getPropertyValue(t)}if($(t)){if(!r)return;var a={},o=getComputedStyle(r,"");return n.each(t,(function(t,e){a[e]=r.style[s(e)]||o.getPropertyValue(e)})),a}}var u="";if("string"==N(t))i||0===i?u=M(t)+":"+V(t,i):this.each((function(){this.style.removeProperty(M(t))}));else for(e in t)t[e]||0===t[e]?u+=M(e)+":"+V(e,t[e])+";":this.each((function(){this.style.removeProperty(M(e))}));return this.each((function(){this.style.cssText+=";"+u}))},index:function(t){return t?this.indexOf(n(t)[0]):this.parent().children().indexOf(this[0])},hasClass:function(t){return!!t&&a.some.call(this,(function(t){return this.test(W(t))}),F(t))},addClass:function(t){return t?this.each((function(e){if("className"in this){i=[];var s=W(this);z(this,t,e,s).split(/\s+/g).forEach((function(t){n(this).hasClass(t)||i.push(t)}),this),i.length&&W(this,s+(s?" ":"")+i.join(" "))}})):this},removeClass:function(t){return this.each((function(e){if("className"in this){if(void 0===t)return W(this,"");i=W(this),z(this,t,e,i).split(/\s+/g).forEach((function(t){i=i.replace(F(t)," ")})),W(this,i.trim())}}))},toggleClass:function(t,e){return t?this.each((function(i){var s=n(this);z(this,t,i,W(this)).split(/\s+/g).forEach((function(t){(void 0===e?!s.hasClass(t):e)?s.addClass(t):s.removeClass(t)}))})):this},scrollTop:function(t){if(this.length){var e="scrollTop"in this[0];return void 0===t?e?this[0].scrollTop:this[0].pageYOffset:this.each(e?function(){this.scrollTop=t}:function(){this.scrollTo(this.scrollX,t)})}},scrollLeft:function(t){if(this.length){var e="scrollLeft"in this[0];return void 0===t?e?this[0].scrollLeft:this[0].pageXOffset:this.each(e?function(){this.scrollLeft=t}:function(){this.scrollTo(t,this.scrollY)})}},position:function(){if(this.length){var t=this[0],e=this.offsetParent(),i=this.offset(),s=v.test(e[0].nodeName)?{top:0,left:0}:e.offset();return i.top-=parseFloat(n(t).css("margin-top"))||0,i.left-=parseFloat(n(t).css("margin-left"))||0,s.top+=parseFloat(n(e[0]).css("border-top-width"))||0,s.left+=parseFloat(n(e[0]).css("border-left-width"))||0,{top:i.top-s.top,left:i.left-s.left}}},offsetParent:function(){return this.map((function(){for(var t=this.offsetParent||l.body;t&&!v.test(t.nodeName)&&"static"==n(t).css("position");)t=t.offsetParent;return t}))}},n.fn.detach=n.fn.remove,["width","height"].forEach((function(t){var e=t.replace(/./,(function(t){return t[0].toUpperCase()}));n.fn[t]=function(i){var s,r=this[0];return void 0===i?L(r)?r["inner"+e]:P(r)?r.documentElement["scroll"+e]:(s=this.offset())&&s[t]:this.each((function(e){(r=n(this)).css(t,z(this,i,e,r[t]()))}))}})),["after","prepend","before","append"].forEach((function(e,i){var s=i%2;n.fn[e]=function(){var e,r,a=n.map(arguments,(function(t){var i=[];return"array"==(e=N(t))?(t.forEach((function(t){return void 0!==t.nodeType?i.push(t):n.zepto.isZ(t)?i=i.concat(t.get()):void(i=i.concat(k.fragment(t)))})),i):"object"==e||null==t?t:k.fragment(t)})),o=this.length>1;return a.length<1?this:this.each((function(e,u){r=s?u:u.parentNode,u=0==i?u.nextSibling:1==i?u.firstChild:2==i?u:null;var c=n.contains(l.documentElement,r);a.forEach((function(e){if(o)e=e.cloneNode(!0);else if(!r)return n(e).remove();r.insertBefore(e,u),c&&Z(e,(function(e){if(!(null==e.nodeName||"SCRIPT"!==e.nodeName.toUpperCase()||e.type&&"text/javascript"!==e.type||e.src)){var n=e.ownerDocument?e.ownerDocument.defaultView:t;n.eval.call(n,e.innerHTML)}}))}))}))},n.fn[s?e+"To":"insert"+(i?"Before":"After")]=function(t){return n(t)[e](this),this}})),k.Z.prototype=B.prototype=n.fn,k.uniq=r,k.deserializeValue=Q,n.zepto=k,n}();return function(e){var n=1,i=Array.prototype.slice,s=e.isFunction,r=function(t){return"string"==typeof t},a={},o={},u="onfocusin"in t,c={focus:"focusin",blur:"focusout"},l={mouseenter:"mouseover",mouseleave:"mouseout"};function h(t){return t._zid||(t._zid=n++)}function p(t,e,n,i){if((e=f(e)).ns)var s=(r=e.ns,new RegExp("(?:^| )"+r.replace(" "," .* ?")+"(?: |$)"));var r;return(a[h(t)]||[]).filter((function(t){return t&&(!e.e||t.e==e.e)&&(!e.ns||s.test(t.ns))&&(!n||h(t.fn)===h(n))&&(!i||t.sel==i)}))}function f(t){var e=(""+t).split(".");return{e:e[0],ns:e.slice(1).sort().join(" ")}}function d(t,e){return t.del&&!u&&t.e in c||!!e}function g(t){return l[t]||u&&c[t]||t}function m(t,n,i,s,r,o,u){var c=h(t),p=a[c]||(a[c]=[]);n.split(/\s/).forEach((function(n){if("ready"==n)return e(document).ready(i);var a=f(n);a.fn=i,a.sel=r,a.e in l&&(i=function(t){var n=t.relatedTarget;if(!n||n!==this&&!e.contains(this,n))return a.fn.apply(this,arguments)}),a.del=o;var c=o||i;a.proxy=function(e){if(!(e=C(e)).isImmediatePropagationStopped()){try{var n=Object.getOwnPropertyDescriptor(e,"data");n&&!n.writable||(e.data=s)}catch(e){}var i=c.apply(t,null==e._args?[e]:[e].concat(e._args));return!1===i&&(e.preventDefault(),e.stopPropagation()),i}},a.i=p.length,p.push(a),"addEventListener"in t&&t.addEventListener(g(a.e),a.proxy,d(a,u))}))}function v(t,e,n,i,s){var r=h(t);(e||"").split(/\s/).forEach((function(e){p(t,e,n,i).forEach((function(e){delete a[r][e.i],"removeEventListener"in t&&t.removeEventListener(g(e.e),e.proxy,d(e,s))}))}))}o.click=o.mousedown=o.mouseup=o.mousemove="MouseEvents",e.event={add:m,remove:v},e.proxy=function(t,n){var a=2 in arguments&&i.call(arguments,2);if(s(t)){var o=function(){return t.apply(n,a?a.concat(i.call(arguments)):arguments)};return o._zid=h(t),o}if(r(n))return a?(a.unshift(t[n],t),e.proxy.apply(null,a)):e.proxy(t[n],t);throw new TypeError("expected function")},e.fn.bind=function(t,e,n){return this.on(t,e,n)},e.fn.unbind=function(t,e){return this.off(t,e)},e.fn.one=function(t,e,n,i){return this.on(t,e,n,i,1)};var y=function(){return!0},b=function(){return!1},w=/^([A-Z]|returnValue$|layer[XY]$|webkitMovement[XY]$)/,x={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};function C(t,n){return!n&&t.isDefaultPrevented||(n||(n=t),e.each(x,(function(e,i){var s=n[e];t[e]=function(){return this[i]=y,s&&s.apply(n,arguments)},t[i]=b})),t.timeStamp||(t.timeStamp=Date.now()),(void 0!==n.defaultPrevented?n.defaultPrevented:"returnValue"in n?!1===n.returnValue:n.getPreventDefault&&n.getPreventDefault())&&(t.isDefaultPrevented=y)),t}function _(t){var e,n={originalEvent:t};for(e in t)w.test(e)||void 0===t[e]||(n[e]=t[e]);return C(n,t)}e.fn.delegate=function(t,e,n){return this.on(e,t,n)},e.fn.undelegate=function(t,e,n){return this.off(e,t,n)},e.fn.live=function(t,n){return e(document.body).delegate(this.selector,t,n),this},e.fn.die=function(t,n){return e(document.body).undelegate(this.selector,t,n),this},e.fn.on=function(t,n,a,o,u){var c,l,h=this;return t&&!r(t)?(e.each(t,(function(t,e){h.on(t,n,a,e,u)})),h):(r(n)||s(o)||!1===o||(o=a,a=n,n=void 0),void 0!==o&&!1!==a||(o=a,a=void 0),!1===o&&(o=b),h.each((function(s,r){u&&(c=function(t){return v(r,t.type,o),o.apply(this,arguments)}),n&&(l=function(t){var s,a=e(t.target).closest(n,r).get(0);if(a&&a!==r)return s=e.extend(_(t),{currentTarget:a,liveFired:r}),(c||o).apply(a,[s].concat(i.call(arguments,1)))}),m(r,t,o,a,n,l||c)})))},e.fn.off=function(t,n,i){var a=this;return t&&!r(t)?(e.each(t,(function(t,e){a.off(t,n,e)})),a):(r(n)||s(i)||!1===i||(i=n,n=void 0),!1===i&&(i=b),a.each((function(){v(this,t,i,n)})))},e.fn.trigger=function(t,n){return(t=r(t)||e.isPlainObject(t)?e.Event(t):C(t))._args=n,this.each((function(){t.type in c&&"function"==typeof this[t.type]?this[t.type]():"dispatchEvent"in this?this.dispatchEvent(t):e(this).triggerHandler(t,n)}))},e.fn.triggerHandler=function(t,n){var i,s;return this.each((function(a,o){(i=_(r(t)?e.Event(t):t))._args=n,i.target=o,e.each(p(o,t.type||t),(function(t,e){if(s=e.proxy(i),i.isImmediatePropagationStopped())return!1}))})),s},"focusin focusout focus blur load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach((function(t){e.fn[t]=function(e){return 0 in arguments?this.bind(t,e):this.trigger(t)}})),e.Event=function(t,e){r(t)||(t=(e=t).type);var n=document.createEvent(o[t]||"Events"),i=!0;if(e)for(var s in e)"bubbles"==s?i=!!e[s]:n[s]=e[s];return n.initEvent(t,i,!0),C(n)}}(i),n=[],i.fn.remove=function(){return this.each((function(){this.parentNode&&("IMG"===this.tagName&&(n.push(this),this.src="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=",e&&clearTimeout(e),e=setTimeout((function(){n=[]}),6e4)),this.parentNode.removeChild(this))}))},function(t){var e={},n=t.fn.data,i=t.camelCase,s=t.expando="Zepto"+ +new Date,r=[];function a(n,a,o){var u=n[s]||(n[s]=++t.uuid),c=e[u]||(e[u]=function(e){var n={};return t.each(e.attributes||r,(function(e,s){0==s.name.indexOf("data-")&&(n[i(s.name.replace("data-",""))]=t.zepto.deserializeValue(s.value))})),n}(n));return void 0!==a&&(c[i(a)]=o),c}t.fn.data=function(r,o){return void 0===o?t.isPlainObject(r)?this.each((function(e,n){t.each(r,(function(t,e){a(n,t,e)}))})):0 in this?function(r,o){var u=r[s],c=u&&e[u];if(void 0===o)return c||a(r);if(c){if(o in c)return c[o];var l=i(o);if(l in c)return c[l]}return n.call(t(r),o)}(this[0],r):void 0:this.each((function(){a(this,r,o)}))},t.data=function(e,n,i){return t(e).data(n,i)},t.hasData=function(n){var i=n[s],r=i&&e[i];return!!r&&!t.isEmptyObject(r)},t.fn.removeData=function(n){return"string"==typeof n&&(n=n.split(/\s+/)),this.each((function(){var r=this[s],a=r&&e[r];a&&t.each(n||a,(function(t){delete a[n?i(this):t]}))}))},["remove","empty"].forEach((function(e){var n=t.fn[e];t.fn[e]=function(){var t=this.find("*");return"remove"===e&&(t=t.add(this)),t.removeData(),n.call(this)}}))}(i),i}(n)},245:function(t,e,n){"use strict";var i=n(183),s=n(186);function r(t){t&&t.el||i.error("EventBus initialized without el"),this.$el=s.element(t.el)}i.mixin(r.prototype,{trigger:function(t,e,n,s){var r=i.Event("autocomplete:"+t);return this.$el.trigger(r,[e,n,s]),r}}),t.exports=r},246:function(t,e,n){"use strict";t.exports={wrapper:'',dropdown:'',dataset:'
',suggestions:'',suggestion:'
'}},247:function(t,e){t.exports="0.36.0"},248:function(t,e,n){"use strict";t.exports=function(t){var e=t.match(/Algolia for vanilla JavaScript (\d+\.)(\d+\.)(\d+)/);if(e)return[e[1],e[2],e[3]]}},249:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,s=n(244),r=(i=s)&&i.__esModule?i:{default:i};e.default=r.default},250:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default="2.6.3"},344:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=a(n(345)),s=a(n(346)),r=a(n(250));function a(t){return t&&t.__esModule?t:{default:t}}var o=(0,i.default)(s.default);o.version=r.default,e.default=o},345:function(t,e,n){"use strict";var i=Function.prototype.bind;t.exports=function(t){var e=function(){for(var e=arguments.length,n=Array(e),s=0;s4&&void 0!==arguments[4]?arguments[4]:{};"click"!==s.selectionMethod&&(t.setVal(""),window.location.assign(n.url))}},{key:"handleShown",value:function(t){var e=t.offset().left+t.width()/2,n=(0,h.default)(document).width()/2;isNaN(n)&&(n=900);var i=e-n>=0?"algolia-autocomplete-right":"algolia-autocomplete-left",s=e-n<0?"algolia-autocomplete-right":"algolia-autocomplete-left",r=(0,h.default)(".algolia-autocomplete");r.hasClass(i)||r.addClass(i),r.hasClass(s)&&r.removeClass(s)}}],[{key:"checkArguments",value:function(e){if(!e.apiKey||!e.indexName)throw new Error("Usage:\n documentationSearch({\n apiKey,\n indexName,\n inputSelector,\n [ appId ],\n [ algoliaOptions.{hitsPerPage} ]\n [ autocompleteOptions.{hint,debug} ]\n})");if("string"!=typeof e.inputSelector)throw new Error("Error: inputSelector:"+e.inputSelector+" must be a string. Each selector must match only one element and separated by ','");if(!t.getInputFromSelector(e.inputSelector))throw new Error("Error: No input element in the page matches "+e.inputSelector)}},{key:"injectSearchBox",value:function(t){t.before(u.default.searchBox);var e=t.prev().prev().find("input");return t.remove(),e}},{key:"bindSearchBoxEvent",value:function(){(0,h.default)('.searchbox [type="reset"]').on("click",(function(){(0,h.default)("input#docsearch").focus(),(0,h.default)(this).addClass("hide"),o.default.autocomplete.setVal("")})),(0,h.default)("input#docsearch").on("keyup",(function(){var t=document.querySelector("input#docsearch"),e=document.querySelector('.searchbox [type="reset"]');e.className="searchbox__reset",0===t.value.length&&(e.className+=" hide")}))}},{key:"getInputFromSelector",value:function(t){var e=(0,h.default)(t).filter("input");return e.length?(0,h.default)(e[0]):null}},{key:"formatHits",value:function(e){var n=c.default.deepClone(e).map((function(t){return t._highlightResult&&(t._highlightResult=c.default.mergeKeyWithParent(t._highlightResult,"hierarchy")),c.default.mergeKeyWithParent(t,"hierarchy")})),i=c.default.groupBy(n,"lvl0");return h.default.each(i,(function(t,e){var n=c.default.groupBy(e,"lvl1"),s=c.default.flattenAndFlagFirst(n,"isSubCategoryHeader");i[t]=s})),(i=c.default.flattenAndFlagFirst(i,"isCategoryHeader")).map((function(e){var n=t.formatURL(e),i=c.default.getHighlightedValue(e,"lvl0"),s=c.default.getHighlightedValue(e,"lvl1")||i,r=c.default.compact([c.default.getHighlightedValue(e,"lvl2")||s,c.default.getHighlightedValue(e,"lvl3"),c.default.getHighlightedValue(e,"lvl4"),c.default.getHighlightedValue(e,"lvl5"),c.default.getHighlightedValue(e,"lvl6")]).join(''),a=c.default.getSnippetedValue(e,"content"),o=s&&""!==s||r&&""!==r,u=r&&""!==r&&r!==s,l=!u&&s&&""!==s&&s!==i;return{isLvl0:!l&&!u,isLvl1:l,isLvl2:u,isLvl1EmptyOrDuplicate:!s||""===s||s===i,isCategoryHeader:e.isCategoryHeader,isSubCategoryHeader:e.isSubCategoryHeader,isTextOrSubcategoryNonEmpty:o,category:i,subcategory:s,title:r,text:a,url:n}}))}},{key:"formatURL",value:function(t){var e=t.url,n=t.anchor;return e?-1!==e.indexOf("#")?e:n?t.url+"#"+t.anchor:e:n?"#"+t.anchor:(console.warn("no anchor nor url for : ",JSON.stringify(t)),null)}},{key:"getEmptyTemplate",value:function(){return function(t){return r.default.compile(u.default.empty).render(t)}}},{key:"getSuggestionTemplate",value:function(t){var e=t?u.default.suggestionSimple:u.default.suggestion,n=r.default.compile(e);return function(t){return n.render(t)}}}]),t}();e.default=f},347:function(t,e,n){var i=n(348);i.Template=n(349).Template,i.template=i.Template,t.exports=i},348:function(t,e,n){!function(t){var e=/\S/,n=/\"/g,i=/\n/g,s=/\r/g,r=/\\/g,a=/\u2028/,o=/\u2029/;function u(t){"}"===t.n.substr(t.n.length-1)&&(t.n=t.n.substring(0,t.n.length-1))}function c(t){return t.trim?t.trim():t.replace(/^\s*|\s*$/g,"")}function l(t,e,n){if(e.charAt(n)!=t.charAt(0))return!1;for(var i=1,s=t.length;i":7,"=":8,_v:9,"{":10,"&":11,_t:12},t.scan=function(n,i){var s=n.length,r=0,a=null,o=null,h="",p=[],f=!1,d=0,g=0,m="{{",v="}}";function y(){h.length>0&&(p.push({tag:"_t",text:new String(h)}),h="")}function b(n,i){if(y(),n&&function(){for(var n=!0,i=g;i"==s.tag&&(s.indent=p[r].text.toString()),p.splice(r,1));else i||p.push({tag:"\n"});f=!1,g=p.length}function w(t,e){var n="="+v,i=t.indexOf(n,e),s=c(t.substring(t.indexOf("=",e)+1,i)).split(" ");return m=s[0],v=s[s.length-1],i+n.length-1}for(i&&(i=i.split(" "),m=i[0],v=i[1]),d=0;d":y,"<":function(e,n){var i={partials:{},code:"",subs:{},inPartial:!0};t.walk(e.nodes,i);var s=n.partials[y(e,n)];s.subs=i.subs,s.partials=i.partials},$:function(e,n){var i={subs:{},code:"",partials:n.partials,prefix:e.n};t.walk(e.nodes,i),n.subs[e.n]=i.code,n.inPartial||(n.code+='t.sub("'+m(e.n)+'",c,p,i);')},"\n":function(t,e){e.code+=w('"\\n"'+(t.last?"":" + i"))},_v:function(t,e){e.code+="t.b(t.v(t."+v(t.n)+'("'+m(t.n)+'",c,p,0)));'},_t:function(t,e){e.code+=w('"'+m(t.text)+'"')},"{":b,"&":b},t.walk=function(e,n){for(var i,s=0,r=e.length;s0;){if(c=n.shift(),a&&"<"==a.tag&&!(c.tag in h))throw new Error("Illegal content in < super tag.");if(t.tags[c.tag]<=t.tags.$||p(c,r))s.push(c),c.nodes=e(n,c.tag,s,r);else{if("/"==c.tag){if(0===s.length)throw new Error("Closing tag without opener: /"+c.n);if(u=s.pop(),c.n!=u.n&&!f(c.n,u.n,r))throw new Error("Nesting error: "+u.n+" vs. "+c.n);return u.end=c.i,o}"\n"==c.tag&&(c.last=0==n.length||"\n"==n[0].tag)}o.push(c)}if(s.length>0)throw new Error("missing closing tag: "+s.pop().n);return o}(e,0,[],(i=i||{}).sectionTags||[])},t.cache={},t.cacheKey=function(t,e){return[t,!!e.asString,!!e.disableLambda,e.delimiters,!!e.modelGet].join("||")},t.compile=function(e,n){n=n||{};var i=t.cacheKey(e,n),s=this.cache[i];if(s){var r=s.partials;for(var a in r)delete r[a].instance;return s}return s=this.generate(this.parse(this.scan(e,n.delimiters),e,n),e,n),this.cache[i]=s}}(e)},349:function(t,e,n){!function(t){function e(t,e,n){var i;return e&&"object"==typeof e&&(void 0!==e[t]?i=e[t]:n&&e.get&&"function"==typeof e.get&&(i=e.get(t))),i}t.Template=function(t,e,n,i){t=t||{},this.r=t.code||this.r,this.c=n,this.options=i||{},this.text=e||"",this.partials=t.partials||{},this.subs=t.subs||{},this.buf=""},t.Template.prototype={r:function(t,e,n){return""},v:function(t){return t=u(t),o.test(t)?t.replace(n,"&").replace(i,"<").replace(s,">").replace(r,"'").replace(a,"""):t},t:u,render:function(t,e,n){return this.ri([t],e||{},n)},ri:function(t,e,n){return this.r(t,e,n)},ep:function(t,e){var n=this.partials[t],i=e[n.name];if(n.instance&&n.base==i)return n.instance;if("string"==typeof i){if(!this.c)throw new Error("No compiler available.");i=this.c.compile(i,this.options)}if(!i)return null;if(this.partials[t].base=i,n.subs){for(key in e.stackText||(e.stackText={}),n.subs)e.stackText[key]||(e.stackText[key]=void 0!==this.activeSub&&e.stackText[this.activeSub]?e.stackText[this.activeSub]:this.text);i=function(t,e,n,i,s,r){function a(){}function o(){}var u;a.prototype=t,o.prototype=t.subs;var c=new a;for(u in c.subs=new o,c.subsText={},c.buf="",i=i||{},c.stackSubs=i,c.subsText=r,e)i[u]||(i[u]=e[u]);for(u in i)c.subs[u]=i[u];for(u in s=s||{},c.stackPartials=s,n)s[u]||(s[u]=n[u]);for(u in s)c.partials[u]=s[u];return c}(i,n.subs,n.partials,this.stackSubs,this.stackPartials,e.stackText)}return this.partials[t].instance=i,i},rp:function(t,e,n,i){var s=this.ep(t,n);return s?s.ri(e,n,i):""},rs:function(t,e,n){var i=t[t.length-1];if(c(i))for(var s=0;s=0;u--)if(void 0!==(r=e(t,n[u],o))){a=!0;break}return a?(s||"function"!=typeof r||(r=this.mv(r,n,i)),r):!s&&""},ls:function(t,e,n,i,s){var r=this.options.delimiters;return this.options.delimiters=s,this.b(this.ct(u(t.call(e,i)),e,n)),this.options.delimiters=r,!1},ct:function(t,e,n){if(this.options.disableLambda)throw new Error("Lambda features disabled.");return this.c.compile(t,this.options).render(e,n)},b:function(t){this.buf+=t},fl:function(){var t=this.buf;return this.buf="",t},ms:function(t,e,n,i,s,r,a){var o,u=e[e.length-1],c=t.call(u);return"function"==typeof c?!!i||(o=this.activeSub&&this.subsText&&this.subsText[this.activeSub]?this.subsText[this.activeSub]:this.text,this.ls(c,u,n,o.substring(s,r),a)):c},mv:function(t,e,n){var i=e[e.length-1],s=t.call(i);return"function"==typeof s?this.ct(u(s.call(i)),i,n):s},sub:function(t,e,n,i){var s=this.subs[t];s&&(this.activeSub=t,s(e,n,this,i),this.activeSub=!1)}};var n=/&/g,i=//g,r=/\'/g,a=/\"/g,o=/[&<>\"\']/;function u(t){return String(null==t?"":t)}var c=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}}(e)},350:function(t,e,n){"use strict";t.exports=n(351)},351:function(t,e,n){"use strict";var i=n(244);n(186).element=i;var s=n(183);s.isArray=i.isArray,s.isFunction=i.isFunction,s.isObject=i.isPlainObject,s.bind=i.proxy,s.each=function(t,e){i.each(t,(function(t,n){return e(n,t)}))},s.map=i.map,s.mixin=i.extend,s.Event=i.Event;var r=n(352),a=n(245);function o(t,e,n,o){n=s.isArray(n)?n:[].slice.call(arguments,2);var u=i(t).each((function(t,s){var u=i(s),c=new a({el:u}),l=o||new r({input:u,eventBus:c,dropdownMenuContainer:e.dropdownMenuContainer,hint:void 0===e.hint||!!e.hint,minLength:e.minLength,autoselect:e.autoselect,autoselectOnBlur:e.autoselectOnBlur,tabAutocomplete:e.tabAutocomplete,openOnFocus:e.openOnFocus,templates:e.templates,debug:e.debug,clearOnSelected:e.clearOnSelected,cssClasses:e.cssClasses,datasets:n,keyboardShortcuts:e.keyboardShortcuts,appendTo:e.appendTo,autoWidth:e.autoWidth,ariaLabel:e.ariaLabel||s.getAttribute("aria-label")});u.data("aaAutocomplete",l)}));return u.autocomplete={},s.each(["open","close","getVal","setVal","destroy","getWrapper"],(function(t){u.autocomplete[t]=function(){var e,n=arguments;return u.each((function(s,r){var a=i(r).data("aaAutocomplete");e=a[t].apply(a,n)})),e}})),u}o.sources=r.sources,o.escapeHighlightedString=s.escapeHighlightedString;var u="autocomplete"in window,c=window.autocomplete;o.noConflict=function(){return u?window.autocomplete=c:delete window.autocomplete,o},t.exports=o},352:function(t,e,n){"use strict";var i=n(183),s=n(186),r=n(245),a=n(353),o=n(360),u=n(246),c=n(212);function l(t){var e,n;if((t=t||{}).input||i.error("missing input"),this.isActivated=!1,this.debug=!!t.debug,this.autoselect=!!t.autoselect,this.autoselectOnBlur=!!t.autoselectOnBlur,this.openOnFocus=!!t.openOnFocus,this.minLength=i.isNumber(t.minLength)?t.minLength:1,this.autoWidth=void 0===t.autoWidth||!!t.autoWidth,this.clearOnSelected=!!t.clearOnSelected,this.tabAutocomplete=void 0===t.tabAutocomplete||!!t.tabAutocomplete,t.hint=!!t.hint,t.hint&&t.appendTo)throw new Error("[autocomplete.js] hint and appendTo options can't be used at the same time");this.css=t.css=i.mixin({},c,t.appendTo?c.appendTo:{}),this.cssClasses=t.cssClasses=i.mixin({},c.defaultClasses,t.cssClasses||{}),this.cssClasses.prefix=t.cssClasses.formattedPrefix=i.formatPrefix(this.cssClasses.prefix,this.cssClasses.noPrefix),this.listboxId=t.listboxId=[this.cssClasses.root,"listbox",i.getUniqueId()].join("-");var a=function(t){var e,n,r,a;e=s.element(t.input),n=s.element(u.wrapper.replace("%ROOT%",t.cssClasses.root)).css(t.css.wrapper),t.appendTo||"block"!==e.css("display")||"table"!==e.parent().css("display")||n.css("display","table-cell");var o=u.dropdown.replace("%PREFIX%",t.cssClasses.prefix).replace("%DROPDOWN_MENU%",t.cssClasses.dropdownMenu);r=s.element(o).css(t.css.dropdown).attr({role:"listbox",id:t.listboxId}),t.templates&&t.templates.dropdownMenu&&r.html(i.templatify(t.templates.dropdownMenu)());(a=e.clone().css(t.css.hint).css(function(t){return{backgroundAttachment:t.css("background-attachment"),backgroundClip:t.css("background-clip"),backgroundColor:t.css("background-color"),backgroundImage:t.css("background-image"),backgroundOrigin:t.css("background-origin"),backgroundPosition:t.css("background-position"),backgroundRepeat:t.css("background-repeat"),backgroundSize:t.css("background-size")}}(e))).val("").addClass(i.className(t.cssClasses.prefix,t.cssClasses.hint,!0)).removeAttr("id name placeholder required").prop("readonly",!0).attr({"aria-hidden":"true",autocomplete:"off",spellcheck:"false",tabindex:-1}),a.removeData&&a.removeData();e.data("aaAttrs",{"aria-autocomplete":e.attr("aria-autocomplete"),"aria-expanded":e.attr("aria-expanded"),"aria-owns":e.attr("aria-owns"),autocomplete:e.attr("autocomplete"),dir:e.attr("dir"),role:e.attr("role"),spellcheck:e.attr("spellcheck"),style:e.attr("style"),type:e.attr("type")}),e.addClass(i.className(t.cssClasses.prefix,t.cssClasses.input,!0)).attr({autocomplete:"off",spellcheck:!1,role:"combobox","aria-autocomplete":t.datasets&&t.datasets[0]&&t.datasets[0].displayKey?"both":"list","aria-expanded":"false","aria-label":t.ariaLabel,"aria-owns":t.listboxId}).css(t.hint?t.css.input:t.css.inputWithNoHint);try{e.attr("dir")||e.attr("dir","auto")}catch(c){}return(n=t.appendTo?n.appendTo(s.element(t.appendTo).eq(0)).eq(0):e.wrap(n).parent()).prepend(t.hint?a:null).append(r),{wrapper:n,input:e,hint:a,menu:r}}(t);this.$node=a.wrapper;var o=this.$input=a.input;e=a.menu,n=a.hint,t.dropdownMenuContainer&&s.element(t.dropdownMenuContainer).css("position","relative").append(e.css("top","0")),o.on("blur.aa",(function(t){var n=document.activeElement;i.isMsie()&&(e[0]===n||e[0].contains(n))&&(t.preventDefault(),t.stopImmediatePropagation(),i.defer((function(){o.focus()})))})),e.on("mousedown.aa",(function(t){t.preventDefault()})),this.eventBus=t.eventBus||new r({el:o}),this.dropdown=new l.Dropdown({appendTo:t.appendTo,wrapper:this.$node,menu:e,datasets:t.datasets,templates:t.templates,cssClasses:t.cssClasses,minLength:this.minLength}).onSync("suggestionClicked",this._onSuggestionClicked,this).onSync("cursorMoved",this._onCursorMoved,this).onSync("cursorRemoved",this._onCursorRemoved,this).onSync("opened",this._onOpened,this).onSync("closed",this._onClosed,this).onSync("shown",this._onShown,this).onSync("empty",this._onEmpty,this).onSync("redrawn",this._onRedrawn,this).onAsync("datasetRendered",this._onDatasetRendered,this),this.input=new l.Input({input:o,hint:n}).onSync("focused",this._onFocused,this).onSync("blurred",this._onBlurred,this).onSync("enterKeyed",this._onEnterKeyed,this).onSync("tabKeyed",this._onTabKeyed,this).onSync("escKeyed",this._onEscKeyed,this).onSync("upKeyed",this._onUpKeyed,this).onSync("downKeyed",this._onDownKeyed,this).onSync("leftKeyed",this._onLeftKeyed,this).onSync("rightKeyed",this._onRightKeyed,this).onSync("queryChanged",this._onQueryChanged,this).onSync("whitespaceChanged",this._onWhitespaceChanged,this),this._bindKeyboardShortcuts(t),this._setLanguageDirection()}i.mixin(l.prototype,{_bindKeyboardShortcuts:function(t){if(t.keyboardShortcuts){var e=this.$input,n=[];i.each(t.keyboardShortcuts,(function(t){"string"==typeof t&&(t=t.toUpperCase().charCodeAt(0)),n.push(t)})),s.element(document).keydown((function(t){var i=t.target||t.srcElement,s=i.tagName;if(!i.isContentEditable&&"INPUT"!==s&&"SELECT"!==s&&"TEXTAREA"!==s){var r=t.which||t.keyCode;-1!==n.indexOf(r)&&(e.focus(),t.stopPropagation(),t.preventDefault())}}))}},_onSuggestionClicked:function(t,e){var n;(n=this.dropdown.getDatumForSuggestion(e))&&this._select(n,{selectionMethod:"click"})},_onCursorMoved:function(t,e){var n=this.dropdown.getDatumForCursor(),i=this.dropdown.getCurrentCursor().attr("id");this.input.setActiveDescendant(i),n&&(e&&this.input.setInputValue(n.value,!0),this.eventBus.trigger("cursorchanged",n.raw,n.datasetName))},_onCursorRemoved:function(){this.input.resetInputValue(),this._updateHint(),this.eventBus.trigger("cursorremoved")},_onDatasetRendered:function(){this._updateHint(),this.eventBus.trigger("updated")},_onOpened:function(){this._updateHint(),this.input.expand(),this.eventBus.trigger("opened")},_onEmpty:function(){this.eventBus.trigger("empty")},_onRedrawn:function(){this.$node.css("top","0px"),this.$node.css("left","0px");var t=this.$input[0].getBoundingClientRect();this.autoWidth&&this.$node.css("width",t.width+"px");var e=this.$node[0].getBoundingClientRect(),n=t.bottom-e.top;this.$node.css("top",n+"px");var i=t.left-e.left;this.$node.css("left",i+"px"),this.eventBus.trigger("redrawn")},_onShown:function(){this.eventBus.trigger("shown"),this.autoselect&&this.dropdown.cursorTopSuggestion()},_onClosed:function(){this.input.clearHint(),this.input.removeActiveDescendant(),this.input.collapse(),this.eventBus.trigger("closed")},_onFocused:function(){if(this.isActivated=!0,this.openOnFocus){var t=this.input.getQuery();t.length>=this.minLength?this.dropdown.update(t):this.dropdown.empty(),this.dropdown.open()}},_onBlurred:function(){var t,e;t=this.dropdown.getDatumForCursor(),e=this.dropdown.getDatumForTopSuggestion();var n={selectionMethod:"blur"};this.debug||(this.autoselectOnBlur&&t?this._select(t,n):this.autoselectOnBlur&&e?this._select(e,n):(this.isActivated=!1,this.dropdown.empty(),this.dropdown.close()))},_onEnterKeyed:function(t,e){var n,i;n=this.dropdown.getDatumForCursor(),i=this.dropdown.getDatumForTopSuggestion();var s={selectionMethod:"enterKey"};n?(this._select(n,s),e.preventDefault()):this.autoselect&&i&&(this._select(i,s),e.preventDefault())},_onTabKeyed:function(t,e){if(this.tabAutocomplete){var n;(n=this.dropdown.getDatumForCursor())?(this._select(n,{selectionMethod:"tabKey"}),e.preventDefault()):this._autocomplete(!0)}else this.dropdown.close()},_onEscKeyed:function(){this.dropdown.close(),this.input.resetInputValue()},_onUpKeyed:function(){var t=this.input.getQuery();this.dropdown.isEmpty&&t.length>=this.minLength?this.dropdown.update(t):this.dropdown.moveCursorUp(),this.dropdown.open()},_onDownKeyed:function(){var t=this.input.getQuery();this.dropdown.isEmpty&&t.length>=this.minLength?this.dropdown.update(t):this.dropdown.moveCursorDown(),this.dropdown.open()},_onLeftKeyed:function(){"rtl"===this.dir&&this._autocomplete()},_onRightKeyed:function(){"ltr"===this.dir&&this._autocomplete()},_onQueryChanged:function(t,e){this.input.clearHintIfInvalid(),e.length>=this.minLength?this.dropdown.update(e):this.dropdown.empty(),this.dropdown.open(),this._setLanguageDirection()},_onWhitespaceChanged:function(){this._updateHint(),this.dropdown.open()},_setLanguageDirection:function(){var t=this.input.getLanguageDirection();this.dir!==t&&(this.dir=t,this.$node.css("direction",t),this.dropdown.setLanguageDirection(t))},_updateHint:function(){var t,e,n,s,r;(t=this.dropdown.getDatumForTopSuggestion())&&this.dropdown.isVisible()&&!this.input.hasOverflow()?(e=this.input.getInputValue(),n=a.normalizeQuery(e),s=i.escapeRegExChars(n),(r=new RegExp("^(?:"+s+")(.+$)","i").exec(t.value))?this.input.setHint(e+r[1]):this.input.clearHint()):this.input.clearHint()},_autocomplete:function(t){var e,n,i,s;e=this.input.getHint(),n=this.input.getQuery(),i=t||this.input.isCursorAtEnd(),e&&n!==e&&i&&((s=this.dropdown.getDatumForTopSuggestion())&&this.input.setInputValue(s.value),this.eventBus.trigger("autocompleted",s.raw,s.datasetName))},_select:function(t,e){void 0!==t.value&&this.input.setQuery(t.value),this.clearOnSelected?this.setVal(""):this.input.setInputValue(t.value,!0),this._setLanguageDirection(),!1===this.eventBus.trigger("selected",t.raw,t.datasetName,e).isDefaultPrevented()&&(this.dropdown.close(),i.defer(i.bind(this.dropdown.empty,this.dropdown)))},open:function(){if(!this.isActivated){var t=this.input.getInputValue();t.length>=this.minLength?this.dropdown.update(t):this.dropdown.empty()}this.dropdown.open()},close:function(){this.dropdown.close()},setVal:function(t){t=i.toStr(t),this.isActivated?this.input.setInputValue(t):(this.input.setQuery(t),this.input.setInputValue(t,!0)),this._setLanguageDirection()},getVal:function(){return this.input.getQuery()},destroy:function(){this.input.destroy(),this.dropdown.destroy(),function(t,e){var n=t.find(i.className(e.prefix,e.input));i.each(n.data("aaAttrs"),(function(t,e){void 0===t?n.removeAttr(e):n.attr(e,t)})),n.detach().removeClass(i.className(e.prefix,e.input,!0)).insertAfter(t),n.removeData&&n.removeData("aaAttrs");t.remove()}(this.$node,this.cssClasses),this.$node=null},getWrapper:function(){return this.dropdown.$container[0]}}),l.Dropdown=o,l.Input=a,l.sources=n(362),t.exports=l},353:function(t,e,n){"use strict";var i;i={9:"tab",27:"esc",37:"left",39:"right",13:"enter",38:"up",40:"down"};var s=n(183),r=n(186),a=n(211);function o(t){var e,n,a,o,u,c=this;(t=t||{}).input||s.error("input is missing"),e=s.bind(this._onBlur,this),n=s.bind(this._onFocus,this),a=s.bind(this._onKeydown,this),o=s.bind(this._onInput,this),this.$hint=r.element(t.hint),this.$input=r.element(t.input).on("blur.aa",e).on("focus.aa",n).on("keydown.aa",a),0===this.$hint.length&&(this.setHint=this.getHint=this.clearHint=this.clearHintIfInvalid=s.noop),s.isMsie()?this.$input.on("keydown.aa keypress.aa cut.aa paste.aa",(function(t){i[t.which||t.keyCode]||s.defer(s.bind(c._onInput,c,t))})):this.$input.on("input.aa",o),this.query=this.$input.val(),this.$overflowHelper=(u=this.$input,r.element('').css({position:"absolute",visibility:"hidden",whiteSpace:"pre",fontFamily:u.css("font-family"),fontSize:u.css("font-size"),fontStyle:u.css("font-style"),fontVariant:u.css("font-variant"),fontWeight:u.css("font-weight"),wordSpacing:u.css("word-spacing"),letterSpacing:u.css("letter-spacing"),textIndent:u.css("text-indent"),textRendering:u.css("text-rendering"),textTransform:u.css("text-transform")}).insertAfter(u))}function u(t){return t.altKey||t.ctrlKey||t.metaKey||t.shiftKey}o.normalizeQuery=function(t){return(t||"").replace(/^\s*/g,"").replace(/\s{2,}/g," ")},s.mixin(o.prototype,a,{_onBlur:function(){this.resetInputValue(),this.$input.removeAttr("aria-activedescendant"),this.trigger("blurred")},_onFocus:function(){this.trigger("focused")},_onKeydown:function(t){var e=i[t.which||t.keyCode];this._managePreventDefault(e,t),e&&this._shouldTrigger(e,t)&&this.trigger(e+"Keyed",t)},_onInput:function(){this._checkInputValue()},_managePreventDefault:function(t,e){var n,i,s;switch(t){case"tab":i=this.getHint(),s=this.getInputValue(),n=i&&i!==s&&!u(e);break;case"up":case"down":n=!u(e);break;default:n=!1}n&&e.preventDefault()},_shouldTrigger:function(t,e){var n;switch(t){case"tab":n=!u(e);break;default:n=!0}return n},_checkInputValue:function(){var t,e,n,i,s;t=this.getInputValue(),i=t,s=this.query,n=!(!(e=o.normalizeQuery(i)===o.normalizeQuery(s))||!this.query)&&this.query.length!==t.length,this.query=t,e?n&&this.trigger("whitespaceChanged",this.query):this.trigger("queryChanged",this.query)},focus:function(){this.$input.focus()},blur:function(){this.$input.blur()},getQuery:function(){return this.query},setQuery:function(t){this.query=t},getInputValue:function(){return this.$input.val()},setInputValue:function(t,e){void 0===t&&(t=this.query),this.$input.val(t),e?this.clearHint():this._checkInputValue()},expand:function(){this.$input.attr("aria-expanded","true")},collapse:function(){this.$input.attr("aria-expanded","false")},setActiveDescendant:function(t){this.$input.attr("aria-activedescendant",t)},removeActiveDescendant:function(){this.$input.removeAttr("aria-activedescendant")},resetInputValue:function(){this.setInputValue(this.query,!0)},getHint:function(){return this.$hint.val()},setHint:function(t){this.$hint.val(t)},clearHint:function(){this.setHint("")},clearHintIfInvalid:function(){var t,e,n;n=(t=this.getInputValue())!==(e=this.getHint())&&0===e.indexOf(t),""!==t&&n&&!this.hasOverflow()||this.clearHint()},getLanguageDirection:function(){return(this.$input.css("direction")||"ltr").toLowerCase()},hasOverflow:function(){var t=this.$input.width()-2;return this.$overflowHelper.text(this.getInputValue()),this.$overflowHelper.width()>=t},isCursorAtEnd:function(){var t,e,n;return t=this.$input.val().length,e=this.$input[0].selectionStart,s.isNumber(e)?e===t:!document.selection||((n=document.selection.createRange()).moveStart("character",-t),t===n.text.length)},destroy:function(){this.$hint.off(".aa"),this.$input.off(".aa"),this.$hint=this.$input=this.$overflowHelper=null}}),t.exports=o},354:function(t,e,n){"use strict";var i,s,r,a=[n(355),n(356),n(357),n(358),n(359)],o=-1,u=[],c=!1;function l(){i&&s&&(i=!1,s.length?u=s.concat(u):o=-1,u.length&&h())}function h(){if(!i){c=!1,i=!0;for(var t=u.length,e=setTimeout(l);t;){for(s=u,u=[];s&&++o1)for(var n=1;n
'),this.$menu.append(this.$empty),this.$empty.hide()),this.datasets=i.map(t.datasets,(function(e){return function(t,e,n){return new u.Dataset(i.mixin({$menu:t,cssClasses:n},e))}(a.$menu,e,t.cssClasses)})),i.each(this.datasets,(function(t){var e=t.getRoot();e&&0===e.parent().length&&a.$menu.append(e),t.onSync("rendered",a._onRendered,a)})),t.templates&&t.templates.footer&&(this.templates.footer=i.templatify(t.templates.footer),this.$menu.append(this.templates.footer()));var l=this;s.element(window).resize((function(){l._redraw()}))}i.mixin(u.prototype,r,{_onSuggestionClick:function(t){this.trigger("suggestionClicked",s.element(t.currentTarget))},_onSuggestionMouseEnter:function(t){var e=s.element(t.currentTarget);if(!e.hasClass(i.className(this.cssClasses.prefix,this.cssClasses.cursor,!0))){this._removeCursor();var n=this;setTimeout((function(){n._setCursor(e,!1)}),0)}},_onSuggestionMouseLeave:function(t){if(t.relatedTarget&&s.element(t.relatedTarget).closest("."+i.className(this.cssClasses.prefix,this.cssClasses.cursor,!0)).length>0)return;this._removeCursor(),this.trigger("cursorRemoved")},_onRendered:function(t,e){if(this.isEmpty=i.every(this.datasets,(function(t){return t.isEmpty()})),this.isEmpty)if(e.length>=this.minLength&&this.trigger("empty"),this.$empty)if(e.length=this.minLength?this._show():this._hide());this.trigger("datasetRendered")},_hide:function(){this.$container.hide()},_show:function(){this.$container.css("display","block"),this._redraw(),this.trigger("shown")},_redraw:function(){this.isOpen&&this.appendTo&&this.trigger("redrawn")},_getSuggestions:function(){return this.$menu.find(i.className(this.cssClasses.prefix,this.cssClasses.suggestion))},_getCursor:function(){return this.$menu.find(i.className(this.cssClasses.prefix,this.cssClasses.cursor)).first()},_setCursor:function(t,e){t.first().addClass(i.className(this.cssClasses.prefix,this.cssClasses.cursor,!0)).attr("aria-selected","true"),this.trigger("cursorMoved",e)},_removeCursor:function(){this._getCursor().removeClass(i.className(this.cssClasses.prefix,this.cssClasses.cursor,!0)).removeAttr("aria-selected")},_moveCursor:function(t){var e,n,i,s;this.isOpen&&(n=this._getCursor(),e=this._getSuggestions(),this._removeCursor(),-1!==(i=((i=e.index(n)+t)+1)%(e.length+1)-1)?(i<-1&&(i=e.length-1),this._setCursor(s=e.eq(i),!0),this._ensureVisible(s)):this.trigger("cursorRemoved"))},_ensureVisible:function(t){var e,n,i,s;n=(e=t.position().top)+t.height()+parseInt(t.css("margin-top"),10)+parseInt(t.css("margin-bottom"),10),i=this.$menu.scrollTop(),s=this.$menu.height()+parseInt(this.$menu.css("padding-top"),10)+parseInt(this.$menu.css("padding-bottom"),10),e<0?this.$menu.scrollTop(i+e):s"+u(t)+"

"}}),this.css=i.mixin({},a,t.appendTo?a.appendTo:{}),this.cssClasses=t.cssClasses=i.mixin({},a.defaultClasses,t.cssClasses||{}),this.cssClasses.prefix=t.cssClasses.formattedPrefix||i.formatPrefix(this.cssClasses.prefix,this.cssClasses.noPrefix);var c=i.className(this.cssClasses.prefix,this.cssClasses.dataset);this.$el=t.$menu&&t.$menu.find(c+"-"+this.name).length>0?s.element(t.$menu.find(c+"-"+this.name)[0]):s.element(r.dataset.replace("%CLASS%",this.name).replace("%PREFIX%",this.cssClasses.prefix).replace("%DATASET%",this.cssClasses.dataset)),this.$menu=t.$menu,this.clearCachedSuggestions()}u.extractDatasetName=function(t){return s.element(t).data("aaDataset")},u.extractValue=function(t){return s.element(t).data("aaValue")},u.extractDatum=function(t){var e=s.element(t).data("aaDatum");return"string"==typeof e&&(e=JSON.parse(e)),e},i.mixin(u.prototype,o,{_render:function(t,e){if(this.$el){var n,a=this,o=[].slice.call(arguments,2);if(this.$el.empty(),n=e&&e.length,this._isEmpty=!n,!n&&this.templates.empty)this.$el.html(u.apply(this,o)).prepend(a.templates.header?l.apply(this,o):null).append(a.templates.footer?h.apply(this,o):null);else if(n)this.$el.html(c.apply(this,o)).prepend(a.templates.header?l.apply(this,o):null).append(a.templates.footer?h.apply(this,o):null);else if(e&&!Array.isArray(e))throw new TypeError("suggestions must be an array");this.$menu&&this.$menu.addClass(this.cssClasses.prefix+(n?"with":"without")+"-"+this.name).removeClass(this.cssClasses.prefix+(n?"without":"with")+"-"+this.name),this.trigger("rendered",t)}function u(){var e=[].slice.call(arguments,0);return e=[{query:t,isEmpty:!0}].concat(e),a.templates.empty.apply(this,e)}function c(){var t,n,o=[].slice.call(arguments,0),u=this,c=r.suggestions.replace("%PREFIX%",this.cssClasses.prefix).replace("%SUGGESTIONS%",this.cssClasses.suggestions);return t=s.element(c).css(this.css.suggestions),n=i.map(e,l),t.append.apply(t,n),t;function l(t){var e,n=r.suggestion.replace("%PREFIX%",u.cssClasses.prefix).replace("%SUGGESTION%",u.cssClasses.suggestion);return(e=s.element(n).attr({role:"option",id:["option",Math.floor(1e8*Math.random())].join("-")}).append(a.templates.suggestion.apply(this,[t].concat(o)))).data("aaDataset",a.name),e.data("aaValue",a.displayFn(t)||void 0),e.data("aaDatum",JSON.stringify(t)),e.children().each((function(){s.element(this).css(u.css.suggestionChild)})),e}}function l(){var e=[].slice.call(arguments,0);return e=[{query:t,isEmpty:!n}].concat(e),a.templates.header.apply(this,e)}function h(){var e=[].slice.call(arguments,0);return e=[{query:t,isEmpty:!n}].concat(e),a.templates.footer.apply(this,e)}},getRoot:function(){return this.$el},update:function(t){function e(e){if(!this.canceled&&t===this.query){var n=[].slice.call(arguments,1);this.cacheSuggestions(t,e,n),this._render.apply(this,[t,e].concat(n))}}if(this.query=t,this.canceled=!1,this.shouldFetchFromCache(t))e.apply(this,[this.cachedSuggestions].concat(this.cachedRenderExtraArgs));else{var n=this,i=function(){n.canceled||n.source(t,e.bind(n))};if(this.debounce){clearTimeout(this.debounceTimeout),this.debounceTimeout=setTimeout((function(){n.debounceTimeout=null,i()}),this.debounce)}else i()}},cacheSuggestions:function(t,e,n){this.cachedQuery=t,this.cachedSuggestions=e,this.cachedRenderExtraArgs=n},shouldFetchFromCache:function(t){return this.cache&&this.cachedQuery===t&&this.cachedSuggestions&&this.cachedSuggestions.length},clearCachedSuggestions:function(){delete this.cachedQuery,delete this.cachedSuggestions,delete this.cachedRenderExtraArgs},cancel:function(){this.canceled=!0},clear:function(){this.cancel(),this.$el.empty(),this.trigger("rendered","")},isEmpty:function(){return this._isEmpty},destroy:function(){this.clearCachedSuggestions(),this.$el=null}}),t.exports=u},362:function(t,e,n){"use strict";t.exports={hits:n(363),popularIn:n(364)}},363:function(t,e,n){"use strict";var i=n(183),s=n(247),r=n(248);t.exports=function(t,e){var n=r(t.as._ua);return n&&n[0]>=3&&n[1]>20&&((e=e||{}).additionalUA="autocomplete.js "+s),function(n,s){t.search(n,e,(function(t,e){t?i.error(t.message):s(e.hits,e)}))}}},364:function(t,e,n){"use strict";var i=n(183),s=n(247),r=n(248);t.exports=function(t,e,n,a){var o=r(t.as._ua);if(o&&o[0]>=3&&o[1]>20&&((e=e||{}).additionalUA="autocomplete.js "+s),!n.source)return i.error("Missing 'source' key");var u=i.isFunction(n.source)?n.source:function(t){return t[n.source]};if(!n.index)return i.error("Missing 'index' key");var c=n.index;return a=a||{},function(o,l){t.search(o,e,(function(t,o){if(t)i.error(t.message);else{if(o.hits.length>0){var h=o.hits[0],p=i.mixin({hitsPerPage:0},n);delete p.source,delete p.index;var f=r(c.as._ua);return f&&f[0]>=3&&f[1]>20&&(e.additionalUA="autocomplete.js "+s),void c.search(u(h),p,(function(t,e){if(t)i.error(t.message);else{var n=[];if(a.includeAll){var s=a.allTitle||"All departments";n.push(i.mixin({facet:{value:s,count:e.nbHits}},i.cloneDeep(h)))}i.each(e.facets,(function(t,e){i.each(t,(function(t,s){n.push(i.mixin({facet:{facet:e,value:s,count:t}},i.cloneDeep(h)))}))}));for(var r=1;r\n
\n {{{category}}}\n
\n
\n
\n {{{subcategory}}}\n
\n {{#isTextOrSubcategoryNonEmpty}}\n
\n
{{{subcategory}}}
\n
{{{title}}}
\n {{#text}}
{{{text}}}
{{/text}}\n
\n {{/isTextOrSubcategoryNonEmpty}}\n
\n \n ',suggestionSimple:'\n
\n
\n {{^isLvl0}}\n {{{category}}}\n {{^isLvl1}}\n {{^isLvl1EmptyOrDuplicate}}\n \n {{{subcategory}}}\n \n {{/isLvl1EmptyOrDuplicate}}\n {{/isLvl1}}\n {{/isLvl0}}\n
\n {{#isLvl2}}\n {{{title}}}\n {{/isLvl2}}\n {{#isLvl1}}\n {{{subcategory}}}\n {{/isLvl1}}\n {{#isLvl0}}\n {{{category}}}\n {{/isLvl0}}\n
\n
\n
\n {{#text}}\n
\n
{{{text}}}
\n
\n {{/text}}\n
\n
\n ',footer:'\n \n ',empty:'\n
\n
\n
\n
\n
\n No results found for query "{{query}}"\n
\n
\n
\n
\n
\n ',searchBox:'\n \n\n\n '};e.default=s},366:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=n(249),a=(i=r)&&i.__esModule?i:{default:i};var o={mergeKeyWithParent:function(t,e){if(void 0===t[e])return t;if("object"!==s(t[e]))return t;var n=a.default.extend({},t,t[e]);return delete n[e],n},groupBy:function(t,e){var n={};return a.default.each(t,(function(t,i){if(void 0===i[e])throw new Error("[groupBy]: Object has no key "+e);var s=i[e];"string"==typeof s&&(s=s.toLowerCase()),Object.prototype.hasOwnProperty.call(n,s)||(n[s]=[]),n[s].push(i)})),n},values:function(t){return Object.keys(t).map((function(e){return t[e]}))},flatten:function(t){var e=[];return t.forEach((function(t){Array.isArray(t)?t.forEach((function(t){e.push(t)})):e.push(t)})),e},flattenAndFlagFirst:function(t,e){var n=this.values(t).map((function(t){return t.map((function(t,n){return t[e]=0===n,t}))}));return this.flatten(n)},compact:function(t){var e=[];return t.forEach((function(t){t&&e.push(t)})),e},getHighlightedValue:function(t,e){return t._highlightResult&&t._highlightResult.hierarchy_camel&&t._highlightResult.hierarchy_camel[e]&&t._highlightResult.hierarchy_camel[e].matchLevel&&"none"!==t._highlightResult.hierarchy_camel[e].matchLevel&&t._highlightResult.hierarchy_camel[e].value?t._highlightResult.hierarchy_camel[e].value:t._highlightResult&&t._highlightResult&&t._highlightResult[e]&&t._highlightResult[e].value?t._highlightResult[e].value:t[e]},getSnippetedValue:function(t,e){if(!t._snippetResult||!t._snippetResult[e]||!t._snippetResult[e].value)return t[e];var n=t._snippetResult[e].value;return n[0]!==n[0].toUpperCase()&&(n="\u2026"+n),-1===[".","!","?"].indexOf(n[n.length-1])&&(n+="\u2026"),n},deepClone:function(t){return JSON.parse(JSON.stringify(t))}};e.default=o},372:function(t,e,n){"use strict";var i,s=n(344),r=(i=s)&&i.__esModule?i:{default:i};t.exports=r.default}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[45],{188:function(t,e,n){"use strict";var i,s=n(191);function r(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}t.exports={isArray:null,isFunction:null,isObject:null,bind:null,each:null,map:null,mixin:null,isMsie:function(t){if(void 0===t&&(t=navigator.userAgent),/(msie|trident)/i.test(t)){var e=t.match(/(msie |rv:)(\d+(.\d+)?)/i);if(e)return e[2]}return!1},escapeRegExChars:function(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},isNumber:function(t){return"number"==typeof t},toStr:function(t){return null==t?"":t+""},cloneDeep:function(t){var e=this.mixin({},t),n=this;return this.each(e,(function(t,i){t&&(n.isArray(t)?e[i]=[].concat(t):n.isObject(t)&&(e[i]=n.cloneDeep(t)))})),e},error:function(t){throw new Error(t)},every:function(t,e){var n=!0;return t?(this.each(t,(function(i,s){n&&(n=e.call(null,i,s,t)&&n)})),!!n):n},any:function(t,e){var n=!1;return t?(this.each(t,(function(i,s){if(e.call(null,i,s,t))return n=!0,!1})),n):n},getUniqueId:(i=0,function(){return i++}),templatify:function(t){if(this.isFunction(t))return t;var e=s.element(t);return"SCRIPT"===e.prop("tagName")?function(){return e.text()}:function(){return String(t)}},defer:function(t){setTimeout(t,0)},noop:function(){},formatPrefix:function(t,e){return e?"":t+"-"},className:function(t,e,n){return(n?"":".")+t+e},escapeHighlightedString:function(t,e,n){e=e||"";var i=document.createElement("div");i.appendChild(document.createTextNode(e)),n=n||"";var s=document.createElement("div");s.appendChild(document.createTextNode(n));var a=document.createElement("div");return a.appendChild(document.createTextNode(t)),a.innerHTML.replace(RegExp(r(i.innerHTML),"g"),e).replace(RegExp(r(s.innerHTML),"g"),n)}}},191:function(t,e,n){"use strict";t.exports={element:null}},216:function(t,e,n){"use strict";var i=n(359),s=/\s+/;function r(t,e,n,i){var r;if(!n)return this;for(e=e.split(s),n=i?function(t,e){return t.bind?t.bind(e):function(){t.apply(e,[].slice.call(arguments,0))}}(n,i):n,this._callbacks=this._callbacks||{};r=e.shift();)this._callbacks[r]=this._callbacks[r]||{sync:[],async:[]},this._callbacks[r][t].push(n);return this}function a(t,e,n){return function(){for(var i,s=0,r=t.length;!i&&s]*>/,g=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,m=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,v=/^(?:body|html)$/i,y=/([A-Z])/g,b=["val","css","html","text","data","width","height","offset"],w=l.createElement("table"),x=l.createElement("tr"),C={tr:l.createElement("tbody"),tbody:w,thead:w,tfoot:w,td:x,th:x,"*":l.createElement("div")},_=/complete|loaded|interactive/,S=/^[\w-]*$/,E={},A=E.toString,k={},O=l.createElement("div"),T={tabindex:"tabIndex",readonly:"readOnly",for:"htmlFor",class:"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},$=Array.isArray||function(t){return t instanceof Array};function N(t){return null==t?String(t):E[A.call(t)]||"object"}function D(t){return"function"==N(t)}function L(t){return null!=t&&t==t.window}function P(t){return null!=t&&t.nodeType==t.DOCUMENT_NODE}function I(t){return"object"==N(t)}function R(t){return I(t)&&!L(t)&&Object.getPrototypeOf(t)==Object.prototype}function H(t){var e=!!t&&"length"in t&&t.length,i=n.type(t);return"function"!=i&&!L(t)&&("array"==i||0===e||"number"==typeof e&&e>0&&e-1 in t)}function M(t){return t.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()}function F(t){return t in p?p[t]:p[t]=new RegExp("(^|\\s)"+t+"(\\s|$)")}function V(t,e){return"number"!=typeof e||f[M(t)]?e:e+"px"}function q(t){return"children"in t?c.call(t.children):n.map(t.childNodes,(function(t){if(1==t.nodeType)return t}))}function B(t,e){var n,i=t?t.length:0;for(n=0;n")),void 0===e&&(e=d.test(t)&&RegExp.$1),e in C||(e="*"),(a=C[e]).innerHTML=""+t,s=n.each(c.call(a.childNodes),(function(){a.removeChild(this)}))),R(i)&&(r=n(s),n.each(i,(function(t,e){b.indexOf(t)>-1?r[t](e):r.attr(t,e)}))),s},k.Z=function(t,e){return new B(t,e)},k.isZ=function(t){return t instanceof k.Z},k.init=function(t,e){var i,s;if(!t)return k.Z();if("string"==typeof t)if("<"==(t=t.trim())[0]&&d.test(t))i=k.fragment(t,RegExp.$1,e),t=null;else{if(void 0!==e)return n(e).find(t);i=k.qsa(l,t)}else{if(D(t))return n(l).ready(t);if(k.isZ(t))return t;if($(t))s=t,i=u.call(s,(function(t){return null!=t}));else if(I(t))i=[t],t=null;else if(d.test(t))i=k.fragment(t.trim(),RegExp.$1,e),t=null;else{if(void 0!==e)return n(e).find(t);i=k.qsa(l,t)}}return k.Z(i,t)},(n=function(t,e){return k.init(t,e)}).extend=function(t){var e,n=c.call(arguments,1);return"boolean"==typeof t&&(e=t,t=n.shift()),n.forEach((function(n){j(t,n,e)})),t},k.qsa=function(t,e){var n,i="#"==e[0],s=!i&&"."==e[0],r=i||s?e.slice(1):e,a=S.test(r);return t.getElementById&&a&&i?(n=t.getElementById(r))?[n]:[]:1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType?[]:c.call(a&&!i&&t.getElementsByClassName?s?t.getElementsByClassName(r):t.getElementsByTagName(e):t.querySelectorAll(e))},n.contains=l.documentElement.contains?function(t,e){return t!==e&&t.contains(e)}:function(t,e){for(;e&&(e=e.parentNode);)if(e===t)return!0;return!1},n.type=N,n.isFunction=D,n.isWindow=L,n.isArray=$,n.isPlainObject=R,n.isEmptyObject=function(t){var e;for(e in t)return!1;return!0},n.isNumeric=function(t){var e=Number(t),n=typeof t;return null!=t&&"boolean"!=n&&("string"!=n||t.length)&&!isNaN(e)&&isFinite(e)||!1},n.inArray=function(t,e,n){return a.indexOf.call(e,t,n)},n.camelCase=s,n.trim=function(t){return null==t?"":String.prototype.trim.call(t)},n.uuid=0,n.support={},n.expr={},n.noop=function(){},n.map=function(t,e){var i,s,r,a,o=[];if(H(t))for(s=0;s0?n.fn.concat.apply([],a):a},n.each=function(t,e){var n,i;if(H(t)){for(n=0;n=0?t:t+this.length]},toArray:function(){return this.get()},size:function(){return this.length},remove:function(){return this.each((function(){null!=this.parentNode&&this.parentNode.removeChild(this)}))},each:function(t){return a.every.call(this,(function(e,n){return!1!==t.call(e,n,e)})),this},filter:function(t){return D(t)?this.not(this.not(t)):n(u.call(this,(function(e){return k.matches(e,t)})))},add:function(t,e){return n(r(this.concat(n(t,e))))},is:function(t){return this.length>0&&k.matches(this[0],t)},not:function(t){var e=[];if(D(t)&&void 0!==t.call)this.each((function(n){t.call(this,n)||e.push(this)}));else{var i="string"==typeof t?this.filter(t):H(t)&&D(t.item)?c.call(t):n(t);this.forEach((function(t){i.indexOf(t)<0&&e.push(t)}))}return n(e)},has:function(t){return this.filter((function(){return I(t)?n.contains(this,t):n(this).find(t).size()}))},eq:function(t){return-1===t?this.slice(t):this.slice(t,+t+1)},first:function(){var t=this[0];return t&&!I(t)?t:n(t)},last:function(){var t=this[this.length-1];return t&&!I(t)?t:n(t)},find:function(t){var e=this;return t?"object"==typeof t?n(t).filter((function(){var t=this;return a.some.call(e,(function(e){return n.contains(e,t)}))})):1==this.length?n(k.qsa(this[0],t)):this.map((function(){return k.qsa(this,t)})):n()},closest:function(t,e){var i=[],s="object"==typeof t&&n(t);return this.each((function(n,r){for(;r&&!(s?s.indexOf(r)>=0:k.matches(r,t));)r=r!==e&&!P(r)&&r.parentNode;r&&i.indexOf(r)<0&&i.push(r)})),n(i)},parents:function(t){for(var e=[],i=this;i.length>0;)i=n.map(i,(function(t){if((t=t.parentNode)&&!P(t)&&e.indexOf(t)<0)return e.push(t),t}));return K(e,t)},parent:function(t){return K(r(this.pluck("parentNode")),t)},children:function(t){return K(this.map((function(){return q(this)})),t)},contents:function(){return this.map((function(){return this.contentDocument||c.call(this.childNodes)}))},siblings:function(t){return K(this.map((function(t,e){return u.call(q(e.parentNode),(function(t){return t!==e}))})),t)},empty:function(){return this.each((function(){this.innerHTML=""}))},pluck:function(t){return n.map(this,(function(e){return e[t]}))},show:function(){return this.each((function(){var t,e,n;"none"==this.style.display&&(this.style.display=""),"none"==getComputedStyle(this,"").getPropertyValue("display")&&(this.style.display=(t=this.nodeName,h[t]||(e=l.createElement(t),l.body.appendChild(e),n=getComputedStyle(e,"").getPropertyValue("display"),e.parentNode.removeChild(e),"none"==n&&(n="block"),h[t]=n),h[t]))}))},replaceWith:function(t){return this.before(t).remove()},wrap:function(t){var e=D(t);if(this[0]&&!e)var i=n(t).get(0),s=i.parentNode||this.length>1;return this.each((function(r){n(this).wrapAll(e?t.call(this,r):s?i.cloneNode(!0):i)}))},wrapAll:function(t){if(this[0]){var e;for(n(this[0]).before(t=n(t));(e=t.children()).length;)t=e.first();n(t).append(this)}return this},wrapInner:function(t){var e=D(t);return this.each((function(i){var s=n(this),r=s.contents(),a=e?t.call(this,i):t;r.length?r.wrapAll(a):s.append(a)}))},unwrap:function(){return this.parent().each((function(){n(this).replaceWith(n(this).children())})),this},clone:function(){return this.map((function(){return this.cloneNode(!0)}))},hide:function(){return this.css("display","none")},toggle:function(t){return this.each((function(){var e=n(this);(void 0===t?"none"==e.css("display"):t)?e.show():e.hide()}))},prev:function(t){return n(this.pluck("previousElementSibling")).filter(t||"*")},next:function(t){return n(this.pluck("nextElementSibling")).filter(t||"*")},html:function(t){return 0 in arguments?this.each((function(e){var i=this.innerHTML;n(this).empty().append(z(this,t,e,i))})):0 in this?this[0].innerHTML:null},text:function(t){return 0 in arguments?this.each((function(e){var n=z(this,t,e,this.textContent);this.textContent=null==n?"":""+n})):0 in this?this.pluck("textContent").join(""):null},attr:function(t,n){var i;return"string"!=typeof t||1 in arguments?this.each((function(i){if(1===this.nodeType)if(I(t))for(e in t)U(this,e,t[e]);else U(this,t,z(this,n,i,this.getAttribute(t)))})):0 in this&&1==this[0].nodeType&&null!=(i=this[0].getAttribute(t))?i:void 0},removeAttr:function(t){return this.each((function(){1===this.nodeType&&t.split(" ").forEach((function(t){U(this,t)}),this)}))},prop:function(t,e){return t=T[t]||t,1 in arguments?this.each((function(n){this[t]=z(this,e,n,this[t])})):this[0]&&this[0][t]},removeProp:function(t){return t=T[t]||t,this.each((function(){delete this[t]}))},data:function(t,e){var n="data-"+t.replace(y,"-$1").toLowerCase(),i=1 in arguments?this.attr(n,e):this.attr(n);return null!==i?Q(i):void 0},val:function(t){return 0 in arguments?(null==t&&(t=""),this.each((function(e){this.value=z(this,t,e,this.value)}))):this[0]&&(this[0].multiple?n(this[0]).find("option").filter((function(){return this.selected})).pluck("value"):this[0].value)},offset:function(e){if(e)return this.each((function(t){var i=n(this),s=z(this,e,t,i.offset()),r=i.offsetParent().offset(),a={top:s.top-r.top,left:s.left-r.left};"static"==i.css("position")&&(a.position="relative"),i.css(a)}));if(!this.length)return null;if(l.documentElement!==this[0]&&!n.contains(l.documentElement,this[0]))return{top:0,left:0};var i=this[0].getBoundingClientRect();return{left:i.left+t.pageXOffset,top:i.top+t.pageYOffset,width:Math.round(i.width),height:Math.round(i.height)}},css:function(t,i){if(arguments.length<2){var r=this[0];if("string"==typeof t){if(!r)return;return r.style[s(t)]||getComputedStyle(r,"").getPropertyValue(t)}if($(t)){if(!r)return;var a={},o=getComputedStyle(r,"");return n.each(t,(function(t,e){a[e]=r.style[s(e)]||o.getPropertyValue(e)})),a}}var u="";if("string"==N(t))i||0===i?u=M(t)+":"+V(t,i):this.each((function(){this.style.removeProperty(M(t))}));else for(e in t)t[e]||0===t[e]?u+=M(e)+":"+V(e,t[e])+";":this.each((function(){this.style.removeProperty(M(e))}));return this.each((function(){this.style.cssText+=";"+u}))},index:function(t){return t?this.indexOf(n(t)[0]):this.parent().children().indexOf(this[0])},hasClass:function(t){return!!t&&a.some.call(this,(function(t){return this.test(W(t))}),F(t))},addClass:function(t){return t?this.each((function(e){if("className"in this){i=[];var s=W(this);z(this,t,e,s).split(/\s+/g).forEach((function(t){n(this).hasClass(t)||i.push(t)}),this),i.length&&W(this,s+(s?" ":"")+i.join(" "))}})):this},removeClass:function(t){return this.each((function(e){if("className"in this){if(void 0===t)return W(this,"");i=W(this),z(this,t,e,i).split(/\s+/g).forEach((function(t){i=i.replace(F(t)," ")})),W(this,i.trim())}}))},toggleClass:function(t,e){return t?this.each((function(i){var s=n(this);z(this,t,i,W(this)).split(/\s+/g).forEach((function(t){(void 0===e?!s.hasClass(t):e)?s.addClass(t):s.removeClass(t)}))})):this},scrollTop:function(t){if(this.length){var e="scrollTop"in this[0];return void 0===t?e?this[0].scrollTop:this[0].pageYOffset:this.each(e?function(){this.scrollTop=t}:function(){this.scrollTo(this.scrollX,t)})}},scrollLeft:function(t){if(this.length){var e="scrollLeft"in this[0];return void 0===t?e?this[0].scrollLeft:this[0].pageXOffset:this.each(e?function(){this.scrollLeft=t}:function(){this.scrollTo(t,this.scrollY)})}},position:function(){if(this.length){var t=this[0],e=this.offsetParent(),i=this.offset(),s=v.test(e[0].nodeName)?{top:0,left:0}:e.offset();return i.top-=parseFloat(n(t).css("margin-top"))||0,i.left-=parseFloat(n(t).css("margin-left"))||0,s.top+=parseFloat(n(e[0]).css("border-top-width"))||0,s.left+=parseFloat(n(e[0]).css("border-left-width"))||0,{top:i.top-s.top,left:i.left-s.left}}},offsetParent:function(){return this.map((function(){for(var t=this.offsetParent||l.body;t&&!v.test(t.nodeName)&&"static"==n(t).css("position");)t=t.offsetParent;return t}))}},n.fn.detach=n.fn.remove,["width","height"].forEach((function(t){var e=t.replace(/./,(function(t){return t[0].toUpperCase()}));n.fn[t]=function(i){var s,r=this[0];return void 0===i?L(r)?r["inner"+e]:P(r)?r.documentElement["scroll"+e]:(s=this.offset())&&s[t]:this.each((function(e){(r=n(this)).css(t,z(this,i,e,r[t]()))}))}})),["after","prepend","before","append"].forEach((function(e,i){var s=i%2;n.fn[e]=function(){var e,r,a=n.map(arguments,(function(t){var i=[];return"array"==(e=N(t))?(t.forEach((function(t){return void 0!==t.nodeType?i.push(t):n.zepto.isZ(t)?i=i.concat(t.get()):void(i=i.concat(k.fragment(t)))})),i):"object"==e||null==t?t:k.fragment(t)})),o=this.length>1;return a.length<1?this:this.each((function(e,u){r=s?u:u.parentNode,u=0==i?u.nextSibling:1==i?u.firstChild:2==i?u:null;var c=n.contains(l.documentElement,r);a.forEach((function(e){if(o)e=e.cloneNode(!0);else if(!r)return n(e).remove();r.insertBefore(e,u),c&&Z(e,(function(e){if(!(null==e.nodeName||"SCRIPT"!==e.nodeName.toUpperCase()||e.type&&"text/javascript"!==e.type||e.src)){var n=e.ownerDocument?e.ownerDocument.defaultView:t;n.eval.call(n,e.innerHTML)}}))}))}))},n.fn[s?e+"To":"insert"+(i?"Before":"After")]=function(t){return n(t)[e](this),this}})),k.Z.prototype=B.prototype=n.fn,k.uniq=r,k.deserializeValue=Q,n.zepto=k,n}();return function(e){var n=1,i=Array.prototype.slice,s=e.isFunction,r=function(t){return"string"==typeof t},a={},o={},u="onfocusin"in t,c={focus:"focusin",blur:"focusout"},l={mouseenter:"mouseover",mouseleave:"mouseout"};function h(t){return t._zid||(t._zid=n++)}function p(t,e,n,i){if((e=f(e)).ns)var s=(r=e.ns,new RegExp("(?:^| )"+r.replace(" "," .* ?")+"(?: |$)"));var r;return(a[h(t)]||[]).filter((function(t){return t&&(!e.e||t.e==e.e)&&(!e.ns||s.test(t.ns))&&(!n||h(t.fn)===h(n))&&(!i||t.sel==i)}))}function f(t){var e=(""+t).split(".");return{e:e[0],ns:e.slice(1).sort().join(" ")}}function d(t,e){return t.del&&!u&&t.e in c||!!e}function g(t){return l[t]||u&&c[t]||t}function m(t,n,i,s,r,o,u){var c=h(t),p=a[c]||(a[c]=[]);n.split(/\s/).forEach((function(n){if("ready"==n)return e(document).ready(i);var a=f(n);a.fn=i,a.sel=r,a.e in l&&(i=function(t){var n=t.relatedTarget;if(!n||n!==this&&!e.contains(this,n))return a.fn.apply(this,arguments)}),a.del=o;var c=o||i;a.proxy=function(e){if(!(e=C(e)).isImmediatePropagationStopped()){try{var n=Object.getOwnPropertyDescriptor(e,"data");n&&!n.writable||(e.data=s)}catch(e){}var i=c.apply(t,null==e._args?[e]:[e].concat(e._args));return!1===i&&(e.preventDefault(),e.stopPropagation()),i}},a.i=p.length,p.push(a),"addEventListener"in t&&t.addEventListener(g(a.e),a.proxy,d(a,u))}))}function v(t,e,n,i,s){var r=h(t);(e||"").split(/\s/).forEach((function(e){p(t,e,n,i).forEach((function(e){delete a[r][e.i],"removeEventListener"in t&&t.removeEventListener(g(e.e),e.proxy,d(e,s))}))}))}o.click=o.mousedown=o.mouseup=o.mousemove="MouseEvents",e.event={add:m,remove:v},e.proxy=function(t,n){var a=2 in arguments&&i.call(arguments,2);if(s(t)){var o=function(){return t.apply(n,a?a.concat(i.call(arguments)):arguments)};return o._zid=h(t),o}if(r(n))return a?(a.unshift(t[n],t),e.proxy.apply(null,a)):e.proxy(t[n],t);throw new TypeError("expected function")},e.fn.bind=function(t,e,n){return this.on(t,e,n)},e.fn.unbind=function(t,e){return this.off(t,e)},e.fn.one=function(t,e,n,i){return this.on(t,e,n,i,1)};var y=function(){return!0},b=function(){return!1},w=/^([A-Z]|returnValue$|layer[XY]$|webkitMovement[XY]$)/,x={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};function C(t,n){return!n&&t.isDefaultPrevented||(n||(n=t),e.each(x,(function(e,i){var s=n[e];t[e]=function(){return this[i]=y,s&&s.apply(n,arguments)},t[i]=b})),t.timeStamp||(t.timeStamp=Date.now()),(void 0!==n.defaultPrevented?n.defaultPrevented:"returnValue"in n?!1===n.returnValue:n.getPreventDefault&&n.getPreventDefault())&&(t.isDefaultPrevented=y)),t}function _(t){var e,n={originalEvent:t};for(e in t)w.test(e)||void 0===t[e]||(n[e]=t[e]);return C(n,t)}e.fn.delegate=function(t,e,n){return this.on(e,t,n)},e.fn.undelegate=function(t,e,n){return this.off(e,t,n)},e.fn.live=function(t,n){return e(document.body).delegate(this.selector,t,n),this},e.fn.die=function(t,n){return e(document.body).undelegate(this.selector,t,n),this},e.fn.on=function(t,n,a,o,u){var c,l,h=this;return t&&!r(t)?(e.each(t,(function(t,e){h.on(t,n,a,e,u)})),h):(r(n)||s(o)||!1===o||(o=a,a=n,n=void 0),void 0!==o&&!1!==a||(o=a,a=void 0),!1===o&&(o=b),h.each((function(s,r){u&&(c=function(t){return v(r,t.type,o),o.apply(this,arguments)}),n&&(l=function(t){var s,a=e(t.target).closest(n,r).get(0);if(a&&a!==r)return s=e.extend(_(t),{currentTarget:a,liveFired:r}),(c||o).apply(a,[s].concat(i.call(arguments,1)))}),m(r,t,o,a,n,l||c)})))},e.fn.off=function(t,n,i){var a=this;return t&&!r(t)?(e.each(t,(function(t,e){a.off(t,n,e)})),a):(r(n)||s(i)||!1===i||(i=n,n=void 0),!1===i&&(i=b),a.each((function(){v(this,t,i,n)})))},e.fn.trigger=function(t,n){return(t=r(t)||e.isPlainObject(t)?e.Event(t):C(t))._args=n,this.each((function(){t.type in c&&"function"==typeof this[t.type]?this[t.type]():"dispatchEvent"in this?this.dispatchEvent(t):e(this).triggerHandler(t,n)}))},e.fn.triggerHandler=function(t,n){var i,s;return this.each((function(a,o){(i=_(r(t)?e.Event(t):t))._args=n,i.target=o,e.each(p(o,t.type||t),(function(t,e){if(s=e.proxy(i),i.isImmediatePropagationStopped())return!1}))})),s},"focusin focusout focus blur load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach((function(t){e.fn[t]=function(e){return 0 in arguments?this.bind(t,e):this.trigger(t)}})),e.Event=function(t,e){r(t)||(t=(e=t).type);var n=document.createEvent(o[t]||"Events"),i=!0;if(e)for(var s in e)"bubbles"==s?i=!!e[s]:n[s]=e[s];return n.initEvent(t,i,!0),C(n)}}(i),n=[],i.fn.remove=function(){return this.each((function(){this.parentNode&&("IMG"===this.tagName&&(n.push(this),this.src="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=",e&&clearTimeout(e),e=setTimeout((function(){n=[]}),6e4)),this.parentNode.removeChild(this))}))},function(t){var e={},n=t.fn.data,i=t.camelCase,s=t.expando="Zepto"+ +new Date,r=[];function a(n,a,o){var u=n[s]||(n[s]=++t.uuid),c=e[u]||(e[u]=function(e){var n={};return t.each(e.attributes||r,(function(e,s){0==s.name.indexOf("data-")&&(n[i(s.name.replace("data-",""))]=t.zepto.deserializeValue(s.value))})),n}(n));return void 0!==a&&(c[i(a)]=o),c}t.fn.data=function(r,o){return void 0===o?t.isPlainObject(r)?this.each((function(e,n){t.each(r,(function(t,e){a(n,t,e)}))})):0 in this?function(r,o){var u=r[s],c=u&&e[u];if(void 0===o)return c||a(r);if(c){if(o in c)return c[o];var l=i(o);if(l in c)return c[l]}return n.call(t(r),o)}(this[0],r):void 0:this.each((function(){a(this,r,o)}))},t.data=function(e,n,i){return t(e).data(n,i)},t.hasData=function(n){var i=n[s],r=i&&e[i];return!!r&&!t.isEmptyObject(r)},t.fn.removeData=function(n){return"string"==typeof n&&(n=n.split(/\s+/)),this.each((function(){var r=this[s],a=r&&e[r];a&&t.each(n||a,(function(t){delete a[n?i(this):t]}))}))},["remove","empty"].forEach((function(e){var n=t.fn[e];t.fn[e]=function(){var t=this.find("*");return"remove"===e&&(t=t.add(this)),t.removeData(),n.call(this)}}))}(i),i}(n)},250:function(t,e,n){"use strict";var i=n(188),s=n(191);function r(t){t&&t.el||i.error("EventBus initialized without el"),this.$el=s.element(t.el)}i.mixin(r.prototype,{trigger:function(t,e,n,s){var r=i.Event("autocomplete:"+t);return this.$el.trigger(r,[e,n,s]),r}}),t.exports=r},251:function(t,e,n){"use strict";t.exports={wrapper:'',dropdown:'',dataset:'
',suggestions:'',suggestion:'
'}},252:function(t,e){t.exports="0.36.0"},253:function(t,e,n){"use strict";t.exports=function(t){var e=t.match(/Algolia for vanilla JavaScript (\d+\.)(\d+\.)(\d+)/);if(e)return[e[1],e[2],e[3]]}},254:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,s=n(249),r=(i=s)&&i.__esModule?i:{default:i};e.default=r.default},255:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default="2.6.3"},349:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=a(n(350)),s=a(n(351)),r=a(n(255));function a(t){return t&&t.__esModule?t:{default:t}}var o=(0,i.default)(s.default);o.version=r.default,e.default=o},350:function(t,e,n){"use strict";var i=Function.prototype.bind;t.exports=function(t){var e=function(){for(var e=arguments.length,n=Array(e),s=0;s4&&void 0!==arguments[4]?arguments[4]:{};"click"!==s.selectionMethod&&(t.setVal(""),window.location.assign(n.url))}},{key:"handleShown",value:function(t){var e=t.offset().left+t.width()/2,n=(0,h.default)(document).width()/2;isNaN(n)&&(n=900);var i=e-n>=0?"algolia-autocomplete-right":"algolia-autocomplete-left",s=e-n<0?"algolia-autocomplete-right":"algolia-autocomplete-left",r=(0,h.default)(".algolia-autocomplete");r.hasClass(i)||r.addClass(i),r.hasClass(s)&&r.removeClass(s)}}],[{key:"checkArguments",value:function(e){if(!e.apiKey||!e.indexName)throw new Error("Usage:\n documentationSearch({\n apiKey,\n indexName,\n inputSelector,\n [ appId ],\n [ algoliaOptions.{hitsPerPage} ]\n [ autocompleteOptions.{hint,debug} ]\n})");if("string"!=typeof e.inputSelector)throw new Error("Error: inputSelector:"+e.inputSelector+" must be a string. Each selector must match only one element and separated by ','");if(!t.getInputFromSelector(e.inputSelector))throw new Error("Error: No input element in the page matches "+e.inputSelector)}},{key:"injectSearchBox",value:function(t){t.before(u.default.searchBox);var e=t.prev().prev().find("input");return t.remove(),e}},{key:"bindSearchBoxEvent",value:function(){(0,h.default)('.searchbox [type="reset"]').on("click",(function(){(0,h.default)("input#docsearch").focus(),(0,h.default)(this).addClass("hide"),o.default.autocomplete.setVal("")})),(0,h.default)("input#docsearch").on("keyup",(function(){var t=document.querySelector("input#docsearch"),e=document.querySelector('.searchbox [type="reset"]');e.className="searchbox__reset",0===t.value.length&&(e.className+=" hide")}))}},{key:"getInputFromSelector",value:function(t){var e=(0,h.default)(t).filter("input");return e.length?(0,h.default)(e[0]):null}},{key:"formatHits",value:function(e){var n=c.default.deepClone(e).map((function(t){return t._highlightResult&&(t._highlightResult=c.default.mergeKeyWithParent(t._highlightResult,"hierarchy")),c.default.mergeKeyWithParent(t,"hierarchy")})),i=c.default.groupBy(n,"lvl0");return h.default.each(i,(function(t,e){var n=c.default.groupBy(e,"lvl1"),s=c.default.flattenAndFlagFirst(n,"isSubCategoryHeader");i[t]=s})),(i=c.default.flattenAndFlagFirst(i,"isCategoryHeader")).map((function(e){var n=t.formatURL(e),i=c.default.getHighlightedValue(e,"lvl0"),s=c.default.getHighlightedValue(e,"lvl1")||i,r=c.default.compact([c.default.getHighlightedValue(e,"lvl2")||s,c.default.getHighlightedValue(e,"lvl3"),c.default.getHighlightedValue(e,"lvl4"),c.default.getHighlightedValue(e,"lvl5"),c.default.getHighlightedValue(e,"lvl6")]).join(''),a=c.default.getSnippetedValue(e,"content"),o=s&&""!==s||r&&""!==r,u=r&&""!==r&&r!==s,l=!u&&s&&""!==s&&s!==i;return{isLvl0:!l&&!u,isLvl1:l,isLvl2:u,isLvl1EmptyOrDuplicate:!s||""===s||s===i,isCategoryHeader:e.isCategoryHeader,isSubCategoryHeader:e.isSubCategoryHeader,isTextOrSubcategoryNonEmpty:o,category:i,subcategory:s,title:r,text:a,url:n}}))}},{key:"formatURL",value:function(t){var e=t.url,n=t.anchor;return e?-1!==e.indexOf("#")?e:n?t.url+"#"+t.anchor:e:n?"#"+t.anchor:(console.warn("no anchor nor url for : ",JSON.stringify(t)),null)}},{key:"getEmptyTemplate",value:function(){return function(t){return r.default.compile(u.default.empty).render(t)}}},{key:"getSuggestionTemplate",value:function(t){var e=t?u.default.suggestionSimple:u.default.suggestion,n=r.default.compile(e);return function(t){return n.render(t)}}}]),t}();e.default=f},352:function(t,e,n){var i=n(353);i.Template=n(354).Template,i.template=i.Template,t.exports=i},353:function(t,e,n){!function(t){var e=/\S/,n=/\"/g,i=/\n/g,s=/\r/g,r=/\\/g,a=/\u2028/,o=/\u2029/;function u(t){"}"===t.n.substr(t.n.length-1)&&(t.n=t.n.substring(0,t.n.length-1))}function c(t){return t.trim?t.trim():t.replace(/^\s*|\s*$/g,"")}function l(t,e,n){if(e.charAt(n)!=t.charAt(0))return!1;for(var i=1,s=t.length;i":7,"=":8,_v:9,"{":10,"&":11,_t:12},t.scan=function(n,i){var s=n.length,r=0,a=null,o=null,h="",p=[],f=!1,d=0,g=0,m="{{",v="}}";function y(){h.length>0&&(p.push({tag:"_t",text:new String(h)}),h="")}function b(n,i){if(y(),n&&function(){for(var n=!0,i=g;i"==s.tag&&(s.indent=p[r].text.toString()),p.splice(r,1));else i||p.push({tag:"\n"});f=!1,g=p.length}function w(t,e){var n="="+v,i=t.indexOf(n,e),s=c(t.substring(t.indexOf("=",e)+1,i)).split(" ");return m=s[0],v=s[s.length-1],i+n.length-1}for(i&&(i=i.split(" "),m=i[0],v=i[1]),d=0;d":y,"<":function(e,n){var i={partials:{},code:"",subs:{},inPartial:!0};t.walk(e.nodes,i);var s=n.partials[y(e,n)];s.subs=i.subs,s.partials=i.partials},$:function(e,n){var i={subs:{},code:"",partials:n.partials,prefix:e.n};t.walk(e.nodes,i),n.subs[e.n]=i.code,n.inPartial||(n.code+='t.sub("'+m(e.n)+'",c,p,i);')},"\n":function(t,e){e.code+=w('"\\n"'+(t.last?"":" + i"))},_v:function(t,e){e.code+="t.b(t.v(t."+v(t.n)+'("'+m(t.n)+'",c,p,0)));'},_t:function(t,e){e.code+=w('"'+m(t.text)+'"')},"{":b,"&":b},t.walk=function(e,n){for(var i,s=0,r=e.length;s0;){if(c=n.shift(),a&&"<"==a.tag&&!(c.tag in h))throw new Error("Illegal content in < super tag.");if(t.tags[c.tag]<=t.tags.$||p(c,r))s.push(c),c.nodes=e(n,c.tag,s,r);else{if("/"==c.tag){if(0===s.length)throw new Error("Closing tag without opener: /"+c.n);if(u=s.pop(),c.n!=u.n&&!f(c.n,u.n,r))throw new Error("Nesting error: "+u.n+" vs. "+c.n);return u.end=c.i,o}"\n"==c.tag&&(c.last=0==n.length||"\n"==n[0].tag)}o.push(c)}if(s.length>0)throw new Error("missing closing tag: "+s.pop().n);return o}(e,0,[],(i=i||{}).sectionTags||[])},t.cache={},t.cacheKey=function(t,e){return[t,!!e.asString,!!e.disableLambda,e.delimiters,!!e.modelGet].join("||")},t.compile=function(e,n){n=n||{};var i=t.cacheKey(e,n),s=this.cache[i];if(s){var r=s.partials;for(var a in r)delete r[a].instance;return s}return s=this.generate(this.parse(this.scan(e,n.delimiters),e,n),e,n),this.cache[i]=s}}(e)},354:function(t,e,n){!function(t){function e(t,e,n){var i;return e&&"object"==typeof e&&(void 0!==e[t]?i=e[t]:n&&e.get&&"function"==typeof e.get&&(i=e.get(t))),i}t.Template=function(t,e,n,i){t=t||{},this.r=t.code||this.r,this.c=n,this.options=i||{},this.text=e||"",this.partials=t.partials||{},this.subs=t.subs||{},this.buf=""},t.Template.prototype={r:function(t,e,n){return""},v:function(t){return t=u(t),o.test(t)?t.replace(n,"&").replace(i,"<").replace(s,">").replace(r,"'").replace(a,"""):t},t:u,render:function(t,e,n){return this.ri([t],e||{},n)},ri:function(t,e,n){return this.r(t,e,n)},ep:function(t,e){var n=this.partials[t],i=e[n.name];if(n.instance&&n.base==i)return n.instance;if("string"==typeof i){if(!this.c)throw new Error("No compiler available.");i=this.c.compile(i,this.options)}if(!i)return null;if(this.partials[t].base=i,n.subs){for(key in e.stackText||(e.stackText={}),n.subs)e.stackText[key]||(e.stackText[key]=void 0!==this.activeSub&&e.stackText[this.activeSub]?e.stackText[this.activeSub]:this.text);i=function(t,e,n,i,s,r){function a(){}function o(){}var u;a.prototype=t,o.prototype=t.subs;var c=new a;for(u in c.subs=new o,c.subsText={},c.buf="",i=i||{},c.stackSubs=i,c.subsText=r,e)i[u]||(i[u]=e[u]);for(u in i)c.subs[u]=i[u];for(u in s=s||{},c.stackPartials=s,n)s[u]||(s[u]=n[u]);for(u in s)c.partials[u]=s[u];return c}(i,n.subs,n.partials,this.stackSubs,this.stackPartials,e.stackText)}return this.partials[t].instance=i,i},rp:function(t,e,n,i){var s=this.ep(t,n);return s?s.ri(e,n,i):""},rs:function(t,e,n){var i=t[t.length-1];if(c(i))for(var s=0;s=0;u--)if(void 0!==(r=e(t,n[u],o))){a=!0;break}return a?(s||"function"!=typeof r||(r=this.mv(r,n,i)),r):!s&&""},ls:function(t,e,n,i,s){var r=this.options.delimiters;return this.options.delimiters=s,this.b(this.ct(u(t.call(e,i)),e,n)),this.options.delimiters=r,!1},ct:function(t,e,n){if(this.options.disableLambda)throw new Error("Lambda features disabled.");return this.c.compile(t,this.options).render(e,n)},b:function(t){this.buf+=t},fl:function(){var t=this.buf;return this.buf="",t},ms:function(t,e,n,i,s,r,a){var o,u=e[e.length-1],c=t.call(u);return"function"==typeof c?!!i||(o=this.activeSub&&this.subsText&&this.subsText[this.activeSub]?this.subsText[this.activeSub]:this.text,this.ls(c,u,n,o.substring(s,r),a)):c},mv:function(t,e,n){var i=e[e.length-1],s=t.call(i);return"function"==typeof s?this.ct(u(s.call(i)),i,n):s},sub:function(t,e,n,i){var s=this.subs[t];s&&(this.activeSub=t,s(e,n,this,i),this.activeSub=!1)}};var n=/&/g,i=//g,r=/\'/g,a=/\"/g,o=/[&<>\"\']/;function u(t){return String(null==t?"":t)}var c=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}}(e)},355:function(t,e,n){"use strict";t.exports=n(356)},356:function(t,e,n){"use strict";var i=n(249);n(191).element=i;var s=n(188);s.isArray=i.isArray,s.isFunction=i.isFunction,s.isObject=i.isPlainObject,s.bind=i.proxy,s.each=function(t,e){i.each(t,(function(t,n){return e(n,t)}))},s.map=i.map,s.mixin=i.extend,s.Event=i.Event;var r=n(357),a=n(250);function o(t,e,n,o){n=s.isArray(n)?n:[].slice.call(arguments,2);var u=i(t).each((function(t,s){var u=i(s),c=new a({el:u}),l=o||new r({input:u,eventBus:c,dropdownMenuContainer:e.dropdownMenuContainer,hint:void 0===e.hint||!!e.hint,minLength:e.minLength,autoselect:e.autoselect,autoselectOnBlur:e.autoselectOnBlur,tabAutocomplete:e.tabAutocomplete,openOnFocus:e.openOnFocus,templates:e.templates,debug:e.debug,clearOnSelected:e.clearOnSelected,cssClasses:e.cssClasses,datasets:n,keyboardShortcuts:e.keyboardShortcuts,appendTo:e.appendTo,autoWidth:e.autoWidth,ariaLabel:e.ariaLabel||s.getAttribute("aria-label")});u.data("aaAutocomplete",l)}));return u.autocomplete={},s.each(["open","close","getVal","setVal","destroy","getWrapper"],(function(t){u.autocomplete[t]=function(){var e,n=arguments;return u.each((function(s,r){var a=i(r).data("aaAutocomplete");e=a[t].apply(a,n)})),e}})),u}o.sources=r.sources,o.escapeHighlightedString=s.escapeHighlightedString;var u="autocomplete"in window,c=window.autocomplete;o.noConflict=function(){return u?window.autocomplete=c:delete window.autocomplete,o},t.exports=o},357:function(t,e,n){"use strict";var i=n(188),s=n(191),r=n(250),a=n(358),o=n(365),u=n(251),c=n(217);function l(t){var e,n;if((t=t||{}).input||i.error("missing input"),this.isActivated=!1,this.debug=!!t.debug,this.autoselect=!!t.autoselect,this.autoselectOnBlur=!!t.autoselectOnBlur,this.openOnFocus=!!t.openOnFocus,this.minLength=i.isNumber(t.minLength)?t.minLength:1,this.autoWidth=void 0===t.autoWidth||!!t.autoWidth,this.clearOnSelected=!!t.clearOnSelected,this.tabAutocomplete=void 0===t.tabAutocomplete||!!t.tabAutocomplete,t.hint=!!t.hint,t.hint&&t.appendTo)throw new Error("[autocomplete.js] hint and appendTo options can't be used at the same time");this.css=t.css=i.mixin({},c,t.appendTo?c.appendTo:{}),this.cssClasses=t.cssClasses=i.mixin({},c.defaultClasses,t.cssClasses||{}),this.cssClasses.prefix=t.cssClasses.formattedPrefix=i.formatPrefix(this.cssClasses.prefix,this.cssClasses.noPrefix),this.listboxId=t.listboxId=[this.cssClasses.root,"listbox",i.getUniqueId()].join("-");var a=function(t){var e,n,r,a;e=s.element(t.input),n=s.element(u.wrapper.replace("%ROOT%",t.cssClasses.root)).css(t.css.wrapper),t.appendTo||"block"!==e.css("display")||"table"!==e.parent().css("display")||n.css("display","table-cell");var o=u.dropdown.replace("%PREFIX%",t.cssClasses.prefix).replace("%DROPDOWN_MENU%",t.cssClasses.dropdownMenu);r=s.element(o).css(t.css.dropdown).attr({role:"listbox",id:t.listboxId}),t.templates&&t.templates.dropdownMenu&&r.html(i.templatify(t.templates.dropdownMenu)());(a=e.clone().css(t.css.hint).css(function(t){return{backgroundAttachment:t.css("background-attachment"),backgroundClip:t.css("background-clip"),backgroundColor:t.css("background-color"),backgroundImage:t.css("background-image"),backgroundOrigin:t.css("background-origin"),backgroundPosition:t.css("background-position"),backgroundRepeat:t.css("background-repeat"),backgroundSize:t.css("background-size")}}(e))).val("").addClass(i.className(t.cssClasses.prefix,t.cssClasses.hint,!0)).removeAttr("id name placeholder required").prop("readonly",!0).attr({"aria-hidden":"true",autocomplete:"off",spellcheck:"false",tabindex:-1}),a.removeData&&a.removeData();e.data("aaAttrs",{"aria-autocomplete":e.attr("aria-autocomplete"),"aria-expanded":e.attr("aria-expanded"),"aria-owns":e.attr("aria-owns"),autocomplete:e.attr("autocomplete"),dir:e.attr("dir"),role:e.attr("role"),spellcheck:e.attr("spellcheck"),style:e.attr("style"),type:e.attr("type")}),e.addClass(i.className(t.cssClasses.prefix,t.cssClasses.input,!0)).attr({autocomplete:"off",spellcheck:!1,role:"combobox","aria-autocomplete":t.datasets&&t.datasets[0]&&t.datasets[0].displayKey?"both":"list","aria-expanded":"false","aria-label":t.ariaLabel,"aria-owns":t.listboxId}).css(t.hint?t.css.input:t.css.inputWithNoHint);try{e.attr("dir")||e.attr("dir","auto")}catch(c){}return(n=t.appendTo?n.appendTo(s.element(t.appendTo).eq(0)).eq(0):e.wrap(n).parent()).prepend(t.hint?a:null).append(r),{wrapper:n,input:e,hint:a,menu:r}}(t);this.$node=a.wrapper;var o=this.$input=a.input;e=a.menu,n=a.hint,t.dropdownMenuContainer&&s.element(t.dropdownMenuContainer).css("position","relative").append(e.css("top","0")),o.on("blur.aa",(function(t){var n=document.activeElement;i.isMsie()&&(e[0]===n||e[0].contains(n))&&(t.preventDefault(),t.stopImmediatePropagation(),i.defer((function(){o.focus()})))})),e.on("mousedown.aa",(function(t){t.preventDefault()})),this.eventBus=t.eventBus||new r({el:o}),this.dropdown=new l.Dropdown({appendTo:t.appendTo,wrapper:this.$node,menu:e,datasets:t.datasets,templates:t.templates,cssClasses:t.cssClasses,minLength:this.minLength}).onSync("suggestionClicked",this._onSuggestionClicked,this).onSync("cursorMoved",this._onCursorMoved,this).onSync("cursorRemoved",this._onCursorRemoved,this).onSync("opened",this._onOpened,this).onSync("closed",this._onClosed,this).onSync("shown",this._onShown,this).onSync("empty",this._onEmpty,this).onSync("redrawn",this._onRedrawn,this).onAsync("datasetRendered",this._onDatasetRendered,this),this.input=new l.Input({input:o,hint:n}).onSync("focused",this._onFocused,this).onSync("blurred",this._onBlurred,this).onSync("enterKeyed",this._onEnterKeyed,this).onSync("tabKeyed",this._onTabKeyed,this).onSync("escKeyed",this._onEscKeyed,this).onSync("upKeyed",this._onUpKeyed,this).onSync("downKeyed",this._onDownKeyed,this).onSync("leftKeyed",this._onLeftKeyed,this).onSync("rightKeyed",this._onRightKeyed,this).onSync("queryChanged",this._onQueryChanged,this).onSync("whitespaceChanged",this._onWhitespaceChanged,this),this._bindKeyboardShortcuts(t),this._setLanguageDirection()}i.mixin(l.prototype,{_bindKeyboardShortcuts:function(t){if(t.keyboardShortcuts){var e=this.$input,n=[];i.each(t.keyboardShortcuts,(function(t){"string"==typeof t&&(t=t.toUpperCase().charCodeAt(0)),n.push(t)})),s.element(document).keydown((function(t){var i=t.target||t.srcElement,s=i.tagName;if(!i.isContentEditable&&"INPUT"!==s&&"SELECT"!==s&&"TEXTAREA"!==s){var r=t.which||t.keyCode;-1!==n.indexOf(r)&&(e.focus(),t.stopPropagation(),t.preventDefault())}}))}},_onSuggestionClicked:function(t,e){var n;(n=this.dropdown.getDatumForSuggestion(e))&&this._select(n,{selectionMethod:"click"})},_onCursorMoved:function(t,e){var n=this.dropdown.getDatumForCursor(),i=this.dropdown.getCurrentCursor().attr("id");this.input.setActiveDescendant(i),n&&(e&&this.input.setInputValue(n.value,!0),this.eventBus.trigger("cursorchanged",n.raw,n.datasetName))},_onCursorRemoved:function(){this.input.resetInputValue(),this._updateHint(),this.eventBus.trigger("cursorremoved")},_onDatasetRendered:function(){this._updateHint(),this.eventBus.trigger("updated")},_onOpened:function(){this._updateHint(),this.input.expand(),this.eventBus.trigger("opened")},_onEmpty:function(){this.eventBus.trigger("empty")},_onRedrawn:function(){this.$node.css("top","0px"),this.$node.css("left","0px");var t=this.$input[0].getBoundingClientRect();this.autoWidth&&this.$node.css("width",t.width+"px");var e=this.$node[0].getBoundingClientRect(),n=t.bottom-e.top;this.$node.css("top",n+"px");var i=t.left-e.left;this.$node.css("left",i+"px"),this.eventBus.trigger("redrawn")},_onShown:function(){this.eventBus.trigger("shown"),this.autoselect&&this.dropdown.cursorTopSuggestion()},_onClosed:function(){this.input.clearHint(),this.input.removeActiveDescendant(),this.input.collapse(),this.eventBus.trigger("closed")},_onFocused:function(){if(this.isActivated=!0,this.openOnFocus){var t=this.input.getQuery();t.length>=this.minLength?this.dropdown.update(t):this.dropdown.empty(),this.dropdown.open()}},_onBlurred:function(){var t,e;t=this.dropdown.getDatumForCursor(),e=this.dropdown.getDatumForTopSuggestion();var n={selectionMethod:"blur"};this.debug||(this.autoselectOnBlur&&t?this._select(t,n):this.autoselectOnBlur&&e?this._select(e,n):(this.isActivated=!1,this.dropdown.empty(),this.dropdown.close()))},_onEnterKeyed:function(t,e){var n,i;n=this.dropdown.getDatumForCursor(),i=this.dropdown.getDatumForTopSuggestion();var s={selectionMethod:"enterKey"};n?(this._select(n,s),e.preventDefault()):this.autoselect&&i&&(this._select(i,s),e.preventDefault())},_onTabKeyed:function(t,e){if(this.tabAutocomplete){var n;(n=this.dropdown.getDatumForCursor())?(this._select(n,{selectionMethod:"tabKey"}),e.preventDefault()):this._autocomplete(!0)}else this.dropdown.close()},_onEscKeyed:function(){this.dropdown.close(),this.input.resetInputValue()},_onUpKeyed:function(){var t=this.input.getQuery();this.dropdown.isEmpty&&t.length>=this.minLength?this.dropdown.update(t):this.dropdown.moveCursorUp(),this.dropdown.open()},_onDownKeyed:function(){var t=this.input.getQuery();this.dropdown.isEmpty&&t.length>=this.minLength?this.dropdown.update(t):this.dropdown.moveCursorDown(),this.dropdown.open()},_onLeftKeyed:function(){"rtl"===this.dir&&this._autocomplete()},_onRightKeyed:function(){"ltr"===this.dir&&this._autocomplete()},_onQueryChanged:function(t,e){this.input.clearHintIfInvalid(),e.length>=this.minLength?this.dropdown.update(e):this.dropdown.empty(),this.dropdown.open(),this._setLanguageDirection()},_onWhitespaceChanged:function(){this._updateHint(),this.dropdown.open()},_setLanguageDirection:function(){var t=this.input.getLanguageDirection();this.dir!==t&&(this.dir=t,this.$node.css("direction",t),this.dropdown.setLanguageDirection(t))},_updateHint:function(){var t,e,n,s,r;(t=this.dropdown.getDatumForTopSuggestion())&&this.dropdown.isVisible()&&!this.input.hasOverflow()?(e=this.input.getInputValue(),n=a.normalizeQuery(e),s=i.escapeRegExChars(n),(r=new RegExp("^(?:"+s+")(.+$)","i").exec(t.value))?this.input.setHint(e+r[1]):this.input.clearHint()):this.input.clearHint()},_autocomplete:function(t){var e,n,i,s;e=this.input.getHint(),n=this.input.getQuery(),i=t||this.input.isCursorAtEnd(),e&&n!==e&&i&&((s=this.dropdown.getDatumForTopSuggestion())&&this.input.setInputValue(s.value),this.eventBus.trigger("autocompleted",s.raw,s.datasetName))},_select:function(t,e){void 0!==t.value&&this.input.setQuery(t.value),this.clearOnSelected?this.setVal(""):this.input.setInputValue(t.value,!0),this._setLanguageDirection(),!1===this.eventBus.trigger("selected",t.raw,t.datasetName,e).isDefaultPrevented()&&(this.dropdown.close(),i.defer(i.bind(this.dropdown.empty,this.dropdown)))},open:function(){if(!this.isActivated){var t=this.input.getInputValue();t.length>=this.minLength?this.dropdown.update(t):this.dropdown.empty()}this.dropdown.open()},close:function(){this.dropdown.close()},setVal:function(t){t=i.toStr(t),this.isActivated?this.input.setInputValue(t):(this.input.setQuery(t),this.input.setInputValue(t,!0)),this._setLanguageDirection()},getVal:function(){return this.input.getQuery()},destroy:function(){this.input.destroy(),this.dropdown.destroy(),function(t,e){var n=t.find(i.className(e.prefix,e.input));i.each(n.data("aaAttrs"),(function(t,e){void 0===t?n.removeAttr(e):n.attr(e,t)})),n.detach().removeClass(i.className(e.prefix,e.input,!0)).insertAfter(t),n.removeData&&n.removeData("aaAttrs");t.remove()}(this.$node,this.cssClasses),this.$node=null},getWrapper:function(){return this.dropdown.$container[0]}}),l.Dropdown=o,l.Input=a,l.sources=n(367),t.exports=l},358:function(t,e,n){"use strict";var i;i={9:"tab",27:"esc",37:"left",39:"right",13:"enter",38:"up",40:"down"};var s=n(188),r=n(191),a=n(216);function o(t){var e,n,a,o,u,c=this;(t=t||{}).input||s.error("input is missing"),e=s.bind(this._onBlur,this),n=s.bind(this._onFocus,this),a=s.bind(this._onKeydown,this),o=s.bind(this._onInput,this),this.$hint=r.element(t.hint),this.$input=r.element(t.input).on("blur.aa",e).on("focus.aa",n).on("keydown.aa",a),0===this.$hint.length&&(this.setHint=this.getHint=this.clearHint=this.clearHintIfInvalid=s.noop),s.isMsie()?this.$input.on("keydown.aa keypress.aa cut.aa paste.aa",(function(t){i[t.which||t.keyCode]||s.defer(s.bind(c._onInput,c,t))})):this.$input.on("input.aa",o),this.query=this.$input.val(),this.$overflowHelper=(u=this.$input,r.element('').css({position:"absolute",visibility:"hidden",whiteSpace:"pre",fontFamily:u.css("font-family"),fontSize:u.css("font-size"),fontStyle:u.css("font-style"),fontVariant:u.css("font-variant"),fontWeight:u.css("font-weight"),wordSpacing:u.css("word-spacing"),letterSpacing:u.css("letter-spacing"),textIndent:u.css("text-indent"),textRendering:u.css("text-rendering"),textTransform:u.css("text-transform")}).insertAfter(u))}function u(t){return t.altKey||t.ctrlKey||t.metaKey||t.shiftKey}o.normalizeQuery=function(t){return(t||"").replace(/^\s*/g,"").replace(/\s{2,}/g," ")},s.mixin(o.prototype,a,{_onBlur:function(){this.resetInputValue(),this.$input.removeAttr("aria-activedescendant"),this.trigger("blurred")},_onFocus:function(){this.trigger("focused")},_onKeydown:function(t){var e=i[t.which||t.keyCode];this._managePreventDefault(e,t),e&&this._shouldTrigger(e,t)&&this.trigger(e+"Keyed",t)},_onInput:function(){this._checkInputValue()},_managePreventDefault:function(t,e){var n,i,s;switch(t){case"tab":i=this.getHint(),s=this.getInputValue(),n=i&&i!==s&&!u(e);break;case"up":case"down":n=!u(e);break;default:n=!1}n&&e.preventDefault()},_shouldTrigger:function(t,e){var n;switch(t){case"tab":n=!u(e);break;default:n=!0}return n},_checkInputValue:function(){var t,e,n,i,s;t=this.getInputValue(),i=t,s=this.query,n=!(!(e=o.normalizeQuery(i)===o.normalizeQuery(s))||!this.query)&&this.query.length!==t.length,this.query=t,e?n&&this.trigger("whitespaceChanged",this.query):this.trigger("queryChanged",this.query)},focus:function(){this.$input.focus()},blur:function(){this.$input.blur()},getQuery:function(){return this.query},setQuery:function(t){this.query=t},getInputValue:function(){return this.$input.val()},setInputValue:function(t,e){void 0===t&&(t=this.query),this.$input.val(t),e?this.clearHint():this._checkInputValue()},expand:function(){this.$input.attr("aria-expanded","true")},collapse:function(){this.$input.attr("aria-expanded","false")},setActiveDescendant:function(t){this.$input.attr("aria-activedescendant",t)},removeActiveDescendant:function(){this.$input.removeAttr("aria-activedescendant")},resetInputValue:function(){this.setInputValue(this.query,!0)},getHint:function(){return this.$hint.val()},setHint:function(t){this.$hint.val(t)},clearHint:function(){this.setHint("")},clearHintIfInvalid:function(){var t,e,n;n=(t=this.getInputValue())!==(e=this.getHint())&&0===e.indexOf(t),""!==t&&n&&!this.hasOverflow()||this.clearHint()},getLanguageDirection:function(){return(this.$input.css("direction")||"ltr").toLowerCase()},hasOverflow:function(){var t=this.$input.width()-2;return this.$overflowHelper.text(this.getInputValue()),this.$overflowHelper.width()>=t},isCursorAtEnd:function(){var t,e,n;return t=this.$input.val().length,e=this.$input[0].selectionStart,s.isNumber(e)?e===t:!document.selection||((n=document.selection.createRange()).moveStart("character",-t),t===n.text.length)},destroy:function(){this.$hint.off(".aa"),this.$input.off(".aa"),this.$hint=this.$input=this.$overflowHelper=null}}),t.exports=o},359:function(t,e,n){"use strict";var i,s,r,a=[n(360),n(361),n(362),n(363),n(364)],o=-1,u=[],c=!1;function l(){i&&s&&(i=!1,s.length?u=s.concat(u):o=-1,u.length&&h())}function h(){if(!i){c=!1,i=!0;for(var t=u.length,e=setTimeout(l);t;){for(s=u,u=[];s&&++o1)for(var n=1;n
'),this.$menu.append(this.$empty),this.$empty.hide()),this.datasets=i.map(t.datasets,(function(e){return function(t,e,n){return new u.Dataset(i.mixin({$menu:t,cssClasses:n},e))}(a.$menu,e,t.cssClasses)})),i.each(this.datasets,(function(t){var e=t.getRoot();e&&0===e.parent().length&&a.$menu.append(e),t.onSync("rendered",a._onRendered,a)})),t.templates&&t.templates.footer&&(this.templates.footer=i.templatify(t.templates.footer),this.$menu.append(this.templates.footer()));var l=this;s.element(window).resize((function(){l._redraw()}))}i.mixin(u.prototype,r,{_onSuggestionClick:function(t){this.trigger("suggestionClicked",s.element(t.currentTarget))},_onSuggestionMouseEnter:function(t){var e=s.element(t.currentTarget);if(!e.hasClass(i.className(this.cssClasses.prefix,this.cssClasses.cursor,!0))){this._removeCursor();var n=this;setTimeout((function(){n._setCursor(e,!1)}),0)}},_onSuggestionMouseLeave:function(t){if(t.relatedTarget&&s.element(t.relatedTarget).closest("."+i.className(this.cssClasses.prefix,this.cssClasses.cursor,!0)).length>0)return;this._removeCursor(),this.trigger("cursorRemoved")},_onRendered:function(t,e){if(this.isEmpty=i.every(this.datasets,(function(t){return t.isEmpty()})),this.isEmpty)if(e.length>=this.minLength&&this.trigger("empty"),this.$empty)if(e.length=this.minLength?this._show():this._hide());this.trigger("datasetRendered")},_hide:function(){this.$container.hide()},_show:function(){this.$container.css("display","block"),this._redraw(),this.trigger("shown")},_redraw:function(){this.isOpen&&this.appendTo&&this.trigger("redrawn")},_getSuggestions:function(){return this.$menu.find(i.className(this.cssClasses.prefix,this.cssClasses.suggestion))},_getCursor:function(){return this.$menu.find(i.className(this.cssClasses.prefix,this.cssClasses.cursor)).first()},_setCursor:function(t,e){t.first().addClass(i.className(this.cssClasses.prefix,this.cssClasses.cursor,!0)).attr("aria-selected","true"),this.trigger("cursorMoved",e)},_removeCursor:function(){this._getCursor().removeClass(i.className(this.cssClasses.prefix,this.cssClasses.cursor,!0)).removeAttr("aria-selected")},_moveCursor:function(t){var e,n,i,s;this.isOpen&&(n=this._getCursor(),e=this._getSuggestions(),this._removeCursor(),-1!==(i=((i=e.index(n)+t)+1)%(e.length+1)-1)?(i<-1&&(i=e.length-1),this._setCursor(s=e.eq(i),!0),this._ensureVisible(s)):this.trigger("cursorRemoved"))},_ensureVisible:function(t){var e,n,i,s;n=(e=t.position().top)+t.height()+parseInt(t.css("margin-top"),10)+parseInt(t.css("margin-bottom"),10),i=this.$menu.scrollTop(),s=this.$menu.height()+parseInt(this.$menu.css("padding-top"),10)+parseInt(this.$menu.css("padding-bottom"),10),e<0?this.$menu.scrollTop(i+e):s"+u(t)+"

"}}),this.css=i.mixin({},a,t.appendTo?a.appendTo:{}),this.cssClasses=t.cssClasses=i.mixin({},a.defaultClasses,t.cssClasses||{}),this.cssClasses.prefix=t.cssClasses.formattedPrefix||i.formatPrefix(this.cssClasses.prefix,this.cssClasses.noPrefix);var c=i.className(this.cssClasses.prefix,this.cssClasses.dataset);this.$el=t.$menu&&t.$menu.find(c+"-"+this.name).length>0?s.element(t.$menu.find(c+"-"+this.name)[0]):s.element(r.dataset.replace("%CLASS%",this.name).replace("%PREFIX%",this.cssClasses.prefix).replace("%DATASET%",this.cssClasses.dataset)),this.$menu=t.$menu,this.clearCachedSuggestions()}u.extractDatasetName=function(t){return s.element(t).data("aaDataset")},u.extractValue=function(t){return s.element(t).data("aaValue")},u.extractDatum=function(t){var e=s.element(t).data("aaDatum");return"string"==typeof e&&(e=JSON.parse(e)),e},i.mixin(u.prototype,o,{_render:function(t,e){if(this.$el){var n,a=this,o=[].slice.call(arguments,2);if(this.$el.empty(),n=e&&e.length,this._isEmpty=!n,!n&&this.templates.empty)this.$el.html(u.apply(this,o)).prepend(a.templates.header?l.apply(this,o):null).append(a.templates.footer?h.apply(this,o):null);else if(n)this.$el.html(c.apply(this,o)).prepend(a.templates.header?l.apply(this,o):null).append(a.templates.footer?h.apply(this,o):null);else if(e&&!Array.isArray(e))throw new TypeError("suggestions must be an array");this.$menu&&this.$menu.addClass(this.cssClasses.prefix+(n?"with":"without")+"-"+this.name).removeClass(this.cssClasses.prefix+(n?"without":"with")+"-"+this.name),this.trigger("rendered",t)}function u(){var e=[].slice.call(arguments,0);return e=[{query:t,isEmpty:!0}].concat(e),a.templates.empty.apply(this,e)}function c(){var t,n,o=[].slice.call(arguments,0),u=this,c=r.suggestions.replace("%PREFIX%",this.cssClasses.prefix).replace("%SUGGESTIONS%",this.cssClasses.suggestions);return t=s.element(c).css(this.css.suggestions),n=i.map(e,l),t.append.apply(t,n),t;function l(t){var e,n=r.suggestion.replace("%PREFIX%",u.cssClasses.prefix).replace("%SUGGESTION%",u.cssClasses.suggestion);return(e=s.element(n).attr({role:"option",id:["option",Math.floor(1e8*Math.random())].join("-")}).append(a.templates.suggestion.apply(this,[t].concat(o)))).data("aaDataset",a.name),e.data("aaValue",a.displayFn(t)||void 0),e.data("aaDatum",JSON.stringify(t)),e.children().each((function(){s.element(this).css(u.css.suggestionChild)})),e}}function l(){var e=[].slice.call(arguments,0);return e=[{query:t,isEmpty:!n}].concat(e),a.templates.header.apply(this,e)}function h(){var e=[].slice.call(arguments,0);return e=[{query:t,isEmpty:!n}].concat(e),a.templates.footer.apply(this,e)}},getRoot:function(){return this.$el},update:function(t){function e(e){if(!this.canceled&&t===this.query){var n=[].slice.call(arguments,1);this.cacheSuggestions(t,e,n),this._render.apply(this,[t,e].concat(n))}}if(this.query=t,this.canceled=!1,this.shouldFetchFromCache(t))e.apply(this,[this.cachedSuggestions].concat(this.cachedRenderExtraArgs));else{var n=this,i=function(){n.canceled||n.source(t,e.bind(n))};if(this.debounce){clearTimeout(this.debounceTimeout),this.debounceTimeout=setTimeout((function(){n.debounceTimeout=null,i()}),this.debounce)}else i()}},cacheSuggestions:function(t,e,n){this.cachedQuery=t,this.cachedSuggestions=e,this.cachedRenderExtraArgs=n},shouldFetchFromCache:function(t){return this.cache&&this.cachedQuery===t&&this.cachedSuggestions&&this.cachedSuggestions.length},clearCachedSuggestions:function(){delete this.cachedQuery,delete this.cachedSuggestions,delete this.cachedRenderExtraArgs},cancel:function(){this.canceled=!0},clear:function(){this.cancel(),this.$el.empty(),this.trigger("rendered","")},isEmpty:function(){return this._isEmpty},destroy:function(){this.clearCachedSuggestions(),this.$el=null}}),t.exports=u},367:function(t,e,n){"use strict";t.exports={hits:n(368),popularIn:n(369)}},368:function(t,e,n){"use strict";var i=n(188),s=n(252),r=n(253);t.exports=function(t,e){var n=r(t.as._ua);return n&&n[0]>=3&&n[1]>20&&((e=e||{}).additionalUA="autocomplete.js "+s),function(n,s){t.search(n,e,(function(t,e){t?i.error(t.message):s(e.hits,e)}))}}},369:function(t,e,n){"use strict";var i=n(188),s=n(252),r=n(253);t.exports=function(t,e,n,a){var o=r(t.as._ua);if(o&&o[0]>=3&&o[1]>20&&((e=e||{}).additionalUA="autocomplete.js "+s),!n.source)return i.error("Missing 'source' key");var u=i.isFunction(n.source)?n.source:function(t){return t[n.source]};if(!n.index)return i.error("Missing 'index' key");var c=n.index;return a=a||{},function(o,l){t.search(o,e,(function(t,o){if(t)i.error(t.message);else{if(o.hits.length>0){var h=o.hits[0],p=i.mixin({hitsPerPage:0},n);delete p.source,delete p.index;var f=r(c.as._ua);return f&&f[0]>=3&&f[1]>20&&(e.additionalUA="autocomplete.js "+s),void c.search(u(h),p,(function(t,e){if(t)i.error(t.message);else{var n=[];if(a.includeAll){var s=a.allTitle||"All departments";n.push(i.mixin({facet:{value:s,count:e.nbHits}},i.cloneDeep(h)))}i.each(e.facets,(function(t,e){i.each(t,(function(t,s){n.push(i.mixin({facet:{facet:e,value:s,count:t}},i.cloneDeep(h)))}))}));for(var r=1;r\n
\n {{{category}}}\n
\n
\n
\n {{{subcategory}}}\n
\n {{#isTextOrSubcategoryNonEmpty}}\n
\n
{{{subcategory}}}
\n
{{{title}}}
\n {{#text}}
{{{text}}}
{{/text}}\n
\n {{/isTextOrSubcategoryNonEmpty}}\n
\n \n ',suggestionSimple:'\n
\n
\n {{^isLvl0}}\n {{{category}}}\n {{^isLvl1}}\n {{^isLvl1EmptyOrDuplicate}}\n \n {{{subcategory}}}\n \n {{/isLvl1EmptyOrDuplicate}}\n {{/isLvl1}}\n {{/isLvl0}}\n
\n {{#isLvl2}}\n {{{title}}}\n {{/isLvl2}}\n {{#isLvl1}}\n {{{subcategory}}}\n {{/isLvl1}}\n {{#isLvl0}}\n {{{category}}}\n {{/isLvl0}}\n
\n
\n
\n {{#text}}\n
\n
{{{text}}}
\n
\n {{/text}}\n
\n
\n ',footer:'\n \n ',empty:'\n
\n
\n
\n
\n
\n No results found for query "{{query}}"\n
\n
\n
\n
\n
\n ',searchBox:'\n \n\n\n '};e.default=s},371:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i,s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=n(254),a=(i=r)&&i.__esModule?i:{default:i};var o={mergeKeyWithParent:function(t,e){if(void 0===t[e])return t;if("object"!==s(t[e]))return t;var n=a.default.extend({},t,t[e]);return delete n[e],n},groupBy:function(t,e){var n={};return a.default.each(t,(function(t,i){if(void 0===i[e])throw new Error("[groupBy]: Object has no key "+e);var s=i[e];"string"==typeof s&&(s=s.toLowerCase()),Object.prototype.hasOwnProperty.call(n,s)||(n[s]=[]),n[s].push(i)})),n},values:function(t){return Object.keys(t).map((function(e){return t[e]}))},flatten:function(t){var e=[];return t.forEach((function(t){Array.isArray(t)?t.forEach((function(t){e.push(t)})):e.push(t)})),e},flattenAndFlagFirst:function(t,e){var n=this.values(t).map((function(t){return t.map((function(t,n){return t[e]=0===n,t}))}));return this.flatten(n)},compact:function(t){var e=[];return t.forEach((function(t){t&&e.push(t)})),e},getHighlightedValue:function(t,e){return t._highlightResult&&t._highlightResult.hierarchy_camel&&t._highlightResult.hierarchy_camel[e]&&t._highlightResult.hierarchy_camel[e].matchLevel&&"none"!==t._highlightResult.hierarchy_camel[e].matchLevel&&t._highlightResult.hierarchy_camel[e].value?t._highlightResult.hierarchy_camel[e].value:t._highlightResult&&t._highlightResult&&t._highlightResult[e]&&t._highlightResult[e].value?t._highlightResult[e].value:t[e]},getSnippetedValue:function(t,e){if(!t._snippetResult||!t._snippetResult[e]||!t._snippetResult[e].value)return t[e];var n=t._snippetResult[e].value;return n[0]!==n[0].toUpperCase()&&(n="\u2026"+n),-1===[".","!","?"].indexOf(n[n.length-1])&&(n+="\u2026"),n},deepClone:function(t){return JSON.parse(JSON.stringify(t))}};e.default=o},377:function(t,e,n){"use strict";var i,s=n(349),r=(i=s)&&i.__esModule?i:{default:i};t.exports=r.default}}]); \ No newline at end of file diff --git a/41.0766119e.js b/46.c746ba4f.js similarity index 76% rename from 41.0766119e.js rename to 46.c746ba4f.js index b8761a5f01b0..13bdef58a316 100644 --- a/41.0766119e.js +++ b/46.c746ba4f.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[41],{213:function(e,t,a){"use strict";a.r(t);var n=a(0),o=a.n(n),l=a(193);t.default=function(){return o.a.createElement(l.a,{title:"Page Not Found"},o.a.createElement("div",{className:"container margin-vert--xl"},o.a.createElement("div",{className:"row"},o.a.createElement("div",{className:"col col--6 col--offset-3"},o.a.createElement("h1",{className:"hero__title"},"Page Not Found"),o.a.createElement("p",null,"We could not find what you were looking for."),o.a.createElement("p",null,"Please contact the owner of the site that linked you to the original URL and let them know their link is broken.")))))}}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[46],{218:function(e,t,a){"use strict";a.r(t);var n=a(0),o=a.n(n),l=a(198);t.default=function(){return o.a.createElement(l.a,{title:"Page Not Found"},o.a.createElement("div",{className:"container margin-vert--xl"},o.a.createElement("div",{className:"row"},o.a.createElement("div",{className:"col col--6 col--offset-3"},o.a.createElement("h1",{className:"hero__title"},"Page Not Found"),o.a.createElement("p",null,"We could not find what you were looking for."),o.a.createElement("p",null,"Please contact the owner of the site that linked you to the original URL and let them know their link is broken.")))))}}}]); \ No newline at end of file diff --git a/49263b96.c8db05e5.js b/49263b96.c8db05e5.js new file mode 100644 index 000000000000..f936e9f16503 --- /dev/null +++ b/49263b96.c8db05e5.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[23],{164:function(e,t,r){"use strict";r.r(t),r.d(t,"frontMatter",(function(){return c})),r.d(t,"metadata",(function(){return l})),r.d(t,"rightToc",(function(){return d})),r.d(t,"default",(function(){return b}));var n,a=r(2),o=r(9),i=(r(0),r(185)),c={title:"Performance Monitoring",sidebar_label:"Overview"},l={id:"performance/overview",title:"Performance Monitoring",description:"What does it do?",source:"@site/../docs/performance/overview.mdx",permalink:"/docs/performance/overview",editUrl:"https://github.com/FirebaseExtended/flutterfire/edit/master/docs/../docs/performance/overview.mdx",sidebar_label:"Overview",sidebar:"main",previous:{title:"Realtime Database",permalink:"/docs/database/overview"}},d=[{value:"What does it do?",id:"what-does-it-do",children:[]},{value:"Installation",id:"installation",children:[{value:"1. Add dependency",id:"1-add-dependency",children:[]},{value:"2. Download dependency",id:"2-download-dependency",children:[]},{value:"3. (Web Only) Add the SDK",id:"3-web-only-add-the-sdk",children:[]},{value:"4. Rebuild your app",id:"4-rebuild-your-app",children:[]}]},{value:"Next Steps",id:"next-steps",children:[]}],p=(n="YouTube",function(e){return console.warn("Component "+n+" was not imported, exported, or provided by MDXProvider as global scope"),Object(i.b)("div",e)}),u={rightToc:d};function b(e){var t=e.components,r=Object(o.a)(e,["components"]);return Object(i.b)("wrapper",Object(a.a)({},u,r,{components:t,mdxType:"MDXLayout"}),Object(i.b)("h2",{id:"what-does-it-do"},"What does it do?"),Object(i.b)("p",null,"Firebase Performance Monitoring is a service that helps you to gain insight into the performance characteristics of your iOS, Android, and web apps."),Object(i.b)(p,{id:"0EHSPFvH7vk",mdxType:"YouTube"}),Object(i.b)("h2",{id:"installation"},"Installation"),Object(i.b)("h3",{id:"1-add-dependency"},"1. Add dependency"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml",metastring:'{5} title="pubspec.yaml"',"{5}":!0,title:'"pubspec.yaml"'}),'dependencies:\n flutter:\n sdk: flutter\n firebase_core: "^{{ plugins.firebase_core }}"\n firebase_performance: "^{{ plugins.firebase_performance }}"\n')),Object(i.b)("h3",{id:"2-download-dependency"},"2. Download dependency"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{}),"$ flutter pub get\n")),Object(i.b)("h3",{id:"3-web-only-add-the-sdk"},"3. (Web Only) Add the SDK"),Object(i.b)("blockquote",null,Object(i.b)("p",{parentName:"blockquote"},"Web is currently not supported. See the ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/FirebaseExtended/flutterfire/issues/2582"}),"FlutterFire roadmap"),".")),Object(i.b)("h3",{id:"4-rebuild-your-app"},"4. Rebuild your app"),Object(i.b)("p",null,"Once complete, rebuild your Flutter application:"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-bash"}),"$ flutter run\n")),Object(i.b)("h2",{id:"next-steps"},"Next Steps"),Object(i.b)("p",null,"Once installed, you're ready to start using Performance Monitoring in your Flutter Project."),Object(i.b)("blockquote",null,Object(i.b)("p",{parentName:"blockquote"},"Additional documentation will be available once the Firebase Performance Monitoring plugin update lands as part of the ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/FirebaseExtended/flutterfire/issues/2582"}),"FlutterFire roadmap"),".")))}b.isMDXComponent=!0},185:function(e,t,r){"use strict";r.d(t,"a",(function(){return u})),r.d(t,"b",(function(){return f}));var n=r(0),a=r.n(n);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var d=a.a.createContext({}),p=function(e){var t=a.a.useContext(d),r=t;return e&&(r="function"==typeof e?e(t):c(c({},t),e)),r},u=function(e){var t=p(e.components);return a.a.createElement(d.Provider,{value:t},e.children)},b={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},s=a.a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,i=e.parentName,d=l(e,["components","mdxType","originalType","parentName"]),u=p(r),s=n,f=u["".concat(i,".").concat(s)]||u[s]||b[s]||o;return r?a.a.createElement(f,c(c({ref:t},d),{},{components:r})):a.a.createElement(f,c({ref:t},d))}));function f(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,i=new Array(o);i[0]=s;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:n,i[1]=c;for(var d=2;d addUser() {\n // Call the users CollectionReference to add a new user\n return users\n .add({\n 'full_name': fullName, // John Doe\n 'company': company, // Stokes and Sons\n 'age': age // 42\n })\n .then((value) => print(\"User Added\"))\n .catchError((error) => print(\"Failed to add user: $error\"));\n }\n\n return FlatButton(\n onPressed: addUser,\n child: Text(\n \"Add User\",\n ),\n );\n }\n}\n")),Object(o.b)("h2",{id:"read-data"},"Read Data"),Object(o.b)("p",null,"Cloud Firestore gives you the ability to read the value of a collection or a document. This can be a one-time read, or\nprovided by realtime updates when the data within a query changes."),Object(o.b)("h3",{id:"one-time-read"},"One-time Read"),Object(o.b)("p",null,"To read a collection or document once, call the ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.Query.get"}),Object(o.b)("inlineCode",{parentName:"a"},"Query.get"))," or ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.DocumentReference.get"}),Object(o.b)("inlineCode",{parentName:"a"},"DocumentReference.get"))," methods.\nIn the below example a ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"https://api.flutter.dev/flutter/widgets/FutureBuilder-class.html"}),Object(o.b)("inlineCode",{parentName:"a"},"FutureBuilder"))," is used to help manage the state\nof the request:"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-dart",metastring:"highlight={11}",highlight:"{11}"}),"class GetUserName extends StatelessWidget {\n final String documentId;\n\n GetUserName(this.documentId);\n\n @override\n Widget build(BuildContext context) {\n CollectionReference users = FirebaseFirestore.instance.collection('users');\n\n return FutureBuilder(\n future: users.doc(documentId).get(),\n builder:\n (BuildContext context, AsyncSnapshot snapshot) {\n\n if (snapshot.hasError) {\n return Text(\"Something went wrong\");\n }\n\n if (snapshot.connectionState == ConnectionState.done) {\n Map data = snapshot.data();\n return Text(\"Full Name: ${data['full_name']} ${data['last_name']}\");\n }\n\n return Text(\"loading\");\n },\n );\n }\n}\n")),Object(o.b)("p",null,"To learn more about reading data whilst offline, view the ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"#access-data-offline"}),"Access Data Offline")," documentation."),Object(o.b)("h3",{id:"realtime-changes"},"Realtime changes"),Object(o.b)("p",null,"FlutterFire provides support for dealing with realtime changes to collections and documents. A new event is provided\non the initial request, and any subsequent changes to collection/document whenever a change occurs (modification, deleted\nor added)."),Object(o.b)("p",null,"Both the ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.CollectionReference"}),Object(o.b)("inlineCode",{parentName:"a"},"CollectionReference"))," & ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.DocumentReference"}),Object(o.b)("inlineCode",{parentName:"a"},"DocumentReference"))," provide\na ",Object(o.b)("inlineCode",{parentName:"p"},"snapshots()")," method which returns a ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"https://api.dart.dev/stable/2.8.3/dart-async/Stream-class.html"}),Object(o.b)("inlineCode",{parentName:"a"},"Stream")),":"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-dart"}),"Stream collectionStream = FirebaseFirestore.instance.collection('users').snapshots();\nStream documentStream = FirebaseFirestore.instance.collection('users').doc('ABC123').snapshots();\n")),Object(o.b)("p",null,"Once returned, you can subscribe to updates via the ",Object(o.b)("inlineCode",{parentName:"p"},"listen()")," method. The below example uses a ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"https://api.flutter.dev/flutter/widgets/StreamBuilder-class.html"}),Object(o.b)("inlineCode",{parentName:"a"},"StreamBuilder")),"\nwhich helps automatically manage the streams state and disposal of the stream when it's no longer used within your app:"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-dart"}),"class UserInformation extends StatelessWidget {\n @override\n Widget build(BuildContext context) {\n CollectionReference users = FirebaseFirestore.instance.collection('users');\n\n return StreamBuilder(\n stream: users.snapshots(),\n builder: (BuildContext context, AsyncSnapshot snapshot) {\n if (snapshot.hasError) {\n return Text('Something went wrong');\n }\n\n if (snapshot.connectionState == ConnectionState.waiting) {\n return Text(\"Loading\");\n }\n\n return new ListView(\n children: snapshot.data.documents.map((DocumentSnapshot document) {\n return new ListTile(\n title: new Text(document.data()['full_name']),\n subtitle: new Text(document.data()['company']),\n );\n }).toList(),\n );\n },\n );\n }\n}\n")),Object(o.b)("p",null,"By default, listeners do not update if there is a change that only affects the metadata. If you want to receive events\nwhen the document or query metadata changes, you can pass ",Object(o.b)("inlineCode",{parentName:"p"},"includeMetadataChanges")," to the ",Object(o.b)("inlineCode",{parentName:"p"},"snapshots")," method:"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-dart"}),"FirebaseFirestore.instance\n .collection('users')\n .snapshots(includeMetadataChanges: true)\n")),Object(o.b)("h3",{id:"document--query-snapshots"},"Document & Query Snapshots"),Object(o.b)("p",null,"When perfoming a query, Firestore returns either a ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.QuerySnapshot"}),Object(o.b)("inlineCode",{parentName:"a"},"QuerySnapshot"))," or a ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.DocumentSnapshot"}),Object(o.b)("inlineCode",{parentName:"a"},"DocumentSnapshot")),"."),Object(o.b)("h4",{id:"querysnapshot"},"QuerySnapshot"),Object(o.b)("p",null,"A ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.QuerySnapshot"}),Object(o.b)("inlineCode",{parentName:"a"},"QuerySnapshot"))," is returned from a collection query, and allows you to inspect the collection, such as how many documents\nexist within it, gives access to the documents within the collection, see any changes since the last query and more."),Object(o.b)("p",null,"To access the documents within a ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.QuerySnapshot"}),Object(o.b)("inlineCode",{parentName:"a"},"QuerySnapshot")),", call the ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.QuerySnapshot.docs"}),Object(o.b)("inlineCode",{parentName:"a"},"docs"))," property,\nwhich returns a ",Object(o.b)("inlineCode",{parentName:"p"},"List")," containing ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.DocumentSnapshot"}),Object(o.b)("inlineCode",{parentName:"a"},"DocumentSnapshot"))," classes."),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-dart"}),"FirebaseFirestore.instance\n .collection('users')\n .get()\n .then((QuerySnapshot querySnapshot) => {\n querySnapshot.docs.forEach((doc) {\n print(doc[\"first_name\"]);\n });\n });\n")),Object(o.b)("h4",{id:"documentsnapshot"},"DocumentSnapshot"),Object(o.b)("p",null,"A ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.DocumentSnapshot"}),Object(o.b)("inlineCode",{parentName:"a"},"DocumentSnapshot"))," is returned from a query, or by accessing the\ndocument directly. Even if no document exists in the database, a snapshot will always be returned."),Object(o.b)("p",null,"To determine whether the document exists, use the ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.DocumentSnapshot.exists"}),Object(o.b)("inlineCode",{parentName:"a"},"exists"))," property:"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-dart"}),"FirebaseFirestore.instance\n .collection('users')\n .document(userId)\n .get()\n .then((DocumentSnapshot documentSnapshot) {\n if (documentSnapshot.exists) {\n print('Document exists on the database');\n }\n });\n")),Object(o.b)("p",null,"If the document exists, you can read the data of it by calling the ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.DocumentSnapshot.data"}),Object(o.b)("inlineCode",{parentName:"a"},"data")),"\nmethod, which returns a ",Object(o.b)("inlineCode",{parentName:"p"},"Map"),", or ",Object(o.b)("inlineCode",{parentName:"p"},"null")," if it does not exist:"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-dart"}),"FirebaseFirestore.instance\n .collection('users')\n .doc(userId)\n .get()\n .then((DocumentSnapshot documentSnapshot) {\n if (documentSnapshot.exists) {\n print('Document data: ${documentSnapshot.data()}');\n } else {\n print('Document does not exist on the database');\n }\n });\n")),Object(o.b)("p",null,"A ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.DocumentSnapshot"}),Object(o.b)("inlineCode",{parentName:"a"},"DocumentSnapshot"))," also provides the ability to access\ndeeply nested data without manually iterating the returned ",Object(o.b)("inlineCode",{parentName:"p"},"Map")," via the ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.DocumentSnapshot.get"}),Object(o.b)("inlineCode",{parentName:"a"},"get")),"\nmethod. The method accepts a dot-separated path or a ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.FieldPath"}),Object(o.b)("inlineCode",{parentName:"a"},"FieldPath"))," instance.\nIf no data exists at the nested path, a ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"https://api.dart.dev/stable/2.8.4/dart-core/StateError-class.html"}),Object(o.b)("inlineCode",{parentName:"a"},"StateError")),":"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-dart"}),"try {\n dynamic nested = snapshot.get(FieldPath(['address', 'postcode']));\n} on StateError (e) {\n print('No nested field exists!');\n}\n")),Object(o.b)("h3",{id:"querying"},"Querying"),Object(o.b)("p",null,"Cloud Firestore offers advanced capabilities for querying collections. Queries work with both\none-time reads or subscribing to changes."),Object(o.b)("h4",{id:"filtering"},"Filtering"),Object(o.b)("p",null,"To filter documents within a collection, the ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.Query.where"}),Object(o.b)("inlineCode",{parentName:"a"},"where")),' method can be chained\nonto a collection reference. Filtering supports equality checks and "in" queries. For example, for filter\nusers where their age is greater than 20:'),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-dart"}),"FirebaseFirestore.instance\n .collection('users')\n .where('age', isGreaterThan: 20)\n .get()\n .then(...);\n")),Object(o.b)("p",null,"Firestore also supports array queries. For example, to filter users who speak English (en) or Italian (it), use\nthe ",Object(o.b)("inlineCode",{parentName:"p"},"arrayContainsAny")," filter:"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-dart"}),"FirebaseFirestore.instance\n .collection('users')\n .where('language', arrayContainsAny: ['en', 'it'])\n .get()\n .then(...);\n")),Object(o.b)("p",null,"To learn more about all of the querying capabilities Cloud Firestore has to offer, view the\n",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"https://firebase.google.com/docs/firestore/query-data/queries"}),"Firebase documentation"),"."),Object(o.b)("h4",{id:"limiting"},"Limiting"),Object(o.b)("p",null,"To limit the number of documents returned from a query, use the ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.Query.limit"}),Object(o.b)("inlineCode",{parentName:"a"},"limit"))," method on a collection reference:"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-dart"}),"FirebaseFirestore.instance\n .collection('users')\n .limit(2)\n .get()\n .then(...);\n")),Object(o.b)("p",null,"You can also limit to the last documents within the collection query by using ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.Query.limitToLast"}),Object(o.b)("inlineCode",{parentName:"a"},"limitToLast")),":"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-dart"}),"FirebaseFirestore.instance\n .collection('users')\n .orderBy('age')\n .limitToLast(2)\n .get()\n .then(...);\n")),Object(o.b)("h4",{id:"ordering"},"Ordering"),Object(o.b)("p",null,"To order the documents by a specific value, use the ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.Query.orderBy"}),Object(o.b)("inlineCode",{parentName:"a"},"orderBy"))," method:"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-dart"}),"FirebaseFirestore.instance\n .collection('users')\n .orderBy('age', descending: true)\n .get()\n .then(...);\n")),Object(o.b)("h4",{id:"start--end-cursors"},"Start & End Cursors"),Object(o.b)("p",null,"To start and/or end a query at a specific point within a collection, you can pass a value to the ",Object(o.b)("inlineCode",{parentName:"p"},"startAt"),", ",Object(o.b)("inlineCode",{parentName:"p"},"endAt"),",\n",Object(o.b)("inlineCode",{parentName:"p"},"startAfter")," or ",Object(o.b)("inlineCode",{parentName:"p"},"endBefore")," methods. You must specify an order to use cursor queries, for example:"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-dart"}),"FirebaseFirestore.instance\n .collection('users')\n .orderBy('age')\n .orderBy('company')\n .startAt([20, 'Swift - Harber'])\n .endAt([50, 'Wiza Group'])\n .get()\n .then(...);\n")),Object(o.b)("p",null,"You can further specify a ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.DocumentSnapshot"}),Object(o.b)("inlineCode",{parentName:"a"},"DocumentSnapshot"))," instead of a specific value,\nby passing it to the ",Object(o.b)("inlineCode",{parentName:"p"},"startAfterDocument"),", ",Object(o.b)("inlineCode",{parentName:"p"},"startAtDocument"),", ",Object(o.b)("inlineCode",{parentName:"p"},"endAtDocument")," or ",Object(o.b)("inlineCode",{parentName:"p"},"endBeforeDocument")," methods. For example:"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-dart"}),"FirebaseFirestore.instance\n .collection('users')\n .orderBy('age')\n .startAfterDocument(documentSnapshot)\n .get()\n .then(...);\n")),Object(o.b)("h4",{id:"query-limitations"},"Query Limitations"),Object(o.b)("p",null,"Cloud Firestore does not support the following types of queries:"),Object(o.b)("ul",null,Object(o.b)("li",{parentName:"ul"},"Queries with range filters on different fields, as described in the previous section."),Object(o.b)("li",{parentName:"ul"},"Logical OR queries. In this case, you should create a separate query for each OR condition and merge the query results\nin your app."),Object(o.b)("li",{parentName:"ul"},"Queries with a != clause. In this cause, you should split the query into a greater-than query and a less-than query.\nFor example, the query clause ",Object(o.b)("inlineCode",{parentName:"li"},'where("age", isNotEqualTo: 30)')," is not supported, however you can get the same result set\nby combining two queries, one with the clause ",Object(o.b)("inlineCode",{parentName:"li"},'where("age", isLessThan: 30)')," and one with the clause\n",Object(o.b)("inlineCode",{parentName:"li"},'where("age", isGreaterThan: 30)'))),Object(o.b)("h2",{id:"writing-data"},"Writing Data"),Object(o.b)("p",null,"The ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"https://firebase.google.com/docs/firestore/manage-data/structure-data"}),"Firebase Documentation")," provides some great\nexamples on the best practices to structuring your data. It is recommended that you read the guide before building your\ndatabase."),Object(o.b)("p",null,"For more information on what is possible when writing data to Firestore, please refer to\nthis ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"https://firebase.google.com/docs/firestore/manage-data/add-data"}),"documentation")),Object(o.b)("h2",{id:"adding-documents"},"Adding Documents"),Object(o.b)("p",null,"To add a new document to a collection, use the ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.CollectionReference.add"}),Object(o.b)("inlineCode",{parentName:"a"},"add"))," method\non a ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.CollectionReference"}),Object(o.b)("inlineCode",{parentName:"a"},"CollectionReference")),":"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-dart"}),"class AddUser extends StatelessWidget {\n final String fullName;\n final String company;\n final int age;\n\n AddUser(this.fullName, this.company, this.age);\n\n @override\n Widget build(BuildContext context) {\n // Create a CollectionReference called users that references the firestore collection\n CollectionReference users = FirebaseFirestore.instance.collection('users');\n\n Future addUser() {\n // Call the users CollectionReference to add a new user\n return users\n .add({\n 'full_name': fullName, // John Doe\n 'company': company, // Stokes and Sons\n 'age': age // 42\n })\n .then((value) => print(\"User Added\"))\n .catchError((error) => print(\"Failed to add user: $error\"));\n }\n\n return FlatButton(\n onPressed: addUser,\n child: Text(\n \"Add User\",\n ),\n );\n }\n}\n")),Object(o.b)("p",null,"The ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.CollectionReference.add"}),Object(o.b)("inlineCode",{parentName:"a"},"add"))," method adds the new document to your collection with a\nunique auto-generated ID. If you'd like to specify your own ID, call the ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.DocumentReference.set"}),Object(o.b)("inlineCode",{parentName:"a"},"set")),"\nmethod on a ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.DocumentReference"}),Object(o.b)("inlineCode",{parentName:"a"},"DocumentReference"))," instead:"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-dart",metastring:"highlight={6-8}",highlight:"{6-8}"}),"CollectionReference users = FirebaseFirestore.instance.collection('users');\n\nFuture addUser() {\n return users\n .doc('ABC123')\n .set({\n 'full_name': \"Mary Jane\",\n 'age': 18\n })\n .then((value) => print(\"User Added\"))\n .catchError((error) => print(\"Failed to add user: $error\"));\n}\n")),Object(o.b)("p",null,"Calling ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.DocumentReference.set"}),Object(o.b)("inlineCode",{parentName:"a"},"set"))," with a id that already exists on the collection will replace all the document data."),Object(o.b)("h3",{id:"updating-documents"},"Updating documents"),Object(o.b)("p",null,"Sometimes you may wish to update a document, rather than replacing all of the data. The ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.DocumentReference.set"}),Object(o.b)("inlineCode",{parentName:"a"},"set")),"\nmethod above replaces any existing data on a given ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.DocumentReference"}),Object(o.b)("inlineCode",{parentName:"a"},"DocumentReference")),".\nIf you'd like to update a document instead, use the ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.DocumentReference.update"}),Object(o.b)("inlineCode",{parentName:"a"},"update"))," method:"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-dart",metastring:"highlight={6}",highlight:"{6}"}),"CollectionReference users = FirebaseFirestore.instance.collection('users');\n\nFuture updateUser() {\n return users\n .doc('ABC123')\n .update({'company': 'Stokes and Sons'})\n .then((value) => print(\"User Updated\"))\n .catchError((error) => print(\"Failed to update user: $error\"));\n}\n")),Object(o.b)("p",null,"The method also provides support for updating deeply nested values via dot-notation:"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-dart",metastring:"highlight={6}",highlight:"{6}"}),"CollectionReference users = FirebaseFirestore.instance.collection('users');\n\nFuture updateUser() {\n return users\n .doc('ABC123')\n .update({'info.address.zipcode': 90210})\n .then((value) => print(\"User Updated\"))\n .catchError((error) => print(\"Failed to update user: $error\"));\n}\n")),Object(o.b)("h4",{id:"field-values"},"Field values"),Object(o.b)("p",null,"Cloud Firestore supports storing and manipulating values on your database, such as Timestamps, GeoPoints, Blobs and\narray management."),Object(o.b)("p",null,"To store ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore_platform_interface.GeoPoint"}),Object(o.b)("inlineCode",{parentName:"a"},"GeoPoint"))," values, provide the latitude\nand longitude to the GeoPoint class:"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-dart",metastring:"highlight={6}",highlight:"{6}"}),"CollectionReference users = FirebaseFirestore.instance.collection('users');\n\nFuture updateUser() {\n return users\n .doc('ABC123')\n .update({'info.address.location': GeoPoint(53.483959, -2.244644)})\n .then((value) => print(\"User Updated\"))\n .catchError((error) => print(\"Failed to update user: $error\"));\n}\n")),Object(o.b)("p",null,"To store a Blob such as an image, provide a ",Object(o.b)("inlineCode",{parentName:"p"},"Uint8List"),". The below example shows how to get an image from your ",Object(o.b)("inlineCode",{parentName:"p"},"assets"),"\ndirectory and nest it in the ",Object(o.b)("inlineCode",{parentName:"p"},"info")," object in Firestore."),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-dart",metastring:"highlight={4-11}",highlight:"{4-11}"}),"CollectionReference users = FirebaseFirestore.instance.collection('users');\n\nFuture updateUser() {\n return rootBundle\n .load('assets/images/sample.jpg')\n .then((bytes) => bytes.buffer.asUint8List())\n .then((avatar) {\n return users\n .doc('ABC123')\n .update({'info.avatar': Blob(avatar)});\n })\n .then((value) => print(\"User Updated\"))\n .catchError((error) => print(\"Failed to update user: $error\"));\n}\n")),Object(o.b)("h2",{id:"removing-data"},"Removing Data"),Object(o.b)("p",null,"To delete documents with Cloud Firestore, you can use the ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.DocumentReference.delete"}),Object(o.b)("inlineCode",{parentName:"a"},"delete")),"\nmethod on a ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.DocumentReference"}),Object(o.b)("inlineCode",{parentName:"a"},"DocumentReference")),":"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-dart",metastring:"highlight={6}",highlight:"{6}"}),"CollectionReference users = FirebaseFirestore.instance.collection('users');\n\nFuture deleteUser() {\n return users\n .doc('ABC123')\n .delete()\n .then((value) => print(\"User Deleted\"))\n .catchError((error) => print(\"Failed to delete user: $error\"));\n}\n")),Object(o.b)("p",null,"If you need to remove specific properties from within a document rather than the document itself,\nyou can use the ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.DocumentReference.delete"}),Object(o.b)("inlineCode",{parentName:"a"},"delete"))," method with\nthe ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.FieldValue"}),Object(o.b)("inlineCode",{parentName:"a"},"FieldValue"))," class:"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-dart",metastring:"highlight={6}",highlight:"{6}"}),"CollectionReference users = FirebaseFirestore.instance.collection('users');\n\nFuture deleteField() {\n return users\n .doc('ABC123')\n .update({'age': FieldValue.delete()})\n .then((value) => print(\"User Deleted\"))\n .catchError((error) => print(\"Failed to delete user: $error\"));\n}\n")),Object(o.b)("h2",{id:"transactions"},"Transactions"),Object(o.b)("p",null,"Transactions are a way to ensure that a write operation only occurs using the latest data available on the server.\nTransactions never partially apply writes, and writes execute at the end of a successful transaction."),Object(o.b)("p",null,"Transactions are useful when you want to update a field based on its current value, or the value of another field. If\nyou want to write multiple documents without using the documents current state, a ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"usage#batch-write"}),"batch write"),"\nshould be used."),Object(o.b)("p",null,"When using transactions, note that:"),Object(o.b)("ul",null,Object(o.b)("li",{parentName:"ul"},"Read operations must come before write operations"),Object(o.b)("li",{parentName:"ul"},"Transactions will fail is the client is offline, they cannot use cached data")),Object(o.b)("p",null,'An example of where a transaction could be used would be in an application where a user can subscribe to a channel. When\na user presses the subscribe button, a "subscribers" field in a document increments. Without using Transactions, we would\nfirst need to read the existing value, and then increment that value using two separate operations.'),Object(o.b)("p",null,"On a high traffic application, the value on the server could have already changed by the time the write operation sets\na new value, causing the number to be inconsistent."),Object(o.b)("p",null,"Transactions remove this issue by atomically updating the value of the server. If the value changes whilst the transaction\nis executing, it will retry, ensuring the value on the server is used, rather than the client value."),Object(o.b)("p",null,"To execute a transaction, call the ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.FirebaseFirestore.runTransaction"}),Object(o.b)("inlineCode",{parentName:"a"},"runTransaction"))," method:"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-dart"}),"// Create a reference to the document the transaction will use\nDocumentReference documentReference = FirebaseFirestore.instance\n .collection('users')\n .doc(documentId);\n\nreturn Firestore.instance.runTransaction((transaction) async {\n // Get the document\n DocumentSnapshot snapshot = await transaction.get(documentReference);\n\n if (!snapshot.exists) {\n throw Exception(\"User does not exist!\");\n }\n\n // Update the follower count based on the current count\n int newFollowerCount = snapshot.data()['followers'] + 1;\n\n // Perform an update on the document\n transaction.update(documentReference, {'followers': newFollowerCount});\n\n // Return the new count\n return newFollowerCount;\n})\n.then((value) => print(\"Follower count updatd to $value\"))\n.catchError((error) => print(\"Failed to update user followers: $error\"));\n")),Object(o.b)("p",null,"In the above example, if the document changes at any point during the transaction, it will retry\nup-to five times."),Object(o.b)("p",null,"You should not directly modify application state inside of the transaction, as the handler may execute multiple\ntimes. You should instead return a value at the end of the handler, updating application state once the transaction\nhas completed."),Object(o.b)("p",null,"If an exception is thrown within the handler, the entire transaction will be aborted."),Object(o.b)("h2",{id:"batch-write"},"Batch write"),Object(o.b)("p",null,"Firestore lets you execute multiple write operations as a single batch that can contain any\ncombination of ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.WriteBatch.set"}),Object(o.b)("inlineCode",{parentName:"a"},"set")),", ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.WriteBatch.update"}),Object(o.b)("inlineCode",{parentName:"a"},"update")),",\nor ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.WriteBatch.delete"}),Object(o.b)("inlineCode",{parentName:"a"},"delete"))," operations."),Object(o.b)("p",null,"First, create a new batch instance via the ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.FirebaseFirestore.batch"}),Object(o.b)("inlineCode",{parentName:"a"},"batch"))," method, then perform\nthe operations on the batch, and then commit it once ready. The below example shows how to delete\nall documents in a collection in a single operation:"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-dart"}),"CollectionReference users = FirebaseFirestore.instance.collection('users');\n\nFuture batchDelete() {\n WriteBatch batch = FirebaseFirestore.instance.batch();\n\n return users.get().then((querySnapshot) {\n querySnapshot.documents.forEach((document) {\n batch.delete(document.reference);\n });\n\n return batch.commit();\n });\n}\n")),Object(o.b)("h2",{id:"data-security"},"Data Security"),Object(o.b)("p",null,"It is important that you understand how to write rules in your Firebase console to ensure that your data is secure.\nPlease follow the Firebase Firestore documentation on ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"https://firebase.google.com/docs/firestore/security/get-started"}),"security"),"."),Object(o.b)("h2",{id:"access-data-offline"},"Access Data Offline"),Object(o.b)("h3",{id:"configure-offline-persistence"},"Configure Offline Persistence"),Object(o.b)("p",null,"Firestore provides out of the box support for offline capabilities. When reading and writing data, Firestore uses a\nlocal database which automatically synchronizes with the server. Cloud Firestore functionality continues when users are\noffline, and automatically handles data migration when they regain connectivity."),Object(o.b)("p",null,"This functionality is enabled by default, however it can be disabled if needed. The ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.FirebaseFirestore.settings"}),Object(o.b)("inlineCode",{parentName:"a"},"settings")),"\nmethod must be called before any Firestore interaction is performed:"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-dart"}),"await FirebaseFirestore.instance.settings(\n Settings(persistenceEnabled: false)\n);\n")),Object(o.b)("p",null,"If you want to clear any persisted data, you can call the ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.FirebaseFirestore.clearPersistence"}),Object(o.b)("inlineCode",{parentName:"a"},"clearPersistence()"))," method."),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-dart"}),"await FirebaseFirestore.instance.clearPersistence();\n")),Object(o.b)("p",null,"Calls to update settings or clearing persistence must be carried out before any other usage of\nFirestore. If called afterwards, they will take effect on the next Firestore claim (e.g. restarting\nthe application)."),Object(o.b)("h3",{id:"configure-cache-size"},"Configure Cache Size"),Object(o.b)("p",null,"When persistence is enabled, Firestore caches every document for offline access. After exceeding the cache size, Firestore\nwill attempt to remove older, unused data. You can configure different cache sizes, or disable the removal process:"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-dart"}),"// The default value is 40 MB. The threshold must be set to at least 1 MB,\n// and can be set to Settings.CACHE_SIZE_UNLIMITED to disable garbage collection.\n\nawait FirebaseFirestore.instance.settings(\n Settings(\n cacheSizeBytes: Settings.CACHE_SIZE_UNLIMITED\n ));\n")),Object(o.b)("h3",{id:"disable-and-enable-network-access"},"Disable and Enable Network Access"),Object(o.b)("p",null,"It is possible to disable network access for your Firestore client. While network access is disabled, all Firestore requests\nretrieve results from the cache. Any write operations are queued until network access is re-enabled."),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-dart"}),"await FirebaseFirestore.instance.disableNetwork()\n")),Object(o.b)("p",null,"To re-enabled network access, call the ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.FirebaseFirestore.enableNetwork"}),Object(o.b)("inlineCode",{parentName:"a"},"enableNetwork"))," method:"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-dart"}),"await FirebaseFirestore.instance.enableNetwork()\n")),Object(o.b)("h2",{id:"emulator-usage"},"Emulator Usage"),Object(o.b)("p",null,"If you are using the local ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"https://firebase.google.com/docs/rules/emulator-setup"}),"Firestore emulators"),", then it is possible to\nconnect to these by passing a ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.Settings.host"}),Object(o.b)("inlineCode",{parentName:"a"},"host"))," parameter to the ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.FirebaseFirestore.settings"}),Object(o.b)("inlineCode",{parentName:"a"},"settings"))," method,\nimmediately after initializing Firebase. Ensure you pass the correct port on which the Firebase emulator is running on."),Object(o.b)("blockquote",null,Object(o.b)("p",{parentName:"blockquote"},"On Android, to reference ",Object(o.b)("inlineCode",{parentName:"p"},"localhost"),", use the ",Object(o.b)("inlineCode",{parentName:"p"},"10.0.2.2")," IP address instead.")),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-dart"}),'// Initialize first\nawait FirebaseCore.instance.initializeApp();\n\n// Set the host as soon as possible\nawait FirebaseFirestore.instance\n .settings(Settings(host: "localhost:8080", sslEnabled: false));\n')))}u.isMDXComponent=!0},185:function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return h}));var a=n(0),r=n.n(a);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function c(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l=r.a.createContext({}),u=function(e){var t=r.a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):c(c({},t),e)),n},d=function(e){var t=u(e.components);return r.a.createElement(l.Provider,{value:t},e.children)},b={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},p=r.a.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,i=e.parentName,l=s(e,["components","mdxType","originalType","parentName"]),d=u(n),p=a,h=d["".concat(i,".").concat(p)]||d[p]||b[p]||o;return n?r.a.createElement(h,c(c({ref:t},l),{},{components:n})):r.a.createElement(h,c({ref:t},l))}));function h(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=p;var c={};for(var s in t)hasOwnProperty.call(t,s)&&(c[s]=t[s]);c.originalType=e,c.mdxType="string"==typeof e?e:a,i[1]=c;for(var l=2;l addUser() {\n // Call the users CollectionReference to add a new user\n return users\n .add({\n 'full_name': fullName, // John Doe\n 'company': company, // Stokes and Sons\n 'age': age // 42\n })\n .then((value) => print(\"User Added\"))\n .catchError((error) => print(\"Failed to add user: $error\"));\n }\n\n return FlatButton(\n onPressed: addUser,\n child: Text(\n \"Add User\",\n ),\n );\n }\n}\n")),Object(o.b)("h2",{id:"read-data"},"Read Data"),Object(o.b)("p",null,"Cloud Firestore gives you the ability to read the value of a collection or a document. This can be a one-time read, or\nprovided by realtime updates when the data within a query changes."),Object(o.b)("h3",{id:"one-time-read"},"One-time Read"),Object(o.b)("p",null,"To read a collection or document once, call the ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.Query.get"}),Object(o.b)("inlineCode",{parentName:"a"},"Query.get"))," or ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.DocumentReference.get"}),Object(o.b)("inlineCode",{parentName:"a"},"DocumentReference.get"))," methods.\nIn the below example a ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"https://api.flutter.dev/flutter/widgets/FutureBuilder-class.html"}),Object(o.b)("inlineCode",{parentName:"a"},"FutureBuilder"))," is used to help manage the state\nof the request:"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-dart",metastring:"highlight={11}",highlight:"{11}"}),"class GetUserName extends StatelessWidget {\n final String documentId;\n\n GetUserName(this.documentId);\n\n @override\n Widget build(BuildContext context) {\n CollectionReference users = FirebaseFirestore.instance.collection('users');\n\n return FutureBuilder(\n future: users.doc(documentId).get(),\n builder:\n (BuildContext context, AsyncSnapshot snapshot) {\n\n if (snapshot.hasError) {\n return Text(\"Something went wrong\");\n }\n\n if (snapshot.connectionState == ConnectionState.done) {\n Map data = snapshot.data();\n return Text(\"Full Name: ${data['full_name']} ${data['last_name']}\");\n }\n\n return Text(\"loading\");\n },\n );\n }\n}\n")),Object(o.b)("p",null,"To learn more about reading data whilst offline, view the ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"#access-data-offline"}),"Access Data Offline")," documentation."),Object(o.b)("h3",{id:"realtime-changes"},"Realtime changes"),Object(o.b)("p",null,"FlutterFire provides support for dealing with realtime changes to collections and documents. A new event is provided\non the initial request, and any subsequent changes to collection/document whenever a change occurs (modification, deleted\nor added)."),Object(o.b)("p",null,"Both the ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.CollectionReference"}),Object(o.b)("inlineCode",{parentName:"a"},"CollectionReference"))," & ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.DocumentReference"}),Object(o.b)("inlineCode",{parentName:"a"},"DocumentReference"))," provide\na ",Object(o.b)("inlineCode",{parentName:"p"},"snapshots()")," method which returns a ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"https://api.dart.dev/stable/2.8.3/dart-async/Stream-class.html"}),Object(o.b)("inlineCode",{parentName:"a"},"Stream")),":"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-dart"}),"Stream collectionStream = FirebaseFirestore.instance.collection('users').snapshots();\nStream documentStream = FirebaseFirestore.instance.collection('users').doc('ABC123').snapshots();\n")),Object(o.b)("p",null,"Once returned, you can subscribe to updates via the ",Object(o.b)("inlineCode",{parentName:"p"},"listen()")," method. The below example uses a ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"https://api.flutter.dev/flutter/widgets/StreamBuilder-class.html"}),Object(o.b)("inlineCode",{parentName:"a"},"StreamBuilder")),"\nwhich helps automatically manage the streams state and disposal of the stream when it's no longer used within your app:"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-dart"}),"class UserInformation extends StatelessWidget {\n @override\n Widget build(BuildContext context) {\n CollectionReference users = FirebaseFirestore.instance.collection('users');\n\n return StreamBuilder(\n stream: users.snapshots(),\n builder: (BuildContext context, AsyncSnapshot snapshot) {\n if (snapshot.hasError) {\n return Text('Something went wrong');\n }\n\n if (snapshot.connectionState == ConnectionState.waiting) {\n return Text(\"Loading\");\n }\n\n return new ListView(\n children: snapshot.data.documents.map((DocumentSnapshot document) {\n return new ListTile(\n title: new Text(document.data()['full_name']),\n subtitle: new Text(document.data()['company']),\n );\n }).toList(),\n );\n },\n );\n }\n}\n")),Object(o.b)("p",null,"By default, listeners do not update if there is a change that only affects the metadata. If you want to receive events\nwhen the document or query metadata changes, you can pass ",Object(o.b)("inlineCode",{parentName:"p"},"includeMetadataChanges")," to the ",Object(o.b)("inlineCode",{parentName:"p"},"snapshots")," method:"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-dart"}),"FirebaseFirestore.instance\n .collection('users')\n .snapshots(includeMetadataChanges: true)\n")),Object(o.b)("h3",{id:"document--query-snapshots"},"Document & Query Snapshots"),Object(o.b)("p",null,"When perfoming a query, Firestore returns either a ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.QuerySnapshot"}),Object(o.b)("inlineCode",{parentName:"a"},"QuerySnapshot"))," or a ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.DocumentSnapshot"}),Object(o.b)("inlineCode",{parentName:"a"},"DocumentSnapshot")),"."),Object(o.b)("h4",{id:"querysnapshot"},"QuerySnapshot"),Object(o.b)("p",null,"A ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.QuerySnapshot"}),Object(o.b)("inlineCode",{parentName:"a"},"QuerySnapshot"))," is returned from a collection query, and allows you to inspect the collection, such as how many documents\nexist within it, gives access to the documents within the collection, see any changes since the last query and more."),Object(o.b)("p",null,"To access the documents within a ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.QuerySnapshot"}),Object(o.b)("inlineCode",{parentName:"a"},"QuerySnapshot")),", call the ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.QuerySnapshot.docs"}),Object(o.b)("inlineCode",{parentName:"a"},"docs"))," property,\nwhich returns a ",Object(o.b)("inlineCode",{parentName:"p"},"List")," containing ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.DocumentSnapshot"}),Object(o.b)("inlineCode",{parentName:"a"},"DocumentSnapshot"))," classes."),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-dart"}),"FirebaseFirestore.instance\n .collection('users')\n .get()\n .then((QuerySnapshot querySnapshot) => {\n querySnapshot.docs.forEach((doc) {\n print(doc[\"first_name\"]);\n });\n });\n")),Object(o.b)("h4",{id:"documentsnapshot"},"DocumentSnapshot"),Object(o.b)("p",null,"A ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.DocumentSnapshot"}),Object(o.b)("inlineCode",{parentName:"a"},"DocumentSnapshot"))," is returned from a query, or by accessing the\ndocument directly. Even if no document exists in the database, a snapshot will always be returned."),Object(o.b)("p",null,"To determine whether the document exists, use the ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.DocumentSnapshot.exists"}),Object(o.b)("inlineCode",{parentName:"a"},"exists"))," property:"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-dart"}),"FirebaseFirestore.instance\n .collection('users')\n .document(userId)\n .get()\n .then((DocumentSnapshot documentSnapshot) {\n if (documentSnapshot.exists) {\n print('Document exists on the database');\n }\n });\n")),Object(o.b)("p",null,"If the document exists, you can read the data of it by calling the ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.DocumentSnapshot.data"}),Object(o.b)("inlineCode",{parentName:"a"},"data")),"\nmethod, which returns a ",Object(o.b)("inlineCode",{parentName:"p"},"Map"),", or ",Object(o.b)("inlineCode",{parentName:"p"},"null")," if it does not exist:"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-dart"}),"FirebaseFirestore.instance\n .collection('users')\n .doc(userId)\n .get()\n .then((DocumentSnapshot documentSnapshot) {\n if (documentSnapshot.exists) {\n print('Document data: ${documentSnapshot.data()}');\n } else {\n print('Document does not exist on the database');\n }\n });\n")),Object(o.b)("p",null,"A ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.DocumentSnapshot"}),Object(o.b)("inlineCode",{parentName:"a"},"DocumentSnapshot"))," also provides the ability to access\ndeeply nested data without manually iterating the returned ",Object(o.b)("inlineCode",{parentName:"p"},"Map")," via the ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.DocumentSnapshot.get"}),Object(o.b)("inlineCode",{parentName:"a"},"get")),"\nmethod. The method accepts a dot-separated path or a ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.FieldPath"}),Object(o.b)("inlineCode",{parentName:"a"},"FieldPath"))," instance.\nIf no data exists at the nested path, a ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"https://api.dart.dev/stable/2.8.4/dart-core/StateError-class.html"}),Object(o.b)("inlineCode",{parentName:"a"},"StateError")),":"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-dart"}),"try {\n dynamic nested = snapshot.get(FieldPath(['address', 'postcode']));\n} on StateError (e) {\n print('No nested field exists!');\n}\n")),Object(o.b)("h3",{id:"querying"},"Querying"),Object(o.b)("p",null,"Cloud Firestore offers advanced capabilities for querying collections. Queries work with both\none-time reads or subscribing to changes."),Object(o.b)("h4",{id:"filtering"},"Filtering"),Object(o.b)("p",null,"To filter documents within a collection, the ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.Query.where"}),Object(o.b)("inlineCode",{parentName:"a"},"where")),' method can be chained\nonto a collection reference. Filtering supports equality checks and "in" queries. For example, for filter\nusers where their age is greater than 20:'),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-dart"}),"FirebaseFirestore.instance\n .collection('users')\n .where('age', isGreaterThan: 20)\n .get()\n .then(...);\n")),Object(o.b)("p",null,"Firestore also supports array queries. For example, to filter users who speak English (en) or Italian (it), use\nthe ",Object(o.b)("inlineCode",{parentName:"p"},"arrayContainsAny")," filter:"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-dart"}),"FirebaseFirestore.instance\n .collection('users')\n .where('language', arrayContainsAny: ['en', 'it'])\n .get()\n .then(...);\n")),Object(o.b)("p",null,"To learn more about all of the querying capabilities Cloud Firestore has to offer, view the\n",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"https://firebase.google.com/docs/firestore/query-data/queries"}),"Firebase documentation"),"."),Object(o.b)("h4",{id:"limiting"},"Limiting"),Object(o.b)("p",null,"To limit the number of documents returned from a query, use the ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.Query.limit"}),Object(o.b)("inlineCode",{parentName:"a"},"limit"))," method on a collection reference:"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-dart"}),"FirebaseFirestore.instance\n .collection('users')\n .limit(2)\n .get()\n .then(...);\n")),Object(o.b)("p",null,"You can also limit to the last documents within the collection query by using ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.Query.limitToLast"}),Object(o.b)("inlineCode",{parentName:"a"},"limitToLast")),":"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-dart"}),"FirebaseFirestore.instance\n .collection('users')\n .orderBy('age')\n .limitToLast(2)\n .get()\n .then(...);\n")),Object(o.b)("h4",{id:"ordering"},"Ordering"),Object(o.b)("p",null,"To order the documents by a specific value, use the ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.Query.orderBy"}),Object(o.b)("inlineCode",{parentName:"a"},"orderBy"))," method:"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-dart"}),"FirebaseFirestore.instance\n .collection('users')\n .orderBy('age', descending: true)\n .get()\n .then(...);\n")),Object(o.b)("h4",{id:"start--end-cursors"},"Start & End Cursors"),Object(o.b)("p",null,"To start and/or end a query at a specific point within a collection, you can pass a value to the ",Object(o.b)("inlineCode",{parentName:"p"},"startAt"),", ",Object(o.b)("inlineCode",{parentName:"p"},"endAt"),",\n",Object(o.b)("inlineCode",{parentName:"p"},"startAfter")," or ",Object(o.b)("inlineCode",{parentName:"p"},"endBefore")," methods. You must specify an order to use cursor queries, for example:"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-dart"}),"FirebaseFirestore.instance\n .collection('users')\n .orderBy('age')\n .orderBy('company')\n .startAt([20, 'Swift - Harber'])\n .endAt([50, 'Wiza Group'])\n .get()\n .then(...);\n")),Object(o.b)("p",null,"You can further specify a ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.DocumentSnapshot"}),Object(o.b)("inlineCode",{parentName:"a"},"DocumentSnapshot"))," instead of a specific value,\nby passing it to the ",Object(o.b)("inlineCode",{parentName:"p"},"startAfterDocument"),", ",Object(o.b)("inlineCode",{parentName:"p"},"startAtDocument"),", ",Object(o.b)("inlineCode",{parentName:"p"},"endAtDocument")," or ",Object(o.b)("inlineCode",{parentName:"p"},"endBeforeDocument")," methods. For example:"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-dart"}),"FirebaseFirestore.instance\n .collection('users')\n .orderBy('age')\n .startAfterDocument(documentSnapshot)\n .get()\n .then(...);\n")),Object(o.b)("h4",{id:"query-limitations"},"Query Limitations"),Object(o.b)("p",null,"Cloud Firestore does not support the following types of queries:"),Object(o.b)("ul",null,Object(o.b)("li",{parentName:"ul"},"Queries with range filters on different fields, as described in the previous section."),Object(o.b)("li",{parentName:"ul"},"Logical OR queries. In this case, you should create a separate query for each OR condition and merge the query results\nin your app."),Object(o.b)("li",{parentName:"ul"},"Queries with a != clause. In this cause, you should split the query into a greater-than query and a less-than query.\nFor example, the query clause ",Object(o.b)("inlineCode",{parentName:"li"},'where("age", isNotEqualTo: 30)')," is not supported, however you can get the same result set\nby combining two queries, one with the clause ",Object(o.b)("inlineCode",{parentName:"li"},'where("age", isLessThan: 30)')," and one with the clause\n",Object(o.b)("inlineCode",{parentName:"li"},'where("age", isGreaterThan: 30)'))),Object(o.b)("h2",{id:"writing-data"},"Writing Data"),Object(o.b)("p",null,"The ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"https://firebase.google.com/docs/firestore/manage-data/structure-data"}),"Firebase Documentation")," provides some great\nexamples on the best practices to structuring your data. It is recommended that you read the guide before building your\ndatabase."),Object(o.b)("p",null,"For more information on what is possible when writing data to Firestore, please refer to\nthis ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"https://firebase.google.com/docs/firestore/manage-data/add-data"}),"documentation")),Object(o.b)("h2",{id:"adding-documents"},"Adding Documents"),Object(o.b)("p",null,"To add a new document to a collection, use the ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.CollectionReference.add"}),Object(o.b)("inlineCode",{parentName:"a"},"add"))," method\non a ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.CollectionReference"}),Object(o.b)("inlineCode",{parentName:"a"},"CollectionReference")),":"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-dart"}),"class AddUser extends StatelessWidget {\n final String fullName;\n final String company;\n final int age;\n\n AddUser(this.fullName, this.company, this.age);\n\n @override\n Widget build(BuildContext context) {\n // Create a CollectionReference called users that references the firestore collection\n CollectionReference users = FirebaseFirestore.instance.collection('users');\n\n Future addUser() {\n // Call the users CollectionReference to add a new user\n return users\n .add({\n 'full_name': fullName, // John Doe\n 'company': company, // Stokes and Sons\n 'age': age // 42\n })\n .then((value) => print(\"User Added\"))\n .catchError((error) => print(\"Failed to add user: $error\"));\n }\n\n return FlatButton(\n onPressed: addUser,\n child: Text(\n \"Add User\",\n ),\n );\n }\n}\n")),Object(o.b)("p",null,"The ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.CollectionReference.add"}),Object(o.b)("inlineCode",{parentName:"a"},"add"))," method adds the new document to your collection with a\nunique auto-generated ID. If you'd like to specify your own ID, call the ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.DocumentReference.set"}),Object(o.b)("inlineCode",{parentName:"a"},"set")),"\nmethod on a ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.DocumentReference"}),Object(o.b)("inlineCode",{parentName:"a"},"DocumentReference"))," instead:"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-dart",metastring:"highlight={6-8}",highlight:"{6-8}"}),"CollectionReference users = FirebaseFirestore.instance.collection('users');\n\nFuture addUser() {\n return users\n .doc('ABC123')\n .set({\n 'full_name': \"Mary Jane\",\n 'age': 18\n })\n .then((value) => print(\"User Added\"))\n .catchError((error) => print(\"Failed to add user: $error\"));\n}\n")),Object(o.b)("p",null,"Calling ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.DocumentReference.set"}),Object(o.b)("inlineCode",{parentName:"a"},"set"))," with a id that already exists on the collection will replace all the document data."),Object(o.b)("h3",{id:"updating-documents"},"Updating documents"),Object(o.b)("p",null,"Sometimes you may wish to update a document, rather than replacing all of the data. The ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.DocumentReference.set"}),Object(o.b)("inlineCode",{parentName:"a"},"set")),"\nmethod above replaces any existing data on a given ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.DocumentReference"}),Object(o.b)("inlineCode",{parentName:"a"},"DocumentReference")),".\nIf you'd like to update a document instead, use the ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.DocumentReference.update"}),Object(o.b)("inlineCode",{parentName:"a"},"update"))," method:"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-dart",metastring:"highlight={6}",highlight:"{6}"}),"CollectionReference users = FirebaseFirestore.instance.collection('users');\n\nFuture updateUser() {\n return users\n .doc('ABC123')\n .update({'company': 'Stokes and Sons'})\n .then((value) => print(\"User Updated\"))\n .catchError((error) => print(\"Failed to update user: $error\"));\n}\n")),Object(o.b)("p",null,"The method also provides support for updating deeply nested values via dot-notation:"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-dart",metastring:"highlight={6}",highlight:"{6}"}),"CollectionReference users = FirebaseFirestore.instance.collection('users');\n\nFuture updateUser() {\n return users\n .doc('ABC123')\n .update({'info.address.zipcode': 90210})\n .then((value) => print(\"User Updated\"))\n .catchError((error) => print(\"Failed to update user: $error\"));\n}\n")),Object(o.b)("h4",{id:"field-values"},"Field values"),Object(o.b)("p",null,"Cloud Firestore supports storing and manipulating values on your database, such as Timestamps, GeoPoints, Blobs and\narray management."),Object(o.b)("p",null,"To store ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore_platform_interface.GeoPoint"}),Object(o.b)("inlineCode",{parentName:"a"},"GeoPoint"))," values, provide the latitude\nand longitude to the GeoPoint class:"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-dart",metastring:"highlight={6}",highlight:"{6}"}),"CollectionReference users = FirebaseFirestore.instance.collection('users');\n\nFuture updateUser() {\n return users\n .doc('ABC123')\n .update({'info.address.location': GeoPoint(53.483959, -2.244644)})\n .then((value) => print(\"User Updated\"))\n .catchError((error) => print(\"Failed to update user: $error\"));\n}\n")),Object(o.b)("p",null,"To store a Blob such as an image, provide a ",Object(o.b)("inlineCode",{parentName:"p"},"Uint8List"),". The below example shows how to get an image from your ",Object(o.b)("inlineCode",{parentName:"p"},"assets"),"\ndirectory and nest it in the ",Object(o.b)("inlineCode",{parentName:"p"},"info")," object in Firestore."),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-dart",metastring:"highlight={4-11}",highlight:"{4-11}"}),"CollectionReference users = FirebaseFirestore.instance.collection('users');\n\nFuture updateUser() {\n return rootBundle\n .load('assets/images/sample.jpg')\n .then((bytes) => bytes.buffer.asUint8List())\n .then((avatar) {\n return users\n .doc('ABC123')\n .update({'info.avatar': Blob(avatar)});\n })\n .then((value) => print(\"User Updated\"))\n .catchError((error) => print(\"Failed to update user: $error\"));\n}\n")),Object(o.b)("h2",{id:"removing-data"},"Removing Data"),Object(o.b)("p",null,"To delete documents with Cloud Firestore, you can use the ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.DocumentReference.delete"}),Object(o.b)("inlineCode",{parentName:"a"},"delete")),"\nmethod on a ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.DocumentReference"}),Object(o.b)("inlineCode",{parentName:"a"},"DocumentReference")),":"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-dart",metastring:"highlight={6}",highlight:"{6}"}),"CollectionReference users = FirebaseFirestore.instance.collection('users');\n\nFuture deleteUser() {\n return users\n .doc('ABC123')\n .delete()\n .then((value) => print(\"User Deleted\"))\n .catchError((error) => print(\"Failed to delete user: $error\"));\n}\n")),Object(o.b)("p",null,"If you need to remove specific properties from within a document rather than the document itself,\nyou can use the ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.DocumentReference.delete"}),Object(o.b)("inlineCode",{parentName:"a"},"delete"))," method with\nthe ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.FieldValue"}),Object(o.b)("inlineCode",{parentName:"a"},"FieldValue"))," class:"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-dart",metastring:"highlight={6}",highlight:"{6}"}),"CollectionReference users = FirebaseFirestore.instance.collection('users');\n\nFuture deleteField() {\n return users\n .doc('ABC123')\n .update({'age': FieldValue.delete()})\n .then((value) => print(\"User Deleted\"))\n .catchError((error) => print(\"Failed to delete user: $error\"));\n}\n")),Object(o.b)("h2",{id:"transactions"},"Transactions"),Object(o.b)("p",null,"Transactions are a way to ensure that a write operation only occurs using the latest data available on the server.\nTransactions never partially apply writes, and writes execute at the end of a successful transaction."),Object(o.b)("p",null,"Transactions are useful when you want to update a field based on its current value, or the value of another field. If\nyou want to write multiple documents without using the documents current state, a ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"usage#batch-write"}),"batch write"),"\nshould be used."),Object(o.b)("p",null,"When using transactions, note that:"),Object(o.b)("ul",null,Object(o.b)("li",{parentName:"ul"},"Read operations must come before write operations"),Object(o.b)("li",{parentName:"ul"},"Transactions will fail is the client is offline, they cannot use cached data")),Object(o.b)("p",null,'An example of where a transaction could be used would be in an application where a user can subscribe to a channel. When\na user presses the subscribe button, a "subscribers" field in a document increments. Without using Transactions, we would\nfirst need to read the existing value, and then increment that value using two separate operations.'),Object(o.b)("p",null,"On a high traffic application, the value on the server could have already changed by the time the write operation sets\na new value, causing the number to be inconsistent."),Object(o.b)("p",null,"Transactions remove this issue by atomically updating the value of the server. If the value changes whilst the transaction\nis executing, it will retry, ensuring the value on the server is used, rather than the client value."),Object(o.b)("p",null,"To execute a transaction, call the ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.FirebaseFirestore.runTransaction"}),Object(o.b)("inlineCode",{parentName:"a"},"runTransaction"))," method:"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-dart"}),"// Create a reference to the document the transaction will use\nDocumentReference documentReference = FirebaseFirestore.instance\n .collection('users')\n .doc(documentId);\n\nreturn Firestore.instance.runTransaction((transaction) async {\n // Get the document\n DocumentSnapshot snapshot = await transaction.get(documentReference);\n\n if (!snapshot.exists) {\n throw Exception(\"User does not exist!\");\n }\n\n // Update the follower count based on the current count\n int newFollowerCount = snapshot.data()['followers'] + 1;\n\n // Perform an update on the document\n transaction.update(documentReference, {'followers': newFollowerCount});\n\n // Return the new count\n return newFollowerCount;\n})\n.then((value) => print(\"Follower count updatd to $value\"))\n.catchError((error) => print(\"Failed to update user followers: $error\"));\n")),Object(o.b)("p",null,"In the above example, if the document changes at any point during the transaction, it will retry\nup-to five times."),Object(o.b)("p",null,"You should not directly modify application state inside of the transaction, as the handler may execute multiple\ntimes. You should instead return a value at the end of the handler, updating application state once the transaction\nhas completed."),Object(o.b)("p",null,"If an exception is thrown within the handler, the entire transaction will be aborted."),Object(o.b)("h2",{id:"batch-write"},"Batch write"),Object(o.b)("p",null,"Firestore lets you execute multiple write operations as a single batch that can contain any\ncombination of ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.WriteBatch.set"}),Object(o.b)("inlineCode",{parentName:"a"},"set")),", ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.WriteBatch.update"}),Object(o.b)("inlineCode",{parentName:"a"},"update")),",\nor ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.WriteBatch.delete"}),Object(o.b)("inlineCode",{parentName:"a"},"delete"))," operations."),Object(o.b)("p",null,"First, create a new batch instance via the ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.FirebaseFirestore.batch"}),Object(o.b)("inlineCode",{parentName:"a"},"batch"))," method, then perform\nthe operations on the batch, and then commit it once ready. The below example shows how to delete\nall documents in a collection in a single operation:"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-dart"}),"CollectionReference users = FirebaseFirestore.instance.collection('users');\n\nFuture batchDelete() {\n WriteBatch batch = FirebaseFirestore.instance.batch();\n\n return users.get().then((querySnapshot) {\n querySnapshot.documents.forEach((document) {\n batch.delete(document.reference);\n });\n\n return batch.commit();\n });\n}\n")),Object(o.b)("h2",{id:"data-security"},"Data Security"),Object(o.b)("p",null,"It is important that you understand how to write rules in your Firebase console to ensure that your data is secure.\nPlease follow the Firebase Firestore documentation on ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"https://firebase.google.com/docs/firestore/security/get-started"}),"security"),"."),Object(o.b)("h2",{id:"access-data-offline"},"Access Data Offline"),Object(o.b)("h3",{id:"configure-offline-persistence"},"Configure Offline Persistence"),Object(o.b)("p",null,"Firestore provides out of the box support for offline capabilities. When reading and writing data, Firestore uses a\nlocal database which automatically synchronizes with the server. Cloud Firestore functionality continues when users are\noffline, and automatically handles data migration when they regain connectivity."),Object(o.b)("p",null,"This functionality is enabled by default, however it can be disabled if needed. The ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.FirebaseFirestore.settings"}),Object(o.b)("inlineCode",{parentName:"a"},"settings")),"\nmethod must be called before any Firestore interaction is performed:"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-dart"}),"await FirebaseFirestore.instance.settings(\n Settings(persistenceEnabled: false)\n);\n")),Object(o.b)("p",null,"If you want to clear any persisted data, you can call the ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.FirebaseFirestore.clearPersistence"}),Object(o.b)("inlineCode",{parentName:"a"},"clearPersistence()"))," method."),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-dart"}),"await FirebaseFirestore.instance.clearPersistence();\n")),Object(o.b)("p",null,"Calls to update settings or clearing persistence must be carried out before any other usage of\nFirestore. If called afterwards, they will take effect on the next Firestore claim (e.g. restarting\nthe application)."),Object(o.b)("h3",{id:"configure-cache-size"},"Configure Cache Size"),Object(o.b)("p",null,"When persistence is enabled, Firestore caches every document for offline access. After exceeding the cache size, Firestore\nwill attempt to remove older, unused data. You can configure different cache sizes, or disable the removal process:"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-dart"}),"// The default value is 40 MB. The threshold must be set to at least 1 MB,\n// and can be set to Settings.CACHE_SIZE_UNLIMITED to disable garbage collection.\n\nawait FirebaseFirestore.instance.settings(\n Settings(\n cacheSizeBytes: Settings.CACHE_SIZE_UNLIMITED\n ));\n")),Object(o.b)("h3",{id:"disable-and-enable-network-access"},"Disable and Enable Network Access"),Object(o.b)("p",null,"It is possible to disable network access for your Firestore client. While network access is disabled, all Firestore requests\nretrieve results from the cache. Any write operations are queued until network access is re-enabled."),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-dart"}),"await FirebaseFirestore.instance.disableNetwork()\n")),Object(o.b)("p",null,"To re-enabled network access, call the ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.FirebaseFirestore.enableNetwork"}),Object(o.b)("inlineCode",{parentName:"a"},"enableNetwork"))," method:"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-dart"}),"await FirebaseFirestore.instance.enableNetwork()\n")),Object(o.b)("h2",{id:"emulator-usage"},"Emulator Usage"),Object(o.b)("p",null,"If you are using the local ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"https://firebase.google.com/docs/rules/emulator-setup"}),"Firestore emulators"),", then it is possible to\nconnect to these by passing a ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.Settings.host"}),Object(o.b)("inlineCode",{parentName:"a"},"host"))," parameter to the ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"!cloud_firestore.FirebaseFirestore.settings"}),Object(o.b)("inlineCode",{parentName:"a"},"settings"))," method,\nimmediately after initializing Firebase. Ensure you pass the correct port on which the Firebase emulator is running on."),Object(o.b)("blockquote",null,Object(o.b)("p",{parentName:"blockquote"},"On Android, to reference ",Object(o.b)("inlineCode",{parentName:"p"},"localhost"),", use the ",Object(o.b)("inlineCode",{parentName:"p"},"10.0.2.2")," IP address instead.")),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-dart"}),'// Initialize first\nawait FirebaseCore.instance.initializeApp();\n\n// Set the host as soon as possible\nawait FirebaseFirestore.instance\n .settings(Settings(host: "localhost:8080", sslEnabled: false));\n')))}u.isMDXComponent=!0},180:function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return h}));var a=n(0),r=n.n(a);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function c(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l=r.a.createContext({}),u=function(e){var t=r.a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):c(c({},t),e)),n},d=function(e){var t=u(e.components);return r.a.createElement(l.Provider,{value:t},e.children)},b={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},p=r.a.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,i=e.parentName,l=s(e,["components","mdxType","originalType","parentName"]),d=u(n),p=a,h=d["".concat(i,".").concat(p)]||d[p]||b[p]||o;return n?r.a.createElement(h,c(c({ref:t},l),{},{components:n})):r.a.createElement(h,c({ref:t},l))}));function h(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=p;var c={};for(var s in t)hasOwnProperty.call(t,s)&&(c[s]=t[s]);c.originalType=e,c.mdxType="string"==typeof e?e:a,i[1]=c;for(var l=2;l\n ...\n \n \x3c!-- Add this line --\x3e\n

AdMob

AdMob usage

- - - - - - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/docs/analytics/overview/index.html b/docs/analytics/overview/index.html new file mode 100644 index 000000000000..7d999da26d1f --- /dev/null +++ b/docs/analytics/overview/index.html @@ -0,0 +1,43 @@ + + + + + + + + + + + + + +Google Analytics for Firebase | FlutterFire + + + + + + + + + + + + + + +
+

Google Analytics for Firebase

What does it do?

Google Analytics is a free app measurement solution that provides insight on app usage and user engagement. +Analytics reports help you understand clearly how your users behave, which enables you to make informed decisions regarding app marketing and performance optimizations.

Installation

1. Add dependency

pubspec.yaml
dependencies:
flutter:
sdk: flutter
firebase_core: "^0.5.0-dev.2"
firebase_analytics: "^6.0.0-dev.1"

2. Download dependency

$ flutter pub get

3. (Web Only) Add the SDK

If using FlutterFire on the web, add the firebase-analytics JavaScript SDK to your index.html file:

web/index.html
<html>
...
<body>
<script src="https://www.gstatic.com/firebasejs/7.14.4/firebase-app.js"></script>
<script src="https://www.gstatic.com/firebasejs/7.14.4/firebase-analytics.js"></script>
</body>
</html>

4. Rebuild your app

Once complete, rebuild your Flutter application:

$ flutter run

Next Steps

Once installed, you're ready to start using Firebase Analytics in your Flutter Project.

Additional documentation will be available once the Firebase Analytics plugin update lands as part of the FlutterFire roadmap.

+ + + + + + + + + + + + \ No newline at end of file diff --git a/docs/analytics/usage/index.html b/docs/analytics/usage/index.html index 4b9dd6f74054..87cb642547c7 100644 --- a/docs/analytics/usage/index.html +++ b/docs/analytics/usage/index.html @@ -14,29 +14,29 @@ Analytics | FlutterFire - - - - - - - - - - + + + + + + + + + +

Analytics

Analytics usage

- - - - - - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/docs/auth/error-handling/index.html b/docs/auth/error-handling/index.html index 5f72b2f4305f..b966aa3a153d 100644 --- a/docs/auth/error-handling/index.html +++ b/docs/auth/error-handling/index.html @@ -14,20 +14,20 @@ Error Handling | FlutterFire - - - - - - - - - - + + + + + + + + + +
-

Error Handling

The Firebase Authentication SDKs provided a simple way for catching the various errors which may occur which using +

Error Handling

The Firebase Authentication SDKs provided a simple way for catching the various errors which may occur which using authentication methods. FlutterFire exposes these errors via the FirebaseAuthException class.

At a minimum, a code and message are provided, however in some cases additional properties such as an email address and credential are also provided. For example, if the user is attempting to sign in wih an email and password, @@ -48,16 +48,16 @@

// Sign the user in with the credential
UserCredential userCredential = await auth.signInWithCredential(facebookAuthCredential);
// Link the pending credential with the existing account
await userCredential.user.linkWithCredential(pendingCredential);
// Success! Go back to your application flow
return goToApplication();
}
-
// Handle other OAuth providers...
}
}
- - - - - - - - - - +
// Handle other OAuth providers...
}
}
+ + + + + + + + + + \ No newline at end of file diff --git a/docs/auth/overview/index.html b/docs/auth/overview/index.html index f7fe7f35f820..1d5778bb68d5 100644 --- a/docs/auth/overview/index.html +++ b/docs/auth/overview/index.html @@ -14,33 +14,32 @@ Authentication | FlutterFire - - - - - - - - - - + + + + + + + + + +
-

Authentication

What does it do?

Firebase Authentication provides backend services & easy-to-use SDKs to authenticate users to your app. +

Authentication

What does it do?

Firebase Authentication provides backend services & easy-to-use SDKs to authenticate users to your app. It supports authentication using passwords, phone numbers, popular federated identity providers like Google, Facebook and Twitter, and more.

Installation

Before installing the Authentication plugin, ensure that you have followed the Getting Started documentation -and have initialized FlutterFire.

1. Add dependency

Add the firebase_auth dependency to your projects pubspec.yaml file:

pubspec.yaml
dependencies:
flutter:
sdk: flutter
firebase_core: "0.5.0-dev.1"
firebase_auth: "0.16.1"

2. Download dependency

Download the dependency by running the following command in your project:

$ flutter pub get

3. (Web Only) Add the SDK

If using FlutterFire on the web, add the firebase-auth JavaScript SDK to your index.html file:

web/index.html
<html>
...
<body>
<script src="https://www.gstatic.com/firebasejs/7.14.4/firebase-app.js"></script>
<script src="https://www.gstatic.com/firebasejs/7.14.4/firebase-auth.js"></script>
</body>
</html>

4. Rebuild your app

Once complete, rebuild your Flutter application:

$ flutter run

Next Steps

Once installed, you're ready to start using Firebase Authentication in your Flutter Project. View the -Usage documentation to get started.

- - - - - - - - - - +and have initialized FlutterFire.

1. Add dependency

Add the firebase_auth dependency to your projects pubspec.yaml file:

pubspec.yaml
dependencies:
flutter:
sdk: flutter
firebase_core: "0.5.0-dev.2"
firebase_auth: "0.17.0-dev.1"

2. Download dependency

Download the dependency by running the following command in your project:

$ flutter pub get

3. (Web Only) Add the SDK

If using FlutterFire on the web, add the firebase-auth JavaScript SDK to your index.html file:

web/index.html
<html>
...
<body>
<script src="https://www.gstatic.com/firebasejs/7.14.4/firebase-app.js"></script>
<script src="https://www.gstatic.com/firebasejs/7.14.4/firebase-auth.js"></script>
</body>
</html>

4. Rebuild your app

Once complete, rebuild your Flutter application:

$ flutter run

Next Steps

Once installed, you're ready to start using Firebase Authentication in your Flutter Project.

Additional documentation will be available once the Firebase Auth plugin update lands as part of the FlutterFire roadmap.

+ + + + + + + + + + \ No newline at end of file diff --git a/docs/auth/phone/index.html b/docs/auth/phone/index.html index e2b84aedd2f5..23d2057c8f2f 100644 --- a/docs/auth/phone/index.html +++ b/docs/auth/phone/index.html @@ -14,20 +14,20 @@ Phone Authentication | FlutterFire - - - - - - - - - - + + + + + + + + + +
-

Phone Authentication

Phone authentication allows users to sign in to Firebase using their phone as the authenticator. An SMS message is sent +

Phone Authentication

Phone authentication allows users to sign in to Firebase using their phone as the authenticator. An SMS message is sent to the user (using the provided phone number) containing a unique code. Once the code has been authorized, the user is able to sign into Firebase.

Phone numbers that end users provide for authentication will be sent and stored by Google to improve spam and abuse prevention across Google service, including to, but not limited to Firebase. Developers should ensure they have the @@ -37,7 +37,7 @@ To view an indepth explaination of this step, view the Firebase iOS Phone Auth documentation.

  • Web: Ensure that you have added your applications domian on the Firebase console, under OAuth redirect domains.
  • Note; Phone number sign-in is only available for use on real devices and the web. To test your authentication flow on device emulators, please see Testing.

    Usage

    FlutterFire provides two individual ways to sign a user in with their phone number. Native (e.g. Android & iOS) platforms provide -different functionality to validating a phone number than the web, therefore two methods exist for each platform exclusively:

    • Native Platform: verifyPhoneNumber.
    • Web Platform: signInWithPhoneNumber.

    Native: verifyPhoneNumber

    On native platforms, the users phone number must be first verified and then the user can either sign-in or link their account with a +different functionality to validating a phone number than the web, therefore two methods exist for each platform exclusively:

    Native: verifyPhoneNumber

    On native platforms, the users phone number must be first verified and then the user can either sign-in or link their account with a PhoneAuthCredential.

    First you must prompt the user for their phone number. Once provided, call the verifyPhoneNumber() method:

    await FirebaseAuth.instance.verifyPhoneNumber(
    phoneNumber: '+44 7123 123 456',
    verificationCompleted: (PhoneAuthCredential credential) {},
    verificationFailed: (FirebaseAuthException e) {},
    codeSent: (String verificationId, int resendToken) {},
    codeAutoRetrievalTimeout: (String verificationId) {},
    );

    There are 4 seperate callbacks that you must handle, each will determine how you update the application UI:

    1. verificationCompleted: Automatic handling of the SMS code on Android devices.
    2. verificationFailed: Handle failure events such as invalid phone numbers or whethehr the SMS quota has been exceeded.
    3. codeSent: Handle when a code has been sent to the device from Firebase, used to prompt users to enter the code.
    4. codeAutoRetrievalTimeout: Handle a timeout of when automatic SMS code handling fails.

    verificationCompleted

    This handler will only be called on Android devices which support automatic SMS code resolution.

    When the SMS code is delivered to the device Android will automatically verify the SMS code without requiring the user to manually input the code. If this event occurs, a PhoneAuthCredential is automatically provided which can be used to sign-in with or link the users phone number.

    FirebaseAuth auth = FirebaseAuth.instance;
    @@ -56,16 +56,16 @@ resolved an SMS message within a certain timeframe. Once the timeframe has passed, the device will no longer attempt to resolve any incoming messages.

    By default, the device waits for 30 seconds however this can be customized with the timeout argument:

    FirebaseAuth auth = FirebaseAuth.instance;
    await auth.verifyPhoneNumber(
    phoneNumber: '+44 7123 123 456',
    timeout: const Duration(seconds: 60),
    codeAutoRetrievalTimeout: (String verificationId) {
    // Auto-resolution timed out...
    },
    );

    Web: signInWithPhoneNumber

    TODO

    Testing

    Firebase provides support for locally testing phone numbers:

    1. On the Firebase Console, select the "Phone" authentication provider and click on the "Phone numbers for testing" dropdown.
    2. Enter a new phone number (e.g. +44 7444 555666) and a test code (e.g. 123456).

    If providing a test phone number to either the verifyPhoneNumber or signInWithPhoneNumber methods, no SMS will actually be sent. You -can instead provide the test code directly to the PhoneAuthProvider or with signInWithPhoneNumbers confirmation result handler.

    - - - - - - - - - - +can instead provide the test code directly to the PhoneAuthProvider or with signInWithPhoneNumbers confirmation result handler.

    + + + + + + + + + + \ No newline at end of file diff --git a/docs/auth/social/index.html b/docs/auth/social/index.html index 8c2a340acbba..f3e7f6a0d5c4 100644 --- a/docs/auth/social/index.html +++ b/docs/auth/social/index.html @@ -14,21 +14,21 @@ Social Authentication | FlutterFire - - - - - - - - - - + + + + + + + + + +
    -

    Social Authentication

    Social authentication is a multi-step authentication flow, allowing you to sign a user into an account or link -them with an existing one.

    Both native platforms and web support creating a credential which can then be passed to the signInWithCredential +

    Social Authentication

    Social authentication is a multi-step authentication flow, allowing you to sign a user into an account or link +them with an existing one.

    Both native platforms and web support creating a credential which can then be passed to the signInWithCredential or linkWithCredential methods. Alternatively on web platforms, you can trigger the authentication process via a popup or redirect.

    Google

    Most configuration is already setup when using Google Sign-In with Firebase, however you need to ensure your machines SHA1 key has been configured for use with Android. You can see view how to generate the key on the @@ -43,16 +43,16 @@ correctly. Once complete, trigger the sign-in flow, create a Facebook credential and sign the user in:

    import 'package:flutter_facebook_auth/flutter_facebook_auth.dart';
    Future<UserCredential> signInWithFacebook() async {
    // Trigger the sign-in flow
    final LoginResult result = await FacebookAuth.instance.login();
    // Create a credential from the access token
    final FacebookAuthCredential facebookAuthCredential =
    FacebookAuthProvider.credential(result.accessToken.token);
    -
    // Once signed in, return the UserCredential
    return await FirebaseAuth.instance.signInWithCredential(facebookAuthCredential);
    }
    - - - - - - - - - - +
    // Once signed in, return the UserCredential
    return await FirebaseAuth.instance.signInWithCredential(facebookAuthCredential);
    }
    + + + + + + + + + + \ No newline at end of file diff --git a/docs/auth/usage/index.html b/docs/auth/usage/index.html index f0423d16305f..8d9260717f6a 100644 --- a/docs/auth/usage/index.html +++ b/docs/auth/usage/index.html @@ -14,25 +14,25 @@ Using Firebase Authentication | FlutterFire - - - - - - - - - - + + + + + + + + + +
    -

    Using Firebase Authentication

    Once installed, you can access the firebase_auth plugin by importing it in your Dart code:

    import 'package:firebase_auth/firebase_auth.dart';

    Before using Firebase Auth, you must first have ensured you have initialized FlutterFire.

    To create a new Firebase Auth instance, call the instance getter on FirebaseAuth:

    FirebaseAuth auth = FirebaseAuth.instance;

    By default, this allows you to interact with Firebase Auth using the default Firebase App used whilst installing FlutterFire on your +

    Using Firebase Authentication

    Once installed, you can access the firebase_auth plugin by importing it in your Dart code:

    import 'package:firebase_auth/firebase_auth.dart';

    Before using Firebase Auth, you must first have ensured you have initialized FlutterFire.

    To create a new Firebase Auth instance, call the instance getter on FirebaseAuth:

    FirebaseAuth auth = FirebaseAuth.instance;

    By default, this allows you to interact with Firebase Auth using the default Firebase App used whilst installing FlutterFire on your platform. If however you'd like to use a secondary Firebase App, use the instanceFor method:

    FirebaseApp secondaryApp = Firebase.app('SecondayApp');
    FirebaseAuth auth = FirebaseAuth.instanceFor(app: secondaryApp);

    Authentication state

    Firebase Auth provides many methods and utilities for enabling you to integrate secure authentication into your new or existing Flutter application. In many cases, you will need to know about the authentication state of your user, such as whether they're logged in or logged out.

    Firebase Auth enables you to subscribe in realtime to this state via a Stream. Once called, the stream provides an immidiate event of the users current authentication state, and then provides subsequent events whenever -the authentication state changes.

    To subscribe to these changes, call the authStateChanges() method on your FirebaseAuth instance:

    FirebaseAuth.instance
    .authStateChanges()
    .listen((User user) {
    if (user == null) {
    print('User is currently signed out!');
    } else {
    print('User is signed in!');
    }
    });

    The stream returns a User class if the user is signed in, or null if they are not. You can read more +the authentication state changes.

    To subscribe to these changes, call the authStateChanges() method on your FirebaseAuth instance:

    FirebaseAuth.instance
    .authStateChanges()
    .listen((User user) {
    if (user == null) {
    print('User is currently signed out!');
    } else {
    print('User is signed in!');
    }
    });

    The stream returns a User class if the user is signed in, or null if they are not. You can read more about managing your users below.

    If you also need authentication state change events along with any user token refresh events, you can subscribe via the idTokenChanges() method instead.

    Persisting authentication state

    The Firebase SDKs for all platforms provide out of the box support for ensuring that your users authentication state is persisted across app restarts or page reloads.

    On native platforms such as Android & iOS, this behaviour is not configurable and the users authenticate state will be persisted on-device @@ -47,7 +47,7 @@ will create a new unqiue user which will be persisted across app restarts/page reloads. If the user signs-out and reauthenticates anonymously again, they will be signed-in with the previously created account. It is however important to remember the anonymous account created will not be persisted if the user uninstalls the application, clears their browser storage or uses a private browsing method (e.g. -incognito mode on Google Chrome).

    To get started, call the signInAnonymously() method on the FirebaseAuth instance:

    UserCredential userCredential = await FirebaseAuth.instance.signInAnonymously();

    Once successfully resolved, the user will be granted an anonymous account. If you are listening to changes in +incognito mode on Google Chrome).

    To get started, call the signInAnonymously() method on the FirebaseAuth instance:

    UserCredential userCredential = await FirebaseAuth.instance.signInAnonymously();

    Once successfully resolved, the user will be granted an anonymous account. If you are listening to changes in authentication state, a new event will be sent to your listeners.

    To learn more about how you can handle any errors which are thrown from the method, view the Error Handling documentation.

    Email/Password Registration & Sign-in

    Email/Password is a common user sign in method for most applications. This requires the user to provide an email address and secure password. Users can register new accounts with a method called createUserWithEmailAndPassword() or sign in to @@ -78,16 +78,16 @@ is required, create a new AuthCredential and pass it to the method. For example, to reauthenticate with email & password, create a new EmailAuthCredential:

    // Prompt the user to enter their email and password
    String email = 'barry.allen@example.com';
    String password = 'SuperSecretPassword!';
    // Create a credential
    EmailAuthCredential credential = EmailAuthProvider.credential(email, password);
    -
    // Reauthenticate
    await FirebaseAuth.instance.currentUser.reauthenticateWithCredential(credential);

    Reauthentication also works if you are using an OAuth credential instead.

    - - - - - - - - - - +
    // Reauthenticate
    await FirebaseAuth.instance.currentUser.reauthenticateWithCredential(credential);

    Reauthentication also works if you are using an OAuth credential instead.

    + + + + + + + + + + \ No newline at end of file diff --git a/docs/core/usage/index.html b/docs/core/usage/index.html index b28af73bf44a..7ec86c8b1a54 100644 --- a/docs/core/usage/index.html +++ b/docs/core/usage/index.html @@ -14,46 +14,46 @@ Core | FlutterFire - - - - - - - - - - + + + + + + + + + +
    -

    Core

    The firebase_core plugin is responsible for connecting your Flutter app to your Firebase project. The plugin must be +

    Core

    The firebase_core plugin is responsible for connecting your Flutter app to your Firebase project. The plugin must be installed and initialized before the usage of any other FlutterFire plugins. It provides basic functionality such -as:

    Installation

    The firebase_core plugin can be installed by following the Getting Started documentation. Once installed, +as:

    Installation

    The firebase_core plugin can be installed by following the Getting Started documentation. Once installed, import the plugin:

    import 'package:firebase_core/firebase_core.dart';

    Default Firebase app

    FlutterFire requires a default Firebase app to be present before initialization, otherwise an exception will be thrown. The steps for setting up a default app for your platform can be found in the Getting Started documentation.

    Some plugins such as Analytics & Performance Monitoring are only compatible with the default Firebase app, however, plugins such as Authentication can take advantage of Secondary Firebase Apps, -allowing you to use multiple Firebase projects at once.

    To access the default app, call the initializeApp or app method on the Firebase class:

    FirebaseApp defaultApp = await Firebase.initializeApp();
    // or
    FirebaseApp defaultApp = Firebase.app();

    Secondary Firebase apps

    Some FlutterFire plugins allow the usage of secondary Firebase apps, letting you interchange the project the -plugin uses. Currently, the Firebase SDKs provide functionality for using secondary apps with the following services:

    • Authentication.
    • Realtime Database.
    • Cloud Firestore.
    • Cloud Functions.
    • Cloud Storage.
    • Instance ID.
    • ML Kit Natural Language.
    • ML Kit Vision.
    • Remote Config.

    Initializing secondary apps

    To initialize a secondary app, call the initializeApp method with a name and options:

    await Firebase.initializeApp(
    name: 'SecondaryApp',
    options: const FirebaseOptions(
    appId: 'my_appId',
    apiKey: 'my_apiKey',
    messagingSenderId: 'my_messagingSenderId',
    projectId: 'my_projectId'
    )
    );

    At a minimum, you must provide the appId, apiKey, messagingSenderId and projectId. Although the other options -are not required, it is recommended you view the FirebaseOptions reference API for the full list of options available.

    Accessing secondary apps

    Once initialized, secondary apps can be accessed via the app method on FirebaseCore:

    FirebaseApp secondaryApp = Firebase.app('SecondaryApp');

    Attempting to access an app that does not exist will throw an exception.

    It is also possible to get all existing apps at once via the apps static property on Firebase class:

    List<FirebaseApp> apps = Firebase.apps;
    +allowing you to use multiple Firebase projects at once.

    To access the default app, call the initializeApp or app method on the Firebase class:

    FirebaseApp defaultApp = await Firebase.initializeApp();
    // or
    FirebaseApp defaultApp = Firebase.app();

    Secondary Firebase apps

    Some FlutterFire plugins allow the usage of secondary Firebase apps, letting you interchange the project the +plugin uses. Currently, the Firebase SDKs provide functionality for using secondary apps with the following services:

    • Authentication.
    • Realtime Database.
    • Cloud Firestore.
    • Cloud Functions.
    • Cloud Storage.
    • Instance ID.
    • ML Kit Natural Language.
    • ML Kit Vision.
    • Remote Config.

    Initializing secondary apps

    To initialize a secondary app, call the initializeApp method with a name and options:

    await Firebase.initializeApp(
    name: 'SecondaryApp',
    options: const FirebaseOptions(
    appId: 'my_appId',
    apiKey: 'my_apiKey',
    messagingSenderId: 'my_messagingSenderId',
    projectId: 'my_projectId'
    )
    );

    At a minimum, you must provide the appId, apiKey, messagingSenderId and projectId. Although the other options +are not required, it is recommended you view the FirebaseOptions reference API for the full list of options available.

    Accessing secondary apps

    Once initialized, secondary apps can be accessed via the app method on FirebaseCore:

    FirebaseApp secondaryApp = Firebase.app('SecondaryApp');

    Attempting to access an app that does not exist will throw an exception.

    It is also possible to get all existing apps at once via the apps static property on Firebase class:

    List<FirebaseApp> apps = Firebase.apps;
    apps.forEach((app) {
    print('App name: ${app.name}');
    });

    Using app instances

    Each FlutterFire plugin provides a streamlined approach for using the default app as well as secondary apps (if applicable). The convenient way to use the default app is by accessing the instance property on each plugin base class. For example if using Cloud Firestore:

    // Access Firestore using the default Firebase app:
    Firestore firestore = Firestore.instance;
    firestore
    .collection('users')
    .snapshots()
    .listen((QuerySnapshot snapshot) {
    // Query snapshot of the users collection on the default Firebase app
    });

    If instead you'd like to use a secondary app, pass it to the instanceFor static method on each plugin base class. For example if using Cloud Firestore:

    FirebaseApp secondaryApp = Firebase.app('SecondaryApp');
    Firestore firestore = Firestore.instanceFor(
    app: secondaryApp
    );
    -
    firestore
    .collection('users')
    .snapshots()
    .listen((QuerySnapshot snapshot) {
    // Query snapshot of the users collection on the SecondaryApp
    });

    Deleting instances

    If you no longer need a secondary app, you can delete it by calling the delete method on the FirebaseApp instance:

    FirebaseApp secondaryApp = Firebase.app('SecondaryApp');
    +
    firestore
    .collection('users')
    .snapshots()
    .listen((QuerySnapshot snapshot) {
    // Query snapshot of the users collection on the SecondaryApp
    });

    Deleting instances

    If you no longer need a secondary app, you can delete it by calling the delete method on the FirebaseApp instance:

    FirebaseApp secondaryApp = Firebase.app('SecondaryApp');
    await secondaryApp.delete();

    Any plugin usage attempting to use a deleted app will throw an exception. The default app cannot be deleted and will -throw an exception if deleted.

    - - - - - - - - - - +throw an exception if deleted.

    + + + + + + + + + + \ No newline at end of file diff --git a/docs/crashlytics/usage/index.html b/docs/crashlytics/usage/index.html index 0a0a465c9e81..93b479c6ad94 100644 --- a/docs/crashlytics/usage/index.html +++ b/docs/crashlytics/usage/index.html @@ -14,29 +14,29 @@ Crashlytics | FlutterFire - - - - - - - - - - + + + + + + + + + +

    Crashlytics

    Crashlytics usage

    - - - - - - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/docs/database/overview/index.html b/docs/database/overview/index.html new file mode 100644 index 000000000000..c4d4b5b655e0 --- /dev/null +++ b/docs/database/overview/index.html @@ -0,0 +1,44 @@ + + + + + + + + + + + + + +Realtime Database | FlutterFire + + + + + + + + + + + + + + +
    +

    Realtime Database

    What does it do?

    The Firebase Realtime Database is a cloud-hosted database. Data is stored as JSON and +synchronized in realtime to every connected client. When you build cross-platform apps Flutter & Firebase, +all of your clients can share one Realtime Database instance and automatically receive updates with the newest data.

    Installation

    1. Add dependency

    pubspec.yaml
    dependencies:
    flutter:
    sdk: flutter
    firebase_core: "^0.5.0-dev.2"
    firebase_database: "^4.0.0-dev.1"

    2. Download dependency

    $ flutter pub get

    3. (Web Only) Add the SDK

    Web is currently not supported. See the FlutterFire roadmap.

    4. Rebuild your app

    Once complete, rebuild your Flutter application:

    $ flutter run

    Next Steps

    Once installed, you're ready to start using Realtime Database in your Flutter Project.

    Additional documentation will be available once the Realtime Database plugin update lands as part of the FlutterFire roadmap.

    + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/database/usage/index.html b/docs/database/usage/index.html index 1ffea1676ef9..d5f2f92f5f50 100644 --- a/docs/database/usage/index.html +++ b/docs/database/usage/index.html @@ -14,29 +14,29 @@ Realtime Database | FlutterFire - - - - - - - - - - + + + + + + + + + +

    Realtime Database

    Realtime Database usage

    - - - - - - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/docs/dynamic-links/usage/index.html b/docs/dynamic-links/usage/index.html index be0dc8bfbb01..bc32861fd5d0 100644 --- a/docs/dynamic-links/usage/index.html +++ b/docs/dynamic-links/usage/index.html @@ -14,29 +14,29 @@ Dynamic Links | FlutterFire - - - - - - - - - - + + + + + + + + + +

    Dynamic Links

    Dynamic Links usage

    - - - - - - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/docs/firestore/overview/index.html b/docs/firestore/overview/index.html index 25fa43542eae..deef29402db4 100644 --- a/docs/firestore/overview/index.html +++ b/docs/firestore/overview/index.html @@ -14,31 +14,31 @@ Cloud Firestore | FlutterFire - - - - - - - - - - + + + + + + + + + +
    -

    Cloud Firestore

    What does it do?

    Firestore is a flexible, scalable NoSQL cloud database to store and sync data. -It keeps your data in sync across client apps through realtime listeners and offers offline support so you can build responsive apps that work regardless of network latency or Internet connectivity.

    Installation

    1. Add dependency

    pubspec.yaml
    dependencies:
    flutter:
    sdk: flutter
    firebase_core: "0.5.0-dev.1"
    cloud_firestore: "0.14.0-dev.1"

    2. Download dependency

    $ flutter pub get

    3. (Web Only) Add the SDK

    If using FlutterFire on the web, add the firebase-auth JavaScript SDK to your index.html file:

    web/index.html
    <html>
    ...
    <body>
    <script src="https://www.gstatic.com/firebasejs/7.14.4/firebase-app.js"></script>
    <script src="https://www.gstatic.com/firebasejs/7.14.4/firebase-firestore.js"></script>
    </body>
    </html>

    4. Rebuild your app

    Once complete, rebuild your Flutter application:

    $ flutter run

    Next Steps

    Once installed, you're ready to start using Cloud Firestore in your Flutter Project. View the -Usage documentation to get started.

    - - - - - - - - - - +

    Cloud Firestore

    What does it do?

    Firestore is a flexible, scalable NoSQL cloud database to store and sync data. +It keeps your data in sync across client apps through realtime listeners and offers offline support so you can build responsive apps that work regardless of network latency or Internet connectivity.

    Installation

    1. Add dependency

    pubspec.yaml
    dependencies:
    flutter:
    sdk: flutter
    firebase_core: "0.5.0-dev.2"
    cloud_firestore: "0.14.0-dev.1"

    2. Download dependency

    $ flutter pub get

    3. (Web Only) Add the SDK

    If using FlutterFire on the web, add the firebase-firestore JavaScript SDK to your index.html file:

    web/index.html
    <html>
    ...
    <body>
    <script src="https://www.gstatic.com/firebasejs/7.14.4/firebase-app.js"></script>
    <script src="https://www.gstatic.com/firebasejs/7.14.4/firebase-firestore.js"></script>
    </body>
    </html>

    4. Rebuild your app

    Once complete, rebuild your Flutter application:

    $ flutter run

    Next Steps

    Once installed, you're ready to start using Cloud Firestore in your Flutter Project. View the +Usage documentation to get started.

    + + + + + + + + + + \ No newline at end of file diff --git a/docs/firestore/usage/index.html b/docs/firestore/usage/index.html index 2182753573e8..4b8088073e3a 100644 --- a/docs/firestore/usage/index.html +++ b/docs/firestore/usage/index.html @@ -14,20 +14,20 @@ Cloud Firestore | FlutterFire - - - - - - - - - - + + + + + + + + + +
    -

    Cloud Firestore

    To start using the Cloud Firestore package within your project, import it at the top of your project files:

    import 'package:cloud_firestore/cloud_firestore.dart';

    Before using Firestore, you must first have ensured you have initialized FlutterFire.

    To create a new Firestore instance, call the instance getter on FirebaseFirestore:

    FirebaseFirestore firestore = FirebaseFirestore.instance;

    By default, this allows you to interact with Firestore using the default Firebase App used whilst installing FlutterFire on your +

    Cloud Firestore

    To start using the Cloud Firestore package within your project, import it at the top of your project files:

    import 'package:cloud_firestore/cloud_firestore.dart';

    Before using Firestore, you must first have ensured you have initialized FlutterFire.

    To create a new Firestore instance, call the instance getter on FirebaseFirestore:

    FirebaseFirestore firestore = FirebaseFirestore.instance;

    By default, this allows you to interact with Firestore using the default Firebase App used whilst installing FlutterFire on your platform. If however you'd like to use Firestore with a secondary Firebase App, use the instanceFor method:

    FirebaseApp secondaryApp = Firebase.app('SecondayApp');
    FirebaseFirestore firestore = FirebaseFirestore.instanceFor(app: secondaryApp);

    Collections & Documents

    Firestore stores data within "documents", which are contained within "collections". Documents can also contain nested collections. For example, our users would each have their own "document" stored inside the "Users" collection. The collection method allows us to reference a collection within our code.

    In the below example, we can reference the collection users, and create a new user document when a button is pressed:

    import 'package:flutter/material.dart';
    @@ -130,16 +130,16 @@ retrieve results from the cache. Any write operations are queued until network access is re-enabled.

    await FirebaseFirestore.instance.disableNetwork()

    To re-enabled network access, call the enableNetwork method:

    await FirebaseFirestore.instance.enableNetwork()

    Emulator Usage

    If you are using the local Firestore emulators, then it is possible to connect to these by passing a host parameter to the settings method, immediately after initializing Firebase. Ensure you pass the correct port on which the Firebase emulator is running on.

    On Android, to reference localhost, use the 10.0.2.2 IP address instead.

    // Initialize first
    await FirebaseCore.instance.initializeApp();
    -
    // Set the host as soon as possible
    await FirebaseFirestore.instance
    .settings(Settings(host: "localhost:8080", sslEnabled: false));
    - - - - - - - - - - +
    // Set the host as soon as possible
    await FirebaseFirestore.instance
    .settings(Settings(host: "localhost:8080", sslEnabled: false));
    + + + + + + + + + + \ No newline at end of file diff --git a/docs/functions/overview/index.html b/docs/functions/overview/index.html new file mode 100644 index 000000000000..41967864215f --- /dev/null +++ b/docs/functions/overview/index.html @@ -0,0 +1,45 @@ + + + + + + + + + + + + + +Cloud Functions | FlutterFire + + + + + + + + + + + + + + +
    +

    Cloud Functions

    What does it do?

    Firebase Cloud Functions let you automatically run backend code in response to events +triggered by Firebase features and HTTPS requests. Your code is stored in Google's cloud +and runs in a managed environment. There's no need to manage and scale your own servers.

    Installation

    Before installing the Cloud Functions plugin, ensure that you have followed the Getting Started documentation +and have initialized FlutterFire.

    1. Add dependency

    Add the cloud_functions dependency to your projects pubspec.yaml file:

    pubspec.yaml
    dependencies:
    flutter:
    sdk: flutter
    firebase_core: "^0.5.0-dev.2"
    cloud_functions: "^0.6.0-dev.2"

    2. Download dependency

    Download the dependency by running the following command in your project:

    $ flutter pub get

    3. (Web Only) Add the SDK

    If using FlutterFire on the web, add the firebase-functions JavaScript SDK to your index.html file:

    web/index.html
    <html>
    ...
    <body>
    <script src="https://www.gstatic.com/firebasejs/7.14.4/firebase-app.js"></script>
    <script src="https://www.gstatic.com/firebasejs/7.14.4/firebase-functions.js"></script>
    </body>
    </html>

    4. Rebuild your app

    Once complete, rebuild your Flutter application:

    $ flutter run

    Next Steps

    Once installed, you're ready to start using Cloud Functions in your Flutter Project.

    Additional documentation will be available once the Cloud Functions plugin update lands as part of the FlutterFire roadmap.

    + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/functions/usage/index.html b/docs/functions/usage/index.html index dca3fd227bb5..4a052d72737b 100644 --- a/docs/functions/usage/index.html +++ b/docs/functions/usage/index.html @@ -14,29 +14,29 @@ Cloud Functions | FlutterFire - - - - - - - - - - + + + + + + + + + +

    Cloud Functions

    Cloud Functions usage

    - - - - - - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/docs/iid/usage/index.html b/docs/iid/usage/index.html index e6b24221f562..0f8f3c7d564a 100644 --- a/docs/iid/usage/index.html +++ b/docs/iid/usage/index.html @@ -14,29 +14,29 @@ Instance ID | FlutterFire - - - - - - - - - - + + + + + + + + + +

    Instance ID

    Instance ID usage

    - - - - - - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/docs/in-app-messaging/usage/index.html b/docs/in-app-messaging/usage/index.html index 2e030fd17394..6161350dda6f 100644 --- a/docs/in-app-messaging/usage/index.html +++ b/docs/in-app-messaging/usage/index.html @@ -14,29 +14,29 @@ In-App Messaging | FlutterFire - - - - - - - - - - + + + + + + + + + +

    In-App Messaging

    In-App Messaging usage

    - - - - - - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/docs/index.html b/docs/index.html index 5d986c396662..647834e2a439 100644 --- a/docs/index.html +++ b/docs/index.html @@ -13,17 +13,17 @@ - - - - + + + +
    - - - - + + + + \ No newline at end of file diff --git a/docs/installation/android/index.html b/docs/installation/android/index.html index 9ddfcc94d2b6..0c5f479a5704 100644 --- a/docs/installation/android/index.html +++ b/docs/installation/android/index.html @@ -14,20 +14,20 @@ Android Installation | FlutterFire - - - - - - - - - - + + + + + + + + + +
    -

    Android Installation

    Before using FlutterFire on Android, you must first connect to your Firebase project with your Android application.

    Generating Android credentials

    On the Firebase Console, add a new Android app or select an +

    Android Installation

    Before using FlutterFire on Android, you must first connect to your Firebase project with your Android application.

    Generating Android credentials

    On the Firebase Console, add a new Android app or select an existing Android app for your Firebase project.

    The "Android package name" must match your local project's package name that was created when you started the Flutter project. The current package name can be found in the manifest tag within the project's /android/app/src/main/AndroidManifest.xml file.

    When creating a new Android app "debug signing certificate SHA-1" is optional, however, it is required for Dynamic Links @@ -39,15 +39,15 @@ build system and you will get an error stating Error while merging dex archives: The number of method references in a .dex file cannot exceed 64K.

    If you do get this error, we suggest enabling Multidex for Android.

    Enabling Multidex

    Open the /android/app/build.gradle file. Under dependencies you need to add the multidex module, and enable it within the defaultConfig:

    android {
    defaultConfig {
    multiDexEnabled true
    }
    }
    dependencies {
    implementation 'com.android.support:multidex:1.0.3'
    }

    Initializing FlutterFire

    Once complete follow the instructions on Initializing FlutterFire.

    - - - - - - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/docs/installation/ios/index.html b/docs/installation/ios/index.html index f0fbe479ac1c..ba28192e1a0a 100644 --- a/docs/installation/ios/index.html +++ b/docs/installation/ios/index.html @@ -14,33 +14,33 @@ iOS Installation | FlutterFire - - - - - - - - - - + + + + + + + + + +
    -

    iOS Installation

    Before using FlutterFire on iOS, you must first connect to your Firebase project with your iOS application.

    Generating iOS credentials

    On the Firebase Console, add a new iOS app or select an +

    iOS Installation

    Before using FlutterFire on iOS, you must first connect to your Firebase project with your iOS application.

    Generating iOS credentials

    On the Firebase Console, add a new iOS app or select an existing iOS app for your Firebase project. The "iOS bundle ID" must match your local project bundle ID. The ID can be found within the "General" tab when opening the project with Xcode.

    Download the GoogleService-Info.plist file for the Firebase app.

    Next you must add the file to the project using XCode (adding manually via the filesystem won't link the file to the project). Using XCode, open the project's ios/{projectName}.xcworkspace file. Right click the project name within XCode and select "Add files", as seen below:

    Select the GoogleService-Info.plist file you downloaded, and ensure the "Copy items if needed" checkbox is enabled:

    Initializing FlutterFire

    Once complete follow the instructions on Initializing FlutterFire.

    - - - - - - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/docs/installation/web/index.html b/docs/installation/web/index.html index 553b015e6d6a..fbf6b9bf1450 100644 --- a/docs/installation/web/index.html +++ b/docs/installation/web/index.html @@ -14,20 +14,20 @@ Web Installation | FlutterFire - - - - - - - - - - + + + + + + + + + +
    -

    Web Installation

    Before using FlutterFire on the web, you must first import the Firebase JavaScript SDK and initialize Firebase.

    caution

    Support for web is currently limited. We are working to bring full support for web to all plugins. To learn more, visit +

    Web Installation

    Before using FlutterFire on the web, you must first import the Firebase JavaScript SDK and initialize Firebase.

    caution

    Support for web is currently limited. We are working to bring full support for web to all plugins. To learn more, visit the FlutterFire Roadmap.

    Add Firebase SDKs

    The only way to currently add the Firebase SDKs to your Flutter web project is by importing the scripts from the Firebase content delivery network (CDN). Add the firebase-app.js script to your index.html file:

    web/index.html
    <html>
    ...
    <body>
    <!-- Add this line -->
    <script src="https://www.gstatic.com/firebasejs/7.14.4/firebase-app.js"></script>
    <script src="main.dart.js" type="application/javascript"></script>
    </body>
    </html>

    For more information on setting Firebase up for the web, view the official documentation.

    We are actively investigating ways to initialize Firebase without directly using the CDN and will update the documentation @@ -36,16 +36,16 @@ details.

    Initialize Firebase using these credentials, placing the following script below the CDN imports added above:

    web/index.html
    <html>
    ...
    <body>
    <script src="https://www.gstatic.com/firebasejs/7.14.4/firebase-app.js"></script>
    <!-- Firebase Credentials -->
    <script>
    var firebaseConfig = {
    apiKey: "...",
    authDomain: "[YOUR_PROJECT].firebaseapp.com",
    databaseURL: "https://[YOUR_PROJECT].firebaseio.com",
    projectId: "[YOUR_PROJECT]",
    storageBucket: "[YOUR_PROJECT].appspot.com",
    messagingSenderId: "...",
    appId: "1:...:web:...",
    measurementId: "G-...",
    };
    // Initialize Firebase
    firebase.initializeApp(firebaseConfig);
    </script>
    -
    <script src="main.dart.js" type="application/javascript"></script>
    </body>
    </html>

    Initializing FlutterFire

    Once complete follow the instructions on Initializing FlutterFire.

    - - - - - - - - - - +
    <script src="main.dart.js" type="application/javascript"></script>
    </body>
    </html>

    Initializing FlutterFire

    Once complete follow the instructions on Initializing FlutterFire.

    + + + + + + + + + + \ No newline at end of file diff --git a/docs/messaging/usage/index.html b/docs/messaging/usage/index.html index 4af8662352f1..eb37c6509eb0 100644 --- a/docs/messaging/usage/index.html +++ b/docs/messaging/usage/index.html @@ -14,29 +14,29 @@ Cloud Messaging | FlutterFire - - - - - - - - - - + + + + + + + + + +

    Cloud Messaging

    Cloud Messaging usage

    - - - - - - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/docs/ml-language/usage/index.html b/docs/ml-language/usage/index.html index 120e0ad56535..2f7308a85cee 100644 --- a/docs/ml-language/usage/index.html +++ b/docs/ml-language/usage/index.html @@ -14,29 +14,29 @@ ML Kit Vision | FlutterFire - - - - - - - - - - + + + + + + + + + +

    ML Kit Vision

    ML Kit Vision usage

    - - - - - - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/docs/ml-vision/usage/index.html b/docs/ml-vision/usage/index.html index f5e2242f71bf..46bd6149b027 100644 --- a/docs/ml-vision/usage/index.html +++ b/docs/ml-vision/usage/index.html @@ -14,29 +14,29 @@ ML Kit Language | FlutterFire - - - - - - - - - - + + + + + + + + + +

    ML Kit Language

    ML Kit Language usage

    - - - - - - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/docs/overview/index.html b/docs/overview/index.html index 03d521dcf73c..69f8dea3e212 100644 --- a/docs/overview/index.html +++ b/docs/overview/index.html @@ -14,25 +14,25 @@ FlutterFire Overview | FlutterFire - - - - - - - - - - + + + + + + + + + +
    -
    FlutterFire Logo

    FlutterFire Overview

    Welcome to FlutterFire! 🔥

    FlutterFire is a set of Flutter plugins which connect your Flutter application to Firebase.

    FlutterFire is currently a work in progress as we work towards a stable release. Plugins & documentation may be incomplete +

    FlutterFire Logo

    FlutterFire Overview

    Welcome to FlutterFire! 🔥

    FlutterFire is a set of Flutter plugins which connect your Flutter application to Firebase.

    FlutterFire is currently a work in progress as we work towards a stable release. Plugins & documentation may be incomplete or missing functionality.

    Prerequisites

    Before getting started, the documentation assumes you are able to create (or have an existing) Flutter project and also have an active Firebase project. If you do not meet these prerequisites, follow the links below:

    Installation

    Before any Firebase services can be used, you must first install the firebase_core -plugin, which is responsible for connecting your application to Firebase. Add the plugin to your pubspec.yaml file:

    pubspec.yaml
    dependencies:
    flutter:
    sdk: flutter
    firebase_core: "0.5.0-dev.1"

    Install the plugin by running the following command from the project root:

    $ flutter pub get

    Platform Setup

    Once installed, Firebase needs to be configured to work with the various platforms you're working with:

    1. Android Installation.
    2. iOS Installation.
    3. Web Installation.

    Initializing FlutterFire

    Before any of the Firebase services can be used, FlutterFire needs to be initialized (you can think of this process as +plugin, which is responsible for connecting your application to Firebase. Add the plugin to your pubspec.yaml file:

    pubspec.yaml
    dependencies:
    flutter:
    sdk: flutter
    firebase_core: "0.5.0-dev.2"

    Install the plugin by running the following command from the project root:

    $ flutter pub get

    Platform Setup

    Once installed, Firebase needs to be configured to work with the various platforms you're working with:

    1. Android Installation.
    2. iOS Installation.
    3. Web Installation.

    Initializing FlutterFire

    Before any of the Firebase services can be used, FlutterFire needs to be initialized (you can think of this process as FlutterFire "bootstrapping" itself). The initialization step is asynchronous, meaning you'll need to prevent any FlutterFire -related usage until the initialization is completed.

    To initialize FlutterFire, call the initializeApp method on the Firebase class:

    await Firebase.initializeApp();

    The method is asynchronous and returns a Future, so +related usage until the initialization is completed.

    To initialize FlutterFire, call the initializeApp method on the Firebase class:

    await Firebase.initializeApp();

    The method is asynchronous and returns a Future, so you need to ensure it has completed before displaying your main application. The examples below show how this can be achieved with a FutureBuilder or a StatefulWidget:

    lib/main.dart
    import 'package:flutter/material.dart';
    @@ -41,18 +41,18 @@
    class App extends StatelessWidget {
    @override
    Widget build(BuildContext context) {
    return FutureBuilder(
    // Initialize FlutterFire
    future: Firebase.initializeApp(),
    builder: (context, snapshot) {
    // Check for errors
    if (snapshot.hasError) {
    return SomethingWentWrong();
    }
    // Once complete, show your application
    if (snapshot.connectionState == ConnectionState.done) {
    return MyAwesomeApp();
    }
    // Otherwise, show something whilst waiting for initialization to complete
    return Loading();
    },
    );
    }
    }

    Once initialized, you're ready to get started using FlutterFire!

    Overriding Native SDK Versions

    FlutterFire internally sets the versions of the native SDKs that each module uses. Each release is tested against a fixed -set of SDK version to ensure everything works as expected.

    If you wish to change these versions, you can manually override the native SDK versions

    Android

    In the /android/app/build.gradle file, you can provide your own versions using the options shown below:

    project.ext {
    set('FlutterFire', [
    FirebaseSDKVersion: '21.1.0'
    ])
    }

    iOS

    Open your /ios/Podfile and add any of the globals below to the top of the file:

    # Override Firebase SDK Version
    $FirebaseSDKVersion = '21.1.0'

    Next Steps

    On its own the firebase_core plugin provides basic functionality for usage with Firebase. FlutterFire is broken down +set of SDK version to ensure everything works as expected.

    If you wish to change these versions, you can manually override the native SDK versions

    Android

    In the /android/app/build.gradle file, you can provide your own versions using the options shown below:

    project.ext {
    set('FlutterFire', [
    FirebaseSDKVersion: '21.1.0'
    ])
    }

    iOS

    Open your /ios/Podfile and add any of the globals below to the top of the file:

    # Override Firebase SDK Version
    $FirebaseSDKVersion = '21.1.0'

    Next Steps

    On its own the firebase_core plugin provides basic functionality for usage with Firebase. FlutterFire is broken down into several individual installable plugins that allow you to integrate with a specific Firebase service.

    The table below lists all of the currently supported plugins. You can follow the documentation for each plugin to get started:

    FirebaseDescriptionFlutterFire Plugin
    AuthenticationUsing Firebase Authentication you can authenticate users to your app using several methods such as passwords, phone numbers, and popular federated providers like Google, Facebook, and more.

    View documentation »
    firebase_auth
    Cloud FirestoreCloud Firestore is a flexible, scalable database for mobile, web, and server development from Firebase and Google Cloud Platform. Cloud Firestore also offers seamless integration with other Firebase and Google Cloud Platform products, including Cloud Functions.

    View documentation »
    cloud_firestore
    CoreThe firebase_core plugin is used to initialize FlutterFire and connect your application with multiple Firebase projects.

    View documentation »
    firebase_core
    - - - - - - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/docs/performance/overview/index.html b/docs/performance/overview/index.html new file mode 100644 index 000000000000..22aa6396c488 --- /dev/null +++ b/docs/performance/overview/index.html @@ -0,0 +1,42 @@ + + + + + + + + + + + + + +Performance Monitoring | FlutterFire + + + + + + + + + + + + + + +
    +

    Performance Monitoring

    What does it do?

    Firebase Performance Monitoring is a service that helps you to gain insight into the performance characteristics of your iOS, Android, and web apps.

    Installation

    1. Add dependency

    pubspec.yaml
    dependencies:
    flutter:
    sdk: flutter
    firebase_core: "^0.5.0-dev.2"
    firebase_performance: "^0.4.0-dev.1"

    2. Download dependency

    $ flutter pub get

    3. (Web Only) Add the SDK

    Web is currently not supported. See the FlutterFire roadmap.

    4. Rebuild your app

    Once complete, rebuild your Flutter application:

    $ flutter run

    Next Steps

    Once installed, you're ready to start using Performance Monitoring in your Flutter Project.

    Additional documentation will be available once the Firebase Performance Monitoring plugin update lands as part of the FlutterFire roadmap.

    + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/performance/usage/index.html b/docs/performance/usage/index.html index 4aa01e8177c3..4fd26366bd4b 100644 --- a/docs/performance/usage/index.html +++ b/docs/performance/usage/index.html @@ -14,29 +14,29 @@ Performance Monitoring | FlutterFire - - - - - - - - - - + + + + + + + + + +

    Performance Monitoring

    Performance Monitoring usage

    - - - - - - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/docs/remote-config/usage/index.html b/docs/remote-config/usage/index.html index f21207bb91db..c460c58f2fcd 100644 --- a/docs/remote-config/usage/index.html +++ b/docs/remote-config/usage/index.html @@ -14,29 +14,29 @@ Remote Config | FlutterFire - - - - - - - - - - + + + + + + + + + +

    Remote Config

    Remote Config usage

    - - - - - - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/docs/storage/overview/index.html b/docs/storage/overview/index.html new file mode 100644 index 000000000000..9ad9bfa52e57 --- /dev/null +++ b/docs/storage/overview/index.html @@ -0,0 +1,43 @@ + + + + + + + + + + + + + +Cloud Storage | FlutterFire + + + + + + + + + + + + + + +
    +

    Cloud Storage

    What does it do?

    Cloud Storage is designed to help you quickly and easily store and serve user-generated content, such as photos and videos.

    Installation

    1. Add dependency

    pubspec.yaml
    dependencies:
    flutter:
    sdk: flutter
    firebase_core: "^0.5.0-dev.2"
    firebase_storage: "^4.0.0-dev.1"

    2. Download dependency

    $ flutter pub get

    3. (Web Only) Add the SDK

    Web is currently not supported. See the FlutterFire roadmap.

    4. Rebuild your app

    Once complete, rebuild your Flutter application:

    $ flutter run

    Next Steps

    Once installed, you're ready to start using Cloud Storage in your Flutter Project. View the +Usage documentation to get started.

    + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/storage/usage/index.html b/docs/storage/usage/index.html index 8c83ccbe98ab..92836b39ff11 100644 --- a/docs/storage/usage/index.html +++ b/docs/storage/usage/index.html @@ -11,32 +11,32 @@ -Cloud Storage | FlutterFire +Cloud Storage | FlutterFire - - - - - - - - - - + + + + + + + + + +
    -

    Cloud Storage

    Cloud Storage usage

    - - - - - - - - - - +
    + + + + + + + + + + \ No newline at end of file diff --git a/e2c3a567.5327fcfd.js b/e2c3a567.5327fcfd.js new file mode 100644 index 000000000000..2cc256fbd094 --- /dev/null +++ b/e2c3a567.5327fcfd.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[40],{181:function(e,t,n){"use strict";n.r(t),n.d(t,"frontMatter",(function(){return c})),n.d(t,"metadata",(function(){return l})),n.d(t,"rightToc",(function(){return d})),n.d(t,"default",(function(){return p}));var r,a=n(2),o=n(9),i=(n(0),n(185)),c={title:"Realtime Database",sidebar_label:"Overview"},l={id:"database/overview",title:"Realtime Database",description:"What does it do?",source:"@site/../docs/database/overview.mdx",permalink:"/docs/database/overview",editUrl:"https://github.com/FirebaseExtended/flutterfire/edit/master/docs/../docs/database/overview.mdx",sidebar_label:"Overview",sidebar:"main",previous:{title:"Core",permalink:"/docs/core/usage"},next:{title:"Performance Monitoring",permalink:"/docs/performance/overview"}},d=[{value:"What does it do?",id:"what-does-it-do",children:[]},{value:"Installation",id:"installation",children:[{value:"1. Add dependency",id:"1-add-dependency",children:[]},{value:"2. Download dependency",id:"2-download-dependency",children:[]},{value:"3. (Web Only) Add the SDK",id:"3-web-only-add-the-sdk",children:[]},{value:"4. Rebuild your app",id:"4-rebuild-your-app",children:[]}]},{value:"Next Steps",id:"next-steps",children:[]}],b=(r="YouTube",function(e){return console.warn("Component "+r+" was not imported, exported, or provided by MDXProvider as global scope"),Object(i.b)("div",e)}),u={rightToc:d};function p(e){var t=e.components,n=Object(o.a)(e,["components"]);return Object(i.b)("wrapper",Object(a.a)({},u,n,{components:t,mdxType:"MDXLayout"}),Object(i.b)("h2",{id:"what-does-it-do"},"What does it do?"),Object(i.b)("p",null,"The Firebase Realtime Database is a cloud-hosted database. Data is stored as JSON and\nsynchronized in realtime to every connected client. When you build cross-platform apps Flutter & Firebase,\nall of your clients can share one Realtime Database instance and automatically receive updates with the newest data."),Object(i.b)(b,{id:"U5aeM5dvUpA",mdxType:"YouTube"}),Object(i.b)("h2",{id:"installation"},"Installation"),Object(i.b)("h3",{id:"1-add-dependency"},"1. Add dependency"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml",metastring:'{5} title="pubspec.yaml"',"{5}":!0,title:'"pubspec.yaml"'}),'dependencies:\n flutter:\n sdk: flutter\n firebase_core: "^{{ plugins.firebase_core }}"\n firebase_database: "^{{ plugins.firebase_database }}"\n')),Object(i.b)("h3",{id:"2-download-dependency"},"2. Download dependency"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{}),"$ flutter pub get\n")),Object(i.b)("h3",{id:"3-web-only-add-the-sdk"},"3. (Web Only) Add the SDK"),Object(i.b)("blockquote",null,Object(i.b)("p",{parentName:"blockquote"},"Web is currently not supported. See the ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/FirebaseExtended/flutterfire/issues/2582"}),"FlutterFire roadmap"),".")),Object(i.b)("h3",{id:"4-rebuild-your-app"},"4. Rebuild your app"),Object(i.b)("p",null,"Once complete, rebuild your Flutter application:"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-bash"}),"$ flutter run\n")),Object(i.b)("h2",{id:"next-steps"},"Next Steps"),Object(i.b)("p",null,"Once installed, you're ready to start using Realtime Database in your Flutter Project."),Object(i.b)("blockquote",null,Object(i.b)("p",{parentName:"blockquote"},"Additional documentation will be available once the Realtime Database plugin update lands as part of the ",Object(i.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/FirebaseExtended/flutterfire/issues/2582"}),"FlutterFire roadmap"),".")))}p.isMDXComponent=!0},185:function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return f}));var r=n(0),a=n.n(r);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var d=a.a.createContext({}),b=function(e){var t=a.a.useContext(d),n=t;return e&&(n="function"==typeof e?e(t):c(c({},t),e)),n},u=function(e){var t=b(e.components);return a.a.createElement(d.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},s=a.a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,o=e.originalType,i=e.parentName,d=l(e,["components","mdxType","originalType","parentName"]),u=b(n),s=r,f=u["".concat(i,".").concat(s)]||u[s]||p[s]||o;return n?a.a.createElement(f,c(c({ref:t},d),{},{components:n})):a.a.createElement(f,c({ref:t},d))}));function f(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var o=n.length,i=new Array(o);i[0]=s;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:r,i[1]=c;for(var d=2;d=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var l=o.a.createContext({}),s=function(e){var t=o.a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},p=function(e){var t=s(e.components);return o.a.createElement(l.Provider,{value:t},e.children)},f={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},d=o.a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,a=e.originalType,c=e.parentName,l=u(e,["components","mdxType","originalType","parentName"]),p=s(n),d=r,b=p["".concat(c,".").concat(d)]||p[d]||f[d]||a;return n?o.a.createElement(b,i(i({ref:t},l),{},{components:n})):o.a.createElement(b,i({ref:t},l))}));function b(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var a=n.length,c=new Array(a);c[0]=d;var i={};for(var u in t)hasOwnProperty.call(t,u)&&(i[u]=t[u]);i.originalType=e,i.mdxType="string"==typeof e?e:r,c[1]=i;for(var l=2;l=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var l=o.a.createContext({}),s=function(e){var t=o.a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},p=function(e){var t=s(e.components);return o.a.createElement(l.Provider,{value:t},e.children)},f={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},d=o.a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,a=e.originalType,c=e.parentName,l=u(e,["components","mdxType","originalType","parentName"]),p=s(n),d=r,b=p["".concat(c,".").concat(d)]||p[d]||f[d]||a;return n?o.a.createElement(b,i(i({ref:t},l),{},{components:n})):o.a.createElement(b,i({ref:t},l))}));function b(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var a=n.length,c=new Array(a);c[0]=d;var i={};for(var u in t)hasOwnProperty.call(t,u)&&(i[u]=t[u]);i.originalType=e,i.mdxType="string"==typeof e?e:r,c[1]=i;for(var l=2;lFlutterFire | FlutterFire - - - - - - + + + + + +

    FlutterFire

    The official Firebase plugins for Flutter

    PluginVersionpub.devFirebaseView SourceMobileWebMacOS
    AdMobAdMob BadgePubFirebasefirebase_admob✔⨯⨯
    AnalyticsAnalytics BadgePubFirebasefirebase_analytics✔✔✔
    AuthenticationAuthentication BadgePubFirebasefirebase_auth✔✔✔
    Cloud FirestoreCloud Firestore BadgePubFirebasecloud_firestore✔✔✔
    Cloud FunctionsCloud Functions BadgePubFirebasecloud_functions✔✔✔
    Cloud MessagingCloud Messaging BadgePubFirebasefirebase_messaging✔⨯⨯
    Cloud StorageCloud Storage BadgePubFirebasefirebase_storage✔⨯⨯
    CoreCore BadgePubFirebasefirebase_core✔✔✔
    CrashlyticsCrashlytics BadgePubFirebasefirebase_crashlytics✔⨯⨯
    Realtime DatabaseRealtime Database BadgePubFirebasefirebase_database✔⨯⨯
    Dynamic LinksDynamic Links BadgePubFirebasefirebase_dynamic_links✔⨯⨯
    Instance IDInstance ID BadgePubFirebasefirebase_iid⨯⨯⨯
    In-App MessagingIn-App Messaging BadgePubFirebasefirebase_in_app_messaging✔⨯⨯
    ML Kit Natural LanguageML Kit Natural Language BadgePubFirebasefirebase_ml_language⨯⨯⨯
    ML Kit VisionML Kit Vision BadgePubFirebasefirebase_ml_vision✔⨯⨯
    Performance MonitoringPerformance Monitoring BadgePubFirebasefirebase_performance✔⨯⨯
    Remote ConfigRemote Config BadgePubFirebasefirebase_remote_config✔⨯⨯
    - - - - - - + + + + + + \ No newline at end of file diff --git a/main.0718b78d.js b/main.0718b78d.js new file mode 100644 index 000000000000..8b1c2d332053 --- /dev/null +++ b/main.0718b78d.js @@ -0,0 +1,2 @@ +/*! For license information please see main.0718b78d.js.LICENSE.txt */ +(window.webpackJsonp=window.webpackJsonp||[]).push([[42],[function(e,t,n){"use strict";e.exports=n(87)},function(e,t,n){"use strict";n.d(t,"a",(function(){return k})),n.d(t,"b",(function(){return _})),n.d(t,"c",(function(){return v})),n.d(t,"d",(function(){return R})),n.d(t,"e",(function(){return h})),n.d(t,"f",(function(){return T})),n.d(t,"g",(function(){return F})),n.d(t,"h",(function(){return D})),n.d(t,"i",(function(){return I}));var r=n(4),a=n(0),o=n.n(a),i=(n(13),n(7)),l=n(47),u=n(5),s=n(2),c=n(48),f=n.n(c),d=(n(56),n(9)),p=n(68),m=n.n(p),g=function(e){var t=Object(l.a)();return t.displayName=e,t}("Router-History"),h=function(e){var t=Object(l.a)();return t.displayName=e,t}("Router"),v=function(e){function t(t){var n;return(n=e.call(this,t)||this).state={location:t.history.location},n._isMounted=!1,n._pendingLocation=null,t.staticContext||(n.unlisten=t.history.listen((function(e){n._isMounted?n.setState({location:e}):n._pendingLocation=e}))),n}Object(r.a)(t,e),t.computeRootMatch=function(e){return{path:"/",url:"/",params:{},isExact:"/"===e}};var n=t.prototype;return n.componentDidMount=function(){this._isMounted=!0,this._pendingLocation&&this.setState({location:this._pendingLocation})},n.componentWillUnmount=function(){this.unlisten&&this.unlisten()},n.render=function(){return o.a.createElement(h.Provider,{value:{history:this.props.history,location:this.state.location,match:t.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},o.a.createElement(g.Provider,{children:this.props.children||null,value:this.props.history}))},t}(o.a.Component);o.a.Component;var b=function(e){function t(){return e.apply(this,arguments)||this}Object(r.a)(t,e);var n=t.prototype;return n.componentDidMount=function(){this.props.onMount&&this.props.onMount.call(this,this)},n.componentDidUpdate=function(e){this.props.onUpdate&&this.props.onUpdate.call(this,this,e)},n.componentWillUnmount=function(){this.props.onUnmount&&this.props.onUnmount.call(this,this)},n.render=function(){return null},t}(o.a.Component);var y={},w=0;function E(e,t){return void 0===e&&(e="/"),void 0===t&&(t={}),"/"===e?e:function(e){if(y[e])return y[e];var t=f.a.compile(e);return w<1e4&&(y[e]=t,w++),t}(e)(t,{pretty:!0})}function k(e){var t=e.computedMatch,n=e.to,r=e.push,a=void 0!==r&&r;return o.a.createElement(h.Consumer,null,(function(e){e||Object(u.a)(!1);var r=e.history,l=e.staticContext,c=a?r.push:r.replace,f=Object(i.c)(t?"string"==typeof n?E(n,t.params):Object(s.a)({},n,{pathname:E(n.pathname,t.params)}):n);return l?(c(f),null):o.a.createElement(b,{onMount:function(){c(f)},onUpdate:function(e,t){var n=Object(i.c)(t.to);Object(i.f)(n,Object(s.a)({},f,{key:n.key}))||c(f)},to:n})}))}var x={},S=0;function T(e,t){void 0===t&&(t={}),("string"==typeof t||Array.isArray(t))&&(t={path:t});var n=t,r=n.path,a=n.exact,o=void 0!==a&&a,i=n.strict,l=void 0!==i&&i,u=n.sensitive,s=void 0!==u&&u;return[].concat(r).reduce((function(t,n){if(!n&&""!==n)return null;if(t)return t;var r=function(e,t){var n=""+t.end+t.strict+t.sensitive,r=x[n]||(x[n]={});if(r[e])return r[e];var a=[],o={regexp:f()(e,a,t),keys:a};return S<1e4&&(r[e]=o,S++),o}(n,{end:o,strict:l,sensitive:s}),a=r.regexp,i=r.keys,u=a.exec(e);if(!u)return null;var c=u[0],d=u.slice(1),p=e===c;return o&&!p?null:{path:n,url:"/"===n&&""===c?"/":c,isExact:p,params:i.reduce((function(e,t,n){return e[t.name]=d[n],e}),{})}}),null)}var _=function(e){function t(){return e.apply(this,arguments)||this}return Object(r.a)(t,e),t.prototype.render=function(){var e=this;return o.a.createElement(h.Consumer,null,(function(t){t||Object(u.a)(!1);var n=e.props.location||t.location,r=e.props.computedMatch?e.props.computedMatch:e.props.path?T(n.pathname,e.props):t.match,a=Object(s.a)({},t,{location:n,match:r}),i=e.props,l=i.children,c=i.component,f=i.render;return Array.isArray(l)&&0===l.length&&(l=null),o.a.createElement(h.Provider,{value:a},a.match?l?"function"==typeof l?l(a):l:c?o.a.createElement(c,a):f?f(a):null:"function"==typeof l?l(a):null)}))},t}(o.a.Component);function O(e){return"/"===e.charAt(0)?e:"/"+e}function C(e,t){if(!e)return t;var n=O(e);return 0!==t.pathname.indexOf(n)?t:Object(s.a)({},t,{pathname:t.pathname.substr(n.length)})}function P(e){return"string"==typeof e?e:Object(i.e)(e)}function A(e){return function(){Object(u.a)(!1)}}function N(){}o.a.Component;var R=function(e){function t(){return e.apply(this,arguments)||this}return Object(r.a)(t,e),t.prototype.render=function(){var e=this;return o.a.createElement(h.Consumer,null,(function(t){t||Object(u.a)(!1);var n,r,a=e.props.location||t.location;return o.a.Children.forEach(e.props.children,(function(e){if(null==r&&o.a.isValidElement(e)){n=e;var i=e.props.path||e.props.from;r=i?T(a.pathname,Object(s.a)({},e.props,{path:i})):t.match}})),r?o.a.cloneElement(n,{location:a,computedMatch:r}):null}))},t}(o.a.Component);function I(e){var t="withRouter("+(e.displayName||e.name)+")",n=function(t){var n=t.wrappedComponentRef,r=Object(d.a)(t,["wrappedComponentRef"]);return o.a.createElement(h.Consumer,null,(function(t){return t||Object(u.a)(!1),o.a.createElement(e,Object(s.a)({},r,t,{ref:n}))}))};return n.displayName=t,n.WrappedComponent=e,m()(n,e)}var L=o.a.useContext;function F(){return L(g)}function D(){return L(h).location}},function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t=0;d--){var p=i[d];"."===p?o(i,d):".."===p?(o(i,d),f++):f&&(o(i,d),f--)}if(!s)for(;f--;f)i.unshift("..");!s||""===i[0]||i[0]&&a(i[0])||i.unshift("");var m=i.join("/");return n&&"/"!==m.substr(-1)&&(m+="/"),m};function l(e){return e.valueOf?e.valueOf():Object.prototype.valueOf.call(e)}var u=function e(t,n){if(t===n)return!0;if(null==t||null==n)return!1;if(Array.isArray(t))return Array.isArray(n)&&t.length===n.length&&t.every((function(t,r){return e(t,n[r])}));if("object"==typeof t||"object"==typeof n){var r=l(t),a=l(n);return r!==t||a!==n?e(r,a):Object.keys(Object.assign({},t,n)).every((function(r){return e(t[r],n[r])}))}return!1},s=n(5);function c(e){return"/"===e.charAt(0)?e:"/"+e}function f(e){return"/"===e.charAt(0)?e.substr(1):e}function d(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function p(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function m(e){var t=e.pathname,n=e.search,r=e.hash,a=t||"/";return n&&"?"!==n&&(a+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(a+="#"===r.charAt(0)?r:"#"+r),a}function g(e,t,n,a){var o;"string"==typeof e?(o=function(e){var t=e||"/",n="",r="",a=t.indexOf("#");-1!==a&&(r=t.substr(a),t=t.substr(0,a));var o=t.indexOf("?");return-1!==o&&(n=t.substr(o),t=t.substr(0,o)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e)).state=t:(void 0===(o=Object(r.a)({},e)).pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==t&&void 0===o.state&&(o.state=t));try{o.pathname=decodeURI(o.pathname)}catch(l){throw l instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):l}return n&&(o.key=n),a?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=i(o.pathname,a.pathname)):o.pathname=a.pathname:o.pathname||(o.pathname="/"),o}function h(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&u(e.state,t.state)}function v(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,a){if(null!=e){var o="function"==typeof e?e(t,n):e;"string"==typeof o?"function"==typeof r?r(o,a):a(!0):a(!1!==o)}else a(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;rt?n.splice(t,n.length-t,r):n.push(r),f({action:"PUSH",location:r,index:t,entries:n})}}))},replace:function(e,t){var r=g(e,t,d(),w.location);c.confirmTransitionTo(r,"REPLACE",n,(function(e){e&&(w.entries[w.index]=r,f({action:"REPLACE",location:r}))}))},go:y,goBack:function(){y(-1)},goForward:function(){y(1)},canGo:function(e){var t=w.index+e;return t>=0&&t=0||(a[n]=e[n]);return a}n.d(t,"a",(function(){return r}))},function(e,t,n){var r=n(23),a=n(51);e.exports=n(11)?function(e,t,n){return r.f(e,t,a(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){e.exports=!n(18)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){e.exports=n(99)()},function(e,t,n){var r=n(6),a=n(10),o=n(25),i=n(38)("src"),l=n(92),u=(""+l).split("toString");n(15).inspectSource=function(e){return l.call(e)},(e.exports=function(e,t,n,l){var s="function"==typeof n;s&&(o(n,"name")||a(n,"name",t)),e[t]!==n&&(s&&(o(n,i)||a(n,i,e[t]?""+e[t]:u.join(String(t)))),e===r?e[t]=n:l?e[t]?e[t]=n:a(e,t,n):(delete e[t],a(e,t,n)))})(Function.prototype,"toString",(function(){return"function"==typeof this&&this[i]||l.call(this)}))},function(e,t){var n=e.exports={version:"2.6.11"};"number"==typeof __e&&(__e=n)},function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return u}));var r=n(1),a=n(2),o=n(0),i=n.n(o);function l(e,t,n){return void 0===n&&(n=[]),e.some((function(e){var a=e.path?Object(r.f)(t,e):n.length?n[n.length-1].match:r.c.computeRootMatch(t);return a&&(n.push({route:e,match:a}),e.routes&&l(e.routes,t,n)),a})),n}function u(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),e?i.a.createElement(r.d,n,e.map((function(e,n){return i.a.createElement(r.b,{key:e.key||n,path:e.path,exact:e.exact,strict:e.strict,render:function(n){return e.render?e.render(Object(a.a)({},n,{},t,{route:e})):i.a.createElement(e.component,Object(a.a)({},n,t,{route:e}))}})}))):null}},function(e,t,n){var r=n(6),a=n(15),o=n(10),i=n(14),l=n(28),u=function(e,t,n){var s,c,f,d,p=e&u.F,m=e&u.G,g=e&u.S,h=e&u.P,v=e&u.B,b=m?r:g?r[t]||(r[t]={}):(r[t]||{}).prototype,y=m?a:a[t]||(a[t]={}),w=y.prototype||(y.prototype={});for(s in m&&(n=t),n)f=((c=!p&&b&&void 0!==b[s])?b:n)[s],d=v&&c?l(f,r):h&&"function"==typeof f?l(Function.call,f):f,b&&i(b,s,f,e&u.U),y[s]!=f&&o(y,s,d),h&&w[s]!=f&&(w[s]=f)};r.core=a,u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,e.exports=u},function(e,t){e.exports=function(e){try{return!!e()}catch(t){return!0}}},function(e,t,n){"use strict";var r=n(31),a={};a[n(3)("toStringTag")]="z",a+""!="[object z]"&&n(14)(Object.prototype,"toString",(function(){return"[object "+r(this)+"]"}),!0)},function(e,t,n){"use strict";var r=n(77),a=n(93),o=n(22),i=n(26);e.exports=n(62)(Array,"Array",(function(e,t){this._t=i(e),this._i=0,this._k=t}),(function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,a(1)):a(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])}),"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){e.exports={}},function(e,t,n){var r=n(8),a=n(80),o=n(76),i=Object.defineProperty;t.f=n(11)?Object.defineProperty:function(e,t,n){if(r(e),t=o(t,!0),r(n),a)try{return i(e,t,n)}catch(l){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){for(var r=n(20),a=n(27),o=n(14),i=n(6),l=n(10),u=n(22),s=n(3),c=s("iterator"),f=s("toStringTag"),d=u.Array,p={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},m=a(p),g=0;gCheck out the roadmap to learn more..',backgroundColor:"#13B9FD",textColor:"#fff"},algolia:{apiKey:"61eba190d4380f3db4e11d21b70e7608",indexName:"flutterfire"},prism:{additionalLanguages:["dart","bash","java","kotlin","objectivec","swift","groovy","ruby","json","yaml"]},navbar:{title:"FlutterFire",logo:{alt:"FlutterFire Logo",src:"/img/flutterfire_300x.png"},links:[{to:"docs/overview",activeBasePath:"docs",label:"Docs",position:"right"},{href:"https://twitter.com/flutterfiredev",label:"Twitter",position:"right"},{href:"https://github.com/firebaseextended/flutterfire",label:"GitHub",position:"right"}]},footer:{style:"dark",links:[{title:"Docs",items:[{label:"Getting Started",to:"/docs/overview"},{label:"Android Installation",to:"docs/installation/android"},{label:"iOS Installation",to:"docs/installation/ios"},{label:"Web Installation",to:"docs/installation/web"}]},{title:"Community",items:[{label:"Stack Overflow",href:"https://stackoverflow.com/questions/tagged/flutterfire"},{label:"Flutter",href:"https://flutter.dev/"},{label:"pub.dev",href:"https://pub.dev/"}]},{title:"Social",items:[{label:"GitHub",href:"https://github.com/FirebaseExtended/flutterfire"},{label:"Twitter",href:"https://twitter.com/flutterfiredev"}]}],copyright:'
    Except as otherwise noted, this work is licensed under a Creative Commons Attribution 4.0 International License, and code samples are licensed under the BSD License.
    '}},title:"FlutterFire",tagline:"The official Firebase plugins for Flutter",url:"https://firebase.flutter.dev",baseUrl:"/",favicon:"/favicon/favicon.ico",organizationName:"FirebaseExtended",projectName:"flutterfire",presets:[["@docusaurus/preset-classic",{docs:{path:"../docs",sidebarPath:"/Users/mike/Documents/Projects/Flutter/fe_ff_master/docs/sidebars.js",editUrl:"https://github.com/FirebaseExtended/flutterfire/edit/master/docs/"},theme:{customCss:"/Users/mike/Documents/Projects/Flutter/fe_ff_master/website/src/styles.scss"}}]]}},function(e,t,n){var r,a;void 0===(a="function"==typeof(r=function(){var e,t,n={version:"0.2.0"},r=n.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'
    '};function a(e,t,n){return en?n:e}function o(e){return 100*(-1+e)}n.configure=function(e){var t,n;for(t in e)void 0!==(n=e[t])&&e.hasOwnProperty(t)&&(r[t]=n);return this},n.status=null,n.set=function(e){var t=n.isStarted();e=a(e,r.minimum,1),n.status=1===e?null:e;var u=n.render(!t),s=u.querySelector(r.barSelector),c=r.speed,f=r.easing;return u.offsetWidth,i((function(t){""===r.positionUsing&&(r.positionUsing=n.getPositioningCSS()),l(s,function(e,t,n){var a;return(a="translate3d"===r.positionUsing?{transform:"translate3d("+o(e)+"%,0,0)"}:"translate"===r.positionUsing?{transform:"translate("+o(e)+"%,0)"}:{"margin-left":o(e)+"%"}).transition="all "+t+"ms "+n,a}(e,c,f)),1===e?(l(u,{transition:"none",opacity:1}),u.offsetWidth,setTimeout((function(){l(u,{transition:"all "+c+"ms linear",opacity:0}),setTimeout((function(){n.remove(),t()}),c)}),c)):setTimeout(t,c)})),this},n.isStarted=function(){return"number"==typeof n.status},n.start=function(){n.status||n.set(0);var e=function(){setTimeout((function(){n.status&&(n.trickle(),e())}),r.trickleSpeed)};return r.trickle&&e(),this},n.done=function(e){return e||n.status?n.inc(.3+.5*Math.random()).set(1):this},n.inc=function(e){var t=n.status;return t?("number"!=typeof e&&(e=(1-t)*a(Math.random()*t,.1,.95)),t=a(t+e,0,.994),n.set(t)):n.start()},n.trickle=function(){return n.inc(Math.random()*r.trickleRate)},e=0,t=0,n.promise=function(r){return r&&"resolved"!==r.state()?(0===t&&n.start(),e++,t++,r.always((function(){0==--t?(e=0,n.done()):n.set((e-t)/e)})),this):this},n.render=function(e){if(n.isRendered())return document.getElementById("nprogress");s(document.documentElement,"nprogress-busy");var t=document.createElement("div");t.id="nprogress",t.innerHTML=r.template;var a,i=t.querySelector(r.barSelector),u=e?"-100":o(n.status||0),c=document.querySelector(r.parent);return l(i,{transition:"all 0 linear",transform:"translate3d("+u+"%,0,0)"}),r.showSpinner||(a=t.querySelector(r.spinnerSelector))&&d(a),c!=document.body&&s(c,"nprogress-custom-parent"),c.appendChild(t),t},n.remove=function(){c(document.documentElement,"nprogress-busy"),c(document.querySelector(r.parent),"nprogress-custom-parent");var e=document.getElementById("nprogress");e&&d(e)},n.isRendered=function(){return!!document.getElementById("nprogress")},n.getPositioningCSS=function(){var e=document.body.style,t="WebkitTransform"in e?"Webkit":"MozTransform"in e?"Moz":"msTransform"in e?"ms":"OTransform"in e?"O":"";return t+"Perspective"in e?"translate3d":t+"Transform"in e?"translate":"margin"};var i=function(){var e=[];function t(){var n=e.shift();n&&n(t)}return function(n){e.push(n),1==e.length&&t()}}(),l=function(){var e=["Webkit","O","Moz","ms"],t={};function n(n){return n=n.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,(function(e,t){return t.toUpperCase()})),t[n]||(t[n]=function(t){var n=document.body.style;if(t in n)return t;for(var r,a=e.length,o=t.charAt(0).toUpperCase()+t.slice(1);a--;)if((r=e[a]+o)in n)return r;return t}(n))}function r(e,t,r){t=n(t),e.style[t]=r}return function(e,t){var n,a,o=arguments;if(2==o.length)for(n in t)void 0!==(a=t[n])&&t.hasOwnProperty(n)&&r(e,n,a);else r(e,o[1],o[2])}}();function u(e,t){return("string"==typeof e?e:f(e)).indexOf(" "+t+" ")>=0}function s(e,t){var n=f(e),r=n+t;u(n,t)||(e.className=r.substring(1))}function c(e,t){var n,r=f(e);u(e,t)&&(n=r.replace(" "+t+" "," "),e.className=n.substring(1,n.length-1))}function f(e){return(" "+(e.className||"")+" ").replace(/\s+/gi," ")}function d(e){e&&e.parentNode&&e.parentNode.removeChild(e)}return n})?r.call(t,n,t,e):r)||(e.exports=a)},function(e,t,n){var r=n(40),a=Math.min;e.exports=function(e){return e>0?a(r(e),9007199254740991):0}},function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"b",(function(){return v})),n.d(t,"c",(function(){return w}));var r=n(1);n.d(t,"d",(function(){return r.f})),n.d(t,"e",(function(){return r.g})),n.d(t,"f",(function(){return r.h}));var a=n(4),o=n(0),i=n.n(o),l=n(7),u=(n(13),n(2)),s=n(9),c=n(5),f=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a0?r:n)(e)}},function(e,t,n){var r=n(23).f,a=n(25),o=n(3)("toStringTag");e.exports=function(e,t,n){e&&!a(e=n?e:e.prototype,o)&&r(e,o,{configurable:!0,value:t})}},,function(e,t,n){"use strict";var r,a,o=n(72),i=RegExp.prototype.exec,l=String.prototype.replace,u=i,s=(r=/a/,a=/b*/g,i.call(r,"a"),i.call(a,"a"),0!==r.lastIndex||0!==a.lastIndex),c=void 0!==/()??/.exec("")[1];(s||c)&&(u=function(e){var t,n,r,a,u=this;return c&&(n=new RegExp("^"+u.source+"$(?!\\s)",o.call(u))),s&&(t=u.lastIndex),r=i.call(u,e),s&&r&&(u.lastIndex=u.global?r.index+r[0].length:t),c&&r&&r.length>1&&l.call(r[0],n,(function(){for(a=1;ae.length)return;if(!(E instanceof u)){if(g&&y!=t.length-1){if(d.lastIndex=w,!(O=d.exec(e)))break;for(var k=O.index+(m?O[1].length:0),x=O.index+O[0].length,S=y,T=w,_=t.length;S<_&&(T=(T+=t[S].length)&&(++y,w=T);if(t[y]instanceof u)continue;C=S-y,E=e.slice(w,T),O.index-=w}else{d.lastIndex=0;var O=d.exec(E),C=1}if(O){m&&(h=O[1]?O[1].length:0),x=(k=O.index+h)+(O=O[0].slice(h)).length;var P=E.slice(0,k),A=E.slice(x),N=[y,C];P&&(++y,w+=P.length,N.push(P));var R=new u(s,p?a.tokenize(O,p):O,v,O,g);if(N.push(R),A&&N.push(A),Array.prototype.splice.apply(t,N),1!=C&&a.matchGrammar(e,t,n,y,w,!0,s),i)break}else if(i)break}}}}},hooks:{add:function(){}},tokenize:function(e,t,n){var r=[e],o=t.rest;if(o){for(var i in o)t[i]=o[i];delete t.rest}return a.matchGrammar(e,r,t,0,0,!1),r}},(o=a.Token=function(e,t,n,r,a){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length,this.greedy=!!a}).stringify=function(e,t,n){if("string"==typeof e)return e;if("Array"===a.util.type(e))return e.map((function(n){return o.stringify(n,t,e)})).join("");var r={type:e.type,content:o.stringify(e.content,t,n),tag:"span",classes:["token",e.type],attributes:{},language:t,parent:n};if(e.alias){var i="Array"===a.util.type(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(r.classes,i)}var l=Object.keys(r.attributes).map((function(e){return e+'="'+(r.attributes[e]||"").replace(/"/g,""")+'"'})).join(" ");return"<"+r.tag+' class="'+r.classes.join(" ")+'"'+(l?" "+l:"")+">"+r.content+""},a);i.languages.markup={comment://,prolog:/<\?[\s\S]+?\?>/,doctype://i,cdata://i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/i,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/i,inside:{punctuation:[/^=/,{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/&#?[\da-z]{1,8};/i},i.languages.markup.tag.inside["attr-value"].inside.entity=i.languages.markup.entity,i.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))})),Object.defineProperty(i.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^$)/i,lookbehind:!0,inside:i.languages[t]},n.cdata=/^$/i;var r={"included-cdata":{pattern://i,inside:n}};r["language-"+t]={pattern:/[\s\S]+/,inside:i.languages[t]};var a={};a[e]={pattern:RegExp(/(<__[\s\S]*?>)(?:\s*|[\s\S])*?(?=<\/__>)/.source.replace(/__/g,e),"i"),lookbehind:!0,greedy:!0,inside:r},i.languages.insertBefore("markup","cdata",a)}}),i.languages.xml=i.languages.extend("markup",{}),i.languages.html=i.languages.markup,i.languages.mathml=i.languages.markup,i.languages.svg=i.languages.markup,function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--?|-=|\+\+?|\+=|!=?|~|\*\*?|\*=|\/=?|%=?|<<=?|>>=?|<=?|>=?|==?|&&?|&=|\^=?|\|\|?|\|=|\?|:/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|x[0-9a-fA-F]{1,2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)\w+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b\w+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+?)\s*(?:\r?\n|\r)(?:[\s\S])*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:n},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s*(?:\r?\n|\r)(?:[\s\S])*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0},{pattern:/(["'])(?:\\[\s\S]|\$\([^)]+\)|`[^`]+`|(?!\1)[^\\])*\1/,greedy:!0,inside:n}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:n.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|aptitude|apt-cache|apt-get|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:if|then|else|elif|fi|for|while|in|case|esac|function|select|do|done|until)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|break|cd|continue|eval|exec|exit|export|getopts|hash|pwd|readonly|return|shift|test|times|trap|umask|unset|alias|bind|builtin|caller|command|declare|echo|enable|help|let|local|logout|mapfile|printf|read|readarray|source|type|typeset|ulimit|unalias|set|shopt)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:true|false)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|==?|!=?|=~|<<[<-]?|[&\d]?>>|\d?[<>]&?|&[>&]?|\|[&|]?|<=?|>=?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}};for(var r=["comment","function-name","for-or-select","assign-left","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],a=n.variable[1].inside,o=0;o=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/},i.languages.c=i.languages.extend("clike",{"class-name":{pattern:/(\b(?:enum|struct)\s+)\w+/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)\b/,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/,number:/(?:\b0x(?:[\da-f]+\.?[\da-f]*|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?)[ful]*/i}),i.languages.insertBefore("c","string",{macro:{pattern:/(^\s*)#\s*[a-z]+(?:[^\r\n\\]|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,alias:"property",inside:{string:{pattern:/(#\s*include\s*)(?:<.+?>|("|')(?:\\?.)+?\2)/,lookbehind:!0},directive:{pattern:/(#\s*)\b(?:define|defined|elif|else|endif|error|ifdef|ifndef|if|import|include|line|pragma|undef|using)\b/,lookbehind:!0,alias:"keyword"}}},constant:/\b(?:__FILE__|__LINE__|__DATE__|__TIME__|__TIMESTAMP__|__func__|EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|stdin|stdout|stderr)\b/}),delete i.languages.c.boolean,i.languages.cpp=i.languages.extend("c",{"class-name":{pattern:/(\b(?:class|enum|struct)\s+)\w+/,lookbehind:!0},keyword:/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|class|compl|const|constexpr|const_cast|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|float|for|friend|goto|if|inline|int|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|long|mutable|namespace|new|noexcept|nullptr|operator|private|protected|public|register|reinterpret_cast|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+\.?[\da-f']*|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+\.?[\d']*|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]*/i,greedy:!0},operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:true|false)\b/}),i.languages.insertBefore("cpp","string",{"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),function(e){var t=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-]+[\s\S]*?(?:;|(?=\s*\{))/,inside:{rule:/@[\w-]+/}},url:{pattern:RegExp("url\\((?:"+t.source+"|[^\n\r()]*)\\)","i"),inside:{function:/^url/i,punctuation:/^\(|\)$/}},selector:RegExp("[^{}\\s](?:[^{};\"']|"+t.source+")*?(?=\\s*\\{)"),string:{pattern:t,greedy:!0},property:/[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*(?=\s*:)/i,important:/!important\b/i,function:/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),e.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|')(?:\\[\s\S]|(?!\1)[^\\])*\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:n.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:e.languages.css}},alias:"language-css"}},n.tag))}(i),i.languages.css.selector={pattern:i.languages.css.selector,inside:{"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-:.\w]+/,id:/#[-:.\w]+/,attribute:{pattern:/\[(?:[^[\]"']|("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1)*\]/,greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)[-*\w\xA0-\uFFFF]*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},attribute:{pattern:/^(\s*)[-\w\xA0-\uFFFF]+/,lookbehind:!0},value:[/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,{pattern:/(=\s*)[-\w\xA0-\uFFFF]+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],punctuation:/[()]/}},i.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*/i,lookbehind:!0}}),i.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:/#[\da-f]{3,8}/i,entity:/\\[\da-f]{1,8}/i,unit:{pattern:/(\d)(?:%|[a-z]+)/,lookbehind:!0},number:/-?[\d.]+/}),i.languages.javascript=i.languages.extend("clike",{"class-name":[i.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.])\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,function:/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/}),i.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,i.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:i.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:i.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:i.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:i.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),i.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|(?!\${)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:i.languages.javascript}},string:/[\s\S]+/}}}),i.languages.markup&&i.languages.markup.tag.addInlined("script","javascript"),i.languages.js=i.languages.javascript,function(e){var t=e.util.clone(e.languages.javascript);e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=/<\/?(?:[\w.:-]+\s*(?:\s+(?:[\w.:-]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s{'">=]+|\{(?:\{(?:\{[^}]*\}|[^{}])*\}|[^{}])+\}))?|\{\.{3}[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\}))*\s*\/?)?>/i,e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/i,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">]+)/i,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.insertBefore("inside","attr-name",{spread:{pattern:/\{\.{3}[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\}/,inside:{punctuation:/\.{3}|[{}.]/,"attr-value":/\w+/}}},e.languages.jsx.tag),e.languages.insertBefore("inside","attr-value",{script:{pattern:/=(\{(?:\{(?:\{[^}]*\}|[^}])*\}|[^}])+\})/i,inside:{"script-punctuation":{pattern:/^=(?={)/,alias:"punctuation"},rest:e.languages.jsx},alias:"language-javascript"}},e.languages.jsx.tag);var n=function(e){return e?"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(n).join(""):""},r=function(t){for(var a=[],o=0;o0&&a[a.length-1].tagName===n(i.content[0].content[1])&&a.pop():"/>"===i.content[i.content.length-1].content||a.push({tagName:n(i.content[0].content[1]),openedBraces:0}):a.length>0&&"punctuation"===i.type&&"{"===i.content?a[a.length-1].openedBraces++:a.length>0&&a[a.length-1].openedBraces>0&&"punctuation"===i.type&&"}"===i.content?a[a.length-1].openedBraces--:l=!0),(l||"string"==typeof i)&&a.length>0&&0===a[a.length-1].openedBraces){var u=n(i);o0&&("string"==typeof t[o-1]||"plain-text"===t[o-1].type)&&(u=n(t[o-1])+u,t.splice(o-1,1),o--),t[o]=new e.Token("plain-text",u,null,u)}i.content&&"string"!=typeof i.content&&r(i.content)}};e.hooks.add("after-tokenize",(function(e){"jsx"!==e.language&&"tsx"!==e.language||r(e.tokens)}))}(i),function(e){var t=e.languages.javadoclike={parameter:{pattern:/(^\s*(?:\/{3}|\*|\/\*\*)\s*@(?:param|arg|arguments)\s+)\w+/m,lookbehind:!0},keyword:{pattern:/(^\s*(?:\/{3}|\*|\/\*\*)\s*|\{)@[a-z][a-zA-Z-]+\b/m,lookbehind:!0},punctuation:/[{}]/};Object.defineProperty(t,"addSupport",{value:function(t,n){"string"==typeof t&&(t=[t]),t.forEach((function(t){!function(t,n){var r=e.languages[t];if(r){var a=r["doc-comment"];if(!a){var o={"doc-comment":{pattern:/(^|[^\\])\/\*\*[^/][\s\S]*?(?:\*\/|$)/,alias:"comment"}};a=(r=e.languages.insertBefore(t,"comment",o))["doc-comment"]}if(a instanceof RegExp&&(a=r["doc-comment"]={pattern:a}),Array.isArray(a))for(var i=0,l=a.length;i>>?=?|->|([-+&|])\2|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0}}),e.languages.insertBefore("java","class-name",{annotation:{alias:"punctuation",pattern:/(^|[^.])@\w+/,lookbehind:!0},namespace:{pattern:/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)[a-z]\w*(\.[a-z]\w*)+/,lookbehind:!0,inside:{punctuation:/\./}},generics:{pattern:/<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,inside:{"class-name":n,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}}})}(i),function(e){function t(e,t){return"___"+e.toUpperCase()+t+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(n,r,a,o){if(n.language===r){var i=n.tokenStack=[];n.code=n.code.replace(a,(function(e){if("function"==typeof o&&!o(e))return e;for(var a,l=i.length;-1!==n.code.indexOf(a=t(r,l));)++l;return i[l]=e,a})),n.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(n,r){if(n.language===r&&n.tokenStack){n.grammar=e.languages[r];var a=0,o=Object.keys(n.tokenStack);!function i(l){for(var u=0;u=o.length);u++){var s=l[u];if("string"==typeof s||s.content&&"string"==typeof s.content){var c=o[a],f=n.tokenStack[c],d="string"==typeof s?s:s.content,p=t(r,c),m=d.indexOf(p);if(m>-1){++a;var g=d.substring(0,m),h=new e.Token(r,e.tokenize(f,n.grammar),"language-"+r,f),v=d.substring(m+p.length),b=[];g&&b.push.apply(b,i([g])),b.push(h),v&&b.push.apply(b,i([v])),"string"==typeof s?l.splice.apply(l,[u,1].concat(b)):s.content=b}}else s.content&&i(s.content)}return l}(n.tokens)}}}})}(i),function(e){e.languages.php=e.languages.extend("clike",{keyword:/\b(?:__halt_compiler|abstract|and|array|as|break|callable|case|catch|class|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|eval|exit|extends|final|finally|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|namespace|new|or|parent|print|private|protected|public|require|require_once|return|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\b/i,boolean:{pattern:/\b(?:false|true)\b/i,alias:"constant"},constant:[/\b[A-Z_][A-Z0-9_]*\b/,/\b(?:null)\b/i],comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0}}),e.languages.insertBefore("php","string",{"shell-comment":{pattern:/(^|[^\\])#.*/,lookbehind:!0,alias:"comment"}}),e.languages.insertBefore("php","comment",{delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"}}),e.languages.insertBefore("php","keyword",{variable:/\$+(?:\w+\b|(?={))/i,package:{pattern:/(\\|namespace\s+|use\s+)[\w\\]+/,lookbehind:!0,inside:{punctuation:/\\/}}}),e.languages.insertBefore("php","operator",{property:{pattern:/(->)[\w]+/,lookbehind:!0}});var t={pattern:/{\$(?:{(?:{[^{}]+}|[^{}]+)}|[^{}])+}|(^|[^\\{])\$+(?:\w+(?:\[.+?]|->\w+)*)/,lookbehind:!0,inside:{rest:e.languages.php}};e.languages.insertBefore("php","string",{"nowdoc-string":{pattern:/<<<'([^']+)'(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\1;/,greedy:!0,alias:"string",inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},"heredoc-string":{pattern:/<<<(?:"([^"]+)"(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\1;|([a-z_]\w*)(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\2;)/i,greedy:!0,alias:"string",inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:t}},"single-quoted-string":{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0,alias:"string"},"double-quoted-string":{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,alias:"string",inside:{interpolation:t}}}),delete e.languages.php.string,e.hooks.add("before-tokenize",(function(t){if(/<\?/.test(t.code)){e.languages["markup-templating"].buildPlaceholders(t,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#)(?:[^?\n\r]|\?(?!>))*|\/\*[\s\S]*?(?:\*\/|$))*?(?:\?>|$)/gi)}})),e.hooks.add("after-tokenize",(function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"php")}))}(i),function(e){var t=e.languages.javascript,n=/{(?:[^{}]|{(?:[^{}]|{[^{}]*})*})+}/.source,r="(@(?:param|arg|argument|property)\\s+(?:"+n+"\\s+)?)";e.languages.jsdoc=e.languages.extend("javadoclike",{parameter:{pattern:RegExp(r+/[$\w\xA0-\uFFFF.]+(?=\s|$)/.source),lookbehind:!0,inside:{punctuation:/\./}}}),e.languages.insertBefore("jsdoc","keyword",{"optional-parameter":{pattern:RegExp(r+/\[[$\w\xA0-\uFFFF.]+(?:=[^[\]]+)?\](?=\s|$)/.source),lookbehind:!0,inside:{parameter:{pattern:/(^\[)[$\w\xA0-\uFFFF\.]+/,lookbehind:!0,inside:{punctuation:/\./}},code:{pattern:/(=)[\s\S]*(?=\]$)/,lookbehind:!0,inside:t,alias:"language-javascript"},punctuation:/[=[\]]/}},"class-name":[{pattern:RegExp("(@[a-z]+\\s+)"+n),lookbehind:!0,inside:{punctuation:/[.,:?=<>|{}()[\]]/}},{pattern:/(@(?:augments|extends|class|interface|memberof!?|this)\s+)[A-Z]\w*(?:\.[A-Z]\w*)*/,lookbehind:!0,inside:{punctuation:/\./}}],example:{pattern:/(@example\s+)[^@]+?(?=\s*(?:\*\s*)?(?:@\w|\*\/))/,lookbehind:!0,inside:{code:{pattern:/^(\s*(?:\*\s*)?).+$/m,lookbehind:!0,inside:t,alias:"language-javascript"}}}}),e.languages.javadoclike.addSupport("javascript",e.languages.jsdoc)}(i),i.languages.actionscript=i.languages.extend("javascript",{keyword:/\b(?:as|break|case|catch|class|const|default|delete|do|else|extends|finally|for|function|if|implements|import|in|instanceof|interface|internal|is|native|new|null|package|private|protected|public|return|super|switch|this|throw|try|typeof|use|var|void|while|with|dynamic|each|final|get|include|namespace|native|override|set|static)\b/,operator:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<>?>?|[!=]=?)=?|[~?@]/}),i.languages.actionscript["class-name"].alias="function",i.languages.markup&&i.languages.insertBefore("actionscript","string",{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,lookbehind:!0,inside:{rest:i.languages.markup}}}),function(e){var t=/#(?!\{).+/,n={pattern:/#\{[^}]+\}/,alias:"variable"};e.languages.coffeescript=e.languages.extend("javascript",{comment:t,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:n}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),e.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:t,interpolation:n}}}),e.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},rest:e.languages.javascript}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:n}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"],e.languages.coffee=e.languages.coffeescript}(i),function(e){e.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+e.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),e.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+e.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),e.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:(?:Uint|Int)(?:8|16|32)|Uint8Clamped|Float(?:32|64))?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|(?:Weak)?(?:Set|Map)|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),e.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),e.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),e.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:/(\.\s*)#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*/,lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|location|navigator|performance|(?:local|session)Storage|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var t=["function","function-variable","method","method-variable","property-access"],n=0;n))/i,delete e.languages.flow.parameter,e.languages.insertBefore("flow","operator",{"flow-punctuation":{pattern:/\{\||\|\}/,alias:"punctuation"}}),Array.isArray(e.languages.flow.keyword)||(e.languages.flow.keyword=[e.languages.flow.keyword]),e.languages.flow.keyword.unshift({pattern:/(^|[^$]\b)(?:type|opaque|declare|Class)\b(?!\$)/,lookbehind:!0},{pattern:/(^|[^$]\B)\$(?:await|Diff|Exact|Keys|ObjMap|PropertyType|Shape|Record|Supertype|Subtype|Enum)\b(?!\$)/,lookbehind:!0})}(i),i.languages.n4js=i.languages.extend("javascript",{keyword:/\b(?:any|Array|boolean|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|module|new|null|number|package|private|protected|public|return|set|static|string|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/}),i.languages.insertBefore("n4js","constant",{annotation:{pattern:/@+\w+/,alias:"operator"}}),i.languages.n4jsd=i.languages.n4js,i.languages.typescript=i.languages.extend("javascript",{keyword:/\b(?:abstract|as|async|await|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|is|keyof|let|module|namespace|new|null|of|package|private|protected|public|readonly|return|require|set|static|super|switch|this|throw|try|type|typeof|var|void|while|with|yield)\b/,builtin:/\b(?:string|Function|any|number|boolean|Array|symbol|console|Promise|unknown|never)\b/}),i.languages.ts=i.languages.typescript,function(e){var t=e.languages.javascript["template-string"],n=t.pattern.source,r=t.inside.interpolation,a=r.inside["interpolation-punctuation"],o=r.pattern.source;function i(t,r){if(e.languages[t])return{pattern:RegExp("((?:"+r+")\\s*)"+n),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:t}}}}function l(e,t){return"___"+t.toUpperCase()+"_"+e+"___"}function u(t,n,r){var a={code:t,grammar:n,language:r};return e.hooks.run("before-tokenize",a),a.tokens=e.tokenize(a.code,a.grammar),e.hooks.run("after-tokenize",a),a.tokens}function s(t){var n={};n["interpolation-punctuation"]=a;var o=e.tokenize(t,n);if(3===o.length){var i=[1,1];i.push.apply(i,u(o[1],e.languages.javascript,"javascript")),o.splice.apply(o,i)}return new e.Token("interpolation",o,r.alias,t)}function c(t,n,r){var a=e.tokenize(t,{interpolation:{pattern:RegExp(o),lookbehind:!0}}),i=0,c={},f=u(a.map((function(e){if("string"==typeof e)return e;for(var n,a=e.content;-1!==t.indexOf(n=l(i++,r)););return c[n]=a,n})).join(""),n,r),d=Object.keys(c);return i=0,function e(t){for(var n=0;n=d.length)return;var r=t[n];if("string"==typeof r||"string"==typeof r.content){var a=d[i],o="string"==typeof r?r:r.content,l=o.indexOf(a);if(-1!==l){++i;var u=o.substring(0,l),f=s(c[a]),p=o.substring(l+a.length),m=[];if(u&&m.push(u),m.push(f),p){var g=[p];e(g),m.push.apply(m,g)}"string"==typeof r?(t.splice.apply(t,[n,1].concat(m)),n+=m.length-1):r.content=m}}else{var h=r.content;Array.isArray(h)?e(h):e([h])}}}(f),new e.Token(r,f,"language-"+r,t)}e.languages.javascript["template-string"]=[i("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),i("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),i("svg",/\bsvg/.source),i("markdown",/\b(?:md|markdown)/.source),i("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),t].filter(Boolean);var f={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function d(e){return"string"==typeof e?e:Array.isArray(e)?e.map(d).join(""):d(e.content)}e.hooks.add("after-tokenize",(function(t){t.language in f&&function t(n){for(var r=0,a=n.length;r/g,t),n&&(e=e+"|"+e.replace(/_/g,"\\*")),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+e+")")}var r=/(?:\\.|``.+?``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,a=/\|?__(?:\|__)+\|?(?:(?:\r?\n|\r)|$)/.source.replace(/__/g,r),o=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\r?\n|\r)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+a+o+"(?:"+a+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+a+o+")(?:"+a+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+a+")"+o+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+a+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/(^[ \t]*(?:\r?\n|\r))(?: {4}|\t).+(?:(?:\r?\n|\r)(?: {4}|\t).+)*/m,lookbehind:!0,alias:"keyword"},{pattern:/``.+?``|`[^`\r\n]+`/,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\r?\n|\r))[\s\S]+?(?=(?:\r?\n|\r)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\r?\n|\r)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#+.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/__(?:(?!_)|_(?:(?!_))+_)+__/.source,!0),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/_(?:(?!_)|__(?:(?!_))+__)+_/.source,!0),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~))+?\2/.source,!1),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},url:{pattern:n(/!?\[(?:(?!\]))+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)| ?\[(?:(?!\]))+\])/.source,!1),lookbehind:!0,greedy:!0,inside:{variable:{pattern:/(\[)[^\]]+(?=\]$)/,lookbehind:!0},content:{pattern:/(^!?\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},string:{pattern:/"(?:\\.|[^"\\])*"(?=\)$)/}}}}),["url","bold","italic","strike"].forEach((function(t){["url","bold","italic","strike"].forEach((function(n){t!==n&&(e.languages.markdown[t].inside.content.inside[n]=e.languages.markdown[n])}))})),e.hooks.add("after-tokenize",(function(e){"markdown"!==e.language&&"md"!==e.language||function e(t){if(t&&"string"!=typeof t)for(var n=0,r=t.length;n",unchanged:" ",diff:"!"};Object.keys(t).forEach((function(n){var r=t[n],a=[];/^\w+$/.test(n)||a.push(/\w+/.exec(n)[0]),"diff"===n&&a.push("bold"),e.languages.diff[n]={pattern:RegExp("^(?:["+r+"].*(?:\r\n?|\n|(?![\\s\\S])))+","m"),alias:a}})),Object.defineProperty(e.languages.diff,"PREFIXES",{value:t})}(i),i.languages.git={comment:/^#.*/m,deleted:/^[-\u2013].*/m,inserted:/^\+.*/m,string:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/m,command:{pattern:/^.*\$ git .*$/m,inside:{parameter:/\s--?\w+/m}},coord:/^@@.*@@$/m,commit_sha1:/^commit \w{40}$/m},i.languages.go=i.languages.extend("clike",{keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,builtin:/\b(?:bool|byte|complex(?:64|128)|error|float(?:32|64)|rune|string|u?int(?:8|16|32|64)?|uintptr|append|cap|close|complex|copy|delete|imag|len|make|new|panic|print(?:ln)?|real|recover)\b/,boolean:/\b(?:_|iota|nil|true|false)\b/,operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,number:/(?:\b0x[a-f\d]+|(?:\b\d+\.?\d*|\B\.\d+)(?:e[-+]?\d+)?)i?/i,string:{pattern:/(["'`])(\\[\s\S]|(?!\1)[^\\])*\1/,greedy:!0}}),delete i.languages.go["class-name"],function(e){e.languages.handlebars={comment:/\{\{![\s\S]*?\}\}/,delimiter:{pattern:/^\{\{\{?|\}\}\}?$/i,alias:"punctuation"},string:/(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/,number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][+-]?\d+)?/,boolean:/\b(?:true|false)\b/,block:{pattern:/^(\s*~?\s*)[#\/]\S+?(?=\s*~?\s*$|\s)/i,lookbehind:!0,alias:"keyword"},brackets:{pattern:/\[[^\]]+\]/,inside:{punctuation:/\[|\]/,variable:/[\s\S]+/}},punctuation:/[!"#%&'()*+,.\/;<=>@\[\\\]^`{|}~]/,variable:/[^!"#%&'()*+,.\/;<=>@\[\\\]^`{|}~\s]+/},e.hooks.add("before-tokenize",(function(t){e.languages["markup-templating"].buildPlaceholders(t,"handlebars",/\{\{\{[\s\S]+?\}\}\}|\{\{[\s\S]+?\}\}/g)})),e.hooks.add("after-tokenize",(function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"handlebars")}))}(i),i.languages.json={property:{pattern:/"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,greedy:!0},string:{pattern:/"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,greedy:!0},comment:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,number:/-?\d+\.?\d*(e[+-]?\d+)?/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:true|false)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},i.languages.less=i.languages.extend("css",{comment:[/\/\*[\s\S]*?\*\//,{pattern:/(^|[^\\])\/\/.*/,lookbehind:!0}],atrule:{pattern:/@[\w-]+?(?:\([^{}]+\)|[^(){};])*?(?=\s*\{)/i,inside:{punctuation:/[:()]/}},selector:{pattern:/(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\([^{}]*\)|[^{};@])*?(?=\s*\{)/,inside:{variable:/@+[\w-]+/}},property:/(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/i,operator:/[+\-*\/]/}),i.languages.insertBefore("less","property",{variable:[{pattern:/@[\w-]+\s*:/,inside:{punctuation:/:/}},/@@?[\w-]+/],"mixin-usage":{pattern:/([{;]\s*)[.#](?!\d)[\w-]+.*?(?=[(;])/,lookbehind:!0,alias:"function"}}),i.languages.makefile={comment:{pattern:/(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,lookbehind:!0},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},builtin:/\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,symbol:{pattern:/^[^:=\r\n]+(?=\s*:(?!=))/m,inside:{variable:/\$+(?:[^(){}:#=\s]+|(?=[({]))/}},variable:/\$+(?:[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,keyword:[/-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,{pattern:/(\()(?:addsuffix|abspath|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:s|list)?)(?=[ \t])/,lookbehind:!0}],operator:/(?:::|[?:+!])?=|[|@]/,punctuation:/[:;(){}]/},i.languages.objectivec=i.languages.extend("c",{keyword:/\b(?:asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while|in|self|super)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,string:/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1|@"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,operator:/-[->]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete i.languages.objectivec["class-name"],i.languages.ocaml={comment:/\(\*[\s\S]*?\*\)/,string:[{pattern:/"(?:\\.|[^\\\r\n"])*"/,greedy:!0},{pattern:/(['`])(?:\\(?:\d+|x[\da-f]+|.)|(?!\1)[^\\\r\n])\1/i,greedy:!0}],number:/\b(?:0x[\da-f][\da-f_]+|(?:0[bo])?\d[\d_]*\.?[\d_]*(?:e[+-]?[\d_]+)?)/i,type:{pattern:/\B['`]\w*/,alias:"variable"},directive:{pattern:/\B#\w+/,alias:"function"},keyword:/\b(?:as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|match|method|module|mutable|new|object|of|open|prefix|private|rec|then|sig|struct|to|try|type|val|value|virtual|where|while|with)\b/,boolean:/\b(?:false|true)\b/,operator:/:=|[=<>@^|&+\-*\/$%!?~][!$%&*+\-.\/:<=>?@^|~]*|\b(?:and|asr|land|lor|lxor|lsl|lsr|mod|nor|or)\b/,punctuation:/[(){}\[\]|_.,:;]/},i.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},"string-interpolation":{pattern:/(?:f|rf|fr)(?:("""|''')[\s\S]+?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:{{)*){(?!{)(?:[^{}]|{(?!{)(?:[^{}]|{(?!{)(?:[^{}])+})+})+}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|rb|br)?("""|''')[\s\S]+?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|rb|br)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^\s*)@\w+(?:\.\w+)*/i,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:and|as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:True|False|None)\b/,number:/(?:\b(?=\d)|\B(?=\.))(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*\.?\d*|\.\d+)(?:e[+-]?\d+)?j?\b/i,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},i.languages.python["string-interpolation"].inside.interpolation.inside.rest=i.languages.python,i.languages.py=i.languages.python,i.languages.reason=i.languages.extend("clike",{comment:{pattern:/(^|[^\\])\/\*[\s\S]*?\*\//,lookbehind:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:mod|land|lor|lxor|lsl|lsr|asr)\b/}),i.languages.insertBefore("reason","class-name",{character:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,alias:"string"},constructor:{pattern:/\b[A-Z]\w*\b(?!\s*\.)/,alias:"variable"},label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete i.languages.reason.function,function(e){e.languages.sass=e.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t]+.+)*/m,lookbehind:!0}}),e.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,inside:{atrule:/(?:@[\w-]+|[+=])/m}}}),delete e.languages.sass.atrule;var t=/\$[-\w]+|#\{\$[-\w]+\}/,n=[/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|or|not)\b/,{pattern:/(\s+)-(?=\s)/,lookbehind:!0}];e.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,inside:{punctuation:/:/,variable:t,operator:n}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s]+.*)/m,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable:t,operator:n,important:e.languages.sass.important}}}),delete e.languages.sass.property,delete e.languages.sass.important,e.languages.insertBefore("sass","punctuation",{selector:{pattern:/([ \t]*)\S(?:,?[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,?[^,\r\n]+)*)*/,lookbehind:!0}})}(i),i.languages.scss=i.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-]+(?:\([^()]+\)|[^(])*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()]|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}]+[:{][^}]+))/m,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[\w-]|\$[-\w]+|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),i.languages.insertBefore("scss","atrule",{keyword:[/@(?:if|else(?: if)?|for|each|while|import|extend|debug|warn|mixin|include|function|return|content)/i,{pattern:/( +)(?:from|through)(?= )/,lookbehind:!0}]}),i.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),i.languages.insertBefore("scss","function",{placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:true|false)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|or|not)(?=\s)/,lookbehind:!0}}),i.languages.scss.atrule.inside.rest=i.languages.scss,i.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:_INSERT|COL)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURNS?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:TRUE|FALSE|NULL)\b/i,number:/\b0x[\da-f]+\b|\b\d+\.?\d*|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|IN|LIKE|NOT|OR|IS|DIV|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},function(e){var t={url:/url\((["']?).*?\1\)/i,string:{pattern:/("|')(?:(?!\1)[^\\\r\n]|\\(?:\r\n|[\s\S]))*\1/,greedy:!0},interpolation:null,func:null,important:/\B!(?:important|optional)\b/i,keyword:{pattern:/(^|\s+)(?:(?:if|else|for|return|unless)(?=\s+|$)|@[\w-]+)/,lookbehind:!0},hexcode:/#[\da-f]{3,6}/i,number:/\b\d+(?:\.\d+)?%?/,boolean:/\b(?:true|false)\b/,operator:[/~|[+!\/%<>?=]=?|[-:]=|\*[*=]?|\.+|&&|\|\||\B-\B|\b(?:and|in|is(?: a| defined| not|nt)?|not|or)\b/],punctuation:/[{}()\[\];:,]/};t.interpolation={pattern:/\{[^\r\n}:]+\}/,alias:"variable",inside:{delimiter:{pattern:/^{|}$/,alias:"punctuation"},rest:t}},t.func={pattern:/[\w-]+\([^)]*\).*/,inside:{function:/^[^(]+/,rest:t}},e.languages.stylus={comment:{pattern:/(^|[^\\])(\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},"atrule-declaration":{pattern:/(^\s*)@.+/m,lookbehind:!0,inside:{atrule:/^@[\w-]+/,rest:t}},"variable-declaration":{pattern:/(^[ \t]*)[\w$-]+\s*.?=[ \t]*(?:(?:\{[^}]*\}|.+)|$)/m,lookbehind:!0,inside:{variable:/^\S+/,rest:t}},statement:{pattern:/(^[ \t]*)(?:if|else|for|return|unless)[ \t]+.+/m,lookbehind:!0,inside:{keyword:/^\S+/,rest:t}},"property-declaration":{pattern:/((?:^|\{)([ \t]*))(?:[\w-]|\{[^}\r\n]+\})+(?:\s*:\s*|[ \t]+)[^{\r\n]*(?:;|[^{\r\n,](?=$)(?!(\r?\n|\r)(?:\{|\2[ \t]+)))/m,lookbehind:!0,inside:{property:{pattern:/^[^\s:]+/,inside:{interpolation:t.interpolation}},rest:t}},selector:{pattern:/(^[ \t]*)(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\))?|\{[^}\r\n]+\})+)(?:(?:\r?\n|\r)(?:\1(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\))?|\{[^}\r\n]+\})+)))*(?:,$|\{|(?=(?:\r?\n|\r)(?:\{|\1[ \t]+)))/m,lookbehind:!0,inside:{interpolation:t.interpolation,punctuation:/[{},]/}},func:t.func,string:t.string,interpolation:t.interpolation,punctuation:/[{}()\[\];:.]/}}(i);var l=i.util.clone(i.languages.typescript);i.languages.tsx=i.languages.extend("jsx",l),i.languages.wasm={comment:[/\(;[\s\S]*?;\)/,{pattern:/;;.*/,greedy:!0}],string:{pattern:/"(?:\\[\s\S]|[^"\\])*"/,greedy:!0},keyword:[{pattern:/\b(?:align|offset)=/,inside:{operator:/=/}},{pattern:/\b(?:(?:f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))?|memory\.(?:grow|size))\b/,inside:{punctuation:/\./}},/\b(?:anyfunc|block|br(?:_if|_table)?|call(?:_indirect)?|data|drop|elem|else|end|export|func|get_(?:global|local)|global|if|import|local|loop|memory|module|mut|nop|offset|param|result|return|select|set_(?:global|local)|start|table|tee_local|then|type|unreachable)\b/],variable:/\$[\w!#$%&'*+\-./:<=>?@\\^_`|~]+/i,number:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/,punctuation:/[()]/},i.languages.yaml={scalar:{pattern:/([\-:]\s*(?:![^\s]+)?[ \t]*[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)[^\r\n]+(?:\2[^\r\n]+)*)/,lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:/(\s*(?:^|[:\-,[{\r\n?])[ \t]*(?:![^\s]+)?[ \t]*)[^\r\n{[\]},#\s]+?(?=\s*:\s)/,lookbehind:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:/([:\-,[{]\s*(?:![^\s]+)?[ \t]*)(?:\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?)?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?)(?=[ \t]*(?:$|,|]|}))/m,lookbehind:!0,alias:"number"},boolean:{pattern:/([:\-,[{]\s*(?:![^\s]+)?[ \t]*)(?:true|false)[ \t]*(?=$|,|]|})/im,lookbehind:!0,alias:"important"},null:{pattern:/([:\-,[{]\s*(?:![^\s]+)?[ \t]*)(?:null|~)[ \t]*(?=$|,|]|})/im,lookbehind:!0,alias:"important"},string:{pattern:/([:\-,[{]\s*(?:![^\s]+)?[ \t]*)("|')(?:(?!\2)[^\\\r\n]|\\.)*\2(?=[ \t]*(?:$|,|]|}|\s*#))/m,lookbehind:!0,greedy:!0},number:{pattern:/([:\-,[{]\s*(?:![^\s]+)?[ \t]*)[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+\.?\d*|\.?\d+)(?:e[+-]?\d+)?|\.inf|\.nan)[ \t]*(?=$|,|]|})/im,lookbehind:!0},tag:/![^\s]+/,important:/[&*][\w]+/,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},i.languages.yml=i.languages.yaml,t.a=i},function(e,t,n){"use strict";var r=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function i(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(a){return!1}}()?Object.assign:function(e,t){for(var n,l,u=i(e),s=1;so;)i(n[o++]);e._c=[],e._n=!1,t&&!e._h&&L(e)}))}},L=function(e){v.call(u,(function(){var t,n,r,a=e._v,o=F(e);if(o&&(t=w((function(){C?S.emit("unhandledRejection",a,e):(n=u.onunhandledrejection)?n({promise:e,reason:a}):(r=u.console)&&r.error&&r.error("Unhandled promise rejection",a)})),e._h=C||F(e)?2:1),e._a=void 0,o&&t.e)throw t.v}))},F=function(e){return 1!==e._h&&0===(e._a||e._c).length},D=function(e){v.call(u,(function(){var t;C?S.emit("rejectionHandled",e):(t=u.onrejectionhandled)&&t({promise:e,reason:e._v})}))},M=function(e){var t=this;t._d||(t._d=!0,(t=t._w||t)._v=e,t._s=2,t._a||(t._a=t._c.slice()),I(t,!0))},j=function(e){var t,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw x("Promise can't be resolved itself");(t=R(e))?b((function(){var r={_w:n,_d:!1};try{t.call(e,s(j,r,1),s(M,r,1))}catch(a){M.call(r,a)}})):(n._v=e,n._s=1,I(n,!1))}catch(r){M.call({_w:n,_d:!1},r)}}};N||(O=function(e){m(this,O,"Promise","_h"),p(e),r.call(this);try{e(s(j,this,1),s(M,this,1))}catch(t){M.call(this,t)}},(r=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(127)(O.prototype,{then:function(e,t){var n=A(h(this,O));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=C?S.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&I(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),o=function(){var e=new r;this.promise=e,this.resolve=s(j,e,1),this.reject=s(M,e,1)},y.f=A=function(e){return e===O||e===i?new o(e):a(e)}),f(f.G+f.W+f.F*!N,{Promise:O}),n(41)(O,"Promise"),n(84)("Promise"),i=n(15).Promise,f(f.S+f.F*!N,"Promise",{reject:function(e){var t=A(this);return(0,t.reject)(e),t.promise}}),f(f.S+f.F*(l||!N),"Promise",{resolve:function(e){return k(l&&this===i?O:this,e)}}),f(f.S+f.F*!(N&&n(128)((function(e){O.all(e).catch(P)}))),"Promise",{all:function(e){var t=this,n=A(t),r=n.resolve,a=n.reject,o=w((function(){var n=[],o=0,i=1;g(e,!1,(function(e){var l=o++,u=!1;n.push(void 0),i++,t.resolve(e).then((function(e){u||(u=!0,n[l]=e,--i||r(n))}),a)})),--i||r(n)}));return o.e&&a(o.v),n.promise},race:function(e){var t=this,n=A(t),r=n.reject,a=w((function(){g(e,!1,(function(e){t.resolve(e).then(n.resolve,r)}))}));return a.e&&r(a.v),n.promise}})},function(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE){0;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}}(),e.exports=n(88)},function(e,t,n){var r=n(8),a=n(30),o=n(3)("species");e.exports=function(e,t){var n,i=r(e).constructor;return void 0===i||null==(n=r(i)[o])?t:a(n)}},function(e,t,n){var r=n(40),a=n(29);e.exports=function(e){return function(t,n){var o,i,l=String(a(t)),u=r(n),s=l.length;return u<0||u>=s?e?"":void 0:(o=l.charCodeAt(u))<55296||o>56319||u+1===s||(i=l.charCodeAt(u+1))<56320||i>57343?e?l.charAt(u):o:e?l.slice(u,u+2):i-56320+(o-55296<<10)+65536}}},function(e,t,n){"use strict";var r=n(37),a=n(17),o=n(14),i=n(10),l=n(22),u=n(94),s=n(41),c=n(97),f=n(3)("iterator"),d=!([].keys&&"next"in[].keys()),p=function(){return this};e.exports=function(e,t,n,m,g,h,v){u(n,t,m);var b,y,w,E=function(e){if(!d&&e in T)return T[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},k=t+" Iterator",x="values"==g,S=!1,T=e.prototype,_=T[f]||T["@@iterator"]||g&&T[g],O=_||E(g),C=g?x?E("entries"):O:void 0,P="Array"==t&&T.entries||_;if(P&&(w=c(P.call(new e)))!==Object.prototype&&w.next&&(s(w,k,!0),r||"function"==typeof w[f]||i(w,f,p)),x&&_&&"values"!==_.name&&(S=!0,O=function(){return _.call(this)}),r&&!v||!d&&!S&&T[f]||i(T,f,O),l[t]=O,l[k]=p,g)if(b={values:x?O:E("values"),keys:h?O:E("keys"),entries:C},v)for(y in b)y in T||o(T,y,b[y]);else a(a.P+a.F*(d||S),t,b);return b}},function(e,t,n){var r=n(6).document;e.exports=r&&r.documentElement},function(e,t,n){"use strict";var r=n(16);t.a=r.b},,function(e,t,n){var r,a,o,i=n(28),l=n(122),u=n(63),s=n(44),c=n(6),f=c.process,d=c.setImmediate,p=c.clearImmediate,m=c.MessageChannel,g=c.Dispatch,h=0,v={},b=function(){var e=+this;if(v.hasOwnProperty(e)){var t=v[e];delete v[e],t()}},y=function(e){b.call(e.data)};d&&p||(d=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return v[++h]=function(){l("function"==typeof e?e:Function(e),t)},r(h),h},p=function(e){delete v[e]},"process"==n(21)(f)?r=function(e){f.nextTick(i(b,e,1))}:g&&g.now?r=function(e){g.now(i(b,e,1))}:m?(o=(a=new m).port2,a.port1.onmessage=y,r=i(o.postMessage,o,1)):c.addEventListener&&"function"==typeof postMessage&&!c.importScripts?(r=function(e){c.postMessage(e+"","*")},c.addEventListener("message",y,!1)):r="onreadystatechange"in s("script")?function(e){u.appendChild(s("script")).onreadystatechange=function(){u.removeChild(this),b.call(e)}}:function(e){setTimeout(i(b,e,1),0)}),e.exports={set:d,clear:p}},function(e,t,n){"use strict";var r=n(30);function a(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r})),this.resolve=r(t),this.reject=r(n)}e.exports.f=function(e){return new a(e)}},function(e,t,n){"use strict";var r=n(56),a={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},l={};function u(e){return r.isMemo(e)?i:l[e.$$typeof]||a}l[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},l[r.Memo]=i;var s=Object.defineProperty,c=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,m=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(m){var a=p(n);a&&a!==m&&e(t,a,r)}var i=c(n);f&&(i=i.concat(f(n)));for(var l=u(t),g=u(n),h=0;h")})),f=function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();e.exports=function(e,t,n){var d=l(e),p=!o((function(){var t={};return t[d]=function(){return 7},7!=""[e](t)})),m=p?!o((function(){var t=!1,n=/a/;return n.exec=function(){return t=!0,null},"split"===e&&(n.constructor={},n.constructor[s]=function(){return n}),n[d](""),!t})):void 0;if(!p||!m||"replace"===e&&!c||"split"===e&&!f){var g=/./[d],h=n(i,d,""[e],(function(e,t,n,r,a){return t.exec===u?p&&!a?{done:!0,value:g.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}})),v=h[0],b=h[1];r(String.prototype,e,v),a(RegExp.prototype,d,2==t?function(e,t){return b.call(e,this,t)}:function(e){return b.call(e,this)})}}},function(e,t,n){var r=n(12),a=n(21),o=n(3)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[o])?!!t:"RegExp"==a(e))}},function(e,t,n){"use strict";var r=n(61)(!0);e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},function(e,t,n){var r=n(12);e.exports=function(e,t){if(!r(e))return e;var n,a;if(t&&"function"==typeof(n=e.toString)&&!r(a=n.call(e)))return a;if("function"==typeof(n=e.valueOf)&&!r(a=n.call(e)))return a;if(!t&&"function"==typeof(n=e.toString)&&!r(a=n.call(e)))return a;throw TypeError("Can't convert object to primitive value")}},function(e,t,n){var r=n(3)("unscopables"),a=Array.prototype;null==a[r]&&n(10)(a,r,{}),e.exports=function(e){a[r][e]=!0}},function(e,t,n){var r=n(21);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},function(e,t,n){"use strict";var r=n(74),a=n(8),o=n(60),i=n(75),l=n(35),u=n(71),s=n(43),c=n(18),f=Math.min,d=[].push,p="length",m=!c((function(){RegExp(4294967295,"y")}));n(73)("split",2,(function(e,t,n,c){var g;return g="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1)[p]||2!="ab".split(/(?:ab)*/)[p]||4!=".".split(/(.?)(.?)/)[p]||".".split(/()()/)[p]>1||"".split(/.?/)[p]?function(e,t){var a=String(this);if(void 0===e&&0===t)return[];if(!r(e))return n.call(a,e,t);for(var o,i,l,u=[],c=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),f=0,m=void 0===t?4294967295:t>>>0,g=new RegExp(e.source,c+"g");(o=s.call(g,a))&&!((i=g.lastIndex)>f&&(u.push(a.slice(f,o.index)),o[p]>1&&o.index=m));)g.lastIndex===o.index&&g.lastIndex++;return f===a[p]?!l&&g.test("")||u.push(""):u.push(a.slice(f)),u[p]>m?u.slice(0,m):u}:"0".split(void 0,0)[p]?function(e,t){return void 0===e&&0===t?[]:n.call(this,e,t)}:n,[function(n,r){var a=e(this),o=null==n?void 0:n[t];return void 0!==o?o.call(n,a,r):g.call(String(a),n,r)},function(e,t){var r=c(g,e,this,t,g!==n);if(r.done)return r.value;var s=a(e),d=String(this),p=o(s,RegExp),h=s.unicode,v=(s.ignoreCase?"i":"")+(s.multiline?"m":"")+(s.unicode?"u":"")+(m?"y":"g"),b=new p(m?s:"^(?:"+s.source+")",v),y=void 0===t?4294967295:t>>>0;if(0===y)return[];if(0===d.length)return null===u(b,d)?[d]:[];for(var w=0,E=0,k=[];Edocument.F=Object<\/script>"),e.close(),u=e.F;r--;)delete u.prototype[o[r]];return u()};e.exports=Object.create||function(e,t){var n;return null!==e?(l.prototype=r(e),n=new l,l.prototype=null,n[i]=e):n=u(),void 0===t?n:a(n,t)}},function(e,t,n){var r=n(25),a=n(26),o=n(83)(!1),i=n(45)("IE_PROTO");e.exports=function(e,t){var n,l=a(e),u=0,s=[];for(n in l)n!=i&&r(l,n)&&s.push(n);for(;t.length>u;)r(l,n=t[u++])&&(~o(s,n)||s.push(n));return s}},function(e,t,n){var r=n(26),a=n(35),o=n(96);e.exports=function(e){return function(t,n,i){var l,u=r(t),s=a(u.length),c=o(i,s);if(e&&n!=n){for(;s>c;)if((l=u[c++])!=l)return!0}else for(;s>c;c++)if((e||c in u)&&u[c]===n)return e||c||0;return!e&&-1}}},function(e,t,n){"use strict";var r=n(6),a=n(23),o=n(11),i=n(3)("species");e.exports=function(e){var t=r[e];o&&t&&!t[i]&&a.f(t,i,{configurable:!0,get:function(){return this}})}},function(e,t,n){"use strict";var r=n(61)(!0);n(62)(String,"String",(function(e){this._t=String(e),this._i=0}),(function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})}))},function(e,t,n){e.exports=n(132)},function(e,t,n){"use strict";var r=n(54),a="function"==typeof Symbol&&Symbol.for,o=a?Symbol.for("react.element"):60103,i=a?Symbol.for("react.portal"):60106,l=a?Symbol.for("react.fragment"):60107,u=a?Symbol.for("react.strict_mode"):60108,s=a?Symbol.for("react.profiler"):60114,c=a?Symbol.for("react.provider"):60109,f=a?Symbol.for("react.context"):60110,d=a?Symbol.for("react.forward_ref"):60112,p=a?Symbol.for("react.suspense"):60113,m=a?Symbol.for("react.memo"):60115,g=a?Symbol.for("react.lazy"):60116,h="function"==typeof Symbol&&Symbol.iterator;function v(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;nA.length&&A.push(e)}function I(e,t,n){return null==e?0:function e(t,n,r,a){var l=typeof t;"undefined"!==l&&"boolean"!==l||(t=null);var u=!1;if(null===t)u=!0;else switch(l){case"string":case"number":u=!0;break;case"object":switch(t.$$typeof){case o:case i:u=!0}}if(u)return r(a,t,""===n?"."+L(t,0):n),1;if(u=0,n=""===n?".":n+":",Array.isArray(t))for(var s=0;s