commit 090abb90448486e085fbd2de2ee88c3d22d40b32 Author: blakeblackshear Date: Fri Jan 22 13:34:40 2021 +0000 deploy: b93d354c604b5971c2086b0ba127b13a7ebeb067 diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 000000000..e69de29bb diff --git a/064d4f6f.2024243c.js b/064d4f6f.2024243c.js new file mode 100644 index 000000000..5dcad414a --- /dev/null +++ b/064d4f6f.2024243c.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[3],{63:function(e,t,a){"use strict";a.r(t),a.d(t,"frontMatter",(function(){return o})),a.d(t,"metadata",(function(){return s})),a.d(t,"toc",(function(){return l})),a.d(t,"default",(function(){return p}));var n=a(3),r=a(7),i=(a(0),a(92)),o={id:"home-assistant",title:"Integration with Home Assistant",sidebar_label:"Home Assistant"},s={unversionedId:"usage/home-assistant",id:"usage/home-assistant",isDocsHomePage:!1,title:"Integration with Home Assistant",description:"The best way to integrate with HomeAssistant is to use the official integration. When configuring the integration, you will be asked for the Host of your frigate instance. This value should be the url you use to access Frigate in the browser and will look like http5000/. If you are using HassOS with the addon, the host should be http5000 (or http5000 if your are using the beta version of the addon). HomeAssistant needs access to port 5000 (api) and 1935 (rtmp) for all features. The integration will setup the following entities within HomeAssistant:",source:"@site/docs/usage/home-assistant.md",slug:"/usage/home-assistant",permalink:"/usage/home-assistant",editUrl:"https://github.com/blakeblackshear/frigate/edit/master/docs/docs/usage/home-assistant.md",version:"current",sidebar_label:"Home Assistant",sidebar:"docs",previous:{title:"Advanced",permalink:"/configuration/advanced"},next:{title:"Web Interface",permalink:"/usage/web"}},l=[{value:"Sensors:",id:"sensors",children:[]},{value:"Cameras:",id:"cameras",children:[]},{value:"Media Browser:",id:"media-browser",children:[]},{value:"API:",id:"api",children:[{value:"Notifications",id:"notifications",children:[]}]}],c={toc:l};function p(e){var t=e.components,a=Object(r.a)(e,["components"]);return Object(i.b)("wrapper",Object(n.a)({},c,a,{components:t,mdxType:"MDXLayout"}),Object(i.b)("p",null,"The best way to integrate with HomeAssistant is to use the ",Object(i.b)("a",Object(n.a)({parentName:"p"},{href:"https://github.com/blakeblackshear/frigate-hass-integration"}),"official integration"),". When configuring the integration, you will be asked for the ",Object(i.b)("inlineCode",{parentName:"p"},"Host")," of your frigate instance. This value should be the url you use to access Frigate in the browser and will look like ",Object(i.b)("inlineCode",{parentName:"p"},"http://:5000/"),". If you are using HassOS with the addon, the host should be ",Object(i.b)("inlineCode",{parentName:"p"},"http://ccab4aaf-frigate:5000")," (or ",Object(i.b)("inlineCode",{parentName:"p"},"http://ccab4aaf-frigate-beta:5000")," if your are using the beta version of the addon). HomeAssistant needs access to port 5000 (api) and 1935 (rtmp) for all features. The integration will setup the following entities within HomeAssistant:"),Object(i.b)("h2",{id:"sensors"},"Sensors:"),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},"Stats to monitor frigate performance"),Object(i.b)("li",{parentName:"ul"},"Object counts for all zones and cameras")),Object(i.b)("h2",{id:"cameras"},"Cameras:"),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},"Cameras for image of the last detected object for each camera"),Object(i.b)("li",{parentName:"ul"},"Camera entities with stream support (requires RTMP)")),Object(i.b)("h2",{id:"media-browser"},"Media Browser:"),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},"Rich UI with thumbnails for browsing event clips"),Object(i.b)("li",{parentName:"ul"},"Rich UI for browsing 24/7 recordings by month, day, camera, time")),Object(i.b)("h2",{id:"api"},"API:"),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},"Notification API with public facing endpoints for images in notifications")),Object(i.b)("h3",{id:"notifications"},"Notifications"),Object(i.b)("p",null,"Frigate publishes event information in the form of a change feed via MQTT. This allows lots of customization for notifications to meet your needs. Event changes are published with ",Object(i.b)("inlineCode",{parentName:"p"},"before")," and ",Object(i.b)("inlineCode",{parentName:"p"},"after")," information as shown ",Object(i.b)("a",Object(n.a)({parentName:"p"},{href:"#frigateevents"}),"here"),"."),Object(i.b)("p",null,'Here is a simple example of a notification automation of events which will update the existing notification for each change. This means the image you see in the notification will update as frigate finds a "better" image.'),Object(i.b)("pre",null,Object(i.b)("code",Object(n.a)({parentName:"pre"},{className:"language-yaml"}),'automation:\n - alias: Notify of events\n trigger:\n platform: mqtt\n topic: frigate/events\n action:\n - service: notify.mobile_app_pixel_3\n data_template:\n message: \'A {{trigger.payload_json["after"]["label"]}} was detected.\'\n data:\n image: \'https://your.public.hass.address.com/api/frigate/notifications/{{trigger.payload_json["after"]["id"]}}/thumbnail.jpg?format=android\'\n tag: \'{{trigger.payload_json["after"]["id"]}}\'\n')),Object(i.b)("pre",null,Object(i.b)("code",Object(n.a)({parentName:"pre"},{className:"language-yaml"}),"automation:\n - alias: When a person enters a zone named yard\n trigger:\n platform: mqtt\n topic: frigate/events\n conditions:\n - \"{{ trigger.payload_json['after']['label'] == 'person' }}\"\n - \"{{ 'yard' in trigger.payload_json['after']['entered_zones'] }}\"\n action:\n - service: notify.mobile_app_pixel_3\n data_template:\n message: \"A {{trigger.payload_json['after']['label']}} has entered the yard.\"\n data:\n image: \"https://url.com/api/frigate/notifications/{{trigger.payload_json['after']['id']}}/thumbnail.jpg\"\n tag: \"{{trigger.payload_json['after']['id']}}\"\n")),Object(i.b)("pre",null,Object(i.b)("code",Object(n.a)({parentName:"pre"},{className:"language-yaml"}),"- alias: When a person leaves a zone named yard\n trigger:\n platform: mqtt\n topic: frigate/events\n conditions:\n - \"{{ trigger.payload_json['after']['label'] == 'person' }}\"\n - \"{{ 'yard' in trigger.payload_json['before']['current_zones'] }}\"\n - \"{{ not 'yard' in trigger.payload_json['after']['current_zones'] }}\"\n action:\n - service: notify.mobile_app_pixel_3\n data_template:\n message: \"A {{trigger.payload_json['after']['label']}} has left the yard.\"\n data:\n image: \"https://url.com/api/frigate/notifications/{{trigger.payload_json['after']['id']}}/thumbnail.jpg\"\n tag: \"{{trigger.payload_json['after']['id']}}\"\n")),Object(i.b)("pre",null,Object(i.b)("code",Object(n.a)({parentName:"pre"},{className:"language-yaml"}),"- alias: Notify for dogs in the front with a high top score\n trigger:\n platform: mqtt\n topic: frigate/events\n conditions:\n - \"{{ trigger.payload_json['after']['label'] == 'dog' }}\"\n - \"{{ trigger.payload_json['after']['camera'] == 'front' }}\"\n - \"{{ trigger.payload_json['after']['top_score'] > 0.98 }}\"\n action:\n - service: notify.mobile_app_pixel_3\n data_template:\n message: 'High confidence dog detection.'\n data:\n image: \"https://url.com/api/frigate/notifications/{{trigger.payload_json['after']['id']}}/thumbnail.jpg\"\n tag: \"{{trigger.payload_json['after']['id']}}\"\n")),Object(i.b)("p",null,"If you are using telegram, you can fetch the image directly from Frigate:"),Object(i.b)("pre",null,Object(i.b)("code",Object(n.a)({parentName:"pre"},{className:"language-yaml"}),'automation:\n - alias: Notify of events\n trigger:\n platform: mqtt\n topic: frigate/events\n action:\n - service: notify.telegram_full\n data_template:\n message: \'A {{trigger.payload_json["after"]["label"]}} was detected.\'\n data:\n photo:\n # this url should work for addon users\n - url: \'http://ccab4aaf-frigate:5000/api/events/{{trigger.payload_json["after"]["id"]}}/thumbnail.jpg\'\n caption: \'A {{trigger.payload_json["after"]["label"]}} was detected on {{ trigger.payload_json["after"]["camera"] }} camera\'\n')))}p.isMDXComponent=!0},92:function(e,t,a){"use strict";a.d(t,"a",(function(){return d})),a.d(t,"b",(function(){return u}));var n=a(0),r=a.n(n);function i(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function s(e){for(var t=1;t=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 c=r.a.createContext({}),p=function(e){var t=r.a.useContext(c),a=t;return e&&(a="function"==typeof e?e(t):s(s({},t),e)),a},d=function(e){var t=p(e.components);return r.a.createElement(c.Provider,{value:t},e.children)},f={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},g=r.a.forwardRef((function(e,t){var a=e.components,n=e.mdxType,i=e.originalType,o=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),d=p(a),g=n,u=d["".concat(o,".").concat(g)]||d[g]||f[g]||i;return a?r.a.createElement(u,s(s({ref:t},c),{},{components:a})):r.a.createElement(u,s({ref:t},c))}));function u(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var i=a.length,o=new Array(i);o[0]=g;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s.mdxType="string"==typeof e?e:n,o[1]=s;for(var c=2;c0)&&(d.unobserve(t),d.disconnect(),n())}))}))).observe(t))},to:j||""},l&&{isActive:h,activeClassName:p}))}},97:function(e,t,n){"use strict";n.r(t);var r=n(9);n.d(t,"MemoryRouter",(function(){return r.d})),n.d(t,"Prompt",(function(){return r.f})),n.d(t,"Redirect",(function(){return r.g})),n.d(t,"Route",(function(){return r.h})),n.d(t,"Router",(function(){return r.i})),n.d(t,"StaticRouter",(function(){return r.j})),n.d(t,"Switch",(function(){return r.k})),n.d(t,"generatePath",(function(){return r.l})),n.d(t,"matchPath",(function(){return r.m})),n.d(t,"useHistory",(function(){return r.n})),n.d(t,"useLocation",(function(){return r.o})),n.d(t,"useParams",(function(){return r.p})),n.d(t,"useRouteMatch",(function(){return r.q})),n.d(t,"withRouter",(function(){return r.r})),n.d(t,"BrowserRouter",(function(){return r.a})),n.d(t,"HashRouter",(function(){return r.b})),n.d(t,"Link",(function(){return r.c})),n.d(t,"NavLink",(function(){return r.e}))},98:function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return u}));var r=n(22),o=n(100);function i(){var e=Object(r.default)().siteConfig,t=(e=void 0===e?{}:e).baseUrl,n=void 0===t?"/":t,i=e.url;return{withBaseUrl:function(e,t){return function(e,t,n,r){var i=void 0===r?{}:r,u=i.forcePrependBaseUrl,s=void 0!==u&&u,c=i.absolute,a=void 0!==c&&c;if(!n)return n;if(n.startsWith("#"))return n;if(Object(o.b)(n))return n;if(s)return t+n;var f=n.startsWith(t)?n:t+n.replace(/^\//,"");return a?e+f:f}(i,n,e,t)}}}function u(e,t){return void 0===t&&(t={}),(0,i().withBaseUrl)(e,t)}}}]); \ No newline at end of file diff --git a/17896441.8d5dd138.js b/17896441.8d5dd138.js new file mode 100644 index 000000000..e23ffa5af --- /dev/null +++ b/17896441.8d5dd138.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[4],{91:function(e,t,a){"use strict";a.r(t);var n=a(0),l=a.n(n),r=a(24),c=a(93),i=a(22),o=a(98),m=a(96);var s=function(e){var t=e.metadata;return l.a.createElement("nav",{className:"pagination-nav","aria-label":"Blog list page navigation"},l.a.createElement("div",{className:"pagination-nav__item"},t.previous&&l.a.createElement(m.a,{className:"pagination-nav__link",to:t.previous.permalink},l.a.createElement("div",{className:"pagination-nav__sublabel"},"Previous"),l.a.createElement("div",{className:"pagination-nav__label"},"\xab ",t.previous.title))),l.a.createElement("div",{className:"pagination-nav__item pagination-nav__item--next"},t.next&&l.a.createElement(m.a,{className:"pagination-nav__link",to:t.next.permalink},l.a.createElement("div",{className:"pagination-nav__sublabel"},"Next"),l.a.createElement("div",{className:"pagination-nav__label"},t.next.title," \xbb"))))},d=a(95);var u=function(){var e=Object(i.default)().siteConfig.title,t=Object(d.useActivePlugin)({failfast:!0}).pluginId,a=Object(c.useDocsPreferredVersion)(t).savePreferredVersionName,n=Object(d.useActiveVersion)(t),r=Object(d.useDocVersionSuggestions)(t),o=r.latestDocSuggestion,s=r.latestVersionSuggestion;if(!s)return l.a.createElement(l.a.Fragment,null);var u,v=null!=o?o:(u=s).docs.find((function(e){return e.id===u.mainDocId}));return l.a.createElement("div",{className:"alert alert--warning margin-bottom--md",role:"alert"},"current"===n.name?l.a.createElement("div",null,"This is unreleased documentation for ",e," ",l.a.createElement("strong",null,n.label)," version."):l.a.createElement("div",null,"This is documentation for ",e," ",l.a.createElement("strong",null,n.label),", which is no longer actively maintained."),l.a.createElement("div",{className:"margin-top--md"},"For up-to-date documentation, see the"," ",l.a.createElement("strong",null,l.a.createElement(m.a,{to:v.path,onClick:function(){return a(s.name)}},"latest version"))," ","(",s.label,")."))},v=a(94);var E=function(e,t,a){var l=Object(n.useState)(void 0),r=l[0],c=l[1];Object(n.useEffect)((function(){function n(){var n=function(){var e=Array.from(document.getElementsByClassName("anchor")),t=e.find((function(e){return e.getBoundingClientRect().top>=a}));if(t){if(t.getBoundingClientRect().top>=a){var n=e[e.indexOf(t)-1];return null!=n?n:t}return t}return e[e.length-1]}();if(n)for(var l=0,i=!1,o=document.getElementsByClassName(e);l1,S=Object(c.useTitleFormatter)(_),V=Object(o.a)(g,{absolute:!0});return l.a.createElement(l.a.Fragment,null,l.a.createElement(r.a,null,l.a.createElement("title",null,S),l.a.createElement("meta",{property:"og:title",content:S}),h&&l.a.createElement("meta",{name:"description",content:h}),h&&l.a.createElement("meta",{property:"og:description",content:h}),f&&f.length&&l.a.createElement("meta",{name:"keywords",content:f.join(",")}),g&&l.a.createElement("meta",{property:"og:image",content:V}),g&&l.a.createElement("meta",{name:"twitter:image",content:V}),g&&l.a.createElement("meta",{name:"twitter:image:alt",content:"Image for "+_}),O&&l.a.createElement("meta",{property:"og:url",content:a+O}),O&&l.a.createElement("link",{rel:"canonical",href:a+O})),l.a.createElement("div",{className:"row"},l.a.createElement("div",{className:Object(v.a)("col",(t={},t[y.a.docItemCol]=!b,t))},l.a.createElement(u,null),l.a.createElement("div",{className:y.a.docItemContainer},l.a.createElement("article",null,A&&l.a.createElement("div",null,l.a.createElement("span",{className:"badge badge--secondary"},"Version: ",I.label)),!p&&l.a.createElement("header",null,l.a.createElement("h1",{className:y.a.docTitle},_)),l.a.createElement("div",{className:"markdown"},l.a.createElement(n,null))),(j||k||C)&&l.a.createElement("div",{className:"margin-vert--xl"},l.a.createElement("div",{className:"row"},l.a.createElement("div",{className:"col"},j&&l.a.createElement("a",{href:j,target:"_blank",rel:"noreferrer noopener"},l.a.createElement(w,null),"Edit this page")),(k||C)&&l.a.createElement("div",{className:"col text--right"},l.a.createElement("em",null,l.a.createElement("small",null,"Last updated"," ",k&&l.a.createElement(l.a.Fragment,null,"on"," ",l.a.createElement("time",{dateTime:new Date(1e3*k).toISOString(),className:y.a.docLastUpdatedAt},new Date(1e3*k).toLocaleDateString()),C&&" "),C&&l.a.createElement(l.a.Fragment,null,"by ",l.a.createElement("strong",null,C)),!1))))),l.a.createElement("div",{className:"margin-vert--lg"},l.a.createElement(s,{metadata:m})))),!b&&n.toc&&l.a.createElement("div",{className:"col col--3"},l.a.createElement(N,{toc:n.toc}))))}}}]); \ No newline at end of file diff --git a/1c86fc29.0c5fb744.js b/1c86fc29.0c5fb744.js new file mode 100644 index 000000000..d05e84ee9 --- /dev/null +++ b/1c86fc29.0c5fb744.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[5],{73:function(e,t,r){"use strict";r.r(t),r.d(t,"frontMatter",(function(){return i})),r.d(t,"metadata",(function(){return c})),r.d(t,"toc",(function(){return l})),r.d(t,"default",(function(){return p}));var a=r(3),n=r(7),o=(r(0),r(92)),i={id:"optimizing",title:"Optimizing performance"},c={unversionedId:"configuration/optimizing",id:"configuration/optimizing",isDocsHomePage:!1,title:"Optimizing performance",description:"- Google Coral//coral.ai",source:"@site/docs/configuration/optimizing.md",slug:"/configuration/optimizing",permalink:"/configuration/optimizing",editUrl:"https://github.com/blakeblackshear/frigate/edit/master/docs/docs/configuration/optimizing.md",version:"current",sidebar:"docs",previous:{title:"Cameras",permalink:"/configuration/cameras"},next:{title:"Detectors",permalink:"/configuration/detectors"}},l=[{value:"FFmpeg Hardware Acceleration",id:"ffmpeg-hardware-acceleration",children:[]}],s={toc:l};function p(e){var t=e.components,r=Object(n.a)(e,["components"]);return Object(o.b)("wrapper",Object(a.a)({},s,r,{components:t,mdxType:"MDXLayout"}),Object(o.b)("ul",null,Object(o.b)("li",{parentName:"ul"},Object(o.b)("strong",{parentName:"li"},"Google Coral"),": It is strongly recommended to use a Google Coral, but Frigate will fall back to CPU in the event one is not found. Offloading TensorFlow to the Google Coral is an order of magnitude faster and will reduce your CPU load dramatically. A $60 device will outperform $2000 CPU. Frigate should work with any supported Coral device from ",Object(o.b)("a",Object(a.a)({parentName:"li"},{href:"https://coral.ai"}),"https://coral.ai")),Object(o.b)("li",{parentName:"ul"},Object(o.b)("strong",{parentName:"li"},"Resolution"),": For the ",Object(o.b)("inlineCode",{parentName:"li"},"detect")," input, choose a camera resolution where the smallest object you want to detect barely fits inside a 300x300px square. The model used by Frigate is trained on 300x300px images, so you will get worse performance and no improvement in accuracy by using a larger resolution since Frigate resizes the area where it is looking for objects to 300x300 anyway."),Object(o.b)("li",{parentName:"ul"},Object(o.b)("strong",{parentName:"li"},"FPS"),": 5 frames per second should be adequate. Higher frame rates will require more CPU usage without improving detections or accuracy. Reducing the frame rate on your camera will have the greatest improvement on system resources."),Object(o.b)("li",{parentName:"ul"},Object(o.b)("strong",{parentName:"li"},"Hardware Acceleration"),": Make sure you configure the ",Object(o.b)("inlineCode",{parentName:"li"},"hwaccel_args")," for your hardware. They provide a significant reduction in CPU usage if they are available."),Object(o.b)("li",{parentName:"ul"},Object(o.b)("strong",{parentName:"li"},"Masks"),": Masks can be used to ignore motion and reduce your idle CPU load. If you have areas with regular motion such as timestamps or trees blowing in the wind, frigate will constantly try to determine if that motion is from a person or other object you are tracking. Those detections not only increase your average CPU usage, but also clog the pipeline for detecting objects elsewhere. If you are experiencing high values for ",Object(o.b)("inlineCode",{parentName:"li"},"detection_fps")," when no objects of interest are in the cameras, you should use masks to tell frigate to ignore movement from trees, bushes, timestamps, or any part of the image where detections should not be wasted looking for objects.")),Object(o.b)("h3",{id:"ffmpeg-hardware-acceleration"},"FFmpeg Hardware Acceleration"),Object(o.b)("p",null,"Frigate works on Raspberry Pi 3b/4 and x86 machines. It is recommended to update your configuration to enable hardware accelerated decoding in ffmpeg. Depending on your system, these parameters may not be compatible."),Object(o.b)("p",null,"Raspberry Pi 3/4 (32-bit OS)\n",Object(o.b)("strong",{parentName:"p"},"NOTICE"),": If you are using the addon, ensure you turn off ",Object(o.b)("inlineCode",{parentName:"p"},"Protection mode")," for hardware acceleration."),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"ffmpeg:\n hwaccel_args:\n - -c:v\n - h264_mmal\n")),Object(o.b)("p",null,"Raspberry Pi 3/4 (64-bit OS)\n",Object(o.b)("strong",{parentName:"p"},"NOTICE"),": If you are using the addon, ensure you turn off ",Object(o.b)("inlineCode",{parentName:"p"},"Protection mode")," for hardware acceleration."),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"ffmpeg:\n hwaccel_args:\n - -c:v\n - h264_v4l2m2m\n")),Object(o.b)("p",null,"Intel-based CPUs (<10th Generation) via Quicksync (",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"https://trac.ffmpeg.org/wiki/Hardware/QuickSync"}),"https://trac.ffmpeg.org/wiki/Hardware/QuickSync"),")"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"ffmpeg:\n hwaccel_args:\n - -hwaccel\n - vaapi\n - -hwaccel_device\n - /dev/dri/renderD128\n - -hwaccel_output_format\n - yuv420p\n")),Object(o.b)("p",null,"Intel-based CPUs (>=10th Generation) via Quicksync (",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"https://trac.ffmpeg.org/wiki/Hardware/QuickSync"}),"https://trac.ffmpeg.org/wiki/Hardware/QuickSync"),")"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"ffmpeg:\n hwaccel_args:\n - -hwaccel\n - qsv\n - -qsv_device\n - /dev/dri/renderD128\n")),Object(o.b)("p",null,"AMD/ATI GPUs (Radeon HD 2000 and newer GPUs) via libva-mesa-driver (",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"https://trac.ffmpeg.org/wiki/Hardware/QuickSync"}),"https://trac.ffmpeg.org/wiki/Hardware/QuickSync"),")\n",Object(o.b)("strong",{parentName:"p"},"Note:")," You also need to set ",Object(o.b)("inlineCode",{parentName:"p"},"LIBVA_DRIVER_NAME=radeonsi")," as an environment variable on the container."),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"ffmpeg:\n hwaccel_args:\n - -hwaccel\n - vaapi\n - -hwaccel_device\n - /dev/dri/renderD128\n")),Object(o.b)("p",null,"Nvidia GPU based decoding via NVDEC is supported, but requires special configuration. See the ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"/configuration/nvdec"}),"nvidia NVDEC documentation")," for more details."))}p.isMDXComponent=!0},92:function(e,t,r){"use strict";r.d(t,"a",(function(){return u})),r.d(t,"b",(function(){return d}));var a=r(0),n=r.n(a);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 a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function c(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var s=n.a.createContext({}),p=function(e){var t=n.a.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):c(c({},t),e)),r},u=function(e){var t=p(e.components);return n.a.createElement(s.Provider,{value:t},e.children)},b={inlineCode:"code",wrapper:function(e){var t=e.children;return n.a.createElement(n.a.Fragment,{},t)}},m=n.a.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,i=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),u=p(r),m=a,d=u["".concat(i,".").concat(m)]||u[m]||b[m]||o;return r?n.a.createElement(d,c(c({ref:t},s),{},{components:r})):n.a.createElement(d,c({ref:t},s))}));function d(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,i=new Array(o);i[0]=m;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;s996?r.desktop:r.mobile}var a=Object(n.useState)(t),c=a[0],o=a[1];return Object(n.useEffect)((function(){if(e)return window.addEventListener("resize",a),function(){return window.removeEventListener("resize",a)};function a(){o(t())}}),[]),c}},111:function(e,t,a){"use strict";var n=a(3),r=a(7),c=a(0),o=a.n(c);t.a=function(e){var t=e.width,a=void 0===t?30:t,c=e.height,l=void 0===c?30:c,i=e.className,s=Object(r.a)(e,["width","height","className"]);return o.a.createElement("svg",Object(n.a)({"aria-label":"Menu",className:i,width:a,height:l,viewBox:"0 0 30 30",role:"img",focusable:"false"},s),o.a.createElement("title",null,"Menu"),o.a.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"2",d:"M4 7h22M4 15h22M4 23h22"}))}},112:function(e,t,a){"use strict";var n=a(0),r=a.n(n),c=a(94),o=a(55),l=a.n(o);var i=function(){return r.a.createElement("nav",{"aria-label":"Skip navigation links"},r.a.createElement("button",{type:"button",tabIndex:0,className:l.a.skipToContent,onKeyDown:function(e){if(13===e.keyCode){document.activeElement.blur();var t=document.querySelector("main:first-of-type");t&&t.scrollIntoView()}}},"Skip to main content"))},s=a(93),u=a(105),d=a(56),m=a.n(d);var f=function(){var e,t=Object(u.a)(),a=t.isAnnouncementBarClosed,n=t.closeAnnouncementBar,o=Object(s.useThemeConfig)().announcementBar;if(!o)return null;var l=o.content,i=o.backgroundColor,d=o.textColor,f=o.isCloseable;return!l||f&&a?null:r.a.createElement("div",{className:m.a.announcementBar,style:{backgroundColor:i,color:d},role:"banner"},r.a.createElement("div",{className:Object(c.a)(m.a.announcementBarContent,(e={},e[m.a.announcementBarCloseable]=f,e)),dangerouslySetInnerHTML:{__html:l}}),f?r.a.createElement("button",{type:"button",className:m.a.announcementBarClose,onClick:n,"aria-label":"Close"},r.a.createElement("span",{"aria-hidden":"true"},"\xd7")):null)},h=a(3),v=function(){return null},b=a(124),p=a.n(b),g=a(22),E=a(57),k=a.n(E),O=function(e){var t=e.icon,a=e.style;return r.a.createElement("span",{className:Object(c.a)(k.a.toggle,k.a.dark),style:a},t)},j=function(e){var t=e.icon,a=e.style;return r.a.createElement("span",{className:Object(c.a)(k.a.toggle,k.a.light),style:a},t)},y=function(e){var t=Object(s.useThemeConfig)().colorMode.switchConfig,a=t.darkIcon,n=t.darkIconStyle,c=t.lightIcon,o=t.lightIconStyle,l=Object(g.default)().isClient;return r.a.createElement(p.a,Object(h.a)({disabled:!l,icons:{checked:r.a.createElement(O,{icon:a,style:n}),unchecked:r.a.createElement(j,{icon:c,style:o})}},e))},_=a(101),w=a(97),C=a(108),N=function(e){var t=Object(w.useLocation)(),a=Object(n.useState)(!e),r=a[0],c=a[1],o=Object(n.useRef)(!1),l=Object(n.useState)(0),i=l[0],s=l[1],u=Object(n.useState)(0),d=u[0],m=u[1],f=Object(n.useCallback)((function(e){null!==e&&m(e.getBoundingClientRect().height)}),[]);return Object(C.a)((function(t){var a=t.scrollY;if(e&&!(a=i?c(!1):a+r0&&r.a.createElement("div",{className:"row footer__links"},o.map((function(e,t){return r.a.createElement("div",{key:t,className:"col footer__col"},null!=e.title?r.a.createElement("h4",{className:"footer__title"},e.title):null,null!=e.items&&Array.isArray(e.items)&&e.items.length>0?r.a.createElement("ul",{className:"footer__items"},e.items.map((function(e,t){return e.html?r.a.createElement("li",{key:t,className:"footer__item",dangerouslySetInnerHTML:{__html:e.html}}):r.a.createElement("li",{key:e.href||e.to,className:"footer__item"},r.a.createElement(W,e))}))):null)}))),(i||a)&&r.a.createElement("div",{className:"footer__bottom text--center"},i&&i.src&&r.a.createElement("div",{className:"margin-bottom--sm"},i.href?r.a.createElement("a",{href:i.href,target:"_blank",rel:"noopener noreferrer",className:G.a.footerLogoLink},r.a.createElement(Y,{alt:i.alt,url:u})):r.a.createElement(Y,{alt:i.alt,url:u})),a?r.a.createElement("div",{className:"footer__copyright",dangerouslySetInnerHTML:{__html:a}}):null))):null},z=a(10),J="light",q="dark",Q=function(e){return e===q?q:J},Z=function(){return z.a.canUseDOM?Q(document.documentElement.getAttribute("data-theme")):J},$=function(e){try{localStorage.setItem("theme",Q(e))}catch(t){console.error(t)}},ee=function(){var e=Object(s.useThemeConfig)().colorMode,t=e.disableSwitch,a=e.respectPrefersColorScheme,r=Object(n.useState)(Z),c=r[0],o=r[1],l=Object(n.useCallback)((function(){o(J),$(J)}),[]),i=Object(n.useCallback)((function(){o(q),$(q)}),[]);return Object(n.useEffect)((function(){document.documentElement.setAttribute("data-theme",Q(c))}),[c]),Object(n.useEffect)((function(){if(!t)try{var e=localStorage.getItem("theme");null!==e&&o(Q(e))}catch(a){console.error(a)}}),[o]),Object(n.useEffect)((function(){t&&!a||window.matchMedia("(prefers-color-scheme: dark)").addListener((function(e){var t=e.matches;o(t?q:J)}))}),[]),{isDarkTheme:c===q,setLightTheme:l,setDarkTheme:i}},te=a(107);var ae=function(e){var t=ee(),a=t.isDarkTheme,n=t.setLightTheme,c=t.setDarkTheme;return r.a.createElement(te.a.Provider,{value:{isDarkTheme:a,setLightTheme:n,setDarkTheme:c}},e.children)},ne="docusaurus.tab.",re=function(){var e=Object(n.useState)({}),t=e[0],a=e[1],r=Object(n.useCallback)((function(e,t){try{localStorage.setItem("docusaurus.tab."+e,t)}catch(a){console.error(a)}}),[]);return Object(n.useEffect)((function(){try{for(var e={},t=0;tthis.startX&&(this.setState({checked:!0}),this.startX=t,this.activated=ta?this.previouslyChecked!==this.state.checked&&(this.setState({checked:!1}),this.previouslyChecked=this.state.checked,t.click()):this.startX-4=0||Object.prototype.hasOwnProperty.call(e,n)&&(a[n]=e[n]);return a}(t,["className","icons"])),c=(0,l.default)("react-toggle",{"react-toggle--checked":this.state.checked,"react-toggle--focus":this.state.hasFocus,"react-toggle--disabled":this.props.disabled},a);return o.default.createElement("div",{className:c,onClick:this.handleClick,onTouchStart:this.handleTouchStart,onTouchMove:this.handleTouchMove,onTouchEnd:this.handleTouchEnd},o.default.createElement("div",{className:"react-toggle-track"},o.default.createElement("div",{className:"react-toggle-track-check"},this.getIcon("checked")),o.default.createElement("div",{className:"react-toggle-track-x"},this.getIcon("unchecked"))),o.default.createElement("div",{className:"react-toggle-thumb"}),o.default.createElement("input",n({},r,{ref:function(t){e.input=t},onFocus:this.handleFocus,onBlur:this.handleBlur,className:"react-toggle-screenreader-only",type:"checkbox"})))}}]),t}(c.PureComponent);t.default=f,f.displayName="Toggle",f.defaultProps={icons:{checked:o.default.createElement(s.default,null),unchecked:o.default.createElement(u.default,null)}},f.propTypes={checked:i.default.bool,disabled:i.default.bool,defaultChecked:i.default.bool,onChange:i.default.func,onFocus:i.default.func,onBlur:i.default.func,className:i.default.string,name:i.default.string,value:i.default.string,id:i.default.string,"aria-labelledby":i.default.string,"aria-label":i.default.string,icons:i.default.oneOfType([i.default.bool,i.default.shape({checked:i.default.node,unchecked:i.default.node})])}},125:function(e,t,a){var n;!function(){"use strict";var a={}.hasOwnProperty;function r(){for(var e=[],t=0;t0){var a=t[0];return{x:a.clientX,y:a.clientY}}var n=e.pageX;if(void 0!==n)return{x:n,y:e.pageY}}return{x:0,y:0}}},129:function(e,t,a){"use strict";a.r(t),a.d(t,"default",(function(){return u}));var n=a(3),r=a(7),c=a(0),o=a.n(c),l=a(99),i=a(95),s=a(93);function u(e){var t,a=e.label,c=e.to,u=e.docsPluginId,d=Object(r.a)(e,["label","to","docsPluginId"]),m=Object(i.useActiveVersion)(u),f=Object(s.useDocsPreferredVersion)(u).preferredVersion,h=Object(i.useLatestVersion)(u),v=null!==(t=null!=m?m:f)&&void 0!==t?t:h,b=null!=a?a:v.label,p=null!=c?c:function(e){return e.docs.find((function(t){return t.id===e.mainDocId}))}(v).path;return o.a.createElement(l.a,Object(n.a)({},d,{label:b,to:p}))}},130:function(e,t,a){"use strict";a.r(t),a.d(t,"default",(function(){return d}));var n=a(3),r=a(7),c=a(0),o=a.n(c),l=a(99),i=a(95),s=a(93),u=function(e){return e.docs.find((function(t){return t.id===e.mainDocId}))};function d(e){var t,a,c=e.mobile,d=e.docsPluginId,m=e.dropdownActiveClassDisabled,f=e.dropdownItemsBefore,h=e.dropdownItemsAfter,v=Object(r.a)(e,["mobile","docsPluginId","dropdownActiveClassDisabled","dropdownItemsBefore","dropdownItemsAfter"]),b=Object(i.useActiveDocContext)(d),p=Object(i.useVersions)(d),g=Object(i.useLatestVersion)(d),E=Object(s.useDocsPreferredVersion)(d),k=E.preferredVersion,O=E.savePreferredVersionName;var j=null!==(t=null!==(a=b.activeVersion)&&void 0!==a?a:k)&&void 0!==t?t:g,y=c?"Versions":j.label,_=c?void 0:u(j).path;return o.a.createElement(l.a,Object(n.a)({},v,{mobile:c,label:y,to:_,items:function(){var e=p.map((function(e){var t=(null==b?void 0:b.alternateDocVersions[e.name])||u(e);return{isNavLink:!0,label:e.label,to:t.path,isActive:function(){return e===(null==b?void 0:b.activeVersion)},onClick:function(){O(e.name)}}})),t=[].concat(f,e,h);if(!(t.length<=1))return t}(),isActive:m?function(){return!1}:void 0}))}},131:function(e,t,a){"use strict";a.r(t),a.d(t,"default",(function(){return d}));var n=a(3),r=a(7),c=a(0),o=a.n(c),l=a(99),i=a(95),s=a(94),u=a(93);function d(e){var t,a,c=e.docId,d=e.activeSidebarClassName,m=e.label,f=e.docsPluginId,h=Object(r.a)(e,["docId","activeSidebarClassName","label","docsPluginId"]),v=Object(i.useActiveDocContext)(f),b=v.activeVersion,p=v.activeDoc,g=Object(u.useDocsPreferredVersion)(f).preferredVersion,E=Object(i.useLatestVersion)(f),k=null!==(t=null!=b?b:g)&&void 0!==t?t:E,O=k.docs.find((function(e){return e.id===c}));if(!O)throw new Error("DocNavbarItem: couldn't find any doc with id="+c+" in version "+k.name+".\nAvailable docIds=\n- "+k.docs.join("\n- "));return o.a.createElement(l.a,Object(n.a)({exact:!0},h,{className:Object(s.a)(h.className,(a={},a[d]=p&&p.sidebar===O.sidebar,a)),label:null!=m?m:O.id,to:O.path}))}},99:function(e,t,a){"use strict";var n=a(3),r=a(7),c=a(0),o=a.n(c),l=a(94),i=a(96),s=a(98),u=a(97),d=a(93);function m(e){var t=e.activeBasePath,a=e.activeBaseRegex,c=e.to,l=e.href,u=e.label,d=e.activeClassName,m=void 0===d?"navbar__link--active":d,f=e.prependBaseUrlToHref,h=Object(r.a)(e,["activeBasePath","activeBaseRegex","to","href","label","activeClassName","prependBaseUrlToHref"]),v=Object(s.a)(c),b=Object(s.a)(t),p=Object(s.a)(l,{forcePrependBaseUrl:!0});return o.a.createElement(i.a,Object(n.a)({},l?{target:"_blank",rel:"noopener noreferrer",href:f?p:l}:Object.assign({isNavLink:!0,activeClassName:m,to:v},t||a?{isActive:function(e,t){return a?new RegExp(a).test(t.pathname):t.pathname.startsWith(b)}}:null),h),u)}function f(e){var t=e.items,a=e.position,i=e.className,s=Object(r.a)(e,["items","position","className"]),u=Object(c.useRef)(null),d=Object(c.useRef)(null),f=Object(c.useState)(!1),h=f[0],v=f[1];Object(c.useEffect)((function(){var e=function(e){u.current&&!u.current.contains(e.target)&&v(!1)};return document.addEventListener("mousedown",e),document.addEventListener("touchstart",e),function(){document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e)}}),[u]);var b=function(e,t){return void 0===t&&(t=!1),Object(l.a)({"navbar__item navbar__link":!t,dropdown__link:t},e)};return t?o.a.createElement("div",{ref:u,className:Object(l.a)("navbar__item","dropdown","dropdown--hoverable",{"dropdown--left":"left"===a,"dropdown--right":"right"===a,"dropdown--show":h})},o.a.createElement(m,Object(n.a)({className:b(i)},s,{onClick:s.to?void 0:function(e){return e.preventDefault()},onKeyDown:function(e){"Enter"===e.key&&(e.preventDefault(),v(!h))}}),s.label),o.a.createElement("ul",{ref:d,className:"dropdown__menu"},t.map((function(e,a){var c=e.className,l=Object(r.a)(e,["className"]);return o.a.createElement("li",{key:a},o.a.createElement(m,Object(n.a)({onKeyDown:function(e){if(a===t.length-1&&"Tab"===e.key){e.preventDefault(),v(!1);var n=u.current.nextElementSibling;n&&n.focus()}},activeClassName:"dropdown__link--active",className:b(c,!0)},l)))})))):o.a.createElement(m,Object(n.a)({className:b(i)},s))}function h(e){var t,a,i=e.items,s=e.className,f=(e.position,Object(r.a)(e,["items","className","position"])),h=Object(c.useRef)(null),v=Object(u.useLocation)().pathname,b=Object(c.useState)((function(){var e;return null===(e=!(null!=i&&i.some((function(e){return Object(d.isSamePath)(e.to,v)}))))||void 0===e||e})),p=b[0],g=b[1],E=function(e,t){return void 0===t&&(t=!1),Object(l.a)("menu__link",{"menu__link--sublist":t},e)};if(!i)return o.a.createElement("li",{className:"menu__list-item"},o.a.createElement(m,Object(n.a)({className:E(s)},f)));var k=null!==(t=h.current)&&void 0!==t&&t.scrollHeight?(null===(a=h.current)||void 0===a?void 0:a.scrollHeight)+"px":void 0;return o.a.createElement("li",{className:Object(l.a)("menu__list-item",{"menu__list-item--collapsed":p})},o.a.createElement(m,Object(n.a)({role:"button",className:E(s,!0)},f,{onClick:function(){g((function(e){return!e}))}}),f.label),o.a.createElement("ul",{className:"menu__list",ref:h,style:{height:p?void 0:k}},i.map((function(e,t){var a=e.className,c=Object(r.a)(e,["className"]);return o.a.createElement("li",{className:"menu__list-item",key:t},o.a.createElement(m,Object(n.a)({activeClassName:"menu__link--active",className:E(a)},c,{onClick:f.onClick})))}))))}t.a=function(e){var t=e.mobile,a=void 0!==t&&t,n=Object(r.a)(e,["mobile"]),c=a?h:f;return o.a.createElement(c,n)}}}]); \ No newline at end of file diff --git a/2.0c8f52fa.js.LICENSE.txt b/2.0c8f52fa.js.LICENSE.txt new file mode 100644 index 000000000..bae6dd8e2 --- /dev/null +++ b/2.0c8f52fa.js.LICENSE.txt @@ -0,0 +1,5 @@ +/*! + Copyright (c) 2017 Jed Watson. + Licensed under the MIT License (MIT), see + http://jedwatson.github.io/classnames +*/ diff --git a/24.22ef4830.js b/24.22ef4830.js new file mode 100644 index 000000000..b7cd8f59c --- /dev/null +++ b/24.22ef4830.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[24],{132:function(e,t,n){"use strict";const a=(e,{target:t=document.body}={})=>{const n=document.createElement("textarea"),a=document.activeElement;n.value=e,n.setAttribute("readonly",""),n.style.contain="strict",n.style.position="absolute",n.style.left="-9999px",n.style.fontSize="12pt";const r=document.getSelection();let o=!1;r.rangeCount>0&&(o=r.getRangeAt(0)),t.append(n),n.select(),n.selectionStart=0,n.selectionEnd=e.length;let c=!1;try{c=document.execCommand("copy")}catch(l){}return n.remove(),o&&(r.removeAllRanges(),r.addRange(o)),a&&a.focus(),c};e.exports=a,e.exports.default=a},133:function(e,t){function n(e){let t,n=[];for(let a of e.split(",").map((e=>e.trim())))if(/^-?\d+$/.test(a))n.push(parseInt(a,10));else if(t=a.match(/^(-?\d+)(-|\.\.\.?|\u2025|\u2026|\u22EF)(-?\d+)$/)){let[e,a,r,o]=t;if(a&&o){a=parseInt(a),o=parseInt(o);const e=a0&&e[n-1]===t?e:e.concat(t)},M=function(e,t){var n=e.plain,a=Object.create(null),r=e.styles.reduce((function(e,n){var a=n.languages,r=n.style;return a&&!a.includes(t)||n.types.forEach((function(t){var n=I({},e[t],r);e[t]=n})),e}),a);return r.root=n,r.plain=I({},n,{backgroundColor:null}),r};function A(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&-1===t.indexOf(a)&&(n[a]=e[a]);return n}var R=function(e){function t(){for(var t=this,n=[],a=arguments.length;a--;)n[a]=arguments[a];e.apply(this,n),_(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?M(e.theme,e.language):void 0;return t.themeDict=n})),_(this,"getLineProps",(function(e){var n=e.key,a=e.className,r=e.style,o=I({},A(e,["key","className","style","line"]),{className:"token-line",style:void 0,key:void 0}),c=t.getThemeDict(t.props);return void 0!==c&&(o.style=c.plain),void 0!==r&&(o.style=void 0!==o.style?I({},o.style,r):r),void 0!==n&&(o.key=n),a&&(o.className+=" "+a),o})),_(this,"getStyleForToken",(function(e){var n=e.types,a=e.empty,r=n.length,o=t.getThemeDict(t.props);if(void 0!==o){if(1===r&&"plain"===n[0])return a?{display:"inline-block"}:void 0;if(1===r&&!a)return o[n[0]];var c=a?{display:"inline-block"}:{},l=n.map((function(e){return o[e]}));return Object.assign.apply(Object,[c].concat(l))}})),_(this,"getTokenProps",(function(e){var n=e.key,a=e.className,r=e.style,o=e.token,c=I({},A(e,["key","className","style","token"]),{className:"token "+o.types.join(" "),children:o.content,style:t.getStyleForToken(o),key:void 0});return void 0!==r&&(c.style=void 0!==c.style?I({},c.style,r):r),void 0!==n&&(c.key=n),a&&(c.className+=" "+a),c}))}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,a=e.code,r=e.children,o=this.getThemeDict(this.props),c=t.languages[n];return r({tokens:function(e){for(var t=[[]],n=[e],a=[0],r=[e.length],o=0,c=0,l=[],i=[l];c>-1;){for(;(o=a[c]++)0?u:["plain"],s=p):(u=B(u,p.type),p.alias&&(u=B(u,p.alias)),s=p.content),"string"==typeof s){var m=s.split(D),d=m.length;l.push({types:u,content:m[0]});for(var b=1;b0}))}o&&G.test(o)&&(g=o.match(G)[1]);var k=n&&n.replace(/language-/,"");!k&&c.defaultLanguage&&(k=c.defaultLanguage);var E=j.replace(/\n$/,"");if(0===h.length&&void 0!==k){for(var C,N="",x=function(e){switch(e){case"js":case"javascript":case"ts":case"typescript":return q(["js","jsBlock"]);case"jsx":case"tsx":return q(["js","jsBlock","jsx"]);case"html":return q(["js","jsBlock","html"]);case"python":case"py":return q(["python"]);default:return q()}}(k),P=j.replace(/\n$/,"").split("\n"),T=0;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 s=r.a.createContext({}),u=function(e){var t=r.a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},p=function(e){var t=u(e.components);return r.a.createElement(s.Provider,{value:t},e.children)},m={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,o=e.originalType,c=e.parentName,s=i(e,["components","mdxType","originalType","parentName"]),p=u(n),d=a,b=p["".concat(c,".").concat(d)]||p[d]||m[d]||o;return n?r.a.createElement(b,l(l({ref:t},s),{},{components:n})):r.a.createElement(b,l({ref:t},s))}));function b(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,c=new Array(o);c[0]=d;var l={};for(var i in t)hasOwnProperty.call(t,i)&&(l[i]=t[i]);l.originalType=e,l.mdxType="string"==typeof e?e:a,c[1]=l;for(var s=2;s=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 l=a.a.createContext({}),s=function(e){var t=a.a.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):c(c({},t),e)),r},p=function(e){var t=s(e.components);return a.a.createElement(l.Provider,{value:t},e.children)},b={inlineCode:"code",wrapper:function(e){var t=e.children;return a.a.createElement(a.a.Fragment,{},t)}},f=a.a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,o=e.originalType,i=e.parentName,l=u(e,["components","mdxType","originalType","parentName"]),p=s(r),f=n,m=p["".concat(i,".").concat(f)]||p[f]||b[f]||o;return r?a.a.createElement(m,c(c({ref:t},l),{},{components:r})):a.a.createElement(m,c({ref:t},l))}));function m(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var o=r.length,i=new Array(o);i[0]=f;var c={};for(var u in t)hasOwnProperty.call(t,u)&&(c[u]=t[u]);c.originalType=e,c.mdxType="string"==typeof e?e:n,i[1]=c;for(var l=2;l Add-on Store > Repositories"),Object(o.b)("li",{parentName:"ol"},"Add ",Object(o.b)("a",Object(a.a)({parentName:"li"},{href:"https://github.com/blakeblackshear/frigate-hass-addons"}),"https://github.com/blakeblackshear/frigate-hass-addons")),Object(o.b)("li",{parentName:"ol"},"Setup your configuration in the ",Object(o.b)("inlineCode",{parentName:"li"},"Configuration")," tab"),Object(o.b)("li",{parentName:"ol"},"Start the addon container")),Object(o.b)("h2",{id:"docker"},"Docker"),Object(o.b)("p",null,"Make sure you choose the right image for your architecture:\n|Arch|Image Name|\n|-|-|\n|amd64|blakeblackshear/frigate:stable-amd64|\n|amd64nvidia|blakeblackshear/frigate:stable-amd64nvidia|\n|armv7|blakeblackshear/frigate:stable-armv7|\n|aarch64|blakeblackshear/frigate:stable-aarch64|"),Object(o.b)("p",null,"It is recommended to run with docker-compose:"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"version: '3.6'\nservices:\n frigate:\n container_name: frigate\n restart: unless-stopped\n privileged: true\n image: blakeblackshear/frigate:0.8.0-beta2-amd64\n volumes:\n - /dev/bus/usb:/dev/bus/usb\n - /etc/localtime:/etc/localtime:ro\n - :/config\n - :/media/frigate/clips\n - :/media/frigate/recordings\n - type: tmpfs # Optional: 1GB of memory, reduces SSD/SD Card wear\n target: /tmp/cache\n tmpfs:\n size: 1000000000\n ports:\n - '5000:5000'\n - '1935:1935' # RTMP feeds\n environment:\n FRIGATE_RTSP_PASSWORD: 'password'\n")),Object(o.b)("p",null,"If you can't use docker compose, you can run the container with something similar to this:"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-bash"}),"docker run --rm \\\n--name frigate \\\n--privileged \\\n--mount type=tmpfs,target=/tmp/cache,tmpfs-size=1000000000 \\\n-v /dev/bus/usb:/dev/bus/usb \\\n-v :/media/frigate/clips \\\n-v :/media/frigate/recordings \\\n-v :/config:ro \\\n-v /etc/localtime:/etc/localtime:ro \\\n-e FRIGATE_RTSP_PASSWORD='password' \\\n-p 5000:5000 \\\n-p 1935:1935 \\\nblakeblackshear/frigate:0.8.0-beta2-amd64\n")),Object(o.b)("h2",{id:"kubernetes"},"Kubernetes"),Object(o.b)("p",null,"Use the ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"https://github.com/k8s-at-home/charts/tree/master/charts/frigate"}),"helm chart"),"."),Object(o.b)("h2",{id:"virtualization"},"Virtualization"),Object(o.b)("p",null,"For ideal performance, Frigate needs access to underlying hardware for the Coral and GPU devices for ffmpeg decoding. Running Frigate in a VM on top of Proxmox, ESXi, Virtualbox, etc. is not recommended. The virtualization layer typically introduces a sizable amount of overhead for communication with Coral devices."),Object(o.b)("h2",{id:"proxmox"},"Proxmox"),Object(o.b)("p",null,"Some people have had success running Frigate in LXC directly with the following config:"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{}),"arch: amd64\ncores: 2\nfeatures: nesting=1\nhostname: FrigateLXC\nmemory: 4096\nnet0: name=eth0,bridge=vmbr0,firewall=1,hwaddr=2E:76:AE:5A:58:48,ip=dhcp,ip6=auto,type=veth\nostype: debian\nrootfs: local-lvm:vm-115-disk-0,size=12G\nswap: 512\nlxc.cgroup.devices.allow: c 189:385 rwm\nlxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file\nlxc.mount.entry: /dev/bus/usb/004/002 dev/bus/usb/004/002 none bind,optional,create=file\nlxc.apparmor.profile: unconfined\nlxc.cgroup.devices.allow: a\nlxc.cap.drop:\n")),Object(o.b)("h3",{id:"calculating-shm-size"},"Calculating shm-size"),Object(o.b)("p",null,'The default shm-size of 64m is fine for setups with 3 or less 1080p cameras. If frigate is exiting with "Bus error" messages, it could be because you have too many high resolution cameras and you need to specify a higher shm size.'),Object(o.b)("p",null,"You can calculate the necessary shm-size for each camera with the following formula:"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{}),"(width * height * 1.5 * 7 + 270480)/1048576 = \n")))}d.isMDXComponent=!0},92: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 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({}),d=function(e){var t=r.a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):c(c({},t),e)),n},u=function(e){var t=d(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"]),u=d(n),p=a,m=u["".concat(i,".").concat(p)]||u[p]||b[p]||o;return n?r.a.createElement(m,c(c({ref:t},l),{},{components:n})):r.a.createElement(m,c({ref:t},l))}));function m(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-.jpg"),"."),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"# Optional: Configuration for the jpg snapshots written to the clips directory for each event\nsnapshots:\n # Optional: Enable writing jpg snapshot to /media/frigate/clips (default: shown below)\n # This value can be set via MQTT and will be updated in startup based on retained value\n enabled: False\n # Optional: print a timestamp on the snapshots (default: shown below)\n timestamp: False\n # Optional: draw bounding box on the snapshots (default: shown below)\n bounding_box: False\n # Optional: crop the snapshot (default: shown below)\n crop: False\n # Optional: height to resize the snapshot to (default: original size)\n height: 175\n # Optional: Camera override for retention settings (default: global values)\n retain:\n # Required: Default retention days (default: shown below)\n default: 10\n # Optional: Per object retention days\n objects:\n person: 15\n")),Object(i.b)("h2",{id:"247-recordings"},"24/7 Recordings"),Object(i.b)("p",null,"24/7 recordings can be enabled and are stored at ",Object(i.b)("inlineCode",{parentName:"p"},"/media/frigate/recordings"),". The folder structure for the recordings is ",Object(i.b)("inlineCode",{parentName:"p"},"YYYY-MM/DD/HH//MM.SS.mp4"),". These recordings are written directly from your camera stream without re-encoding and are available in HomeAssistant's media browser. Each camera supports a configurable retention policy in the config."),Object(i.b)("div",{className:"admonition admonition-caution alert alert--warning"},Object(i.b)("div",Object(a.a)({parentName:"div"},{className:"admonition-heading"}),Object(i.b)("h5",{parentName:"div"},Object(i.b)("span",Object(a.a)({parentName:"h5"},{className:"admonition-icon"}),Object(i.b)("svg",Object(a.a)({parentName:"span"},{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16"}),Object(i.b)("path",Object(a.a)({parentName:"svg"},{fillRule:"evenodd",d:"M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"})))),"caution")),Object(i.b)("div",Object(a.a)({parentName:"div"},{className:"admonition-content"}),Object(i.b)("p",{parentName:"div"},"Previous versions of frigate included ",Object(i.b)("inlineCode",{parentName:"p"},"-vsync drop")," in input parameters. This is not compatible with FFmpeg's segment feature and must be removed from your input parameters if you have overrides set."))),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"# Optional: 24/7 recording configuration\nrecord:\n # Optional: Enable recording (default: global setting)\n enabled: False\n # Optional: Number of days to retain (default: global setting)\n retain_days: 30\n")),Object(i.b)("h2",{id:"rtmp-streams"},"RTMP streams"),Object(i.b)("p",null,"Frigate can re-stream your video feed as a RTMP feed for other applications such as HomeAssistant to utilize it at ",Object(i.b)("inlineCode",{parentName:"p"},"rtmp:///live/"),". Port 1935 must be open. This allows you to use a video feed for detection in frigate and HomeAssistant live view at the same time without having to make two separate connections to the camera. The video feed is copied from the original video feed directly to avoid re-encoding. This feed does not include any annotation by Frigate."),Object(i.b)("p",null,"Some video feeds are not compatible with RTMP. If you are experiencing issues, check to make sure your camera feed is h264 with AAC audio. If your camera doesn't support a compatible format for RTMP, you can use the ffmpeg args to re-encode it on the fly at the expense of increased CPU utilization."),Object(i.b)("h2",{id:"full-example"},"Full example"),Object(i.b)("p",null,"The following is a full example of all of the options together for a camera configuration"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"cameras:\n # Required: name of the camera\n back:\n # Required: ffmpeg settings for the camera\n ffmpeg:\n # Required: A list of input streams for the camera. See documentation for more information.\n inputs:\n # Required: the path to the stream\n # NOTE: Environment variables that begin with 'FRIGATE_' may be referenced in {}\n - path: rtsp://viewer:{FRIGATE_RTSP_PASSWORD}@10.0.10.10:554/cam/realmonitor?channel=1&subtype=2\n # Required: list of roles for this stream. valid values are: detect,record,clips,rtmp\n # NOTICE: In addition to assigning the record, clips, and rtmp roles,\n # they must also be enabled in the camera config.\n roles:\n - detect\n - rtmp\n # Optional: stream specific global args (default: inherit)\n global_args:\n # Optional: stream specific hwaccel args (default: inherit)\n hwaccel_args:\n # Optional: stream specific input args (default: inherit)\n input_args:\n\n # Optional: camera specific global args (default: inherit)\n global_args:\n # Optional: camera specific hwaccel args (default: inherit)\n hwaccel_args:\n # Optional: camera specific input args (default: inherit)\n input_args:\n # Optional: camera specific output args (default: inherit)\n output_args:\n\n # Required: width of the frame for the input with the detect role\n width: 1280\n # Required: height of the frame for the input with the detect role\n height: 720\n # Optional: desired fps for your camera for the input with the detect role\n # NOTE: Recommended value of 5. Ideally, try and reduce your FPS on the camera.\n # Frigate will attempt to autodetect if not specified.\n fps: 5\n\n # Optional: camera level motion config\n motion:\n # Optional: motion mask\n # NOTE: see docs for more detailed info on creating masks\n mask: 0,900,1080,900,1080,1920,0,1920\n\n # Optional: timeout for highest scoring image before allowing it\n # to be replaced by a newer image. (default: shown below)\n best_image_timeout: 60\n\n # Optional: zones for this camera\n zones:\n # Required: name of the zone\n # NOTE: This must be different than any camera names, but can match with another zone on another\n # camera.\n front_steps:\n # Required: List of x,y coordinates to define the polygon of the zone.\n # NOTE: Coordinates can be generated at https://www.image-map.net/\n coordinates: 545,1077,747,939,788,805\n # Optional: Zone level object filters.\n # NOTE: The global and camera filters are applied upstream.\n filters:\n person:\n min_area: 5000\n max_area: 100000\n threshold: 0.7\n\n # Optional: Camera level detect settings\n detect:\n # Optional: enables detection for the camera (default: True)\n # This value can be set via MQTT and will be updated in startup based on retained value\n enabled: True\n # Optional: Number of frames without a detection before frigate considers an object to be gone. (default: double the frame rate)\n max_disappeared: 10\n\n # Optional: save clips configuration\n clips:\n # Required: enables clips for the camera (default: shown below)\n # This value can be set via MQTT and will be updated in startup based on retained value\n enabled: False\n # Optional: Number of seconds before the event to include in the clips (default: shown below)\n pre_capture: 5\n # Optional: Number of seconds after the event to include in the clips (default: shown below)\n post_capture: 5\n # Optional: Objects to save clips for. (default: all tracked objects)\n objects:\n - person\n # Optional: Camera override for retention settings (default: global values)\n retain:\n # Required: Default retention days (default: shown below)\n default: 10\n # Optional: Per object retention days\n objects:\n person: 15\n\n # Optional: 24/7 recording configuration\n record:\n # Optional: Enable recording (default: global setting)\n enabled: False\n # Optional: Number of days to retain (default: global setting)\n retain_days: 30\n\n # Optional: RTMP re-stream configuration\n rtmp:\n # Required: Enable the live stream (default: True)\n enabled: True\n\n # Optional: Configuration for the jpg snapshots written to the clips directory for each event\n snapshots:\n # Optional: Enable writing jpg snapshot to /media/frigate/clips (default: shown below)\n # This value can be set via MQTT and will be updated in startup based on retained value\n enabled: False\n # Optional: print a timestamp on the snapshots (default: shown below)\n timestamp: False\n # Optional: draw bounding box on the snapshots (default: shown below)\n bounding_box: False\n # Optional: crop the snapshot (default: shown below)\n crop: False\n # Optional: height to resize the snapshot to (default: original size)\n height: 175\n # Optional: Camera override for retention settings (default: global values)\n retain:\n # Required: Default retention days (default: shown below)\n default: 10\n # Optional: Per object retention days\n objects:\n person: 15\n\n # Optional: Configuration for the jpg snapshots published via MQTT\n mqtt:\n # Optional: Enable publishing snapshot via mqtt for camera (default: shown below)\n # NOTE: Only applies to publishing image data to MQTT via 'frigate///snapshot'.\n # All other messages will still be published.\n enabled: True\n # Optional: print a timestamp on the snapshots (default: shown below)\n timestamp: True\n # Optional: draw bounding box on the snapshots (default: shown below)\n bounding_box: True\n # Optional: crop the snapshot (default: shown below)\n crop: True\n # Optional: height to resize the snapshot to (default: shown below)\n height: 270\n\n # Optional: Camera level object filters config.\n objects:\n track:\n - person\n - car\n filters:\n person:\n min_area: 5000\n max_area: 100000\n min_score: 0.5\n threshold: 0.7\n # Optional: mask to prevent this object type from being detected in certain areas (default: no mask)\n # Checks based on the bottom center of the bounding box of the object\n mask: 0,0,1000,0,1000,200,0,200\n")),Object(i.b)("h2",{id:"camera-specific-configuration"},"Camera specific configuration"),Object(i.b)("h3",{id:"rtmp-cameras"},"RTMP Cameras"),Object(i.b)("p",null,"The input parameters need to be adjusted for RTMP cameras"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"ffmpeg:\n input_args:\n - -avoid_negative_ts\n - make_zero\n - -fflags\n - nobuffer\n - -flags\n - low_delay\n - -strict\n - experimental\n - -fflags\n - +genpts+discardcorrupt\n - -use_wallclock_as_timestamps\n - '1'\n")),Object(i.b)("h3",{id:"blue-iris-rtsp-cameras"},"Blue Iris RTSP Cameras"),Object(i.b)("p",null,"You will need to remove ",Object(i.b)("inlineCode",{parentName:"p"},"nobuffer")," flag for Blue Iris RTSP cameras"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"ffmpeg:\n input_args:\n - -avoid_negative_ts\n - make_zero\n - -flags\n - low_delay\n - -strict\n - experimental\n - -fflags\n - +genpts+discardcorrupt\n - -rtsp_transport\n - tcp\n - -stimeout\n - '5000000'\n - -use_wallclock_as_timestamps\n - '1'\n")))}p.isMDXComponent=!0},92:function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return u}));var a=n(0),o=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 r(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 s(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var c=o.a.createContext({}),p=function(e){var t=o.a.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):s(s({},t),e)),n},d=function(e){var t=p(e.components);return o.a.createElement(c.Provider,{value:t},e.children)},b={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},m=o.a.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,r=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),d=p(n),m=a,u=d["".concat(r,".").concat(m)]||d[m]||b[m]||i;return n?o.a.createElement(u,s(s({ref:t},c),{},{components:n})):o.a.createElement(u,s({ref:t},c))}));function u(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,r=new Array(i);r[0]=m;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s.mdxType="string"==typeof e?e:a,r[1]=s;for(var c=2;c + + + + + + +Page Not Found | Frigate + + + + + + + + + +
+

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/57316f1e.5720bfff.js b/57316f1e.5720bfff.js new file mode 100644 index 000000000..6ca941f63 --- /dev/null +++ b/57316f1e.5720bfff.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[9],{77:function(e,n,t){"use strict";t.r(n),t.d(n,"frontMatter",(function(){return o})),t.d(n,"metadata",(function(){return a})),t.d(n,"toc",(function(){return d})),t.d(n,"default",(function(){return u}));var r=t(3),i=t(7),c=(t(0),t(92)),o={id:"nvdec",title:"nVidia hardware decoder"},a={unversionedId:"configuration/nvdec",id:"configuration/nvdec",isDocsHomePage:!1,title:"nVidia hardware decoder",description:"Certain nvidia cards include a hardware decoder, which can greatly improve the",source:"@site/docs/configuration/nvdec.md",slug:"/configuration/nvdec",permalink:"/configuration/nvdec",editUrl:"https://github.com/blakeblackshear/frigate/edit/master/docs/docs/configuration/nvdec.md",version:"current"},d=[{value:"Docker setup",id:"docker-setup",children:[{value:"Requirements",id:"requirements",children:[]},{value:"Setting up docker-compose",id:"setting-up-docker-compose",children:[]},{value:"Setting up the configuration file",id:"setting-up-the-configuration-file",children:[]}]}],p={toc:d};function u(e){var n=e.components,t=Object(i.a)(e,["components"]);return Object(c.b)("wrapper",Object(r.a)({},p,t,{components:n,mdxType:"MDXLayout"}),Object(c.b)("p",null,"Certain nvidia cards include a hardware decoder, which can greatly improve the\nperformance of video decoding. In order to use NVDEC, a special build of\nffmpeg with NVDEC support is required. The special docker architecture 'amd64nvidia'\nincludes this support for amd64 platforms. An aarch64 for the Jetson, which\nalso includes NVDEC may be added in the future."),Object(c.b)("h2",{id:"docker-setup"},"Docker setup"),Object(c.b)("h3",{id:"requirements"},"Requirements"),Object(c.b)("p",null,Object(c.b)("a",Object(r.a)({parentName:"p"},{href:"https://www.nvidia.com/en-us/drivers/unix/"}),"nVidia closed source driver")," required to access NVDEC.\n",Object(c.b)("a",Object(r.a)({parentName:"p"},{href:"https://github.com/NVIDIA/nvidia-docker"}),"nvidia-docker")," required to pass NVDEC to docker."),Object(c.b)("h3",{id:"setting-up-docker-compose"},"Setting up docker-compose"),Object(c.b)("p",null,"In order to pass NVDEC, the docker engine must be set to ",Object(c.b)("inlineCode",{parentName:"p"},"nvidia")," and the environment variables\n",Object(c.b)("inlineCode",{parentName:"p"},"NVIDIA_VISIBLE_DEVICES=all")," and ",Object(c.b)("inlineCode",{parentName:"p"},"NVIDIA_DRIVER_CAPABILITIES=compute,utility,video")," must be set."),Object(c.b)("p",null,"In a docker compose file, these lines need to be set:"),Object(c.b)("pre",null,Object(c.b)("code",Object(r.a)({parentName:"pre"},{}),"services:\n frigate:\n ...\n image: blakeblackshear/frigate:stable-amd64nvidia\n runtime: nvidia\n environment:\n - NVIDIA_VISIBLE_DEVICES=all\n - NVIDIA_DRIVER_CAPABILITIES=compute,utility,video\n")),Object(c.b)("h3",{id:"setting-up-the-configuration-file"},"Setting up the configuration file"),Object(c.b)("p",null,"In your frigate config.yml, you'll need to set ffmpeg to use the hardware decoder.\nThe decoder you choose will depend on the input video."),Object(c.b)("p",null,"A list of supported codecs (you can use ",Object(c.b)("inlineCode",{parentName:"p"},"ffmpeg -decoders | grep cuvid")," in the container to get a list)"),Object(c.b)("pre",null,Object(c.b)("code",Object(r.a)({parentName:"pre"},{})," V..... h263_cuvid Nvidia CUVID H263 decoder (codec h263)\n V..... h264_cuvid Nvidia CUVID H264 decoder (codec h264)\n V..... hevc_cuvid Nvidia CUVID HEVC decoder (codec hevc)\n V..... mjpeg_cuvid Nvidia CUVID MJPEG decoder (codec mjpeg)\n V..... mpeg1_cuvid Nvidia CUVID MPEG1VIDEO decoder (codec mpeg1video)\n V..... mpeg2_cuvid Nvidia CUVID MPEG2VIDEO decoder (codec mpeg2video)\n V..... mpeg4_cuvid Nvidia CUVID MPEG4 decoder (codec mpeg4)\n V..... vc1_cuvid Nvidia CUVID VC1 decoder (codec vc1)\n V..... vp8_cuvid Nvidia CUVID VP8 decoder (codec vp8)\n V..... vp9_cuvid Nvidia CUVID VP9 decoder (codec vp9)\n")),Object(c.b)("p",null,"For example, for H265 video (hevc), you'll select ",Object(c.b)("inlineCode",{parentName:"p"},"hevc_cuvid"),". Add\n",Object(c.b)("inlineCode",{parentName:"p"},"-c:v hevc_covid")," to your ffmpeg input arguments:"),Object(c.b)("pre",null,Object(c.b)("code",Object(r.a)({parentName:"pre"},{}),"ffmpeg:\n input_args:\n ...\n - -c:v\n - hevc_cuvid\n")),Object(c.b)("p",null,"If everything is working correctly, you should see a significant improvement in performance.\nVerify that hardware decoding is working by running ",Object(c.b)("inlineCode",{parentName:"p"},"nvidia-smi"),", which should show the ffmpeg\nprocesses:"),Object(c.b)("pre",null,Object(c.b)("code",Object(r.a)({parentName:"pre"},{}),"+-----------------------------------------------------------------------------+\n| NVIDIA-SMI 455.38 Driver Version: 455.38 CUDA Version: 11.1 |\n|-------------------------------+----------------------+----------------------+\n| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |\n| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |\n| | | MIG M. |\n|===============================+======================+======================|\n| 0 GeForce GTX 166... Off | 00000000:03:00.0 Off | N/A |\n| 38% 41C P2 36W / 125W | 2082MiB / 5942MiB | 5% Default |\n| | | N/A |\n+-------------------------------+----------------------+----------------------+\n\n+-----------------------------------------------------------------------------+\n| Processes: |\n| GPU GI CI PID Type Process name GPU Memory |\n| ID ID Usage |\n|=============================================================================|\n| 0 N/A N/A 12737 C ffmpeg 249MiB |\n| 0 N/A N/A 12751 C ffmpeg 249MiB |\n| 0 N/A N/A 12772 C ffmpeg 249MiB |\n| 0 N/A N/A 12775 C ffmpeg 249MiB |\n| 0 N/A N/A 12800 C ffmpeg 249MiB |\n| 0 N/A N/A 12811 C ffmpeg 417MiB |\n| 0 N/A N/A 12827 C ffmpeg 417MiB |\n+-----------------------------------------------------------------------------+\n")),Object(c.b)("p",null,"To further improve performance, you can set ffmpeg to skip frames in the output,\nusing the fps filter:"),Object(c.b)("pre",null,Object(c.b)("code",Object(r.a)({parentName:"pre"},{})," output_args:\n - -filter:v\n - fps=fps=5\n")),Object(c.b)("p",null,"This setting, for example, allows Frigate to consume my 10-15fps camera streams on\nmy relatively low powered Haswell machine with relatively low cpu usage."))}u.isMDXComponent=!0},92:function(e,n,t){"use strict";t.d(n,"a",(function(){return l})),t.d(n,"b",(function(){return m}));var r=t(0),i=t.n(r);function c(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function o(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 a(e){for(var n=1;n=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}var p=i.a.createContext({}),u=function(e){var n=i.a.useContext(p),t=n;return e&&(t="function"==typeof e?e(n):a(a({},n),e)),t},l=function(e){var n=u(e.components);return i.a.createElement(p.Provider,{value:n},e.children)},s={inlineCode:"code",wrapper:function(e){var n=e.children;return i.a.createElement(i.a.Fragment,{},n)}},f=i.a.forwardRef((function(e,n){var t=e.components,r=e.mdxType,c=e.originalType,o=e.parentName,p=d(e,["components","mdxType","originalType","parentName"]),l=u(t),f=r,m=l["".concat(o,".").concat(f)]||l[f]||s[f]||c;return t?i.a.createElement(m,a(a({ref:n},p),{},{components:t})):i.a.createElement(m,a({ref:n},p))}));function m(e,n){var t=arguments,r=n&&n.mdxType;if("string"==typeof e||r){var c=t.length,o=new Array(c);o[0]=f;var a={};for(var d in n)hasOwnProperty.call(n,d)&&(a[d]=n[d]);a.originalType=e,a.mdxType="string"==typeof e?e:r,o[1]=a;for(var p=2;p/api/<camera_name>",id:"apicamera_name",children:[]},{value:"/api/<camera_name>/<object_name>/best.jpg[?h=300&crop=1]",id:"apicamera_nameobject_namebestjpgh300crop1",children:[]},{value:"/api/<camera_name>/latest.jpg[?h=300]",id:"apicamera_namelatestjpgh300",children:[]},{value:"/api/stats",id:"apistats",children:[]},{value:"/api/config",id:"apiconfig",children:[]},{value:"/api/version",id:"apiversion",children:[]},{value:"/api/events",id:"apievents",children:[]},{value:"/api/events/summary",id:"apieventssummary",children:[]},{value:"/api/events/<id>",id:"apieventsid",children:[]},{value:"/api/events/<id>/thumbnail.jpg",id:"apieventsidthumbnailjpg",children:[]},{value:"/clips/<camera>-<id>.mp4",id:"clipscamera-idmp4",children:[]},{value:"/clips/<camera>-<id>.jpg",id:"clipscamera-idjpg",children:[]}],o={toc:c};function p(e){var t=e.components,a=Object(r.a)(e,["components"]);return Object(b.b)("wrapper",Object(n.a)({},o,a,{components:t,mdxType:"MDXLayout"}),Object(b.b)("p",null,"A web server is available on port 5000 with the following endpoints."),Object(b.b)("h3",{id:"apicamera_name"},Object(b.b)("inlineCode",{parentName:"h3"},"/api/")),Object(b.b)("p",null,"An mjpeg stream for debugging. Keep in mind the mjpeg endpoint is for debugging only and will put additional load on the system when in use."),Object(b.b)("p",null,"Accepts the following query string parameters:"),Object(b.b)("table",null,Object(b.b)("thead",{parentName:"table"},Object(b.b)("tr",{parentName:"thead"},Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"param"),Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Type"),Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"))),Object(b.b)("tbody",{parentName:"table"},Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"fps")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Frame rate")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"h")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Height in pixels")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"bbox")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Show bounding boxes for detected objects (0 or 1)")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"timestamp")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Print the timestamp in the upper left (0 or 1)")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"zones")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Draw the zones on the image (0 or 1)")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"mask")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Overlay the mask on the image (0 or 1)")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"motion")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Draw blue boxes for areas with detected motion (0 or 1)")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"regions")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Draw green boxes for areas where object detection was run (0 or 1)")))),Object(b.b)("p",null,"You can access a higher resolution mjpeg stream by appending ",Object(b.b)("inlineCode",{parentName:"p"},"h=height-in-pixels")," to the endpoint. For example ",Object(b.b)("inlineCode",{parentName:"p"},"http://localhost:5000/back?h=1080"),". You can also increase the FPS by appending ",Object(b.b)("inlineCode",{parentName:"p"},"fps=frame-rate")," to the URL such as ",Object(b.b)("inlineCode",{parentName:"p"},"http://localhost:5000/back?fps=10")," or both with ",Object(b.b)("inlineCode",{parentName:"p"},"?fps=10&h=1000"),"."),Object(b.b)("h3",{id:"apicamera_nameobject_namebestjpgh300crop1"},Object(b.b)("inlineCode",{parentName:"h3"},"/api///best.jpg[?h=300&crop=1]")),Object(b.b)("p",null,"The best snapshot for any object type. It is a full resolution image by default."),Object(b.b)("p",null,"Example parameters:"),Object(b.b)("ul",null,Object(b.b)("li",{parentName:"ul"},Object(b.b)("inlineCode",{parentName:"li"},"h=300"),": resizes the image to 300 pixes tall"),Object(b.b)("li",{parentName:"ul"},Object(b.b)("inlineCode",{parentName:"li"},"crop=1"),": crops the image to the region of the detection rather than returning the entire image")),Object(b.b)("h3",{id:"apicamera_namelatestjpgh300"},Object(b.b)("inlineCode",{parentName:"h3"},"/api//latest.jpg[?h=300]")),Object(b.b)("p",null,"The most recent frame that frigate has finished processing. It is a full resolution image by default."),Object(b.b)("p",null,"Accepts the following query string parameters:"),Object(b.b)("table",null,Object(b.b)("thead",{parentName:"table"},Object(b.b)("tr",{parentName:"thead"},Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"param"),Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Type"),Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"))),Object(b.b)("tbody",{parentName:"table"},Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"h")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Height in pixels")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"bbox")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Show bounding boxes for detected objects (0 or 1)")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"timestamp")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Print the timestamp in the upper left (0 or 1)")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"zones")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Draw the zones on the image (0 or 1)")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"mask")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Overlay the mask on the image (0 or 1)")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"motion")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Draw blue boxes for areas with detected motion (0 or 1)")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"regions")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Draw green boxes for areas where object detection was run (0 or 1)")))),Object(b.b)("p",null,"Example parameters:"),Object(b.b)("ul",null,Object(b.b)("li",{parentName:"ul"},Object(b.b)("inlineCode",{parentName:"li"},"h=300"),": resizes the image to 300 pixes tall")),Object(b.b)("h3",{id:"apistats"},Object(b.b)("inlineCode",{parentName:"h3"},"/api/stats")),Object(b.b)("p",null,"Contains some granular debug info that can be used for sensors in HomeAssistant."),Object(b.b)("p",null,"Sample response:"),Object(b.b)("pre",null,Object(b.b)("code",Object(n.a)({parentName:"pre"},{className:"language-json"}),'{\n /* Per Camera Stats */\n "back": {\n /***************\n * Frames per second being consumed from your camera. If this is higher\n * than it is supposed to be, you should set -r FPS in your input_args.\n * camera_fps = process_fps + skipped_fps\n ***************/\n "camera_fps": 5.0,\n /***************\n * Number of times detection is run per second. This can be higher than\n * your camera FPS because frigate often looks at the same frame multiple times\n * or in multiple locations\n ***************/\n "detection_fps": 1.5,\n /***************\n * PID for the ffmpeg process that consumes this camera\n ***************/\n "capture_pid": 27,\n /***************\n * PID for the process that runs detection for this camera\n ***************/\n "pid": 34,\n /***************\n * Frames per second being processed by frigate.\n ***************/\n "process_fps": 5.1,\n /***************\n * Frames per second skip for processing by frigate.\n ***************/\n "skipped_fps": 0.0\n },\n /***************\n * Sum of detection_fps across all cameras and detectors.\n * This should be the sum of all detection_fps values from cameras.\n ***************/\n "detection_fps": 5.0,\n /* Detectors Stats */\n "detectors": {\n "coral": {\n /***************\n * Timestamp when object detection started. If this value stays non-zero and constant\n * for a long time, that means the detection process is stuck.\n ***************/\n "detection_start": 0.0,\n /***************\n * Time spent running object detection in milliseconds.\n ***************/\n "inference_speed": 10.48,\n /***************\n * PID for the shared process that runs object detection on the Coral.\n ***************/\n "pid": 25321\n }\n },\n "service": {\n /* Uptime in seconds */\n "uptime": 10,\n "version": "0.8.0-8883709"\n }\n}\n')),Object(b.b)("h3",{id:"apiconfig"},Object(b.b)("inlineCode",{parentName:"h3"},"/api/config")),Object(b.b)("p",null,"A json representation of your configuration"),Object(b.b)("h3",{id:"apiversion"},Object(b.b)("inlineCode",{parentName:"h3"},"/api/version")),Object(b.b)("p",null,"Version info"),Object(b.b)("h3",{id:"apievents"},Object(b.b)("inlineCode",{parentName:"h3"},"/api/events")),Object(b.b)("p",null,"Events from the database. Accepts the following query string parameters:"),Object(b.b)("table",null,Object(b.b)("thead",{parentName:"table"},Object(b.b)("tr",{parentName:"thead"},Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"param"),Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Type"),Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"))),Object(b.b)("tbody",{parentName:"table"},Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"before")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Epoch time")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"after")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Epoch time")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"camera")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"str"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Camera name")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"label")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"str"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Label name")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"zone")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"str"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Zone name")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"limit")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Limit the number of events returned")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"has_snapshot")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Filter to events that have snapshots (0 or 1)")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"has_clip")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Filter to events that have clips (0 or 1)")))),Object(b.b)("h3",{id:"apieventssummary"},Object(b.b)("inlineCode",{parentName:"h3"},"/api/events/summary")),Object(b.b)("p",null,"Returns summary data for events in the database. Used by the HomeAssistant integration."),Object(b.b)("h3",{id:"apieventsid"},Object(b.b)("inlineCode",{parentName:"h3"},"/api/events/")),Object(b.b)("p",null,"Returns data for a single event."),Object(b.b)("h3",{id:"apieventsidthumbnailjpg"},Object(b.b)("inlineCode",{parentName:"h3"},"/api/events//thumbnail.jpg")),Object(b.b)("p",null,"Returns a thumbnail for the event id optimized for notifications. Works while the event is in progress and after completion. Passing ",Object(b.b)("inlineCode",{parentName:"p"},"?format=android")," will convert the thumbnail to 2:1 aspect ratio."),Object(b.b)("h3",{id:"clipscamera-idmp4"},Object(b.b)("inlineCode",{parentName:"h3"},"/clips/-.mp4")),Object(b.b)("p",null,"Video clip for the given camera and event id."),Object(b.b)("h3",{id:"clipscamera-idjpg"},Object(b.b)("inlineCode",{parentName:"h3"},"/clips/-.jpg")),Object(b.b)("p",null,"JPG snapshot for the given camera and event id."))}p.isMDXComponent=!0},92:function(e,t,a){"use strict";a.d(t,"a",(function(){return d})),a.d(t,"b",(function(){return j}));var n=a(0),r=a.n(n);function b(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function l(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var o=r.a.createContext({}),p=function(e){var t=r.a.useContext(o),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},d=function(e){var t=p(e.components);return r.a.createElement(o.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},s=r.a.forwardRef((function(e,t){var a=e.components,n=e.mdxType,b=e.originalType,i=e.parentName,o=c(e,["components","mdxType","originalType","parentName"]),d=p(a),s=n,j=d["".concat(i,".").concat(s)]||d[s]||m[s]||b;return a?r.a.createElement(j,l(l({ref:t},o),{},{components:a})):r.a.createElement(j,l({ref:t},o))}));function j(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var b=a.length,i=new Array(b);i[0]=s;var l={};for(var c in t)hasOwnProperty.call(t,c)&&(l[c]=t[c]);l.originalType=e,l.mdxType="string"==typeof e?e:n,i[1]=l;for(var o=2;o=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)},f={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=s(e,["components","mdxType","originalType","parentName"]),p=u(r),b=n,m=p["".concat(i,".").concat(b)]||p[b]||f[b]||a;return r?o.a.createElement(m,c(c({ref:t},l),{},{components:r})):o.a.createElement(m,c({ref:t},l))}));function m(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 s in t)hasOwnProperty.call(t,s)&&(c[s]=t[s]);c.originalType=e,c.mdxType="string"==typeof e?e:n,i[1]=c;for(var l=2;l=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var b=r.a.createContext({}),p=function(e){var t=r.a.useContext(b),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},s=function(e){var t=p(e.components);return r.a.createElement(b.Provider,{value:t},e.children)},u={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,c=e.originalType,i=e.parentName,b=o(e,["components","mdxType","originalType","parentName"]),s=p(n),d=a,O=s["".concat(i,".").concat(d)]||s[d]||u[d]||c;return n?r.a.createElement(O,l(l({ref:t},b),{},{components:n})):r.a.createElement(O,l({ref:t},b))}));function O(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var c=n.length,i=new Array(c);i[0]=d;var l={};for(var o in t)hasOwnProperty.call(t,o)&&(l[o]=t[o]);l.originalType=e,l.mdxType="string"==typeof e?e:a,i[1]=l;for(var b=2;b=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var u=r.a.createContext({}),s=function(e){var t=r.a.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):c(c({},t),e)),n},p=function(e){var t=s(e.components);return r.a.createElement(u.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},f=r.a.forwardRef((function(e,t){var n=e.components,o=e.mdxType,a=e.originalType,i=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),p=s(n),f=o,d=p["".concat(i,".").concat(f)]||p[f]||m[f]||a;return n?r.a.createElement(d,c(c({ref:t},u),{},{components:n})):r.a.createElement(d,c({ref:t},u))}));function d(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=n.length,i=new Array(a);i[0]=f;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:o,i[1]=c;for(var u=2;ufrigate/available",id:"frigateavailable",children:[]},{value:"frigate/<camera_name>/<object_name>",id:"frigatecamera_nameobject_name",children:[]},{value:"frigate/<zone_name>/<object_name>",id:"frigatezone_nameobject_name",children:[]},{value:"frigate/<camera_name>/<object_name>/snapshot",id:"frigatecamera_nameobject_namesnapshot",children:[]},{value:"frigate/events",id:"frigateevents",children:[]},{value:"frigate/stats",id:"frigatestats",children:[]},{value:"frigate/<camera_name>/detect/set",id:"frigatecamera_namedetectset",children:[]},{value:"frigate/<camera_name>/detect/state",id:"frigatecamera_namedetectstate",children:[]},{value:"frigate/<camera_name>/clips/set",id:"frigatecamera_nameclipsset",children:[]},{value:"frigate/<camera_name>/clips/state",id:"frigatecamera_nameclipsstate",children:[]},{value:"frigate/<camera_name>/snapshots/set",id:"frigatecamera_namesnapshotsset",children:[]},{value:"frigate/<camera_name>/snapshots/state",id:"frigatecamera_namesnapshotsstate",children:[]}],l={toc:s};function d(e){var t=e.components,a=Object(r.a)(e,["components"]);return Object(i.b)("wrapper",Object(n.a)({},l,a,{components:t,mdxType:"MDXLayout"}),Object(i.b)("p",null,"These are the MQTT messages generated by Frigate. The default topic_prefix is ",Object(i.b)("inlineCode",{parentName:"p"},"frigate"),", but can be changed in the config file."),Object(i.b)("h3",{id:"frigateavailable"},Object(i.b)("inlineCode",{parentName:"h3"},"frigate/available")),Object(i.b)("p",null,'Designed to be used as an availability topic with HomeAssistant. Possible message are:\n"online": published when frigate is running (on startup)\n"offline": published right before frigate stops'),Object(i.b)("h3",{id:"frigatecamera_nameobject_name"},Object(i.b)("inlineCode",{parentName:"h3"},"frigate//")),Object(i.b)("p",null,"Publishes the count of objects for the camera for use as a sensor in HomeAssistant."),Object(i.b)("h3",{id:"frigatezone_nameobject_name"},Object(i.b)("inlineCode",{parentName:"h3"},"frigate//")),Object(i.b)("p",null,"Publishes the count of objects for the zone for use as a sensor in HomeAssistant."),Object(i.b)("h3",{id:"frigatecamera_nameobject_namesnapshot"},Object(i.b)("inlineCode",{parentName:"h3"},"frigate///snapshot")),Object(i.b)("p",null,"Publishes a jpeg encoded frame of the detected object type. When the object is no longer detected, the highest confidence image is published or the original image\nis published again."),Object(i.b)("p",null,"The height and crop of snapshots can be configured in the config."),Object(i.b)("h3",{id:"frigateevents"},Object(i.b)("inlineCode",{parentName:"h3"},"frigate/events")),Object(i.b)("p",null,"Message published for each changed event. The first message is published when the tracked object is no longer marked as a false_positive. When frigate finds a better snapshot of the tracked object or when a zone change occurs, it will publish a message with the same id. When the event ends, a final message is published with ",Object(i.b)("inlineCode",{parentName:"p"},"end_time")," set."),Object(i.b)("pre",null,Object(i.b)("code",Object(n.a)({parentName:"pre"},{className:"language-json"}),'{\n "type": "update", // new, update, or end\n "before": {\n "id": "1607123955.475377-mxklsc",\n "camera": "front_door",\n "frame_time": 1607123961.837752,\n "label": "person",\n "top_score": 0.958984375,\n "false_positive": false,\n "start_time": 1607123955.475377,\n "end_time": null,\n "score": 0.7890625,\n "box": [424, 500, 536, 712],\n "area": 23744,\n "region": [264, 450, 667, 853],\n "current_zones": ["driveway"],\n "entered_zones": ["yard", "driveway"],\n "thumbnail": null\n },\n "after": {\n "id": "1607123955.475377-mxklsc",\n "camera": "front_door",\n "frame_time": 1607123962.082975,\n "label": "person",\n "top_score": 0.958984375,\n "false_positive": false,\n "start_time": 1607123955.475377,\n "end_time": null,\n "score": 0.87890625,\n "box": [432, 496, 544, 854],\n "area": 40096,\n "region": [218, 440, 693, 915],\n "current_zones": ["yard", "driveway"],\n "entered_zones": ["yard", "driveway"],\n "thumbnail": null\n }\n}\n')),Object(i.b)("h3",{id:"frigatestats"},Object(i.b)("inlineCode",{parentName:"h3"},"frigate/stats")),Object(i.b)("p",null,"Same data available at ",Object(i.b)("inlineCode",{parentName:"p"},"/api/stats")," published at a configurable interval."),Object(i.b)("h3",{id:"frigatecamera_namedetectset"},Object(i.b)("inlineCode",{parentName:"h3"},"frigate//detect/set")),Object(i.b)("p",null,"Topic to turn detection for a camera on and off. Expected values are ",Object(i.b)("inlineCode",{parentName:"p"},"ON")," and ",Object(i.b)("inlineCode",{parentName:"p"},"OFF"),"."),Object(i.b)("h3",{id:"frigatecamera_namedetectstate"},Object(i.b)("inlineCode",{parentName:"h3"},"frigate//detect/state")),Object(i.b)("p",null,"Topic with current state of detection for a camera. Published values are ",Object(i.b)("inlineCode",{parentName:"p"},"ON")," and ",Object(i.b)("inlineCode",{parentName:"p"},"OFF"),"."),Object(i.b)("h3",{id:"frigatecamera_nameclipsset"},Object(i.b)("inlineCode",{parentName:"h3"},"frigate//clips/set")),Object(i.b)("p",null,"Topic to turn clips for a camera on and off. Expected values are ",Object(i.b)("inlineCode",{parentName:"p"},"ON")," and ",Object(i.b)("inlineCode",{parentName:"p"},"OFF"),"."),Object(i.b)("h3",{id:"frigatecamera_nameclipsstate"},Object(i.b)("inlineCode",{parentName:"h3"},"frigate//clips/state")),Object(i.b)("p",null,"Topic with current state of clips for a camera. Published values are ",Object(i.b)("inlineCode",{parentName:"p"},"ON")," and ",Object(i.b)("inlineCode",{parentName:"p"},"OFF"),"."),Object(i.b)("h3",{id:"frigatecamera_namesnapshotsset"},Object(i.b)("inlineCode",{parentName:"h3"},"frigate//snapshots/set")),Object(i.b)("p",null,"Topic to turn snapshots for a camera on and off. Expected values are ",Object(i.b)("inlineCode",{parentName:"p"},"ON")," and ",Object(i.b)("inlineCode",{parentName:"p"},"OFF"),"."),Object(i.b)("h3",{id:"frigatecamera_namesnapshotsstate"},Object(i.b)("inlineCode",{parentName:"h3"},"frigate//snapshots/state")),Object(i.b)("p",null,"Topic with current state of snapshots for a camera. Published values are ",Object(i.b)("inlineCode",{parentName:"p"},"ON")," and ",Object(i.b)("inlineCode",{parentName:"p"},"OFF"),"."))}d.isMDXComponent=!0},92:function(e,t,a){"use strict";a.d(t,"a",(function(){return b})),a.d(t,"b",(function(){return f}));var n=a(0),r=a.n(n);function i(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function c(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function o(e){for(var t=1;t=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({}),d=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=d(e.components);return r.a.createElement(l.Provider,{value:t},e.children)},m={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,c=e.parentName,l=s(e,["components","mdxType","originalType","parentName"]),b=d(a),p=n,f=b["".concat(c,".").concat(p)]||b[p]||m[p]||i;return a?r.a.createElement(f,o(o({ref:t},l),{},{components:a})):r.a.createElement(f,o({ref:t},l))}));function f(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var i=a.length,c=new Array(i);c[0]=p;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o.mdxType="string"==typeof e?e:n,c[1]=o;for(var l=2;l=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var b=n.a.createContext({}),m=function(e){var t=n.a.useContext(b),a=t;return e&&(a="function"==typeof e?e(t):o(o({},t),e)),a},u=function(e){var t=m(e.components);return n.a.createElement(b.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return n.a.createElement(n.a.Fragment,{},t)}},s=n.a.forwardRef((function(e,t){var a=e.components,r=e.mdxType,l=e.originalType,c=e.parentName,b=i(e,["components","mdxType","originalType","parentName"]),u=m(a),s=r,d=u["".concat(c,".").concat(s)]||u[s]||p[s]||l;return a?n.a.createElement(d,o(o({ref:t},b),{},{components:a})):n.a.createElement(d,o({ref:t},b))}));function d(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=a.length,c=new Array(l);c[0]=s;var o={};for(var i in t)hasOwnProperty.call(t,i)&&(o[i]=t[i]);o.originalType=e,o.mdxType="string"==typeof e?e:r,c[1]=o;for(var b=2;b=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var c=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({}),p=function(e){var t=o.a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},s=function(e){var t=p(e.components);return o.a.createElement(l.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},f=o.a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,c=e.originalType,a=e.parentName,l=u(e,["components","mdxType","originalType","parentName"]),s=p(n),f=r,b=s["".concat(a,".").concat(f)]||s[f]||d[f]||c;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 c=n.length,a=new Array(c);a[0]=f;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,a[1]=i;for(var l=2;lmotion",id:"motion",children:[]},{value:"detect",id:"detect",children:[]},{value:"logger",id:"logger",children:[]},{value:"environment_vars",id:"environment_vars",children:[]},{value:"database",id:"database",children:[]},{value:"detectors",id:"detectors",children:[]},{value:"model",id:"model",children:[]}]},{value:"Custom Models",id:"custom-models",children:[{value:"Customizing the Labelmap",id:"customizing-the-labelmap",children:[]}]}],d={toc:c};function s(e){var t=e.components,n=Object(o.a)(e,["components"]);return Object(i.b)("wrapper",Object(a.a)({},d,n,{components:t,mdxType:"MDXLayout"}),Object(i.b)("h2",{id:"advanced-configuration"},"Advanced configuration"),Object(i.b)("h3",{id:"motion"},Object(i.b)("inlineCode",{parentName:"h3"},"motion")),Object(i.b)("p",null,"Global motion detection config. These may also be defined at the camera level."),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"motion:\n # Optional: The threshold passed to cv2.threshold to determine if a pixel is different enough to be counted as motion. (default: shown below)\n # Increasing this value will make motion detection less sensitive and decreasing it will make motion detection more sensitive.\n # The value should be between 1 and 255.\n threshold: 25\n # Optional: Minimum size in pixels in the resized motion image that counts as motion\n # Increasing this value will prevent smaller areas of motion from being detected. Decreasing will make motion detection more sensitive to smaller\n # moving objects.\n contour_area: 100\n # Optional: Alpha value passed to cv2.accumulateWeighted when averaging the motion delta across multiple frames (default: shown below)\n # Higher values mean the current frame impacts the delta a lot, and a single raindrop may register as motion.\n # Too low and a fast moving person wont be detected as motion.\n delta_alpha: 0.2\n # Optional: Alpha value passed to cv2.accumulateWeighted when averaging frames to determine the background (default: shown below)\n # Higher values mean the current frame impacts the average a lot, and a new object will be averaged into the background faster.\n # Low values will cause things like moving shadows to be detected as motion for longer.\n # https://www.geeksforgeeks.org/background-subtraction-in-an-image-using-concept-of-running-average/\n frame_alpha: 0.2\n # Optional: Height of the resized motion frame (default: 1/6th of the original frame height)\n # This operates as an efficient blur alternative. Higher values will result in more granular motion detection at the expense of higher CPU usage.\n # Lower values result in less CPU, but small changes may not register as motion.\n frame_height: 180\n")),Object(i.b)("h3",{id:"detect"},Object(i.b)("inlineCode",{parentName:"h3"},"detect")),Object(i.b)("p",null,"Global object detection settings. These may also be defined at the camera level."),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"detect:\n # Optional: Number of frames without a detection before frigate considers an object to be gone. (default: double the frame rate)\n max_disappeared: 10\n")),Object(i.b)("h3",{id:"logger"},Object(i.b)("inlineCode",{parentName:"h3"},"logger")),Object(i.b)("p",null,"Change the default log level for troubleshooting purposes."),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"logger:\n # Optional: default log level (default: shown below)\n default: info\n # Optional: module by module log level configuration\n logs:\n frigate.mqtt: error\n")),Object(i.b)("p",null,"Available log levels are: ",Object(i.b)("inlineCode",{parentName:"p"},"debug"),", ",Object(i.b)("inlineCode",{parentName:"p"},"info"),", ",Object(i.b)("inlineCode",{parentName:"p"},"warning"),", ",Object(i.b)("inlineCode",{parentName:"p"},"error"),", ",Object(i.b)("inlineCode",{parentName:"p"},"critical")),Object(i.b)("p",null,"Examples of available modules are:"),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},Object(i.b)("inlineCode",{parentName:"li"},"frigate.app")),Object(i.b)("li",{parentName:"ul"},Object(i.b)("inlineCode",{parentName:"li"},"frigate.mqtt")),Object(i.b)("li",{parentName:"ul"},Object(i.b)("inlineCode",{parentName:"li"},"frigate.edgetpu")),Object(i.b)("li",{parentName:"ul"},Object(i.b)("inlineCode",{parentName:"li"},"frigate.zeroconf")),Object(i.b)("li",{parentName:"ul"},Object(i.b)("inlineCode",{parentName:"li"},"detector.")),Object(i.b)("li",{parentName:"ul"},Object(i.b)("inlineCode",{parentName:"li"},"watchdog.")),Object(i.b)("li",{parentName:"ul"},Object(i.b)("inlineCode",{parentName:"li"},"ffmpeg..")," NOTE: All FFmpeg logs are sent as ",Object(i.b)("inlineCode",{parentName:"li"},"error")," level.")),Object(i.b)("h3",{id:"environment_vars"},Object(i.b)("inlineCode",{parentName:"h3"},"environment_vars")),Object(i.b)("p",null,"This section can be used to set environment variables for those unable to modify the environment of the container (ie. within Hass.io)"),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"environment_vars:\n EXAMPLE_VAR: value\n")),Object(i.b)("h3",{id:"database"},Object(i.b)("inlineCode",{parentName:"h3"},"database")),Object(i.b)("p",null,"Event and clip information is managed in a sqlite database at ",Object(i.b)("inlineCode",{parentName:"p"},"/media/frigate/clips/frigate.db"),". If that database is deleted, clips will be orphaned and will need to be cleaned up manually. They also won't show up in the Media Browser within HomeAssistant."),Object(i.b)("p",null,"If you are storing your clips on a network share (SMB, NFS, etc), you may get a ",Object(i.b)("inlineCode",{parentName:"p"},"database is locked")," error message on startup. You can customize the location of the database in the config if necessary."),Object(i.b)("p",null,"This may need to be in a custom location if network storage is used for clips."),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"database:\n path: /media/frigate/clips/frigate.db\n")),Object(i.b)("h3",{id:"detectors"},Object(i.b)("inlineCode",{parentName:"h3"},"detectors")),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"detectors:\n # Required: name of the detector\n coral:\n # Required: type of the detector\n # Valid values are 'edgetpu' (requires device property below) and 'cpu'. type: edgetpu\n # Optional: device name as defined here: https://coral.ai/docs/edgetpu/multiple-edgetpu/#using-the-tensorflow-lite-python-api\n device: usb\n # Optional: num_threads value passed to the tflite.Interpreter (default: shown below)\n # This value is only used for CPU types\n num_threads: 3\n")),Object(i.b)("h3",{id:"model"},Object(i.b)("inlineCode",{parentName:"h3"},"model")),Object(i.b)("pre",null,Object(i.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"model:\n # Required: height of the trained model\n height: 320\n # Required: width of the trained model\n width: 320\n")),Object(i.b)("h2",{id:"custom-models"},"Custom Models"),Object(i.b)("p",null,"Models for both CPU and EdgeTPU (Coral) are bundled in the image. You can use your own models with volume mounts:"),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},"CPU Model: ",Object(i.b)("inlineCode",{parentName:"li"},"/cpu_model.tflite")),Object(i.b)("li",{parentName:"ul"},"EdgeTPU Model: ",Object(i.b)("inlineCode",{parentName:"li"},"/edgetpu_model.tflite")),Object(i.b)("li",{parentName:"ul"},"Labels: ",Object(i.b)("inlineCode",{parentName:"li"},"/labelmap.txt"))),Object(i.b)("p",null,"You also need to update the model width/height in the config if they differ from the defaults."),Object(i.b)("h3",{id:"customizing-the-labelmap"},"Customizing the Labelmap"),Object(i.b)("p",null,"The labelmap can be customized to your needs. A common reason to do this is to combine multiple object types that are easily confused when you don't need to be as granular such as car/truck. You must retain the same number of labels, but you can change the names. To change:"),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},"Download the ",Object(i.b)("a",Object(a.a)({parentName:"li"},{href:"https://dl.google.com/coral/canned_models/coco_labels.txt"}),"COCO labelmap")),Object(i.b)("li",{parentName:"ul"},"Modify the label names as desired. For example, change ",Object(i.b)("inlineCode",{parentName:"li"},"7 truck")," to ",Object(i.b)("inlineCode",{parentName:"li"},"7 car")),Object(i.b)("li",{parentName:"ul"},"Mount the new file at ",Object(i.b)("inlineCode",{parentName:"li"},"/labelmap.txt")," in the container with an additional volume",Object(i.b)("pre",{parentName:"li"},Object(i.b)("code",Object(a.a)({parentName:"pre"},{}),"-v ./config/labelmap.txt:/labelmap.txt\n")))))}s.isMDXComponent=!0},92:function(e,t,n){"use strict";n.d(t,"a",(function(){return b})),n.d(t,"b",(function(){return p}));var a=n(0),o=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 r(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||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var d=o.a.createContext({}),s=function(e){var t=o.a.useContext(d),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},b=function(e){var t=s(e.components);return o.a.createElement(d.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},m=o.a.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,r=e.parentName,d=c(e,["components","mdxType","originalType","parentName"]),b=s(n),m=a,p=b["".concat(r,".").concat(m)]||b[m]||u[m]||i;return n?o.a.createElement(p,l(l({ref:t},d),{},{components:n})):o.a.createElement(p,l({ref:t},d))}));function p(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,r=new Array(i);r[0]=m;var l={};for(var c in t)hasOwnProperty.call(t,c)&&(l[c]=t[c]);l.originalType=e,l.mdxType="string"==typeof e?e:a,r[1]=l;for(var d=2;d + + https://blakeblackshear.github.io/frigate/blog + Frigate Blog + 2015-10-25T23:29:00.000Z + https://github.com/jpmonette/feed + + Frigate Blog + https://blakeblackshear.github.io/frigate/img/favicon.ico + \ No newline at end of file diff --git a/blog/rss.xml b/blog/rss.xml new file mode 100644 index 000000000..32287c7ff --- /dev/null +++ b/blog/rss.xml @@ -0,0 +1,11 @@ + + + + Frigate Blog + https://blakeblackshear.github.io/frigate/blog + Frigate Blog + Sun, 25 Oct 2015 23:29:00 GMT + https://validator.w3.org/feed/docs/rss2.html + https://github.com/jpmonette/feed + + \ No newline at end of file diff --git a/c377a04b.16e26e54.js b/c377a04b.16e26e54.js new file mode 100644 index 000000000..1f042328d --- /dev/null +++ b/c377a04b.16e26e54.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[19],{136:function(e,t,r){"use strict";r.r(t),t.default=r.p+"assets/images/media_browser-1a855eaa41d4cf33b7dbc6586cb12a6d.png"},137:function(e,t,r){"use strict";r.r(t),t.default=r.p+"assets/images/notification-b2414ed687bb4ab92b9dfaab95a5a33c.png"},87:function(e,t,r){"use strict";r.r(t),r.d(t,"frontMatter",(function(){return i})),r.d(t,"metadata",(function(){return c})),r.d(t,"toc",(function(){return s})),r.d(t,"default",(function(){return u}));var n=r(3),o=r(7),a=(r(0),r(92)),i={id:"index",title:"Frigate",sidebar_label:"Features",slug:"/"},c={unversionedId:"index",id:"index",isDocsHomePage:!1,title:"Frigate",description:"A complete and local NVR designed for HomeAssistant with AI object detection. Uses OpenCV and Tensorflow to perform realtime object detection locally for IP cameras.",source:"@site/docs/index.md",slug:"/",permalink:"/",editUrl:"https://github.com/blakeblackshear/frigate/edit/master/docs/docs/index.md",version:"current",sidebar_label:"Features",sidebar:"docs",next:{title:"How Frigate Works",permalink:"/how-it-works"}},s=[{value:"Screenshots",id:"screenshots",children:[]}],l={toc:s};function u(e){var t=e.components,i=Object(o.a)(e,["components"]);return Object(a.b)("wrapper",Object(n.a)({},l,i,{components:t,mdxType:"MDXLayout"}),Object(a.b)("p",null,"A complete and local NVR designed for HomeAssistant with AI object detection. Uses OpenCV and Tensorflow to perform realtime object detection locally for IP cameras."),Object(a.b)("p",null,"Use of a ",Object(a.b)("a",Object(n.a)({parentName:"p"},{href:"https://coral.ai/products/"}),"Google Coral Accelerator")," is optional, but highly recommended. The Coral will outperform even the best CPUs and can process 100+ FPS with very little overhead."),Object(a.b)("ul",null,Object(a.b)("li",{parentName:"ul"},"Tight integration with HomeAssistant via a ",Object(a.b)("a",Object(n.a)({parentName:"li"},{href:"https://github.com/blakeblackshear/frigate-hass-integration"}),"custom component")),Object(a.b)("li",{parentName:"ul"},"Designed to minimize resource use and maximize performance by only looking for objects when and where it is necessary"),Object(a.b)("li",{parentName:"ul"},"Leverages multiprocessing heavily with an emphasis on realtime over processing every frame"),Object(a.b)("li",{parentName:"ul"},"Uses a very low overhead motion detection to determine where to run object detection"),Object(a.b)("li",{parentName:"ul"},"Object detection with TensorFlow runs in separate processes for maximum FPS"),Object(a.b)("li",{parentName:"ul"},"Communicates over MQTT for easy integration into other systems"),Object(a.b)("li",{parentName:"ul"},"24/7 recording"),Object(a.b)("li",{parentName:"ul"},"Re-streaming via RTMP to reduce the number of connections to your camera")),Object(a.b)("h2",{id:"screenshots"},"Screenshots"),Object(a.b)("p",null,Object(a.b)("img",{alt:"Media Browser",src:r(136).default})),Object(a.b)("p",null,Object(a.b)("img",{alt:"Notification",src:r(137).default})))}u.isMDXComponent=!0},92:function(e,t,r){"use strict";r.d(t,"a",(function(){return b})),r.d(t,"b",(function(){return d}));var n=r(0),o=r.n(n);function a(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||(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},b=function(e){var t=u(e.components);return o.a.createElement(l.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},m=o.a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,a=e.originalType,i=e.parentName,l=s(e,["components","mdxType","originalType","parentName"]),b=u(r),m=n,d=b["".concat(i,".").concat(m)]||b[m]||p[m]||a;return r?o.a.createElement(d,c(c({ref:t},l),{},{components:r})):o.a.createElement(d,c({ref:t},l))}));function d(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var a=r.length,i=new Array(a);i[0]=m;var c={};for(var s in t)hasOwnProperty.call(t,s)&&(c[s]=t[s]);c.originalType=e,c.mdxType="string"==typeof e?e:n,i[1]=c;for(var l=2;l=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 p=o.a.createContext({}),l=function(e){var t=o.a.useContext(p),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},d=function(e){var t=l(e.components);return o.a.createElement(p.Provider,{value:t},e.children)},s={inlineCode:"code",wrapper:function(e){var t=e.children;return o.a.createElement(o.a.Fragment,{},t)}},f=o.a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,a=e.originalType,c=e.parentName,p=u(e,["components","mdxType","originalType","parentName"]),d=l(r),f=n,b=d["".concat(c,".").concat(f)]||d[f]||s[f]||a;return r?o.a.createElement(b,i(i({ref:t},p),{},{components:r})):o.a.createElement(b,i({ref:t},p))}));function b(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var a=r.length,c=new Array(a);c[0]=f;var i={};for(var u in t)hasOwnProperty.call(t,u)&&(i[u]=t[u]);i.originalType=e,i.mdxType="string"==typeof e?e:n,c[1]=i;for(var p=2;p + + + + + + +Advanced | Frigate + + + + + + + + + + + +
+

Advanced

Advanced configuration#

motion#

Global motion detection config. These may also be defined at the camera level.

motion:
# Optional: The threshold passed to cv2.threshold to determine if a pixel is different enough to be counted as motion. (default: shown below)
# Increasing this value will make motion detection less sensitive and decreasing it will make motion detection more sensitive.
# The value should be between 1 and 255.
threshold: 25
# Optional: Minimum size in pixels in the resized motion image that counts as motion
# Increasing this value will prevent smaller areas of motion from being detected. Decreasing will make motion detection more sensitive to smaller
# moving objects.
contour_area: 100
# Optional: Alpha value passed to cv2.accumulateWeighted when averaging the motion delta across multiple frames (default: shown below)
# Higher values mean the current frame impacts the delta a lot, and a single raindrop may register as motion.
# Too low and a fast moving person wont be detected as motion.
delta_alpha: 0.2
# Optional: Alpha value passed to cv2.accumulateWeighted when averaging frames to determine the background (default: shown below)
# Higher values mean the current frame impacts the average a lot, and a new object will be averaged into the background faster.
# Low values will cause things like moving shadows to be detected as motion for longer.
# https://www.geeksforgeeks.org/background-subtraction-in-an-image-using-concept-of-running-average/
frame_alpha: 0.2
# Optional: Height of the resized motion frame (default: 1/6th of the original frame height)
# This operates as an efficient blur alternative. Higher values will result in more granular motion detection at the expense of higher CPU usage.
# Lower values result in less CPU, but small changes may not register as motion.
frame_height: 180

detect#

Global object detection settings. These may also be defined at the camera level.

detect:
# Optional: Number of frames without a detection before frigate considers an object to be gone. (default: double the frame rate)
max_disappeared: 10

logger#

Change the default log level for troubleshooting purposes.

logger:
# Optional: default log level (default: shown below)
default: info
# Optional: module by module log level configuration
logs:
frigate.mqtt: error

Available log levels are: debug, info, warning, error, critical

Examples of available modules are:

  • frigate.app
  • frigate.mqtt
  • frigate.edgetpu
  • frigate.zeroconf
  • detector.<detector_name>
  • watchdog.<camera_name>
  • ffmpeg.<camera_name>.<sorted_roles> NOTE: All FFmpeg logs are sent as error level.

environment_vars#

This section can be used to set environment variables for those unable to modify the environment of the container (ie. within Hass.io)

environment_vars:
EXAMPLE_VAR: value

database#

Event and clip information is managed in a sqlite database at /media/frigate/clips/frigate.db. If that database is deleted, clips will be orphaned and will need to be cleaned up manually. They also won't show up in the Media Browser within HomeAssistant.

If you are storing your clips on a network share (SMB, NFS, etc), you may get a database is locked error message on startup. You can customize the location of the database in the config if necessary.

This may need to be in a custom location if network storage is used for clips.

database:
path: /media/frigate/clips/frigate.db

detectors#

detectors:
# Required: name of the detector
coral:
# Required: type of the detector
# Valid values are 'edgetpu' (requires device property below) and 'cpu'. type: edgetpu
# Optional: device name as defined here: https://coral.ai/docs/edgetpu/multiple-edgetpu/#using-the-tensorflow-lite-python-api
device: usb
# Optional: num_threads value passed to the tflite.Interpreter (default: shown below)
# This value is only used for CPU types
num_threads: 3

model#

model:
# Required: height of the trained model
height: 320
# Required: width of the trained model
width: 320

Custom Models#

Models for both CPU and EdgeTPU (Coral) are bundled in the image. You can use your own models with volume mounts:

  • CPU Model: /cpu_model.tflite
  • EdgeTPU Model: /edgetpu_model.tflite
  • Labels: /labelmap.txt

You also need to update the model width/height in the config if they differ from the defaults.

Customizing the Labelmap#

The labelmap can be customized to your needs. A common reason to do this is to combine multiple object types that are easily confused when you don't need to be as granular such as car/truck. You must retain the same number of labels, but you can change the names. To change:

  • Download the COCO labelmap
  • Modify the label names as desired. For example, change 7 truck to 7 car
  • Mount the new file at /labelmap.txt in the container with an additional volume
    -v ./config/labelmap.txt:/labelmap.txt
+ + + + + + + + + + + \ No newline at end of file diff --git a/configuration/cameras/index.html b/configuration/cameras/index.html new file mode 100644 index 000000000..b9aea1252 --- /dev/null +++ b/configuration/cameras/index.html @@ -0,0 +1,44 @@ + + + + + + + +Cameras | Frigate + + + + + + + + + + + +
+

Cameras

Setting Up Camera Inputs#

Up to 4 inputs can be configured for each camera and the role of each input can be mixed and matched based on your needs. This allows you to use a lower resolution stream for object detection, but create clips from a higher resolution stream, or vice versa.

Each role can only be assigned to one input per camera. The options for roles are as follows:

RoleDescription
detectMain feed for object detection
clipsClips of events from objects detected in the detect feed. docs
recordSaves 60 second segments of the video feed. docs
rtmpBroadcast as an RTMP feed for other services to consume. docs

Example#

mqtt:
host: mqtt.server.com
cameras:
back:
ffmpeg:
inputs:
- path: rtsp://viewer:{FRIGATE_RTSP_PASSWORD}@10.0.10.10:554/cam/realmonitor?channel=1&subtype=2
roles:
- detect
- rtmp
- path: rtsp://viewer:{FRIGATE_RTSP_PASSWORD}@10.0.10.10:554/live
roles:
- clips
- record
width: 1280
height: 720
fps: 5

Masks & Zones#

Motion masks#

Masks are used to ignore initial detection in areas of your camera's field of view.

To create a poly mask:

  1. Visit the web UI
  2. Click the camera you wish to create a mask for
  3. Click "Mask & Zone creator"
  4. Click "Add" on the type of mask or zone you would like to create
  5. Click on the camera's latest image to create a masked area. The yaml representation will be updated in real-time
  6. When you've finished creating your mask, click "Copy" and paste the contents into your config.yaml file and restart Frigate

Example of a finished row corresponding to the below example image:

motion:
mask: '0,461,3,0,1919,0,1919,843,1699,492,1344,458,1346,336,973,317,869,375,866,432'

poly

# Optional: camera level motion config
motion:
# Optional: motion mask
# NOTE: see docs for more detailed info on creating masks
mask: 0,900,1080,900,1080,1920,0,1920

Zones#

Zones allow you to define a specific area of the frame and apply additional filters for object types so you can determine whether or not an object is within a particular area. Zones cannot have the same name as a camera. If desired, a single zone can include multiple cameras if you have multiple cameras covering the same area by configuring zones with the same name for each camera.

During testing, draw_zones should be set in the config to draw the zone on the frames so you can adjust as needed. The zone line will increase in thickness when any object enters the zone.

To create a zone, follow the same steps above for a "Motion mask", but use the section of the web UI for creating a zone instead.

# Optional: zones for this camera
zones:
# Required: name of the zone
# NOTE: This must be different than any camera names, but can match with another zone on another
# camera.
front_steps:
# Required: List of x,y coordinates to define the polygon of the zone.
# NOTE: Coordinates can be generated at https://www.image-map.net/
coordinates: 545,1077,747,939,788,805
# Optional: Zone level object filters.
# NOTE: The global and camera filters are applied upstream.
filters:
person:
min_area: 5000
max_area: 100000
threshold: 0.7

Objects#

# Optional: Camera level object filters config.
objects:
track:
- person
- car
filters:
person:
min_area: 5000
max_area: 100000
min_score: 0.5
threshold: 0.7
# Optional: mask to prevent this object type from being detected in certain areas (default: no mask)
# Checks based on the bottom center of the bounding box of the object
mask: 0,0,1000,0,1000,200,0,200

Clips#

Frigate can save video clips without any CPU overhead for encoding by simply copying the stream directly with FFmpeg. It leverages FFmpeg's segment functionality to maintain a cache of video for each camera. The cache files are written to disk at /tmp/cache and do not introduce memory overhead. When an object is being tracked, it will extend the cache to ensure it can assemble a clip when the event ends. Once the event ends, it again uses FFmpeg to assemble a clip by combining the video clips without any encoding by the CPU. Assembled clips are are saved to /media/frigate/clips. Clips are retained according to the retention settings defined on the config for each object type.

caution

Previous versions of frigate included -vsync drop in input parameters. This is not compatible with FFmpeg's segment feature and must be removed from your input parameters if you have overrides set.

clips:
# Required: enables clips for the camera (default: shown below)
# This value can be set via MQTT and will be updated in startup based on retained value
enabled: False
# Optional: Number of seconds before the event to include in the clips (default: shown below)
pre_capture: 5
# Optional: Number of seconds after the event to include in the clips (default: shown below)
post_capture: 5
# Optional: Objects to save clips for. (default: all tracked objects)
objects:
- person
# Optional: Camera override for retention settings (default: global values)
retain:
# Required: Default retention days (default: shown below)
default: 10
# Optional: Per object retention days
objects:
person: 15

Snapshots#

Frigate can save a snapshot image to /media/frigate/clips for each event named as <camera>-<id>.jpg.

# Optional: Configuration for the jpg snapshots written to the clips directory for each event
snapshots:
# Optional: Enable writing jpg snapshot to /media/frigate/clips (default: shown below)
# This value can be set via MQTT and will be updated in startup based on retained value
enabled: False
# Optional: print a timestamp on the snapshots (default: shown below)
timestamp: False
# Optional: draw bounding box on the snapshots (default: shown below)
bounding_box: False
# Optional: crop the snapshot (default: shown below)
crop: False
# Optional: height to resize the snapshot to (default: original size)
height: 175
# Optional: Camera override for retention settings (default: global values)
retain:
# Required: Default retention days (default: shown below)
default: 10
# Optional: Per object retention days
objects:
person: 15

24/7 Recordings#

24/7 recordings can be enabled and are stored at /media/frigate/recordings. The folder structure for the recordings is YYYY-MM/DD/HH/<camera_name>/MM.SS.mp4. These recordings are written directly from your camera stream without re-encoding and are available in HomeAssistant's media browser. Each camera supports a configurable retention policy in the config.

caution

Previous versions of frigate included -vsync drop in input parameters. This is not compatible with FFmpeg's segment feature and must be removed from your input parameters if you have overrides set.

# Optional: 24/7 recording configuration
record:
# Optional: Enable recording (default: global setting)
enabled: False
# Optional: Number of days to retain (default: global setting)
retain_days: 30

RTMP streams#

Frigate can re-stream your video feed as a RTMP feed for other applications such as HomeAssistant to utilize it at rtmp://<frigate_host>/live/<camera_name>. Port 1935 must be open. This allows you to use a video feed for detection in frigate and HomeAssistant live view at the same time without having to make two separate connections to the camera. The video feed is copied from the original video feed directly to avoid re-encoding. This feed does not include any annotation by Frigate.

Some video feeds are not compatible with RTMP. If you are experiencing issues, check to make sure your camera feed is h264 with AAC audio. If your camera doesn't support a compatible format for RTMP, you can use the ffmpeg args to re-encode it on the fly at the expense of increased CPU utilization.

Full example#

The following is a full example of all of the options together for a camera configuration

cameras:
# Required: name of the camera
back:
# Required: ffmpeg settings for the camera
ffmpeg:
# Required: A list of input streams for the camera. See documentation for more information.
inputs:
# Required: the path to the stream
# NOTE: Environment variables that begin with 'FRIGATE_' may be referenced in {}
- path: rtsp://viewer:{FRIGATE_RTSP_PASSWORD}@10.0.10.10:554/cam/realmonitor?channel=1&subtype=2
# Required: list of roles for this stream. valid values are: detect,record,clips,rtmp
# NOTICE: In addition to assigning the record, clips, and rtmp roles,
# they must also be enabled in the camera config.
roles:
- detect
- rtmp
# Optional: stream specific global args (default: inherit)
global_args:
# Optional: stream specific hwaccel args (default: inherit)
hwaccel_args:
# Optional: stream specific input args (default: inherit)
input_args:
+
# Optional: camera specific global args (default: inherit)
global_args:
# Optional: camera specific hwaccel args (default: inherit)
hwaccel_args:
# Optional: camera specific input args (default: inherit)
input_args:
# Optional: camera specific output args (default: inherit)
output_args:
+
# Required: width of the frame for the input with the detect role
width: 1280
# Required: height of the frame for the input with the detect role
height: 720
# Optional: desired fps for your camera for the input with the detect role
# NOTE: Recommended value of 5. Ideally, try and reduce your FPS on the camera.
# Frigate will attempt to autodetect if not specified.
fps: 5
+
# Optional: camera level motion config
motion:
# Optional: motion mask
# NOTE: see docs for more detailed info on creating masks
mask: 0,900,1080,900,1080,1920,0,1920
+
# Optional: timeout for highest scoring image before allowing it
# to be replaced by a newer image. (default: shown below)
best_image_timeout: 60
+
# Optional: zones for this camera
zones:
# Required: name of the zone
# NOTE: This must be different than any camera names, but can match with another zone on another
# camera.
front_steps:
# Required: List of x,y coordinates to define the polygon of the zone.
# NOTE: Coordinates can be generated at https://www.image-map.net/
coordinates: 545,1077,747,939,788,805
# Optional: Zone level object filters.
# NOTE: The global and camera filters are applied upstream.
filters:
person:
min_area: 5000
max_area: 100000
threshold: 0.7
+
# Optional: Camera level detect settings
detect:
# Optional: enables detection for the camera (default: True)
# This value can be set via MQTT and will be updated in startup based on retained value
enabled: True
# Optional: Number of frames without a detection before frigate considers an object to be gone. (default: double the frame rate)
max_disappeared: 10
+
# Optional: save clips configuration
clips:
# Required: enables clips for the camera (default: shown below)
# This value can be set via MQTT and will be updated in startup based on retained value
enabled: False
# Optional: Number of seconds before the event to include in the clips (default: shown below)
pre_capture: 5
# Optional: Number of seconds after the event to include in the clips (default: shown below)
post_capture: 5
# Optional: Objects to save clips for. (default: all tracked objects)
objects:
- person
# Optional: Camera override for retention settings (default: global values)
retain:
# Required: Default retention days (default: shown below)
default: 10
# Optional: Per object retention days
objects:
person: 15
+
# Optional: 24/7 recording configuration
record:
# Optional: Enable recording (default: global setting)
enabled: False
# Optional: Number of days to retain (default: global setting)
retain_days: 30
+
# Optional: RTMP re-stream configuration
rtmp:
# Required: Enable the live stream (default: True)
enabled: True
+
# Optional: Configuration for the jpg snapshots written to the clips directory for each event
snapshots:
# Optional: Enable writing jpg snapshot to /media/frigate/clips (default: shown below)
# This value can be set via MQTT and will be updated in startup based on retained value
enabled: False
# Optional: print a timestamp on the snapshots (default: shown below)
timestamp: False
# Optional: draw bounding box on the snapshots (default: shown below)
bounding_box: False
# Optional: crop the snapshot (default: shown below)
crop: False
# Optional: height to resize the snapshot to (default: original size)
height: 175
# Optional: Camera override for retention settings (default: global values)
retain:
# Required: Default retention days (default: shown below)
default: 10
# Optional: Per object retention days
objects:
person: 15
+
# Optional: Configuration for the jpg snapshots published via MQTT
mqtt:
# Optional: Enable publishing snapshot via mqtt for camera (default: shown below)
# NOTE: Only applies to publishing image data to MQTT via 'frigate/<camera_name>/<object_name>/snapshot'.
# All other messages will still be published.
enabled: True
# Optional: print a timestamp on the snapshots (default: shown below)
timestamp: True
# Optional: draw bounding box on the snapshots (default: shown below)
bounding_box: True
# Optional: crop the snapshot (default: shown below)
crop: True
# Optional: height to resize the snapshot to (default: shown below)
height: 270
+
# Optional: Camera level object filters config.
objects:
track:
- person
- car
filters:
person:
min_area: 5000
max_area: 100000
min_score: 0.5
threshold: 0.7
# Optional: mask to prevent this object type from being detected in certain areas (default: no mask)
# Checks based on the bottom center of the bounding box of the object
mask: 0,0,1000,0,1000,200,0,200

Camera specific configuration#

RTMP Cameras#

The input parameters need to be adjusted for RTMP cameras

ffmpeg:
input_args:
- -avoid_negative_ts
- make_zero
- -fflags
- nobuffer
- -flags
- low_delay
- -strict
- experimental
- -fflags
- +genpts+discardcorrupt
- -use_wallclock_as_timestamps
- '1'

Blue Iris RTSP Cameras#

You will need to remove nobuffer flag for Blue Iris RTSP cameras

ffmpeg:
input_args:
- -avoid_negative_ts
- make_zero
- -flags
- low_delay
- -strict
- experimental
- -fflags
- +genpts+discardcorrupt
- -rtsp_transport
- tcp
- -stimeout
- '5000000'
- -use_wallclock_as_timestamps
- '1'
+ + + + + + + + + + + \ No newline at end of file diff --git a/configuration/detectors/index.html b/configuration/detectors/index.html new file mode 100644 index 000000000..a5637a18e --- /dev/null +++ b/configuration/detectors/index.html @@ -0,0 +1,32 @@ + + + + + + + +Detectors | Frigate + + + + + + + + + + + +
+

Detectors

The default config will look for a USB Coral device. If you do not have a Coral, you will need to configure a CPU detector. If you have PCI or multiple Coral devices, you need to configure your detector devices in the config file. When using multiple detectors, they run in dedicated processes, but pull from a common queue of requested detections across all cameras.

Frigate supports edgetpu and cpu as detector types. The device value should be specified according to the Documentation for the TensorFlow Lite Python API.

Note: There is no support for Nvidia GPUs to perform object detection with tensorflow. It can be used for ffmpeg decoding, but not object detection.

Single USB Coral:

detectors:
coral:
type: edgetpu
device: usb

Multiple USB Corals:

detectors:
coral1:
type: edgetpu
device: usb:0
coral2:
type: edgetpu
device: usb:1

Mixing Corals:

detectors:
coral_usb:
type: edgetpu
device: usb
coral_pci:
type: edgetpu
device: pci

CPU Detectors (not recommended):

detectors:
cpu1:
type: cpu
cpu2:
type: cpu
+ + + + + + + + + + + \ No newline at end of file diff --git a/configuration/false_positives/index.html b/configuration/false_positives/index.html new file mode 100644 index 000000000..eb096cd68 --- /dev/null +++ b/configuration/false_positives/index.html @@ -0,0 +1,32 @@ + + + + + + + +Reducing false positives | Frigate + + + + + + + + + + + +
+

Reducing false positives

Tune your object filters to adjust false positives: min_area, max_area, min_score, threshold.

For object filters in your configuration, any single detection below min_score will be ignored as a false positive. threshold is based on the median of the history of scores (padded to 3 values) for a tracked object. Consider the following frames when min_score is set to 0.6 and threshold is set to 0.85:

FrameCurrent ScoreScore HistoryComputed ScoreDetected Object
10.70.0, 0, 0.70.0No
20.550.0, 0.7, 0.00.0No
30.850.7, 0.0, 0.850.7No
40.900.7, 0.85, 0.95, 0.900.875Yes
50.880.7, 0.85, 0.95, 0.90, 0.880.88Yes
60.950.7, 0.85, 0.95, 0.90, 0.88, 0.950.89Yes

In frame 2, the score is below the min_score value, so frigate ignores it and it becomes a 0.0. The computed score is the median of the score history (padding to at least 3 values), and only when that computed score crosses the threshold is the object marked as a true positive. That happens in frame 4 in the example.

+ + + + + + + + + + + \ No newline at end of file diff --git a/configuration/index/index.html b/configuration/index/index.html new file mode 100644 index 000000000..5d0947279 --- /dev/null +++ b/configuration/index/index.html @@ -0,0 +1,32 @@ + + + + + + + +Configuration | Frigate + + + + + + + + + + + +
+

Configuration

HassOS users can manage their configuration directly in the addon Configuration tab. For other installations, the default location for the config file is /config/config.yml. This can be overridden with the CONFIG_FILE environment variable. Camera specific ffmpeg parameters are documented here.

It is recommended to start with a minimal configuration and add to it:

mqtt:
host: mqtt.server.com
cameras:
back:
ffmpeg:
inputs:
- path: rtsp://viewer:{FRIGATE_RTSP_PASSWORD}@10.0.10.10:554/cam/realmonitor?channel=1&subtype=2
roles:
- detect
- rtmp
width: 1280
height: 720
fps: 5

Required#

mqtt#

mqtt:
# Required: host name
host: mqtt.server.com
# Optional: port (default: shown below)
port: 1883
# Optional: topic prefix (default: shown below)
# WARNING: must be unique if you are running multiple instances
topic_prefix: frigate
# Optional: client id (default: shown below)
# WARNING: must be unique if you are running multiple instances
client_id: frigate
# Optional: user
user: mqtt_user
# Optional: password
# NOTE: Environment variables that begin with 'FRIGATE_' may be referenced in {}.
# eg. password: '{FRIGATE_MQTT_PASSWORD}'
password: password
# Optional: interval in seconds for publishing stats (default: shown below)
stats_interval: 60

cameras#

Each of your cameras must be configured. The following is the minimum required to register a camera in Frigate. Check the camera configuration page for a complete list of options.

cameras:
# Name of your camera
front_door:
ffmpeg:
inputs:
- path: rtsp://viewer:{FRIGATE_RTSP_PASSWORD}@10.0.10.10:554/cam/realmonitor?channel=1&subtype=2
roles:
- detect
- rtmp
width: 1280
height: 720
fps: 5

Optional#

clips#

clips:
# Optional: Maximum length of time to retain video during long events. (default: shown below)
# NOTE: If an object is being tracked for longer than this amount of time, the cache
# will begin to expire and the resulting clip will be the last x seconds of the event.
max_seconds: 300
# Optional: size of tmpfs mount to create for cache files (default: not set)
# mount -t tmpfs -o size={tmpfs_cache_size} tmpfs /tmp/cache
# Notice: If you have mounted a tmpfs volume through docker, this value should not be set in your config
tmpfs_cache_size: 256m
# Optional: Retention settings for clips (default: shown below)
retain:
# Required: Default retention days (default: shown below)
default: 10
# Optional: Per object retention days
objects:
person: 15

ffmpeg#

ffmpeg:
# Optional: global ffmpeg args (default: shown below)
global_args: -hide_banner -loglevel fatal
# Optional: global hwaccel args (default: shown below)
# NOTE: See hardware acceleration docs for your specific device
hwaccel_args: []
# Optional: global input args (default: shown below)
input_args: -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -stimeout 5000000 -use_wallclock_as_timestamps 1
# Optional: global output args
output_args:
# Optional: output args for detect streams (default: shown below)
detect: -f rawvideo -pix_fmt yuv420p
# Optional: output args for record streams (default: shown below)
record: -f segment -segment_time 60 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an
# Optional: output args for clips streams (default: shown below)
clips: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an
# Optional: output args for rtmp streams (default: shown below)
rtmp: -c copy -f flv

objects#

Can be overridden at the camera level

objects:
# Optional: list of objects to track from labelmap.txt (default: shown below)
track:
- person
# Optional: filters to reduce false positives for specific object types
filters:
person:
# Optional: minimum width*height of the bounding box for the detected object (default: 0)
min_area: 5000
# Optional: maximum width*height of the bounding box for the detected object (default: 24000000)
max_area: 100000
# Optional: minimum score for the object to initiate tracking (default: shown below)
min_score: 0.5
# Optional: minimum decimal percentage for tracked object's computed score to be considered a true positive (default: shown below)
threshold: 0.7
+ + + + + + + + + + + \ No newline at end of file diff --git a/configuration/nvdec/index.html b/configuration/nvdec/index.html new file mode 100644 index 000000000..53273cf6b --- /dev/null +++ b/configuration/nvdec/index.html @@ -0,0 +1,45 @@ + + + + + + + +nVidia hardware decoder | Frigate + + + + + + + + + + + +
+

nVidia hardware decoder

Certain nvidia cards include a hardware decoder, which can greatly improve the +performance of video decoding. In order to use NVDEC, a special build of +ffmpeg with NVDEC support is required. The special docker architecture 'amd64nvidia' +includes this support for amd64 platforms. An aarch64 for the Jetson, which +also includes NVDEC may be added in the future.

Docker setup#

Requirements#

nVidia closed source driver required to access NVDEC. +nvidia-docker required to pass NVDEC to docker.

Setting up docker-compose#

In order to pass NVDEC, the docker engine must be set to nvidia and the environment variables +NVIDIA_VISIBLE_DEVICES=all and NVIDIA_DRIVER_CAPABILITIES=compute,utility,video must be set.

In a docker compose file, these lines need to be set:

services:
frigate:
...
image: blakeblackshear/frigate:stable-amd64nvidia
runtime: nvidia
environment:
- NVIDIA_VISIBLE_DEVICES=all
- NVIDIA_DRIVER_CAPABILITIES=compute,utility,video

Setting up the configuration file#

In your frigate config.yml, you'll need to set ffmpeg to use the hardware decoder. +The decoder you choose will depend on the input video.

A list of supported codecs (you can use ffmpeg -decoders | grep cuvid in the container to get a list)

V..... h263_cuvid Nvidia CUVID H263 decoder (codec h263)
V..... h264_cuvid Nvidia CUVID H264 decoder (codec h264)
V..... hevc_cuvid Nvidia CUVID HEVC decoder (codec hevc)
V..... mjpeg_cuvid Nvidia CUVID MJPEG decoder (codec mjpeg)
V..... mpeg1_cuvid Nvidia CUVID MPEG1VIDEO decoder (codec mpeg1video)
V..... mpeg2_cuvid Nvidia CUVID MPEG2VIDEO decoder (codec mpeg2video)
V..... mpeg4_cuvid Nvidia CUVID MPEG4 decoder (codec mpeg4)
V..... vc1_cuvid Nvidia CUVID VC1 decoder (codec vc1)
V..... vp8_cuvid Nvidia CUVID VP8 decoder (codec vp8)
V..... vp9_cuvid Nvidia CUVID VP9 decoder (codec vp9)

For example, for H265 video (hevc), you'll select hevc_cuvid. Add +-c:v hevc_covid to your ffmpeg input arguments:

ffmpeg:
input_args:
...
- -c:v
- hevc_cuvid

If everything is working correctly, you should see a significant improvement in performance. +Verify that hardware decoding is working by running nvidia-smi, which should show the ffmpeg +processes:

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 455.38 Driver Version: 455.38 CUDA Version: 11.1 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 GeForce GTX 166... Off | 00000000:03:00.0 Off | N/A |
| 38% 41C P2 36W / 125W | 2082MiB / 5942MiB | 5% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| 0 N/A N/A 12737 C ffmpeg 249MiB |
| 0 N/A N/A 12751 C ffmpeg 249MiB |
| 0 N/A N/A 12772 C ffmpeg 249MiB |
| 0 N/A N/A 12775 C ffmpeg 249MiB |
| 0 N/A N/A 12800 C ffmpeg 249MiB |
| 0 N/A N/A 12811 C ffmpeg 417MiB |
| 0 N/A N/A 12827 C ffmpeg 417MiB |
+-----------------------------------------------------------------------------+

To further improve performance, you can set ffmpeg to skip frames in the output, +using the fps filter:

output_args:
- -filter:v
- fps=fps=5

This setting, for example, allows Frigate to consume my 10-15fps camera streams on +my relatively low powered Haswell machine with relatively low cpu usage.

+ + + + + + + + + + + \ No newline at end of file diff --git a/configuration/optimizing/index.html b/configuration/optimizing/index.html new file mode 100644 index 000000000..5f4d91cf3 --- /dev/null +++ b/configuration/optimizing/index.html @@ -0,0 +1,35 @@ + + + + + + + +Optimizing performance | Frigate + + + + + + + + + + + +
+

Optimizing performance

  • Google Coral: It is strongly recommended to use a Google Coral, but Frigate will fall back to CPU in the event one is not found. Offloading TensorFlow to the Google Coral is an order of magnitude faster and will reduce your CPU load dramatically. A $60 device will outperform $2000 CPU. Frigate should work with any supported Coral device from https://coral.ai
  • Resolution: For the detect input, choose a camera resolution where the smallest object you want to detect barely fits inside a 300x300px square. The model used by Frigate is trained on 300x300px images, so you will get worse performance and no improvement in accuracy by using a larger resolution since Frigate resizes the area where it is looking for objects to 300x300 anyway.
  • FPS: 5 frames per second should be adequate. Higher frame rates will require more CPU usage without improving detections or accuracy. Reducing the frame rate on your camera will have the greatest improvement on system resources.
  • Hardware Acceleration: Make sure you configure the hwaccel_args for your hardware. They provide a significant reduction in CPU usage if they are available.
  • Masks: Masks can be used to ignore motion and reduce your idle CPU load. If you have areas with regular motion such as timestamps or trees blowing in the wind, frigate will constantly try to determine if that motion is from a person or other object you are tracking. Those detections not only increase your average CPU usage, but also clog the pipeline for detecting objects elsewhere. If you are experiencing high values for detection_fps when no objects of interest are in the cameras, you should use masks to tell frigate to ignore movement from trees, bushes, timestamps, or any part of the image where detections should not be wasted looking for objects.

FFmpeg Hardware Acceleration#

Frigate works on Raspberry Pi 3b/4 and x86 machines. It is recommended to update your configuration to enable hardware accelerated decoding in ffmpeg. Depending on your system, these parameters may not be compatible.

Raspberry Pi 3/4 (32-bit OS) +NOTICE: If you are using the addon, ensure you turn off Protection mode for hardware acceleration.

ffmpeg:
hwaccel_args:
- -c:v
- h264_mmal

Raspberry Pi 3/4 (64-bit OS) +NOTICE: If you are using the addon, ensure you turn off Protection mode for hardware acceleration.

ffmpeg:
hwaccel_args:
- -c:v
- h264_v4l2m2m

Intel-based CPUs (<10th Generation) via Quicksync (https://trac.ffmpeg.org/wiki/Hardware/QuickSync)

ffmpeg:
hwaccel_args:
- -hwaccel
- vaapi
- -hwaccel_device
- /dev/dri/renderD128
- -hwaccel_output_format
- yuv420p

Intel-based CPUs (>=10th Generation) via Quicksync (https://trac.ffmpeg.org/wiki/Hardware/QuickSync)

ffmpeg:
hwaccel_args:
- -hwaccel
- qsv
- -qsv_device
- /dev/dri/renderD128

AMD/ATI GPUs (Radeon HD 2000 and newer GPUs) via libva-mesa-driver (https://trac.ffmpeg.org/wiki/Hardware/QuickSync) +Note: You also need to set LIBVA_DRIVER_NAME=radeonsi as an environment variable on the container.

ffmpeg:
hwaccel_args:
- -hwaccel
- vaapi
- -hwaccel_device
- /dev/dri/renderD128

Nvidia GPU based decoding via NVDEC is supported, but requires special configuration. See the nvidia NVDEC documentation for more details.

+ + + + + + + + + + + \ No newline at end of file diff --git a/f6d78023.cce5bb65.js b/f6d78023.cce5bb65.js new file mode 100644 index 000000000..c77e80a08 --- /dev/null +++ b/f6d78023.cce5bb65.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[21],{89: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,"toc",(function(){return l})),n.d(t,"default",(function(){return p}));var a=n(3),r=n(7),o=(n(0),n(92)),i={id:"index",title:"Configuration"},c={unversionedId:"configuration/index",id:"configuration/index",isDocsHomePage:!1,title:"Configuration",description:"HassOS users can manage their configuration directly in the addon Configuration tab. For other installations, the default location for the config file is /config/config.yml. This can be overridden with the CONFIG_FILE environment variable. Camera specific ffmpeg parameters are documented here.",source:"@site/docs/configuration/index.md",slug:"/configuration/index",permalink:"/configuration/index",editUrl:"https://github.com/blakeblackshear/frigate/edit/master/docs/docs/configuration/index.md",version:"current",sidebar:"docs",previous:{title:"Troubleshooting",permalink:"/troubleshooting"},next:{title:"Cameras",permalink:"/configuration/cameras"}},l=[{value:"Required",id:"required",children:[]},{value:"mqtt",id:"mqtt",children:[]},{value:"cameras",id:"cameras",children:[]},{value:"Optional",id:"optional",children:[{value:"clips",id:"clips",children:[]},{value:"ffmpeg",id:"ffmpeg",children:[]},{value:"objects",id:"objects",children:[]}]}],s={toc:l};function p(e){var t=e.components,n=Object(r.a)(e,["components"]);return Object(o.b)("wrapper",Object(a.a)({},s,n,{components:t,mdxType:"MDXLayout"}),Object(o.b)("p",null,"HassOS users can manage their configuration directly in the addon Configuration tab. For other installations, the default location for the config file is ",Object(o.b)("inlineCode",{parentName:"p"},"/config/config.yml"),". This can be overridden with the ",Object(o.b)("inlineCode",{parentName:"p"},"CONFIG_FILE")," environment variable. Camera specific ffmpeg parameters are documented ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"/configuration/cameras"}),"here"),"."),Object(o.b)("p",null,"It is recommended to start with a minimal configuration and add to it:"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"mqtt:\n host: mqtt.server.com\ncameras:\n back:\n ffmpeg:\n inputs:\n - path: rtsp://viewer:{FRIGATE_RTSP_PASSWORD}@10.0.10.10:554/cam/realmonitor?channel=1&subtype=2\n roles:\n - detect\n - rtmp\n width: 1280\n height: 720\n fps: 5\n")),Object(o.b)("h2",{id:"required"},"Required"),Object(o.b)("h2",{id:"mqtt"},Object(o.b)("inlineCode",{parentName:"h2"},"mqtt")),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"mqtt:\n # Required: host name\n host: mqtt.server.com\n # Optional: port (default: shown below)\n port: 1883\n # Optional: topic prefix (default: shown below)\n # WARNING: must be unique if you are running multiple instances\n topic_prefix: frigate\n # Optional: client id (default: shown below)\n # WARNING: must be unique if you are running multiple instances\n client_id: frigate\n # Optional: user\n user: mqtt_user\n # Optional: password\n # NOTE: Environment variables that begin with 'FRIGATE_' may be referenced in {}.\n # eg. password: '{FRIGATE_MQTT_PASSWORD}'\n password: password\n # Optional: interval in seconds for publishing stats (default: shown below)\n stats_interval: 60\n")),Object(o.b)("h2",{id:"cameras"},Object(o.b)("inlineCode",{parentName:"h2"},"cameras")),Object(o.b)("p",null,"Each of your cameras must be configured. The following is the minimum required to register a camera in Frigate. Check the ",Object(o.b)("a",Object(a.a)({parentName:"p"},{href:"cameras"}),"camera configuration page")," for a complete list of options."),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"cameras:\n # Name of your camera\n front_door:\n ffmpeg:\n inputs:\n - path: rtsp://viewer:{FRIGATE_RTSP_PASSWORD}@10.0.10.10:554/cam/realmonitor?channel=1&subtype=2\n roles:\n - detect\n - rtmp\n width: 1280\n height: 720\n fps: 5\n")),Object(o.b)("h2",{id:"optional"},"Optional"),Object(o.b)("h3",{id:"clips"},Object(o.b)("inlineCode",{parentName:"h3"},"clips")),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"clips:\n # Optional: Maximum length of time to retain video during long events. (default: shown below)\n # NOTE: If an object is being tracked for longer than this amount of time, the cache\n # will begin to expire and the resulting clip will be the last x seconds of the event.\n max_seconds: 300\n # Optional: size of tmpfs mount to create for cache files (default: not set)\n # mount -t tmpfs -o size={tmpfs_cache_size} tmpfs /tmp/cache\n # Notice: If you have mounted a tmpfs volume through docker, this value should not be set in your config\n tmpfs_cache_size: 256m\n # Optional: Retention settings for clips (default: shown below)\n retain:\n # Required: Default retention days (default: shown below)\n default: 10\n # Optional: Per object retention days\n objects:\n person: 15\n")),Object(o.b)("h3",{id:"ffmpeg"},Object(o.b)("inlineCode",{parentName:"h3"},"ffmpeg")),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"ffmpeg:\n # Optional: global ffmpeg args (default: shown below)\n global_args: -hide_banner -loglevel fatal\n # Optional: global hwaccel args (default: shown below)\n # NOTE: See hardware acceleration docs for your specific device\n hwaccel_args: []\n # Optional: global input args (default: shown below)\n input_args: -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -stimeout 5000000 -use_wallclock_as_timestamps 1\n # Optional: global output args\n output_args:\n # Optional: output args for detect streams (default: shown below)\n detect: -f rawvideo -pix_fmt yuv420p\n # Optional: output args for record streams (default: shown below)\n record: -f segment -segment_time 60 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an\n # Optional: output args for clips streams (default: shown below)\n clips: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an\n # Optional: output args for rtmp streams (default: shown below)\n rtmp: -c copy -f flv\n")),Object(o.b)("h3",{id:"objects"},Object(o.b)("inlineCode",{parentName:"h3"},"objects")),Object(o.b)("p",null,"Can be overridden at the camera level"),Object(o.b)("pre",null,Object(o.b)("code",Object(a.a)({parentName:"pre"},{className:"language-yaml"}),"objects:\n # Optional: list of objects to track from labelmap.txt (default: shown below)\n track:\n - person\n # Optional: filters to reduce false positives for specific object types\n filters:\n person:\n # Optional: minimum width*height of the bounding box for the detected object (default: 0)\n min_area: 5000\n # Optional: maximum width*height of the bounding box for the detected object (default: 24000000)\n max_area: 100000\n # Optional: minimum score for the object to initiate tracking (default: shown below)\n min_score: 0.5\n # Optional: minimum decimal percentage for tracked object's computed score to be considered a true positive (default: shown below)\n threshold: 0.7\n")))}p.isMDXComponent=!0},92:function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return f}));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 s=r.a.createContext({}),p=function(e){var t=r.a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):c(c({},t),e)),n},u=function(e){var t=p(e.components);return r.a.createElement(s.Provider,{value:t},e.children)},m={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,o=e.originalType,i=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),u=p(n),d=a,f=u["".concat(i,".").concat(d)]||u[d]||m[d]||o;return n?r.a.createElement(f,c(c({ref:t},s),{},{components:n})):r.a.createElement(f,c({ref:t},s))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);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 + + + + + + +Recommended hardware | Frigate + + + + + + + + + + + +
+

Recommended hardware

Cameras#

Cameras that output H.264 video and AAC audio will offer the most compatibility with all features of Frigate and HomeAssistant. It is also helpful if your camera supports multiple substreams to allow different resolutions to be used for detection, streaming, clips, and recordings without re-encoding.

Computer#

NameInference SpeedNotes
Atomic Pi16msGood option for a dedicated low power board with a small number of cameras. Can leverage Intel QuickSync for stream decoding.
Intel NUC NUC7i3BNK8-10msGreat performance. Can handle many cameras at 5fps depending on typical amounts of motion.
BMAX B2 Plus10-12msGood balance of performance and cost. Also capable of running many other services at the same time as frigate.
Minisforum GK419-10msGreat alternative to a NUC with dual Gigabit NICs. Easily handles several 1080p cameras.
Raspberry Pi 3B (32bit)60msCan handle a small number of cameras, but the detection speeds are slow due to USB 2.0.
Raspberry Pi 4 (32bit)15-20msCan handle a small number of cameras. The 2GB version runs fine.
Raspberry Pi 4 (64bit)10-15msCan handle a small number of cameras. The 2GB version runs fine.
+ + + + + + + + + + + \ No newline at end of file diff --git a/how-it-works/index.html b/how-it-works/index.html new file mode 100644 index 000000000..a30086f1b --- /dev/null +++ b/how-it-works/index.html @@ -0,0 +1,32 @@ + + + + + + + +How Frigate Works | Frigate + + + + + + + + + + + +
+

How Frigate Works

Frigate is designed to minimize resource and maximize performance by only looking for objects when and where it is necessary

Diagram

  1. Look for Motion
  2. Calculate Detection Regions
  3. Run Object Detection
+ + + + + + + + + + + \ No newline at end of file diff --git a/img/diagram.png b/img/diagram.png new file mode 100644 index 000000000..1ee8659e5 Binary files /dev/null and b/img/diagram.png differ diff --git a/img/example-mask-poly.png b/img/example-mask-poly.png new file mode 100644 index 000000000..e0e7d4906 Binary files /dev/null and b/img/example-mask-poly.png differ diff --git a/img/favicon.ico b/img/favicon.ico new file mode 100644 index 000000000..1de8ec804 Binary files /dev/null and b/img/favicon.ico differ diff --git a/img/frigate.png b/img/frigate.png new file mode 100644 index 000000000..1156bc6bd Binary files /dev/null and b/img/frigate.png differ diff --git a/img/logo-dark.svg b/img/logo-dark.svg new file mode 100644 index 000000000..16cd275c8 --- /dev/null +++ b/img/logo-dark.svg @@ -0,0 +1,3 @@ + + + diff --git a/img/logo.svg b/img/logo.svg new file mode 100644 index 000000000..3d01f2a1c --- /dev/null +++ b/img/logo.svg @@ -0,0 +1,3 @@ + + + diff --git a/img/media_browser.png b/img/media_browser.png new file mode 100644 index 000000000..9c449d05c Binary files /dev/null and b/img/media_browser.png differ diff --git a/img/notification.png b/img/notification.png new file mode 100644 index 000000000..0df060e2b Binary files /dev/null and b/img/notification.png differ diff --git a/index.html b/index.html new file mode 100644 index 000000000..077904c56 --- /dev/null +++ b/index.html @@ -0,0 +1,32 @@ + + + + + + + +Frigate | Frigate + + + + + + + + + + + +
+

Your Docusaurus site did not load properly.

A very common reason is a wrong site baseUrl configuration.

Current configured baseUrl = / (default value)

We suggest trying baseUrl =

Frigate

A complete and local NVR designed for HomeAssistant with AI object detection. Uses OpenCV and Tensorflow to perform realtime object detection locally for IP cameras.

Use of a Google Coral Accelerator is optional, but highly recommended. The Coral will outperform even the best CPUs and can process 100+ FPS with very little overhead.

  • Tight integration with HomeAssistant via a custom component
  • Designed to minimize resource use and maximize performance by only looking for objects when and where it is necessary
  • Leverages multiprocessing heavily with an emphasis on realtime over processing every frame
  • Uses a very low overhead motion detection to determine where to run object detection
  • Object detection with TensorFlow runs in separate processes for maximum FPS
  • Communicates over MQTT for easy integration into other systems
  • 24/7 recording
  • Re-streaming via RTMP to reduce the number of connections to your camera

Screenshots#

Media Browser

Notification

+ + + + + + + + + + + \ No newline at end of file diff --git a/installation/index.html b/installation/index.html new file mode 100644 index 000000000..44a3a55a3 --- /dev/null +++ b/installation/index.html @@ -0,0 +1,38 @@ + + + + + + + +Installation | Frigate + + + + + + + + + + + +
+

Installation

Frigate is a Docker container that can be run on any Docker host including as a HassOS Addon. See instructions below for installing the HassOS addon.

For HomeAssistant users, there is also a custom component (aka integration). This custom component adds tighter integration with HomeAssistant by automatically setting up camera entities, sensors, media browser for clips and recordings, and a public API to simplify notifications.

Note that HassOS Addons and custom components are different things. If you are already running Frigate with Docker directly, you do not need the Addon since the Addon would run another instance of Frigate.

HassOS Addon#

HassOS users can install via the addon repository. Frigate requires an MQTT server.

  1. Navigate to Supervisor > Add-on Store > Repositories
  2. Add https://github.com/blakeblackshear/frigate-hass-addons
  3. Setup your configuration in the Configuration tab
  4. Start the addon container

Docker#

Make sure you choose the right image for your architecture: +|Arch|Image Name| +|-|-| +|amd64|blakeblackshear/frigate:stable-amd64| +|amd64nvidia|blakeblackshear/frigate:stable-amd64nvidia| +|armv7|blakeblackshear/frigate:stable-armv7| +|aarch64|blakeblackshear/frigate:stable-aarch64|

It is recommended to run with docker-compose:

version: '3.6'
services:
frigate:
container_name: frigate
restart: unless-stopped
privileged: true
image: blakeblackshear/frigate:0.8.0-beta2-amd64
volumes:
- /dev/bus/usb:/dev/bus/usb
- /etc/localtime:/etc/localtime:ro
- <path_to_config>:/config
- <path_to_directory_for_clips>:/media/frigate/clips
- <path_to_directory_for_recordings>:/media/frigate/recordings
- type: tmpfs # Optional: 1GB of memory, reduces SSD/SD Card wear
target: /tmp/cache
tmpfs:
size: 1000000000
ports:
- '5000:5000'
- '1935:1935' # RTMP feeds
environment:
FRIGATE_RTSP_PASSWORD: 'password'

If you can't use docker compose, you can run the container with something similar to this:

docker run --rm \
--name frigate \
--privileged \
--mount type=tmpfs,target=/tmp/cache,tmpfs-size=1000000000 \
-v /dev/bus/usb:/dev/bus/usb \
-v <path_to_directory_for_clips>:/media/frigate/clips \
-v <path_to_directory_for_recordings>:/media/frigate/recordings \
-v <path_to_config>:/config:ro \
-v /etc/localtime:/etc/localtime:ro \
-e FRIGATE_RTSP_PASSWORD='password' \
-p 5000:5000 \
-p 1935:1935 \
blakeblackshear/frigate:0.8.0-beta2-amd64

Kubernetes#

Use the helm chart.

Virtualization#

For ideal performance, Frigate needs access to underlying hardware for the Coral and GPU devices for ffmpeg decoding. Running Frigate in a VM on top of Proxmox, ESXi, Virtualbox, etc. is not recommended. The virtualization layer typically introduces a sizable amount of overhead for communication with Coral devices.

Proxmox#

Some people have had success running Frigate in LXC directly with the following config:

arch: amd64
cores: 2
features: nesting=1
hostname: FrigateLXC
memory: 4096
net0: name=eth0,bridge=vmbr0,firewall=1,hwaddr=2E:76:AE:5A:58:48,ip=dhcp,ip6=auto,type=veth
ostype: debian
rootfs: local-lvm:vm-115-disk-0,size=12G
swap: 512
lxc.cgroup.devices.allow: c 189:385 rwm
lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file
lxc.mount.entry: /dev/bus/usb/004/002 dev/bus/usb/004/002 none bind,optional,create=file
lxc.apparmor.profile: unconfined
lxc.cgroup.devices.allow: a
lxc.cap.drop:

Calculating shm-size#

The default shm-size of 64m is fine for setups with 3 or less 1080p cameras. If frigate is exiting with "Bus error" messages, it could be because you have too many high resolution cameras and you need to specify a higher shm size.

You can calculate the necessary shm-size for each camera with the following formula:

(width * height * 1.5 * 7 + 270480)/1048576 = <shm size in mb>
+ + + + + + + + + + + \ No newline at end of file diff --git a/main.eeed996f.js b/main.eeed996f.js new file mode 100644 index 000000000..754be9592 --- /dev/null +++ b/main.eeed996f.js @@ -0,0 +1,2 @@ +/*! For license information please see main.eeed996f.js.LICENSE.txt */ +(window.webpackJsonp=window.webpackJsonp||[]).push([[22],[function(e,t,n){"use strict";e.exports=n(39)},function(e,t,n){e.exports=n(43)()},function(e,t,n){"use strict";n.d(t,"a",(function(){return v})),n.d(t,"b",(function(){return w})),n.d(t,"c",(function(){return T})),n.d(t,"d",(function(){return _})),n.d(t,"e",(function(){return b})),n.d(t,"f",(function(){return L})),n.d(t,"g",(function(){return j})),n.d(t,"h",(function(){return g})),n.d(t,"i",(function(){return S})),n.d(t,"j",(function(){return O})),n.d(t,"k",(function(){return M})),n.d(t,"l",(function(){return z})),n.d(t,"m",(function(){return U})),n.d(t,"n",(function(){return B})),n.d(t,"o",(function(){return D}));var r=n(4),a=n(0),i=n.n(a),o=(n(1),n(6)),l=n(20),u=n(5),s=n(3),c=n(21),f=n.n(c),d=(n(27),n(7)),p=n(33),m=n.n(p),h=function(e){var t=Object(l.a)();return t.displayName=e,t}("Router-History"),g=function(e){var t=Object(l.a)();return t.displayName=e,t}("Router"),b=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 i.a.createElement(g.Provider,{value:{history:this.props.history,location:this.state.location,match:t.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},i.a.createElement(h.Provider,{children:this.props.children||null,value:this.props.history}))},t}(i.a.Component);var v=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a=0;d--){var p=o[d];"."===p?i(o,d):".."===p?(i(o,d),f++):f&&(i(o,d),f--)}if(!s)for(;f--;f)o.unshift("..");!s||""===o[0]||o[0]&&a(o[0])||o.unshift("");var m=o.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 h(e,t,n,a){var i;"string"==typeof e?(i=function(e){var t=e||"/",n="",r="",a=t.indexOf("#");-1!==a&&(r=t.substr(a),t=t.substr(0,a));var i=t.indexOf("?");return-1!==i&&(n=t.substr(i),t=t.substr(0,i)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e)).state=t:(void 0===(i=Object(r.a)({},e)).pathname&&(i.pathname=""),i.search?"?"!==i.search.charAt(0)&&(i.search="?"+i.search):i.search="",i.hash?"#"!==i.hash.charAt(0)&&(i.hash="#"+i.hash):i.hash="",void 0!==t&&void 0===i.state&&(i.state=t));try{i.pathname=decodeURI(i.pathname)}catch(l){throw l instanceof URIError?new URIError('Pathname "'+i.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):l}return n&&(i.key=n),a?i.pathname?"/"!==i.pathname.charAt(0)&&(i.pathname=o(i.pathname,a.pathname)):i.pathname=a.pathname:i.pathname||(i.pathname="/"),i}function g(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 b(){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 i="function"==typeof e?e(t,n):e;"string"==typeof i?"function"==typeof r?r(i,a):a(!0):a(!1!==i)}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,a):n.push(a),f({action:r,location:a,index:t,entries:n})}}))},replace:function(e,t){var r="REPLACE",a=h(e,t,d(),w.location);c.confirmTransitionTo(a,r,n,(function(e){e&&(w.entries[w.index]=a,f({action:r,location:a}))}))},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){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return u}));var r=n(2),a=n(3),i=n(0),o=n.n(i);function l(e,t,n){return void 0===n&&(n=[]),e.some((function(e){var a=e.path?Object(r.j)(t,e):n.length?n[n.length-1].match:r.e.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?o.a.createElement(r.g,n,e.map((function(e,n){return o.a.createElement(r.d,{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})):o.a.createElement(e.component,Object(a.a)({},n,t,{route:e}))}})}))):null}},function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"b",(function(){return d})),n.d(t,"c",(function(){return v})),n.d(t,"e",(function(){return k}));var r=n(2);n.d(t,"d",(function(){return r.a})),n.d(t,"f",(function(){return r.b})),n.d(t,"g",(function(){return r.c})),n.d(t,"h",(function(){return r.d})),n.d(t,"i",(function(){return r.e})),n.d(t,"j",(function(){return r.f})),n.d(t,"k",(function(){return r.g})),n.d(t,"l",(function(){return r.i})),n.d(t,"m",(function(){return r.j})),n.d(t,"n",(function(){return r.k})),n.d(t,"o",(function(){return r.l})),n.d(t,"p",(function(){return r.m})),n.d(t,"q",(function(){return r.n})),n.d(t,"r",(function(){return r.o}));var a=n(4),i=n(0),o=n.n(i),l=n(6),u=(n(1),n(3)),s=n(7),c=n(5),f=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a
'};function a(e,t,n){return en?n:e}function i(e){return 100*(-1+e)}function o(e,t,n){var a;return(a="translate3d"===r.positionUsing?{transform:"translate3d("+i(e)+"%,0,0)"}:"translate"===r.positionUsing?{transform:"translate("+i(e)+"%,0)"}:{"margin-left":i(e)+"%"}).transition="all "+t+"ms "+n,a}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 i=n.render(!t),s=i.querySelector(r.barSelector),c=r.speed,f=r.easing;return i.offsetWidth,l((function(t){""===r.positionUsing&&(r.positionUsing=n.getPositioningCSS()),u(s,o(e,c,f)),1===e?(u(i,{transition:"none",opacity:1}),i.offsetWidth,setTimeout((function(){u(i,{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");c(document.documentElement,"nprogress-busy");var t=document.createElement("div");t.id="nprogress",t.innerHTML=r.template;var a,o=t.querySelector(r.barSelector),l=e?"-100":i(n.status||0),s=document.querySelector(r.parent);return u(o,{transition:"all 0 linear",transform:"translate3d("+l+"%,0,0)"}),r.showSpinner||(a=t.querySelector(r.spinnerSelector))&&p(a),s!=document.body&&c(s,"nprogress-custom-parent"),s.appendChild(t),t},n.remove=function(){f(document.documentElement,"nprogress-busy"),f(document.querySelector(r.parent),"nprogress-custom-parent");var e=document.getElementById("nprogress");e&&p(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 l=function(){var e=[];function t(){var n=e.shift();n&&n(t)}return function(n){e.push(n),1==e.length&&t()}}(),u=function(){var e=["Webkit","O","Moz","ms"],t={};function n(e){return e.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,(function(e,t){return t.toUpperCase()}))}function r(t){var n=document.body.style;if(t in n)return t;for(var r,a=e.length,i=t.charAt(0).toUpperCase()+t.slice(1);a--;)if((r=e[a]+i)in n)return r;return t}function a(e){return e=n(e),t[e]||(t[e]=r(e))}function i(e,t,n){t=a(t),e.style[t]=n}return function(e,t){var n,r,a=arguments;if(2==a.length)for(n in t)void 0!==(r=t[n])&&t.hasOwnProperty(n)&&i(e,n,r);else i(e,a[1],a[2])}}();function s(e,t){return("string"==typeof e?e:d(e)).indexOf(" "+t+" ")>=0}function c(e,t){var n=d(e),r=n+t;s(n,t)||(e.className=r.substring(1))}function f(e,t){var n,r=d(e);s(e,t)&&(n=r.replace(" "+t+" "," "),e.className=n.substring(1,n.length-1))}function d(e){return(" "+(e.className||"")+" ").replace(/\s+/gi," ")}function p(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={"./":48};function a(e){var t=i(e);return n(t)}function i(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}a.keys=function(){return Object.keys(r)},a.resolve=i,e.exports=a,a.id=18},function(e,t,n){"use strict";var r="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};function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var l=n(0),u=n(1),s=[],c=[];function f(e){var t=e(),n={loading:!0,loaded:null,error:null};return n.promise=t.then((function(e){return n.loading=!1,n.loaded=e,e})).catch((function(e){throw n.loading=!1,n.error=e,e})),n}function d(e){var t={loading:!1,loaded:{},error:null},n=[];try{Object.keys(e).forEach((function(r){var a=f(e[r]);a.loading?t.loading=!0:(t.loaded[r]=a.loaded,t.error=a.error),n.push(a.promise),a.promise.then((function(e){t.loaded[r]=e})).catch((function(e){t.error=e}))}))}catch(r){t.error=r}return t.promise=Promise.all(n).then((function(e){return t.loading=!1,e})).catch((function(e){throw t.loading=!1,e})),t}function p(e,t){return l.createElement((n=e)&&n.__esModule?n.default:n,t);var n}function m(e,t){var f,d;if(!t.loading)throw new Error("react-loadable requires a `loading` component");var m=Object.assign({loader:null,loading:null,delay:200,timeout:null,render:p,webpack:null,modules:null},t),h=null;function g(){return h||(h=e(m.loader)),h.promise}return s.push(g),"function"==typeof m.webpack&&c.push((function(){if(e=m.webpack,"object"===r(n.m)&&e().every((function(e){return void 0!==e&&void 0!==n.m[e]})))return g();var e})),d=f=function(t){function n(r){a(this,n);var o=i(this,t.call(this,r));return o.retry=function(){o.setState({error:null,loading:!0,timedOut:!1}),h=e(m.loader),o._loadModule()},g(),o.state={error:h.error,pastDelay:!1,timedOut:!1,loading:h.loading,loaded:h.loaded},o}return o(n,t),n.preload=function(){return g()},n.prototype.componentWillMount=function(){this._mounted=!0,this._loadModule()},n.prototype._loadModule=function(){var e=this;if(this.context.loadable&&Array.isArray(m.modules)&&m.modules.forEach((function(t){e.context.loadable.report(t)})),h.loading){"number"==typeof m.delay&&(0===m.delay?this.setState({pastDelay:!0}):this._delay=setTimeout((function(){e.setState({pastDelay:!0})}),m.delay)),"number"==typeof m.timeout&&(this._timeout=setTimeout((function(){e.setState({timedOut:!0})}),m.timeout));var t=function(){e._mounted&&(e.setState({error:h.error,loaded:h.loaded,loading:h.loading}),e._clearTimeouts())};h.promise.then((function(){t()})).catch((function(e){t()}))}},n.prototype.componentWillUnmount=function(){this._mounted=!1,this._clearTimeouts()},n.prototype._clearTimeouts=function(){clearTimeout(this._delay),clearTimeout(this._timeout)},n.prototype.render=function(){return this.state.loading||this.state.error?l.createElement(m.loading,{isLoading:this.state.loading,pastDelay:this.state.pastDelay,timedOut:this.state.timedOut,error:this.state.error,retry:this.retry}):this.state.loaded?m.render(this.state.loaded,this.props):null},n}(l.Component),f.contextTypes={loadable:u.shape({report:u.func.isRequired})},d}function h(e){return m(f,e)}h.Map=function(e){if("function"!=typeof e.render)throw new Error("LoadableMap requires a `render(loaded, props)` function");return m(d,e)};var g=function(e){function t(){return a(this,t),i(this,e.apply(this,arguments))}return o(t,e),t.prototype.getChildContext=function(){return{loadable:{report:this.props.report}}},t.prototype.render=function(){return l.Children.only(this.props.children)},t}(l.Component);function b(e){for(var t=[];e.length;){var n=e.pop();t.push(n())}return Promise.all(t).then((function(){if(e.length)return b(e)}))}g.propTypes={report:u.func.isRequired},g.childContextTypes={loadable:u.shape({report:u.func.isRequired}).isRequired},h.Capture=g,h.preloadAll=function(){return new Promise((function(e,t){b(s).then(e,t)}))},h.preloadReady=function(){return new Promise((function(e,t){b(c).then(e,e)}))},e.exports=h},function(e,t,n){"use strict";(function(e){var r=n(0),a=n.n(r),i=n(4),o=n(1),l=n.n(o),u=1073741823,s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e?e:{};function c(e){var t=[];return{on:function(e){t.push(e)},off:function(e){t=t.filter((function(t){return t!==e}))},get:function(){return e},set:function(n,r){e=n,t.forEach((function(t){return t(e,r)}))}}}var f=a.a.createContext||function(e,t){var n,a,o,f="__create-react-context-"+((s[o="__global_unique_id__"]=(s[o]||0)+1)+"__"),d=function(e){function n(){var t;return(t=e.apply(this,arguments)||this).emitter=c(t.props.value),t}Object(i.a)(n,e);var r=n.prototype;return r.getChildContext=function(){var e;return(e={})[f]=this.emitter,e},r.componentWillReceiveProps=function(e){if(this.props.value!==e.value){var n,r=this.props.value,a=e.value;((i=r)===(o=a)?0!==i||1/i==1/o:i!=i&&o!=o)?n=0:(n="function"==typeof t?t(r,a):u,0!==(n|=0)&&this.emitter.set(e.value,n))}var i,o},r.render=function(){return this.props.children},n}(r.Component);d.childContextTypes=((n={})[f]=l.a.object.isRequired,n);var p=function(t){function n(){var e;return(e=t.apply(this,arguments)||this).state={value:e.getValue()},e.onUpdate=function(t,n){0!=((0|e.observedBits)&n)&&e.setState({value:e.getValue()})},e}Object(i.a)(n,t);var r=n.prototype;return r.componentWillReceiveProps=function(e){var t=e.observedBits;this.observedBits=null==t?u:t},r.componentDidMount=function(){this.context[f]&&this.context[f].on(this.onUpdate);var e=this.props.observedBits;this.observedBits=null==e?u:e},r.componentWillUnmount=function(){this.context[f]&&this.context[f].off(this.onUpdate)},r.getValue=function(){return this.context[f]?this.context[f].get():e},r.render=function(){return(e=this.props.children,Array.isArray(e)?e[0]:e)(this.state.value);var e},n}(r.Component);return p.contextTypes=((a={})[f]=l.a.object,a),{Provider:d,Consumer:p}};t.a=f}).call(this,n(26))},function(e,t,n){var r=n(45);e.exports=p,e.exports.parse=i,e.exports.compile=function(e,t){return l(i(e,t),t)},e.exports.tokensToFunction=l,e.exports.tokensToRegExp=d;var a=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function i(e,t){for(var n,r=[],i=0,o=0,l="",c=t&&t.delimiter||"/";null!=(n=a.exec(e));){var f=n[0],d=n[1],p=n.index;if(l+=e.slice(o,p),o=p+f.length,d)l+=d[1];else{var m=e[o],h=n[2],g=n[3],b=n[4],v=n[5],y=n[6],w=n[7];l&&(r.push(l),l="");var k=null!=h&&null!=m&&m!==h,E="+"===y||"*"===y,S="?"===y||"*"===y,T=n[2]||c,x=b||v;r.push({name:g||i++,prefix:h||"",delimiter:T,optional:S,repeat:E,partial:k,asterisk:!!w,pattern:x?s(x):w?".*":"[^"+u(T)+"]+?"})}}return oe.length)return;if(!(k instanceof u)){if(h&&y!=t.length-1){if(d.lastIndex=w,!(O=d.exec(e)))break;for(var E=O.index+(m?O[1].length:0),S=O.index+O[0].length,T=y,x=w,C=t.length;T=(x+=t[T].length)&&(++y,w=x);if(t[y]instanceof u)continue;_=T-y,k=e.slice(w,x),O.index-=w}else{d.lastIndex=0;var O=d.exec(k),_=1}if(O){m&&(g=O[1]?O[1].length:0),S=(E=O.index+g)+(O=O[0].slice(g)).length;var A=k.slice(0,E),P=k.slice(S),R=[y,_];A&&(++y,w+=A.length,R.push(A));var N=new u(s,p?a.tokenize(O,p):O,b,O,h);if(R.push(N),P&&R.push(P),Array.prototype.splice.apply(t,R),1!=_&&a.matchGrammar(e,t,n,y,w,!0,s),o)break}else if(o)break}}}}},hooks:{add:function(){}},tokenize:function(e,t,n){var r=[e],i=t.rest;if(i){for(var o in i)t[o]=i[o];delete t.rest}return a.matchGrammar(e,r,t,0,0,!1),r}},(i=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 i.stringify(n,t,e)})).join("");var r={type:e.type,content:i.stringify(e.content,t,n),tag:"span",classes:["token",e.type],attributes:{},language:t,parent:n};if(e.alias){var o="Array"===a.util.type(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(r.classes,o)}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);o.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},o.languages.markup.tag.inside["attr-value"].inside.entity=o.languages.markup.entity,o.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))})),Object.defineProperty(o.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^$)/i,lookbehind:!0,inside:o.languages[t]},n.cdata=/^$/i;var r={"included-cdata":{pattern://i,inside:n}};r["language-"+t]={pattern:/[\s\S]+/,inside:o.languages[t]};var a={};a[e]={pattern:RegExp(/(<__[\s\S]*?>)(?:\s*|[\s\S])*?(?=<\/__>)/.source.replace(/__/g,e),"i"),lookbehind:!0,greedy:!0,inside:r},o.languages.insertBefore("markup","cdata",a)}}),o.languages.xml=o.languages.extend("markup",{}),o.languages.html=o.languages.markup,o.languages.mathml=o.languages.markup,o.languages.svg=o.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,i=0;i=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/},o.languages.c=o.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}),o.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 o.languages.c.boolean,o.languages.cpp=o.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/}),o.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))}(o),o.languages.css.selector={pattern:o.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:/[()]/}},o.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*/i,lookbehind:!0}}),o.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.]+/}),o.languages.javascript=o.languages.extend("clike",{"class-name":[o.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}/}),o.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,o.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:o.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:o.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:o.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:o.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),o.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:o.languages.javascript}},string:/[\s\S]+/}}}),o.languages.markup&&o.languages.markup.tag.addInlined("script","javascript"),o.languages.js=o.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=[],i=0;i0&&a[a.length-1].tagName===n(o.content[0].content[1])&&a.pop():"/>"===o.content[o.content.length-1].content||a.push({tagName:n(o.content[0].content[1]),openedBraces:0}):a.length>0&&"punctuation"===o.type&&"{"===o.content?a[a.length-1].openedBraces++:a.length>0&&a[a.length-1].openedBraces>0&&"punctuation"===o.type&&"}"===o.content?a[a.length-1].openedBraces--:l=!0),(l||"string"==typeof o)&&a.length>0&&0===a[a.length-1].openedBraces){var u=n(o);i0&&("string"==typeof t[i-1]||"plain-text"===t[i-1].type)&&(u=n(t[i-1])+u,t.splice(i-1,1),i--),t[i]=new e.Token("plain-text",u,null,u)}o.content&&"string"!=typeof o.content&&r(o.content)}};e.hooks.add("after-tokenize",(function(e){"jsx"!==e.language&&"tsx"!==e.language||r(e.tokens)}))}(o),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="doc-comment",a=e.languages[t];if(a){var i=a[r];if(!i){var o={"doc-comment":{pattern:/(^|[^\\])\/\*\*[^/][\s\S]*?(?:\*\/|$)/,alias:"comment"}};i=(a=e.languages.insertBefore(t,"comment",o))[r]}if(i instanceof RegExp&&(i=a[r]={pattern:i}),Array.isArray(i))for(var l=0,u=i.length;l>>?=?|->|([-+&|])\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:/[?&|]/}}})}(o),function(e){function t(e,t){return"___"+e.toUpperCase()+t+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(n,r,a,i){if(n.language===r){var o=n.tokenStack=[];n.code=n.code.replace(a,(function(e){if("function"==typeof i&&!i(e))return e;for(var a,l=o.length;-1!==n.code.indexOf(a=t(r,l));)++l;return o[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,i=Object.keys(n.tokenStack);!function o(l){for(var u=0;u=i.length);u++){var s=l[u];if("string"==typeof s||s.content&&"string"==typeof s.content){var c=i[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 h=d.substring(0,m),g=new e.Token(r,e.tokenize(f,n.grammar),"language-"+r,f),b=d.substring(m+p.length),v=[];h&&v.push.apply(v,o([h])),v.push(g),b&&v.push.apply(v,o([b])),"string"==typeof s?l.splice.apply(l,[u,1].concat(v)):s.content=v}}else s.content&&o(s.content)}return l}(n.tokens)}}}})}(o),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")}))}(o),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)}(o),o.languages.actionscript=o.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:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<>?>?|[!=]=?)=?|[~?@]/}),o.languages.actionscript["class-name"].alias="function",o.languages.markup&&o.languages.insertBefore("actionscript","string",{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,lookbehind:!0,inside:{rest:o.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}(o),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})}(o),o.languages.n4js=o.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/}),o.languages.insertBefore("n4js","constant",{annotation:{pattern:/@+\w+/,alias:"operator"}}),o.languages.n4jsd=o.languages.n4js,o.languages.typescript=o.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/}),o.languages.ts=o.languages.typescript,function(e){var t=e.languages.javascript["template-string"],n=t.pattern.source,r=t.inside.interpolation,a=r.inside["interpolation-punctuation"],i=r.pattern.source;function o(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 i=e.tokenize(t,n);if(3===i.length){var o=[1,1];o.push.apply(o,u(i[1],e.languages.javascript,"javascript")),i.splice.apply(i,o)}return new e.Token("interpolation",i,r.alias,t)}function c(t,n,r){var a=e.tokenize(t,{interpolation:{pattern:RegExp(i),lookbehind:!0}}),o=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(o++,r)););return c[n]=a,n})).join(""),n,r),d=Object.keys(c);return o=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[o],i="string"==typeof r?r:r.content,l=i.indexOf(a);if(-1!==l){++o;var u=i.substring(0,l),f=s(c[a]),p=i.substring(l+a.length),m=[];if(u&&m.push(u),m.push(f),p){var h=[p];e(h),m.push.apply(m,h)}"string"==typeof r?(t.splice.apply(t,[n,1].concat(m)),n+=m.length-1):r.content=m}}else{var g=r.content;Array.isArray(g)?e(g):e([g])}}}(f),new e.Token(r,f,"language-"+r,t)}e.languages.javascript["template-string"]=[o("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),o("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),o("svg",/\bsvg/.source),o("markdown",/\b(?:md|markdown)/.source),o("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),i=/\|?[ \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+i+"(?:"+a+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+a+i+")(?:"+a+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+a+")"+i+"$"),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})}(o),o.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},o.languages.go=o.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 o.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")}))}(o),o.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"}},o.languages.less=o.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:/[+\-*\/]/}),o.languages.insertBefore("less","property",{variable:[{pattern:/@[\w-]+\s*:/,inside:{punctuation:/:/}},/@@?[\w-]+/],"mixin-usage":{pattern:/([{;]\s*)[.#](?!\d)[\w-]+.*?(?=[(;])/,lookbehind:!0,alias:"function"}}),o.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:/[:;(){}]/},o.languages.objectivec=o.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 o.languages.objectivec["class-name"],o.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:/[(){}\[\]|_.,:;]/},o.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:/[{}[\];(),.:]/},o.languages.python["string-interpolation"].inside.interpolation.inside.rest=o.languages.python,o.languages.py=o.languages.python,o.languages.reason=o.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/}),o.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 o.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}})}(o),o.languages.scss=o.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]+\}/}}}),o.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}]}),o.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),o.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}}),o.languages.scss.atrule.inside.rest=o.languages.scss,o.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:/[{}()\[\];:.]/}}(o);var l=o.util.clone(o.languages.typescript);o.languages.tsx=o.languages.extend("jsx",l),o.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:/[()]/},o.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:/---|[:[\]{}\-,|>?]|\.\.\./},o.languages.yml=o.languages.yaml,t.a=o},function(e,t,n){"use strict";var r=n(0),a=n.n(r),i=n(34);t.a=function(e){return a.a.createElement(i.a,Object.assign({},e))}},function(e,t,n){"use strict";var r=n(8);t.a=r.b},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";e.exports=n(46)},function(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(40)},function(e){e.exports=JSON.parse('{"docusaurus-plugin-content-docs":{"default":{"path":"/","versions":[{"name":"current","label":"Next","isLast":true,"path":"/","mainDocId":"index","docs":[{"id":"configuration/advanced","path":"/configuration/advanced","sidebar":"docs"},{"id":"configuration/cameras","path":"/configuration/cameras","sidebar":"docs"},{"id":"configuration/detectors","path":"/configuration/detectors","sidebar":"docs"},{"id":"configuration/false_positives","path":"/configuration/false_positives","sidebar":"docs"},{"id":"configuration/index","path":"/configuration/index","sidebar":"docs"},{"id":"configuration/nvdec","path":"/configuration/nvdec"},{"id":"configuration/optimizing","path":"/configuration/optimizing","sidebar":"docs"},{"id":"hardware","path":"/hardware","sidebar":"docs"},{"id":"how-it-works","path":"/how-it-works","sidebar":"docs"},{"id":"index","path":"/","sidebar":"docs"},{"id":"installation","path":"/installation","sidebar":"docs"},{"id":"mdx","path":"/mdx"},{"id":"troubleshooting","path":"/troubleshooting","sidebar":"docs"},{"id":"usage/api","path":"/usage/api","sidebar":"docs"},{"id":"usage/home-assistant","path":"/usage/home-assistant","sidebar":"docs"},{"id":"usage/mqtt","path":"/usage/mqtt","sidebar":"docs"},{"id":"usage/web","path":"/usage/web","sidebar":"docs"}]}]}}}')},function(e){e.exports=JSON.parse('{"defaultLocale":"en","locales":["en"],"localeConfigs":{"en":{"label":"en"}},"currentLocale":"en"}')},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse('{"docusaurusVersion":"2.0.0-alpha.70","siteVersion":"0.0.0","pluginVersions":{"docusaurus-plugin-content-docs":{"type":"package","name":"@docusaurus/plugin-content-docs","version":"2.0.0-alpha.70"},"docusaurus-plugin-content-blog":{"type":"package","name":"@docusaurus/plugin-content-blog","version":"2.0.0-alpha.70"},"docusaurus-plugin-content-pages":{"type":"package","name":"@docusaurus/plugin-content-pages","version":"2.0.0-alpha.70"},"docusaurus-plugin-sitemap":{"type":"package","name":"@docusaurus/plugin-sitemap","version":"2.0.0-alpha.70"},"docusaurus-theme-classic":{"type":"package","name":"@docusaurus/theme-classic","version":"2.0.0-alpha.70"}}}')},function(e,t,n){"use strict";var r=n(27),a={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},l={};function u(e){return r.isMemo(e)?o:l[e.$$typeof]||a}l[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},l[r.Memo]=o;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 o=c(n);f&&(o=o.concat(f(n)));for(var l=u(t),h=u(n),g=0;g=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},W=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},V=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return!1===t?String(e):String(e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")},K=function(e){var t=Z(e,w.TITLE),n=Z(e,F);if(n&&t)return n.replace(/%s/g,(function(){return Array.isArray(t)?t.join(""):t}));var r=Z(e,I);return t||r||void 0},Q=function(e){return Z(e,D)||function(){}},Y=function(e,t){return t.filter((function(t){return void 0!==t[e]})).map((function(t){return t[e]})).reduce((function(e,t){return H({},e,t)}),{})},X=function(e,t){return t.filter((function(e){return void 0!==e[w.BASE]})).map((function(e){return e[w.BASE]})).reverse().reduce((function(t,n){if(!t.length)for(var r=Object.keys(n),a=0;a=0;n--){var r=e[n];if(r.hasOwnProperty(t))return r[t]}return null},ee=(r=Date.now(),function(e){var t=Date.now();t-r>16?(r=t,e(t)):setTimeout((function(){ee(e)}),0)}),te=function(e){return clearTimeout(e)},ne="undefined"!=typeof window?window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||ee:e.requestAnimationFrame||ee,re="undefined"!=typeof window?window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||te:e.cancelAnimationFrame||te,ae=function(e){return console&&"function"==typeof console.warn&&console.warn(e)},ie=null,oe=function(e,t){var n=e.baseTag,r=e.bodyAttributes,a=e.htmlAttributes,i=e.linkTags,o=e.metaTags,l=e.noscriptTags,u=e.onChangeClientState,s=e.scriptTags,c=e.styleTags,f=e.title,d=e.titleAttributes;se(w.BODY,r),se(w.HTML,a),ue(f,d);var p={baseTag:ce(w.BASE,n),linkTags:ce(w.LINK,i),metaTags:ce(w.META,o),noscriptTags:ce(w.NOSCRIPT,l),scriptTags:ce(w.SCRIPT,s),styleTags:ce(w.STYLE,c)},m={},h={};Object.keys(p).forEach((function(e){var t=p[e],n=t.newTags,r=t.oldTags;n.length&&(m[e]=n),r.length&&(h[e]=p[e].oldTags)})),t&&t(),u(e,m,h)},le=function(e){return Array.isArray(e)?e.join(""):e},ue=function(e,t){void 0!==e&&document.title!==e&&(document.title=le(e)),se(w.TITLE,t)},se=function(e,t){var n=document.getElementsByTagName(e)[0];if(n){for(var r=n.getAttribute(U),a=r?r.split(","):[],i=[].concat(a),o=Object.keys(t),l=0;l=0;f--)n.removeAttribute(i[f]);a.length===i.length?n.removeAttribute(U):n.getAttribute(U)!==o.join(",")&&n.setAttribute(U,o.join(","))}},ce=function(e,t){var n=document.head||document.querySelector(w.HEAD),r=n.querySelectorAll(e+"["+"data-react-helmet]"),a=Array.prototype.slice.call(r),i=[],o=void 0;return t&&t.length&&t.forEach((function(t){var n=document.createElement(e);for(var r in t)if(t.hasOwnProperty(r))if(r===x)n.innerHTML=t.innerHTML;else if(r===E)n.styleSheet?n.styleSheet.cssText=t.cssText:n.appendChild(document.createTextNode(t.cssText));else{var l=void 0===t[r]?"":t[r];n.setAttribute(r,l)}n.setAttribute(U,"true"),a.some((function(e,t){return o=t,n.isEqualNode(e)}))?a.splice(o,1):i.push(n)})),a.forEach((function(e){return e.parentNode.removeChild(e)})),i.forEach((function(e){return n.appendChild(e)})),{oldTags:a,newTags:i}},fe=function(e){return Object.keys(e).reduce((function(t,n){var r=void 0!==e[n]?n+'="'+e[n]+'"':""+n;return t?t+" "+r:r}),"")},de=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(e).reduce((function(t,n){return t[N[n]||n]=e[n],t}),t)},pe=function(e,t,n){switch(e){case w.TITLE:return{toComponent:function(){return e=t.title,n=t.titleAttributes,(r={key:e})[U]=!0,a=de(n,r),[m.a.createElement(w.TITLE,a,e)];var e,n,r,a},toString:function(){return function(e,t,n,r){var a=fe(n),i=le(t);return a?"<"+e+' data-react-helmet="true" '+a+">"+V(i,r)+"":"<"+e+' data-react-helmet="true">'+V(i,r)+""}(e,t.title,t.titleAttributes,n)}};case b:case v:return{toComponent:function(){return de(t)},toString:function(){return fe(t)}};default:return{toComponent:function(){return function(e,t){return t.map((function(t,n){var r,a=((r={key:n})[U]=!0,r);return Object.keys(t).forEach((function(e){var n=N[e]||e;if(n===x||n===E){var r=t.innerHTML||t.cssText;a.dangerouslySetInnerHTML={__html:r}}else a[n]=t[e]})),m.a.createElement(e,a)}))}(e,t)},toString:function(){return function(e,t,n){return t.reduce((function(t,r){var a=Object.keys(r).filter((function(e){return!(e===x||e===E)})).reduce((function(e,t){var a=void 0===r[t]?t:t+'="'+V(r[t],n)+'"';return e?e+" "+a:a}),""),i=r.innerHTML||r.cssText||"",o=-1===z.indexOf(e);return t+"<"+e+' data-react-helmet="true" '+a+(o?"/>":">"+i+"")}),"")}(e,t,n)}}}},me=function(e){var t=e.baseTag,n=e.bodyAttributes,r=e.encode,a=e.htmlAttributes,i=e.linkTags,o=e.metaTags,l=e.noscriptTags,u=e.scriptTags,s=e.styleTags,c=e.title,f=void 0===c?"":c,d=e.titleAttributes;return{base:pe(w.BASE,t,r),bodyAttributes:pe(b,n,r),htmlAttributes:pe(v,a,r),link:pe(w.LINK,i,r),meta:pe(w.META,o,r),noscript:pe(w.NOSCRIPT,l,r),script:pe(w.SCRIPT,u,r),style:pe(w.STYLE,s,r),title:pe(w.TITLE,{title:f,titleAttributes:d},r)}},he=c()((function(e){return{baseTag:X([S,R],e),bodyAttributes:Y(b,e),defer:Z(e,L),encode:Z(e,j),htmlAttributes:Y(v,e),linkTags:J(w.LINK,[A,S],e),metaTags:J(w.META,[O,k,T,_,C],e),noscriptTags:J(w.NOSCRIPT,[x],e),onChangeClientState:Q(e),scriptTags:J(w.SCRIPT,[P,x],e),styleTags:J(w.STYLE,[E],e),title:K(e),titleAttributes:Y(y,e)}}),(function(e){ie&&re(ie),e.defer?ie=ne((function(){oe(e,(function(){ie=null}))})):(oe(e),ie=null)}),me)((function(){return null})),ge=(a=he,o=i=function(e){function t(){return $(this,t),W(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.shouldComponentUpdate=function(e){return!d()(this.props,e)},t.prototype.mapNestedChildrenToProps=function(e,t){if(!t)return null;switch(e.type){case w.SCRIPT:case w.NOSCRIPT:return{innerHTML:t};case w.STYLE:return{cssText:t}}throw new Error("<"+e.type+" /> elements are self-closing and can not contain children. Refer to our API for more information.")},t.prototype.flattenArrayTypeChildren=function(e){var t,n=e.child,r=e.arrayTypeChildren,a=e.newChildProps,i=e.nestedChildren;return H({},r,((t={})[n.type]=[].concat(r[n.type]||[],[H({},a,this.mapNestedChildrenToProps(n,i))]),t))},t.prototype.mapObjectTypeChildren=function(e){var t,n,r=e.child,a=e.newProps,i=e.newChildProps,o=e.nestedChildren;switch(r.type){case w.TITLE:return H({},a,((t={})[r.type]=o,t.titleAttributes=H({},i),t));case w.BODY:return H({},a,{bodyAttributes:H({},i)});case w.HTML:return H({},a,{htmlAttributes:H({},i)})}return H({},a,((n={})[r.type]=H({},i),n))},t.prototype.mapArrayTypeChildrenToProps=function(e,t){var n=H({},t);return Object.keys(e).forEach((function(t){var r;n=H({},n,((r={})[t]=e[t],r))})),n},t.prototype.warnOnInvalidChildren=function(e,t){return!0},t.prototype.mapChildrenToProps=function(e,t){var n=this,r={};return m.a.Children.forEach(e,(function(e){if(e&&e.props){var a=e.props,i=a.children,o=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(e).reduce((function(t,n){return t[M[n]||n]=e[n],t}),t)}(G(a,["children"]));switch(n.warnOnInvalidChildren(e,i),e.type){case w.LINK:case w.META:case w.NOSCRIPT:case w.SCRIPT:case w.STYLE:r=n.flattenArrayTypeChildren({child:e,arrayTypeChildren:r,newChildProps:o,nestedChildren:i});break;default:t=n.mapObjectTypeChildren({child:e,newProps:t,newChildProps:o,nestedChildren:i})}}})),t=this.mapArrayTypeChildrenToProps(r,t)},t.prototype.render=function(){var e=this.props,t=e.children,n=G(e,["children"]),r=H({},n);return t&&(r=this.mapChildrenToProps(t,r)),m.a.createElement(a,r)},q(t,null,[{key:"canUseDOM",set:function(e){a.canUseDOM=e}}]),t}(m.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=a.peek,i.rewind=function(){var e=a.rewind();return e||(e=me({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}})),e},o);ge.renderStatic=ge.rewind}).call(this,n(26))},function(e,t,n){"use strict";var r,a=n(0),i=(r=a)&&"object"==typeof r&&"default"in r?r.default: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}var l=!("undefined"==typeof window||!window.document||!window.document.createElement);e.exports=function(e,t,n){if("function"!=typeof e)throw new Error("Expected reducePropsToState to be a function.");if("function"!=typeof t)throw new Error("Expected handleStateChangeOnClient to be a function.");if(void 0!==n&&"function"!=typeof n)throw new Error("Expected mapStateOnServer to either be undefined or a function.");return function(r){if("function"!=typeof r)throw new Error("Expected WrappedComponent to be a React component.");var u,s=[];function c(){u=e(s.map((function(e){return e.props}))),f.canUseDOM?t(u):n&&(u=n(u))}var f=function(e){var t,n;function a(){return e.apply(this,arguments)||this}n=e,(t=a).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,a.peek=function(){return u},a.rewind=function(){if(a.canUseDOM)throw new Error("You may only call rewind() on the server. Call peek() to read the current state.");var e=u;return u=void 0,s=[],e};var o=a.prototype;return o.UNSAFE_componentWillMount=function(){s.push(this),c()},o.componentDidUpdate=function(){c()},o.componentWillUnmount=function(){var e=s.indexOf(this);s.splice(e,1),c()},o.render=function(){return i.createElement(r,this.props)},a}(a.PureComponent);return o(f,"displayName","SideEffect("+function(e){return e.displayName||e.name||"Component"}(r)+")"),o(f,"canUseDOM",l),f}}},function(e,t){var n="undefined"!=typeof Element,r="function"==typeof Map,a="function"==typeof Set,i="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;function o(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor!==t.constructor)return!1;var l,u,s,c;if(Array.isArray(e)){if((l=e.length)!=t.length)return!1;for(u=l;0!=u--;)if(!o(e[u],t[u]))return!1;return!0}if(r&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(c=e.entries();!(u=c.next()).done;)if(!t.has(u.value[0]))return!1;for(c=e.entries();!(u=c.next()).done;)if(!o(u.value[1],t.get(u.value[0])))return!1;return!0}if(a&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(c=e.entries();!(u=c.next()).done;)if(!t.has(u.value[0]))return!1;return!0}if(i&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if((l=e.length)!=t.length)return!1;for(u=l;0!=u--;)if(e[u]!==t[u])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if((l=(s=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(u=l;0!=u--;)if(!Object.prototype.hasOwnProperty.call(t,s[u]))return!1;if(n&&e instanceof Element)return!1;for(u=l;0!=u--;)if(("_owner"!==s[u]&&"__v"!==s[u]&&"__o"!==s[u]||!e.$$typeof)&&!o(e[s[u]],t[s[u]]))return!1;return!0}return e!=e&&t!=t}e.exports=function(e,t){try{return o(e,t)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}}},,function(e,t,n){e.exports=n(53)},function(e,t,n){"use strict";var r=n(11),a="function"==typeof Symbol&&Symbol.for,i=a?Symbol.for("react.element"):60103,o=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,h=a?Symbol.for("react.lazy"):60116,g="function"==typeof Symbol&&Symbol.iterator;function b(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;nP.length&&P.push(e)}function I(e,t,n,r){var a=typeof e;"undefined"!==a&&"boolean"!==a||(e=null);var l=!1;if(null===e)l=!0;else switch(a){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case i:case o:l=!0}}if(l)return n(r,e,""===t?"."+j(e,0):t),1;if(l=0,t=""===t?".":t+":",Array.isArray(e))for(var u=0;u