diff --git a/404.html b/404.html index 32713586..66a76cfb 100644 --- a/404.html +++ b/404.html @@ -5,13 +5,13 @@ 找不到页面 | Cocos Enhance Kit - - + +
-
跳到主要内容

找不到页面

我们找不到您要找的页面。

请联系原始链接来源网站的所有者,并告知他们链接已损坏。

- - +
跳到主要内容

找不到页面

我们找不到您要找的页面。

请联系原始链接来源网站的所有者,并告知他们链接已损坏。

+ + \ No newline at end of file diff --git a/assets/images/after-baking-c51a2a28fa45d7143bcc44e6e6c2f5ea.png b/assets/images/after-baking-c51a2a28fa45d7143bcc44e6e6c2f5ea.png new file mode 100644 index 00000000..db53c747 Binary files /dev/null and b/assets/images/after-baking-c51a2a28fa45d7143bcc44e6e6c2f5ea.png differ diff --git a/assets/images/before-baking-c6759f737a1faec7971ec238b287eb60.png b/assets/images/before-baking-c6759f737a1faec7971ec238b287eb60.png new file mode 100644 index 00000000..7748c7e4 Binary files /dev/null and b/assets/images/before-baking-c6759f737a1faec7971ec238b287eb60.png differ diff --git a/assets/images/demo6-56d57634201f968039d2b7a3d76a8269.png b/assets/images/demo6-56d57634201f968039d2b7a3d76a8269.png new file mode 100644 index 00000000..ea629359 Binary files /dev/null and b/assets/images/demo6-56d57634201f968039d2b7a3d76a8269.png differ diff --git a/assets/js/04fcc56a.c62aa996.js b/assets/js/04fcc56a.c62aa996.js new file mode 100644 index 00000000..d9249e93 --- /dev/null +++ b/assets/js/04fcc56a.c62aa996.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8511],{3905:function(e,r,t){t.d(r,{Zo:function(){return c},kt:function(){return m}});var n=t(67294);function a(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function o(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function i(e){for(var r=1;r=0||(a[t]=e[t]);return a}(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var u=n.createContext({}),p=function(e){var r=n.useContext(u),t=r;return e&&(t="function"==typeof e?e(r):i(i({},r),e)),t},c=function(e){var r=p(e.components);return n.createElement(u.Provider,{value:r},e.children)},s={inlineCode:"code",wrapper:function(e){var r=e.children;return n.createElement(n.Fragment,{},r)}},f=n.forwardRef((function(e,r){var t=e.components,a=e.mdxType,o=e.originalType,u=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),f=p(t),m=a,d=f["".concat(u,".").concat(m)]||f[m]||s[m]||o;return t?n.createElement(d,i(i({ref:r},c),{},{components:t})):n.createElement(d,i({ref:r},c))}));function m(e,r){var t=arguments,a=r&&r.mdxType;if("string"==typeof e||a){var o=t.length,i=new Array(o);i[0]=f;var l={};for(var u in r)hasOwnProperty.call(r,u)&&(l[u]=r[u]);l.originalType=e,l.mdxType="string"==typeof e?e:a,i[1]=l;for(var p=2;p=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 i=o.createContext({}),s=function(e){var t=o.useContext(i),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},u=function(e){var t=s(e.components);return o.createElement(i.Provider,{value:t},e.children)},c={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},d=o.forwardRef((function(e,t){var n=e.components,r=e.mdxType,a=e.originalType,i=e.parentName,u=p(e,["components","mdxType","originalType","parentName"]),d=s(n),m=r,k=d["".concat(i,".").concat(m)]||d[m]||c[m]||a;return n?o.createElement(k,l(l({ref:t},u),{},{components:n})):o.createElement(k,l({ref:t},u))}));function m(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var a=n.length,l=new Array(a);l[0]=d;var p={};for(var i in t)hasOwnProperty.call(t,i)&&(p[i]=t[i]);p.originalType=e,p.mdxType="string"==typeof e?e:r,l[1]=p;for(var s=2;s {\n const { protocol } = await import("./proto");\n webSocket.send(protocol.LoginRequest.encode(obj));\n });\n}\n')),(0,a.kt)("p",null,"\u6700\u540e\uff0c\u6211\u4eec\u5904\u7406 long \u5e93\uff0c\u8fd9\u662f protobufjs \u4f9d\u8d56\u7684\u5927\u6570\u5e93\u3002"),(0,a.kt)("p",null,"\u6240\u5e78 long \u5e93\u7684\u7f16\u5199\u6bd4\u8f83\u73b0\u4ee3\u5316\uff0c\u6211\u4eec\u53ef\u4ee5\u76f4\u63a5\u5c06 ",(0,a.kt)("inlineCode",{parentName:"p"},"node_modules/long/index.js")," \u6587\u4ef6\u590d\u5236\u4e00\u4efd\u5230 worker \u76ee\u5f55\u4e2d\uff0c\u5e76\u91cd\u547d\u540d\u4e3a ",(0,a.kt)("inlineCode",{parentName:"p"},"long.js"),"\u3002"),(0,a.kt)("p",null,"\u7136\u540e\u5728 ",(0,a.kt)("inlineCode",{parentName:"p"},"protobuf.js")," \u6587\u4ef6\u4e2d\u627e\u5230 ",(0,a.kt)("inlineCode",{parentName:"p"},'inquire("long")'),"\uff0c\u6539\u4e3a ",(0,a.kt)("inlineCode",{parentName:"p"},'inquire("./long.js")'),"\uff0c\u5373\u53ef\u5b8c\u6210\u4fee\u6539\u6b63\u5e38\u5bfc\u5165\u3002"))}m.isMDXComponent=!0},84840:function(e,t,n){t.Z=n.p+"assets/images/th-a-43ba586902b19815b61b8cce0f86cc79.png"},64971:function(e,t,n){t.Z=n.p+"assets/images/th-b-05ee80487105c3238cd150edd0223719.png"}}]); \ No newline at end of file diff --git a/assets/js/06e8f709.03407f74.js b/assets/js/06e8f709.03407f74.js deleted file mode 100644 index 550c02b3..00000000 --- a/assets/js/06e8f709.03407f74.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5566],{3905:function(e,t,n){n.d(t,{Zo:function(){return c},kt:function(){return d}});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var u=r.createContext({}),p=function(e){var t=r.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},c=function(e){var t=p(e.components);return r.createElement(u.Provider,{value:t},e.children)},s={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},k=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,l=e.originalType,u=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),k=p(n),d=a,m=k["".concat(u,".").concat(d)]||k[d]||s[d]||l;return n?r.createElement(m,i(i({ref:t},c),{},{components:n})):r.createElement(m,i({ref:t},c))}));function d(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var l=n.length,i=new Array(l);i[0]=k;var o={};for(var u in t)hasOwnProperty.call(t,u)&&(o[u]=t[u]);o.originalType=e,o.mdxType="string"==typeof e?e:a,i[1]=o;for(var p=2;p=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var u=r.createContext({}),p=function(e){var t=r.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},c=function(e){var t=p(e.components);return r.createElement(u.Provider,{value:t},e.children)},s={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},k=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,l=e.originalType,u=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),k=p(n),d=a,m=k["".concat(u,".").concat(d)]||k[d]||s[d]||l;return n?r.createElement(m,i(i({ref:t},c),{},{components:n})):r.createElement(m,i({ref:t},c))}));function d(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var l=n.length,i=new Array(l);i[0]=k;var o={};for(var u in t)hasOwnProperty.call(t,u)&&(o[u]=t[u]);o.originalType=e,o.mdxType="string"==typeof e?e:a,i[1]=o;for(var p=2;p=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var c=a.createContext({}),p=function(e){var t=a.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},s=function(e){var t=p(e.components);return a.createElement(c.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,c=e.parentName,s=o(e,["components","mdxType","originalType","parentName"]),m=p(n),d=r,k=m["".concat(c,".").concat(d)]||m[d]||u[d]||i;return n?a.createElement(k,l(l({ref:t},s),{},{components:n})):a.createElement(k,l({ref:t},s))}));function d(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,l=new Array(i);l[0]=m;var o={};for(var c in t)hasOwnProperty.call(t,c)&&(o[c]=t[c]);o.originalType=e,o.mdxType="string"==typeof e?e:r,l[1]=o;for(var p=2;p=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var c=a.createContext({}),p=function(e){var t=a.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},s=function(e){var t=p(e.components);return a.createElement(c.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,c=e.parentName,s=o(e,["components","mdxType","originalType","parentName"]),m=p(n),d=r,k=m["".concat(c,".").concat(d)]||m[d]||u[d]||i;return n?a.createElement(k,l(l({ref:t},s),{},{components:n})):a.createElement(k,l({ref:t},s))}));function d(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,l=new Array(i);l[0]=m;var o={};for(var c in t)hasOwnProperty.call(t,c)&&(o[c]=t[c]);o.originalType=e,o.mdxType="string"==typeof e?e:r,l[1]=o;for(var p=2;p=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 u=n.createContext({}),p=function(e){var t=n.useContext(u),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},c=function(e){var t=p(e.components);return n.createElement(u.Provider,{value:t},e.children)},s={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,u=e.parentName,c=l(e,["components","mdxType","originalType","parentName"]),f=p(r),m=a,d=f["".concat(u,".").concat(m)]||f[m]||s[m]||o;return r?n.createElement(d,i(i({ref:t},c),{},{components:r})):n.createElement(d,i({ref:t},c))}));function m(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,i=new Array(o);i[0]=f;var l={};for(var u in t)hasOwnProperty.call(t,u)&&(l[u]=t[u]);l.originalType=e,l.mdxType="string"==typeof e?e:a,i[1]=l;for(var p=2;p=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(l=0;l=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var o=l.createContext({}),u=function(e){var t=l.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},c=function(e){var t=u(e.components);return l.createElement(o.Provider,{value:t},e.children)},s={inlineCode:"code",wrapper:function(e){var t=e.children;return l.createElement(l.Fragment,{},t)}},k=l.forwardRef((function(e,t){var n=e.components,a=e.mdxType,r=e.originalType,o=e.parentName,c=p(e,["components","mdxType","originalType","parentName"]),k=u(n),m=a,d=k["".concat(o,".").concat(m)]||k[m]||s[m]||r;return n?l.createElement(d,i(i({ref:t},c),{},{components:n})):l.createElement(d,i({ref:t},c))}));function m(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var r=n.length,i=new Array(r);i[0]=k;var p={};for(var o in t)hasOwnProperty.call(t,o)&&(p[o]=t[o]);p.originalType=e,p.mdxType="string"==typeof e?e:a,i[1]=p;for(var u=2;u=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(l=0;l=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var o=l.createContext({}),u=function(e){var t=l.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},s=function(e){var t=u(e.components);return l.createElement(o.Provider,{value:t},e.children)},k={inlineCode:"code",wrapper:function(e){var t=e.children;return l.createElement(l.Fragment,{},t)}},c=l.forwardRef((function(e,t){var n=e.components,a=e.mdxType,r=e.originalType,o=e.parentName,s=p(e,["components","mdxType","originalType","parentName"]),c=u(n),m=a,d=c["".concat(o,".").concat(m)]||c[m]||k[m]||r;return n?l.createElement(d,i(i({ref:t},s),{},{components:n})):l.createElement(d,i({ref:t},s))}));function m(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var r=n.length,i=new Array(r);i[0]=c;var p={};for(var o in t)hasOwnProperty.call(t,o)&&(p[o]=t[o]);p.originalType=e,p.mdxType="string"==typeof e?e:a,i[1]=p;for(var u=2;u=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var p=r.createContext({}),u=function(e){var n=r.useContext(p),t=n;return e&&(t="function"==typeof e?e(n):i(i({},n),e)),t},c=function(e){var n=u(e.components);return r.createElement(p.Provider,{value:n},e.children)},s={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},k=r.forwardRef((function(e,n){var t=e.components,a=e.mdxType,l=e.originalType,p=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),k=u(t),d=a,m=k["".concat(p,".").concat(d)]||k[d]||s[d]||l;return t?r.createElement(m,i(i({ref:n},c),{},{components:t})):r.createElement(m,i({ref:n},c))}));function d(e,n){var t=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var l=t.length,i=new Array(l);i[0]=k;var o={};for(var p in n)hasOwnProperty.call(n,p)&&(o[p]=n[p]);o.originalType=e,o.mdxType="string"==typeof e?e:a,i[1]=o;for(var u=2;u {\n console.log('Worker math add result:', v);\n});\n")),(0,l.kt)("p",null,"\u8fd9\u4e2a\u51fd\u6570\u5c06\u5728 Worker \u7ebf\u7a0b\u5185\u6267\u884c\uff0c\u800c\u4e0d\u4f1a\u963b\u585e\u4e3b\u7ebf\u7a0b\u3002"),(0,l.kt)("p",null,"\u8ba9\u6211\u4eec\u6765\u7f16\u5199\u4e00\u4e2a\u5728 Worker \u7ebf\u7a0b\u4e2d\u8ba1\u7b97\u6590\u6ce2\u90a3\u5951\u6570\u5217\u7684\u51fd\u6570\uff0c\u6765\u6df1\u5165\u4e86\u89e3\u591a\u7ebf\u7a0b\u4ee3\u7801\u7684\u7f16\u5199\uff01"),(0,l.kt)("h2",{id:"\u7f16\u5199\u591a\u7ebf\u7a0b\u811a\u672c"},"\u7f16\u5199\u591a\u7ebf\u7a0b\u811a\u672c"),(0,l.kt)("h3",{id:"\u521b\u5efa\u811a\u672c"},"\u521b\u5efa\u811a\u672c"),(0,l.kt)("p",null,"\u6211\u4eec\u5148\u5728 ",(0,l.kt)("inlineCode",{parentName:"p"},"src")," \u76ee\u5f55\u521b\u5efa\u4e00\u4e2a ",(0,l.kt)("inlineCode",{parentName:"p"},"fibonacci.js")," \u811a\u672c\u3002"),(0,l.kt)("p",null,"\u7136\u540e\u5728 ",(0,l.kt)("inlineCode",{parentName:"p"},"index.js")," \u6dfb\u52a0\u65b0\u7684\u4e00\u884c\u6765\u5bfc\u5165\u5b83\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},'require("fibonacci.js");\n')),(0,l.kt)("p",null,"\u8fd9\u6837\u5f15\u64ce\u5728\u521b\u5efa Worker \u65f6\u624d\u4f1a\u6267\u884c\u8fd9\u4e2a\u65b0\u811a\u672c\u3002"),(0,l.kt)("h3",{id:"\u7f16\u5199\u51fd\u6570"},"\u7f16\u5199\u51fd\u6570"),(0,l.kt)("p",null,"\u5728 ",(0,l.kt)("inlineCode",{parentName:"p"},"fibonacci.js")," \u811a\u672c\u4e2d\u5b9e\u73b0\u8ba1\u7b97\u6590\u6ce2\u90a3\u5951\u7684\u51fd\u6570\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},"function _fibonacci(n) {\n if (n <= 0) return 0;\n if (n === 1) return 1;\n return fibonacci(n - 1) + fibonacci(n - 2);\n}\n")),(0,l.kt)("h3",{id:"\u5bfc\u51fa\u51fd\u6570\u5230\u4e3b\u7ebf\u7a0b"},"\u5bfc\u51fa\u51fd\u6570\u5230\u4e3b\u7ebf\u7a0b"),(0,l.kt)("p",null,"\u73b0\u5728\uff0c\u867d\u7136\u5728 Worker \u7ebf\u7a0b\u4e2d\u6211\u4eec\u6709\u4e86\u8fd9\u4e2a\u51fd\u6570\uff0c\u4f46\u662f\u6211\u4eec\u65e0\u6cd5\u5728\u4e3b\u7ebf\u7a0b\u8c03\u7528\u5b83\u3002"),(0,l.kt)("p",null,"\u4e0e Worker \u7ebf\u7a0b\u7684\u901a\u4fe1\u901a\u5e38\u4f7f\u7528 ",(0,l.kt)("inlineCode",{parentName:"p"},"postMessage")," \u548c ",(0,l.kt)("inlineCode",{parentName:"p"},"onMessage")," \u8fdb\u884c\uff0c\u4f46\u662f\u9700\u8981\u5904\u7406\u5f88\u591a\u8fb9\u7f18\u60c5\u51b5\uff0c\u800c\u4e14\u8fd9\u6837\u7684\u5f00\u53d1\u4f53\u9a8c\u4e5f\u8f83\u5dee\uff0c\u6240\u4ee5\u793e\u533a\u7248\u63d0\u4f9b\u4e86\u4e00\u4e2a\u5c01\u88c5\u3002"),(0,l.kt)("p",null,"\u6211\u4eec\u9700\u8981\u5bfc\u5165 ",(0,l.kt)("inlineCode",{parentName:"p"},"registerHandler")," \u51fd\u6570\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},'const { registerHandler } = require("ipc-worker.js");\n')),(0,l.kt)("p",null,"\u8be5\u51fd\u6570\u7684\u7b7e\u540d\u662f\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"export function registerHandler(name: string, handler: object): void;\n")),(0,l.kt)("p",null,"\u8c03\u7528\u51fd\u6570\u65f6\uff0c\u51fd\u6570\u4f1a\u6267\u884c\u4ee5\u4e0b\u64cd\u4f5c\uff1a"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"\u5728\u5168\u5c40\u53d8\u91cf ",(0,l.kt)("inlineCode",{parentName:"li"},"worker")," \u7684\u5bf9\u8c61\u4e0a\u589e\u52a0\u4e00\u4e2a\u4e0e\u4f20\u5165 ",(0,l.kt)("inlineCode",{parentName:"li"},"name")," \u4e00\u6837\u7684\u5bf9\u8c61\u5c5e\u6027\u3002"),(0,l.kt)("li",{parentName:"ul"},"\u904d\u5386\u4f20\u5165 ",(0,l.kt)("inlineCode",{parentName:"li"},"handler")," \u5bf9\u8c61\u4e0a\u7684\u6240\u6709\u5c5e\u6027\uff0c\u6309\u89c4\u5219\u5728 ",(0,l.kt)("inlineCode",{parentName:"li"},"worker.")," \u5bf9\u8c61\u4e0a\u521b\u5efa\u5bf9\u5e94\u7684\u51fd\u6570\u3002")),(0,l.kt)("p",null,"\u4e5f\u5c31\u662f\u8bf4\uff0c\u6211\u4eec\u53ea\u9700\u8981\u5c06 ",(0,l.kt)("inlineCode",{parentName:"p"},"fibonacci")," \u51fd\u6570\u4f20\u5165\u5230 ",(0,l.kt)("inlineCode",{parentName:"p"},"registerHandler")," \u51fd\u6570\u5e76\u8c03\u7528\uff0c\u51fd\u6570\u5c31\u53ef\u4ee5\u5728\u4e3b\u7ebf\u7a0b\u4e2d\u8c03\u7528\u4e86\uff01"),(0,l.kt)("p",null,"\u4ee5\u4e0b\u662f\u5b8c\u6574\u7684 ",(0,l.kt)("inlineCode",{parentName:"p"},"fibonacci.js")," \u5185\u5bb9\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},'const { registerHandler } = require("ipc-worker.js");\n\nfunction _fibonacci(n) {\n if (n <= 0) return 0;\n if (n === 1) return 1;\n return fibonacci(n - 1) + fibonacci(n - 2);\n}\n\nfunction fibonacci(n, callback) {\n callback(_fibonacci(n));\n}\n\nregisterHandler("utils", {\n fibonacci,\n});\n')),(0,l.kt)("h3",{id:"\u5bfc\u51fa\u7684\u5185\u90e8\u539f\u7406"},"\u5bfc\u51fa\u7684\u5185\u90e8\u539f\u7406"),(0,l.kt)("p",null,"\u4f60\u53ef\u80fd\u6ce8\u610f\u5230\u4e86\u6211\u4eec\u5bfc\u51fa\u7684\u662f\u53e6\u4e00\u4e2a\u51fd\u6570\uff0c\u800c\u4e0d\u662f\u76f4\u63a5\u5bfc\u51fa ",(0,l.kt)("inlineCode",{parentName:"p"},"_fibonacci")," \u51fd\u6570\u3002"),(0,l.kt)("p",null,"\u56e0\u4e3a\u8fd9\u662f\u5b9e\u73b0\u4e00\u4e2a\u8de8\u7ebf\u7a0b\u8c03\u7528\u51fd\u6570\u65f6\u9700\u8981\u9075\u5faa\u7684\u89c4\u8303\uff1a"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"\u4e0e ",(0,l.kt)("inlineCode",{parentName:"li"},"postMessage")," \u7684\u8981\u6c42\u4e00\u6837\uff0c\u51fd\u6570\u7684\u6240\u6709\u53c2\u6570\u5fc5\u987b\u662f\u53ef\u5e8f\u5217\u5316\u7684\u3002"),(0,l.kt)("li",{parentName:"ul"},"\u5f53\u51fd\u6570\u88ab\u8c03\u7528\u65f6\uff0c\u4f1a\u5728\u51fd\u6570\u6700\u540e\u4e00\u4e2a\u53c2\u6570\u4f20\u5165\u4e00\u4e2a\u56de\u8c03\u51fd\u6570\uff0c\u5f53\u9700\u8981\u8fd4\u56de\u5230\u4e3b\u7ebf\u7a0b\u65f6\uff0c\u8bf7\u8c03\u7528\u8be5\u51fd\u6570\u3002")),(0,l.kt)("p",null,"\u50cf\u4e0a\u9762 ",(0,l.kt)("inlineCode",{parentName:"p"},"fibonacci")," \u51fd\u6570\u7684\u5b9e\u73b0\uff0c\u5728\u8c03\u7528 ",(0,l.kt)("inlineCode",{parentName:"p"},"_fibonacci")," \u62ff\u5230\u8ba1\u7b97\u7ed3\u679c\u540e\uff0c\u901a\u8fc7\u8c03\u7528 ",(0,l.kt)("inlineCode",{parentName:"p"},"callback(v)")," \u5c06\u503c\u8fd4\u56de\u5230\u4e3b\u7ebf\u7a0b\u3002"),(0,l.kt)("p",null,"\u800c\u5728\u4e3b\u7ebf\u7a0b\u4e2d\uff0c\u6211\u4eec\u9700\u8981\u50cf\u8fd9\u6837\u4ece\u4e3b\u7ebf\u7a0b\u8c03\u7528 Worker \u7ebf\u7a0b\u4e2d\u7684\u8fd9\u4e2a\u51fd\u6570\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},"worker.utils.fibonacci([10], ([v]) => {\n console.log('Worker fibonacci result:', v);\n});\n")),(0,l.kt)("p",null,"\u4f60\u53ef\u80fd\u6ce8\u610f\u5230\u4e86\uff0c\u7b2c\u4e00\u4e2a\u53c2\u6570\u662f\u6570\u7ec4\uff0c\u800c\u7b2c\u4e8c\u4e2a\u53c2\u6570\u7684\u56de\u8c03\u7684\u7b2c\u4e00\u4e2a\u53c2\u6570\u4e5f\u662f\u6570\u7ec4\uff0c\u8fd9\u4e5f\u662f\u89c4\u8303\u3002"),(0,l.kt)("p",null,"\u4e3a\u4e86\u63d0\u9ad8\u8de8\u7ebf\u7a0b\u901a\u4fe1\u7684\u6027\u80fd\uff0c\u51cf\u5c11\u5783\u573e\u56de\u6536\u7684\u9891\u7387\uff0c\u6240\u4ee5\u9009\u62e9\u4e86\u8fd9\u79cd\u8c03\u7528\u7684\u65b9\u5f0f\u3002"),(0,l.kt)("p",null,"\u4f60\u53ef\u4ee5\u8fd9\u6837\u7406\u89e3 ",(0,l.kt)("inlineCode",{parentName:"p"},"worker.xxx.xxx()")," \u7684\u8c03\u7528\u7b7e\u540d\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"worker.utils.fibonacci(args, (values) => ...);\n\n// utils: \u8981\u8c03\u7528\u7684 handler \u540d\u79f0\n// fibonacci: \u8981\u8c03\u7528 handler \u4e2d\u7684 Worker \u51fd\u6570\u540d\u79f0\n// args: \u4f20\u5165\u5230 Worker \u51fd\u6570\u7684\u6240\u6709\u53c2\u6570\n// values: Worker \u51fd\u6570\u8fd4\u56de\u65f6\u7684\u56de\u8c03\uff0c\u53c2\u6570\u662f\u8fd4\u56de\u503c\u6570\u7ec4\n")),(0,l.kt)("p",null,"\u8fd9\u5f88\u597d\u7406\u89e3\uff0c\u6211\u4eec\u518d\u4e3e\u4e2a\u591a\u53c2\u6570\u8c03\u7528\u7684\u4f8b\u5b50\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},'// Worker \u7ebf\u7a0b\u7684\u51fd\u6570\nfunction handle(a, b, c, callback) {\n // a = "ye.", b = {}, c = 1000\n callback(1, "text", { prop: 2 });\n}\n\n// \u4e3b\u7ebf\u7a0b\u7684\u8c03\u7528\u65b9\u5f0f\nworker.utils.handle(["ye.", {}, 1000], ([v1, v2, v3]) => {\n // v1 = 1, v2 = "text", v3 = { prop: 2 }\n});\n')),(0,l.kt)("h3",{id:"\u66f4\u591a\u5bfc\u51fa\u573a\u666f"},"\u66f4\u591a\u5bfc\u51fa\u573a\u666f"),(0,l.kt)("p",null,"\u65e0\u53c2\u6570\u51fd\u6570\u7684\u5b9e\u73b0\u4e0e\u8c03\u7528\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},"// Worker \u7ebf\u7a0b\u7684\u51fd\u6570\nfunction setValue(callback) {\n // ...\n callback();\n}\n\n// \u4e3b\u7ebf\u7a0b\u7684\u8c03\u7528\u65b9\u5f0f\nworker.utils.setValue(() => {\n // ok.\n});\n")),(0,l.kt)("p",null,"\u65e0\u9700\u8fd4\u56de\u7684\u51fd\u6570\u7684\u5b9e\u73b0\u4e0e\u8c03\u7528\uff08\u8fd9\u540c\u65f6\u80fd\u8282\u7701 Worker \u7684\u901a\u4fe1\u5f00\u9500\uff0c\u56e0\u4e3a\u53ea\u9700\u8981\u5355\u5411\u901a\u4fe1\uff01\uff09\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},'// Worker \u7ebf\u7a0b\u7684\u51fd\u6570\nfunction setValue(v) {\n // ...\n // \u6267\u884c\u5b8c\u6210\u4e4b\u540e\u4e0d\u8c03\u7528 callback\uff0c\u751a\u81f3\u4e0d\u7528\u58f0\u660e\n}\n\n// \u4e3b\u7ebf\u7a0b\u7684\u8c03\u7528\u65b9\u5f0f\nworker.utils.setValue(["ye."]);\n')),(0,l.kt)("p",null,"\u65e0\u53c2\u6570\u4e5f\u65e0\u8fd4\u56de\u7684\u51fd\u6570\u7684\u5b9e\u73b0\u4e0e\u8c03\u7528\uff08\u8fd9\u540c\u65f6\u80fd\u8282\u7701 Worker \u7684\u901a\u4fe1\u5f00\u9500\uff0c\u56e0\u4e3a\u53ea\u9700\u8981\u5355\u5411\u901a\u4fe1\uff01\uff09\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},"// Worker \u7ebf\u7a0b\u7684\u51fd\u6570\nfunction setValue() {\n // ...\n // \u6267\u884c\u5b8c\u6210\u4e4b\u540e\u4e0d\u8c03\u7528 callback\uff0c\u751a\u81f3\u4e0d\u7528\u58f0\u660e\n}\n\n// \u4e3b\u7ebf\u7a0b\u7684\u8c03\u7528\u65b9\u5f0f\nworker.utils.setValue();\n")),(0,l.kt)("p",null,"\u9664\u4e86\u51fd\u6570\u4e4b\u5916\uff0c\u4f60\u8fd8\u53ef\u4ee5\u5bfc\u51fa\u503c\u3001getter/setter \u5c5e\u6027\uff0c\u4f46\u9700\u8981\u6ce8\u610f\u9700\u901a\u8fc7 ",(0,l.kt)("inlineCode",{parentName:"p"},"get_xxx"),"\u3001",(0,l.kt)("inlineCode",{parentName:"p"},"set_xxx")," \u548c ",(0,l.kt)("inlineCode",{parentName:"p"},"write_xxx")," \u4e09\u4e2a\u4ee3\u7406\u51fd\u6570\u8fdb\u884c\u8bbf\u95ee\u4e0e\u4fee\u6539\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},'// Worker \u7ebf\u7a0b\u4e2d\uff1a\n\nregisterHandler("Date", {\n time: 1,\n});\n\n// \u4e3b\u7ebf\u7a0b\u4e2d\uff1a\n\n// \u83b7\u53d6\u503c\nworker.Date.get_time(([v]) => {\n // v is 1.\n});\n\n// \u4fee\u6539\u503c\uff0c\u4e0d\u4f1a\u56de\u8c03\uff0c\u6027\u80fd\u6bd4 write \u66f4\u9ad8\nworker.Date.set_time([100]);\n\n// \u4fee\u6539\u503c\uff0c\u4f1a\u56de\u8c03\u4ee5\u901a\u77e5\u64cd\u4f5c\u5df2\u6267\u884c\u5b8c\u6bd5\nworker.Date.write_time([100], () => {\n // finish.\n});\n')),(0,l.kt)("h2",{id:"\u7f16\u8bd1\u591a\u7ebf\u7a0b\u6269\u5c55"},"\u7f16\u8bd1\u591a\u7ebf\u7a0b\u6269\u5c55"),(0,l.kt)("p",null,"\u6bcf\u6b21\u4fee\u6539\u6269\u5c55\u4ee3\u7801\u4e4b\u540e\uff0c\u9700\u8981\u624b\u52a8\u70b9\u51fb ",(0,l.kt)("strong",{parentName:"p"},"\u9879\u76ee - \u91cd\u65b0\u7f16\u8bd1\u591a\u7ebf\u7a0b\u6269\u5c55")," \u4ee5\u751f\u6548\u3002"),(0,l.kt)("p",null,"\u7279\u522b\u6ce8\u610f\uff1a",(0,l.kt)("strong",{parentName:"p"},"\u5c31\u50cf\u4fee\u6539\u591a\u7ebf\u7a0b\u7684\u8bbe\u7f6e\u4f1a\u5f71\u54cd\u5230\u6240\u6709\u9879\u76ee\u4e00\u6837\uff0c\u591a\u7ebf\u7a0b\u6269\u5c55\u7684\u7f16\u8bd1\u7ed3\u679c\u4e5f\u662f\u6240\u6709\u9879\u76ee\u5171\u7528\u7684\uff01")),(0,l.kt)("p",null,"\u6240\u4ee5\u5f53\u4f60",(0,l.kt)("strong",{parentName:"p"},"\u6784\u5efa\u67d0\u4e2a\u9879\u76ee\u4e4b\u524d\uff0c\u5fc5\u987b\u786e\u4fdd\u6700\u540e\u4e00\u6b21\u7f16\u8bd1\u662f\u5f53\u524d\u9879\u76ee\u7684\u591a\u7ebf\u7a0b\u6269\u5c55"),"\uff01"))}d.isMDXComponent=!0},75162:function(e,n,t){n.Z=t.p+"assets/images/custom_worker_struct-80bd570e270783db7d11ab575cef834f.png"}}]); \ No newline at end of file diff --git a/assets/js/1efd644e.40a534e3.js b/assets/js/1efd644e.40a534e3.js new file mode 100644 index 00000000..9c93d694 --- /dev/null +++ b/assets/js/1efd644e.40a534e3.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[6858],{3905:function(e,t,n){n.d(t,{Zo:function(){return s},kt:function(){return d}});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function l(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var c=a.createContext({}),p=function(e){var t=a.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},s=function(e){var t=p(e.components);return a.createElement(c.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,c=e.parentName,s=o(e,["components","mdxType","originalType","parentName"]),m=p(n),d=r,k=m["".concat(c,".").concat(d)]||m[d]||u[d]||i;return n?a.createElement(k,l(l({ref:t},s),{},{components:n})):a.createElement(k,l({ref:t},s))}));function d(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,l=new Array(i);l[0]=m;var o={};for(var c in t)hasOwnProperty.call(t,c)&&(o[c]=t[c]);o.originalType=e,o.mdxType="string"==typeof e?e:r,l[1]=o;for(var p=2;p=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var s=n.createContext({}),c=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):o(o({},t),e)),r},l=function(e){var t=c(e.components);return n.createElement(s.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,i=e.mdxType,a=e.originalType,s=e.parentName,l=u(e,["components","mdxType","originalType","parentName"]),d=c(r),f=i,m=d["".concat(s,".").concat(f)]||d[f]||p[f]||a;return r?n.createElement(m,o(o({ref:t},l),{},{components:r})):n.createElement(m,o({ref:t},l))}));function f(e,t){var r=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=r.length,o=new Array(a);o[0]=d;var u={};for(var s in t)hasOwnProperty.call(t,s)&&(u[s]=t[s]);u.originalType=e,u.mdxType="string"==typeof e?e:i,o[1]=u;for(var c=2;c=0||(r[n]=t[n]);return r}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}var c=a.createContext({}),p=function(t){var e=a.useContext(c),n=e;return t&&(n="function"==typeof t?t(e):l(l({},e),t)),n},s=function(t){var e=p(t.components);return a.createElement(c.Provider,{value:e},t.children)},u={inlineCode:"code",wrapper:function(t){var e=t.children;return a.createElement(a.Fragment,{},e)}},d=a.forwardRef((function(t,e){var n=t.components,r=t.mdxType,i=t.originalType,c=t.parentName,s=o(t,["components","mdxType","originalType","parentName"]),d=p(n),k=r,m=d["".concat(c,".").concat(k)]||d[k]||u[k]||i;return n?a.createElement(m,l(l({ref:e},s),{},{components:n})):a.createElement(m,l({ref:e},s))}));function k(t,e){var n=arguments,r=e&&e.mdxType;if("string"==typeof t||r){var i=n.length,l=new Array(i);l[0]=d;var o={};for(var c in e)hasOwnProperty.call(e,c)&&(o[c]=e[c]);o.originalType=t,o.mdxType="string"==typeof t?t:r,l[1]=o;for(var p=2;p=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var u=r.createContext({}),l=function(e){var t=r.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},s=function(e){var t=l(e.components);return r.createElement(u.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,i=e.mdxType,a=e.originalType,u=e.parentName,s=c(e,["components","mdxType","originalType","parentName"]),d=l(n),f=i,m=d["".concat(u,".").concat(f)]||d[f]||p[f]||a;return n?r.createElement(m,o(o({ref:t},s),{},{components:n})):r.createElement(m,o({ref:t},s))}));function f(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=n.length,o=new Array(a);o[0]=d;var c={};for(var u in t)hasOwnProperty.call(t,u)&&(c[u]=t[u]);c.originalType=e,c.mdxType="string"==typeof e?e:i,o[1]=c;for(var l=2;l=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var u=n.createContext({}),s=function(e){var t=n.useContext(u),r=t;return e&&(r="function"==typeof e?e(t):c(c({},t),e)),r},p=function(e){var t=s(e.components);return n.createElement(u.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},l=n.forwardRef((function(e,t){var r=e.components,i=e.mdxType,o=e.originalType,u=e.parentName,p=a(e,["components","mdxType","originalType","parentName"]),l=s(r),f=i,m=l["".concat(u,".").concat(f)]||l[f]||d[f]||o;return r?n.createElement(m,c(c({ref:t},p),{},{components:r})):n.createElement(m,c({ref:t},p))}));function f(e,t){var r=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var o=r.length,c=new Array(o);c[0]=l;var a={};for(var u in t)hasOwnProperty.call(t,u)&&(a[u]=t[u]);a.originalType=e,a.mdxType="string"==typeof e?e:i,c[1]=a;for(var s=2;s=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var u=n.createContext({}),s=function(e){var t=n.useContext(u),r=t;return e&&(r="function"==typeof e?e(t):c(c({},t),e)),r},p=function(e){var t=s(e.components);return n.createElement(u.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},l=n.forwardRef((function(e,t){var r=e.components,i=e.mdxType,o=e.originalType,u=e.parentName,p=a(e,["components","mdxType","originalType","parentName"]),l=s(r),f=i,m=l["".concat(u,".").concat(f)]||l[f]||d[f]||o;return r?n.createElement(m,c(c({ref:t},p),{},{components:r})):n.createElement(m,c({ref:t},p))}));function f(e,t){var r=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var o=r.length,c=new Array(o);c[0]=l;var a={};for(var u in t)hasOwnProperty.call(t,u)&&(a[u]=t[u]);a.originalType=e,a.mdxType="string"==typeof e?e:i,c[1]=a;for(var s=2;s=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var u=r.createContext({}),p=function(e){var t=r.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},c=function(e){var t=p(e.components);return r.createElement(u.Provider,{value:t},e.children)},s={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},k=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,l=e.originalType,u=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),k=p(n),d=a,m=k["".concat(u,".").concat(d)]||k[d]||s[d]||l;return n?r.createElement(m,i(i({ref:t},c),{},{components:n})):r.createElement(m,i({ref:t},c))}));function d(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var l=n.length,i=new Array(l);i[0]=k;var o={};for(var u in t)hasOwnProperty.call(t,u)&&(o[u]=t[u]);o.originalType=e,o.mdxType="string"==typeof e?e:a,i[1]=o;for(var p=2;p=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var u=r.createContext({}),l=function(e){var t=r.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):c(c({},t),e)),n},s=function(e){var t=l(e.components);return r.createElement(u.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,i=e.mdxType,o=e.originalType,u=e.parentName,s=a(e,["components","mdxType","originalType","parentName"]),f=l(n),m=i,d=f["".concat(u,".").concat(m)]||f[m]||p[m]||o;return n?r.createElement(d,c(c({ref:t},s),{},{components:n})):r.createElement(d,c({ref:t},s))}));function m(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var o=n.length,c=new Array(o);c[0]=f;var a={};for(var u in t)hasOwnProperty.call(t,u)&&(a[u]=t[u]);a.originalType=e,a.mdxType="string"==typeof e?e:i,c[1]=a;for(var l=2;l=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var u=r.createContext({}),l=function(e){var t=r.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):c(c({},t),e)),n},s=function(e){var t=l(e.components);return r.createElement(u.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,i=e.mdxType,o=e.originalType,u=e.parentName,s=a(e,["components","mdxType","originalType","parentName"]),f=l(n),m=i,d=f["".concat(u,".").concat(m)]||f[m]||p[m]||o;return n?r.createElement(d,c(c({ref:t},s),{},{components:n})):r.createElement(d,c({ref:t},s))}));function m(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var o=n.length,c=new Array(o);c[0]=f;var a={};for(var u in t)hasOwnProperty.call(t,u)&&(a[u]=t[u]);a.originalType=e,a.mdxType="string"==typeof e?e:i,c[1]=a;for(var l=2;l=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var l=r.createContext({}),u=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},m=function(e){var t=u(e.components);return r.createElement(l.Provider,{value:t},e.children)},s={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},p=r.forwardRef((function(e,t){var n=e.components,i=e.mdxType,a=e.originalType,l=e.parentName,m=c(e,["components","mdxType","originalType","parentName"]),p=u(n),d=i,f=p["".concat(l,".").concat(d)]||p[d]||s[d]||a;return n?r.createElement(f,o(o({ref:t},m),{},{components:n})):r.createElement(f,o({ref:t},m))}));function d(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=n.length,o=new Array(a);o[0]=p;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:i,o[1]=c;for(var u=2;u=0||(t[n]=A[n]);return t}(A,e);if(Object.getOwnPropertySymbols){var M=Object.getOwnPropertySymbols(A);for(g=0;g=0||Object.prototype.propertyIsEnumerable.call(A,n)&&(t[n]=A[n])}return t}var B=g.createContext({}),w=function(A){var e=g.useContext(B),n=e;return A&&(n="function"==typeof A?A(e):r(r({},e),A)),n},i=function(A){var e=w(A.components);return g.createElement(B.Provider,{value:e},A.children)},Y={inlineCode:"code",wrapper:function(A){var e=A.children;return g.createElement(g.Fragment,{},e)}},G=g.forwardRef((function(A,e){var n=A.components,t=A.mdxType,M=A.originalType,B=A.parentName,i=a(A,["components","mdxType","originalType","parentName"]),G=w(n),D=t,l=G["".concat(B,".").concat(D)]||G[D]||Y[D]||M;return n?g.createElement(l,r(r({ref:e},i),{},{components:n})):g.createElement(l,r({ref:e},i))}));function D(A,e){var n=arguments,t=e&&e.mdxType;if("string"==typeof A||t){var M=n.length,r=new Array(M);r[0]=G;var a={};for(var B in e)hasOwnProperty.call(e,B)&&(a[B]=e[B]);a.originalType=A,a.mdxType="string"==typeof A?A:t,r[1]=a;for(var w=2;w=0||(t[n]=A[n]);return t}(A,e);if(Object.getOwnPropertySymbols){var M=Object.getOwnPropertySymbols(A);for(g=0;g=0||Object.prototype.propertyIsEnumerable.call(A,n)&&(t[n]=A[n])}return t}var B=g.createContext({}),w=function(A){var e=g.useContext(B),n=e;return A&&(n="function"==typeof A?A(e):r(r({},e),A)),n},i=function(A){var e=w(A.components);return g.createElement(B.Provider,{value:e},A.children)},Y={inlineCode:"code",wrapper:function(A){var e=A.children;return g.createElement(g.Fragment,{},e)}},G=g.forwardRef((function(A,e){var n=A.components,t=A.mdxType,M=A.originalType,B=A.parentName,i=a(A,["components","mdxType","originalType","parentName"]),G=w(n),D=t,l=G["".concat(B,".").concat(D)]||G[D]||Y[D]||M;return n?g.createElement(l,r(r({ref:e},i),{},{components:n})):g.createElement(l,r({ref:e},i))}));function D(A,e){var n=arguments,t=e&&e.mdxType;if("string"==typeof A||t){var M=n.length,r=new Array(M);r[0]=G;var a={};for(var B in e)hasOwnProperty.call(e,B)&&(a[B]=e[B]);a.originalType=A,a.mdxType="string"==typeof A?A:t,r[1]=a;for(var w=2;w=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(l=0;l=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var o=l.createContext({}),u=function(e){var t=l.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},s=function(e){var t=u(e.components);return l.createElement(o.Provider,{value:t},e.children)},k={inlineCode:"code",wrapper:function(e){var t=e.children;return l.createElement(l.Fragment,{},t)}},c=l.forwardRef((function(e,t){var n=e.components,a=e.mdxType,r=e.originalType,o=e.parentName,s=p(e,["components","mdxType","originalType","parentName"]),c=u(n),m=a,d=c["".concat(o,".").concat(m)]||c[m]||k[m]||r;return n?l.createElement(d,i(i({ref:t},s),{},{components:n})):l.createElement(d,i({ref:t},s))}));function m(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var r=n.length,i=new Array(r);i[0]=c;var p={};for(var o in t)hasOwnProperty.call(t,o)&&(p[o]=t[o]);p.originalType=e,p.mdxType="string"==typeof e?e:a,i[1]=p;for(var u=2;u=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var c=n.createContext({}),s=function(e){var t=n.useContext(c),r=t;return e&&(r="function"==typeof e?e(t):u(u({},t),e)),r},p=function(e){var t=s(e.components);return n.createElement(c.Provider,{value:t},e.children)},l={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,i=e.originalType,c=e.parentName,p=a(e,["components","mdxType","originalType","parentName"]),d=s(r),f=o,m=d["".concat(c,".").concat(f)]||d[f]||l[f]||i;return r?n.createElement(m,u(u({ref:t},p),{},{components:r})):n.createElement(m,u({ref:t},p))}));function f(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var i=r.length,u=new Array(i);u[0]=d;var a={};for(var c in t)hasOwnProperty.call(t,c)&&(a[c]=t[c]);a.originalType=e,a.mdxType="string"==typeof e?e:o,u[1]=a;for(var s=2;s=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 i=o.createContext({}),s=function(e){var t=o.useContext(i),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},u=function(e){var t=s(e.components);return o.createElement(i.Provider,{value:t},e.children)},c={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},d=o.forwardRef((function(e,t){var n=e.components,r=e.mdxType,a=e.originalType,i=e.parentName,u=p(e,["components","mdxType","originalType","parentName"]),d=s(n),m=r,k=d["".concat(i,".").concat(m)]||d[m]||c[m]||a;return n?o.createElement(k,l(l({ref:t},u),{},{components:n})):o.createElement(k,l({ref:t},u))}));function m(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var a=n.length,l=new Array(a);l[0]=d;var p={};for(var i in t)hasOwnProperty.call(t,i)&&(p[i]=t[i]);p.originalType=e,p.mdxType="string"==typeof e?e:r,l[1]=p;for(var s=2;s {\n const { protocol } = await import("./proto");\n webSocket.send(protocol.LoginRequest.encode(obj));\n });\n}\n')),(0,a.kt)("p",null,"\u6700\u540e\uff0c\u6211\u4eec\u5904\u7406 long \u5e93\uff0c\u8fd9\u662f protobufjs \u4f9d\u8d56\u7684\u5927\u6570\u5e93\u3002"),(0,a.kt)("p",null,"\u6240\u5e78 long \u5e93\u7684\u7f16\u5199\u6bd4\u8f83\u73b0\u4ee3\u5316\uff0c\u6211\u4eec\u53ef\u4ee5\u76f4\u63a5\u5c06 ",(0,a.kt)("inlineCode",{parentName:"p"},"node_modules/long/index.js")," \u6587\u4ef6\u590d\u5236\u4e00\u4efd\u5230 worker \u76ee\u5f55\u4e2d\uff0c\u5e76\u91cd\u547d\u540d\u4e3a ",(0,a.kt)("inlineCode",{parentName:"p"},"long.js"),"\u3002"),(0,a.kt)("p",null,"\u7136\u540e\u5728 ",(0,a.kt)("inlineCode",{parentName:"p"},"protobuf.js")," \u6587\u4ef6\u4e2d\u627e\u5230 ",(0,a.kt)("inlineCode",{parentName:"p"},'inquire("long")'),"\uff0c\u6539\u4e3a ",(0,a.kt)("inlineCode",{parentName:"p"},'inquire("./long.js")'),"\uff0c\u5373\u53ef\u5b8c\u6210\u4fee\u6539\u6b63\u5e38\u5bfc\u5165\u3002"))}m.isMDXComponent=!0},56749:function(e,t,n){t.Z=n.p+"assets/images/tws_1-2f2f6b1a9e3bcbd797061af7596cc0a4.png"},73430:function(e,t,n){t.Z=n.p+"assets/images/tws_2-979f7202b7d4c4a542626c5cdef2e04a.png"}}]); \ No newline at end of file diff --git a/assets/js/42974ba9.e049866a.js b/assets/js/42974ba9.e049866a.js new file mode 100644 index 00000000..57a89383 --- /dev/null +++ b/assets/js/42974ba9.e049866a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[4436],{3905:function(e,t,n){n.d(t,{Zo:function(){return u},kt:function(){return m}});var o=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function l(e){for(var t=1;t=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 i=o.createContext({}),s=function(e){var t=o.useContext(i),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},u=function(e){var t=s(e.components);return o.createElement(i.Provider,{value:t},e.children)},c={inlineCode:"code",wrapper:function(e){var t=e.children;return o.createElement(o.Fragment,{},t)}},d=o.forwardRef((function(e,t){var n=e.components,r=e.mdxType,a=e.originalType,i=e.parentName,u=p(e,["components","mdxType","originalType","parentName"]),d=s(n),m=r,k=d["".concat(i,".").concat(m)]||d[m]||c[m]||a;return n?o.createElement(k,l(l({ref:t},u),{},{components:n})):o.createElement(k,l({ref:t},u))}));function m(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var a=n.length,l=new Array(a);l[0]=d;var p={};for(var i in t)hasOwnProperty.call(t,i)&&(p[i]=t[i]);p.originalType=e,p.mdxType="string"==typeof e?e:r,l[1]=p;for(var s=2;s {\n const { protocol } = await import("./proto");\n webSocket.send(protocol.LoginRequest.encode(obj));\n });\n}\n')),(0,a.kt)("p",null,"\u6700\u540e\uff0c\u6211\u4eec\u5904\u7406 long \u5e93\uff0c\u8fd9\u662f protobufjs \u4f9d\u8d56\u7684\u5927\u6570\u5e93\u3002"),(0,a.kt)("p",null,"\u6240\u5e78 long \u5e93\u7684\u7f16\u5199\u6bd4\u8f83\u73b0\u4ee3\u5316\uff0c\u6211\u4eec\u53ef\u4ee5\u76f4\u63a5\u5c06 ",(0,a.kt)("inlineCode",{parentName:"p"},"node_modules/long/index.js")," \u6587\u4ef6\u590d\u5236\u4e00\u4efd\u5230 worker \u76ee\u5f55\u4e2d\uff0c\u5e76\u91cd\u547d\u540d\u4e3a ",(0,a.kt)("inlineCode",{parentName:"p"},"long.js"),"\u3002"),(0,a.kt)("p",null,"\u7136\u540e\u5728 ",(0,a.kt)("inlineCode",{parentName:"p"},"protobuf.js")," \u6587\u4ef6\u4e2d\u627e\u5230 ",(0,a.kt)("inlineCode",{parentName:"p"},'inquire("long")'),"\uff0c\u6539\u4e3a ",(0,a.kt)("inlineCode",{parentName:"p"},'inquire("./long.js")'),"\uff0c\u5373\u53ef\u5b8c\u6210\u4fee\u6539\u6b63\u5e38\u5bfc\u5165\u3002"))}m.isMDXComponent=!0},56749:function(e,t,n){t.Z=n.p+"assets/images/tws_1-2f2f6b1a9e3bcbd797061af7596cc0a4.png"},73430:function(e,t,n){t.Z=n.p+"assets/images/tws_2-979f7202b7d4c4a542626c5cdef2e04a.png"}}]); \ No newline at end of file diff --git a/assets/js/433a8573.85df2a1f.js b/assets/js/433a8573.85df2a1f.js new file mode 100644 index 00000000..e7e2bb32 --- /dev/null +++ b/assets/js/433a8573.85df2a1f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[90],{3905:function(t,e,n){n.d(e,{Zo:function(){return p},kt:function(){return u}});var a=n(67294);function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,a)}return n}function o(t){for(var e=1;e=0||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}var s=a.createContext({}),c=function(t){var e=a.useContext(s),n=e;return t&&(n="function"==typeof t?t(e):o(o({},e),t)),n},p=function(t){var e=c(t.components);return a.createElement(s.Provider,{value:e},t.children)},d={inlineCode:"code",wrapper:function(t){var e=t.children;return a.createElement(a.Fragment,{},e)}},m=a.forwardRef((function(t,e){var n=t.components,i=t.mdxType,r=t.originalType,s=t.parentName,p=l(t,["components","mdxType","originalType","parentName"]),m=c(n),u=i,v=m["".concat(s,".").concat(u)]||m[u]||d[u]||r;return n?a.createElement(v,o(o({ref:e},p),{},{components:n})):a.createElement(v,o({ref:e},p))}));function u(t,e){var n=arguments,i=e&&e.mdxType;if("string"==typeof t||i){var r=n.length,o=new Array(r);o[0]=m;var l={};for(var s in e)hasOwnProperty.call(e,s)&&(l[s]=e[s]);l.originalType=t,l.mdxType="string"==typeof t?t:i,o[1]=l;for(var c=2;c=0||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}var s=a.createContext({}),c=function(t){var e=a.useContext(s),n=e;return t&&(n="function"==typeof t?t(e):o(o({},e),t)),n},p=function(t){var e=c(t.components);return a.createElement(s.Provider,{value:e},t.children)},d={inlineCode:"code",wrapper:function(t){var e=t.children;return a.createElement(a.Fragment,{},e)}},m=a.forwardRef((function(t,e){var n=t.components,i=t.mdxType,r=t.originalType,s=t.parentName,p=l(t,["components","mdxType","originalType","parentName"]),m=c(n),u=i,v=m["".concat(s,".").concat(u)]||m[u]||d[u]||r;return n?a.createElement(v,o(o({ref:e},p),{},{components:n})):a.createElement(v,o({ref:e},p))}));function u(t,e){var n=arguments,i=e&&e.mdxType;if("string"==typeof t||i){var r=n.length,o=new Array(r);o[0]=m;var l={};for(var s in e)hasOwnProperty.call(e,s)&&(l[s]=e[s]);l.originalType=t,l.mdxType="string"==typeof t?t:i,o[1]=l;for(var c=2;c=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var u=n.createContext({}),l=function(e){var t=n.useContext(u),r=t;return e&&(r="function"==typeof e?e(t):c(c({},t),e)),r},s=function(e){var t=l(e.components);return n.createElement(u.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,i=e.originalType,u=e.parentName,s=a(e,["components","mdxType","originalType","parentName"]),f=l(r),p=o,m=f["".concat(u,".").concat(p)]||f[p]||d[p]||i;return r?n.createElement(m,c(c({ref:t},s),{},{components:r})):n.createElement(m,c({ref:t},s))}));function p(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var i=r.length,c=new Array(i);c[0]=f;var a={};for(var u in t)hasOwnProperty.call(t,u)&&(a[u]=t[u]);a.originalType=e,a.mdxType="string"==typeof e?e:o,c[1]=a;for(var l=2;l=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var u=n.createContext({}),l=function(e){var t=n.useContext(u),r=t;return e&&(r="function"==typeof e?e(t):c(c({},t),e)),r},s=function(e){var t=l(e.components);return n.createElement(u.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,i=e.originalType,u=e.parentName,s=a(e,["components","mdxType","originalType","parentName"]),f=l(r),p=o,m=f["".concat(u,".").concat(p)]||f[p]||d[p]||i;return r?n.createElement(m,c(c({ref:t},s),{},{components:r})):n.createElement(m,c({ref:t},s))}));function p(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var i=r.length,c=new Array(i);c[0]=f;var a={};for(var u in t)hasOwnProperty.call(t,u)&&(a[u]=t[u]);a.originalType=e,a.mdxType="string"==typeof e?e:o,c[1]=a;for(var l=2;l=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var u=n.createContext({}),l=function(e){var t=n.useContext(u),r=t;return e&&(r="function"==typeof e?e(t):a(a({},t),e)),r},p=function(e){var t=l(e.components);return n.createElement(u.Provider,{value:t},e.children)},s={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,i=e.originalType,u=e.parentName,p=c(e,["components","mdxType","originalType","parentName"]),f=l(r),d=o,m=f["".concat(u,".").concat(d)]||f[d]||s[d]||i;return r?n.createElement(m,a(a({ref:t},p),{},{components:r})):n.createElement(m,a({ref:t},p))}));function d(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var i=r.length,a=new Array(i);a[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:o,a[1]=c;for(var l=2;l=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var a=n.createContext({}),s=function(e){var t=n.useContext(a),r=t;return e&&(r="function"==typeof e?e(t):c(c({},t),e)),r},p=function(e){var t=s(e.components);return n.createElement(a.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},l=n.forwardRef((function(e,t){var r=e.components,i=e.mdxType,o=e.originalType,a=e.parentName,p=u(e,["components","mdxType","originalType","parentName"]),l=s(r),f=i,m=l["".concat(a,".").concat(f)]||l[f]||d[f]||o;return r?n.createElement(m,c(c({ref:t},p),{},{components:r})):n.createElement(m,c({ref:t},p))}));function f(e,t){var r=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var o=r.length,c=new Array(o);c[0]=l;var u={};for(var a in t)hasOwnProperty.call(t,a)&&(u[a]=t[a]);u.originalType=e,u.mdxType="string"==typeof e?e:i,c[1]=u;for(var s=2;s=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var u=r.createContext({}),p=function(e){var t=r.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},i=function(e){var t=p(e.components);return r.createElement(u.Provider,{value:t},e.children)},s={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,l=e.originalType,u=e.parentName,i=c(e,["components","mdxType","originalType","parentName"]),d=p(n),m=a,f=d["".concat(u,".").concat(m)]||d[m]||s[m]||l;return n?r.createElement(f,o(o({ref:t},i),{},{components:n})):r.createElement(f,o({ref:t},i))}));function m(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var l=n.length,o=new Array(l);o[0]=d;var c={};for(var u in t)hasOwnProperty.call(t,u)&&(c[u]=t[u]);c.originalType=e,c.mdxType="string"==typeof e?e:a,o[1]=c;for(var p=2;p=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var u=r.createContext({}),p=function(e){var t=r.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},i=function(e){var t=p(e.components);return r.createElement(u.Provider,{value:t},e.children)},s={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,l=e.originalType,u=e.parentName,i=c(e,["components","mdxType","originalType","parentName"]),d=p(n),m=a,f=d["".concat(u,".").concat(m)]||d[m]||s[m]||l;return n?r.createElement(f,o(o({ref:t},i),{},{components:n})):r.createElement(f,o({ref:t},i))}));function m(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var l=n.length,o=new Array(l);o[0]=d;var c={};for(var u in t)hasOwnProperty.call(t,u)&&(c[u]=t[u]);c.originalType=e,c.mdxType="string"==typeof e?e:a,o[1]=c;for(var p=2;p=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}var s=r.createContext({}),p=function(e){var n=r.useContext(s),t=n;return e&&(t="function"==typeof e?e(n):a(a({},n),e)),t},u=function(e){var n=p(e.components);return r.createElement(s.Provider,{value:n},e.children)},l={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},d=r.forwardRef((function(e,n){var t=e.components,i=e.mdxType,o=e.originalType,s=e.parentName,u=c(e,["components","mdxType","originalType","parentName"]),d=p(t),m=i,f=d["".concat(s,".").concat(m)]||d[m]||l[m]||o;return t?r.createElement(f,a(a({ref:n},u),{},{components:t})):r.createElement(f,a({ref:n},u))}));function m(e,n){var t=arguments,i=n&&n.mdxType;if("string"==typeof e||i){var o=t.length,a=new Array(o);a[0]=d;var c={};for(var s in n)hasOwnProperty.call(n,s)&&(c[s]=n[s]);c.originalType=e,c.mdxType="string"==typeof e?e:i,a[1]=c;for(var p=2;p=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var p=r.createContext({}),u=function(e){var n=r.useContext(p),t=n;return e&&(t="function"==typeof e?e(n):i(i({},n),e)),t},c=function(e){var n=u(e.components);return r.createElement(p.Provider,{value:n},e.children)},s={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},k=r.forwardRef((function(e,n){var t=e.components,a=e.mdxType,l=e.originalType,p=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),k=u(t),d=a,m=k["".concat(p,".").concat(d)]||k[d]||s[d]||l;return t?r.createElement(m,i(i({ref:n},c),{},{components:t})):r.createElement(m,i({ref:n},c))}));function d(e,n){var t=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var l=t.length,i=new Array(l);i[0]=k;var o={};for(var p in n)hasOwnProperty.call(n,p)&&(o[p]=n[p]);o.originalType=e,o.mdxType="string"==typeof e?e:a,i[1]=o;for(var u=2;u {\n console.log('Worker math add result:', v);\n});\n")),(0,l.kt)("p",null,"\u8fd9\u4e2a\u51fd\u6570\u5c06\u5728 Worker \u7ebf\u7a0b\u5185\u6267\u884c\uff0c\u800c\u4e0d\u4f1a\u963b\u585e\u4e3b\u7ebf\u7a0b\u3002"),(0,l.kt)("p",null,"\u8ba9\u6211\u4eec\u6765\u7f16\u5199\u4e00\u4e2a\u5728 Worker \u7ebf\u7a0b\u4e2d\u8ba1\u7b97\u6590\u6ce2\u90a3\u5951\u6570\u5217\u7684\u51fd\u6570\uff0c\u6765\u6df1\u5165\u4e86\u89e3\u591a\u7ebf\u7a0b\u4ee3\u7801\u7684\u7f16\u5199\uff01"),(0,l.kt)("h2",{id:"\u7f16\u5199\u591a\u7ebf\u7a0b\u811a\u672c"},"\u7f16\u5199\u591a\u7ebf\u7a0b\u811a\u672c"),(0,l.kt)("h3",{id:"\u521b\u5efa\u811a\u672c"},"\u521b\u5efa\u811a\u672c"),(0,l.kt)("p",null,"\u6211\u4eec\u5148\u5728 ",(0,l.kt)("inlineCode",{parentName:"p"},"src")," \u76ee\u5f55\u521b\u5efa\u4e00\u4e2a ",(0,l.kt)("inlineCode",{parentName:"p"},"fibonacci.js")," \u811a\u672c\u3002"),(0,l.kt)("p",null,"\u7136\u540e\u5728 ",(0,l.kt)("inlineCode",{parentName:"p"},"index.js")," \u6dfb\u52a0\u65b0\u7684\u4e00\u884c\u6765\u5bfc\u5165\u5b83\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},'require("fibonacci.js");\n')),(0,l.kt)("p",null,"\u8fd9\u6837\u5f15\u64ce\u5728\u521b\u5efa Worker \u65f6\u624d\u4f1a\u6267\u884c\u8fd9\u4e2a\u65b0\u811a\u672c\u3002"),(0,l.kt)("h3",{id:"\u7f16\u5199\u51fd\u6570"},"\u7f16\u5199\u51fd\u6570"),(0,l.kt)("p",null,"\u5728 ",(0,l.kt)("inlineCode",{parentName:"p"},"fibonacci.js")," \u811a\u672c\u4e2d\u5b9e\u73b0\u8ba1\u7b97\u6590\u6ce2\u90a3\u5951\u7684\u51fd\u6570\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},"function _fibonacci(n) {\n if (n <= 0) return 0;\n if (n === 1) return 1;\n return fibonacci(n - 1) + fibonacci(n - 2);\n}\n")),(0,l.kt)("h3",{id:"\u5bfc\u51fa\u51fd\u6570\u5230\u4e3b\u7ebf\u7a0b"},"\u5bfc\u51fa\u51fd\u6570\u5230\u4e3b\u7ebf\u7a0b"),(0,l.kt)("p",null,"\u73b0\u5728\uff0c\u867d\u7136\u5728 Worker \u7ebf\u7a0b\u4e2d\u6211\u4eec\u6709\u4e86\u8fd9\u4e2a\u51fd\u6570\uff0c\u4f46\u662f\u6211\u4eec\u65e0\u6cd5\u5728\u4e3b\u7ebf\u7a0b\u8c03\u7528\u5b83\u3002"),(0,l.kt)("p",null,"\u4e0e Worker \u7ebf\u7a0b\u7684\u901a\u4fe1\u901a\u5e38\u4f7f\u7528 ",(0,l.kt)("inlineCode",{parentName:"p"},"postMessage")," \u548c ",(0,l.kt)("inlineCode",{parentName:"p"},"onMessage")," \u8fdb\u884c\uff0c\u4f46\u662f\u9700\u8981\u5904\u7406\u5f88\u591a\u8fb9\u7f18\u60c5\u51b5\uff0c\u800c\u4e14\u8fd9\u6837\u7684\u5f00\u53d1\u4f53\u9a8c\u4e5f\u8f83\u5dee\uff0c\u6240\u4ee5\u793e\u533a\u7248\u63d0\u4f9b\u4e86\u4e00\u4e2a\u5c01\u88c5\u3002"),(0,l.kt)("p",null,"\u6211\u4eec\u9700\u8981\u5bfc\u5165 ",(0,l.kt)("inlineCode",{parentName:"p"},"registerHandler")," \u51fd\u6570\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},'const { registerHandler } = require("ipc-worker.js");\n')),(0,l.kt)("p",null,"\u8be5\u51fd\u6570\u7684\u7b7e\u540d\u662f\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"export function registerHandler(name: string, handler: object): void;\n")),(0,l.kt)("p",null,"\u8c03\u7528\u51fd\u6570\u65f6\uff0c\u51fd\u6570\u4f1a\u6267\u884c\u4ee5\u4e0b\u64cd\u4f5c\uff1a"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"\u5728\u5168\u5c40\u53d8\u91cf ",(0,l.kt)("inlineCode",{parentName:"li"},"worker")," \u7684\u5bf9\u8c61\u4e0a\u589e\u52a0\u4e00\u4e2a\u4e0e\u4f20\u5165 ",(0,l.kt)("inlineCode",{parentName:"li"},"name")," \u4e00\u6837\u7684\u5bf9\u8c61\u5c5e\u6027\u3002"),(0,l.kt)("li",{parentName:"ul"},"\u904d\u5386\u4f20\u5165 ",(0,l.kt)("inlineCode",{parentName:"li"},"handler")," \u5bf9\u8c61\u4e0a\u7684\u6240\u6709\u5c5e\u6027\uff0c\u6309\u89c4\u5219\u5728 ",(0,l.kt)("inlineCode",{parentName:"li"},"worker.")," \u5bf9\u8c61\u4e0a\u521b\u5efa\u5bf9\u5e94\u7684\u51fd\u6570\u3002")),(0,l.kt)("p",null,"\u4e5f\u5c31\u662f\u8bf4\uff0c\u6211\u4eec\u53ea\u9700\u8981\u5c06 ",(0,l.kt)("inlineCode",{parentName:"p"},"fibonacci")," \u51fd\u6570\u4f20\u5165\u5230 ",(0,l.kt)("inlineCode",{parentName:"p"},"registerHandler")," \u51fd\u6570\u5e76\u8c03\u7528\uff0c\u51fd\u6570\u5c31\u53ef\u4ee5\u5728\u4e3b\u7ebf\u7a0b\u4e2d\u8c03\u7528\u4e86\uff01"),(0,l.kt)("p",null,"\u4ee5\u4e0b\u662f\u5b8c\u6574\u7684 ",(0,l.kt)("inlineCode",{parentName:"p"},"fibonacci.js")," \u5185\u5bb9\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},'const { registerHandler } = require("ipc-worker.js");\n\nfunction _fibonacci(n) {\n if (n <= 0) return 0;\n if (n === 1) return 1;\n return fibonacci(n - 1) + fibonacci(n - 2);\n}\n\nfunction fibonacci(n, callback) {\n callback(_fibonacci(n));\n}\n\nregisterHandler("utils", {\n fibonacci,\n});\n')),(0,l.kt)("h3",{id:"\u5bfc\u51fa\u7684\u5185\u90e8\u539f\u7406"},"\u5bfc\u51fa\u7684\u5185\u90e8\u539f\u7406"),(0,l.kt)("p",null,"\u4f60\u53ef\u80fd\u6ce8\u610f\u5230\u4e86\u6211\u4eec\u5bfc\u51fa\u7684\u662f\u53e6\u4e00\u4e2a\u51fd\u6570\uff0c\u800c\u4e0d\u662f\u76f4\u63a5\u5bfc\u51fa ",(0,l.kt)("inlineCode",{parentName:"p"},"_fibonacci")," \u51fd\u6570\u3002"),(0,l.kt)("p",null,"\u56e0\u4e3a\u8fd9\u662f\u5b9e\u73b0\u4e00\u4e2a\u8de8\u7ebf\u7a0b\u8c03\u7528\u51fd\u6570\u65f6\u9700\u8981\u9075\u5faa\u7684\u89c4\u8303\uff1a"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"\u4e0e ",(0,l.kt)("inlineCode",{parentName:"li"},"postMessage")," \u7684\u8981\u6c42\u4e00\u6837\uff0c\u51fd\u6570\u7684\u6240\u6709\u53c2\u6570\u5fc5\u987b\u662f\u53ef\u5e8f\u5217\u5316\u7684\u3002"),(0,l.kt)("li",{parentName:"ul"},"\u5f53\u51fd\u6570\u88ab\u8c03\u7528\u65f6\uff0c\u4f1a\u5728\u51fd\u6570\u6700\u540e\u4e00\u4e2a\u53c2\u6570\u4f20\u5165\u4e00\u4e2a\u56de\u8c03\u51fd\u6570\uff0c\u5f53\u9700\u8981\u8fd4\u56de\u5230\u4e3b\u7ebf\u7a0b\u65f6\uff0c\u8bf7\u8c03\u7528\u8be5\u51fd\u6570\u3002")),(0,l.kt)("p",null,"\u50cf\u4e0a\u9762 ",(0,l.kt)("inlineCode",{parentName:"p"},"fibonacci")," \u51fd\u6570\u7684\u5b9e\u73b0\uff0c\u5728\u8c03\u7528 ",(0,l.kt)("inlineCode",{parentName:"p"},"_fibonacci")," \u62ff\u5230\u8ba1\u7b97\u7ed3\u679c\u540e\uff0c\u901a\u8fc7\u8c03\u7528 ",(0,l.kt)("inlineCode",{parentName:"p"},"callback(v)")," \u5c06\u503c\u8fd4\u56de\u5230\u4e3b\u7ebf\u7a0b\u3002"),(0,l.kt)("p",null,"\u800c\u5728\u4e3b\u7ebf\u7a0b\u4e2d\uff0c\u6211\u4eec\u9700\u8981\u50cf\u8fd9\u6837\u4ece\u4e3b\u7ebf\u7a0b\u8c03\u7528 Worker \u7ebf\u7a0b\u4e2d\u7684\u8fd9\u4e2a\u51fd\u6570\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},"worker.utils.fibonacci([10], ([v]) => {\n console.log('Worker fibonacci result:', v);\n});\n")),(0,l.kt)("p",null,"\u4f60\u53ef\u80fd\u6ce8\u610f\u5230\u4e86\uff0c\u7b2c\u4e00\u4e2a\u53c2\u6570\u662f\u6570\u7ec4\uff0c\u800c\u7b2c\u4e8c\u4e2a\u53c2\u6570\u7684\u56de\u8c03\u7684\u7b2c\u4e00\u4e2a\u53c2\u6570\u4e5f\u662f\u6570\u7ec4\uff0c\u8fd9\u4e5f\u662f\u89c4\u8303\u3002"),(0,l.kt)("p",null,"\u4e3a\u4e86\u63d0\u9ad8\u8de8\u7ebf\u7a0b\u901a\u4fe1\u7684\u6027\u80fd\uff0c\u51cf\u5c11\u5783\u573e\u56de\u6536\u7684\u9891\u7387\uff0c\u6240\u4ee5\u9009\u62e9\u4e86\u8fd9\u79cd\u8c03\u7528\u7684\u65b9\u5f0f\u3002"),(0,l.kt)("p",null,"\u4f60\u53ef\u4ee5\u8fd9\u6837\u7406\u89e3 ",(0,l.kt)("inlineCode",{parentName:"p"},"worker.xxx.xxx()")," \u7684\u8c03\u7528\u7b7e\u540d\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"worker.utils.fibonacci(args, (values) => ...);\n\n// utils: \u8981\u8c03\u7528\u7684 handler \u540d\u79f0\n// fibonacci: \u8981\u8c03\u7528 handler \u4e2d\u7684 Worker \u51fd\u6570\u540d\u79f0\n// args: \u4f20\u5165\u5230 Worker \u51fd\u6570\u7684\u6240\u6709\u53c2\u6570\n// values: Worker \u51fd\u6570\u8fd4\u56de\u65f6\u7684\u56de\u8c03\uff0c\u53c2\u6570\u662f\u8fd4\u56de\u503c\u6570\u7ec4\n")),(0,l.kt)("p",null,"\u8fd9\u5f88\u597d\u7406\u89e3\uff0c\u6211\u4eec\u518d\u4e3e\u4e2a\u591a\u53c2\u6570\u8c03\u7528\u7684\u4f8b\u5b50\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},'// Worker \u7ebf\u7a0b\u7684\u51fd\u6570\nfunction handle(a, b, c, callback) {\n // a = "ye.", b = {}, c = 1000\n callback(1, "text", { prop: 2 });\n}\n\n// \u4e3b\u7ebf\u7a0b\u7684\u8c03\u7528\u65b9\u5f0f\nworker.utils.handle(["ye.", {}, 1000], ([v1, v2, v3]) => {\n // v1 = 1, v2 = "text", v3 = { prop: 2 }\n});\n')),(0,l.kt)("h3",{id:"\u66f4\u591a\u5bfc\u51fa\u573a\u666f"},"\u66f4\u591a\u5bfc\u51fa\u573a\u666f"),(0,l.kt)("p",null,"\u65e0\u53c2\u6570\u51fd\u6570\u7684\u5b9e\u73b0\u4e0e\u8c03\u7528\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},"// Worker \u7ebf\u7a0b\u7684\u51fd\u6570\nfunction setValue(callback) {\n // ...\n callback();\n}\n\n// \u4e3b\u7ebf\u7a0b\u7684\u8c03\u7528\u65b9\u5f0f\nworker.utils.setValue(() => {\n // ok.\n});\n")),(0,l.kt)("p",null,"\u65e0\u9700\u8fd4\u56de\u7684\u51fd\u6570\u7684\u5b9e\u73b0\u4e0e\u8c03\u7528\uff08\u8fd9\u540c\u65f6\u80fd\u8282\u7701 Worker \u7684\u901a\u4fe1\u5f00\u9500\uff0c\u56e0\u4e3a\u53ea\u9700\u8981\u5355\u5411\u901a\u4fe1\uff01\uff09\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},'// Worker \u7ebf\u7a0b\u7684\u51fd\u6570\nfunction setValue(v) {\n // ...\n // \u6267\u884c\u5b8c\u6210\u4e4b\u540e\u4e0d\u8c03\u7528 callback\uff0c\u751a\u81f3\u4e0d\u7528\u58f0\u660e\n}\n\n// \u4e3b\u7ebf\u7a0b\u7684\u8c03\u7528\u65b9\u5f0f\nworker.utils.setValue(["ye."]);\n')),(0,l.kt)("p",null,"\u65e0\u53c2\u6570\u4e5f\u65e0\u8fd4\u56de\u7684\u51fd\u6570\u7684\u5b9e\u73b0\u4e0e\u8c03\u7528\uff08\u8fd9\u540c\u65f6\u80fd\u8282\u7701 Worker \u7684\u901a\u4fe1\u5f00\u9500\uff0c\u56e0\u4e3a\u53ea\u9700\u8981\u5355\u5411\u901a\u4fe1\uff01\uff09\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},"// Worker \u7ebf\u7a0b\u7684\u51fd\u6570\nfunction setValue() {\n // ...\n // \u6267\u884c\u5b8c\u6210\u4e4b\u540e\u4e0d\u8c03\u7528 callback\uff0c\u751a\u81f3\u4e0d\u7528\u58f0\u660e\n}\n\n// \u4e3b\u7ebf\u7a0b\u7684\u8c03\u7528\u65b9\u5f0f\nworker.utils.setValue();\n")),(0,l.kt)("p",null,"\u9664\u4e86\u51fd\u6570\u4e4b\u5916\uff0c\u4f60\u8fd8\u53ef\u4ee5\u5bfc\u51fa\u503c\u3001getter/setter \u5c5e\u6027\uff0c\u4f46\u9700\u8981\u6ce8\u610f\u9700\u901a\u8fc7 ",(0,l.kt)("inlineCode",{parentName:"p"},"get_xxx"),"\u3001",(0,l.kt)("inlineCode",{parentName:"p"},"set_xxx")," \u548c ",(0,l.kt)("inlineCode",{parentName:"p"},"write_xxx")," \u4e09\u4e2a\u4ee3\u7406\u51fd\u6570\u8fdb\u884c\u8bbf\u95ee\u4e0e\u4fee\u6539\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},'// Worker \u7ebf\u7a0b\u4e2d\uff1a\n\nregisterHandler("Date", {\n time: 1,\n});\n\n// \u4e3b\u7ebf\u7a0b\u4e2d\uff1a\n\n// \u83b7\u53d6\u503c\nworker.Date.get_time(([v]) => {\n // v is 1.\n});\n\n// \u4fee\u6539\u503c\uff0c\u4e0d\u4f1a\u56de\u8c03\uff0c\u6027\u80fd\u6bd4 write \u66f4\u9ad8\nworker.Date.set_time([100]);\n\n// \u4fee\u6539\u503c\uff0c\u4f1a\u56de\u8c03\u4ee5\u901a\u77e5\u64cd\u4f5c\u5df2\u6267\u884c\u5b8c\u6bd5\nworker.Date.write_time([100], () => {\n // finish.\n});\n')),(0,l.kt)("h2",{id:"\u7f16\u8bd1\u591a\u7ebf\u7a0b\u6269\u5c55"},"\u7f16\u8bd1\u591a\u7ebf\u7a0b\u6269\u5c55"),(0,l.kt)("p",null,"\u6bcf\u6b21\u4fee\u6539\u6269\u5c55\u4ee3\u7801\u4e4b\u540e\uff0c\u9700\u8981\u624b\u52a8\u70b9\u51fb ",(0,l.kt)("strong",{parentName:"p"},"\u9879\u76ee - \u91cd\u65b0\u7f16\u8bd1\u591a\u7ebf\u7a0b\u6269\u5c55")," \u4ee5\u751f\u6548\u3002"),(0,l.kt)("p",null,"\u7279\u522b\u6ce8\u610f\uff1a",(0,l.kt)("strong",{parentName:"p"},"\u5c31\u50cf\u4fee\u6539\u591a\u7ebf\u7a0b\u7684\u8bbe\u7f6e\u4f1a\u5f71\u54cd\u5230\u6240\u6709\u9879\u76ee\u4e00\u6837\uff0c\u591a\u7ebf\u7a0b\u6269\u5c55\u7684\u7f16\u8bd1\u7ed3\u679c\u4e5f\u662f\u6240\u6709\u9879\u76ee\u5171\u7528\u7684\uff01")),(0,l.kt)("p",null,"\u6240\u4ee5\u5f53\u4f60",(0,l.kt)("strong",{parentName:"p"},"\u6784\u5efa\u67d0\u4e2a\u9879\u76ee\u4e4b\u524d\uff0c\u5fc5\u987b\u786e\u4fdd\u6700\u540e\u4e00\u6b21\u7f16\u8bd1\u662f\u5f53\u524d\u9879\u76ee\u7684\u591a\u7ebf\u7a0b\u6269\u5c55"),"\uff01"))}d.isMDXComponent=!0},97029:function(e,n,t){n.Z=t.p+"assets/images/custom_worker_struct-80bd570e270783db7d11ab575cef834f.png"}}]); \ No newline at end of file diff --git a/assets/js/4d755c19.aa3c2a23.js b/assets/js/4d755c19.aa3c2a23.js new file mode 100644 index 00000000..6174fc63 --- /dev/null +++ b/assets/js/4d755c19.aa3c2a23.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[3050],{3905:function(e,n,t){t.d(n,{Zo:function(){return c},kt:function(){return d}});var r=t(67294);function a(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function l(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 i(e){for(var n=1;n=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var p=r.createContext({}),u=function(e){var n=r.useContext(p),t=n;return e&&(t="function"==typeof e?e(n):i(i({},n),e)),t},c=function(e){var n=u(e.components);return r.createElement(p.Provider,{value:n},e.children)},s={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},k=r.forwardRef((function(e,n){var t=e.components,a=e.mdxType,l=e.originalType,p=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),k=u(t),d=a,m=k["".concat(p,".").concat(d)]||k[d]||s[d]||l;return t?r.createElement(m,i(i({ref:n},c),{},{components:t})):r.createElement(m,i({ref:n},c))}));function d(e,n){var t=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var l=t.length,i=new Array(l);i[0]=k;var o={};for(var p in n)hasOwnProperty.call(n,p)&&(o[p]=n[p]);o.originalType=e,o.mdxType="string"==typeof e?e:a,i[1]=o;for(var u=2;u {\n console.log('Worker math add result:', v);\n});\n")),(0,l.kt)("p",null,"\u8fd9\u4e2a\u51fd\u6570\u5c06\u5728 Worker \u7ebf\u7a0b\u5185\u6267\u884c\uff0c\u800c\u4e0d\u4f1a\u963b\u585e\u4e3b\u7ebf\u7a0b\u3002"),(0,l.kt)("p",null,"\u8ba9\u6211\u4eec\u6765\u7f16\u5199\u4e00\u4e2a\u5728 Worker \u7ebf\u7a0b\u4e2d\u8ba1\u7b97\u6590\u6ce2\u90a3\u5951\u6570\u5217\u7684\u51fd\u6570\uff0c\u6765\u6df1\u5165\u4e86\u89e3\u591a\u7ebf\u7a0b\u4ee3\u7801\u7684\u7f16\u5199\uff01"),(0,l.kt)("h2",{id:"\u7f16\u5199\u591a\u7ebf\u7a0b\u811a\u672c"},"\u7f16\u5199\u591a\u7ebf\u7a0b\u811a\u672c"),(0,l.kt)("h3",{id:"\u521b\u5efa\u811a\u672c"},"\u521b\u5efa\u811a\u672c"),(0,l.kt)("p",null,"\u6211\u4eec\u5148\u5728 ",(0,l.kt)("inlineCode",{parentName:"p"},"src")," \u76ee\u5f55\u521b\u5efa\u4e00\u4e2a ",(0,l.kt)("inlineCode",{parentName:"p"},"fibonacci.js")," \u811a\u672c\u3002"),(0,l.kt)("p",null,"\u7136\u540e\u5728 ",(0,l.kt)("inlineCode",{parentName:"p"},"index.js")," \u6dfb\u52a0\u65b0\u7684\u4e00\u884c\u6765\u5bfc\u5165\u5b83\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},'require("fibonacci.js");\n')),(0,l.kt)("p",null,"\u8fd9\u6837\u5f15\u64ce\u5728\u521b\u5efa Worker \u65f6\u624d\u4f1a\u6267\u884c\u8fd9\u4e2a\u65b0\u811a\u672c\u3002"),(0,l.kt)("h3",{id:"\u7f16\u5199\u51fd\u6570"},"\u7f16\u5199\u51fd\u6570"),(0,l.kt)("p",null,"\u5728 ",(0,l.kt)("inlineCode",{parentName:"p"},"fibonacci.js")," \u811a\u672c\u4e2d\u5b9e\u73b0\u8ba1\u7b97\u6590\u6ce2\u90a3\u5951\u7684\u51fd\u6570\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},"function _fibonacci(n) {\n if (n <= 0) return 0;\n if (n === 1) return 1;\n return fibonacci(n - 1) + fibonacci(n - 2);\n}\n")),(0,l.kt)("h3",{id:"\u5bfc\u51fa\u51fd\u6570\u5230\u4e3b\u7ebf\u7a0b"},"\u5bfc\u51fa\u51fd\u6570\u5230\u4e3b\u7ebf\u7a0b"),(0,l.kt)("p",null,"\u73b0\u5728\uff0c\u867d\u7136\u5728 Worker \u7ebf\u7a0b\u4e2d\u6211\u4eec\u6709\u4e86\u8fd9\u4e2a\u51fd\u6570\uff0c\u4f46\u662f\u6211\u4eec\u65e0\u6cd5\u5728\u4e3b\u7ebf\u7a0b\u8c03\u7528\u5b83\u3002"),(0,l.kt)("p",null,"\u4e0e Worker \u7ebf\u7a0b\u7684\u901a\u4fe1\u901a\u5e38\u4f7f\u7528 ",(0,l.kt)("inlineCode",{parentName:"p"},"postMessage")," \u548c ",(0,l.kt)("inlineCode",{parentName:"p"},"onMessage")," \u8fdb\u884c\uff0c\u4f46\u662f\u9700\u8981\u5904\u7406\u5f88\u591a\u8fb9\u7f18\u60c5\u51b5\uff0c\u800c\u4e14\u8fd9\u6837\u7684\u5f00\u53d1\u4f53\u9a8c\u4e5f\u8f83\u5dee\uff0c\u6240\u4ee5\u793e\u533a\u7248\u63d0\u4f9b\u4e86\u4e00\u4e2a\u5c01\u88c5\u3002"),(0,l.kt)("p",null,"\u6211\u4eec\u9700\u8981\u5bfc\u5165 ",(0,l.kt)("inlineCode",{parentName:"p"},"registerHandler")," \u51fd\u6570\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},'const { registerHandler } = require("ipc-worker.js");\n')),(0,l.kt)("p",null,"\u8be5\u51fd\u6570\u7684\u7b7e\u540d\u662f\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"export function registerHandler(name: string, handler: object): void;\n")),(0,l.kt)("p",null,"\u8c03\u7528\u51fd\u6570\u65f6\uff0c\u51fd\u6570\u4f1a\u6267\u884c\u4ee5\u4e0b\u64cd\u4f5c\uff1a"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"\u5728\u5168\u5c40\u53d8\u91cf ",(0,l.kt)("inlineCode",{parentName:"li"},"worker")," \u7684\u5bf9\u8c61\u4e0a\u589e\u52a0\u4e00\u4e2a\u4e0e\u4f20\u5165 ",(0,l.kt)("inlineCode",{parentName:"li"},"name")," \u4e00\u6837\u7684\u5bf9\u8c61\u5c5e\u6027\u3002"),(0,l.kt)("li",{parentName:"ul"},"\u904d\u5386\u4f20\u5165 ",(0,l.kt)("inlineCode",{parentName:"li"},"handler")," \u5bf9\u8c61\u4e0a\u7684\u6240\u6709\u5c5e\u6027\uff0c\u6309\u89c4\u5219\u5728 ",(0,l.kt)("inlineCode",{parentName:"li"},"worker.")," \u5bf9\u8c61\u4e0a\u521b\u5efa\u5bf9\u5e94\u7684\u51fd\u6570\u3002")),(0,l.kt)("p",null,"\u4e5f\u5c31\u662f\u8bf4\uff0c\u6211\u4eec\u53ea\u9700\u8981\u5c06 ",(0,l.kt)("inlineCode",{parentName:"p"},"fibonacci")," \u51fd\u6570\u4f20\u5165\u5230 ",(0,l.kt)("inlineCode",{parentName:"p"},"registerHandler")," \u51fd\u6570\u5e76\u8c03\u7528\uff0c\u51fd\u6570\u5c31\u53ef\u4ee5\u5728\u4e3b\u7ebf\u7a0b\u4e2d\u8c03\u7528\u4e86\uff01"),(0,l.kt)("p",null,"\u4ee5\u4e0b\u662f\u5b8c\u6574\u7684 ",(0,l.kt)("inlineCode",{parentName:"p"},"fibonacci.js")," \u5185\u5bb9\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},'const { registerHandler } = require("ipc-worker.js");\n\nfunction _fibonacci(n) {\n if (n <= 0) return 0;\n if (n === 1) return 1;\n return fibonacci(n - 1) + fibonacci(n - 2);\n}\n\nfunction fibonacci(n, callback) {\n callback(_fibonacci(n));\n}\n\nregisterHandler("utils", {\n fibonacci,\n});\n')),(0,l.kt)("h3",{id:"\u5bfc\u51fa\u7684\u5185\u90e8\u539f\u7406"},"\u5bfc\u51fa\u7684\u5185\u90e8\u539f\u7406"),(0,l.kt)("p",null,"\u4f60\u53ef\u80fd\u6ce8\u610f\u5230\u4e86\u6211\u4eec\u5bfc\u51fa\u7684\u662f\u53e6\u4e00\u4e2a\u51fd\u6570\uff0c\u800c\u4e0d\u662f\u76f4\u63a5\u5bfc\u51fa ",(0,l.kt)("inlineCode",{parentName:"p"},"_fibonacci")," \u51fd\u6570\u3002"),(0,l.kt)("p",null,"\u56e0\u4e3a\u8fd9\u662f\u5b9e\u73b0\u4e00\u4e2a\u8de8\u7ebf\u7a0b\u8c03\u7528\u51fd\u6570\u65f6\u9700\u8981\u9075\u5faa\u7684\u89c4\u8303\uff1a"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"\u4e0e ",(0,l.kt)("inlineCode",{parentName:"li"},"postMessage")," \u7684\u8981\u6c42\u4e00\u6837\uff0c\u51fd\u6570\u7684\u6240\u6709\u53c2\u6570\u5fc5\u987b\u662f\u53ef\u5e8f\u5217\u5316\u7684\u3002"),(0,l.kt)("li",{parentName:"ul"},"\u5f53\u51fd\u6570\u88ab\u8c03\u7528\u65f6\uff0c\u4f1a\u5728\u51fd\u6570\u6700\u540e\u4e00\u4e2a\u53c2\u6570\u4f20\u5165\u4e00\u4e2a\u56de\u8c03\u51fd\u6570\uff0c\u5f53\u9700\u8981\u8fd4\u56de\u5230\u4e3b\u7ebf\u7a0b\u65f6\uff0c\u8bf7\u8c03\u7528\u8be5\u51fd\u6570\u3002")),(0,l.kt)("p",null,"\u50cf\u4e0a\u9762 ",(0,l.kt)("inlineCode",{parentName:"p"},"fibonacci")," \u51fd\u6570\u7684\u5b9e\u73b0\uff0c\u5728\u8c03\u7528 ",(0,l.kt)("inlineCode",{parentName:"p"},"_fibonacci")," \u62ff\u5230\u8ba1\u7b97\u7ed3\u679c\u540e\uff0c\u901a\u8fc7\u8c03\u7528 ",(0,l.kt)("inlineCode",{parentName:"p"},"callback(v)")," \u5c06\u503c\u8fd4\u56de\u5230\u4e3b\u7ebf\u7a0b\u3002"),(0,l.kt)("p",null,"\u800c\u5728\u4e3b\u7ebf\u7a0b\u4e2d\uff0c\u6211\u4eec\u9700\u8981\u50cf\u8fd9\u6837\u4ece\u4e3b\u7ebf\u7a0b\u8c03\u7528 Worker \u7ebf\u7a0b\u4e2d\u7684\u8fd9\u4e2a\u51fd\u6570\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},"worker.utils.fibonacci([10], ([v]) => {\n console.log('Worker fibonacci result:', v);\n});\n")),(0,l.kt)("p",null,"\u4f60\u53ef\u80fd\u6ce8\u610f\u5230\u4e86\uff0c\u7b2c\u4e00\u4e2a\u53c2\u6570\u662f\u6570\u7ec4\uff0c\u800c\u7b2c\u4e8c\u4e2a\u53c2\u6570\u7684\u56de\u8c03\u7684\u7b2c\u4e00\u4e2a\u53c2\u6570\u4e5f\u662f\u6570\u7ec4\uff0c\u8fd9\u4e5f\u662f\u89c4\u8303\u3002"),(0,l.kt)("p",null,"\u4e3a\u4e86\u63d0\u9ad8\u8de8\u7ebf\u7a0b\u901a\u4fe1\u7684\u6027\u80fd\uff0c\u51cf\u5c11\u5783\u573e\u56de\u6536\u7684\u9891\u7387\uff0c\u6240\u4ee5\u9009\u62e9\u4e86\u8fd9\u79cd\u8c03\u7528\u7684\u65b9\u5f0f\u3002"),(0,l.kt)("p",null,"\u4f60\u53ef\u4ee5\u8fd9\u6837\u7406\u89e3 ",(0,l.kt)("inlineCode",{parentName:"p"},"worker.xxx.xxx()")," \u7684\u8c03\u7528\u7b7e\u540d\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"worker.utils.fibonacci(args, (values) => ...);\n\n// utils: \u8981\u8c03\u7528\u7684 handler \u540d\u79f0\n// fibonacci: \u8981\u8c03\u7528 handler \u4e2d\u7684 Worker \u51fd\u6570\u540d\u79f0\n// args: \u4f20\u5165\u5230 Worker \u51fd\u6570\u7684\u6240\u6709\u53c2\u6570\n// values: Worker \u51fd\u6570\u8fd4\u56de\u65f6\u7684\u56de\u8c03\uff0c\u53c2\u6570\u662f\u8fd4\u56de\u503c\u6570\u7ec4\n")),(0,l.kt)("p",null,"\u8fd9\u5f88\u597d\u7406\u89e3\uff0c\u6211\u4eec\u518d\u4e3e\u4e2a\u591a\u53c2\u6570\u8c03\u7528\u7684\u4f8b\u5b50\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},'// Worker \u7ebf\u7a0b\u7684\u51fd\u6570\nfunction handle(a, b, c, callback) {\n // a = "ye.", b = {}, c = 1000\n callback(1, "text", { prop: 2 });\n}\n\n// \u4e3b\u7ebf\u7a0b\u7684\u8c03\u7528\u65b9\u5f0f\nworker.utils.handle(["ye.", {}, 1000], ([v1, v2, v3]) => {\n // v1 = 1, v2 = "text", v3 = { prop: 2 }\n});\n')),(0,l.kt)("h3",{id:"\u66f4\u591a\u5bfc\u51fa\u573a\u666f"},"\u66f4\u591a\u5bfc\u51fa\u573a\u666f"),(0,l.kt)("p",null,"\u65e0\u53c2\u6570\u51fd\u6570\u7684\u5b9e\u73b0\u4e0e\u8c03\u7528\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},"// Worker \u7ebf\u7a0b\u7684\u51fd\u6570\nfunction setValue(callback) {\n // ...\n callback();\n}\n\n// \u4e3b\u7ebf\u7a0b\u7684\u8c03\u7528\u65b9\u5f0f\nworker.utils.setValue(() => {\n // ok.\n});\n")),(0,l.kt)("p",null,"\u65e0\u9700\u8fd4\u56de\u7684\u51fd\u6570\u7684\u5b9e\u73b0\u4e0e\u8c03\u7528\uff08\u8fd9\u540c\u65f6\u80fd\u8282\u7701 Worker \u7684\u901a\u4fe1\u5f00\u9500\uff0c\u56e0\u4e3a\u53ea\u9700\u8981\u5355\u5411\u901a\u4fe1\uff01\uff09\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},'// Worker \u7ebf\u7a0b\u7684\u51fd\u6570\nfunction setValue(v) {\n // ...\n // \u6267\u884c\u5b8c\u6210\u4e4b\u540e\u4e0d\u8c03\u7528 callback\uff0c\u751a\u81f3\u4e0d\u7528\u58f0\u660e\n}\n\n// \u4e3b\u7ebf\u7a0b\u7684\u8c03\u7528\u65b9\u5f0f\nworker.utils.setValue(["ye."]);\n')),(0,l.kt)("p",null,"\u65e0\u53c2\u6570\u4e5f\u65e0\u8fd4\u56de\u7684\u51fd\u6570\u7684\u5b9e\u73b0\u4e0e\u8c03\u7528\uff08\u8fd9\u540c\u65f6\u80fd\u8282\u7701 Worker \u7684\u901a\u4fe1\u5f00\u9500\uff0c\u56e0\u4e3a\u53ea\u9700\u8981\u5355\u5411\u901a\u4fe1\uff01\uff09\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},"// Worker \u7ebf\u7a0b\u7684\u51fd\u6570\nfunction setValue() {\n // ...\n // \u6267\u884c\u5b8c\u6210\u4e4b\u540e\u4e0d\u8c03\u7528 callback\uff0c\u751a\u81f3\u4e0d\u7528\u58f0\u660e\n}\n\n// \u4e3b\u7ebf\u7a0b\u7684\u8c03\u7528\u65b9\u5f0f\nworker.utils.setValue();\n")),(0,l.kt)("p",null,"\u9664\u4e86\u51fd\u6570\u4e4b\u5916\uff0c\u4f60\u8fd8\u53ef\u4ee5\u5bfc\u51fa\u503c\u3001getter/setter \u5c5e\u6027\uff0c\u4f46\u9700\u8981\u6ce8\u610f\u9700\u901a\u8fc7 ",(0,l.kt)("inlineCode",{parentName:"p"},"get_xxx"),"\u3001",(0,l.kt)("inlineCode",{parentName:"p"},"set_xxx")," \u548c ",(0,l.kt)("inlineCode",{parentName:"p"},"write_xxx")," \u4e09\u4e2a\u4ee3\u7406\u51fd\u6570\u8fdb\u884c\u8bbf\u95ee\u4e0e\u4fee\u6539\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},'// Worker \u7ebf\u7a0b\u4e2d\uff1a\n\nregisterHandler("Date", {\n time: 1,\n});\n\n// \u4e3b\u7ebf\u7a0b\u4e2d\uff1a\n\n// \u83b7\u53d6\u503c\nworker.Date.get_time(([v]) => {\n // v is 1.\n});\n\n// \u4fee\u6539\u503c\uff0c\u4e0d\u4f1a\u56de\u8c03\uff0c\u6027\u80fd\u6bd4 write \u66f4\u9ad8\nworker.Date.set_time([100]);\n\n// \u4fee\u6539\u503c\uff0c\u4f1a\u56de\u8c03\u4ee5\u901a\u77e5\u64cd\u4f5c\u5df2\u6267\u884c\u5b8c\u6bd5\nworker.Date.write_time([100], () => {\n // finish.\n});\n')),(0,l.kt)("h2",{id:"\u7f16\u8bd1\u591a\u7ebf\u7a0b\u6269\u5c55"},"\u7f16\u8bd1\u591a\u7ebf\u7a0b\u6269\u5c55"),(0,l.kt)("p",null,"\u6bcf\u6b21\u4fee\u6539\u6269\u5c55\u4ee3\u7801\u4e4b\u540e\uff0c\u9700\u8981\u624b\u52a8\u70b9\u51fb ",(0,l.kt)("strong",{parentName:"p"},"\u9879\u76ee - \u91cd\u65b0\u7f16\u8bd1\u591a\u7ebf\u7a0b\u6269\u5c55")," \u4ee5\u751f\u6548\u3002"),(0,l.kt)("p",null,"\u7279\u522b\u6ce8\u610f\uff1a",(0,l.kt)("strong",{parentName:"p"},"\u5c31\u50cf\u4fee\u6539\u591a\u7ebf\u7a0b\u7684\u8bbe\u7f6e\u4f1a\u5f71\u54cd\u5230\u6240\u6709\u9879\u76ee\u4e00\u6837\uff0c\u591a\u7ebf\u7a0b\u6269\u5c55\u7684\u7f16\u8bd1\u7ed3\u679c\u4e5f\u662f\u6240\u6709\u9879\u76ee\u5171\u7528\u7684\uff01")),(0,l.kt)("p",null,"\u6240\u4ee5\u5f53\u4f60",(0,l.kt)("strong",{parentName:"p"},"\u6784\u5efa\u67d0\u4e2a\u9879\u76ee\u4e4b\u524d\uff0c\u5fc5\u987b\u786e\u4fdd\u6700\u540e\u4e00\u6b21\u7f16\u8bd1\u662f\u5f53\u524d\u9879\u76ee\u7684\u591a\u7ebf\u7a0b\u6269\u5c55"),"\uff01"))}d.isMDXComponent=!0},97029:function(e,n,t){n.Z=t.p+"assets/images/custom_worker_struct-80bd570e270783db7d11ab575cef834f.png"}}]); \ No newline at end of file diff --git a/assets/js/5752b455.6322fbbe.js b/assets/js/5752b455.6322fbbe.js new file mode 100644 index 00000000..a0dd3453 --- /dev/null +++ b/assets/js/5752b455.6322fbbe.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[805],{3905:function(e,t,n){n.d(t,{Zo:function(){return p},kt:function(){return f}});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),l=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):c(c({},t),e)),n},p=function(e){var t=l(e.components);return r.createElement(s.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,s=e.parentName,p=o(e,["components","mdxType","originalType","parentName"]),d=l(n),f=a,m=d["".concat(s,".").concat(f)]||d[f]||u[f]||i;return n?r.createElement(m,c(c({ref:t},p),{},{components:n})):r.createElement(m,c({ref:t},p))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,c=new Array(i);c[0]=d;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o.mdxType="string"==typeof e?e:a,c[1]=o;for(var l=2;l=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var s=r.createContext({}),p=function(e){var t=r.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.createElement(s.Provider,{value:t},e.children)},l={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,i=e.mdxType,a=e.originalType,s=e.parentName,u=o(e,["components","mdxType","originalType","parentName"]),f=p(n),d=i,m=f["".concat(s,".").concat(d)]||f[d]||l[d]||a;return n?r.createElement(m,c(c({ref:t},u),{},{components:n})):r.createElement(m,c({ref:t},u))}));function d(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=n.length,c=new Array(a);c[0]=f;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o.mdxType="string"==typeof e?e:i,c[1]=o;for(var p=2;p=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var u=r.createContext({}),p=function(e){var n=r.useContext(u),t=n;return e&&(t="function"==typeof e?e(n):i(i({},n),e)),t},c=function(e){var n=p(e.components);return r.createElement(u.Provider,{value:n},e.children)},s={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},k=r.forwardRef((function(e,n){var t=e.components,a=e.mdxType,l=e.originalType,u=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),k=p(t),d=a,m=k["".concat(u,".").concat(d)]||k[d]||s[d]||l;return t?r.createElement(m,i(i({ref:n},c),{},{components:t})):r.createElement(m,i({ref:n},c))}));function d(e,n){var t=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var l=t.length,i=new Array(l);i[0]=k;var o={};for(var u in n)hasOwnProperty.call(n,u)&&(o[u]=n[u]);o.originalType=e,o.mdxType="string"==typeof e?e:a,i[1]=o;for(var p=2;p {\n console.log('Worker math add result:', v);\n});\n")),(0,l.kt)("p",null,"\u8fd9\u4e2a\u51fd\u6570\u5c06\u5728 Worker \u7ebf\u7a0b\u5185\u6267\u884c\uff0c\u800c\u4e0d\u4f1a\u963b\u585e\u4e3b\u7ebf\u7a0b\u3002"),(0,l.kt)("p",null,"\u8ba9\u6211\u4eec\u6765\u7f16\u5199\u4e00\u4e2a\u5728 Worker \u7ebf\u7a0b\u4e2d\u8ba1\u7b97\u6590\u6ce2\u90a3\u5951\u6570\u5217\u7684\u51fd\u6570\uff0c\u6765\u6df1\u5165\u4e86\u89e3\u591a\u7ebf\u7a0b\u4ee3\u7801\u7684\u7f16\u5199\uff01"),(0,l.kt)("h2",{id:"\u7f16\u5199\u591a\u7ebf\u7a0b\u811a\u672c"},"\u7f16\u5199\u591a\u7ebf\u7a0b\u811a\u672c"),(0,l.kt)("h3",{id:"\u521b\u5efa\u811a\u672c"},"\u521b\u5efa\u811a\u672c"),(0,l.kt)("p",null,"\u6211\u4eec\u5148\u5728 ",(0,l.kt)("inlineCode",{parentName:"p"},"src")," \u76ee\u5f55\u521b\u5efa\u4e00\u4e2a ",(0,l.kt)("inlineCode",{parentName:"p"},"fibonacci.js")," \u811a\u672c\u3002"),(0,l.kt)("p",null,"\u7136\u540e\u5728 ",(0,l.kt)("inlineCode",{parentName:"p"},"index.js")," \u6dfb\u52a0\u65b0\u7684\u4e00\u884c\u6765\u5bfc\u5165\u5b83\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},'require("fibonacci.js");\n')),(0,l.kt)("p",null,"\u8fd9\u6837\u5f15\u64ce\u5728\u521b\u5efa Worker \u65f6\u624d\u4f1a\u6267\u884c\u8fd9\u4e2a\u65b0\u811a\u672c\u3002"),(0,l.kt)("h3",{id:"\u7f16\u5199\u51fd\u6570"},"\u7f16\u5199\u51fd\u6570"),(0,l.kt)("p",null,"\u5728 ",(0,l.kt)("inlineCode",{parentName:"p"},"fibonacci.js")," \u811a\u672c\u4e2d\u5b9e\u73b0\u8ba1\u7b97\u6590\u6ce2\u90a3\u5951\u7684\u51fd\u6570\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},"function _fibonacci(n) {\n if (n <= 0) return 0;\n if (n === 1) return 1;\n return fibonacci(n - 1) + fibonacci(n - 2);\n}\n")),(0,l.kt)("h3",{id:"\u5bfc\u51fa\u51fd\u6570\u5230\u4e3b\u7ebf\u7a0b"},"\u5bfc\u51fa\u51fd\u6570\u5230\u4e3b\u7ebf\u7a0b"),(0,l.kt)("p",null,"\u73b0\u5728\uff0c\u867d\u7136\u5728 Worker \u7ebf\u7a0b\u4e2d\u6211\u4eec\u6709\u4e86\u8fd9\u4e2a\u51fd\u6570\uff0c\u4f46\u662f\u6211\u4eec\u65e0\u6cd5\u5728\u4e3b\u7ebf\u7a0b\u8c03\u7528\u5b83\u3002"),(0,l.kt)("p",null,"\u4e0e Worker \u7ebf\u7a0b\u7684\u901a\u4fe1\u901a\u5e38\u4f7f\u7528 ",(0,l.kt)("inlineCode",{parentName:"p"},"postMessage")," \u548c ",(0,l.kt)("inlineCode",{parentName:"p"},"onMessage")," \u8fdb\u884c\uff0c\u4f46\u662f\u9700\u8981\u5904\u7406\u5f88\u591a\u8fb9\u7f18\u60c5\u51b5\uff0c\u800c\u4e14\u8fd9\u6837\u7684\u5f00\u53d1\u4f53\u9a8c\u4e5f\u8f83\u5dee\uff0c\u6240\u4ee5\u793e\u533a\u7248\u63d0\u4f9b\u4e86\u4e00\u4e2a\u5c01\u88c5\u3002"),(0,l.kt)("p",null,"\u6211\u4eec\u9700\u8981\u5bfc\u5165 ",(0,l.kt)("inlineCode",{parentName:"p"},"registerHandler")," \u51fd\u6570\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},'const { registerHandler } = require("ipc-worker.js");\n')),(0,l.kt)("p",null,"\u8be5\u51fd\u6570\u7684\u7b7e\u540d\u662f\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"export function registerHandler(name: string, handler: object): void;\n")),(0,l.kt)("p",null,"\u8c03\u7528\u51fd\u6570\u65f6\uff0c\u51fd\u6570\u4f1a\u6267\u884c\u4ee5\u4e0b\u64cd\u4f5c\uff1a"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"\u5728\u5168\u5c40\u53d8\u91cf ",(0,l.kt)("inlineCode",{parentName:"li"},"worker")," \u7684\u5bf9\u8c61\u4e0a\u589e\u52a0\u4e00\u4e2a\u4e0e\u4f20\u5165 ",(0,l.kt)("inlineCode",{parentName:"li"},"name")," \u4e00\u6837\u7684\u5bf9\u8c61\u5c5e\u6027\u3002"),(0,l.kt)("li",{parentName:"ul"},"\u904d\u5386\u4f20\u5165 ",(0,l.kt)("inlineCode",{parentName:"li"},"handler")," \u5bf9\u8c61\u4e0a\u7684\u6240\u6709\u5c5e\u6027\uff0c\u6309\u89c4\u5219\u5728 ",(0,l.kt)("inlineCode",{parentName:"li"},"worker.")," \u5bf9\u8c61\u4e0a\u521b\u5efa\u5bf9\u5e94\u7684\u51fd\u6570\u3002")),(0,l.kt)("p",null,"\u4e5f\u5c31\u662f\u8bf4\uff0c\u6211\u4eec\u53ea\u9700\u8981\u5c06 ",(0,l.kt)("inlineCode",{parentName:"p"},"fibonacci")," \u51fd\u6570\u4f20\u5165\u5230 ",(0,l.kt)("inlineCode",{parentName:"p"},"registerHandler")," \u51fd\u6570\u5e76\u8c03\u7528\uff0c\u51fd\u6570\u5c31\u53ef\u4ee5\u5728\u4e3b\u7ebf\u7a0b\u4e2d\u8c03\u7528\u4e86\uff01"),(0,l.kt)("p",null,"\u4ee5\u4e0b\u662f\u5b8c\u6574\u7684 ",(0,l.kt)("inlineCode",{parentName:"p"},"fibonacci.js")," \u5185\u5bb9\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},'const { registerHandler } = require("ipc-worker.js");\n\nfunction _fibonacci(n) {\n if (n <= 0) return 0;\n if (n === 1) return 1;\n return fibonacci(n - 1) + fibonacci(n - 2);\n}\n\nfunction fibonacci(n, callback) {\n callback(_fibonacci(n));\n}\n\nregisterHandler("utils", {\n fibonacci,\n});\n')),(0,l.kt)("h3",{id:"\u5bfc\u51fa\u7684\u5185\u90e8\u539f\u7406"},"\u5bfc\u51fa\u7684\u5185\u90e8\u539f\u7406"),(0,l.kt)("p",null,"\u4f60\u53ef\u80fd\u6ce8\u610f\u5230\u4e86\u6211\u4eec\u5bfc\u51fa\u7684\u662f\u53e6\u4e00\u4e2a\u51fd\u6570\uff0c\u800c\u4e0d\u662f\u76f4\u63a5\u5bfc\u51fa ",(0,l.kt)("inlineCode",{parentName:"p"},"_fibonacci")," \u51fd\u6570\u3002"),(0,l.kt)("p",null,"\u56e0\u4e3a\u8fd9\u662f\u5b9e\u73b0\u4e00\u4e2a\u8de8\u7ebf\u7a0b\u8c03\u7528\u51fd\u6570\u65f6\u9700\u8981\u9075\u5faa\u7684\u89c4\u8303\uff1a"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"\u4e0e ",(0,l.kt)("inlineCode",{parentName:"li"},"postMessage")," \u7684\u8981\u6c42\u4e00\u6837\uff0c\u51fd\u6570\u7684\u6240\u6709\u53c2\u6570\u5fc5\u987b\u662f\u53ef\u5e8f\u5217\u5316\u7684\u3002"),(0,l.kt)("li",{parentName:"ul"},"\u5f53\u51fd\u6570\u88ab\u8c03\u7528\u65f6\uff0c\u4f1a\u5728\u51fd\u6570\u6700\u540e\u4e00\u4e2a\u53c2\u6570\u4f20\u5165\u4e00\u4e2a\u56de\u8c03\u51fd\u6570\uff0c\u5f53\u9700\u8981\u8fd4\u56de\u5230\u4e3b\u7ebf\u7a0b\u65f6\uff0c\u8bf7\u8c03\u7528\u8be5\u51fd\u6570\u3002")),(0,l.kt)("p",null,"\u50cf\u4e0a\u9762 ",(0,l.kt)("inlineCode",{parentName:"p"},"fibonacci")," \u51fd\u6570\u7684\u5b9e\u73b0\uff0c\u5728\u8c03\u7528 ",(0,l.kt)("inlineCode",{parentName:"p"},"_fibonacci")," \u62ff\u5230\u8ba1\u7b97\u7ed3\u679c\u540e\uff0c\u901a\u8fc7\u8c03\u7528 ",(0,l.kt)("inlineCode",{parentName:"p"},"callback(v)")," \u5c06\u503c\u8fd4\u56de\u5230\u4e3b\u7ebf\u7a0b\u3002"),(0,l.kt)("p",null,"\u800c\u5728\u4e3b\u7ebf\u7a0b\u4e2d\uff0c\u6211\u4eec\u9700\u8981\u50cf\u8fd9\u6837\u4ece\u4e3b\u7ebf\u7a0b\u8c03\u7528 Worker \u7ebf\u7a0b\u4e2d\u7684\u8fd9\u4e2a\u51fd\u6570\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},"worker.utils.fibonacci([10], ([v]) => {\n console.log('Worker fibonacci result:', v);\n});\n")),(0,l.kt)("p",null,"\u4f60\u53ef\u80fd\u6ce8\u610f\u5230\u4e86\uff0c\u7b2c\u4e00\u4e2a\u53c2\u6570\u662f\u6570\u7ec4\uff0c\u800c\u7b2c\u4e8c\u4e2a\u53c2\u6570\u7684\u56de\u8c03\u7684\u7b2c\u4e00\u4e2a\u53c2\u6570\u4e5f\u662f\u6570\u7ec4\uff0c\u8fd9\u4e5f\u662f\u89c4\u8303\u3002"),(0,l.kt)("p",null,"\u4e3a\u4e86\u63d0\u9ad8\u8de8\u7ebf\u7a0b\u901a\u4fe1\u7684\u6027\u80fd\uff0c\u51cf\u5c11\u5783\u573e\u56de\u6536\u7684\u9891\u7387\uff0c\u6240\u4ee5\u9009\u62e9\u4e86\u8fd9\u79cd\u8c03\u7528\u7684\u65b9\u5f0f\u3002"),(0,l.kt)("p",null,"\u4f60\u53ef\u4ee5\u8fd9\u6837\u7406\u89e3 ",(0,l.kt)("inlineCode",{parentName:"p"},"worker.xxx.xxx()")," \u7684\u8c03\u7528\u7b7e\u540d\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"worker.utils.fibonacci(args, (values) => ...);\n\n// utils: \u8981\u8c03\u7528\u7684 handler \u540d\u79f0\n// fibonacci: \u8981\u8c03\u7528 handler \u4e2d\u7684 Worker \u51fd\u6570\u540d\u79f0\n// args: \u4f20\u5165\u5230 Worker \u51fd\u6570\u7684\u6240\u6709\u53c2\u6570\n// values: Worker \u51fd\u6570\u8fd4\u56de\u65f6\u7684\u56de\u8c03\uff0c\u53c2\u6570\u662f\u8fd4\u56de\u503c\u6570\u7ec4\n")),(0,l.kt)("p",null,"\u8fd9\u5f88\u597d\u7406\u89e3\uff0c\u6211\u4eec\u518d\u4e3e\u4e2a\u591a\u53c2\u6570\u8c03\u7528\u7684\u4f8b\u5b50\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},'// Worker \u7ebf\u7a0b\u7684\u51fd\u6570\nfunction handle(a, b, c, callback) {\n // a = "ye.", b = {}, c = 1000\n callback(1, "text", { prop: 2 });\n}\n\n// \u4e3b\u7ebf\u7a0b\u7684\u8c03\u7528\u65b9\u5f0f\nworker.utils.handle(["ye.", {}, 1000], ([v1, v2, v3]) => {\n // v1 = 1, v2 = "text", v3 = { prop: 2 }\n});\n')),(0,l.kt)("h3",{id:"\u66f4\u591a\u5bfc\u51fa\u573a\u666f"},"\u66f4\u591a\u5bfc\u51fa\u573a\u666f"),(0,l.kt)("p",null,"\u65e0\u53c2\u6570\u51fd\u6570\u7684\u5b9e\u73b0\u4e0e\u8c03\u7528\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},"// Worker \u7ebf\u7a0b\u7684\u51fd\u6570\nfunction setValue(callback) {\n // ...\n callback();\n}\n\n// \u4e3b\u7ebf\u7a0b\u7684\u8c03\u7528\u65b9\u5f0f\nworker.utils.setValue(() => {\n // ok.\n});\n")),(0,l.kt)("p",null,"\u65e0\u9700\u8fd4\u56de\u7684\u51fd\u6570\u7684\u5b9e\u73b0\u4e0e\u8c03\u7528\uff08\u8fd9\u540c\u65f6\u80fd\u8282\u7701 Worker \u7684\u901a\u4fe1\u5f00\u9500\uff0c\u56e0\u4e3a\u53ea\u9700\u8981\u5355\u5411\u901a\u4fe1\uff01\uff09\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},'// Worker \u7ebf\u7a0b\u7684\u51fd\u6570\nfunction setValue(v) {\n // ...\n // \u6267\u884c\u5b8c\u6210\u4e4b\u540e\u4e0d\u8c03\u7528 callback\uff0c\u751a\u81f3\u4e0d\u7528\u58f0\u660e\n}\n\n// \u4e3b\u7ebf\u7a0b\u7684\u8c03\u7528\u65b9\u5f0f\nworker.utils.setValue(["ye."]);\n')),(0,l.kt)("p",null,"\u65e0\u53c2\u6570\u4e5f\u65e0\u8fd4\u56de\u7684\u51fd\u6570\u7684\u5b9e\u73b0\u4e0e\u8c03\u7528\uff08\u8fd9\u540c\u65f6\u80fd\u8282\u7701 Worker \u7684\u901a\u4fe1\u5f00\u9500\uff0c\u56e0\u4e3a\u53ea\u9700\u8981\u5355\u5411\u901a\u4fe1\uff01\uff09\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},"// Worker \u7ebf\u7a0b\u7684\u51fd\u6570\nfunction setValue() {\n // ...\n // \u6267\u884c\u5b8c\u6210\u4e4b\u540e\u4e0d\u8c03\u7528 callback\uff0c\u751a\u81f3\u4e0d\u7528\u58f0\u660e\n}\n\n// \u4e3b\u7ebf\u7a0b\u7684\u8c03\u7528\u65b9\u5f0f\nworker.utils.setValue();\n")),(0,l.kt)("p",null,"\u9664\u4e86\u51fd\u6570\u4e4b\u5916\uff0c\u4f60\u8fd8\u53ef\u4ee5\u5bfc\u51fa\u503c\u3001getter/setter \u5c5e\u6027\uff0c\u4f46\u9700\u8981\u6ce8\u610f\u9700\u901a\u8fc7 ",(0,l.kt)("inlineCode",{parentName:"p"},"get_xxx"),"\u3001",(0,l.kt)("inlineCode",{parentName:"p"},"set_xxx")," \u548c ",(0,l.kt)("inlineCode",{parentName:"p"},"write_xxx")," \u4e09\u4e2a\u4ee3\u7406\u51fd\u6570\u8fdb\u884c\u8bbf\u95ee\u4e0e\u4fee\u6539\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},'// Worker \u7ebf\u7a0b\u4e2d\uff1a\n\nregisterHandler("Date", {\n time: 1,\n});\n\n// \u4e3b\u7ebf\u7a0b\u4e2d\uff1a\n\n// \u83b7\u53d6\u503c\nworker.Date.get_time(([v]) => {\n // v is 1.\n});\n\n// \u4fee\u6539\u503c\uff0c\u4e0d\u4f1a\u56de\u8c03\uff0c\u6027\u80fd\u6bd4 write \u66f4\u9ad8\nworker.Date.set_time([100]);\n\n// \u4fee\u6539\u503c\uff0c\u4f1a\u56de\u8c03\u4ee5\u901a\u77e5\u64cd\u4f5c\u5df2\u6267\u884c\u5b8c\u6bd5\nworker.Date.write_time([100], () => {\n // finish.\n});\n')),(0,l.kt)("h2",{id:"\u7f16\u8bd1\u591a\u7ebf\u7a0b\u6269\u5c55"},"\u7f16\u8bd1\u591a\u7ebf\u7a0b\u6269\u5c55"),(0,l.kt)("p",null,"\u6bcf\u6b21\u4fee\u6539\u6269\u5c55\u4ee3\u7801\u4e4b\u540e\uff0c\u9700\u8981\u624b\u52a8\u70b9\u51fb ",(0,l.kt)("strong",{parentName:"p"},"\u9879\u76ee - \u91cd\u65b0\u7f16\u8bd1\u591a\u7ebf\u7a0b\u6269\u5c55")," \u4ee5\u751f\u6548\u3002"),(0,l.kt)("p",null,"\u7279\u522b\u6ce8\u610f\uff1a",(0,l.kt)("strong",{parentName:"p"},"\u5c31\u50cf\u4fee\u6539\u591a\u7ebf\u7a0b\u7684\u8bbe\u7f6e\u4f1a\u5f71\u54cd\u5230\u6240\u6709\u9879\u76ee\u4e00\u6837\uff0c\u591a\u7ebf\u7a0b\u6269\u5c55\u7684\u7f16\u8bd1\u7ed3\u679c\u4e5f\u662f\u6240\u6709\u9879\u76ee\u5171\u7528\u7684\uff01")),(0,l.kt)("p",null,"\u6240\u4ee5\u5f53\u4f60",(0,l.kt)("strong",{parentName:"p"},"\u6784\u5efa\u67d0\u4e2a\u9879\u76ee\u4e4b\u524d\uff0c\u5fc5\u987b\u786e\u4fdd\u6700\u540e\u4e00\u6b21\u7f16\u8bd1\u662f\u5f53\u524d\u9879\u76ee\u7684\u591a\u7ebf\u7a0b\u6269\u5c55"),"\uff01"))}d.isMDXComponent=!0},63608:function(e,n,t){n.Z=t.p+"assets/images/custom_worker_struct-80bd570e270783db7d11ab575cef834f.png"}}]); \ No newline at end of file diff --git a/assets/js/5f765b5b.e3e00044.js b/assets/js/5f765b5b.e3e00044.js deleted file mode 100644 index a5dc05c0..00000000 --- a/assets/js/5f765b5b.e3e00044.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[3920],{3905:function(e,n,t){t.d(n,{Zo:function(){return c},kt:function(){return d}});var r=t(67294);function a(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function l(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 i(e){for(var n=1;n=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var u=r.createContext({}),p=function(e){var n=r.useContext(u),t=n;return e&&(t="function"==typeof e?e(n):i(i({},n),e)),t},c=function(e){var n=p(e.components);return r.createElement(u.Provider,{value:n},e.children)},k={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},s=r.forwardRef((function(e,n){var t=e.components,a=e.mdxType,l=e.originalType,u=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),s=p(t),d=a,m=s["".concat(u,".").concat(d)]||s[d]||k[d]||l;return t?r.createElement(m,i(i({ref:n},c),{},{components:t})):r.createElement(m,i({ref:n},c))}));function d(e,n){var t=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var l=t.length,i=new Array(l);i[0]=s;var o={};for(var u in n)hasOwnProperty.call(n,u)&&(o[u]=n[u]);o.originalType=e,o.mdxType="string"==typeof e?e:a,i[1]=o;for(var p=2;p {\n console.log('Worker math add result:', v);\n});\n")),(0,l.kt)("p",null,"\u8fd9\u4e2a\u51fd\u6570\u5c06\u5728 Worker \u7ebf\u7a0b\u5185\u6267\u884c\uff0c\u800c\u4e0d\u4f1a\u963b\u585e\u4e3b\u7ebf\u7a0b\u3002"),(0,l.kt)("p",null,"\u8ba9\u6211\u4eec\u6765\u7f16\u5199\u4e00\u4e2a\u5728 Worker \u7ebf\u7a0b\u4e2d\u8ba1\u7b97\u6590\u6ce2\u90a3\u5951\u6570\u5217\u7684\u51fd\u6570\uff0c\u6765\u6df1\u5165\u4e86\u89e3\u591a\u7ebf\u7a0b\u4ee3\u7801\u7684\u7f16\u5199\uff01"),(0,l.kt)("h2",{id:"\u7f16\u5199\u591a\u7ebf\u7a0b\u811a\u672c"},"\u7f16\u5199\u591a\u7ebf\u7a0b\u811a\u672c"),(0,l.kt)("h3",{id:"\u521b\u5efa\u811a\u672c"},"\u521b\u5efa\u811a\u672c"),(0,l.kt)("p",null,"\u6211\u4eec\u5148\u5728 ",(0,l.kt)("inlineCode",{parentName:"p"},"src")," \u76ee\u5f55\u521b\u5efa\u4e00\u4e2a ",(0,l.kt)("inlineCode",{parentName:"p"},"fibonacci.js")," \u811a\u672c\u3002"),(0,l.kt)("p",null,"\u7136\u540e\u5728 ",(0,l.kt)("inlineCode",{parentName:"p"},"index.js")," \u6dfb\u52a0\u65b0\u7684\u4e00\u884c\u6765\u5bfc\u5165\u5b83\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},'require("fibonacci.js");\n')),(0,l.kt)("p",null,"\u8fd9\u6837\u5f15\u64ce\u5728\u521b\u5efa Worker \u65f6\u624d\u4f1a\u6267\u884c\u8fd9\u4e2a\u65b0\u811a\u672c\u3002"),(0,l.kt)("h3",{id:"\u7f16\u5199\u51fd\u6570"},"\u7f16\u5199\u51fd\u6570"),(0,l.kt)("p",null,"\u5728 ",(0,l.kt)("inlineCode",{parentName:"p"},"fibonacci.js")," \u811a\u672c\u4e2d\u5b9e\u73b0\u8ba1\u7b97\u6590\u6ce2\u90a3\u5951\u7684\u51fd\u6570\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},"function _fibonacci(n) {\n if (n <= 0) return 0;\n if (n === 1) return 1;\n return fibonacci(n - 1) + fibonacci(n - 2);\n}\n")),(0,l.kt)("h3",{id:"\u5bfc\u51fa\u51fd\u6570\u5230\u4e3b\u7ebf\u7a0b"},"\u5bfc\u51fa\u51fd\u6570\u5230\u4e3b\u7ebf\u7a0b"),(0,l.kt)("p",null,"\u73b0\u5728\uff0c\u867d\u7136\u5728 Worker \u7ebf\u7a0b\u4e2d\u6211\u4eec\u6709\u4e86\u8fd9\u4e2a\u51fd\u6570\uff0c\u4f46\u662f\u6211\u4eec\u65e0\u6cd5\u5728\u4e3b\u7ebf\u7a0b\u8c03\u7528\u5b83\u3002"),(0,l.kt)("p",null,"\u4e0e Worker \u7ebf\u7a0b\u7684\u901a\u4fe1\u901a\u5e38\u4f7f\u7528 ",(0,l.kt)("inlineCode",{parentName:"p"},"postMessage")," \u548c ",(0,l.kt)("inlineCode",{parentName:"p"},"onMessage")," \u8fdb\u884c\uff0c\u4f46\u662f\u9700\u8981\u5904\u7406\u5f88\u591a\u8fb9\u7f18\u60c5\u51b5\uff0c\u800c\u4e14\u8fd9\u6837\u7684\u5f00\u53d1\u4f53\u9a8c\u4e5f\u8f83\u5dee\uff0c\u6240\u4ee5\u793e\u533a\u7248\u63d0\u4f9b\u4e86\u4e00\u4e2a\u5c01\u88c5\u3002"),(0,l.kt)("p",null,"\u6211\u4eec\u9700\u8981\u5bfc\u5165 ",(0,l.kt)("inlineCode",{parentName:"p"},"registerHandler")," \u51fd\u6570\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},'const { registerHandler } = require("ipc-worker.js");\n')),(0,l.kt)("p",null,"\u8be5\u51fd\u6570\u7684\u7b7e\u540d\u662f\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"export function registerHandler(name: string, handler: object): void;\n")),(0,l.kt)("p",null,"\u8c03\u7528\u51fd\u6570\u65f6\uff0c\u51fd\u6570\u4f1a\u6267\u884c\u4ee5\u4e0b\u64cd\u4f5c\uff1a"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"\u5728\u5168\u5c40\u53d8\u91cf ",(0,l.kt)("inlineCode",{parentName:"li"},"worker")," \u7684\u5bf9\u8c61\u4e0a\u589e\u52a0\u4e00\u4e2a\u4e0e\u4f20\u5165 ",(0,l.kt)("inlineCode",{parentName:"li"},"name")," \u4e00\u6837\u7684\u5bf9\u8c61\u5c5e\u6027\u3002"),(0,l.kt)("li",{parentName:"ul"},"\u904d\u5386\u4f20\u5165 ",(0,l.kt)("inlineCode",{parentName:"li"},"handler")," \u5bf9\u8c61\u4e0a\u7684\u6240\u6709\u5c5e\u6027\uff0c\u6309\u89c4\u5219\u5728 ",(0,l.kt)("inlineCode",{parentName:"li"},"worker.")," \u5bf9\u8c61\u4e0a\u521b\u5efa\u5bf9\u5e94\u7684\u51fd\u6570\u3002")),(0,l.kt)("p",null,"\u4e5f\u5c31\u662f\u8bf4\uff0c\u6211\u4eec\u53ea\u9700\u8981\u5c06 ",(0,l.kt)("inlineCode",{parentName:"p"},"fibonacci")," \u51fd\u6570\u4f20\u5165\u5230 ",(0,l.kt)("inlineCode",{parentName:"p"},"registerHandler")," \u51fd\u6570\u5e76\u8c03\u7528\uff0c\u51fd\u6570\u5c31\u53ef\u4ee5\u5728\u4e3b\u7ebf\u7a0b\u4e2d\u8c03\u7528\u4e86\uff01"),(0,l.kt)("p",null,"\u4ee5\u4e0b\u662f\u5b8c\u6574\u7684 ",(0,l.kt)("inlineCode",{parentName:"p"},"fibonacci.js")," \u5185\u5bb9\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},'const { registerHandler } = require("ipc-worker.js");\n\nfunction _fibonacci(n) {\n if (n <= 0) return 0;\n if (n === 1) return 1;\n return fibonacci(n - 1) + fibonacci(n - 2);\n}\n\nfunction fibonacci(n, callback) {\n callback(_fibonacci(n));\n}\n\nregisterHandler("utils", {\n fibonacci,\n});\n')),(0,l.kt)("h3",{id:"\u5bfc\u51fa\u7684\u5185\u90e8\u539f\u7406"},"\u5bfc\u51fa\u7684\u5185\u90e8\u539f\u7406"),(0,l.kt)("p",null,"\u4f60\u53ef\u80fd\u6ce8\u610f\u5230\u4e86\u6211\u4eec\u5bfc\u51fa\u7684\u662f\u53e6\u4e00\u4e2a\u51fd\u6570\uff0c\u800c\u4e0d\u662f\u76f4\u63a5\u5bfc\u51fa ",(0,l.kt)("inlineCode",{parentName:"p"},"_fibonacci")," \u51fd\u6570\u3002"),(0,l.kt)("p",null,"\u56e0\u4e3a\u8fd9\u662f\u5b9e\u73b0\u4e00\u4e2a\u8de8\u7ebf\u7a0b\u8c03\u7528\u51fd\u6570\u65f6\u9700\u8981\u9075\u5faa\u7684\u89c4\u8303\uff1a"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"\u4e0e ",(0,l.kt)("inlineCode",{parentName:"li"},"postMessage")," \u7684\u8981\u6c42\u4e00\u6837\uff0c\u51fd\u6570\u7684\u6240\u6709\u53c2\u6570\u5fc5\u987b\u662f\u53ef\u5e8f\u5217\u5316\u7684\u3002"),(0,l.kt)("li",{parentName:"ul"},"\u5f53\u51fd\u6570\u88ab\u8c03\u7528\u65f6\uff0c\u4f1a\u5728\u51fd\u6570\u6700\u540e\u4e00\u4e2a\u53c2\u6570\u4f20\u5165\u4e00\u4e2a\u56de\u8c03\u51fd\u6570\uff0c\u5f53\u9700\u8981\u8fd4\u56de\u5230\u4e3b\u7ebf\u7a0b\u65f6\uff0c\u8bf7\u8c03\u7528\u8be5\u51fd\u6570\u3002")),(0,l.kt)("p",null,"\u50cf\u4e0a\u9762 ",(0,l.kt)("inlineCode",{parentName:"p"},"fibonacci")," \u51fd\u6570\u7684\u5b9e\u73b0\uff0c\u5728\u8c03\u7528 ",(0,l.kt)("inlineCode",{parentName:"p"},"_fibonacci")," \u62ff\u5230\u8ba1\u7b97\u7ed3\u679c\u540e\uff0c\u901a\u8fc7\u8c03\u7528 ",(0,l.kt)("inlineCode",{parentName:"p"},"callback(v)")," \u5c06\u503c\u8fd4\u56de\u5230\u4e3b\u7ebf\u7a0b\u3002"),(0,l.kt)("p",null,"\u800c\u5728\u4e3b\u7ebf\u7a0b\u4e2d\uff0c\u6211\u4eec\u9700\u8981\u50cf\u8fd9\u6837\u4ece\u4e3b\u7ebf\u7a0b\u8c03\u7528 Worker \u7ebf\u7a0b\u4e2d\u7684\u8fd9\u4e2a\u51fd\u6570\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},"worker.utils.fibonacci([10], ([v]) => {\n console.log('Worker fibonacci result:', v);\n});\n")),(0,l.kt)("p",null,"\u4f60\u53ef\u80fd\u6ce8\u610f\u5230\u4e86\uff0c\u7b2c\u4e00\u4e2a\u53c2\u6570\u662f\u6570\u7ec4\uff0c\u800c\u7b2c\u4e8c\u4e2a\u53c2\u6570\u7684\u56de\u8c03\u7684\u7b2c\u4e00\u4e2a\u53c2\u6570\u4e5f\u662f\u6570\u7ec4\uff0c\u8fd9\u4e5f\u662f\u89c4\u8303\u3002"),(0,l.kt)("p",null,"\u4e3a\u4e86\u63d0\u9ad8\u8de8\u7ebf\u7a0b\u901a\u4fe1\u7684\u6027\u80fd\uff0c\u51cf\u5c11\u5783\u573e\u56de\u6536\u7684\u9891\u7387\uff0c\u6240\u4ee5\u9009\u62e9\u4e86\u8fd9\u79cd\u8c03\u7528\u7684\u65b9\u5f0f\u3002"),(0,l.kt)("p",null,"\u4f60\u53ef\u4ee5\u8fd9\u6837\u7406\u89e3 ",(0,l.kt)("inlineCode",{parentName:"p"},"worker.xxx.xxx()")," \u7684\u8c03\u7528\u7b7e\u540d\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre"},"worker.utils.fibonacci(args, (values) => ...);\n\n// utils: \u8981\u8c03\u7528\u7684 handler \u540d\u79f0\n// fibonacci: \u8981\u8c03\u7528 handler \u4e2d\u7684 Worker \u51fd\u6570\u540d\u79f0\n// args: \u4f20\u5165\u5230 Worker \u51fd\u6570\u7684\u6240\u6709\u53c2\u6570\n// values: Worker \u51fd\u6570\u8fd4\u56de\u65f6\u7684\u56de\u8c03\uff0c\u53c2\u6570\u662f\u8fd4\u56de\u503c\u6570\u7ec4\n")),(0,l.kt)("p",null,"\u8fd9\u5f88\u597d\u7406\u89e3\uff0c\u6211\u4eec\u518d\u4e3e\u4e2a\u591a\u53c2\u6570\u8c03\u7528\u7684\u4f8b\u5b50\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},'// Worker \u7ebf\u7a0b\u7684\u51fd\u6570\nfunction handle(a, b, c, callback) {\n // a = "ye.", b = {}, c = 1000\n callback(1, "text", { prop: 2 });\n}\n\n// \u4e3b\u7ebf\u7a0b\u7684\u8c03\u7528\u65b9\u5f0f\nworker.utils.handle(["ye.", {}, 1000], ([v1, v2, v3]) => {\n // v1 = 1, v2 = "text", v3 = { prop: 2 }\n});\n')),(0,l.kt)("h3",{id:"\u66f4\u591a\u5bfc\u51fa\u573a\u666f"},"\u66f4\u591a\u5bfc\u51fa\u573a\u666f"),(0,l.kt)("p",null,"\u65e0\u53c2\u6570\u51fd\u6570\u7684\u5b9e\u73b0\u4e0e\u8c03\u7528\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},"// Worker \u7ebf\u7a0b\u7684\u51fd\u6570\nfunction setValue(callback) {\n // ...\n callback();\n}\n\n// \u4e3b\u7ebf\u7a0b\u7684\u8c03\u7528\u65b9\u5f0f\nworker.utils.setValue(() => {\n // ok.\n});\n")),(0,l.kt)("p",null,"\u65e0\u9700\u8fd4\u56de\u7684\u51fd\u6570\u7684\u5b9e\u73b0\u4e0e\u8c03\u7528\uff08\u8fd9\u540c\u65f6\u80fd\u8282\u7701 Worker \u7684\u901a\u4fe1\u5f00\u9500\uff0c\u56e0\u4e3a\u53ea\u9700\u8981\u5355\u5411\u901a\u4fe1\uff01\uff09\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},'// Worker \u7ebf\u7a0b\u7684\u51fd\u6570\nfunction setValue(v) {\n // ...\n // \u6267\u884c\u5b8c\u6210\u4e4b\u540e\u4e0d\u8c03\u7528 callback\uff0c\u751a\u81f3\u4e0d\u7528\u58f0\u660e\n}\n\n// \u4e3b\u7ebf\u7a0b\u7684\u8c03\u7528\u65b9\u5f0f\nworker.utils.setValue(["ye."]);\n')),(0,l.kt)("p",null,"\u65e0\u53c2\u6570\u4e5f\u65e0\u8fd4\u56de\u7684\u51fd\u6570\u7684\u5b9e\u73b0\u4e0e\u8c03\u7528\uff08\u8fd9\u540c\u65f6\u80fd\u8282\u7701 Worker \u7684\u901a\u4fe1\u5f00\u9500\uff0c\u56e0\u4e3a\u53ea\u9700\u8981\u5355\u5411\u901a\u4fe1\uff01\uff09\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},"// Worker \u7ebf\u7a0b\u7684\u51fd\u6570\nfunction setValue() {\n // ...\n // \u6267\u884c\u5b8c\u6210\u4e4b\u540e\u4e0d\u8c03\u7528 callback\uff0c\u751a\u81f3\u4e0d\u7528\u58f0\u660e\n}\n\n// \u4e3b\u7ebf\u7a0b\u7684\u8c03\u7528\u65b9\u5f0f\nworker.utils.setValue();\n")),(0,l.kt)("p",null,"\u9664\u4e86\u51fd\u6570\u4e4b\u5916\uff0c\u4f60\u8fd8\u53ef\u4ee5\u5bfc\u51fa\u503c\u3001getter/setter \u5c5e\u6027\uff0c\u4f46\u9700\u8981\u6ce8\u610f\u9700\u901a\u8fc7 ",(0,l.kt)("inlineCode",{parentName:"p"},"get_xxx"),"\u3001",(0,l.kt)("inlineCode",{parentName:"p"},"set_xxx")," \u548c ",(0,l.kt)("inlineCode",{parentName:"p"},"write_xxx")," \u4e09\u4e2a\u4ee3\u7406\u51fd\u6570\u8fdb\u884c\u8bbf\u95ee\u4e0e\u4fee\u6539\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-js"},'// Worker \u7ebf\u7a0b\u4e2d\uff1a\n\nregisterHandler("Date", {\n time: 1,\n});\n\n// \u4e3b\u7ebf\u7a0b\u4e2d\uff1a\n\n// \u83b7\u53d6\u503c\nworker.Date.get_time(([v]) => {\n // v is 1.\n});\n\n// \u4fee\u6539\u503c\uff0c\u4e0d\u4f1a\u56de\u8c03\uff0c\u6027\u80fd\u6bd4 write \u66f4\u9ad8\nworker.Date.set_time([100]);\n\n// \u4fee\u6539\u503c\uff0c\u4f1a\u56de\u8c03\u4ee5\u901a\u77e5\u64cd\u4f5c\u5df2\u6267\u884c\u5b8c\u6bd5\nworker.Date.write_time([100], () => {\n // finish.\n});\n')),(0,l.kt)("h2",{id:"\u7f16\u8bd1\u591a\u7ebf\u7a0b\u6269\u5c55"},"\u7f16\u8bd1\u591a\u7ebf\u7a0b\u6269\u5c55"),(0,l.kt)("p",null,"\u6bcf\u6b21\u4fee\u6539\u6269\u5c55\u4ee3\u7801\u4e4b\u540e\uff0c\u9700\u8981\u624b\u52a8\u70b9\u51fb ",(0,l.kt)("strong",{parentName:"p"},"\u9879\u76ee - \u91cd\u65b0\u7f16\u8bd1\u591a\u7ebf\u7a0b\u6269\u5c55")," \u4ee5\u751f\u6548\u3002"),(0,l.kt)("p",null,"\u7279\u522b\u6ce8\u610f\uff1a",(0,l.kt)("strong",{parentName:"p"},"\u5c31\u50cf\u4fee\u6539\u591a\u7ebf\u7a0b\u7684\u8bbe\u7f6e\u4f1a\u5f71\u54cd\u5230\u6240\u6709\u9879\u76ee\u4e00\u6837\uff0c\u591a\u7ebf\u7a0b\u6269\u5c55\u7684\u7f16\u8bd1\u7ed3\u679c\u4e5f\u662f\u6240\u6709\u9879\u76ee\u5171\u7528\u7684\uff01")),(0,l.kt)("p",null,"\u6240\u4ee5\u5f53\u4f60",(0,l.kt)("strong",{parentName:"p"},"\u6784\u5efa\u67d0\u4e2a\u9879\u76ee\u4e4b\u524d\uff0c\u5fc5\u987b\u786e\u4fdd\u6700\u540e\u4e00\u6b21\u7f16\u8bd1\u662f\u5f53\u524d\u9879\u76ee\u7684\u591a\u7ebf\u7a0b\u6269\u5c55"),"\uff01"))}d.isMDXComponent=!0},63608:function(e,n,t){n.Z=t.p+"assets/images/custom_worker_struct-80bd570e270783db7d11ab575cef834f.png"}}]); \ No newline at end of file diff --git a/assets/js/5fb09e47.997b1d2a.js b/assets/js/5fb09e47.997b1d2a.js new file mode 100644 index 00000000..fceca91c --- /dev/null +++ b/assets/js/5fb09e47.997b1d2a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[4527],{3905:function(e,t,n){n.d(t,{Zo:function(){return s},kt:function(){return m}});var r=n(67294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var u=r.createContext({}),l=function(e){var t=r.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):c(c({},t),e)),n},s=function(e){var t=l(e.components);return r.createElement(u.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,i=e.mdxType,o=e.originalType,u=e.parentName,s=a(e,["components","mdxType","originalType","parentName"]),f=l(n),m=i,d=f["".concat(u,".").concat(m)]||f[m]||p[m]||o;return n?r.createElement(d,c(c({ref:t},s),{},{components:n})):r.createElement(d,c({ref:t},s))}));function m(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var o=n.length,c=new Array(o);c[0]=f;var a={};for(var u in t)hasOwnProperty.call(t,u)&&(a[u]=t[u]);a.originalType=e,a.mdxType="string"==typeof e?e:i,c[1]=a;for(var l=2;l=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(l=0;l=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var u=l.createContext({}),o=function(e){var t=l.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},c=function(e){var t=o(e.components);return l.createElement(u.Provider,{value:t},e.children)},k={inlineCode:"code",wrapper:function(e){var t=e.children;return l.createElement(l.Fragment,{},t)}},s=l.forwardRef((function(e,t){var n=e.components,r=e.mdxType,a=e.originalType,u=e.parentName,c=p(e,["components","mdxType","originalType","parentName"]),s=o(n),m=r,d=s["".concat(u,".").concat(m)]||s[m]||k[m]||a;return n?l.createElement(d,i(i({ref:t},c),{},{components:n})):l.createElement(d,i({ref:t},c))}));function m(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var a=n.length,i=new Array(a);i[0]=s;var p={};for(var u in t)hasOwnProperty.call(t,u)&&(p[u]=t[u]);p.originalType=e,p.mdxType="string"==typeof e?e:r,i[1]=p;for(var o=2;o=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(l=0;l=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var u=l.createContext({}),o=function(e){var t=l.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},c=function(e){var t=o(e.components);return l.createElement(u.Provider,{value:t},e.children)},k={inlineCode:"code",wrapper:function(e){var t=e.children;return l.createElement(l.Fragment,{},t)}},s=l.forwardRef((function(e,t){var n=e.components,r=e.mdxType,a=e.originalType,u=e.parentName,c=p(e,["components","mdxType","originalType","parentName"]),s=o(n),m=r,d=s["".concat(u,".").concat(m)]||s[m]||k[m]||a;return n?l.createElement(d,i(i({ref:t},c),{},{components:n})):l.createElement(d,i({ref:t},c))}));function m(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var a=n.length,i=new Array(a);i[0]=s;var p={};for(var u in t)hasOwnProperty.call(t,u)&&(p[u]=t[u]);p.originalType=e,p.mdxType="string"==typeof e?e:r,i[1]=p;for(var o=2;o=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var l=n.createContext({}),u=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):a(a({},t),e)),r},p=function(e){var t=u(e.components);return n.createElement(l.Provider,{value:t},e.children)},s={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,i=e.mdxType,o=e.originalType,l=e.parentName,p=c(e,["components","mdxType","originalType","parentName"]),d=u(r),m=i,f=d["".concat(l,".").concat(m)]||d[m]||s[m]||o;return r?n.createElement(f,a(a({ref:t},p),{},{components:r})):n.createElement(f,a({ref:t},p))}));function m(e,t){var r=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var o=r.length,a=new Array(o);a[0]=d;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:i,a[1]=c;for(var u=2;u=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var l=n.createContext({}),u=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):a(a({},t),e)),r},p=function(e){var t=u(e.components);return n.createElement(l.Provider,{value:t},e.children)},s={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,i=e.mdxType,o=e.originalType,l=e.parentName,p=c(e,["components","mdxType","originalType","parentName"]),d=u(r),m=i,f=d["".concat(l,".").concat(m)]||d[m]||s[m]||o;return r?n.createElement(f,a(a({ref:t},p),{},{components:r})):n.createElement(f,a({ref:t},p))}));function m(e,t){var r=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var o=r.length,a=new Array(o);a[0]=d;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:i,a[1]=c;for(var u=2;u=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var o=n.createContext({}),u=function(e){var t=n.useContext(o),r=t;return e&&(r="function"==typeof e?e(t):c(c({},t),e)),r},p=function(e){var t=u(e.components);return n.createElement(o.Provider,{value:t},e.children)},s={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,i=e.originalType,o=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),m=u(r),d=a,f=m["".concat(o,".").concat(d)]||m[d]||s[d]||i;return r?n.createElement(f,c(c({ref:t},p),{},{components:r})):n.createElement(f,c({ref:t},p))}));function d(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=r.length,c=new Array(i);c[0]=m;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,c[1]=l;for(var u=2;u=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var o=n.createContext({}),u=function(e){var t=n.useContext(o),r=t;return e&&(r="function"==typeof e?e(t):c(c({},t),e)),r},p=function(e){var t=u(e.components);return n.createElement(o.Provider,{value:t},e.children)},s={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,i=e.originalType,o=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),m=u(r),d=a,f=m["".concat(o,".").concat(d)]||m[d]||s[d]||i;return r?n.createElement(f,c(c({ref:t},p),{},{components:r})):n.createElement(f,c({ref:t},p))}));function d(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=r.length,c=new Array(i);c[0]=m;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,c[1]=l;for(var u=2;u=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var l=r.createContext({}),u=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):a(a({},t),e)),n},s=function(e){var t=u(e.components);return r.createElement(l.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,o=e.mdxType,i=e.originalType,l=e.parentName,s=c(e,["components","mdxType","originalType","parentName"]),d=u(n),f=o,b=d["".concat(l,".").concat(f)]||d[f]||p[f]||i;return n?r.createElement(b,a(a({ref:t},s),{},{components:n})):r.createElement(b,a({ref:t},s))}));function f(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var i=n.length,a=new Array(i);a[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:o,a[1]=c;for(var u=2;u=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var c=r.createContext({}),p=function(e){var t=r.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},u=function(e){var t=p(e.components);return r.createElement(c.Provider,{value:t},e.children)},s={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,c=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),d=p(n),m=a,f=d["".concat(c,".").concat(m)]||d[m]||s[m]||i;return n?r.createElement(f,o(o({ref:t},u),{},{components:n})):r.createElement(f,o({ref:t},u))}));function m(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=d;var l={};for(var c in t)hasOwnProperty.call(t,c)&&(l[c]=t[c]);l.originalType=e,l.mdxType="string"==typeof e?e:a,o[1]=l;for(var p=2;p=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var c=r.createContext({}),p=function(e){var t=r.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},u=function(e){var t=p(e.components);return r.createElement(c.Provider,{value:t},e.children)},s={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,c=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),d=p(n),m=a,f=d["".concat(c,".").concat(m)]||d[m]||s[m]||i;return n?r.createElement(f,o(o({ref:t},u),{},{components:n})):r.createElement(f,o({ref:t},u))}));function m(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=d;var l={};for(var c in t)hasOwnProperty.call(t,c)&&(l[c]=t[c]);l.originalType=e,l.mdxType="string"==typeof e?e:a,o[1]=l;for(var p=2;p=0||(t[n]=A[n]);return t}(A,e);if(Object.getOwnPropertySymbols){var M=Object.getOwnPropertySymbols(A);for(g=0;g=0||Object.prototype.propertyIsEnumerable.call(A,n)&&(t[n]=A[n])}return t}var B=g.createContext({}),w=function(A){var e=g.useContext(B),n=e;return A&&(n="function"==typeof A?A(e):r(r({},e),A)),n},i=function(A){var e=w(A.components);return g.createElement(B.Provider,{value:e},A.children)},Y={inlineCode:"code",wrapper:function(A){var e=A.children;return g.createElement(g.Fragment,{},e)}},G=g.forwardRef((function(A,e){var n=A.components,t=A.mdxType,M=A.originalType,B=A.parentName,i=a(A,["components","mdxType","originalType","parentName"]),G=w(n),D=t,l=G["".concat(B,".").concat(D)]||G[D]||Y[D]||M;return n?g.createElement(l,r(r({ref:e},i),{},{components:n})):g.createElement(l,r({ref:e},i))}));function D(A,e){var n=arguments,t=e&&e.mdxType;if("string"==typeof A||t){var M=n.length,r=new Array(M);r[0]=G;var a={};for(var B in e)hasOwnProperty.call(e,B)&&(a[B]=e[B]);a.originalType=A,a.mdxType="string"==typeof A?A:t,r[1]=a;for(var w=2;w=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var p=a.createContext({}),d=function(e){var t=a.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},m=function(e){var t=d(e.components);return a.createElement(p.Provider,{value:t},e.children)},s={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},u=a.forwardRef((function(e,t){var n=e.components,i=e.mdxType,r=e.originalType,p=e.parentName,m=o(e,["components","mdxType","originalType","parentName"]),u=d(n),c=i,k=u["".concat(p,".").concat(c)]||u[c]||s[c]||r;return n?a.createElement(k,l(l({ref:t},m),{},{components:n})):a.createElement(k,l({ref:t},m))}));function c(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var r=n.length,l=new Array(r);l[0]=u;var o={};for(var p in t)hasOwnProperty.call(t,p)&&(o[p]=t[p]);o.originalType=e,o.mdxType="string"==typeof e?e:i,l[1]=o;for(var d=2;d=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var u=n.createContext({}),l=function(e){var t=n.useContext(u),r=t;return e&&(r="function"==typeof e?e(t):a(a({},t),e)),r},p=function(e){var t=l(e.components);return n.createElement(u.Provider,{value:t},e.children)},s={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,i=e.originalType,u=e.parentName,p=c(e,["components","mdxType","originalType","parentName"]),f=l(r),d=o,m=f["".concat(u,".").concat(d)]||f[d]||s[d]||i;return r?n.createElement(m,a(a({ref:t},p),{},{components:r})):n.createElement(m,a({ref:t},p))}));function d(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var i=r.length,a=new Array(i);a[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:o,a[1]=c;for(var l=2;l=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var u=n.createContext({}),l=function(e){var t=n.useContext(u),r=t;return e&&(r="function"==typeof e?e(t):a(a({},t),e)),r},p=function(e){var t=l(e.components);return n.createElement(u.Provider,{value:t},e.children)},s={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,i=e.originalType,u=e.parentName,p=c(e,["components","mdxType","originalType","parentName"]),f=l(r),d=o,m=f["".concat(u,".").concat(d)]||f[d]||s[d]||i;return r?n.createElement(m,a(a({ref:t},p),{},{components:r})):n.createElement(m,a({ref:t},p))}));function d(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var i=r.length,a=new Array(i);a[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:o,a[1]=c;for(var l=2;l=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var c=r.createContext({}),p=function(e){var t=r.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},u=function(e){var t=p(e.components);return r.createElement(c.Provider,{value:t},e.children)},s={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,c=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),d=p(n),m=a,f=d["".concat(c,".").concat(m)]||d[m]||s[m]||i;return n?r.createElement(f,o(o({ref:t},u),{},{components:n})):r.createElement(f,o({ref:t},u))}));function m(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=d;var l={};for(var c in t)hasOwnProperty.call(t,c)&&(l[c]=t[c]);l.originalType=e,l.mdxType="string"==typeof e?e:a,o[1]=l;for(var p=2;p=0||(r[n]=t[n]);return r}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}var c=a.createContext({}),p=function(t){var e=a.useContext(c),n=e;return t&&(n="function"==typeof t?t(e):l(l({},e),t)),n},s=function(t){var e=p(t.components);return a.createElement(c.Provider,{value:e},t.children)},u={inlineCode:"code",wrapper:function(t){var e=t.children;return a.createElement(a.Fragment,{},e)}},d=a.forwardRef((function(t,e){var n=t.components,r=t.mdxType,i=t.originalType,c=t.parentName,s=o(t,["components","mdxType","originalType","parentName"]),d=p(n),k=r,m=d["".concat(c,".").concat(k)]||d[k]||u[k]||i;return n?a.createElement(m,l(l({ref:e},s),{},{components:n})):a.createElement(m,l({ref:e},s))}));function k(t,e){var n=arguments,r=e&&e.mdxType;if("string"==typeof t||r){var i=n.length,l=new Array(i);l[0]=d;var o={};for(var c in e)hasOwnProperty.call(e,c)&&(o[c]=e[c]);o.originalType=t,o.mdxType="string"==typeof t?t:r,l[1]=o;for(var p=2;p=0||(r[n]=t[n]);return r}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}var c=a.createContext({}),p=function(t){var e=a.useContext(c),n=e;return t&&(n="function"==typeof t?t(e):l(l({},e),t)),n},s=function(t){var e=p(t.components);return a.createElement(c.Provider,{value:e},t.children)},u={inlineCode:"code",wrapper:function(t){var e=t.children;return a.createElement(a.Fragment,{},e)}},d=a.forwardRef((function(t,e){var n=t.components,r=t.mdxType,i=t.originalType,c=t.parentName,s=o(t,["components","mdxType","originalType","parentName"]),d=p(n),k=r,m=d["".concat(c,".").concat(k)]||d[k]||u[k]||i;return n?a.createElement(m,l(l({ref:e},s),{},{components:n})):a.createElement(m,l({ref:e},s))}));function k(t,e){var n=arguments,r=e&&e.mdxType;if("string"==typeof t||r){var i=n.length,l=new Array(i);l[0]=d;var o={};for(var c in e)hasOwnProperty.call(e,c)&&(o[c]=e[c]);o.originalType=t,o.mdxType="string"==typeof t?t:r,l[1]=o;for(var p=2;p=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var c=r.createContext({}),p=function(e){var t=r.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},u=function(e){var t=p(e.components);return r.createElement(c.Provider,{value:t},e.children)},s={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,c=e.parentName,u=o(e,["components","mdxType","originalType","parentName"]),m=p(n),d=a,k=m["".concat(c,".").concat(d)]||m[d]||s[d]||i;return n?r.createElement(k,l(l({ref:t},u),{},{components:n})):r.createElement(k,l({ref:t},u))}));function d(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,l=new Array(i);l[0]=m;var o={};for(var c in t)hasOwnProperty.call(t,c)&&(o[c]=t[c]);o.originalType=e,o.mdxType="string"==typeof e?e:a,l[1]=o;for(var p=2;p=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var c=r.createContext({}),p=function(e){var t=r.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},u=function(e){var t=p(e.components);return r.createElement(c.Provider,{value:t},e.children)},s={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,c=e.parentName,u=o(e,["components","mdxType","originalType","parentName"]),m=p(n),d=a,k=m["".concat(c,".").concat(d)]||m[d]||s[d]||i;return n?r.createElement(k,l(l({ref:t},u),{},{components:n})):r.createElement(k,l({ref:t},u))}));function d(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,l=new Array(i);l[0]=m;var o={};for(var c in t)hasOwnProperty.call(t,c)&&(o[c]=t[c]);o.originalType=e,o.mdxType="string"==typeof e?e:a,l[1]=o;for(var p=2;p=0||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}var s=a.createContext({}),c=function(t){var e=a.useContext(s),n=e;return t&&(n="function"==typeof t?t(e):o(o({},e),t)),n},p=function(t){var e=c(t.components);return a.createElement(s.Provider,{value:e},t.children)},d={inlineCode:"code",wrapper:function(t){var e=t.children;return a.createElement(a.Fragment,{},e)}},m=a.forwardRef((function(t,e){var n=t.components,i=t.mdxType,r=t.originalType,s=t.parentName,p=l(t,["components","mdxType","originalType","parentName"]),m=c(n),u=i,v=m["".concat(s,".").concat(u)]||m[u]||d[u]||r;return n?a.createElement(v,o(o({ref:e},p),{},{components:n})):a.createElement(v,o({ref:e},p))}));function u(t,e){var n=arguments,i=e&&e.mdxType;if("string"==typeof t||i){var r=n.length,o=new Array(r);o[0]=m;var l={};for(var s in e)hasOwnProperty.call(e,s)&&(l[s]=e[s]);l.originalType=t,l.mdxType="string"==typeof t?t:i,o[1]=l;for(var c=2;c=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var u=r.createContext({}),p=function(e){var t=r.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},i=function(e){var t=p(e.components);return r.createElement(u.Provider,{value:t},e.children)},s={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,l=e.originalType,u=e.parentName,i=c(e,["components","mdxType","originalType","parentName"]),d=p(n),m=a,f=d["".concat(u,".").concat(m)]||d[m]||s[m]||l;return n?r.createElement(f,o(o({ref:t},i),{},{components:n})):r.createElement(f,o({ref:t},i))}));function m(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var l=n.length,o=new Array(l);o[0]=d;var c={};for(var u in t)hasOwnProperty.call(t,u)&&(c[u]=t[u]);c.originalType=e,c.mdxType="string"==typeof e?e:a,o[1]=c;for(var p=2;p=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var u=n.createContext({}),s=function(e){var t=n.useContext(u),r=t;return e&&(r="function"==typeof e?e(t):c(c({},t),e)),r},p=function(e){var t=s(e.components);return n.createElement(u.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},l=n.forwardRef((function(e,t){var r=e.components,i=e.mdxType,o=e.originalType,u=e.parentName,p=a(e,["components","mdxType","originalType","parentName"]),l=s(r),f=i,m=l["".concat(u,".").concat(f)]||l[f]||d[f]||o;return r?n.createElement(m,c(c({ref:t},p),{},{components:r})):n.createElement(m,c({ref:t},p))}));function f(e,t){var r=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var o=r.length,c=new Array(o);c[0]=l;var a={};for(var u in t)hasOwnProperty.call(t,u)&&(a[u]=t[u]);a.originalType=e,a.mdxType="string"==typeof e?e:i,c[1]=a;for(var s=2;s=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var a=n.createContext({}),s=function(e){var t=n.useContext(a),r=t;return e&&(r="function"==typeof e?e(t):c(c({},t),e)),r},p=function(e){var t=s(e.components);return n.createElement(a.Provider,{value:t},e.children)},l={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,i=e.mdxType,o=e.originalType,a=e.parentName,p=u(e,["components","mdxType","originalType","parentName"]),d=s(r),f=i,m=d["".concat(a,".").concat(f)]||d[f]||l[f]||o;return r?n.createElement(m,c(c({ref:t},p),{},{components:r})):n.createElement(m,c({ref:t},p))}));function f(e,t){var r=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var o=r.length,c=new Array(o);c[0]=d;var u={};for(var a in t)hasOwnProperty.call(t,a)&&(u[a]=t[a]);u.originalType=e,u.mdxType="string"==typeof e?e:i,c[1]=u;for(var s=2;s=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var u=n.createContext({}),s=function(e){var t=n.useContext(u),r=t;return e&&(r="function"==typeof e?e(t):o(o({},t),e)),r},p=function(e){var t=s(e.components);return n.createElement(u.Provider,{value:t},e.children)},l={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,i=e.mdxType,a=e.originalType,u=e.parentName,p=c(e,["components","mdxType","originalType","parentName"]),d=s(r),f=i,m=d["".concat(u,".").concat(f)]||d[f]||l[f]||a;return r?n.createElement(m,o(o({ref:t},p),{},{components:r})):n.createElement(m,o({ref:t},p))}));function f(e,t){var r=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=r.length,o=new Array(a);o[0]=d;var c={};for(var u in t)hasOwnProperty.call(t,u)&&(c[u]=t[u]);c.originalType=e,c.mdxType="string"==typeof e?e:i,o[1]=c;for(var s=2;s=0||(c[r]=e[r]);return c}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(c[r]=e[r])}return c}var u=n.createContext({}),l=function(e){var t=n.useContext(u),r=t;return e&&(r="function"==typeof e?e(t):o(o({},t),e)),r},s=function(e){var t=l(e.components);return n.createElement(u.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,c=e.mdxType,i=e.originalType,u=e.parentName,s=a(e,["components","mdxType","originalType","parentName"]),m=l(r),f=c,p=m["".concat(u,".").concat(f)]||m[f]||d[f]||i;return r?n.createElement(p,o(o({ref:t},s),{},{components:r})):n.createElement(p,o({ref:t},s))}));function f(e,t){var r=arguments,c=t&&t.mdxType;if("string"==typeof e||c){var i=r.length,o=new Array(i);o[0]=m;var a={};for(var u in t)hasOwnProperty.call(t,u)&&(a[u]=t[u]);a.originalType=e,a.mdxType="string"==typeof e?e:c,o[1]=a;for(var l=2;l=0||(c[r]=e[r]);return c}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(c[r]=e[r])}return c}var u=n.createContext({}),l=function(e){var t=n.useContext(u),r=t;return e&&(r="function"==typeof e?e(t):o(o({},t),e)),r},s=function(e){var t=l(e.components);return n.createElement(u.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,c=e.mdxType,i=e.originalType,u=e.parentName,s=a(e,["components","mdxType","originalType","parentName"]),m=l(r),f=c,p=m["".concat(u,".").concat(f)]||m[f]||d[f]||i;return r?n.createElement(p,o(o({ref:t},s),{},{components:r})):n.createElement(p,o({ref:t},s))}));function f(e,t){var r=arguments,c=t&&t.mdxType;if("string"==typeof e||c){var i=r.length,o=new Array(i);o[0]=m;var a={};for(var u in t)hasOwnProperty.call(t,u)&&(a[u]=t[u]);a.originalType=e,a.mdxType="string"==typeof e?e:c,o[1]=a;for(var l=2;l=0||(o[t]=e[t]);return o}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var l=n.createContext({}),u=function(e){var r=n.useContext(l),t=r;return e&&(t="function"==typeof e?e(r):c(c({},r),e)),t},f=function(e){var r=u(e.components);return n.createElement(l.Provider,{value:r},e.children)},p={inlineCode:"code",wrapper:function(e){var r=e.children;return n.createElement(n.Fragment,{},r)}},s=n.forwardRef((function(e,r){var t=e.components,o=e.mdxType,i=e.originalType,l=e.parentName,f=a(e,["components","mdxType","originalType","parentName"]),s=u(t),m=o,d=s["".concat(l,".").concat(m)]||s[m]||p[m]||i;return t?n.createElement(d,c(c({ref:r},f),{},{components:t})):n.createElement(d,c({ref:r},f))}));function m(e,r){var t=arguments,o=r&&r.mdxType;if("string"==typeof e||o){var i=t.length,c=new Array(i);c[0]=s;var a={};for(var l in r)hasOwnProperty.call(r,l)&&(a[l]=r[l]);a.originalType=e,a.mdxType="string"==typeof e?e:o,c[1]=a;for(var u=2;u=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(l=0;l=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var u=l.createContext({}),o=function(e){var t=l.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},c=function(e){var t=o(e.components);return l.createElement(u.Provider,{value:t},e.children)},k={inlineCode:"code",wrapper:function(e){var t=e.children;return l.createElement(l.Fragment,{},t)}},s=l.forwardRef((function(e,t){var n=e.components,r=e.mdxType,a=e.originalType,u=e.parentName,c=p(e,["components","mdxType","originalType","parentName"]),s=o(n),m=r,d=s["".concat(u,".").concat(m)]||s[m]||k[m]||a;return n?l.createElement(d,i(i({ref:t},c),{},{components:n})):l.createElement(d,i({ref:t},c))}));function m(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var a=n.length,i=new Array(a);i[0]=s;var p={};for(var u in t)hasOwnProperty.call(t,u)&&(p[u]=t[u]);p.originalType=e,p.mdxType="string"==typeof e?e:r,i[1]=p;for(var o=2;o=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var l=n.createContext({}),u=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):a(a({},t),e)),r},p=function(e){var t=u(e.components);return n.createElement(l.Provider,{value:t},e.children)},s={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,i=e.mdxType,o=e.originalType,l=e.parentName,p=c(e,["components","mdxType","originalType","parentName"]),d=u(r),m=i,f=d["".concat(l,".").concat(m)]||d[m]||s[m]||o;return r?n.createElement(f,a(a({ref:t},p),{},{components:r})):n.createElement(f,a({ref:t},p))}));function m(e,t){var r=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var o=r.length,a=new Array(o);a[0]=d;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:i,a[1]=c;for(var u=2;u=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var u=n.createContext({}),l=function(e){var t=n.useContext(u),r=t;return e&&(r="function"==typeof e?e(t):c(c({},t),e)),r},s=function(e){var t=l(e.components);return n.createElement(u.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,i=e.originalType,u=e.parentName,s=a(e,["components","mdxType","originalType","parentName"]),f=l(r),p=o,m=f["".concat(u,".").concat(p)]||f[p]||d[p]||i;return r?n.createElement(m,c(c({ref:t},s),{},{components:r})):n.createElement(m,c({ref:t},s))}));function p(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var i=r.length,c=new Array(i);c[0]=f;var a={};for(var u in t)hasOwnProperty.call(t,u)&&(a[u]=t[u]);a.originalType=e,a.mdxType="string"==typeof e?e:o,c[1]=a;for(var l=2;l=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l=a.createContext({}),s=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},c=function(e){var t=s(e.components);return a.createElement(l.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,l=e.parentName,c=p(e,["components","mdxType","originalType","parentName"]),m=s(n),d=r,g=m["".concat(l,".").concat(d)]||m[d]||u[d]||i;return n?a.createElement(g,o(o({ref:t},c),{},{components:n})):a.createElement(g,o({ref:t},c))}));function d(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,o=new Array(i);o[0]=m;var p={};for(var l in t)hasOwnProperty.call(t,l)&&(p[l]=t[l]);p.originalType=e,p.mdxType="string"==typeof e?e:r,o[1]=p;for(var s=2;s=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l=a.createContext({}),s=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},c=function(e){var t=s(e.components);return a.createElement(l.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,l=e.parentName,c=p(e,["components","mdxType","originalType","parentName"]),m=s(n),d=r,g=m["".concat(l,".").concat(d)]||m[d]||u[d]||i;return n?a.createElement(g,o(o({ref:t},c),{},{components:n})):a.createElement(g,o({ref:t},c))}));function d(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,o=new Array(i);o[0]=m;var p={};for(var l in t)hasOwnProperty.call(t,l)&&(p[l]=t[l]);p.originalType=e,p.mdxType="string"==typeof e?e:r,o[1]=p;for(var s=2;s=0||(c[r]=e[r]);return c}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(c[r]=e[r])}return c}var u=n.createContext({}),l=function(e){var t=n.useContext(u),r=t;return e&&(r="function"==typeof e?e(t):a(a({},t),e)),r},s=function(e){var t=l(e.components);return n.createElement(u.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,c=e.mdxType,i=e.originalType,u=e.parentName,s=o(e,["components","mdxType","originalType","parentName"]),m=l(r),f=c,p=m["".concat(u,".").concat(f)]||m[f]||d[f]||i;return r?n.createElement(p,a(a({ref:t},s),{},{components:r})):n.createElement(p,a({ref:t},s))}));function f(e,t){var r=arguments,c=t&&t.mdxType;if("string"==typeof e||c){var i=r.length,a=new Array(i);a[0]=m;var o={};for(var u in t)hasOwnProperty.call(t,u)&&(o[u]=t[u]);o.originalType=e,o.mdxType="string"==typeof e?e:c,a[1]=o;for(var l=2;l=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l=a.createContext({}),s=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},c=function(e){var t=s(e.components);return a.createElement(l.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,l=e.parentName,c=p(e,["components","mdxType","originalType","parentName"]),m=s(n),d=r,g=m["".concat(l,".").concat(d)]||m[d]||u[d]||i;return n?a.createElement(g,o(o({ref:t},c),{},{components:n})):a.createElement(g,o({ref:t},c))}));function d(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,o=new Array(i);o[0]=m;var p={};for(var l in t)hasOwnProperty.call(t,l)&&(p[l]=t[l]);p.originalType=e,p.mdxType="string"==typeof e?e:r,o[1]=p;for(var s=2;s=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var u=r.createContext({}),p=function(e){var t=r.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},c=function(e){var t=p(e.components);return r.createElement(u.Provider,{value:t},e.children)},s={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},k=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,l=e.originalType,u=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),k=p(n),d=a,m=k["".concat(u,".").concat(d)]||k[d]||s[d]||l;return n?r.createElement(m,i(i({ref:t},c),{},{components:n})):r.createElement(m,i({ref:t},c))}));function d(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var l=n.length,i=new Array(l);i[0]=k;var o={};for(var u in t)hasOwnProperty.call(t,u)&&(o[u]=t[u]);o.originalType=e,o.mdxType="string"==typeof e?e:a,i[1]=o;for(var p=2;p=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var u=r.createContext({}),p=function(e){var t=r.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},c=function(e){var t=p(e.components);return r.createElement(u.Provider,{value:t},e.children)},s={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},k=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,l=e.originalType,u=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),k=p(n),d=a,m=k["".concat(u,".").concat(d)]||k[d]||s[d]||l;return n?r.createElement(m,i(i({ref:t},c),{},{components:n})):r.createElement(m,i({ref:t},c))}));function d(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var l=n.length,i=new Array(l);i[0]=k;var o={};for(var u in t)hasOwnProperty.call(t,u)&&(o[u]=t[u]);o.originalType=e,o.mdxType="string"==typeof e?e:a,i[1]=o;for(var p=2;p=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var o=n.createContext({}),u=function(e){var t=n.useContext(o),r=t;return e&&(r="function"==typeof e?e(t):c(c({},t),e)),r},p=function(e){var t=u(e.components);return n.createElement(o.Provider,{value:t},e.children)},s={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,i=e.originalType,o=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),m=u(r),d=a,f=m["".concat(o,".").concat(d)]||m[d]||s[d]||i;return r?n.createElement(f,c(c({ref:t},p),{},{components:r})):n.createElement(f,c({ref:t},p))}));function d(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=r.length,c=new Array(i);c[0]=m;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,c[1]=l;for(var u=2;u=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var u=n.createContext({}),s=function(e){var t=n.useContext(u),r=t;return e&&(r="function"==typeof e?e(t):o(o({},t),e)),r},p=function(e){var t=s(e.components);return n.createElement(u.Provider,{value:t},e.children)},l={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,i=e.mdxType,a=e.originalType,u=e.parentName,p=c(e,["components","mdxType","originalType","parentName"]),d=s(r),f=i,m=d["".concat(u,".").concat(f)]||d[f]||l[f]||a;return r?n.createElement(m,o(o({ref:t},p),{},{components:r})):n.createElement(m,o({ref:t},p))}));function f(e,t){var r=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=r.length,o=new Array(a);o[0]=d;var c={};for(var u in t)hasOwnProperty.call(t,u)&&(c[u]=t[u]);c.originalType=e,c.mdxType="string"==typeof e?e:i,o[1]=c;for(var s=2;s=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var u=n.createContext({}),s=function(e){var t=n.useContext(u),r=t;return e&&(r="function"==typeof e?e(t):o(o({},t),e)),r},p=function(e){var t=s(e.components);return n.createElement(u.Provider,{value:t},e.children)},l={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,i=e.mdxType,a=e.originalType,u=e.parentName,p=c(e,["components","mdxType","originalType","parentName"]),d=s(r),f=i,m=d["".concat(u,".").concat(f)]||d[f]||l[f]||a;return r?n.createElement(m,o(o({ref:t},p),{},{components:r})):n.createElement(m,o({ref:t},p))}));function f(e,t){var r=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=r.length,o=new Array(a);o[0]=d;var c={};for(var u in t)hasOwnProperty.call(t,u)&&(c[u]=t[u]);c.originalType=e,c.mdxType="string"==typeof e?e:i,o[1]=c;for(var s=2;s=0||(c[r]=e[r]);return c}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(c[r]=e[r])}return c}var u=n.createContext({}),l=function(e){var t=n.useContext(u),r=t;return e&&(r="function"==typeof e?e(t):o(o({},t),e)),r},s=function(e){var t=l(e.components);return n.createElement(u.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,c=e.mdxType,i=e.originalType,u=e.parentName,s=a(e,["components","mdxType","originalType","parentName"]),m=l(r),f=c,p=m["".concat(u,".").concat(f)]||m[f]||d[f]||i;return r?n.createElement(p,o(o({ref:t},s),{},{components:r})):n.createElement(p,o({ref:t},s))}));function f(e,t){var r=arguments,c=t&&t.mdxType;if("string"==typeof e||c){var i=r.length,o=new Array(i);o[0]=m;var a={};for(var u in t)hasOwnProperty.call(t,u)&&(a[u]=t[u]);a.originalType=e,a.mdxType="string"==typeof e?e:c,o[1]=a;for(var l=2;l=0||(c[r]=e[r]);return c}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(c[r]=e[r])}return c}var u=n.createContext({}),l=function(e){var t=n.useContext(u),r=t;return e&&(r="function"==typeof e?e(t):o(o({},t),e)),r},s=function(e){var t=l(e.components);return n.createElement(u.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,c=e.mdxType,i=e.originalType,u=e.parentName,s=a(e,["components","mdxType","originalType","parentName"]),m=l(r),f=c,p=m["".concat(u,".").concat(f)]||m[f]||d[f]||i;return r?n.createElement(p,o(o({ref:t},s),{},{components:r})):n.createElement(p,o({ref:t},s))}));function f(e,t){var r=arguments,c=t&&t.mdxType;if("string"==typeof e||c){var i=r.length,o=new Array(i);o[0]=m;var a={};for(var u in t)hasOwnProperty.call(t,u)&&(a[u]=t[u]);a.originalType=e,a.mdxType="string"==typeof e?e:c,o[1]=a;for(var l=2;l=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var s=r.createContext({}),p=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},u=function(e){var t=p(e.components);return r.createElement(s.Provider,{value:t},e.children)},l={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,i=e.mdxType,a=e.originalType,s=e.parentName,u=c(e,["components","mdxType","originalType","parentName"]),f=p(n),d=i,m=f["".concat(s,".").concat(d)]||f[d]||l[d]||a;return n?r.createElement(m,o(o({ref:t},u),{},{components:n})):r.createElement(m,o({ref:t},u))}));function d(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=n.length,o=new Array(a);o[0]=f;var c={};for(var s in t)hasOwnProperty.call(t,s)&&(c[s]=t[s]);c.originalType=e,c.mdxType="string"==typeof e?e:i,o[1]=c;for(var p=2;p=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var s=r.createContext({}),p=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},u=function(e){var t=p(e.components);return r.createElement(s.Provider,{value:t},e.children)},l={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},f=r.forwardRef((function(e,t){var n=e.components,i=e.mdxType,a=e.originalType,s=e.parentName,u=c(e,["components","mdxType","originalType","parentName"]),f=p(n),d=i,m=f["".concat(s,".").concat(d)]||f[d]||l[d]||a;return n?r.createElement(m,o(o({ref:t},u),{},{components:n})):r.createElement(m,o({ref:t},u))}));function d(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=n.length,o=new Array(a);o[0]=f;var c={};for(var s in t)hasOwnProperty.call(t,s)&&(c[s]=t[s]);c.originalType=e,c.mdxType="string"==typeof e?e:i,o[1]=c;for(var p=2;p=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var l=r.createContext({}),u=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},m=function(e){var t=u(e.components);return r.createElement(l.Provider,{value:t},e.children)},s={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},p=r.forwardRef((function(e,t){var n=e.components,i=e.mdxType,a=e.originalType,l=e.parentName,m=c(e,["components","mdxType","originalType","parentName"]),p=u(n),d=i,f=p["".concat(l,".").concat(d)]||p[d]||s[d]||a;return n?r.createElement(f,o(o({ref:t},m),{},{components:n})):r.createElement(f,o({ref:t},m))}));function d(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=n.length,o=new Array(a);o[0]=p;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:i,o[1]=c;for(var u=2;u=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var l=r.createContext({}),u=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},m=function(e){var t=u(e.components);return r.createElement(l.Provider,{value:t},e.children)},s={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},p=r.forwardRef((function(e,t){var n=e.components,i=e.mdxType,a=e.originalType,l=e.parentName,m=c(e,["components","mdxType","originalType","parentName"]),p=u(n),d=i,f=p["".concat(l,".").concat(d)]||p[d]||s[d]||a;return n?r.createElement(f,o(o({ref:t},m),{},{components:n})):r.createElement(f,o({ref:t},m))}));function d(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=n.length,o=new Array(a);o[0]=p;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:i,o[1]=c;for(var u=2;u=0||(o[t]=e[t]);return o}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var l=n.createContext({}),u=function(e){var r=n.useContext(l),t=r;return e&&(t="function"==typeof e?e(r):c(c({},r),e)),t},f=function(e){var r=u(e.components);return n.createElement(l.Provider,{value:r},e.children)},s={inlineCode:"code",wrapper:function(e){var r=e.children;return n.createElement(n.Fragment,{},r)}},p=n.forwardRef((function(e,r){var t=e.components,o=e.mdxType,i=e.originalType,l=e.parentName,f=a(e,["components","mdxType","originalType","parentName"]),p=u(t),m=o,d=p["".concat(l,".").concat(m)]||p[m]||s[m]||i;return t?n.createElement(d,c(c({ref:r},f),{},{components:t})):n.createElement(d,c({ref:r},f))}));function m(e,r){var t=arguments,o=r&&r.mdxType;if("string"==typeof e||o){var i=t.length,c=new Array(i);c[0]=p;var a={};for(var l in r)hasOwnProperty.call(r,l)&&(a[l]=r[l]);a.originalType=e,a.mdxType="string"==typeof e?e:o,c[1]=a;for(var u=2;u=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var o=a.createContext({}),s=function(e){var t=a.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):c(c({},t),e)),n},p=function(e){var t=s(e.components);return a.createElement(o.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},u=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,o=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=s(n),m=r,k=u["".concat(o,".").concat(m)]||u[m]||d[m]||i;return n?a.createElement(k,c(c({ref:t},p),{},{components:n})):a.createElement(k,c({ref:t},p))}));function m(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,c=new Array(i);c[0]=u;var l={};for(var o in t)hasOwnProperty.call(t,o)&&(l[o]=t[o]);l.originalType=e,l.mdxType="string"==typeof e?e:r,c[1]=l;for(var s=2;s=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var u=a.createContext({}),i=function(e){var t=a.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):c(c({},t),e)),n},o=function(e){var t=i(e.components);return a.createElement(u.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},k=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,l=e.originalType,u=e.parentName,o=s(e,["components","mdxType","originalType","parentName"]),k=i(n),d=r,m=k["".concat(u,".").concat(d)]||k[d]||p[d]||l;return n?a.createElement(m,c(c({ref:t},o),{},{components:n})):a.createElement(m,c({ref:t},o))}));function d(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=n.length,c=new Array(l);c[0]=k;var s={};for(var u in t)hasOwnProperty.call(t,u)&&(s[u]=t[u]);s.originalType=e,s.mdxType="string"==typeof e?e:r,c[1]=s;for(var i=2;iChar \u56fe\u96c6",id:"\u9884\u52a0\u8f7d-char-\u56fe\u96c6",level:2},{value:"\u5b9e\u9645\u5e94\u7528",id:"\u5b9e\u9645\u5e94\u7528",level:2}],k={toc:p};function d(e){var t=e.components,s=(0,r.Z)(e,c);return(0,l.kt)("wrapper",(0,a.Z)({},k,s,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("h1",{id:"\u6587\u672c\u6e32\u67d3\u70d8\u7119"},"\u6587\u672c\u6e32\u67d3\u70d8\u7119"),(0,l.kt)("p",null,"\u793e\u533a\u7248\u4e3a\u5f15\u64ce\u589e\u52a0\u4e86\u6587\u672c\u6e32\u67d3\u70d8\u7119\u7684\u80fd\u529b\u3002"),(0,l.kt)("p",null,"\u4ee5\u67d0\u4e2a\u9879\u76ee\u7684\u754c\u9762\u6253\u5f00\u64cd\u4f5c\u4e3a\u4f8b\uff0c\u901a\u8fc7\u5206\u6790 CPU Profile \u53ef\u4ee5\u770b\u5230\uff0c\u5f53\u754c\u9762\u8282\u70b9\u6fc0\u6d3b\u65f6\uff0c\u7edd\u5927\u90e8\u5206\u7684\u8017\u65f6\u90fd\u6765\u81ea\u4e8e\u6587\u672c\u6e32\u67d3\u51fd\u6570\uff08_applyFontTexture\uff09\u3002"),(0,l.kt)("p",null,(0,l.kt)("img",{alt:"before baking",src:n(89435).Z,width:"1544",height:"1042"})),(0,l.kt)("p",null,"\u4f46\u8fd9\u4e2a\u754c\u9762\u7684\u6587\u672c\u91cf\u5e76\u4e0d\u591a\uff0c\u5728\u4f4e\u7aef\u673a\u4e0a\u7684\u8017\u65f6\u5374\u6709 1.06s\u3002"),(0,l.kt)("p",null,"\u901a\u8fc7\u6587\u672c\u6e32\u67d3\u70d8\u7119\u4f18\u5316\u540e\uff0c\u8017\u65f6\u964d\u81f3 60ms\uff01"),(0,l.kt)("p",null,(0,l.kt)("img",{alt:"after baking",src:n(75247).Z,width:"812",height:"626"})),(0,l.kt)("p",null,"\u6587\u672c\u6e32\u67d3\u70d8\u7119\u5206\u4e3a\u4e09\u4e2a\u90e8\u5206\uff1a"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("strong",{parentName:"li"},"\u9884\u52a0\u8f7d Label Canvas")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("strong",{parentName:"li"},"\u70d8\u7119\u6587\u672c\u6d4b\u91cf\u503c")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("strong",{parentName:"li"},"\u9884\u52a0\u8f7d ",(0,l.kt)("inlineCode",{parentName:"strong"},"Char")," \u56fe\u96c6"))),(0,l.kt)("p",null,"\u6211\u4eec\u5c06\u9010\u4e2a\u8bf4\u660e\u3002"),(0,l.kt)("h2",{id:"\u9884\u52a0\u8f7d-label-canvas"},"\u9884\u52a0\u8f7d Label Canvas"),(0,l.kt)("p",null,"\u5f15\u64ce\u901a\u8fc7\u79bb\u5c4f Canvas \u6e32\u67d3\u6587\u672c\uff0c\u5185\u90e8\u7ef4\u62a4\u7740\u4e00\u4e2a Canvas \u6c60\u4ee5\u4f5c\u590d\u7528\u3002"),(0,l.kt)("p",null,"\u6bcf\u4e2a\u975e Char \u6a21\u5f0f\u7684 Label \u90fd\u4f1a\u5360\u7528\u4e00\u4e2a Canvas \u5bf9\u8c61\uff0c\u76f4\u5230 Label \u9500\u6bc1\u624d\u4f1a\u5c06 Canvas \u5bf9\u8c61\u653e\u56de\u6c60\u4e2d\u3002"),(0,l.kt)("p",null,"\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0cCanvas \u6c60\u4e0d\u9884\u5148\u521b\u5efa\u5bf9\u8c61\uff0c\u800c\u662f\u5728\u4f7f\u7528\u65f6\u8fdb\u884c\u521b\u5efa\uff0c\u5728\u90e8\u5206\u4f4e\u7aef\u8bbe\u5907\u4e0a\uff0c\u8fd9\u4f1a\u589e\u52a0\u6587\u672c\u6e32\u67d3\u65f6\u7684\u5361\u987f\u3002"),(0,l.kt)("p",null,"\u5e76\u4e14\u8be5 Canvas \u6c60\u9ed8\u8ba4\u6700\u5927\u7f13\u5b58\u6570\u91cf\u4e3a 32\uff0c\u8d85\u8fc7\u8be5\u6570\u91cf\u7684\u5bf9\u8c61\u4e0d\u4f1a\u653e\u5165\u6c60\u4e2d\u800c\u662f\u76f4\u63a5\u9500\u6bc1\uff0c\u8fd9\u4e5f\u5bfc\u81f4\u5927\u91cf\u4f7f\u7528 Label \u7684\u9879\u76ee\u53ef\u80fd\u4f1a\u56e0\u4e3a\u6301\u7eed\u521b\u5efa Canvas \u800c\u9020\u6210\u5361\u987f\u3002"),(0,l.kt)("p",null,"\u73b0\u5728\uff0c\u793e\u533a\u7248\u5f00\u653e\u4e86\u8fd9\u90e8\u5206\u7684\u63a5\u53e3\uff0c\u53ef\u901a\u8fc7 ",(0,l.kt)("inlineCode",{parentName:"p"},"cc.Label._canvasPool")," \u8bbf\u95ee\u8be5\u5bf9\u8c61\u6c60\u3002"),(0,l.kt)("p",null,"\u53ef\u4ee5\u8c03\u6574\u6700\u5927\u7f13\u5b58\u6570\u91cf\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"cc.Label._canvasPool.max = 64;\n")),(0,l.kt)("p",null,"\u53ef\u4ee5\u9884\u5148\u7f13\u5b58 Canvas \u5bf9\u8c61\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"cc.Label._canvasPool.cache(Number.MAX_SAFE_INTEGER);\n")),(0,l.kt)("p",null,"\u9884\u5148\u7f13\u5b58\u63a5\u53e3\u9700\u4f20\u5165\u8981\u7f13\u5b58\u7684\u5bf9\u8c61\u6570\u91cf\uff0c\u65e0\u8bba\u5982\u4f55\uff0c\u5b9e\u9645\u7f13\u5b58\u7684\u5bf9\u8c61\u6570\u91cf\u90fd\u4e0d\u4f1a\u8d85\u8fc7\u8bbe\u7f6e\u7684\u6700\u5927\u6570\u91cf\u3002"),(0,l.kt)("h2",{id:"\u70d8\u7119\u6587\u672c\u6d4b\u91cf\u503c"},"\u70d8\u7119\u6587\u672c\u6d4b\u91cf\u503c"),(0,l.kt)("p",null,"\u5f15\u64ce\u5185\u90e8\u5728\u6e32\u67d3\u6587\u672c\u524d\u9700\u8981\u5148\u6d4b\u91cf\u5b57\u7b26\u7684\u5bbd\u9ad8\uff0c\u8fd9\u662f\u901a\u8fc7 Canvas \u4e0a\u7684 ",(0,l.kt)("inlineCode",{parentName:"p"},"measureText")," \u63a5\u53e3\u5b9e\u73b0\u7684\u3002"),(0,l.kt)("p",null,"\u5982\u679c\u4f60\u5bf9\u6027\u80fd\u8fdb\u884c\u4e86\u5206\u6790\uff0c\u90a3\u4e48\u53ef\u4ee5\u770b\u51fa\uff0c\u8be5\u63a5\u53e3\u5360\u636e\u5355\u6b21\u6587\u672c\u6e32\u67d3\u603b\u8017\u65f6\u7684 80% \u4ee5\u4e0a\u3002"),(0,l.kt)("p",null,"\u5f15\u64ce\u4f1a\u5bf9\u6b64\u63a5\u53e3\u7684\u7ed3\u679c\u8fdb\u884c\u7f13\u5b58\uff0c\u76f8\u540c\u6837\u5f0f\u7684\u6587\u672c\u4f1a\u4ece\u7f13\u5b58\u4e2d\u8bfb\u53d6\uff0c\u907f\u514d\u4e86\u90e8\u5206\u6027\u80fd\u6d88\u8017\u3002"),(0,l.kt)("p",null,"\u4f46\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u8be5\u7f13\u5b58\u4ec5\u4f1a\u4fdd\u7559\u6700\u540e 100 \u6b21\u7684\u6d4b\u91cf\u503c\uff0c\u4e5f\u5c31\u662f\u8bf4\uff0c\u5982\u679c\u6240\u6709 Label \u4f7f\u7528 Char \u6a21\u5f0f\u6e32\u67d3\uff0c\u5728\u6e32\u67d3 100 \u4e2a\u4e0d\u540c\u7684\u5b57\u7b26\u540e\uff0c\u7f13\u5b58\u5c31\u4f1a\u88ab\u9010\u4e2a\u79fb\u9664\uff0c\u6d4b\u91cf\u503c\u53c8\u4f1a\u6709\u5927\u91cf\u6027\u80fd\u6d88\u8017\u3002"),(0,l.kt)("p",null,"\u6240\u4ee5\uff0c\u793e\u533a\u7248\u5bf9\u8fd9\u90e8\u5206\u63a5\u53e3\u8fdb\u884c\u4e86\u4f18\u5316\uff0c\u5f00\u653e\u4e86 ",(0,l.kt)("inlineCode",{parentName:"p"},"cc.textUtils")," \u7684\u90e8\u5206\u63a5\u53e3\u6765\u63a7\u5236\u6d4b\u91cf\u503c\u7f13\u5b58\u3002"),(0,l.kt)("p",null,"\u9996\u5148\uff0c\u4f60\u53ef\u4ee5\u8c03\u6574\u7f13\u5b58\u5bb9\u91cf\uff0c\u5bb9\u91cf\u8d8a\u5927\uff0c\u5c31\u80fd\u907f\u514d\u66f4\u591a\u6d4b\u91cf\u503c\u7684\u6027\u80fd\u6d88\u8017\uff0c\u4f46\u5185\u5b58\u5360\u7528\u4f1a\u4e0a\u5347\uff0c\u8bf7\u89c6\u60c5\u51b5\u800c\u5b9a\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"cc.textUtils.measureCache.limit = Number.MAX_SAFE_INTEGER;\n")),(0,l.kt)("p",null,"\u5176\u6b21\uff0c\u6211\u4eec\u5f00\u653e\u4e86\u64cd\u4f5c\u7f13\u5b58\u7684\u63a5\u53e3\uff0c\u610f\u5473\u7740\u4f60\u53ef\u4ee5\u70d8\u7119\u6d4b\u91cf\u503c\uff0c\u5c06\u6d4b\u91cf\u503c\u6570\u636e\u4fdd\u5b58\u5230\u9879\u76ee\u4e2d\uff0c\u5b8c\u5168\u907f\u514d\u6d4b\u91cf\u503c\u7684\u6027\u80fd\u6d88\u8017\uff01"),(0,l.kt)("p",null,"\u83b7\u53d6\u4e0e\u5e94\u7528\u7f13\u5b58\u5bf9\u8c61\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"// \u83b7\u53d6\nconst data = cc.textUtils.getMeasureCache();\n\n// \u5e94\u7528\ncc.textUtils.applyMeasureCache(data);\n")),(0,l.kt)("p",null,"\u6211\u4eec\u63a8\u8350\u7684\u7528\u6cd5\u662f\uff1a"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"\u5728\u5f00\u53d1\u6d4b\u8bd5\u7684\u7248\u672c\u4e2d\u6536\u96c6\u7f13\u5b58\u6570\u636e\u5e76\u5e8f\u5217\u5316\u5230\u9879\u76ee\u7684 JSON \u6587\u4ef6\u4e2d\uff08\u56e0\u4e3a\u6536\u96c6\u4f1a\u6709\u6027\u80fd\u6d88\u8017\uff0c\u6240\u4ee5\u7ebf\u4e0a\u7248\u672c\u4e0d\u8fdb\u884c\u6536\u96c6\uff09"),(0,l.kt)("li",{parentName:"ul"},"\u5728\u6e38\u620f\u542f\u52a8\u524d\u5e94\u7528\u7f13\u5b58\u6570\u636e")),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"\u6ce8\u610f")),(0,l.kt)("p",null,"\u7ecf\u8fc7\u6211\u4eec\u7684\u6d4b\u8bd5\uff0c\u540c\u4e2a\u5b57\u7b26\u5728\u5fae\u4fe1\u5c0f\u6e38\u620f\u5e73\u53f0\u4e0e Web \u7aef\u5f97\u51fa\u7684\u6d4b\u91cf\u503c\u662f\u4e00\u81f4\u7684\u3002"),(0,l.kt)("p",null,"\u4f46\u53ef\u80fd\u4f1a\u51fa\u73b0\u5176\u5b83\u4e0d\u540c\u5e73\u53f0\u6216\u8005\u8bbe\u5907\u5bf9\u540c\u4e2a\u5b57\u7b26\u7684\u6d4b\u91cf\u503c\u662f\u4e0d\u4e00\u81f4\u7684\uff0c\u5efa\u8bae\u9488\u5bf9\u8fd9\u79cd\u60c5\u51b5\u70d8\u7119\u591a\u4e2a JSON \u6587\u4ef6\u5e76\u5206\u522b\u5e94\u7528\u5373\u53ef\u3002"),(0,l.kt)("h2",{id:"\u9884\u52a0\u8f7d-char-\u56fe\u96c6"},"\u9884\u52a0\u8f7d ",(0,l.kt)("inlineCode",{parentName:"h2"},"Char")," \u56fe\u96c6"),(0,l.kt)("p",null,"\u5efa\u8bae\u5148\u9605\u8bfb ",(0,l.kt)("a",{parentName:"p",href:"#%E7%83%98%E7%84%99%E6%96%87%E6%9C%AC%E6%B5%8B%E9%87%8F%E5%80%BC"},"\u70d8\u7119\u6587\u672c\u6d4b\u91cf\u503c"),"\uff0c\u518d\u9605\u8bfb\u672c\u8282\u5185\u5bb9\u3002"),(0,l.kt)("p",null,"\u5982\u679c\u4f60\u5bf9\u6027\u80fd\u8fdb\u884c\u4e86\u5206\u6790\uff0c\u90a3\u4e48\u53ef\u4ee5\u770b\u51fa\uff0c\u5373\u4f7f\u6211\u4eec\u70d8\u7119\u4e86\u6587\u672c\u6d4b\u91cf\u503c\uff0c\u4f9d\u65e7\u4f1a\u6709\u5c06\u6587\u672c\u7ed8\u5236\u5230\u7eb9\u7406\u4e0a\u7684\u6027\u80fd\u6d88\u8017\uff0c\u90a3\u4e48\u8fd9\u5269\u4e0b 20% \u7684\u6027\u80fd\u6d88\u8017\u5982\u679c\u65e0\u6cd5\u907f\u514d\uff0c\u80fd\u63a7\u5236\u5b83\u6d88\u8017\u7684\u65f6\u673a\u4e5f\u662f\u5f88\u6709\u610f\u4e49\u7684\u3002"),(0,l.kt)("p",null,"\u6240\u4ee5\uff0c\u793e\u533a\u7248\u63d0\u4f9b\u4e86 Char \u56fe\u96c6\u7684\u9884\u52a0\u8f7d\u63a5\u53e3\uff0c\u6211\u4eec\u53ef\u4ee5\u5728\u7279\u5b9a\u65f6\u673a\uff08\u6bd4\u5982\u6e38\u620f\u542f\u52a8\u65f6\uff09\u5c31\u52a0\u8f7d\u597d\u4f1a\u7528\u5230\u7684\u6240\u6709\u5b57\u7b26\uff0c\u907f\u514d\u6e38\u620f\u4e2d\u7684\u5361\u987f\u3002"),(0,l.kt)("p",null,"\u5f15\u64ce\u7684 Char \u56fe\u96c6\u53ea\u4f1a\u5728\u7528\u5230\u65f6\u624d\u4f1a\u521b\u5efa\uff0c\u6240\u4ee5\u6211\u4eec\u5728\u8c03\u7528\u4efb\u4f55\u63a5\u53e3\u524d\u9700\u8981\u521d\u59cb\u5316\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"cc.Label.LetterAtlases.init();\n")),(0,l.kt)("p",null,"\u7531\u4e8e\u5f15\u64ce\u5e76\u4e0d\u4f1a\u6301\u6709\u6bcf\u4e2a\u5b57\u7b26\u4fe1\u606f\u7684\u7f13\u5b58\uff0c\u6240\u4ee5\u9700\u8981\u901a\u8fc7\u793e\u533a\u7248\u65b0\u589e\u7684\u5f00\u542f\u7f13\u5b58\u63a5\u53e3\u6765\u4fdd\u7559\u5b57\u7b26\u4fe1\u606f\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"cc.Label._shareAtlas.enableLetterCache = true;\n")),(0,l.kt)("p",null,"\u548c\u70d8\u7119\u6587\u672c\u6d4b\u91cf\u503c\u4e00\u6837\uff0c\u6211\u4eec\u53ea\u63a8\u8350\u5728\u5f00\u53d1\u6d4b\u8bd5\u7248\u672c\u6536\u96c6\u7f13\u5b58\uff0c\u56e0\u4e3a\u4fdd\u7559\u7f13\u5b58\u548c\u6536\u96c6\u64cd\u4f5c\u90fd\u4f1a\u6709\u6027\u80fd\u6d88\u8017\u3002"),(0,l.kt)("p",null,"\u4ee5\u4e0b\u4e24\u4e2a\u63a5\u53e3\u53ef\u4ee5\u83b7\u53d6\u4e0e\u5e94\u7528\u5b57\u7b26\u7f13\u5b58\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"// \u83b7\u53d6\nconst data = cc.Label._shareAtlas.getLetterCache();\n\n// \u5e94\u7528\ncc.Label._shareAtlas.applyLetterCache(data);\n")),(0,l.kt)("p",null,"\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u6211\u4eec\u53ea\u662f\u5c06\u6e32\u67d3\u8fc7\u7684\u5b57\u7b26\u4fe1\u606f\u7f13\u5b58\u4e0b\u6765\uff0c\u800c\u4e0d\u662f\u7eb9\u7406\u672c\u8eab\uff0c\u7136\u540e\u5728\u7279\u5b9a\u65f6\u673a\u8c03\u7528\u63a5\u53e3\u6765\u6279\u91cf\u6e32\u67d3\u5b57\u7b26\u5230\u7eb9\u7406\u4e0a\u3002"),(0,l.kt)("p",null,"\u5e76\u4e14\uff0c\u8fd9\u91cc\u7684\u7f13\u5b58\u4fe1\u606f\u5df2\u7ecf\u5305\u62ec\u4e86\u6bcf\u4e2a\u5b57\u7b26\u7684\u6d4b\u91cf\u503c\uff0c\u6240\u4ee5\u5982\u679c\u4f60\u7684\u9879\u76ee\u53ea\u4f7f\u7528 ",(0,l.kt)("inlineCode",{parentName:"p"},"CHAR")," \u6a21\u5f0f\u7684 Label \u7ec4\u4ef6\uff0c\u90a3\u4e48\u4f60\u4e0d\u7528\u518d\u5355\u72ec\u70d8\u7119\u6587\u672c\u6d4b\u91cf\u503c\u3002"),(0,l.kt)("h2",{id:"\u5b9e\u9645\u5e94\u7528"},"\u5b9e\u9645\u5e94\u7528"),(0,l.kt)("p",null,"\u4f60\u53ef\u4ee5\u53c2\u8003\u4ee5\u4e0b\u4ee3\u7801\uff0c\u5728\u6e38\u620f\u5f00\u53d1\u6d4b\u8bd5\u7248\u672c\u4e2d\u5c06\u7f13\u5b58\u6570\u636e\u4e0a\u4f20\u81f3\u4e00\u4e2a\u540e\u7aef\u670d\u52a1\u5668\u3002"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},'// \u4e0a\u62a5 Label \u70d8\u7119\u4fe1\u606f\nif (!CC_EDITOR && game.TEST) {\n cc.director.once(cc.Director.EVENT_AFTER_SCENE_LAUNCH, () => {\n // \u542f\u7528\u7f13\u5b58\n cc.Label._shareAtlas.enableLetterCache = true;\n \n setInterval(() => {\n const unCaches = {};\n for (const key in cc.textUtils.measureCache.datas) {\n if (!(key in _measureCache)) {\n unCaches[key] = cc.textUtils.measureCache.datas[key].value;\n _measureCache[key] = unCaches[key];\n console.warn("\u672a\u6536\u96c6\u7684\u6d4b\u91cf\u503c\uff1a", key, unCaches[key]);\n }\n }\n\n if (Object.keys(unCaches).length > 0) {\n sendToServer(JSON.stringify(unCaches));\n }\n\n const unLetters = {};\n for (const key in cc.Label._shareAtlas.letterCache) {\n if (!(key in _letterCache)) {\n unLetters[key] = cc.Label._shareAtlas.letterCache[key];\n _letterCache[key] = unLetters[key];\n console.warn("\u672a\u6536\u96c6\u7684 Char \u5b57\u7b26\uff1a", key, unLetters[key]);\n }\n }\n\n if (Object.keys(unLetters).length > 0) {\n sendToServer(JSON.stringify(unLetters));\n }\n }, 10000);\n });\n}\n')),(0,l.kt)("p",null,"\u7136\u540e\u5728\u6bcf\u4e2a\u7248\u672c\u4e0a\u7ebf\u524d\uff0c\u4ece\u540e\u7aef\u4e0b\u8f7d\u7f13\u5b58\u6570\u636e\u5230\u9879\u76ee\u4e2d\uff0c\u5e76\u7528\u4ee3\u7801\u8bfb\u53d6\u5e76\u5728\u6e38\u620f\u5f00\u59cb\u524d\u5e94\u7528\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"cc.director.once(cc.Director.EVENT_AFTER_SCENE_LAUNCH, () => {\n // \u63d0\u524d\u7f13\u5b58 Label Canvas\n cc.Label._canvasPool.cache(Number.MAX_SAFE_INTEGER);\n\n // \u63d0\u9ad8\u6587\u672c\u6d4b\u91cf\u503c\u7f13\u5b58\u5bb9\u91cf\n cc.textUtils.measureCache.limit = Number.MAX_SAFE_INTEGER;\n cc.textUtils.applyMeasureCache(_measureCache);\n\n // \u70d8\u7119 CHAR \u5b57\u7b26\n cc.Label.LetterAtlases.init();\n cc.Label._shareAtlas.applyLetterCache(_letterCache);\n});\n")))}d.isMDXComponent=!0},75247:function(e,t,n){t.Z=n.p+"assets/images/after-baking-c51a2a28fa45d7143bcc44e6e6c2f5ea.png"},89435:function(e,t,n){t.Z=n.p+"assets/images/before-baking-c6759f737a1faec7971ec238b287eb60.png"}}]); \ No newline at end of file diff --git a/assets/js/cd4bb5d2.1aa190b5.js b/assets/js/cd4bb5d2.1aa190b5.js new file mode 100644 index 00000000..63bce4d5 --- /dev/null +++ b/assets/js/cd4bb5d2.1aa190b5.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[9658],{3905:function(e,t,n){n.d(t,{Zo:function(){return u},kt:function(){return d}});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var c=r.createContext({}),p=function(e){var t=r.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},u=function(e){var t=p(e.components);return r.createElement(c.Provider,{value:t},e.children)},s={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,c=e.parentName,u=o(e,["components","mdxType","originalType","parentName"]),m=p(n),d=a,k=m["".concat(c,".").concat(d)]||m[d]||s[d]||i;return n?r.createElement(k,l(l({ref:t},u),{},{components:n})):r.createElement(k,l({ref:t},u))}));function d(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,l=new Array(i);l[0]=m;var o={};for(var c in t)hasOwnProperty.call(t,c)&&(o[c]=t[c]);o.originalType=e,o.mdxType="string"==typeof e?e:a,l[1]=o;for(var p=2;p=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var o=a.createContext({}),s=function(e){var t=a.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):c(c({},t),e)),n},p=function(e){var t=s(e.components);return a.createElement(o.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},u=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,o=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=s(n),m=r,k=u["".concat(o,".").concat(m)]||u[m]||d[m]||i;return n?a.createElement(k,c(c({ref:t},p),{},{components:n})):a.createElement(k,c({ref:t},p))}));function m(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,c=new Array(i);c[0]=u;var l={};for(var o in t)hasOwnProperty.call(t,o)&&(l[o]=t[o]);l.originalType=e,l.mdxType="string"==typeof e?e:r,c[1]=l;for(var s=2;s=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var o=a.createContext({}),s=function(e){var t=a.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):c(c({},t),e)),n},p=function(e){var t=s(e.components);return a.createElement(o.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},u=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,i=e.originalType,o=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=s(n),m=r,k=u["".concat(o,".").concat(m)]||u[m]||d[m]||i;return n?a.createElement(k,c(c({ref:t},p),{},{components:n})):a.createElement(k,c({ref:t},p))}));function m(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=n.length,c=new Array(i);c[0]=u;var l={};for(var o in t)hasOwnProperty.call(t,o)&&(l[o]=t[o]);l.originalType=e,l.mdxType="string"==typeof e?e:r,c[1]=l;for(var s=2;s=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var s=n.createContext({}),c=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):o(o({},t),e)),r},l=function(e){var t=c(e.components);return n.createElement(s.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,i=e.mdxType,a=e.originalType,s=e.parentName,l=u(e,["components","mdxType","originalType","parentName"]),d=c(r),f=i,m=d["".concat(s,".").concat(f)]||d[f]||p[f]||a;return r?n.createElement(m,o(o({ref:t},l),{},{components:r})):n.createElement(m,o({ref:t},l))}));function f(e,t){var r=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=r.length,o=new Array(a);o[0]=d;var u={};for(var s in t)hasOwnProperty.call(t,s)&&(u[s]=t[s]);u.originalType=e,u.mdxType="string"==typeof e?e:i,o[1]=u;for(var c=2;c=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var s=n.createContext({}),c=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):o(o({},t),e)),r},l=function(e){var t=c(e.components);return n.createElement(s.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,i=e.mdxType,a=e.originalType,s=e.parentName,l=u(e,["components","mdxType","originalType","parentName"]),d=c(r),f=i,m=d["".concat(s,".").concat(f)]||d[f]||p[f]||a;return r?n.createElement(m,o(o({ref:t},l),{},{components:r})):n.createElement(m,o({ref:t},l))}));function f(e,t){var r=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=r.length,o=new Array(a);o[0]=d;var u={};for(var s in t)hasOwnProperty.call(t,s)&&(u[s]=t[s]);u.originalType=e,u.mdxType="string"==typeof e?e:i,o[1]=u;for(var c=2;c=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var u=r.createContext({}),l=function(e){var t=r.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},s=function(e){var t=l(e.components);return r.createElement(u.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,i=e.mdxType,a=e.originalType,u=e.parentName,s=c(e,["components","mdxType","originalType","parentName"]),d=l(n),f=i,m=d["".concat(u,".").concat(f)]||d[f]||p[f]||a;return n?r.createElement(m,o(o({ref:t},s),{},{components:n})):r.createElement(m,o({ref:t},s))}));function f(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=n.length,o=new Array(a);o[0]=d;var c={};for(var u in t)hasOwnProperty.call(t,u)&&(c[u]=t[u]);c.originalType=e,c.mdxType="string"==typeof e?e:i,o[1]=c;for(var l=2;l=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var u=r.createContext({}),l=function(e){var t=r.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},s=function(e){var t=l(e.components);return r.createElement(u.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,i=e.mdxType,a=e.originalType,u=e.parentName,s=c(e,["components","mdxType","originalType","parentName"]),d=l(n),f=i,m=d["".concat(u,".").concat(f)]||d[f]||p[f]||a;return n?r.createElement(m,o(o({ref:t},s),{},{components:n})):r.createElement(m,o({ref:t},s))}));function f(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var a=n.length,o=new Array(a);o[0]=d;var c={};for(var u in t)hasOwnProperty.call(t,u)&&(c[u]=t[u]);c.originalType=e,c.mdxType="string"==typeof e?e:i,o[1]=c;for(var l=2;l=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),l=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},p=function(e){var t=l(e.components);return r.createElement(s.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,s=e.parentName,p=c(e,["components","mdxType","originalType","parentName"]),d=l(n),f=a,m=d["".concat(s,".").concat(f)]||d[f]||u[f]||i;return n?r.createElement(m,o(o({ref:t},p),{},{components:n})):r.createElement(m,o({ref:t},p))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=d;var c={};for(var s in t)hasOwnProperty.call(t,s)&&(c[s]=t[s]);c.originalType=e,c.mdxType="string"==typeof e?e:a,o[1]=c;for(var l=2;l=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var p=a.createContext({}),d=function(e){var t=a.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},m=function(e){var t=d(e.components);return a.createElement(p.Provider,{value:t},e.children)},s={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},u=a.forwardRef((function(e,t){var n=e.components,i=e.mdxType,r=e.originalType,p=e.parentName,m=o(e,["components","mdxType","originalType","parentName"]),u=d(n),c=i,k=u["".concat(p,".").concat(c)]||u[c]||s[c]||r;return n?a.createElement(k,l(l({ref:t},m),{},{components:n})):a.createElement(k,l({ref:t},m))}));function c(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var r=n.length,l=new Array(r);l[0]=u;var o={};for(var p in t)hasOwnProperty.call(t,p)&&(o[p]=t[p]);o.originalType=e,o.mdxType="string"==typeof e?e:i,l[1]=o;for(var d=2;d=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var p=a.createContext({}),d=function(e){var t=a.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},m=function(e){var t=d(e.components);return a.createElement(p.Provider,{value:t},e.children)},s={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},u=a.forwardRef((function(e,t){var n=e.components,i=e.mdxType,r=e.originalType,p=e.parentName,m=o(e,["components","mdxType","originalType","parentName"]),u=d(n),c=i,k=u["".concat(p,".").concat(c)]||u[c]||s[c]||r;return n?a.createElement(k,l(l({ref:t},m),{},{components:n})):a.createElement(k,l({ref:t},m))}));function c(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var r=n.length,l=new Array(r);l[0]=u;var o={};for(var p in t)hasOwnProperty.call(t,p)&&(o[p]=t[p]);o.originalType=e,o.mdxType="string"==typeof e?e:i,l[1]=o;for(var d=2;d=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var l=r.createContext({}),u=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):a(a({},t),e)),n},s=function(e){var t=u(e.components);return r.createElement(l.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,o=e.mdxType,i=e.originalType,l=e.parentName,s=c(e,["components","mdxType","originalType","parentName"]),d=u(n),f=o,b=d["".concat(l,".").concat(f)]||d[f]||p[f]||i;return n?r.createElement(b,a(a({ref:t},s),{},{components:n})):r.createElement(b,a({ref:t},s))}));function f(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var i=n.length,a=new Array(i);a[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:o,a[1]=c;for(var u=2;u=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var l=r.createContext({}),u=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):a(a({},t),e)),n},s=function(e){var t=u(e.components);return r.createElement(l.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,o=e.mdxType,i=e.originalType,l=e.parentName,s=c(e,["components","mdxType","originalType","parentName"]),d=u(n),f=o,b=d["".concat(l,".").concat(f)]||d[f]||p[f]||i;return n?r.createElement(b,a(a({ref:t},s),{},{components:n})):r.createElement(b,a({ref:t},s))}));function f(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var i=n.length,a=new Array(i);a[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:o,a[1]=c;for(var u=2;u=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var i=a.createContext({}),u=function(e){var t=a.useContext(i),n=t;return e&&(n="function"==typeof e?e(t):c(c({},t),e)),n},o=function(e){var t=u(e.components);return a.createElement(i.Provider,{value:t},e.children)},p={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},k=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,l=e.originalType,i=e.parentName,o=s(e,["components","mdxType","originalType","parentName"]),k=u(n),d=r,m=k["".concat(i,".").concat(d)]||k[d]||p[d]||l;return n?a.createElement(m,c(c({ref:t},o),{},{components:n})):a.createElement(m,c({ref:t},o))}));function d(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=n.length,c=new Array(l);c[0]=k;var s={};for(var i in t)hasOwnProperty.call(t,i)&&(s[i]=t[i]);s.originalType=e,s.mdxType="string"==typeof e?e:r,c[1]=s;for(var u=2;uChar \u56fe\u96c6",id:"\u9884\u52a0\u8f7d-char-\u56fe\u96c6",level:2},{value:"\u5b9e\u9645\u5e94\u7528",id:"\u5b9e\u9645\u5e94\u7528",level:2}],k={toc:p};function d(e){var t=e.components,s=(0,r.Z)(e,c);return(0,l.kt)("wrapper",(0,a.Z)({},k,s,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("h1",{id:"\u6587\u672c\u6e32\u67d3\u70d8\u7119"},"\u6587\u672c\u6e32\u67d3\u70d8\u7119"),(0,l.kt)("p",null,"\u793e\u533a\u7248\u4e3a\u5f15\u64ce\u589e\u52a0\u4e86\u6587\u672c\u6e32\u67d3\u70d8\u7119\u7684\u80fd\u529b\u3002"),(0,l.kt)("p",null,"\u4ee5\u67d0\u4e2a\u9879\u76ee\u7684\u754c\u9762\u6253\u5f00\u64cd\u4f5c\u4e3a\u4f8b\uff0c\u901a\u8fc7\u5206\u6790 CPU Profile \u53ef\u4ee5\u770b\u5230\uff0c\u5f53\u754c\u9762\u8282\u70b9\u6fc0\u6d3b\u65f6\uff0c\u7edd\u5927\u90e8\u5206\u7684\u8017\u65f6\u90fd\u6765\u81ea\u4e8e\u6587\u672c\u6e32\u67d3\u51fd\u6570\uff08_applyFontTexture\uff09\u3002"),(0,l.kt)("p",null,(0,l.kt)("img",{alt:"before baking",src:n(73658).Z,width:"1544",height:"1042"})),(0,l.kt)("p",null,"\u4f46\u8fd9\u4e2a\u754c\u9762\u7684\u6587\u672c\u91cf\u5e76\u4e0d\u591a\uff0c\u5728\u4f4e\u7aef\u673a\u4e0a\u7684\u8017\u65f6\u5374\u6709 1.06s\u3002"),(0,l.kt)("p",null,"\u901a\u8fc7\u6587\u672c\u6e32\u67d3\u70d8\u7119\u4f18\u5316\u540e\uff0c\u8017\u65f6\u964d\u81f3 60ms\uff01"),(0,l.kt)("p",null,(0,l.kt)("img",{alt:"after baking",src:n(77333).Z,width:"812",height:"626"})),(0,l.kt)("p",null,"\u6587\u672c\u6e32\u67d3\u70d8\u7119\u5206\u4e3a\u4e09\u4e2a\u90e8\u5206\uff1a"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("strong",{parentName:"li"},"\u9884\u52a0\u8f7d Label Canvas")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("strong",{parentName:"li"},"\u70d8\u7119\u6587\u672c\u6d4b\u91cf\u503c")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("strong",{parentName:"li"},"\u9884\u52a0\u8f7d ",(0,l.kt)("inlineCode",{parentName:"strong"},"Char")," \u56fe\u96c6"))),(0,l.kt)("p",null,"\u6211\u4eec\u5c06\u9010\u4e2a\u8bf4\u660e\u3002"),(0,l.kt)("h2",{id:"\u9884\u52a0\u8f7d-label-canvas"},"\u9884\u52a0\u8f7d Label Canvas"),(0,l.kt)("p",null,"\u5f15\u64ce\u901a\u8fc7\u79bb\u5c4f Canvas \u6e32\u67d3\u6587\u672c\uff0c\u5185\u90e8\u7ef4\u62a4\u7740\u4e00\u4e2a Canvas \u6c60\u4ee5\u4f5c\u590d\u7528\u3002"),(0,l.kt)("p",null,"\u6bcf\u4e2a\u975e Char \u6a21\u5f0f\u7684 Label \u90fd\u4f1a\u5360\u7528\u4e00\u4e2a Canvas \u5bf9\u8c61\uff0c\u76f4\u5230 Label \u9500\u6bc1\u624d\u4f1a\u5c06 Canvas \u5bf9\u8c61\u653e\u56de\u6c60\u4e2d\u3002"),(0,l.kt)("p",null,"\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0cCanvas \u6c60\u4e0d\u9884\u5148\u521b\u5efa\u5bf9\u8c61\uff0c\u800c\u662f\u5728\u4f7f\u7528\u65f6\u8fdb\u884c\u521b\u5efa\uff0c\u5728\u90e8\u5206\u4f4e\u7aef\u8bbe\u5907\u4e0a\uff0c\u8fd9\u4f1a\u589e\u52a0\u6587\u672c\u6e32\u67d3\u65f6\u7684\u5361\u987f\u3002"),(0,l.kt)("p",null,"\u5e76\u4e14\u8be5 Canvas \u6c60\u9ed8\u8ba4\u6700\u5927\u7f13\u5b58\u6570\u91cf\u4e3a 32\uff0c\u8d85\u8fc7\u8be5\u6570\u91cf\u7684\u5bf9\u8c61\u4e0d\u4f1a\u653e\u5165\u6c60\u4e2d\u800c\u662f\u76f4\u63a5\u9500\u6bc1\uff0c\u8fd9\u4e5f\u5bfc\u81f4\u5927\u91cf\u4f7f\u7528 Label \u7684\u9879\u76ee\u53ef\u80fd\u4f1a\u56e0\u4e3a\u6301\u7eed\u521b\u5efa Canvas \u800c\u9020\u6210\u5361\u987f\u3002"),(0,l.kt)("p",null,"\u73b0\u5728\uff0c\u793e\u533a\u7248\u5f00\u653e\u4e86\u8fd9\u90e8\u5206\u7684\u63a5\u53e3\uff0c\u53ef\u901a\u8fc7 ",(0,l.kt)("inlineCode",{parentName:"p"},"cc.Label._canvasPool")," \u8bbf\u95ee\u8be5\u5bf9\u8c61\u6c60\u3002"),(0,l.kt)("p",null,"\u53ef\u4ee5\u8c03\u6574\u6700\u5927\u7f13\u5b58\u6570\u91cf\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"cc.Label._canvasPool.max = 64;\n")),(0,l.kt)("p",null,"\u53ef\u4ee5\u9884\u5148\u7f13\u5b58 Canvas \u5bf9\u8c61\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"cc.Label._canvasPool.cache(Number.MAX_SAFE_INTEGER);\n")),(0,l.kt)("p",null,"\u9884\u5148\u7f13\u5b58\u63a5\u53e3\u9700\u4f20\u5165\u8981\u7f13\u5b58\u7684\u5bf9\u8c61\u6570\u91cf\uff0c\u65e0\u8bba\u5982\u4f55\uff0c\u5b9e\u9645\u7f13\u5b58\u7684\u5bf9\u8c61\u6570\u91cf\u90fd\u4e0d\u4f1a\u8d85\u8fc7\u8bbe\u7f6e\u7684\u6700\u5927\u6570\u91cf\u3002"),(0,l.kt)("h2",{id:"\u70d8\u7119\u6587\u672c\u6d4b\u91cf\u503c"},"\u70d8\u7119\u6587\u672c\u6d4b\u91cf\u503c"),(0,l.kt)("p",null,"\u5f15\u64ce\u5185\u90e8\u5728\u6e32\u67d3\u6587\u672c\u524d\u9700\u8981\u5148\u6d4b\u91cf\u5b57\u7b26\u7684\u5bbd\u9ad8\uff0c\u8fd9\u662f\u901a\u8fc7 Canvas \u4e0a\u7684 ",(0,l.kt)("inlineCode",{parentName:"p"},"measureText")," \u63a5\u53e3\u5b9e\u73b0\u7684\u3002"),(0,l.kt)("p",null,"\u5982\u679c\u4f60\u5bf9\u6027\u80fd\u8fdb\u884c\u4e86\u5206\u6790\uff0c\u90a3\u4e48\u53ef\u4ee5\u770b\u51fa\uff0c\u8be5\u63a5\u53e3\u5360\u636e\u5355\u6b21\u6587\u672c\u6e32\u67d3\u603b\u8017\u65f6\u7684 80% \u4ee5\u4e0a\u3002"),(0,l.kt)("p",null,"\u5f15\u64ce\u4f1a\u5bf9\u6b64\u63a5\u53e3\u7684\u7ed3\u679c\u8fdb\u884c\u7f13\u5b58\uff0c\u76f8\u540c\u6837\u5f0f\u7684\u6587\u672c\u4f1a\u4ece\u7f13\u5b58\u4e2d\u8bfb\u53d6\uff0c\u907f\u514d\u4e86\u90e8\u5206\u6027\u80fd\u6d88\u8017\u3002"),(0,l.kt)("p",null,"\u4f46\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u8be5\u7f13\u5b58\u4ec5\u4f1a\u4fdd\u7559\u6700\u540e 100 \u6b21\u7684\u6d4b\u91cf\u503c\uff0c\u4e5f\u5c31\u662f\u8bf4\uff0c\u5982\u679c\u6240\u6709 Label \u4f7f\u7528 Char \u6a21\u5f0f\u6e32\u67d3\uff0c\u5728\u6e32\u67d3 100 \u4e2a\u4e0d\u540c\u7684\u5b57\u7b26\u540e\uff0c\u7f13\u5b58\u5c31\u4f1a\u88ab\u9010\u4e2a\u79fb\u9664\uff0c\u6d4b\u91cf\u503c\u53c8\u4f1a\u6709\u5927\u91cf\u6027\u80fd\u6d88\u8017\u3002"),(0,l.kt)("p",null,"\u6240\u4ee5\uff0c\u793e\u533a\u7248\u5bf9\u8fd9\u90e8\u5206\u63a5\u53e3\u8fdb\u884c\u4e86\u4f18\u5316\uff0c\u5f00\u653e\u4e86 ",(0,l.kt)("inlineCode",{parentName:"p"},"cc.textUtils")," \u7684\u90e8\u5206\u63a5\u53e3\u6765\u63a7\u5236\u6d4b\u91cf\u503c\u7f13\u5b58\u3002"),(0,l.kt)("p",null,"\u9996\u5148\uff0c\u4f60\u53ef\u4ee5\u8c03\u6574\u7f13\u5b58\u5bb9\u91cf\uff0c\u5bb9\u91cf\u8d8a\u5927\uff0c\u5c31\u80fd\u907f\u514d\u66f4\u591a\u6d4b\u91cf\u503c\u7684\u6027\u80fd\u6d88\u8017\uff0c\u4f46\u5185\u5b58\u5360\u7528\u4f1a\u4e0a\u5347\uff0c\u8bf7\u89c6\u60c5\u51b5\u800c\u5b9a\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"cc.textUtils.measureCache.limit = Number.MAX_SAFE_INTEGER;\n")),(0,l.kt)("p",null,"\u5176\u6b21\uff0c\u6211\u4eec\u5f00\u653e\u4e86\u64cd\u4f5c\u7f13\u5b58\u7684\u63a5\u53e3\uff0c\u610f\u5473\u7740\u4f60\u53ef\u4ee5\u70d8\u7119\u6d4b\u91cf\u503c\uff0c\u5c06\u6d4b\u91cf\u503c\u6570\u636e\u4fdd\u5b58\u5230\u9879\u76ee\u4e2d\uff0c\u5b8c\u5168\u907f\u514d\u6d4b\u91cf\u503c\u7684\u6027\u80fd\u6d88\u8017\uff01"),(0,l.kt)("p",null,"\u83b7\u53d6\u4e0e\u5e94\u7528\u7f13\u5b58\u5bf9\u8c61\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"// \u83b7\u53d6\nconst data = cc.textUtils.getMeasureCache();\n\n// \u5e94\u7528\ncc.textUtils.applyMeasureCache(data);\n")),(0,l.kt)("p",null,"\u6211\u4eec\u63a8\u8350\u7684\u7528\u6cd5\u662f\uff1a"),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},"\u5728\u5f00\u53d1\u6d4b\u8bd5\u7684\u7248\u672c\u4e2d\u6536\u96c6\u7f13\u5b58\u6570\u636e\u5e76\u5e8f\u5217\u5316\u5230\u9879\u76ee\u7684 JSON \u6587\u4ef6\u4e2d\uff08\u56e0\u4e3a\u6536\u96c6\u4f1a\u6709\u6027\u80fd\u6d88\u8017\uff0c\u6240\u4ee5\u7ebf\u4e0a\u7248\u672c\u4e0d\u8fdb\u884c\u6536\u96c6\uff09"),(0,l.kt)("li",{parentName:"ul"},"\u5728\u6e38\u620f\u542f\u52a8\u524d\u5e94\u7528\u7f13\u5b58\u6570\u636e")),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"\u6ce8\u610f")),(0,l.kt)("p",null,"\u7ecf\u8fc7\u6211\u4eec\u7684\u6d4b\u8bd5\uff0c\u540c\u4e2a\u5b57\u7b26\u5728\u5fae\u4fe1\u5c0f\u6e38\u620f\u5e73\u53f0\u4e0e Web \u7aef\u5f97\u51fa\u7684\u6d4b\u91cf\u503c\u662f\u4e00\u81f4\u7684\u3002"),(0,l.kt)("p",null,"\u4f46\u53ef\u80fd\u4f1a\u51fa\u73b0\u5176\u5b83\u4e0d\u540c\u5e73\u53f0\u6216\u8005\u8bbe\u5907\u5bf9\u540c\u4e2a\u5b57\u7b26\u7684\u6d4b\u91cf\u503c\u662f\u4e0d\u4e00\u81f4\u7684\uff0c\u5efa\u8bae\u9488\u5bf9\u8fd9\u79cd\u60c5\u51b5\u70d8\u7119\u591a\u4e2a JSON \u6587\u4ef6\u5e76\u5206\u522b\u5e94\u7528\u5373\u53ef\u3002"),(0,l.kt)("h2",{id:"\u9884\u52a0\u8f7d-char-\u56fe\u96c6"},"\u9884\u52a0\u8f7d ",(0,l.kt)("inlineCode",{parentName:"h2"},"Char")," \u56fe\u96c6"),(0,l.kt)("p",null,"\u5efa\u8bae\u5148\u9605\u8bfb ",(0,l.kt)("a",{parentName:"p",href:"#%E7%83%98%E7%84%99%E6%96%87%E6%9C%AC%E6%B5%8B%E9%87%8F%E5%80%BC"},"\u70d8\u7119\u6587\u672c\u6d4b\u91cf\u503c"),"\uff0c\u518d\u9605\u8bfb\u672c\u8282\u5185\u5bb9\u3002"),(0,l.kt)("p",null,"\u5982\u679c\u4f60\u5bf9\u6027\u80fd\u8fdb\u884c\u4e86\u5206\u6790\uff0c\u90a3\u4e48\u53ef\u4ee5\u770b\u51fa\uff0c\u5373\u4f7f\u6211\u4eec\u70d8\u7119\u4e86\u6587\u672c\u6d4b\u91cf\u503c\uff0c\u4f9d\u65e7\u4f1a\u6709\u5c06\u6587\u672c\u7ed8\u5236\u5230\u7eb9\u7406\u4e0a\u7684\u6027\u80fd\u6d88\u8017\uff0c\u90a3\u4e48\u8fd9\u5269\u4e0b 20% \u7684\u6027\u80fd\u6d88\u8017\u5982\u679c\u65e0\u6cd5\u907f\u514d\uff0c\u80fd\u63a7\u5236\u5b83\u6d88\u8017\u7684\u65f6\u673a\u4e5f\u662f\u5f88\u6709\u610f\u4e49\u7684\u3002"),(0,l.kt)("p",null,"\u6240\u4ee5\uff0c\u793e\u533a\u7248\u63d0\u4f9b\u4e86 Char \u56fe\u96c6\u7684\u9884\u52a0\u8f7d\u63a5\u53e3\uff0c\u6211\u4eec\u53ef\u4ee5\u5728\u7279\u5b9a\u65f6\u673a\uff08\u6bd4\u5982\u6e38\u620f\u542f\u52a8\u65f6\uff09\u5c31\u52a0\u8f7d\u597d\u4f1a\u7528\u5230\u7684\u6240\u6709\u5b57\u7b26\uff0c\u907f\u514d\u6e38\u620f\u4e2d\u7684\u5361\u987f\u3002"),(0,l.kt)("p",null,"\u5f15\u64ce\u7684 Char \u56fe\u96c6\u53ea\u4f1a\u5728\u7528\u5230\u65f6\u624d\u4f1a\u521b\u5efa\uff0c\u6240\u4ee5\u6211\u4eec\u5728\u8c03\u7528\u4efb\u4f55\u63a5\u53e3\u524d\u9700\u8981\u521d\u59cb\u5316\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"cc.Label.LetterAtlases.init();\n")),(0,l.kt)("p",null,"\u7531\u4e8e\u5f15\u64ce\u5e76\u4e0d\u4f1a\u6301\u6709\u6bcf\u4e2a\u5b57\u7b26\u4fe1\u606f\u7684\u7f13\u5b58\uff0c\u6240\u4ee5\u9700\u8981\u901a\u8fc7\u793e\u533a\u7248\u65b0\u589e\u7684\u5f00\u542f\u7f13\u5b58\u63a5\u53e3\u6765\u4fdd\u7559\u5b57\u7b26\u4fe1\u606f\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"cc.Label._shareAtlas.enableLetterCache = true;\n")),(0,l.kt)("p",null,"\u548c\u70d8\u7119\u6587\u672c\u6d4b\u91cf\u503c\u4e00\u6837\uff0c\u6211\u4eec\u53ea\u63a8\u8350\u5728\u5f00\u53d1\u6d4b\u8bd5\u7248\u672c\u6536\u96c6\u7f13\u5b58\uff0c\u56e0\u4e3a\u4fdd\u7559\u7f13\u5b58\u548c\u6536\u96c6\u64cd\u4f5c\u90fd\u4f1a\u6709\u6027\u80fd\u6d88\u8017\u3002"),(0,l.kt)("p",null,"\u4ee5\u4e0b\u4e24\u4e2a\u63a5\u53e3\u53ef\u4ee5\u83b7\u53d6\u4e0e\u5e94\u7528\u5b57\u7b26\u7f13\u5b58\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"// \u83b7\u53d6\nconst data = cc.Label._shareAtlas.getLetterCache();\n\n// \u5e94\u7528\ncc.Label._shareAtlas.applyLetterCache(data);\n")),(0,l.kt)("p",null,"\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u6211\u4eec\u53ea\u662f\u5c06\u6e32\u67d3\u8fc7\u7684\u5b57\u7b26\u4fe1\u606f\u7f13\u5b58\u4e0b\u6765\uff0c\u800c\u4e0d\u662f\u7eb9\u7406\u672c\u8eab\uff0c\u7136\u540e\u5728\u7279\u5b9a\u65f6\u673a\u8c03\u7528\u63a5\u53e3\u6765\u6279\u91cf\u6e32\u67d3\u5b57\u7b26\u5230\u7eb9\u7406\u4e0a\u3002"),(0,l.kt)("p",null,"\u5e76\u4e14\uff0c\u8fd9\u91cc\u7684\u7f13\u5b58\u4fe1\u606f\u5df2\u7ecf\u5305\u62ec\u4e86\u6bcf\u4e2a\u5b57\u7b26\u7684\u6d4b\u91cf\u503c\uff0c\u6240\u4ee5\u5982\u679c\u4f60\u7684\u9879\u76ee\u53ea\u4f7f\u7528 ",(0,l.kt)("inlineCode",{parentName:"p"},"CHAR")," \u6a21\u5f0f\u7684 Label \u7ec4\u4ef6\uff0c\u90a3\u4e48\u4f60\u4e0d\u7528\u518d\u5355\u72ec\u70d8\u7119\u6587\u672c\u6d4b\u91cf\u503c\u3002"),(0,l.kt)("h2",{id:"\u5b9e\u9645\u5e94\u7528"},"\u5b9e\u9645\u5e94\u7528"),(0,l.kt)("p",null,"\u4f60\u53ef\u4ee5\u53c2\u8003\u4ee5\u4e0b\u4ee3\u7801\uff0c\u5728\u6e38\u620f\u5f00\u53d1\u6d4b\u8bd5\u7248\u672c\u4e2d\u5c06\u7f13\u5b58\u6570\u636e\u4e0a\u4f20\u81f3\u4e00\u4e2a\u540e\u7aef\u670d\u52a1\u5668\u3002"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},'// \u4e0a\u62a5 Label \u70d8\u7119\u4fe1\u606f\nif (!CC_EDITOR && game.TEST) {\n cc.director.once(cc.Director.EVENT_AFTER_SCENE_LAUNCH, () => {\n // \u542f\u7528\u7f13\u5b58\n cc.Label._shareAtlas.enableLetterCache = true;\n \n setInterval(() => {\n const unCaches = {};\n for (const key in cc.textUtils.measureCache.datas) {\n if (!(key in _measureCache)) {\n unCaches[key] = cc.textUtils.measureCache.datas[key].value;\n _measureCache[key] = unCaches[key];\n console.warn("\u672a\u6536\u96c6\u7684\u6d4b\u91cf\u503c\uff1a", key, unCaches[key]);\n }\n }\n\n if (Object.keys(unCaches).length > 0) {\n sendToServer(JSON.stringify(unCaches));\n }\n\n const unLetters = {};\n for (const key in cc.Label._shareAtlas.letterCache) {\n if (!(key in _letterCache)) {\n unLetters[key] = cc.Label._shareAtlas.letterCache[key];\n _letterCache[key] = unLetters[key];\n console.warn("\u672a\u6536\u96c6\u7684 Char \u5b57\u7b26\uff1a", key, unLetters[key]);\n }\n }\n\n if (Object.keys(unLetters).length > 0) {\n sendToServer(JSON.stringify(unLetters));\n }\n }, 10000);\n });\n}\n')),(0,l.kt)("p",null,"\u7136\u540e\u5728\u6bcf\u4e2a\u7248\u672c\u4e0a\u7ebf\u524d\uff0c\u4ece\u540e\u7aef\u4e0b\u8f7d\u7f13\u5b58\u6570\u636e\u5230\u9879\u76ee\u4e2d\uff0c\u5e76\u7528\u4ee3\u7801\u8bfb\u53d6\u5e76\u5728\u6e38\u620f\u5f00\u59cb\u524d\u5e94\u7528\uff1a"),(0,l.kt)("pre",null,(0,l.kt)("code",{parentName:"pre",className:"language-ts"},"cc.director.once(cc.Director.EVENT_AFTER_SCENE_LAUNCH, () => {\n // \u63d0\u524d\u7f13\u5b58 Label Canvas\n cc.Label._canvasPool.cache(Number.MAX_SAFE_INTEGER);\n\n // \u63d0\u9ad8\u6587\u672c\u6d4b\u91cf\u503c\u7f13\u5b58\u5bb9\u91cf\n cc.textUtils.measureCache.limit = Number.MAX_SAFE_INTEGER;\n cc.textUtils.applyMeasureCache(_measureCache);\n\n // \u70d8\u7119 CHAR \u5b57\u7b26\n cc.Label.LetterAtlases.init();\n cc.Label._shareAtlas.applyLetterCache(_letterCache);\n});\n")))}d.isMDXComponent=!0},77333:function(e,t,n){t.Z=n.p+"assets/images/after-baking-c51a2a28fa45d7143bcc44e6e6c2f5ea.png"},73658:function(e,t,n){t.Z=n.p+"assets/images/before-baking-c6759f737a1faec7971ec238b287eb60.png"}}]); \ No newline at end of file diff --git a/assets/js/e42c1a40.a8f45aa2.js b/assets/js/e42c1a40.a8f45aa2.js new file mode 100644 index 00000000..4f0246cf --- /dev/null +++ b/assets/js/e42c1a40.a8f45aa2.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[9076],{3905:function(e,t,n){n.d(t,{Zo:function(){return c},kt:function(){return m}});var l=n(67294);function a(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 l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,l)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(l=0;l=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var o=l.createContext({}),u=function(e){var t=l.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},c=function(e){var t=u(e.components);return l.createElement(o.Provider,{value:t},e.children)},s={inlineCode:"code",wrapper:function(e){var t=e.children;return l.createElement(l.Fragment,{},t)}},k=l.forwardRef((function(e,t){var n=e.components,a=e.mdxType,r=e.originalType,o=e.parentName,c=p(e,["components","mdxType","originalType","parentName"]),k=u(n),m=a,d=k["".concat(o,".").concat(m)]||k[m]||s[m]||r;return n?l.createElement(d,i(i({ref:t},c),{},{components:n})):l.createElement(d,i({ref:t},c))}));function m(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var r=n.length,i=new Array(r);i[0]=k;var p={};for(var o in t)hasOwnProperty.call(t,o)&&(p[o]=t[o]);p.originalType=e,p.mdxType="string"==typeof e?e:a,i[1]=p;for(var u=2;u=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(l=0;l=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var o=l.createContext({}),u=function(e){var t=l.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},c=function(e){var t=u(e.components);return l.createElement(o.Provider,{value:t},e.children)},s={inlineCode:"code",wrapper:function(e){var t=e.children;return l.createElement(l.Fragment,{},t)}},k=l.forwardRef((function(e,t){var n=e.components,a=e.mdxType,r=e.originalType,o=e.parentName,c=p(e,["components","mdxType","originalType","parentName"]),k=u(n),m=a,d=k["".concat(o,".").concat(m)]||k[m]||s[m]||r;return n?l.createElement(d,i(i({ref:t},c),{},{components:n})):l.createElement(d,i({ref:t},c))}));function m(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var r=n.length,i=new Array(r);i[0]=k;var p={};for(var o in t)hasOwnProperty.call(t,o)&&(p[o]=t[o]);p.originalType=e,p.mdxType="string"==typeof e?e:a,i[1]=p;for(var u=2;u=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(l=0;l=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var u=l.createContext({}),o=function(e){var t=l.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},c=function(e){var t=o(e.components);return l.createElement(u.Provider,{value:t},e.children)},s={inlineCode:"code",wrapper:function(e){var t=e.children;return l.createElement(l.Fragment,{},t)}},k=l.forwardRef((function(e,t){var n=e.components,r=e.mdxType,a=e.originalType,u=e.parentName,c=p(e,["components","mdxType","originalType","parentName"]),k=o(n),m=r,d=k["".concat(u,".").concat(m)]||k[m]||s[m]||a;return n?l.createElement(d,i(i({ref:t},c),{},{components:n})):l.createElement(d,i({ref:t},c))}));function m(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var a=n.length,i=new Array(a);i[0]=k;var p={};for(var u in t)hasOwnProperty.call(t,u)&&(p[u]=t[u]);p.originalType=e,p.mdxType="string"==typeof e?e:r,i[1]=p;for(var o=2;o=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(l=0;l=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var u=l.createContext({}),o=function(e){var t=l.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},c=function(e){var t=o(e.components);return l.createElement(u.Provider,{value:t},e.children)},s={inlineCode:"code",wrapper:function(e){var t=e.children;return l.createElement(l.Fragment,{},t)}},k=l.forwardRef((function(e,t){var n=e.components,r=e.mdxType,a=e.originalType,u=e.parentName,c=p(e,["components","mdxType","originalType","parentName"]),k=o(n),m=r,d=k["".concat(u,".").concat(m)]||k[m]||s[m]||a;return n?l.createElement(d,i(i({ref:t},c),{},{components:n})):l.createElement(d,i({ref:t},c))}));function m(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var a=n.length,i=new Array(a);i[0]=k;var p={};for(var u in t)hasOwnProperty.call(t,u)&&(p[u]=t[u]);p.originalType=e,p.mdxType="string"==typeof e?e:r,i[1]=p;for(var o=2;o=0||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}var s=a.createContext({}),c=function(t){var e=a.useContext(s),n=e;return t&&(n="function"==typeof t?t(e):o(o({},e),t)),n},p=function(t){var e=c(t.components);return a.createElement(s.Provider,{value:e},t.children)},d={inlineCode:"code",wrapper:function(t){var e=t.children;return a.createElement(a.Fragment,{},e)}},m=a.forwardRef((function(t,e){var n=t.components,i=t.mdxType,r=t.originalType,s=t.parentName,p=l(t,["components","mdxType","originalType","parentName"]),m=c(n),u=i,v=m["".concat(s,".").concat(u)]||m[u]||d[u]||r;return n?a.createElement(v,o(o({ref:e},p),{},{components:n})):a.createElement(v,o({ref:e},p))}));function u(t,e){var n=arguments,i=e&&e.mdxType;if("string"==typeof t||i){var r=n.length,o=new Array(r);o[0]=m;var l={};for(var s in e)hasOwnProperty.call(e,s)&&(l[s]=e[s]);l.originalType=t,l.mdxType="string"==typeof t?t:i,o[1]=l;for(var c=2;c=0||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}var s=a.createContext({}),c=function(t){var e=a.useContext(s),n=e;return t&&(n="function"==typeof t?t(e):o(o({},e),t)),n},p=function(t){var e=c(t.components);return a.createElement(s.Provider,{value:e},t.children)},d={inlineCode:"code",wrapper:function(t){var e=t.children;return a.createElement(a.Fragment,{},e)}},m=a.forwardRef((function(t,e){var n=t.components,i=t.mdxType,r=t.originalType,s=t.parentName,p=l(t,["components","mdxType","originalType","parentName"]),m=c(n),u=i,v=m["".concat(s,".").concat(u)]||m[u]||d[u]||r;return n?a.createElement(v,o(o({ref:e},p),{},{components:n})):a.createElement(v,o({ref:e},p))}));function u(t,e){var n=arguments,i=e&&e.mdxType;if("string"==typeof t||i){var r=n.length,o=new Array(r);o[0]=m;var l={};for(var s in e)hasOwnProperty.call(e,s)&&(l[s]=e[s]);l.originalType=t,l.mdxType="string"==typeof t?t:i,o[1]=l;for(var c=2;c=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}var s=r.createContext({}),p=function(e){var n=r.useContext(s),t=n;return e&&(t="function"==typeof e?e(n):a(a({},n),e)),t},u=function(e){var n=p(e.components);return r.createElement(s.Provider,{value:n},e.children)},l={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},d=r.forwardRef((function(e,n){var t=e.components,i=e.mdxType,o=e.originalType,s=e.parentName,u=c(e,["components","mdxType","originalType","parentName"]),d=p(t),m=i,f=d["".concat(s,".").concat(m)]||d[m]||l[m]||o;return t?r.createElement(f,a(a({ref:n},u),{},{components:t})):r.createElement(f,a({ref:n},u))}));function m(e,n){var t=arguments,i=n&&n.mdxType;if("string"==typeof e||i){var o=t.length,a=new Array(o);a[0]=d;var c={};for(var s in n)hasOwnProperty.call(n,s)&&(c[s]=n[s]);c.originalType=e,c.mdxType="string"==typeof e?e:i,a[1]=c;for(var p=2;p=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}var s=r.createContext({}),p=function(e){var n=r.useContext(s),t=n;return e&&(t="function"==typeof e?e(n):a(a({},n),e)),t},u=function(e){var n=p(e.components);return r.createElement(s.Provider,{value:n},e.children)},l={inlineCode:"code",wrapper:function(e){var n=e.children;return r.createElement(r.Fragment,{},n)}},d=r.forwardRef((function(e,n){var t=e.components,i=e.mdxType,o=e.originalType,s=e.parentName,u=c(e,["components","mdxType","originalType","parentName"]),d=p(t),m=i,f=d["".concat(s,".").concat(m)]||d[m]||l[m]||o;return t?r.createElement(f,a(a({ref:n},u),{},{components:t})):r.createElement(f,a({ref:n},u))}));function m(e,n){var t=arguments,i=n&&n.mdxType;if("string"==typeof e||i){var o=t.length,a=new Array(o);a[0]=d;var c={};for(var s in n)hasOwnProperty.call(n,s)&&(c[s]=n[s]);c.originalType=e,c.mdxType="string"==typeof e?e:i,a[1]=c;for(var p=2;p=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var c=n.createContext({}),s=function(e){var t=n.useContext(c),r=t;return e&&(r="function"==typeof e?e(t):u(u({},t),e)),r},p=function(e){var t=s(e.components);return n.createElement(c.Provider,{value:t},e.children)},l={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,i=e.originalType,c=e.parentName,p=a(e,["components","mdxType","originalType","parentName"]),d=s(r),f=o,m=d["".concat(c,".").concat(f)]||d[f]||l[f]||i;return r?n.createElement(m,u(u({ref:t},p),{},{components:r})):n.createElement(m,u({ref:t},p))}));function f(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var i=r.length,u=new Array(i);u[0]=d;var a={};for(var c in t)hasOwnProperty.call(t,c)&&(a[c]=t[c]);a.originalType=e,a.mdxType="string"==typeof e?e:o,u[1]=a;for(var s=2;s=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var c=n.createContext({}),s=function(e){var t=n.useContext(c),r=t;return e&&(r="function"==typeof e?e(t):u(u({},t),e)),r},p=function(e){var t=s(e.components);return n.createElement(c.Provider,{value:t},e.children)},l={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,i=e.originalType,c=e.parentName,p=a(e,["components","mdxType","originalType","parentName"]),d=s(r),f=o,m=d["".concat(c,".").concat(f)]||d[f]||l[f]||i;return r?n.createElement(m,u(u({ref:t},p),{},{components:r})):n.createElement(m,u({ref:t},p))}));function f(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var i=r.length,u=new Array(i);u[0]=d;var a={};for(var c in t)hasOwnProperty.call(t,c)&&(a[c]=t[c]);a.originalType=e,a.mdxType="string"==typeof e?e:o,u[1]=a;for(var s=2;s1?t-1:0),r=1;r\n

Your Docusaurus site did not load properly.

\n

A very common reason is a wrong site baseUrl configuration.

\n

Current configured baseUrl = '+e+" "+("/"===e?" (default value)":"")+'

\n

We suggest trying baseUrl =

\n\n'}(e)).replace(/0)&&(j.current.unobserve(e),j.current.disconnect(),null!=N&&window.docusaurus.prefetch(N))}))})),j.current.observe(e))},to:N},m&&{isActive:y,activeClassName:v}))}var m=o.forwardRef(f)},95999:function(e,t,n){"use strict";n.d(t,{Z:function(){return s},I:function(){return c}});var r=n(67294);function i(e,t){var n=e.split(/(\{\w+\})/).map((function(e,n){if(n%2==1){var r=null==t?void 0:t[e.slice(1,-1)];if(void 0!==r)return r}return e}));return n.some((function(e){return(0,r.isValidElement)(e)}))?n.map((function(e,t){return(0,r.isValidElement)(e)?r.cloneElement(e,{key:t}):e})).filter((function(e){return""!==e})):n.join("")}var o=n(57529);function a(e){var t,n,r=e.id,i=e.message;if(void 0===r&&void 0===i)throw new Error("Docusaurus translation declarations must have at least a translation id or a default translation message");return null!=(t=null!=(n=o[null!=r?r:i])?n:i)?t:r}function c(e,t){return i(a({message:e.message,id:e.id}),t)}function s(e){var t=e.children,n=e.id,o=e.values;if(t&&"string"!=typeof t)throw console.warn("Illegal children",t),new Error("The Docusaurus component only accept simple string values");var c=a({message:t,id:n});return r.createElement(r.Fragment,null,i(c,o))}},29935:function(e,t,n){"use strict";n.d(t,{m:function(){return r}});var r="default"},13919:function(e,t,n){"use strict";function r(e){return!0===/^(?:\w*:|\/\/)/.test(e)}function i(e){return void 0!==e&&!r(e)}n.d(t,{Z:function(){return i},b:function(){return r}})},28143:function(e,t,n){"use strict";n.r(t),n.d(t,{Redirect:function(){return r.l_},matchPath:function(){return r.LX},useHistory:function(){return r.k6},useLocation:function(){return r.TH}});var r=n(76775)},44996:function(e,t,n){"use strict";n.d(t,{C:function(){return o},Z:function(){return a}});var r=n(52263),i=n(13919);function o(){var e=(0,r.Z)().siteConfig,t=e.baseUrl,n=e.url;return{withBaseUrl:function(e,r){return function(e,t,n,r){var o=void 0===r?{}:r,a=o.forcePrependBaseUrl,c=void 0!==a&&a,s=o.absolute,u=void 0!==s&&s;if(!n||n.startsWith("#")||(0,i.b)(n))return n;if(c)return t+n.replace(/^\//,"");if(n===t.replace(/\/$/,""))return t;var l=n.startsWith(t)?n:t+n.replace(/^\//,"");return u?e+l:l}(n,t,e,r)}}}function a(e,t){return void 0===t&&(t={}),(0,o().withBaseUrl)(e,t)}},52263:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(67294),i=n(58940);function o(){return(0,r.useContext)(i._)}},28084:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return o},useAllPluginInstancesData:function(){return a},usePluginData:function(){return c}});var r=n(52263),i=n(29935);function o(){var e=(0,r.Z)().globalData;if(!e)throw new Error("Docusaurus global data not found.");return e}function a(e,t){void 0===t&&(t={});var n=o()[e];if(!n&&t.failfast)throw new Error('Docusaurus plugin global data not found for "'+e+'" plugin.');return n}function c(e,t,n){void 0===t&&(t=i.m),void 0===n&&(n={});var r=a(e),o=null==r?void 0:r[t];if(!o&&n.failfast)throw new Error('Docusaurus plugin global data not found for "'+e+'" plugin with id "'+t+'".');return o}},72389:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(67294),i=n(98934);function o(){return(0,r.useContext)(i._)}},99670:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});function r(e){var t={};return function e(n,r){Object.entries(n).forEach((function(n){var i,o=n[0],a=n[1],c=r?r+"."+o:o;"object"==typeof(i=a)&&i&&Object.keys(i).length>0?e(a,c):t[c]=a}))}(e),t}},30226:function(e,t,n){"use strict";n.d(t,{_:function(){return i},z:function(){return o}});var r=n(67294),i=r.createContext(null);function o(e){var t=e.children,n=e.value,o=r.useContext(i),a=(0,r.useMemo)((function(){return function(e){var t=e.parent,n=e.value;if(!t){if(!n)throw new Error("Unexpected: no Docusaurus route context found");if(!("plugin"in n))throw new Error("Unexpected: Docusaurus topmost route context has no `plugin` attribute");return n}var r=Object.assign({},t.data,null==n?void 0:n.data);return{plugin:t.plugin,data:r}}({parent:o,value:n})}),[o,n]);return r.createElement(i.Provider,{value:a},t)}},14953:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(67294),i=n(48476),o=n(20780),a=n(35742);function c(e){var t=e.error,n=e.tryAgain;return r.createElement("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",height:"50vh",width:"100%",fontSize:"20px"}},r.createElement("h1",null,"This page crashed."),r.createElement("p",null,t.message),r.createElement("button",{type:"button",onClick:n},"Try again"))}function s(e){var t=e.error,n=e.tryAgain;return r.createElement(o.Z,{fallback:function(){return r.createElement(c,{error:t,tryAgain:n})}},r.createElement(a.Z,null,r.createElement("title",null,"Page Error")),r.createElement(i.Z,null,r.createElement(c,{error:t,tryAgain:n})))}},48408:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getDocVersionSuggestions=t.getActiveDocContext=t.getActiveVersion=t.getLatestVersion=t.getActivePlugin=void 0;var r=n(28143);t.getActivePlugin=function(e,t,n){void 0===n&&(n={});var i=Object.entries(e).sort((function(e,t){return t[1].path.localeCompare(e[1].path)})).find((function(e){var n=e[1];return!!(0,r.matchPath)(t,{path:n.path,exact:!1,strict:!1})})),o=i?{pluginId:i[0],pluginData:i[1]}:void 0;if(!o&&n.failfast)throw new Error("Can't find active docs plugin for \""+t+'" pathname, while it was expected to be found. Maybe you tried to use a docs feature that can only be used on a docs-related page? Existing docs plugin paths are: '+Object.values(e).map((function(e){return e.path})).join(", "));return o};function i(e,n){var i=(0,t.getLatestVersion)(e);return[].concat(e.versions.filter((function(e){return e!==i})),[i]).find((function(e){return!!(0,r.matchPath)(n,{path:e.path,exact:!1,strict:!1})}))}function o(e,t){var n,o,a=i(e,t),c=null==a?void 0:a.docs.find((function(e){return!!(0,r.matchPath)(t,{path:e.path,exact:!0,strict:!1})}));return{activeVersion:a,activeDoc:c,alternateDocVersions:c?(n=c.id,o={},e.versions.forEach((function(e){e.docs.forEach((function(t){t.id===n&&(o[e.name]=t)}))})),o):{}}}t.getLatestVersion=function(e){return e.versions.find((function(e){return e.isLast}))},t.getActiveVersion=i,t.getActiveDocContext=o,t.getDocVersionSuggestions=function(e,n){var r=(0,t.getLatestVersion)(e),i=o(e,n);return{latestDocSuggestion:null==i?void 0:i.alternateDocVersions[r.name],latestVersionSuggestion:r}}},65551:function(e,t,n){"use strict";t.Jo=t.Iw=t.yW=t.gB=t.gA=t.zh=t._r=void 0;var r=n(28143),i=n(28084),o=n(48408),a={};t._r=function(){var e;return null!=(e=(0,i.useAllPluginInstancesData)("docusaurus-plugin-content-docs"))?e:a};function c(e){void 0===e&&(e={});var n=(0,t._r)(),i=(0,r.useLocation)().pathname;return(0,o.getActivePlugin)(n,i,e)}t.zh=function(e){return(0,i.usePluginData)("docusaurus-plugin-content-docs",e,{failfast:!0})},t.gA=c,t.gB=function(e){return(0,t.zh)(e).versions},t.yW=function(e){var n=(0,t.zh)(e);return(0,o.getLatestVersion)(n)},t.Iw=function(e){var n=(0,t.zh)(e),i=(0,r.useLocation)().pathname;return(0,o.getActiveDocContext)(n,i)},t.Jo=function(e){var n=(0,t.zh)(e),i=(0,r.useLocation)().pathname;return(0,o.getDocVersionSuggestions)(n,i)}},90541:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(67294),i="iconExternalLink_I5OW";function o(e){var t=e.width,n=void 0===t?13.5:t,o=e.height,a=void 0===o?13.5:o;return r.createElement("svg",{width:n,height:a,"aria-hidden":"true",viewBox:"0 0 24 24",className:i},r.createElement("path",{fill:"currentColor",d:"M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"}))}},48476:function(e,t,n){"use strict";n.d(t,{Z:function(){return dn}});var r=n(67294),i=n(86010),o=n(20780),a=n(95999),c=n(76775),s=n(85936),u=n(35281);function l(e){e.setAttribute("tabindex","-1"),e.focus(),e.removeAttribute("tabindex")}var d="skipToContent_ZgBM";function h(){var e=function(){var e=(0,r.useRef)(null),t=(0,c.k6)().action,n=(0,r.useCallback)((function(e){e.preventDefault();var t=document.querySelector("main:first-of-type")||document.querySelector("."+u.k.wrapper.main);t&&l(t)}),[]);return(0,s.S)((function(n){var r=n.location;e.current&&!r.hash&&"PUSH"===t&&l(e.current)})),{containerRef:e,handleSkip:n}}(),t=e.containerRef,n=e.handleSkip;return r.createElement("div",{ref:t,role:"region"},r.createElement("a",{href:"#",className:d,onClick:n},r.createElement(a.Z,{id:"theme.common.skipToMainContent",description:"The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation"},"Skip to main content")))}var p=n(59689),f=n(86668),m=n(87462),g=n(63366),b=["width","height","color","strokeWidth","className"];function v(e){var t=e.width,n=void 0===t?21:t,i=e.height,o=void 0===i?21:i,a=e.color,c=void 0===a?"currentColor":a,s=e.strokeWidth,u=void 0===s?1.2:s,l=(e.className,(0,g.Z)(e,b));return r.createElement("svg",(0,m.Z)({viewBox:"0 0 15 15",width:n,height:o},l),r.createElement("g",{stroke:c,strokeWidth:u},r.createElement("path",{d:"M.75.75l13.5 13.5M14.25.75L.75 14.25"})))}var y="announcementBar_IbjG",k="announcementBarPlaceholder_NC_W",x="announcementBarClose_FG1z",w="announcementBarContent_KsVm";function S(){var e=(0,p.nT)(),t=e.isActive,n=e.close,o=(0,f.L)().announcementBar;if(!t)return null;var c=o.content,s=o.backgroundColor,u=o.textColor,l=o.isCloseable;return r.createElement("div",{className:y,style:{backgroundColor:s,color:u},role:"banner"},l&&r.createElement("div",{className:k}),r.createElement("div",{className:w,dangerouslySetInnerHTML:{__html:c}}),l?r.createElement("button",{type:"button",className:(0,i.Z)("clean-btn close",x),onClick:n,"aria-label":(0,a.I)({id:"theme.AnnouncementBar.closeButtonAriaLabel",message:"Close",description:"The ARIA label for close button of announcement bar"})},r.createElement(v,{width:14,height:14,strokeWidth:3.1})):null)}var _=n(69688),E=n(72961),C=n(13102),T=r.createContext(null);function L(e){var t,n,i,o,a,c,s,u=e.children,l=(t=(0,E.e)(),n=(0,C.HY)(),i=(0,r.useState)(!1),o=i[0],a=i[1],c=null!==n.component,s=(0,_.D9)(c),(0,r.useEffect)((function(){c&&!s&&a(!0)}),[c,s]),(0,r.useEffect)((function(){c?t.shown||a(!0):a(!1)}),[t.shown,c]),(0,r.useMemo)((function(){return[o,a]}),[o]));return r.createElement(T.Provider,{value:l},u)}function A(e){if(e.component){var t=e.component;return r.createElement(t,Object.assign({},e.props))}}function P(){var e=(0,r.useContext)(T);if(!e)throw new _.i6("NavbarSecondaryMenuDisplayProvider");var t=e[0],n=e[1],i=(0,r.useCallback)((function(){return n(!1)}),[n]),o=(0,C.HY)();return(0,r.useMemo)((function(){return{shown:t,hide:i,content:A(o)}}),[i,o,t])}function D(e){var t=e.header,n=e.primaryMenu,o=e.secondaryMenu,a=P().shown;return r.createElement("div",{className:"navbar-sidebar"},t,r.createElement("div",{className:(0,i.Z)("navbar-sidebar__items",{"navbar-sidebar__items--show-secondary":a})},r.createElement("div",{className:"navbar-sidebar__item menu"},n),r.createElement("div",{className:"navbar-sidebar__item menu"},o)))}var O=n(92949),R=n(72389);function N(e){return r.createElement("svg",(0,m.Z)({viewBox:"0 0 24 24",width:24,height:24},e),r.createElement("path",{fill:"currentColor",d:"M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"}))}function I(e){return r.createElement("svg",(0,m.Z)({viewBox:"0 0 24 24",width:24,height:24},e),r.createElement("path",{fill:"currentColor",d:"M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"}))}var F={toggle:"toggle_S7eR",toggleButton:"toggleButton_rCf9",darkToggleIcon:"darkToggleIcon_nQuB",lightToggleIcon:"lightToggleIcon_v35p",toggleButtonDisabled:"toggleButtonDisabled_Pu9x"};function M(e){var t=e.className,n=e.value,o=e.onChange,c=(0,R.Z)(),s=(0,a.I)({message:"Switch between dark and light mode (currently {mode})",id:"theme.colorToggle.ariaLabel",description:"The ARIA label for the navbar color mode toggle"},{mode:"dark"===n?(0,a.I)({message:"dark mode",id:"theme.colorToggle.ariaLabel.mode.dark",description:"The name for the dark color mode"}):(0,a.I)({message:"light mode",id:"theme.colorToggle.ariaLabel.mode.light",description:"The name for the light color mode"})});return r.createElement("div",{className:(0,i.Z)(F.toggle,t)},r.createElement("button",{className:(0,i.Z)("clean-btn",F.toggleButton,!c&&F.toggleButtonDisabled),type:"button",onClick:function(){return o("dark"===n?"light":"dark")},disabled:!c,title:s,"aria-label":s},r.createElement(N,{className:(0,i.Z)(F.toggleIcon,F.lightToggleIcon)}),r.createElement(I,{className:(0,i.Z)(F.toggleIcon,F.darkToggleIcon)})))}var j=r.memo(M);function B(e){var t=e.className,n=(0,f.L)().colorMode.disableSwitch,i=(0,O.I)(),o=i.colorMode,a=i.setColorMode;return n?null:r.createElement(j,{className:t,value:o,onChange:a})}var z=n(55537);function U(){return r.createElement(z.Z,{className:"navbar__brand",imageClassName:"navbar__logo",titleClassName:"navbar__title text--truncate"})}function q(){var e=(0,E.e)();return r.createElement("button",{type:"button",className:"clean-btn navbar-sidebar__close",onClick:function(){return e.toggle()}},r.createElement(v,{color:"var(--ifm-color-emphasis-600)"}))}function Z(){return r.createElement("div",{className:"navbar-sidebar__brand"},r.createElement(U,null),r.createElement(B,{className:"margin-right--md"}),r.createElement(q,null))}var $=n(39960),H=n(44996),G=n(13919);function Q(e,t){return void 0!==e&&void 0!==t&&new RegExp(e,"gi").test(t)}var V=["activeBasePath","activeBaseRegex","to","href","label","html","activeClassName","prependBaseUrlToHref"];function W(e){var t,n=e.activeBasePath,i=e.activeBaseRegex,o=e.to,a=e.href,c=e.label,s=e.html,u=e.activeClassName,l=void 0===u?"":u,d=e.prependBaseUrlToHref,h=(0,g.Z)(e,V),p=(0,H.Z)(o),f=(0,H.Z)(n),b=(0,H.Z)(a,{forcePrependBaseUrl:!0}),v=(c&&a&&(0,G.Z)(a),s?{dangerouslySetInnerHTML:{__html:s}}:{children:r.createElement(r.Fragment,null,c)});return a?r.createElement($.Z,(0,m.Z)({href:d?b:a},h,v)):r.createElement($.Z,(0,m.Z)({to:p,isNavLink:!0,activeClassName:null!=(t=h.className)&&t.includes(l)?"":l},(n||i)&&{isActive:function(e,t){return i?Q(i,t.pathname):t.pathname.startsWith(f)}},h,v))}var K=function(e){return e?"menu__link--active":"navbar__link--active"},Y=["className","isDropdownItem"],X=["className","isDropdownItem"],J=["mobile","position"];function ee(e){var t=e.className,n=e.isDropdownItem,o=void 0!==n&&n,a=(0,g.Z)(e,Y),c=r.createElement(W,(0,m.Z)({className:(0,i.Z)(o?"dropdown__link":"navbar__item navbar__link",t)},a));return o?r.createElement("li",null,c):c}function te(e){var t=e.className,n=(e.isDropdownItem,(0,g.Z)(e,X));return r.createElement("li",{className:"menu__list-item"},r.createElement(W,(0,m.Z)({className:(0,i.Z)("menu__link",t)},n)))}function ne(e){var t,n=e.mobile,i=void 0!==n&&n,o=(e.position,(0,g.Z)(e,J)),a=i?te:ee;return r.createElement(a,(0,m.Z)({},o,{activeClassName:null!=(t=o.activeClassName)?t:K(i)}))}var re=n(48596),ie=n(52263);var oe=n(86043),ae=["type"];function ce(e){var t=e.type,n=(0,g.Z)(e,ae),i=function(e,t){return e&&"default"!==e?e:t?"dropdown":"default"}(t,void 0!==n.items),o=function(e){var t=vt[e];if(!t)throw new Error('No NavbarItem component found for type "'+e+'".');return t}(i);return r.createElement(o,n)}var se=["items","position","className"],ue=["items","className","position"],le=["mobile"];function de(e,t){return e.some((function(e){return function(e,t){return!!(0,re.Mg)(e.to,t)||!!Q(e.activeBaseRegex,t)||!(!e.activeBasePath||!t.startsWith(e.activeBasePath))}(e,t)}))}function he(e){var t,n=e.items,o=e.position,a=e.className,c=(0,g.Z)(e,se),s=(0,r.useRef)(null),u=(0,r.useState)(!1),l=u[0],d=u[1];return(0,r.useEffect)((function(){var e=function(e){s.current&&!s.current.contains(e.target)&&d(!1)};return document.addEventListener("mousedown",e),document.addEventListener("touchstart",e),function(){document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e)}}),[s]),r.createElement("div",{ref:s,className:(0,i.Z)("navbar__item","dropdown","dropdown--hoverable",{"dropdown--right":"right"===o,"dropdown--show":l})},r.createElement(W,(0,m.Z)({"aria-haspopup":"true","aria-expanded":l,role:"button",href:c.to?void 0:"#",className:(0,i.Z)("navbar__link",a)},c,{onClick:c.to?void 0:function(e){return e.preventDefault()},onKeyDown:function(e){"Enter"===e.key&&(e.preventDefault(),d(!l))}}),null!=(t=c.children)?t:c.label),r.createElement("ul",{className:"dropdown__menu"},n.map((function(e,t){return r.createElement(ce,(0,m.Z)({isDropdownItem:!0,onKeyDown:function(e){if(t===n.length-1&&"Tab"===e.key){e.preventDefault(),d(!1);var r=s.current.nextElementSibling;if(r)(r instanceof HTMLAnchorElement?r:r.querySelector("a")).focus()}},activeClassName:"dropdown__link--active"},e,{key:t}))}))))}function pe(e){var t,n,o=e.items,a=e.className,s=(e.position,(0,g.Z)(e,ue)),u=(n=(0,ie.Z)().siteConfig.baseUrl,(0,c.TH)().pathname.replace(n,"/")),l=de(o,u),d=(0,oe.u)({initialState:function(){return!l}}),h=d.collapsed,p=d.toggleCollapsed,f=d.setCollapsed;return(0,r.useEffect)((function(){l&&f(!l)}),[u,l,f]),r.createElement("li",{className:(0,i.Z)("menu__list-item",{"menu__list-item--collapsed":h})},r.createElement(W,(0,m.Z)({role:"button",className:(0,i.Z)("menu__link menu__link--sublist menu__link--sublist-caret",a)},s,{onClick:function(e){e.preventDefault(),p()}}),null!=(t=s.children)?t:s.label),r.createElement(oe.z,{lazy:!0,as:"ul",className:"menu__list",collapsed:h},o.map((function(e,t){return r.createElement(ce,(0,m.Z)({mobile:!0,isDropdownItem:!0,onClick:s.onClick,activeClassName:"menu__link--active"},e,{key:t}))}))))}function fe(e){var t=e.mobile,n=void 0!==t&&t,i=(0,g.Z)(e,le),o=n?pe:he;return r.createElement(o,i)}var me=["width","height"];function ge(e){var t=e.width,n=void 0===t?20:t,i=e.height,o=void 0===i?20:i,a=(0,g.Z)(e,me);return r.createElement("svg",(0,m.Z)({viewBox:"0 0 24 24",width:n,height:o,"aria-hidden":!0},a),r.createElement("path",{fill:"currentColor",d:"M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"}))}var be=n(94711),ve="iconLanguage_dNtB",ye=["mobile","dropdownItemsBefore","dropdownItemsAfter"];var ke=n(61029),xe=n(67855),we=n(15861),Se=n(87757),_e=n.n(Se),Ee=n(10412),Ce=n(90022),Te=n(98202),Le=n(73926),Ae=n(91073),Pe=n(82539),De=n(10726),Oe="searchBar_RVTs",Re="dropdownMenu_qbY6",Ne="suggestion_fB_2",Ie="cursor_eG29",Fe="hitTree_kk6K",Me="hitIcon_a7Zy",je="hitPath_ieM4",Be="noResultsIcon_EBY5",ze="hitFooter_E9YW",Ue="hitWrapper_sAK8",qe="hitTitle_vyVt",Ze="hitAction_NqkB",$e="noResults_l6Q3",He="searchBarContainer_NW3z",Ge="searchBarLoadingRing_YnHq",Qe="searchIndexLoading_EJ1f",Ve="searchHintContainer_Pkmr",We="searchHint_iIMx",Ke="input_FOTf",Ye="hint_URu1",Xe="suggestions_X8XU",Je="dataset_QiCy",et="empty_eITn";function tt(e){var t=e.document,n=e.type,r=e.page,i=e.metadata,o=e.tokens,a=e.isInterOfTree,c=e.isLastOfTree,s=0===n,u=1===n,l=[];a?l.push(''):c&&l.push('');var d=l.map((function(e){return''+e+""})),h=''+(s?'':u?'':'')+"",p=[''+(0,De.o)(t.t,(0,Ae.m)(i,"t"),o)+""];if(!a&&!c&&ke.H6){var f,m=r?(null!=(f=r.b)?f:[]).concat(r.t).concat(t.s&&t.s!==r.t?t.s:[]):t.b;p.push(''+(0,Le.e)(null!=m?m:[])+"")}else s||p.push(''+(0,Pe.C)(r.t||(t.u.startsWith("/docs/api-reference/")?"API Reference":""),o)+"");return[].concat(d,[h,''],p,["",'']).join("")}function nt(){return''+(0,a.I)({id:"theme.SearchBar.noResultsText",message:"No results"})+""}var rt=n(80311);function it(){return ot.apply(this,arguments)}function ot(){return(ot=(0,we.Z)(_e().mark((function e(){var t,r;return _e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([n.e(8443),n.e(5525)]).then(n.t.bind(n,68443,23));case 2:return t=e.sent,(r=t.default).noConflict?r.noConflict():t.noConflict&&t.noConflict(),e.abrupt("return",r);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var at="_highlight";var ct=function(e){var t,n,o,s=e.handleSearchBarToggle,u=(0,ie.Z)().siteConfig.baseUrl,l=(0,c.k6)(),d=(0,c.TH)(),h=(0,r.useRef)(null),p=(0,r.useRef)("empty"),f=(0,r.useRef)(!1),m=(0,r.useState)(!1),g=m[0],b=m[1],v=(0,r.useState)(!1),y=v[0],k=v[1],x=(0,r.useCallback)((0,we.Z)(_e().mark((function e(){var t,n,r,i,o,c,s;return _e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("empty"===p.current){e.next=2;break}return e.abrupt("return");case 2:return p.current="loading",b(!0),e.next=6,Promise.all([(0,Ce.w)(u),it()]);case 6:t=e.sent,n=t[0],r=n.wrappedIndexes,i=n.zhDictionary,o=t[1],c=o(h.current,{hint:!1,autoselect:!0,openOnFocus:!0,cssClasses:{root:Oe,noPrefix:!0,dropdownMenu:Re,input:Ke,hint:Ye,suggestions:Xe,suggestion:Ne,cursor:Ie,dataset:Je,empty:et}},[{source:(0,Te.v)(r,i,ke.qo),templates:{suggestion:tt,empty:nt,footer:function(e){var t=e.query;if(!e.isEmpty){var n=document.createElement("a"),r=u+"search?q="+encodeURIComponent(t);n.href=r,n.textContent=(0,a.I)({id:"theme.SearchBar.seeAll",message:"See all results"}),n.addEventListener("click",(function(e){e.ctrlKey||e.metaKey||(e.preventDefault(),c.autocomplete.close(),l.push(r))}));var i=document.createElement("div");return i.className=ze,i.appendChild(n),i}}}}]).on("autocomplete:selected",(function(e,t){var n,r=t.document,i=r.u,o=r.h,a=t.tokens;null==(n=h.current)||n.blur();var c=i;if(ke.vc&&a.length>0){for(var s,u=new URLSearchParams,d=(0,xe.Z)(a);!(s=d()).done;){var p=s.value;u.append(at,p)}c+="?"+u.toString()}o&&(c+=o),l.push(c)})).on("autocomplete:closed",(function(){var e;null==(e=h.current)||e.blur()})),p.current="done",b(!1),f.current&&((s=h.current).value&&c.autocomplete.open(),s.focus());case 15:case"end":return e.stop()}}),e)}))),[u,l]);(0,r.useEffect)((function(){if(ke.vc){var e=Ee.Z.canUseDOM?new URLSearchParams(d.search).getAll(at):[];0!==e.length&&setTimeout((function(){var t=document.querySelector("article");if(t){var n=new ke.vc(t);n.unmark(),n.mark(e)}}))}}),[d.search,d.pathname]);var w=(0,r.useCallback)((function(){f.current=!0,x(),null==s||s(!0)}),[s,x]),S=(0,r.useCallback)((function(){null==s||s(!1)}),[s]),_=(0,r.useCallback)((function(){x()}),[x]),E=(0,r.useCallback)((function(e){e.target.value&&k(!0)}),[]),C=!!Ee.Z.canUseDOM&&/mac/i.test(null!=(t=null==(n=navigator.userAgentData)?void 0:n.platform)?t:navigator.platform);return(0,r.useEffect)((function(){function e(e){var t;(C?e.metaKey:e.ctrlKey)&&"KeyK"===e.code&&(e.preventDefault(),null==(t=h.current)||t.focus(),w())}return document.addEventListener("keydown",e),function(){document.removeEventListener("keydown",e)}}),[C,w]),r.createElement("div",{className:(0,i.Z)("navbar__search",He,(o={},o[Qe]=g&&y,o))},r.createElement("input",{placeholder:(0,a.I)({id:"theme.SearchBar.label",message:"Search",description:"The ARIA label and placeholder for search button"}),"aria-label":"Search",className:"navbar__search-input",onMouseEnter:_,onFocus:w,onBlur:S,onChange:E,ref:h}),r.createElement(rt.Z,{className:Ge}),r.createElement("div",{className:Ve},r.createElement("kbd",{className:We},C?"\u2318":"ctrl"),r.createElement("kbd",{className:We},"K")))},st="searchBox_dLyj";function ut(e){var t=e.children;return r.createElement("div",{className:st},t)}var lt=n(65551),dt=n(52802),ht=["docId","label","docsPluginId"];var pt=["sidebarId","label","docsPluginId"];var ft=["label","to","docsPluginId"];var mt=n(60373),gt=["mobile","docsPluginId","dropdownActiveClassDisabled","dropdownItemsBefore","dropdownItemsAfter"],bt=function(e){return e.docs.find((function(t){return t.id===e.mainDocId}))};var vt={default:ne,localeDropdown:function(e){var t=e.mobile,n=e.dropdownItemsBefore,i=e.dropdownItemsAfter,o=(0,g.Z)(e,ye),c=(0,ie.Z)().i18n,s=c.currentLocale,u=c.locales,l=c.localeConfigs,d=(0,be.l)(),h=u.map((function(e){var t="pathname://"+d.createUrl({locale:e,fullyQualified:!1});return{isNavLink:!0,label:l[e].label,to:t,target:"_self",autoAddBaseUrl:!1,className:e===s?"dropdown__link--active":""}})),p=[].concat(n,h,i),f=t?(0,a.I)({message:"Languages",id:"theme.navbar.mobileLanguageDropdown.label",description:"The label for the mobile language switcher dropdown"}):l[s].label;return r.createElement(fe,(0,m.Z)({},o,{mobile:t,label:r.createElement(r.Fragment,null,r.createElement(ge,{className:ve}),f),items:p}))},search:function(e){return e.mobile?null:r.createElement(ut,null,r.createElement(ct,null))},dropdown:fe,html:function(e){var t=e.value,n=e.className,o=e.mobile,a=void 0!==o&&o,c=e.isDropdownItem,s=void 0!==c&&c,u=s?"li":"div";return r.createElement(u,{className:(0,i.Z)({navbar__item:!a&&!s,"menu__list-item":a},n),dangerouslySetInnerHTML:{__html:t}})},doc:function(e){var t,n=e.docId,o=e.label,a=e.docsPluginId,c=(0,g.Z)(e,ht),s=(0,lt.Iw)(a).activeDoc,u=(0,dt.vY)(n,a);if(null===u)return null;var l=K(c.mobile);return r.createElement(ne,(0,m.Z)({exact:!0},c,{className:(0,i.Z)(c.className,(t={},t[l]=(null==s?void 0:s.sidebar)&&s.sidebar===u.sidebar,t)),activeClassName:l,label:null!=o?o:u.id,to:u.path}))},docSidebar:function(e){var t,n=e.sidebarId,o=e.label,a=e.docsPluginId,c=(0,g.Z)(e,pt),s=(0,lt.Iw)(a).activeDoc,u=(0,dt.oz)(n,a).link;if(!u)throw new Error('DocSidebarNavbarItem: Sidebar with ID "'+n+"\" doesn't have anything to be linked to.");var l=K(c.mobile);return r.createElement(ne,(0,m.Z)({exact:!0},c,{className:(0,i.Z)(c.className,(t={},t[l]=(null==s?void 0:s.sidebar)===n,t)),activeClassName:l,label:null!=o?o:u.label,to:u.path}))},docsVersion:function(e){var t=e.label,n=e.to,i=e.docsPluginId,o=(0,g.Z)(e,ft),a=(0,dt.lO)(i)[0],c=null!=t?t:a.label,s=null!=n?n:function(e){return e.docs.find((function(t){return t.id===e.mainDocId}))}(a).path;return r.createElement(ne,(0,m.Z)({},o,{label:c,to:s}))},docsVersionDropdown:function(e){var t=e.mobile,n=e.docsPluginId,i=e.dropdownActiveClassDisabled,o=e.dropdownItemsBefore,c=e.dropdownItemsAfter,s=(0,g.Z)(e,gt),u=(0,lt.Iw)(n),l=(0,lt.gB)(n),d=(0,mt.J)(n).savePreferredVersionName,h=l.map((function(e){var t,n=null!=(t=null==u?void 0:u.alternateDocVersions[e.name])?t:bt(e);return{isNavLink:!0,label:e.label,to:n.path,isActive:function(){return e===(null==u?void 0:u.activeVersion)},onClick:function(){return d(e.name)}}})),p=[].concat(o,h,c),f=(0,dt.lO)(n)[0],b=t&&p.length>1?(0,a.I)({id:"theme.navbar.mobileVersionsDropdown.label",message:"Versions",description:"The label for the navbar versions dropdown on mobile view"}):f.label,v=t&&p.length>1?void 0:bt(f).path;return p.length<=1?r.createElement(ne,(0,m.Z)({},s,{mobile:t,label:b,to:v,isActive:i?function(){return!1}:void 0})):r.createElement(fe,(0,m.Z)({},s,{mobile:t,label:b,to:v,items:p,isActive:i?function(){return!1}:void 0}))}},yt=["type"];function kt(e){var t=e.type,n=(0,g.Z)(e,yt),i=function(e,t){return e&&"default"!==e?e:t?"dropdown":"default"}(t,void 0!==n.items),o=function(e){var t=vt[e];if(!t)throw new Error('No NavbarItem component found for type "'+e+'".');return t}(i);return r.createElement(o,n)}function xt(){var e=(0,E.e)(),t=(0,f.L)().navbar.items;return r.createElement("ul",{className:"menu__list"},t.map((function(t,n){return r.createElement(kt,(0,m.Z)({mobile:!0},t,{onClick:function(){return e.toggle()},key:n}))})))}function wt(e){return r.createElement("button",(0,m.Z)({},e,{type:"button",className:"clean-btn navbar-sidebar__back"}),r.createElement(a.Z,{id:"theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel",description:"The label of the back button to return to main menu, inside the mobile navbar sidebar secondary menu (notably used to display the docs sidebar)"},"\u2190 Back to main menu"))}function St(){var e=0===(0,f.L)().navbar.items.length,t=P();return r.createElement(r.Fragment,null,!e&&r.createElement(wt,{onClick:function(){return t.hide()}}),t.content)}function _t(){var e,t=(0,E.e)();return void 0===(e=t.shown)&&(e=!0),(0,r.useEffect)((function(){return document.body.style.overflow=e?"hidden":"visible",function(){document.body.style.overflow="visible"}}),[e]),t.shouldRender?r.createElement(D,{header:r.createElement(Z,null),primaryMenu:r.createElement(xt,null),secondaryMenu:r.createElement(St,null)}):null}var Et=n(12466);var Ct="navbarHideable_ObN2",Tt="navbarHidden_FtgE";function Lt(e){return r.createElement("div",(0,m.Z)({role:"presentation"},e,{className:(0,i.Z)("navbar-sidebar__backdrop",e.className)}))}function At(e){var t=e.children,n=(0,f.L)().navbar,o=n.hideOnScroll,a=n.style,c=(0,E.e)(),u=function(e){var t=(0,r.useState)(e),n=t[0],i=t[1],o=(0,r.useRef)(!1),a=(0,r.useRef)(0),c=(0,r.useCallback)((function(e){null!==e&&(a.current=e.getBoundingClientRect().height)}),[]);return(0,Et.RF)((function(t,n){var r=t.scrollY;if(e)if(r=c?i(!1):r+u0&&r.createElement(Qt,{links:n}),logo:i&&r.createElement(Yt,{logo:i}),copyright:t&&r.createElement(Xt,{copyright:t})})}var tn=r.memo(en),nn=n(50012),rn="docusaurus.tab.",on=r.createContext(void 0);function an(e){var t=e.children,n=function(){var e=(0,r.useState)({}),t=e[0],n=e[1],i=(0,r.useCallback)((function(e,t){(0,nn.W)("docusaurus.tab."+e).set(t)}),[]);(0,r.useEffect)((function(){try{var e={};(0,nn._)().forEach((function(t){if(t.startsWith(rn)){var n=t.substring(rn.length);e[n]=(0,nn.W)(t).get()}})),n(e)}catch(t){console.error(t)}}),[]);var o=(0,r.useCallback)((function(e,t){n((function(n){var r;return Object.assign({},n,((r={})[e]=t,r))})),i(e,t)}),[i]);return(0,r.useMemo)((function(){return{tabGroupChoices:t,setTabGroupChoices:o}}),[t,o])}();return r.createElement(on.Provider,{value:n},t)}var cn=n(1944);function sn(e){var t=e.children;return r.createElement(O.S,null,r.createElement(p.pl,null,r.createElement(an,null,r.createElement(Et.OC,null,r.createElement(mt.L5,null,r.createElement(cn.VC,null,r.createElement(Pt,null,t)))))))}var un=n(19727);function ln(e){var t=e.error,n=e.tryAgain;return r.createElement("main",{className:"container margin-vert--xl"},r.createElement("div",{className:"row"},r.createElement("div",{className:"col col--6 col--offset-3"},r.createElement("h1",{className:"hero__title"},r.createElement(a.Z,{id:"theme.ErrorPageContent.title",description:"The title of the fallback page when the page crashed"},"This page crashed.")),r.createElement("p",null,t.message),r.createElement("div",null,r.createElement("button",{type:"button",onClick:n},r.createElement(a.Z,{id:"theme.ErrorPageContent.tryAgain",description:"The label of the button to try again when the page crashed"},"Try again"))))))}function dn(e){var t=e.children,n=e.noFooter,a=e.wrapperClassName,c=e.title,s=e.description;return(0,un.t)(),r.createElement(sn,null,r.createElement(cn.d,{title:c,description:s}),r.createElement(h,null),r.createElement(S,null),r.createElement(jt,null),r.createElement("div",{className:(0,i.Z)(u.k.wrapper.main,a)},r.createElement(o.Z,{fallback:ln},t)),!n&&r.createElement(tn,null))}},55537:function(e,t,n){"use strict";n.d(t,{Z:function(){return h}});var r=n(87462),i=n(63366),o=n(67294),a=n(39960),c=n(89750),s=n(44996),u=n(52263),l=n(86668),d=["imageClassName","titleClassName"];function h(e){var t=(0,u.Z)().siteConfig.title,n=(0,l.L)().navbar,h=n.title,p=n.logo,f=void 0===p?{src:""}:p,m=e.imageClassName,g=e.titleClassName,b=(0,i.Z)(e,d),v=(0,s.Z)(f.href||"/"),y={light:(0,s.Z)(f.src),dark:(0,s.Z)(f.srcDark||f.src)},k=o.createElement(c.Z,{sources:y,height:f.height,width:f.width,alt:f.alt||h||t});return o.createElement(a.Z,(0,r.Z)({to:v},b,f.target&&{target:f.target}),f.src&&(m?o.createElement("div",{className:m},k):k),null!=h&&o.createElement("b",{className:g},h))}},14739:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(67294),i=n(35742);function o(e){var t=e.locale,n=e.version,o=e.tag,a=t;return r.createElement(i.Z,null,t&&r.createElement("meta",{name:"docusaurus_locale",content:t}),n&&r.createElement("meta",{name:"docusaurus_version",content:n}),o&&r.createElement("meta",{name:"docusaurus_tag",content:o}),a&&r.createElement("meta",{name:"docsearch:language",content:a}),n&&r.createElement("meta",{name:"docsearch:version",content:n}),o&&r.createElement("meta",{name:"docsearch:docusaurus_tag",content:o}))}},89750:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r=n(87462),i=n(63366),o=n(67294),a=n(86010),c=n(72389),s=n(92949),u={themedImage:"themedImage_W2Cr","themedImage--light":"themedImage--light_TfLj","themedImage--dark":"themedImage--dark_oUvU"},l=["sources","className","alt"];function d(e){var t=(0,c.Z)(),n=(0,s.I)().colorMode,d=e.sources,h=e.className,p=e.alt,f=(0,i.Z)(e,l),m=t?"dark"===n?["dark"]:["light"]:["light","dark"];return o.createElement(o.Fragment,null,m.map((function(e){return o.createElement("img",(0,r.Z)({key:e,src:d[e],alt:p,className:(0,a.Z)(u.themedImage,u["themedImage--"+e],h)},f))})))}},40467:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return i}});var r=n(99782);function i(e){var t=r.default.themeConfig.prism.additionalLanguages;globalThis.Prism=e,t.forEach((function(e){n(6726)("./prism-"+e)})),delete globalThis.Prism}},18320:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,i=(r=n(74865))&&r.__esModule?r:{default:r};n(89014),i.default.configure({showSpinner:!1});var o={onRouteUpdate:function(e){var t=e.location,n=e.previousLocation;if(n&&t.pathname!==n.pathname){var r=window.setTimeout((function(){i.default.start()}),200);return function(){return window.clearTimeout(r)}}},onRouteDidUpdate:function(){i.default.done()}};t.default=o},72448:function(e,t,n){"use strict";var r=i(n(87410));function i(e){return e&&e.__esModule?e:{default:e}}(0,i(n(40467)).default)(r.default)},86043:function(e,t,n){"use strict";n.d(t,{u:function(){return s},z:function(){return g}});var r=n(63366),i=n(10412),o=n(67294),a=["collapsed"],c=["lazy"];function s(e){var t=e.initialState,n=(0,o.useState)(null!=t&&t),r=n[0],i=n[1],a=(0,o.useCallback)((function(){i((function(e){return!e}))}),[]);return{collapsed:r,setCollapsed:i,toggleCollapsed:a}}var u={display:"none",overflow:"hidden",height:"0px"},l={display:"block",overflow:"visible",height:"auto"};function d(e,t){var n=t?u:l;e.style.display=n.display,e.style.overflow=n.overflow,e.style.height=n.height}function h(e){var t=e.collapsibleRef,n=e.collapsed,r=e.animation,i=(0,o.useRef)(!1);(0,o.useEffect)((function(){var e,o=t.current;function a(){var e,t,n=o.scrollHeight,i=null!=(e=null==r?void 0:r.duration)?e:function(e){var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}(n);return{transition:"height "+i+"ms "+(null!=(t=null==r?void 0:r.easing)?t:"ease-in-out"),height:n+"px"}}function c(){var e=a();o.style.transition=e.transition,o.style.height=e.height}if(!i.current)return d(o,n),void(i.current=!0);return o.style.willChange="height",e=requestAnimationFrame((function(){n?(c(),requestAnimationFrame((function(){o.style.height=u.height,o.style.overflow=u.overflow}))):(o.style.display="block",requestAnimationFrame((function(){c()})))})),function(){return cancelAnimationFrame(e)}}),[t,n,r])}function p(e){if(!i.Z.canUseDOM)return e?u:l}function f(e){var t=e.as,n=void 0===t?"div":t,r=e.collapsed,i=e.children,a=e.animation,c=e.onCollapseTransitionEnd,s=e.className,u=e.disableSSRStyle,l=(0,o.useRef)(null);return h({collapsibleRef:l,collapsed:r,animation:a}),o.createElement(n,{ref:l,style:u?void 0:p(r),onTransitionEnd:function(e){"height"===e.propertyName&&(d(l.current,r),null==c||c(r))},className:s},i)}function m(e){var t=e.collapsed,n=(0,r.Z)(e,a),i=(0,o.useState)(!t),c=i[0],s=i[1],u=(0,o.useState)(t),l=u[0],d=u[1];return(0,o.useLayoutEffect)((function(){t||s(!0)}),[t]),(0,o.useLayoutEffect)((function(){c&&d(t)}),[c,t]),c?o.createElement(f,Object.assign({},n,{collapsed:l})):null}function g(e){var t=e.lazy,n=(0,r.Z)(e,c),i=t?m:f;return o.createElement(i,Object.assign({},n))}},59689:function(e,t,n){"use strict";n.d(t,{nT:function(){return f},pl:function(){return p}});var r=n(67294),i=n(72389),o=n(50012),a=n(69688),c=n(86668),s=(0,o.W)("docusaurus.announcement.dismiss"),u=(0,o.W)("docusaurus.announcement.id"),l=function(){return"true"===s.get()},d=function(e){return s.set(String(e))},h=r.createContext(null);function p(e){var t=e.children,n=function(){var e=(0,c.L)().announcementBar,t=(0,i.Z)(),n=(0,r.useState)((function(){return!!t&&l()})),o=n[0],a=n[1];(0,r.useEffect)((function(){a(l())}),[]);var s=(0,r.useCallback)((function(){d(!0),a(!0)}),[]);return(0,r.useEffect)((function(){if(e){var t=e.id,n=u.get();"annoucement-bar"===n&&(n="announcement-bar");var r=t!==n;u.set(t),r&&d(!1),!r&&l()||a(!1)}}),[e]),(0,r.useMemo)((function(){return{isActive:!!e&&!o,close:s}}),[e,o,s])}();return r.createElement(h.Provider,{value:n},t)}function f(){var e=(0,r.useContext)(h);if(!e)throw new a.i6("AnnouncementBarProvider");return e}},92949:function(e,t,n){"use strict";n.d(t,{I:function(){return g},S:function(){return m}});var r=n(67294),i=n(69688),o=n(10412),a=n(50012),c=n(86668),s=r.createContext(void 0),u="theme",l=(0,a.W)(u),d="light",h="dark",p=function(e){return e===h?h:d};function f(){var e=(0,c.L)().colorMode,t=e.defaultMode,n=e.disableSwitch,i=e.respectPrefersColorScheme,a=(0,r.useState)(function(e){return o.Z.canUseDOM?p(document.documentElement.getAttribute("data-theme")):p(e)}(t)),s=a[0],f=a[1];(0,r.useEffect)((function(){n&&l.del()}),[n]);var m=(0,r.useCallback)((function(e,n){void 0===n&&(n={});var r=n.persist,o=void 0===r||r;e?(f(e),o&&function(e){l.set(p(e))}(e)):(f(i?window.matchMedia("(prefers-color-scheme: dark)").matches?h:d:t),l.del())}),[i,t]);(0,r.useEffect)((function(){document.documentElement.setAttribute("data-theme",p(s))}),[s]),(0,r.useEffect)((function(){if(!n){var e=function(e){if(e.key===u){var t=l.get();null!==t&&m(p(t))}};return window.addEventListener("storage",e),function(){return window.removeEventListener("storage",e)}}}),[n,m]);var g=(0,r.useRef)(!1);return(0,r.useEffect)((function(){if(!n||i){var e=window.matchMedia("(prefers-color-scheme: dark)"),t=function(){window.matchMedia("print").matches||g.current?g.current=window.matchMedia("print").matches:m(null)};return e.addListener(t),function(){return e.removeListener(t)}}}),[m,n,i]),(0,r.useMemo)((function(){return{colorMode:s,setColorMode:m,get isDarkTheme(){return s===h},setLightTheme:function(){m(d)},setDarkTheme:function(){m(h)}}}),[s,m])}function m(e){var t=e.children,n=f();return r.createElement(s.Provider,{value:n},t)}function g(){var e=(0,r.useContext)(s);if(null==e)throw new i.i6("ColorModeProvider","Please see https://docusaurus.io/docs/api/themes/configuration#use-color-mode.");return e}},60373:function(e,t,n){"use strict";n.d(t,{J:function(){return y},L5:function(){return b}});var r=n(67294),i=n(86668),o=n(52802),a=n(69688),c=n(50012),s=n(65551),u=n(29935),l=function(e){return"docs-preferred-version-"+e},d=function(e,t,n){(0,c.W)(l(e),{persistence:t}).set(n)},h=function(e,t){return(0,c.W)(l(e),{persistence:t}).get()},p=function(e,t){(0,c.W)(l(e),{persistence:t}).del()};var f=r.createContext(null);function m(){var e=(0,s._r)(),t=(0,i.L)().docs.versionPersistence,n=(0,r.useMemo)((function(){return Object.keys(e)}),[e]),o=(0,r.useState)((function(){return function(e){return Object.fromEntries(e.map((function(e){return[e,{preferredVersionName:null}]})))}(n)})),a=o[0],c=o[1];return(0,r.useEffect)((function(){c(function(e){var t=e.pluginIds,n=e.versionPersistence,r=e.allDocsData;return Object.fromEntries(t.map((function(e){return[e,(t=e,i=h(t,n),r[t].versions.some((function(e){return e.name===i}))?{preferredVersionName:i}:(p(t,n),{preferredVersionName:null}))];var t,i})))}({allDocsData:e,versionPersistence:t,pluginIds:n}))}),[e,t,n]),[a,(0,r.useMemo)((function(){return{savePreferredVersion:function(e,n){d(e,t,n),c((function(t){var r;return Object.assign({},t,((r={})[e]={preferredVersionName:n},r))}))}}}),[t])]}function g(e){var t=e.children,n=m();return r.createElement(f.Provider,{value:n},t)}function b(e){var t=e.children;return o.cE?r.createElement(g,null,t):t}function v(){var e=(0,r.useContext)(f);if(!e)throw new a.i6("DocsPreferredVersionContextProvider");return e}function y(e){var t;void 0===e&&(e=u.m);var n=(0,s.zh)(e),i=v(),o=i[0],a=i[1],c=o[e].preferredVersionName;return{preferredVersion:null!=(t=n.versions.find((function(e){return e.name===c})))?t:null,savePreferredVersionName:(0,r.useCallback)((function(t){a.savePreferredVersion(e,t)}),[a,e])}}},1116:function(e,t,n){"use strict";n.d(t,{V:function(){return s},b:function(){return c}});var r=n(67294),i=n(69688),o=Symbol("EmptyContext"),a=r.createContext(o);function c(e){var t=e.children,n=e.name,i=e.items,o=(0,r.useMemo)((function(){return n&&i?{name:n,items:i}:null}),[n,i]);return r.createElement(a.Provider,{value:o},t)}function s(){var e=(0,r.useContext)(a);if(e===o)throw new i.i6("DocsSidebarProvider");return e}},74477:function(e,t,n){"use strict";n.d(t,{E:function(){return c},q:function(){return a}});var r=n(67294),i=n(69688),o=r.createContext(null);function a(e){var t=e.children,n=e.version;return r.createElement(o.Provider,{value:n},t)}function c(){var e=(0,r.useContext)(o);if(null===e)throw new i.i6("DocsVersionProvider");return e}},72961:function(e,t,n){"use strict";n.d(t,{M:function(){return h},e:function(){return p}});var r=n(67294),i=n(13102),o=n(87524),a=n(76775),c=n(69688);function s(e){!function(e){var t=(0,a.k6)().block,n=(0,c.ed)(e);(0,r.useEffect)((function(){return t((function(e,t){return n(e,t)}))}),[t,n])}((function(t,n){if("POP"===n)return e(t,n)}))}var u=n(86668),l=r.createContext(void 0);function d(){var e,t=(e=(0,i.HY)(),0===(0,u.L)().navbar.items.length&&!e.component),n=(0,o.i)(),a=!t&&"mobile"===n,c=(0,r.useState)(!1),l=c[0],d=c[1];s((function(){if(l)return d(!1),!1}));var h=(0,r.useCallback)((function(){d((function(e){return!e}))}),[]);return(0,r.useEffect)((function(){"desktop"===n&&d(!1)}),[n]),(0,r.useMemo)((function(){return{disabled:t,shouldRender:a,toggle:h,shown:l}}),[t,a,h,l])}function h(e){var t=e.children,n=d();return r.createElement(l.Provider,{value:n},t)}function p(){var e=r.useContext(l);if(void 0===e)throw new c.i6("NavbarMobileSidebarProvider");return e}},13102:function(e,t,n){"use strict";n.d(t,{HY:function(){return c},Zo:function(){return s},n2:function(){return a}});var r=n(67294),i=n(69688),o=r.createContext(null);function a(e){var t=e.children,n=(0,r.useState)({component:null,props:null});return r.createElement(o.Provider,{value:n},t)}function c(){var e=(0,r.useContext)(o);if(!e)throw new i.i6("NavbarSecondaryMenuContentProvider");return e[0]}function s(e){var t=e.component,n=e.props,a=(0,r.useContext)(o);if(!a)throw new i.i6("NavbarSecondaryMenuContentProvider");var c,s=a[1],u=(c=n,(0,r.useMemo)((function(){return c}),[].concat(Object.keys(c),Object.values(c))));return(0,r.useEffect)((function(){s({component:t,props:u})}),[s,t,u]),(0,r.useEffect)((function(){return function(){return s({component:null,props:null})}}),[s]),null}},19727:function(e,t,n){"use strict";n.d(t,{h:function(){return i},t:function(){return o}});var r=n(67294),i="navigation-with-keyboard";function o(){(0,r.useEffect)((function(){function e(e){"keydown"===e.type&&"Tab"===e.key&&document.body.classList.add(i),"mousedown"===e.type&&document.body.classList.remove(i)}return document.addEventListener("keydown",e),document.addEventListener("mousedown",e),function(){document.body.classList.remove(i),document.removeEventListener("keydown",e),document.removeEventListener("mousedown",e)}}),[])}},87524:function(e,t,n){"use strict";n.d(t,{i:function(){return u}});var r=n(67294),i=n(10412),o="desktop",a="mobile",c="ssr";function s(){return i.Z.canUseDOM?window.innerWidth>996?o:a:c}function u(){var e=(0,r.useState)((function(){return s()})),t=e[0],n=e[1];return(0,r.useEffect)((function(){function e(){n(s())}return window.addEventListener("resize",e),function(){window.removeEventListener("resize",e),clearTimeout(undefined)}}),[]),t}},35281:function(e,t,n){"use strict";n.d(t,{k:function(){return r}});var r={page:{blogListPage:"blog-list-page",blogPostPage:"blog-post-page",blogTagsListPage:"blog-tags-list-page",blogTagPostListPage:"blog-tags-post-list-page",docsDocPage:"docs-doc-page",docsTagsListPage:"docs-tags-list-page",docsTagDocListPage:"docs-tags-doc-list-page",mdxPage:"mdx-page"},wrapper:{main:"main-wrapper",blogPages:"blog-wrapper",docsPages:"docs-wrapper",mdxPages:"mdx-wrapper"},common:{editThisPage:"theme-edit-this-page",lastUpdated:"theme-last-updated",backToTopButton:"theme-back-to-top-button",codeBlock:"theme-code-block"},layout:{},docs:{docVersionBanner:"theme-doc-version-banner",docVersionBadge:"theme-doc-version-badge",docBreadcrumbs:"theme-doc-breadcrumbs",docMarkdown:"theme-doc-markdown",docTocMobile:"theme-doc-toc-mobile",docTocDesktop:"theme-doc-toc-desktop",docFooter:"theme-doc-footer",docFooterTagsRow:"theme-doc-footer-tags-row",docFooterEditMetaRow:"theme-doc-footer-edit-meta-row",docSidebarContainer:"theme-doc-sidebar-container",docSidebarMenu:"theme-doc-sidebar-menu",docSidebarItemCategory:"theme-doc-sidebar-item-category",docSidebarItemLink:"theme-doc-sidebar-item-link",docSidebarItemCategoryLevel:function(e){return"theme-doc-sidebar-item-category-level-"+e},docSidebarItemLinkLevel:function(e){return"theme-doc-sidebar-item-link-level-"+e}},blog:{}}},52802:function(e,t,n){"use strict";n.d(t,{Wl:function(){return g},_F:function(){return y},cE:function(){return p},jA:function(){return b},xz:function(){return f},hI:function(){return _},lO:function(){return x},vY:function(){return S},oz:function(){return w},s1:function(){return k}});var r=n(67855),i=n(67294),o=n(65551),a=n(60373),c=n(74477),s=n(1116);function u(e){return Array.from(new Set(e))}var l=n(48596),d=n(76775),h=n(18790),p=!!o._r;function f(e){var t=(0,c.E)();if(e){var n=t.docs[e];if(!n)throw new Error("no version doc found by id="+e);return n}}function m(e,t){for(var n,i=(0,r.Z)(e);!(n=i()).done;){var o=n.value;if("category"===o.type){if(t(o))return o;var a=m(o.items,t);if(a)return a}}}function g(e){if(e.href)return e.href;for(var t,n=(0,r.Z)(e.items);!(t=n()).done;){var i=t.value;if("link"===i.type)return i.href;if("category"===i.type){var o=g(i);if(o)return o}}}function b(){var e=(0,d.TH)().pathname,t=(0,s.V)();if(!t)throw new Error("Unexpected: cant find current sidebar in context");var n=m(t.items,(function(t){return(0,l.Mg)(t.href,e)}));if(!n)throw new Error(e+" is not associated with a category. useCurrentSidebarCategory() should only be used on category index pages.");return n}var v=function(e,t){return void 0!==e&&(0,l.Mg)(e,t)};function y(e,t){return"link"===e.type?v(e.href,t):"category"===e.type&&(v(e.href,t)||function(e,t){return e.some((function(e){return y(e,t)}))}(e.items,t))}function k(){var e,t=(0,s.V)(),n=(0,d.TH)().pathname;if(!1===(null==(e=(0,o.gA)())?void 0:e.pluginData.breadcrumbs)||!t)return null;var i=[];return function e(t){for(var o,a=(0,r.Z)(t);!(o=a()).done;){var c=o.value;if("category"===c.type&&((0,l.Mg)(c.href,n)||e(c.items))||"link"===c.type&&(0,l.Mg)(c.href,n))return i.push(c),!0}return!1}(t.items),i.reverse()}function x(e){var t=(0,o.Iw)(e).activeVersion,n=(0,a.J)(e).preferredVersion,r=(0,o.yW)(e);return(0,i.useMemo)((function(){return u([t,n,r].filter(Boolean))}),[t,n,r])}function w(e,t){var n=x(t);return(0,i.useMemo)((function(){var t=n.flatMap((function(e){return e.sidebars?Object.entries(e.sidebars):[]})),r=t.find((function(t){return t[0]===e}));if(!r)throw new Error("Can't find any sidebar with id \""+e+'" in version'+(n.length>1?"s":"")+" "+n.map((function(e){return e.name})).join(", ")+'".\n Available sidebar ids are:\n - '+Object.keys(t).join("\n- "));return r[1]}),[e,n])}function S(e,t){var n=x(t);return(0,i.useMemo)((function(){var t=n.flatMap((function(e){return e.docs})),r=t.find((function(t){return t.id===e}));if(!r){if(n.flatMap((function(e){return e.draftIds})).includes(e))return null;throw new Error("DocNavbarItem: couldn't find any doc with id \""+e+'" in version'+(n.length>1?"s":"")+" "+n.map((function(e){return e.name})).join(", ")+'".\nAvailable doc ids are:\n- '+u(t.map((function(e){return e.id}))).join("\n- "))}return r}),[e,n])}function _(e){var t=e.route,n=e.versionMetadata,r=(0,d.TH)(),i=t.routes,o=i.find((function(e){return(0,d.LX)(r.pathname,e)}));if(!o)return null;var a=o.sidebar,c=a?n.docsSidebars[a]:void 0;return{docElement:(0,h.H)(i,{versionMetadata:n}),sidebarName:a,sidebarItems:c}}},1944:function(e,t,n){"use strict";n.d(t,{FG:function(){return h},d:function(){return l},VC:function(){return p}});var r=n(67294),i=n(35742),o=n(86010),a=n(30226);function c(){var e=r.useContext(a._);if(!e)throw new Error("Unexpected: no Docusaurus route context found");return e}var s=n(44996),u=n(52263);function l(e){var t=e.title,n=e.description,o=e.keywords,a=e.image,c=e.children,l=function(e){var t=(0,u.Z)().siteConfig,n=t.title,r=t.titleDelimiter;return null!=e&&e.trim().length?e.trim()+" "+r+" "+n:n}(t),d=(0,s.C)().withBaseUrl,h=a?d(a,{absolute:!0}):void 0;return r.createElement(i.Z,null,t&&r.createElement("title",null,l),t&&r.createElement("meta",{property:"og:title",content:l}),n&&r.createElement("meta",{name:"description",content:n}),n&&r.createElement("meta",{property:"og:description",content:n}),o&&r.createElement("meta",{name:"keywords",content:Array.isArray(o)?o.join(","):o}),h&&r.createElement("meta",{property:"og:image",content:h}),h&&r.createElement("meta",{name:"twitter:image",content:h}),c)}var d=r.createContext(void 0);function h(e){var t=e.className,n=e.children,a=r.useContext(d),c=(0,o.Z)(a,t);return r.createElement(d.Provider,{value:c},r.createElement(i.Z,null,r.createElement("html",{className:c})),n)}function p(e){var t=e.children,n=c(),i="plugin-"+n.plugin.name.replace(/docusaurus-(?:plugin|theme)-(?:content-)?/gi,""),a="plugin-id-"+n.plugin.id;return r.createElement(h,{className:(0,o.Z)(i,a)},t)}},69688:function(e,t,n){"use strict";n.d(t,{i6:function(){return f},ed:function(){return h},D9:function(){return p}});var r=n(26528),i=n(94578);function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}var a=n(89611);function c(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function s(e,t,n){return s=c()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&(0,a.Z)(i,n.prototype),i},s.apply(null,arguments)}function u(e){var t="function"==typeof Map?new Map:void 0;return u=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return s(e,arguments,o(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),(0,a.Z)(r,e)},u(e)}var l=n(67294),d=n(10412).Z.canUseDOM?l.useLayoutEffect:l.useEffect;function h(e){var t=(0,l.useRef)(e);return d((function(){t.current=e}),[e]),(0,l.useCallback)((function(){return t.current.apply(t,arguments)}),[])}function p(e){var t=(0,l.useRef)();return d((function(){t.current=e})),t.current}var f=function(e){function t(t,n){var i,o,a,c;return(c=e.call(this)||this).name="ReactContextError",c.message="Hook "+(null==(i=c.stack)||null==(o=i.split("\n")[1])||null==(a=o.match((0,r.Z)(/at (?:\w+\.)?(\w+)/,{name:1})))?void 0:a.groups.name)+" is called outside the <"+t+">. "+(n||""),c}return(0,i.Z)(t,e),t}(u(Error))},48596:function(e,t,n){"use strict";n.d(t,{Mg:function(){return a},Ns:function(){return c}});var r=n(67294),i=n(723),o=n(52263);function a(e,t){var n=function(e){var t;return null==(t=!e||null!=e&&e.endsWith("/")?e:e+"/")?void 0:t.toLowerCase()};return n(e)===n(t)}function c(){var e=(0,o.Z)().siteConfig.baseUrl;return(0,r.useMemo)((function(){return function(e){var t=e.baseUrl;function n(e){return e.path===t&&!0===e.exact}function r(e){return e.path===t&&!e.exact}return function e(t){if(0!==t.length)return t.find(n)||e(t.filter(r).flatMap((function(e){var t;return null!=(t=e.routes)?t:[]})))}(e.routes)}({routes:i.Z,baseUrl:e})}),[e])}},12466:function(e,t,n){"use strict";n.d(t,{Ct:function(){return h},OC:function(){return s},RF:function(){return d}});var r=n(67294),i=n(69688),o=n(10412),a=n(72389);var c=r.createContext(void 0);function s(e){var t,n=e.children,i=(t=(0,r.useRef)(!0),(0,r.useMemo)((function(){return{scrollEventsEnabledRef:t,enableScrollEvents:function(){t.current=!0},disableScrollEvents:function(){t.current=!1}}}),[]));return r.createElement(c.Provider,{value:i},n)}function u(){var e=(0,r.useContext)(c);if(null==e)throw new i.i6("ScrollControllerProvider");return e}var l=function(){return o.Z.canUseDOM?{scrollX:window.pageXOffset,scrollY:window.pageYOffset}:null};function d(e,t){void 0===t&&(t=[]);var n=u().scrollEventsEnabledRef,o=(0,r.useRef)(l()),a=(0,i.ed)(e);(0,r.useEffect)((function(){var e=function(){if(n.current){var e=l();a&&a(e,o.current),o.current=e}},t={passive:!0};return e(),window.addEventListener("scroll",e,t),function(){return window.removeEventListener("scroll",e,t)}}),[a,n].concat(t))}function h(){var e=(0,r.useRef)(null),t=(0,a.Z)()&&"smooth"===getComputedStyle(document.documentElement).scrollBehavior;return{startScroll:function(n){e.current=t?function(e){return window.scrollTo({top:e,behavior:"smooth"}),function(){}}(n):function(e){var t=null,n=document.documentElement.scrollTop>e;return function r(){var i=document.documentElement.scrollTop;(n&&i>e||!n&&il.length?e(i.substr(l.length),d):n.push(d),s=!0}else for(var h=l.length-1;h>c;h-=1){var p=l.substr(0,h);if(i.substr(0,h)===p){c=h;var f={missed:o.missed,term:o.term.concat({value:p,trailing:!0})};i.length>h?e(i.substr(h),f):n.push(f),s=!0;break}}}s||(i.length>0?e(i.substr(1),{missed:o.missed+1,term:o.term}):o.term.length>0&&n.push(o))}(e,{missed:0,term:[]}),n.sort((function(e,t){var n=e.missed>0?1:0,r=t.missed>0?1:0;return n!==r?n-r:e.term.length-t.term.length})).map((function(e){return e.term}))}(a,t),u=(0,r.Z)(s);!(c=u()).done;){var l=c.value,d=o.concat.apply(o,l);e(i.slice(1),d)}else{var h=o.concat({value:a});e(i.slice(1),h)}}else n.push(o)}(e,[]),n}var c=n(61029);function s(e){return u(e).concat(u(e.filter((function(e){var t=e[e.length-1];return!t.trailing&&t.maybeTyping})),!0))}function u(e,t){return e.map((function(e){return{tokens:e.map((function(e){return e.value})),term:e.map((function(e){return{value:e.value,presence:o().Query.presence.REQUIRED,wildcard:(t?e.trailing||e.maybeTyping:e.trailing)?o().Query.wildcard.TRAILING:o().Query.wildcard.NONE}}))}}))}function l(e,t,n){return function(i,u){var l=function(e,t){if(1===t.length&&["ja","jp","th"].includes(t[0]))return o()[t[0]].tokenizer(e).map((function(e){return e.toString()}));var n=/[^-\s]+/g;return t.includes("zh")&&(n=/[0-9A-Z_a-z]+|(?:[\u3400-\u4DBF\u4E00-\u9FFF\uFA0E\uFA0F\uFA11\uFA13\uFA14\uFA1F\uFA21\uFA23\uFA24\uFA27-\uFA29]|[\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD884[\uDC00-\uDF4A])+/g),e.toLowerCase().match(n)||[]}(i,c.dK);if(0!==l.length){var d=function(e,t){var n=a(e,t);if(0===n.length)return[{tokens:e,term:e.map((function(e){return{value:e,presence:o().Query.presence.REQUIRED,wildcard:o().Query.wildcard.LEADING|o().Query.wildcard.TRAILING}}))}];for(var i,u=(0,r.Z)(n);!(i=u()).done;){var l=i.value;l[l.length-1].maybeTyping=!0}for(var d,h,p=[],f=(0,r.Z)(c.dK);!(d=f()).done;){var m=d.value;if("en"===m)c._k||p.unshift(o().stopWordFilter);else{var g=o()[m];g.stopWordFilter&&p.unshift(g.stopWordFilter)}}if(p.length>0){var b=function(e){return p.reduce((function(e,t){return e.filter((function(e){return t(e.value)}))}),e)};h=[];for(var v,y=[],k=(0,r.Z)(n);!(v=k()).done;){var x=v.value,w=b(x);h.push(w),w.length0&&y.push(w)}n.push.apply(n,y)}else h=n.slice();for(var S,_=[],E=(0,r.Z)(h);!(S=E()).done;){var C=S.value;if(C.length>2)for(var T=C.length-1;T>=0;T-=1)_.push(C.slice(0,T).concat(C.slice(T+1)))}return s(n).concat(s(_))}(l,t),h=[],p=function(){for(var t,i=f.value,o=i.term,a=i.tokens,c=function(){var i=t.value,c=i.documents,s=i.index,u=i.type;if(h.push.apply(h,s.query((function(e){for(var t,n=(0,r.Z)(o);!(t=n()).done;){var i=t.value;e.term(i.value,{wildcard:i.wildcard,presence:i.presence})}})).slice(0,n).filter((function(e){return!h.some((function(t){return t.document.i.toString()===e.ref}))})).slice(0,n-h.length).map((function(t){var n=c.find((function(e){return e.i.toString()===t.ref}));return{document:n,type:u,page:0!==u&&e[0].documents.find((function(e){return e.i===n.p})),metadata:t.matchData.metadata,tokens:a,score:t.score}}))),h.length>=n)return{v:"break|search"}},s=(0,r.Z)(e);!(t=s()).done;){var u=c();if("object"==typeof u)return u.v}};e:for(var f,m=(0,r.Z)(d);!(f=m()).done;){if("break|search"===p())break e}!function(e){e.forEach((function(e,t){e.index=t})),e.sort((function(t,n){var r=t.type>0&&t.page?e.findIndex((function(e){return e.document===t.page})):t.index,i=n.type>0&&n.page?e.findIndex((function(e){return e.document===n.page})):n.index;return-1===r&&(r=t.index),-1===i&&(i=n.index),r===i?0===t.type?-1:0===n.type?1:t.index-n.index:r-i}))}(h),function(e){e.forEach((function(t,n){n>0&&t.page&&e.some((function(e){return e.document===t.page}))&&(n/g,">").replace(/"/g,""").replace(/'/g,"'")}n.d(t,{X:function(){return r}})},91073:function(e,t,n){"use strict";function r(e,t){for(var n=[],r=0,i=Object.values(e);r=0){l>0&&c.push(o(e.substr(0,l),t)),c.push(""+(0,i.X)(e.substr(l,u.length))+"");var d=l+u.length;d"+(0,i.X)(e)+"":(0,i.X)(e):c.join("")}},10726:function(e,t,n){"use strict";n.d(t,{o:function(){return s}});var r=n(21690),i=n(82539),o=/[0-9A-Z_a-z]+|(?:[\u3400-\u4DBF\u4E00-\u9FFF\uFA0E\uFA0F\uFA11\uFA13\uFA14\uFA1F\uFA21\uFA23\uFA24\uFA27-\uFA29]|[\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD884[\uDC00-\uDF4A])/;function a(e){for(var t=[],n=0,r=e;r.length>0;){var i=r.match(o);if(!i){t.push(r);break}i.index>0&&t.push(r.substr(0,i.index)),t.push(i[0]),n+=i.index+i[0].length,r=e.substr(n)}return t}var c=n(61029);function s(e,t,n,r){void 0===r&&(r=c.Hk);for(var i={chunkIndex:-1},o=u(e,t,n,0,0,i),a=o.slice(0,i.chunkIndex),s=o[i.chunkIndex],l=[s.html],d=o.slice(i.chunkIndex+1),h=s.textLength,p=0,f=0,m=!1,g=!1;h0){var b=a.pop();h+b.textLength<=r?(l.unshift(b.html),p+=b.textLength,h+=b.textLength):(m=!0,a.length=0)}else{if(!(d.length>0))break;var v=d.shift();h+v.textLength<=r?(l.push(v.html),f+=v.textLength,h+=v.textLength):(g=!0,d.length=0)}return(m||a.length>0)&&l.unshift("\u2026"),(g||d.length>0)&&l.push("\u2026"),l.join("")}function u(e,t,n,o,c,s){var l=[],d=t[o],h=d[0],p=d[1];if(hc&&l.push.apply(l,a(e.substring(c,h)).map((function(e){return{html:(0,r.X)(e),textLength:e.length}}))),s&&(s.chunkIndex=l.length),l.push({html:(0,i.C)(e.substr(h,p),n,!0),textLength:p});var f=h+p;(o+=1)=0;h--){var p=a[h];"."===p?o(a,h):".."===p?(o(a,h),d++):d&&(o(a,h),d--)}if(!u)for(;d--;d)a.unshift("..");!u||""===a[0]||a[0]&&i(a[0])||a.unshift("");var f=a.join("/");return n&&"/"!==f.substr(-1)&&(f+="/"),f};function c(e){return e.valueOf?e.valueOf():Object.prototype.valueOf.call(e)}var s=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=c(t),i=c(n);return r!==t||i!==n?e(r,i):Object.keys(Object.assign({},t,n)).every((function(r){return e(t[r],n[r])}))}return!1},u=n(2177);function l(e){return"/"===e.charAt(0)?e:"/"+e}function d(e){return"/"===e.charAt(0)?e.substr(1):e}function h(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 f(e){var t=e.pathname,n=e.search,r=e.hash,i=t||"/";return n&&"?"!==n&&(i+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(i+="#"===r.charAt(0)?r:"#"+r),i}function m(e,t,n,i){var o;"string"==typeof e?(o=function(e){var t=e||"/",n="",r="",i=t.indexOf("#");-1!==i&&(r=t.substr(i),t=t.substr(0,i));var o=t.indexOf("?");return-1!==o&&(n=t.substr(o),t=t.substr(0,o)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e),o.state=t):(void 0===(o=(0,r.Z)({},e)).pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==t&&void 0===o.state&&(o.state=t));try{o.pathname=decodeURI(o.pathname)}catch(c){throw c instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):c}return n&&(o.key=n),i?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=a(o.pathname,i.pathname)):o.pathname=i.pathname:o.pathname||(o.pathname="/"),o}function g(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&s(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,i){if(null!=e){var o="function"==typeof e?e(t,n):e;"string"==typeof o?"function"==typeof r?r(o,i):i(!0):i(!1!==o)}else i(!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,i):n.push(i),d({action:r,location:i,index:t,entries:n})}}))},replace:function(e,t){var r="REPLACE",i=m(e,t,h(),k.location);l.confirmTransitionTo(i,r,n,(function(e){e&&(k.entries[k.index]=i,d({action:r,location:i}))}))},go:y,goBack:function(){y(-1)},goForward:function(){y(1)},canGo:function(e){var t=k.index+e;return t>=0&&t=n&&t[(i-=n)>>3]&1<<(7&i))return this.cursor++,!0}return!1},in_grouping_b:function(t,n,r){if(this.cursor>this.limit_backward){var i=e.charCodeAt(this.cursor-1);if(i<=r&&i>=n&&t[(i-=n)>>3]&1<<(7&i))return this.cursor--,!0}return!1},out_grouping:function(t,n,r){if(this.cursorr||i>3]&1<<(7&i)))return this.cursor++,!0}return!1},out_grouping_b:function(t,n,r){if(this.cursor>this.limit_backward){var i=e.charCodeAt(this.cursor-1);if(i>r||i>3]&1<<(7&i)))return this.cursor--,!0}return!1},eq_s:function(t,n){if(this.limit-this.cursor>1),d=0,h=c0||i==r||u)break;u=!0}}for(;;){if(c>=(p=t[r]).s_size){if(this.cursor=o+p.s_size,!p.method)return p.result;var m=p.method();if(this.cursor=o+p.s_size,m)return p.result}if((r=p.substring_i)<0)return 0}},find_among_b:function(t,n){for(var r=0,i=n,o=this.cursor,a=this.limit_backward,c=0,s=0,u=!1;;){for(var l=r+(i-r>>1),d=0,h=c=0;p--){if(o-h==a){d=-1;break}if(d=e.charCodeAt(o-1-h)-f.s[p])break;h++}if(d<0?(i=l,s=h):(r=l,c=h),i-r<=1){if(r>0||i==r||u)break;u=!0}}for(;;){var f;if(c>=(f=t[r]).s_size){if(this.cursor=o-f.s_size,!f.method)return f.result;var m=f.method();if(this.cursor=o-f.s_size,m)return f.result}if((r=f.substring_i)<0)return 0}},replace_s:function(t,n,r){var i=r.length-(n-t),o=e.substring(0,t),a=e.substring(n);return e=o+r+a,this.limit+=i,this.cursor>=n?this.cursor+=i:this.cursor>t&&(this.cursor=t),i},slice_check:function(){if(this.bra<0||this.bra>this.ket||this.ket>this.limit||this.limit>e.length)throw"faulty slice operation"},slice_from:function(e){this.slice_check(),this.replace_s(this.bra,this.ket,e)},slice_del:function(){this.slice_from("")},insert:function(e,t,n){var r=this.replace_s(e,t,n);e<=this.bra&&(this.bra+=r),e<=this.ket&&(this.ket+=r)},slice_to:function(){return this.slice_check(),e.substring(this.bra,this.ket)},eq_v_b:function(e){return this.eq_s_b(e.length,e)}}}},e.trimmerSupport={generateTrimmer:function(e){var t=new RegExp("^[^"+e+"]+"),n=new RegExp("[^"+e+"]+$");return function(e){return"function"==typeof e.update?e.update((function(e){return e.replace(t,"").replace(n,"")})):e.replace(t,"").replace(n,"")}}}}})?r.call(t,n,t,e):r)||(e.exports=i)},31336:function(e,t,n){var r,i;!function(){var o,a,c,s,u,l,d,h,p,f,m,g,b,v,y,k,x,w,S,_,E,C,T,L,A,P,D=function(e){var t=new D.Builder;return t.pipeline.add(D.trimmer,D.stopWordFilter,D.stemmer),t.searchPipeline.add(D.stemmer),e.call(t,t),t.build()};D.version="2.3.9",D.utils={},D.utils.warn=(o=this,function(e){o.console&&console.warn&&console.warn(e)}),D.utils.asString=function(e){return null==e?"":e.toString()},D.utils.clone=function(e){if(null==e)return e;for(var t=Object.create(null),n=Object.keys(e),r=0;r0){var s=D.utils.clone(t)||{};s.position=[a,c],s.index=i.length,i.push(new D.Token(n.slice(a,o),s))}a=o+1}}return i},D.tokenizer.separator=/[\s\-]+/,D.Pipeline=function(){this._stack=[]},D.Pipeline.registeredFunctions=Object.create(null),D.Pipeline.registerFunction=function(e,t){t in this.registeredFunctions&&D.utils.warn("Overwriting existing registered function: "+t),e.label=t,D.Pipeline.registeredFunctions[e.label]=e},D.Pipeline.warnIfFunctionNotRegistered=function(e){e.label&&e.label in this.registeredFunctions||D.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",e)},D.Pipeline.load=function(e){var t=new D.Pipeline;return e.forEach((function(e){var n=D.Pipeline.registeredFunctions[e];if(!n)throw new Error("Cannot load unregistered function: "+e);t.add(n)})),t},D.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach((function(e){D.Pipeline.warnIfFunctionNotRegistered(e),this._stack.push(e)}),this)},D.Pipeline.prototype.after=function(e,t){D.Pipeline.warnIfFunctionNotRegistered(t);var n=this._stack.indexOf(e);if(-1==n)throw new Error("Cannot find existingFn");n+=1,this._stack.splice(n,0,t)},D.Pipeline.prototype.before=function(e,t){D.Pipeline.warnIfFunctionNotRegistered(t);var n=this._stack.indexOf(e);if(-1==n)throw new Error("Cannot find existingFn");this._stack.splice(n,0,t)},D.Pipeline.prototype.remove=function(e){var t=this._stack.indexOf(e);-1!=t&&this._stack.splice(t,1)},D.Pipeline.prototype.run=function(e){for(var t=this._stack.length,n=0;n1&&(oe&&(n=i),o!=e);)r=n-t,i=t+Math.floor(r/2),o=this.elements[2*i];return o==e||o>e?2*i:oc?u+=2:a==c&&(t+=n[s+1]*r[u+1],s+=2,u+=2);return t},D.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},D.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),t=1,n=0;t0){var o,a=i.str.charAt(0);a in i.node.edges?o=i.node.edges[a]:(o=new D.TokenSet,i.node.edges[a]=o),1==i.str.length&&(o.final=!0),r.push({node:o,editsRemaining:i.editsRemaining,str:i.str.slice(1)})}if(0!=i.editsRemaining){if("*"in i.node.edges)var c=i.node.edges["*"];else{c=new D.TokenSet;i.node.edges["*"]=c}if(0==i.str.length&&(c.final=!0),r.push({node:c,editsRemaining:i.editsRemaining-1,str:i.str}),i.str.length>1&&r.push({node:i.node,editsRemaining:i.editsRemaining-1,str:i.str.slice(1)}),1==i.str.length&&(i.node.final=!0),i.str.length>=1){if("*"in i.node.edges)var s=i.node.edges["*"];else{s=new D.TokenSet;i.node.edges["*"]=s}1==i.str.length&&(s.final=!0),r.push({node:s,editsRemaining:i.editsRemaining-1,str:i.str.slice(1)})}if(i.str.length>1){var u,l=i.str.charAt(0),d=i.str.charAt(1);d in i.node.edges?u=i.node.edges[d]:(u=new D.TokenSet,i.node.edges[d]=u),1==i.str.length&&(u.final=!0),r.push({node:u,editsRemaining:i.editsRemaining-1,str:l+i.str.slice(2)})}}}return n},D.TokenSet.fromString=function(e){for(var t=new D.TokenSet,n=t,r=0,i=e.length;r=e;t--){var n=this.uncheckedNodes[t],r=n.child.toString();r in this.minimizedNodes?n.parent.edges[n.char]=this.minimizedNodes[r]:(n.child._str=r,this.minimizedNodes[r]=n.child),this.uncheckedNodes.pop()}},D.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},D.Index.prototype.search=function(e){return this.query((function(t){new D.QueryParser(e,t).parse()}))},D.Index.prototype.query=function(e){for(var t=new D.Query(this.fields),n=Object.create(null),r=Object.create(null),i=Object.create(null),o=Object.create(null),a=Object.create(null),c=0;c1?1:e},D.Builder.prototype.k1=function(e){this._k1=e},D.Builder.prototype.add=function(e,t){var n=e[this._ref],r=Object.keys(this._fields);this._documents[n]=t||{},this.documentCount+=1;for(var i=0;i=this.length)return D.QueryLexer.EOS;var e=this.str.charAt(this.pos);return this.pos+=1,e},D.QueryLexer.prototype.width=function(){return this.pos-this.start},D.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},D.QueryLexer.prototype.backup=function(){this.pos-=1},D.QueryLexer.prototype.acceptDigitRun=function(){var e,t;do{t=(e=this.next()).charCodeAt(0)}while(t>47&&t<58);e!=D.QueryLexer.EOS&&this.backup()},D.QueryLexer.prototype.more=function(){return this.pos1&&(e.backup(),e.emit(D.QueryLexer.TERM)),e.ignore(),e.more())return D.QueryLexer.lexText},D.QueryLexer.lexEditDistance=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(D.QueryLexer.EDIT_DISTANCE),D.QueryLexer.lexText},D.QueryLexer.lexBoost=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(D.QueryLexer.BOOST),D.QueryLexer.lexText},D.QueryLexer.lexEOS=function(e){e.width()>0&&e.emit(D.QueryLexer.TERM)},D.QueryLexer.termSeparator=D.tokenizer.separator,D.QueryLexer.lexText=function(e){for(;;){var t=e.next();if(t==D.QueryLexer.EOS)return D.QueryLexer.lexEOS;if(92!=t.charCodeAt(0)){if(":"==t)return D.QueryLexer.lexField;if("~"==t)return e.backup(),e.width()>0&&e.emit(D.QueryLexer.TERM),D.QueryLexer.lexEditDistance;if("^"==t)return e.backup(),e.width()>0&&e.emit(D.QueryLexer.TERM),D.QueryLexer.lexBoost;if("+"==t&&1===e.width())return e.emit(D.QueryLexer.PRESENCE),D.QueryLexer.lexText;if("-"==t&&1===e.width())return e.emit(D.QueryLexer.PRESENCE),D.QueryLexer.lexText;if(t.match(D.QueryLexer.termSeparator))return D.QueryLexer.lexTerm}else e.escapeCharacter()}},D.QueryParser=function(e,t){this.lexer=new D.QueryLexer(e),this.query=t,this.currentClause={},this.lexemeIdx=0},D.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var e=D.QueryParser.parseClause;e;)e=e(this);return this.query},D.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},D.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},D.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},D.QueryParser.parseClause=function(e){var t=e.peekLexeme();if(null!=t)switch(t.type){case D.QueryLexer.PRESENCE:return D.QueryParser.parsePresence;case D.QueryLexer.FIELD:return D.QueryParser.parseField;case D.QueryLexer.TERM:return D.QueryParser.parseTerm;default:var n="expected either a field or a term, found "+t.type;throw t.str.length>=1&&(n+=" with value '"+t.str+"'"),new D.QueryParseError(n,t.start,t.end)}},D.QueryParser.parsePresence=function(e){var t=e.consumeLexeme();if(null!=t){switch(t.str){case"-":e.currentClause.presence=D.Query.presence.PROHIBITED;break;case"+":e.currentClause.presence=D.Query.presence.REQUIRED;break;default:var n="unrecognised presence operator'"+t.str+"'";throw new D.QueryParseError(n,t.start,t.end)}var r=e.peekLexeme();if(null==r){n="expecting term or field, found nothing";throw new D.QueryParseError(n,t.start,t.end)}switch(r.type){case D.QueryLexer.FIELD:return D.QueryParser.parseField;case D.QueryLexer.TERM:return D.QueryParser.parseTerm;default:n="expecting term or field, found '"+r.type+"'";throw new D.QueryParseError(n,r.start,r.end)}}},D.QueryParser.parseField=function(e){var t=e.consumeLexeme();if(null!=t){if(-1==e.query.allFields.indexOf(t.str)){var n=e.query.allFields.map((function(e){return"'"+e+"'"})).join(", "),r="unrecognised field '"+t.str+"', possible fields: "+n;throw new D.QueryParseError(r,t.start,t.end)}e.currentClause.fields=[t.str];var i=e.peekLexeme();if(null==i){r="expecting term, found nothing";throw new D.QueryParseError(r,t.start,t.end)}if(i.type===D.QueryLexer.TERM)return D.QueryParser.parseTerm;r="expecting term, found '"+i.type+"'";throw new D.QueryParseError(r,i.start,i.end)}},D.QueryParser.parseTerm=function(e){var t=e.consumeLexeme();if(null!=t){e.currentClause.term=t.str.toLowerCase(),-1!=t.str.indexOf("*")&&(e.currentClause.usePipeline=!1);var n=e.peekLexeme();if(null!=n)switch(n.type){case D.QueryLexer.TERM:return e.nextClause(),D.QueryParser.parseTerm;case D.QueryLexer.FIELD:return e.nextClause(),D.QueryParser.parseField;case D.QueryLexer.EDIT_DISTANCE:return D.QueryParser.parseEditDistance;case D.QueryLexer.BOOST:return D.QueryParser.parseBoost;case D.QueryLexer.PRESENCE:return e.nextClause(),D.QueryParser.parsePresence;default:var r="Unexpected lexeme type '"+n.type+"'";throw new D.QueryParseError(r,n.start,n.end)}else e.nextClause()}},D.QueryParser.parseEditDistance=function(e){var t=e.consumeLexeme();if(null!=t){var n=parseInt(t.str,10);if(isNaN(n)){var r="edit distance must be numeric";throw new D.QueryParseError(r,t.start,t.end)}e.currentClause.editDistance=n;var i=e.peekLexeme();if(null!=i)switch(i.type){case D.QueryLexer.TERM:return e.nextClause(),D.QueryParser.parseTerm;case D.QueryLexer.FIELD:return e.nextClause(),D.QueryParser.parseField;case D.QueryLexer.EDIT_DISTANCE:return D.QueryParser.parseEditDistance;case D.QueryLexer.BOOST:return D.QueryParser.parseBoost;case D.QueryLexer.PRESENCE:return e.nextClause(),D.QueryParser.parsePresence;default:r="Unexpected lexeme type '"+i.type+"'";throw new D.QueryParseError(r,i.start,i.end)}else e.nextClause()}},D.QueryParser.parseBoost=function(e){var t=e.consumeLexeme();if(null!=t){var n=parseInt(t.str,10);if(isNaN(n)){var r="boost must be numeric";throw new D.QueryParseError(r,t.start,t.end)}e.currentClause.boost=n;var i=e.peekLexeme();if(null!=i)switch(i.type){case D.QueryLexer.TERM:return e.nextClause(),D.QueryParser.parseTerm;case D.QueryLexer.FIELD:return e.nextClause(),D.QueryParser.parseField;case D.QueryLexer.EDIT_DISTANCE:return D.QueryParser.parseEditDistance;case D.QueryLexer.BOOST:return D.QueryParser.parseBoost;case D.QueryLexer.PRESENCE:return e.nextClause(),D.QueryParser.parsePresence;default:r="Unexpected lexeme type '"+i.type+"'";throw new D.QueryParseError(r,i.start,i.end)}else e.nextClause()}},void 0===(i="function"==typeof(r=function(){return D})?r.call(t,n,t,e):r)||(e.exports=i)}()},36743:function(e,t,n){"use strict";n.r(t)},89014:function(e,t,n){"use strict";n.r(t)},32497:function(e,t,n){"use strict";n.r(t)},52295:function(e,t,n){"use strict";n.r(t)},74865:function(e,t,n){var r,i;r=function(){var e,t,n={version:"0.2.0"},r=n.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'
'};function i(e,t,n){return en?n:e}function o(e){return 100*(-1+e)}function a(e,t,n){var i;return(i="translate3d"===r.positionUsing?{transform:"translate3d("+o(e)+"%,0,0)"}:"translate"===r.positionUsing?{transform:"translate("+o(e)+"%,0)"}:{"margin-left":o(e)+"%"}).transition="all "+t+"ms "+n,i}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=i(e,r.minimum,1),n.status=1===e?null:e;var o=n.render(!t),u=o.querySelector(r.barSelector),l=r.speed,d=r.easing;return o.offsetWidth,c((function(t){""===r.positionUsing&&(r.positionUsing=n.getPositioningCSS()),s(u,a(e,l,d)),1===e?(s(o,{transition:"none",opacity:1}),o.offsetWidth,setTimeout((function(){s(o,{transition:"all "+l+"ms linear",opacity:0}),setTimeout((function(){n.remove(),t()}),l)}),l)):setTimeout(t,l)})),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)*i(Math.random()*t,.1,.95)),t=i(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");l(document.documentElement,"nprogress-busy");var t=document.createElement("div");t.id="nprogress",t.innerHTML=r.template;var i,a=t.querySelector(r.barSelector),c=e?"-100":o(n.status||0),u=document.querySelector(r.parent);return s(a,{transition:"all 0 linear",transform:"translate3d("+c+"%,0,0)"}),r.showSpinner||(i=t.querySelector(r.spinnerSelector))&&p(i),u!=document.body&&l(u,"nprogress-custom-parent"),u.appendChild(t),t},n.remove=function(){d(document.documentElement,"nprogress-busy"),d(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 c=function(){var e=[];function t(){var n=e.shift();n&&n(t)}return function(n){e.push(n),1==e.length&&t()}}(),s=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,i=e.length,o=t.charAt(0).toUpperCase()+t.slice(1);i--;)if((r=e[i]+o)in n)return r;return t}function i(e){return e=n(e),t[e]||(t[e]=r(e))}function o(e,t,n){t=i(t),e.style[t]=n}return function(e,t){var n,r,i=arguments;if(2==i.length)for(n in t)void 0!==(r=t[n])&&t.hasOwnProperty(n)&&o(e,n,r);else o(e,i[1],i[2])}}();function u(e,t){return("string"==typeof e?e:h(e)).indexOf(" "+t+" ")>=0}function l(e,t){var n=h(e),r=n+t;u(n,t)||(e.className=r.substring(1))}function d(e,t){var n,r=h(e);u(e,t)&&(n=r.replace(" "+t+" "," "),e.className=n.substring(1,n.length-1))}function h(e){return(" "+(e.className||"")+" ").replace(/\s+/gi," ")}function p(e){e&&e.parentNode&&e.parentNode.removeChild(e)}return n},void 0===(i="function"==typeof r?r.call(t,n,t,e):r)||(e.exports=i)},27418:function(e){"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function i(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(i){return!1}}()?Object.assign:function(e,o){for(var a,c,s=i(e),u=1;u=d.reach);S+=w.value.length,w=w.next){var _=w.value;if(t.length>e.length)return;if(!(_ instanceof i)){var E,C=1;if(v){if(!(E=o(x,S,e,b))||E.index>=e.length)break;var T=E.index,L=E.index+E[0].length,A=S;for(A+=w.value.length;T>=A;)A+=(w=w.next).value.length;if(S=A-=w.value.length,w.value instanceof i)continue;for(var P=w;P!==t.tail&&(Ad.reach&&(d.reach=N);var I=w.prev;if(O&&(I=s(t,I,O),S+=O.length),u(t,I,C),w=s(t,I,new i(h,g?r.tokenize(D,g):D,y,D)),R&&s(t,w,R),C>1){var F={cause:h+","+f,reach:N};a(e,t,n,w.prev,S,F),d&&F.reach>d.reach&&(d.reach=F.reach)}}}}}}function c(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function s(e,t,n){var r=t.next,i={value:n,prev:t,next:r};return t.next=i,r.prev=i,e.length++,i}function u(e,t,n){for(var r=t.next,i=0;i"+o.content+""},r}(),i=r;r.default=r,i.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},i.languages.markup.tag.inside["attr-value"].inside.entity=i.languages.markup.entity,i.languages.markup.doctype.inside["internal-subset"].inside=i.languages.markup,i.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))})),Object.defineProperty(i.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^$)/i,lookbehind:!0,inside:i.languages[t]},n.cdata=/^$/i;var r={"included-cdata":{pattern://i,inside:n}};r["language-"+t]={pattern:/[\s\S]+/,inside:i.languages[t]};var o={};o[e]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:r},i.languages.insertBefore("markup","cdata",o)}}),Object.defineProperty(i.languages.markup.tag,"addAttribute",{value:function(e,t){i.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:i.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),i.languages.html=i.languages.markup,i.languages.mathml=i.languages.markup,i.languages.svg=i.languages.markup,i.languages.xml=i.languages.extend("markup",{}),i.languages.ssml=i.languages.xml,i.languages.atom=i.languages.xml,i.languages.rss=i.languages.xml,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={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},r={bash: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}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};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[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:r},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:r},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:r.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:r.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|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|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|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|vcpkg|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;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\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}},n.inside=e.languages.bash;for(var i=["comment","function-name","for-or-select","assign-left","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],o=r.variable[1].inside,a=0;a]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},i.languages.c=i.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),i.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),i.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},i.languages.c.string],char:i.languages.c.char,comment:i.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:i.languages.c}}}}),i.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete i.languages.c.boolean,function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!)\w+(?:\s*\.\s*\w+)*\b/.source.replace(//g,(function(){return t.source}));e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!)\w+/.source.replace(//g,(function(){return t.source}))),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/(?:\s*:\s*)?|:\s*/.source.replace(//g,(function(){return n}))+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(i),function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(i),function(e){var t,n=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;e.languages.css.selector={pattern:e.languages.css.selector.pattern,lookbehind:!0,inside:t={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:RegExp("\\[(?:[^[\\]\"']|"+n.source+")*\\]"),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},"attr-name":{pattern:/^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/,lookbehind:!0},"attr-value":[n,{pattern:/(=\s*)(?:(?!\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}],combinator:/>|\+|~|\|\|/,punctuation:/[(),]/}},e.languages.css.atrule.inside["selector-function-argument"].inside=t,e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:!0}});var r={pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0},i={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0};e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#[\da-f]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:r,number:i,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:r,number:i})}(i),i.languages.javascript=i.languages.extend("clike",{"class-name":[i.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),i.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,i.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:i.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:i.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:i.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:i.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:i.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),i.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:i.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),i.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),i.languages.markup&&(i.languages.markup.tag.addInlined("script","javascript"),i.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),i.languages.js=i.languages.javascript,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"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:e.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:n}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"],e.languages.coffee=e.languages.coffeescript}(i),function(e){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r="(?:"+n.source+"(?:[ \t]+"+t.source+")?|"+t.source+"(?:[ \t]+"+n.source+")?)",i=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-])(?:[ \t]*(?:(?![#:])|:))*/.source.replace(//g,(function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source})),o=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function a(e,t){t=(t||"").replace(/m/g,"")+"m";var n=/([:\-,[{]\s*(?:\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<>/g,(function(){return r})).replace(/<>/g,(function(){return e}));return RegExp(n,t)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<>/g,(function(){return r}))),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<>[ \t]+)?)<>(?=\s*:\s)/.source.replace(/<>/g,(function(){return r})).replace(/<>/g,(function(){return"(?:"+i+"|"+o+")"}))),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:a(/\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*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:a(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:a(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:a(o),lookbehind:!0,greedy:!0},number:{pattern:a(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(i),function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(e){return e=e.replace(//g,(function(){return t})),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+e+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,i=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,(function(){return r})),o=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+i+o+"(?:"+i+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+i+o+")(?:"+i+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+i+")"+o+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+i+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \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(/\b__(?:(?!_)|_(?:(?!_))+_)+__\b|\*\*(?:(?!\*)|\*(?:(?!\*))+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)|__(?:(?!_))+__)+_\b|\*(?:(?!\*)|\*\*(?:(?!\*))+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~))+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\]))+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\]))+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach((function(t){["url","bold","italic","strike","code-snippet"].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",quot:'"'},s=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown}(i),i.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:i.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},i.hooks.add("after-tokenize",(function(e){if("graphql"===e.language)for(var t=e.tokens.filter((function(e){return"string"!=typeof e&&"comment"!==e.type&&"scalar"!==e.type})),n=0;n0)){var c=h(/^\{$/,/^\}$/);if(-1===c)continue;for(var s=n;s=0&&p(u,"variable-input")}}}}function l(e){return t[n+e]}function d(e,t){t=t||0;for(var n=0;n?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},function(e){var t=e.languages.javascript["template-string"],n=t.pattern.source,r=t.inside.interpolation,i=r.inside["interpolation-punctuation"],o=r.pattern.source;function a(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 c(e,t){return"___"+t.toUpperCase()+"_"+e+"___"}function s(t,n,r){var i={code:t,grammar:n,language:r};return e.hooks.run("before-tokenize",i),i.tokens=e.tokenize(i.code,i.grammar),e.hooks.run("after-tokenize",i),i.tokens}function u(t){var n={};n["interpolation-punctuation"]=i;var o=e.tokenize(t,n);if(3===o.length){var a=[1,1];a.push.apply(a,s(o[1],e.languages.javascript,"javascript")),o.splice.apply(o,a)}return new e.Token("interpolation",o,r.alias,t)}function l(t,n,r){var i=e.tokenize(t,{interpolation:{pattern:RegExp(o),lookbehind:!0}}),a=0,l={},d=s(i.map((function(e){if("string"==typeof e)return e;for(var n,i=e.content;-1!==t.indexOf(n=c(a++,r)););return l[n]=i,n})).join(""),n,r),h=Object.keys(l);return a=0,function e(t){for(var n=0;n=h.length)return;var r=t[n];if("string"==typeof r||"string"==typeof r.content){var i=h[a],o="string"==typeof r?r:r.content,c=o.indexOf(i);if(-1!==c){++a;var s=o.substring(0,c),d=u(l[i]),p=o.substring(c+i.length),f=[];if(s&&f.push(s),f.push(d),p){var m=[p];e(m),f.push.apply(f,m)}"string"==typeof r?(t.splice.apply(t,[n,1].concat(f)),n+=f.length-1):r.content=f}}else{var g=r.content;Array.isArray(g)?e(g):e([g])}}}(d),new e.Token(r,d,"language-"+r,t)}e.languages.javascript["template-string"]=[a("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),a("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),a("svg",/\bsvg/.source),a("markdown",/\b(?:markdown|md)/.source),a("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),a("sql",/\bsql/.source),t].filter(Boolean);var d={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function h(e){return"string"==typeof e?e:Array.isArray(e)?e.map(h).join(""):h(e.content)}e.hooks.add("after-tokenize",(function(t){t.language in d&&function t(n){for(var r=0,i=n.length;r]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(i),function(e){function t(e,t){return RegExp(e.replace(//g,(function(){return/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source})),t)}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(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),e.languages.insertBefore("javascript","keyword",{imports:{pattern:t(/(\bimport\b\s*)(?:(?:\s*,\s*(?:\*\s*as\s+|\{[^{}]*\}))?|\*\s*as\s+|\{[^{}]*\})(?=\s*\bfrom\b)/.source),lookbehind:!0,inside:e.languages.javascript},exports:{pattern:t(/(\bexport\b\s*)(?:\*(?:\s*as\s+)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source),lookbehind:!0,inside:e.languages.javascript}}),e.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,alias:"control-flow"},{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:t(/(\.\s*)#?/.source),lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var n=["function","function-variable","method","method-variable","property-access"],r=0;r*\.{3}(?:[^{}]|)*\})/.source;function o(e,t){return e=e.replace(//g,(function(){return n})).replace(//g,(function(){return r})).replace(//g,(function(){return i})),RegExp(e,t)}i=o(i).source,e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=o(/<\/?(?:[\w.:-]+(?:+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|))?|))**\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:o(//.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:o(/=/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);var a=function(e){return e?"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(a).join(""):""},c=function(t){for(var n=[],r=0;r0&&n[n.length-1].tagName===a(i.content[0].content[1])&&n.pop():"/>"===i.content[i.content.length-1].content||n.push({tagName:a(i.content[0].content[1]),openedBraces:0}):n.length>0&&"punctuation"===i.type&&"{"===i.content?n[n.length-1].openedBraces++:n.length>0&&n[n.length-1].openedBraces>0&&"punctuation"===i.type&&"}"===i.content?n[n.length-1].openedBraces--:o=!0),(o||"string"==typeof i)&&n.length>0&&0===n[n.length-1].openedBraces){var s=a(i);r0&&("string"==typeof t[r-1]||"plain-text"===t[r-1].type)&&(s=a(t[r-1])+s,t.splice(r-1,1),r--),t[r]=new e.Token("plain-text",s,null,s)}i.content&&"string"!=typeof i.content&&c(i.content)}};e.hooks.add("after-tokenize",(function(e){"jsx"!==e.language&&"tsx"!==e.language||c(e.tokens)}))}(i),function(e){e.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]};var t={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};Object.keys(t).forEach((function(n){var r=t[n],i=[];/^\w+$/.test(n)||i.push(/\w+/.exec(n)[0]),"diff"===n&&i.push("bold"),e.languages.diff[n]={pattern:RegExp("^(?:["+r+"].*(?:\r\n?|\n|(?![\\s\\S])))+","m"),alias:i,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(n)[0]}}}})),Object.defineProperty(e.languages.diff,"PREFIXES",{value:t})}(i),i.languages.git={comment:/^#.*/m,deleted:/^[-\u2013].*/m,inserted:/^\+.*/m,string:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,command:{pattern:/^.*\$ git .*$/m,inside:{parameter:/\s--?\w+/}},coord:/^@@.*@@$/m,"commit-sha1":/^commit \w{40}$/m},i.languages.go=i.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},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/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),i.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete i.languages.go["class-name"],function(e){function t(e,t){return"___"+e.toUpperCase()+t+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(n,r,i,o){if(n.language===r){var a=n.tokenStack=[];n.code=n.code.replace(i,(function(e){if("function"==typeof o&&!o(e))return e;for(var i,c=a.length;-1!==n.code.indexOf(i=t(r,c));)++c;return a[c]=e,i})),n.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(n,r){if(n.language===r&&n.tokenStack){n.grammar=e.languages[r];var i=0,o=Object.keys(n.tokenStack);!function a(c){for(var s=0;s=o.length);s++){var u=c[s];if("string"==typeof u||u.content&&"string"==typeof u.content){var l=o[i],d=n.tokenStack[l],h="string"==typeof u?u:u.content,p=t(r,l),f=h.indexOf(p);if(f>-1){++i;var m=h.substring(0,f),g=new e.Token(r,e.tokenize(d,n.grammar),"language-"+r,d),b=h.substring(f+p.length),v=[];m&&v.push.apply(v,a([m])),v.push(g),b&&v.push.apply(v,a([b])),"string"==typeof u?c.splice.apply(c,[s,1].concat(v)):u.content=v}}else u.content&&a(u.content)}return c}(n.tokens)}}}})}(i),function(e){e.languages.handlebars={comment:/\{\{![\s\S]*?\}\}/,delimiter:{pattern:/^\{\{\{?|\}\}\}?$/,alias:"punctuation"},string:/(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/,number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][+-]?\d+)?/,boolean:/\b(?:false|true)\b/,block:{pattern:/^(\s*(?:~\s*)?)[#\/]\S+?(?=\s*(?:~\s*)?$|\s)/,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")})),e.languages.hbs=e.languages.handlebars}(i),i.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},i.languages.webmanifest=i.languages.json,i.languages.less=i.languages.extend("css",{comment:[/\/\*[\s\S]*?\*\//,{pattern:/(^|[^\\])\/\/.*/,lookbehind:!0}],atrule:{pattern:/@[\w-](?:\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{punctuation:/[:()]/}},selector:{pattern:/(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};@\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{variable:/@+[\w-]+/}},property:/(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/,operator:/[+\-*\/]/}),i.languages.insertBefore("less","property",{variable:[{pattern:/@[\w-]+\s*:/,inside:{punctuation:/:/}},/@@?[\w-]+/],"mixin-usage":{pattern:/([{;]\s*)[.#](?!\d)[\w-].*?(?=[(;])/,lookbehind:!0,alias:"function"}}),i.languages.makefile={comment:{pattern:/(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,lookbehind:!0},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"builtin-target":{pattern:/\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,alias:"builtin"},target:{pattern:/^(?:[^:=\s]|[ \t]+(?![\s:]))+(?=\s*:(?!=))/m,alias:"symbol",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/,function:{pattern:/(\()(?:abspath|addsuffix|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(?:list|s)?)(?=[ \t])/,lookbehind:!0},operator:/(?:::|[?:+!])?=|[|@]/,punctuation:/[:;(){}]/},i.languages.objectivec=i.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete i.languages.objectivec["class-name"],i.languages.objc=i.languages.objectivec,i.languages.ocaml={comment:{pattern:/\(\*[\s\S]*?\*\)/,greedy:!0},char:{pattern:/'(?:[^\\\r\n']|\\(?:.|[ox]?[0-9a-f]{1,3}))'/i,greedy:!0},string:[{pattern:/"(?:\\(?:[\s\S]|\r\n)|[^\\\r\n"])*"/,greedy:!0},{pattern:/\{([a-z_]*)\|[\s\S]*?\|\1\}/,greedy:!0}],number:[/\b(?:0b[01][01_]*|0o[0-7][0-7_]*)\b/i,/\b0x[a-f0-9][a-f0-9_]*(?:\.[a-f0-9_]*)?(?:p[+-]?\d[\d_]*)?(?!\w)/i,/\b\d[\d_]*(?:\.[\d_]*)?(?:e[+-]?\d[\d_]*)?(?!\w)/i],directive:{pattern:/\B#\w+/,alias:"property"},label:{pattern:/\B~\w+/,alias:"property"},"type-variable":{pattern:/\B'\w+/,alias:"function"},variant:{pattern:/`\w+/,alias:"symbol"},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|nonrec|object|of|open|private|rec|sig|struct|then|to|try|type|val|value|virtual|when|where|while|with)\b/,boolean:/\b(?:false|true)\b/,"operator-like-punctuation":{pattern:/\[[<>|]|[>|]\]|\{<|>\}/,alias:"punctuation"},operator:/\.[.~]|:[=>]|[=<>@^|&+\-*\/$%!?~][!$%&*+\-.\/:<=>?@^|~]*|\b(?:and|asr|land|lor|lsl|lsr|lxor|mod|or)\b/,punctuation:/;;|::|[(){}\[\].,:;#]|\b_\b/},i.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\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]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\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:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|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(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},i.languages.python["string-interpolation"].inside.interpolation.inside.rest=i.languages.python,i.languages.py=i.languages.python,i.languages.reason=i.languages.extend("clike",{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(?:asr|land|lor|lsl|lsr|lxor|mod)\b/}),i.languages.insertBefore("reason","class-name",{char:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,greedy:!0},constructor:/\b[A-Z]\w*\b(?!\s*\.)/,label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete i.languages.reason.function,function(e){e.languages.sass=e.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t].+)*/m,lookbehind:!0,greedy:!0}}),e.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,greedy:!0,inside:{atrule:/(?:@[\w-]+|[+=])/}}}),delete e.languages.sass.atrule;var t=/\$[-\w]+|#\{\$[-\w]+\}/,n=[/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|not|or)\b/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}];e.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,greedy:!0,inside:{punctuation:/:/,variable:t,operator:n}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s].*)/m,greedy:!0,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\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*)*/m,lookbehind:!0,greedy:!0}})}(i),i.languages.scss=i.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),i.languages.insertBefore("scss","atrule",{keyword:[/@(?:content|debug|each|else(?: if)?|extend|for|forward|function|if|import|include|mixin|return|use|warn|while)\b/i,{pattern:/( )(?:from|through)(?= )/,lookbehind:!0}]}),i.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),i.languages.insertBefore("scss","function",{"module-modifier":{pattern:/\b(?:as|hide|show|with)\b/i,alias:"keyword"},placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|not|or)(?=\s)/,lookbehind:!0}}),i.languages.scss.atrule.inside.rest=i.languages.scss,function(e){var t={pattern:/(\b\d+)(?:%|[a-z]+)/,lookbehind:!0},n={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0},r={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},url:{pattern:/\burl\((["']?).*?\1\)/i,greedy:!0},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+)(?:(?:else|for|if|return|unless)(?=\s|$)|@[\w-]+)/,lookbehind:!0},hexcode:/#[\da-f]{3,6}/i,color:[/\b(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)\b/i,{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:t,number:n,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:t,boolean:/\b(?:false|true)\b/,operator:[/~|[+!\/%<>?=]=?|[-:]=|\*[*=]?|\.{2,3}|&&|\|\||\B-\B|\b(?:and|in|is(?: a| defined| not|nt)?|not|or)\b/],number:n,punctuation:/[{}()\[\];:,]/};r.interpolation={pattern:/\{[^\r\n}:]+\}/,alias:"variable",inside:{delimiter:{pattern:/^\{|\}$/,alias:"punctuation"},rest:r}},r.func={pattern:/[\w-]+\([^)]*\).*/,inside:{function:/^[^(]+/,rest:r}},e.languages.stylus={"atrule-declaration":{pattern:/(^[ \t]*)@.+/m,lookbehind:!0,inside:{atrule:/^@[\w-]+/,rest:r}},"variable-declaration":{pattern:/(^[ \t]*)[\w$-]+\s*.?=[ \t]*(?:\{[^{}]*\}|\S.*|$)/m,lookbehind:!0,inside:{variable:/^\S+/,rest:r}},statement:{pattern:/(^[ \t]*)(?:else|for|if|return|unless)[ \t].+/m,lookbehind:!0,inside:{keyword:/^\S+/,rest:r}},"property-declaration":{pattern:/((?:^|\{)([ \t]*))(?:[\w-]|\{[^}\r\n]+\})+(?:\s*:\s*|[ \t]+)(?!\s)[^{\r\n]*(?:;|[^{\r\n,]$(?!(?:\r?\n|\r)(?:\{|\2[ \t])))/m,lookbehind:!0,inside:{property:{pattern:/^[^\s:]+/,inside:{interpolation:r.interpolation}},rest:r}},selector:{pattern:/(^[ \t]*)(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)(?:(?:\r?\n|\r)(?:\1(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)))*(?:,$|\{|(?=(?:\r?\n|\r)(?:\{|\1[ \t])))/m,lookbehind:!0,inside:{interpolation:r.interpolation,comment:r.comment,punctuation:/[{},]/}},func:r.func,string:r.string,comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0,greedy:!0},interpolation:r.interpolation,punctuation:/[{}()\[\];:.]/}}(i),function(e){var t=e.util.clone(e.languages.typescript);e.languages.tsx=e.languages.extend("jsx",t),delete e.languages.tsx.parameter,delete e.languages.tsx["literal-property"];var n=e.languages.tsx.tag;n.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+n.pattern.source+")",n.pattern.flags),n.lookbehind=!0}(i),i.languages.wasm={comment:[/\(;[\s\S]*?;\)/,{pattern:/;;.*/,greedy:!0}],string:{pattern:/"(?:\\[\s\S]|[^"\\])*"/,greedy:!0},keyword:[{pattern:/\b(?:align|offset)=/,inside:{operator:/=/}},{pattern:/\b(?:(?:f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|neg?|nearest|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|sqrt|store(?:8|16|32)?|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!#$%&'*+\-./:<=>?@\\^`|~]+/,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:/[()]/},t.default=i},29901:function(e){e.exports&&(e.exports={core:{meta:{path:"components/prism-core.js",option:"mandatory"},core:"Core"},themes:{meta:{path:"themes/{id}.css",link:"index.html?theme={id}",exclusive:!0},prism:{title:"Default",option:"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{title:"Okaidia",owner:"ocodia"},"prism-twilight":{title:"Twilight",owner:"remybach"},"prism-coy":{title:"Coy",owner:"tshedor"},"prism-solarizedlight":{title:"Solarized Light",owner:"hectormatos2011 "},"prism-tomorrow":{title:"Tomorrow Night",owner:"Rosey"}},languages:{meta:{path:"components/prism-{id}",noCSS:!0,examplesPath:"examples/prism-{id}",addCheckAll:!0},markup:{title:"Markup",alias:["html","xml","svg","mathml","ssml","atom","rss"],aliasTitles:{html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",ssml:"SSML",atom:"Atom",rss:"RSS"},option:"default"},css:{title:"CSS",option:"default",modify:"markup"},clike:{title:"C-like",option:"default"},javascript:{title:"JavaScript",require:"clike",modify:"markup",optional:"regex",alias:"js",option:"default"},abap:{title:"ABAP",owner:"dellagustin"},abnf:{title:"ABNF",owner:"RunDevelopment"},actionscript:{title:"ActionScript",require:"javascript",modify:"markup",owner:"Golmote"},ada:{title:"Ada",owner:"Lucretia"},agda:{title:"Agda",owner:"xy-ren"},al:{title:"AL",owner:"RunDevelopment"},antlr4:{title:"ANTLR4",alias:"g4",owner:"RunDevelopment"},apacheconf:{title:"Apache Configuration",owner:"GuiTeK"},apex:{title:"Apex",require:["clike","sql"],owner:"RunDevelopment"},apl:{title:"APL",owner:"ngn"},applescript:{title:"AppleScript",owner:"Golmote"},aql:{title:"AQL",owner:"RunDevelopment"},arduino:{title:"Arduino",require:"cpp",alias:"ino",owner:"dkern"},arff:{title:"ARFF",owner:"Golmote"},armasm:{title:"ARM Assembly",alias:"arm-asm",owner:"RunDevelopment"},arturo:{title:"Arturo",alias:"art",optional:["bash","css","javascript","markup","markdown","sql"],owner:"drkameleon"},asciidoc:{alias:"adoc",title:"AsciiDoc",owner:"Golmote"},aspnet:{title:"ASP.NET (C#)",require:["markup","csharp"],owner:"nauzilus"},asm6502:{title:"6502 Assembly",owner:"kzurawel"},asmatmel:{title:"Atmel AVR Assembly",owner:"cerkit"},autohotkey:{title:"AutoHotkey",owner:"aviaryan"},autoit:{title:"AutoIt",owner:"Golmote"},avisynth:{title:"AviSynth",alias:"avs",owner:"Zinfidel"},"avro-idl":{title:"Avro IDL",alias:"avdl",owner:"RunDevelopment"},awk:{title:"AWK",alias:"gawk",aliasTitles:{gawk:"GAWK"},owner:"RunDevelopment"},bash:{title:"Bash",alias:"shell",aliasTitles:{shell:"Shell"},owner:"zeitgeist87"},basic:{title:"BASIC",owner:"Golmote"},batch:{title:"Batch",owner:"Golmote"},bbcode:{title:"BBcode",alias:"shortcode",aliasTitles:{shortcode:"Shortcode"},owner:"RunDevelopment"},bicep:{title:"Bicep",owner:"johnnyreilly"},birb:{title:"Birb",require:"clike",owner:"Calamity210"},bison:{title:"Bison",require:"c",owner:"Golmote"},bnf:{title:"BNF",alias:"rbnf",aliasTitles:{rbnf:"RBNF"},owner:"RunDevelopment"},brainfuck:{title:"Brainfuck",owner:"Golmote"},brightscript:{title:"BrightScript",owner:"RunDevelopment"},bro:{title:"Bro",owner:"wayward710"},bsl:{title:"BSL (1C:Enterprise)",alias:"oscript",aliasTitles:{oscript:"OneScript"},owner:"Diversus23"},c:{title:"C",require:"clike",owner:"zeitgeist87"},csharp:{title:"C#",require:"clike",alias:["cs","dotnet"],owner:"mvalipour"},cpp:{title:"C++",require:"c",owner:"zeitgeist87"},cfscript:{title:"CFScript",require:"clike",alias:"cfc",owner:"mjclemente"},chaiscript:{title:"ChaiScript",require:["clike","cpp"],owner:"RunDevelopment"},cil:{title:"CIL",owner:"sbrl"},clojure:{title:"Clojure",owner:"troglotit"},cmake:{title:"CMake",owner:"mjrogozinski"},cobol:{title:"COBOL",owner:"RunDevelopment"},coffeescript:{title:"CoffeeScript",require:"javascript",alias:"coffee",owner:"R-osey"},concurnas:{title:"Concurnas",alias:"conc",owner:"jasontatton"},csp:{title:"Content-Security-Policy",owner:"ScottHelme"},cooklang:{title:"Cooklang",owner:"ahue"},coq:{title:"Coq",owner:"RunDevelopment"},crystal:{title:"Crystal",require:"ruby",owner:"MakeNowJust"},"css-extras":{title:"CSS Extras",require:"css",modify:"css",owner:"milesj"},csv:{title:"CSV",owner:"RunDevelopment"},cue:{title:"CUE",owner:"RunDevelopment"},cypher:{title:"Cypher",owner:"RunDevelopment"},d:{title:"D",require:"clike",owner:"Golmote"},dart:{title:"Dart",require:"clike",owner:"Golmote"},dataweave:{title:"DataWeave",owner:"machaval"},dax:{title:"DAX",owner:"peterbud"},dhall:{title:"Dhall",owner:"RunDevelopment"},diff:{title:"Diff",owner:"uranusjr"},django:{title:"Django/Jinja2",require:"markup-templating",alias:"jinja2",owner:"romanvm"},"dns-zone-file":{title:"DNS zone file",owner:"RunDevelopment",alias:"dns-zone"},docker:{title:"Docker",alias:"dockerfile",owner:"JustinBeckwith"},dot:{title:"DOT (Graphviz)",alias:"gv",optional:"markup",owner:"RunDevelopment"},ebnf:{title:"EBNF",owner:"RunDevelopment"},editorconfig:{title:"EditorConfig",owner:"osipxd"},eiffel:{title:"Eiffel",owner:"Conaclos"},ejs:{title:"EJS",require:["javascript","markup-templating"],owner:"RunDevelopment",alias:"eta",aliasTitles:{eta:"Eta"}},elixir:{title:"Elixir",owner:"Golmote"},elm:{title:"Elm",owner:"zwilias"},etlua:{title:"Embedded Lua templating",require:["lua","markup-templating"],owner:"RunDevelopment"},erb:{title:"ERB",require:["ruby","markup-templating"],owner:"Golmote"},erlang:{title:"Erlang",owner:"Golmote"},"excel-formula":{title:"Excel Formula",alias:["xlsx","xls"],owner:"RunDevelopment"},fsharp:{title:"F#",require:"clike",owner:"simonreynolds7"},factor:{title:"Factor",owner:"catb0t"},false:{title:"False",owner:"edukisto"},"firestore-security-rules":{title:"Firestore security rules",require:"clike",owner:"RunDevelopment"},flow:{title:"Flow",require:"javascript",owner:"Golmote"},fortran:{title:"Fortran",owner:"Golmote"},ftl:{title:"FreeMarker Template Language",require:"markup-templating",owner:"RunDevelopment"},gml:{title:"GameMaker Language",alias:"gamemakerlanguage",require:"clike",owner:"LiarOnce"},gap:{title:"GAP (CAS)",owner:"RunDevelopment"},gcode:{title:"G-code",owner:"RunDevelopment"},gdscript:{title:"GDScript",owner:"RunDevelopment"},gedcom:{title:"GEDCOM",owner:"Golmote"},gettext:{title:"gettext",alias:"po",owner:"RunDevelopment"},gherkin:{title:"Gherkin",owner:"hason"},git:{title:"Git",owner:"lgiraudel"},glsl:{title:"GLSL",require:"c",owner:"Golmote"},gn:{title:"GN",alias:"gni",owner:"RunDevelopment"},"linker-script":{title:"GNU Linker Script",alias:"ld",owner:"RunDevelopment"},go:{title:"Go",require:"clike",owner:"arnehormann"},"go-module":{title:"Go module",alias:"go-mod",owner:"RunDevelopment"},graphql:{title:"GraphQL",optional:"markdown",owner:"Golmote"},groovy:{title:"Groovy",require:"clike",owner:"robfletcher"},haml:{title:"Haml",require:"ruby",optional:["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],owner:"Golmote"},handlebars:{title:"Handlebars",require:"markup-templating",alias:["hbs","mustache"],aliasTitles:{mustache:"Mustache"},owner:"Golmote"},haskell:{title:"Haskell",alias:"hs",owner:"bholst"},haxe:{title:"Haxe",require:"clike",optional:"regex",owner:"Golmote"},hcl:{title:"HCL",owner:"outsideris"},hlsl:{title:"HLSL",require:"c",owner:"RunDevelopment"},hoon:{title:"Hoon",owner:"matildepark"},http:{title:"HTTP",optional:["csp","css","hpkp","hsts","javascript","json","markup","uri"],owner:"danielgtaylor"},hpkp:{title:"HTTP Public-Key-Pins",owner:"ScottHelme"},hsts:{title:"HTTP Strict-Transport-Security",owner:"ScottHelme"},ichigojam:{title:"IchigoJam",owner:"BlueCocoa"},icon:{title:"Icon",owner:"Golmote"},"icu-message-format":{title:"ICU Message Format",owner:"RunDevelopment"},idris:{title:"Idris",alias:"idr",owner:"KeenS",require:"haskell"},ignore:{title:".ignore",owner:"osipxd",alias:["gitignore","hgignore","npmignore"],aliasTitles:{gitignore:".gitignore",hgignore:".hgignore",npmignore:".npmignore"}},inform7:{title:"Inform 7",owner:"Golmote"},ini:{title:"Ini",owner:"aviaryan"},io:{title:"Io",owner:"AlesTsurko"},j:{title:"J",owner:"Golmote"},java:{title:"Java",require:"clike",owner:"sherblot"},javadoc:{title:"JavaDoc",require:["markup","java","javadoclike"],modify:"java",optional:"scala",owner:"RunDevelopment"},javadoclike:{title:"JavaDoc-like",modify:["java","javascript","php"],owner:"RunDevelopment"},javastacktrace:{title:"Java stack trace",owner:"RunDevelopment"},jexl:{title:"Jexl",owner:"czosel"},jolie:{title:"Jolie",require:"clike",owner:"thesave"},jq:{title:"JQ",owner:"RunDevelopment"},jsdoc:{title:"JSDoc",require:["javascript","javadoclike","typescript"],modify:"javascript",optional:["actionscript","coffeescript"],owner:"RunDevelopment"},"js-extras":{title:"JS Extras",require:"javascript",modify:"javascript",optional:["actionscript","coffeescript","flow","n4js","typescript"],owner:"RunDevelopment"},json:{title:"JSON",alias:"webmanifest",aliasTitles:{webmanifest:"Web App Manifest"},owner:"CupOfTea696"},json5:{title:"JSON5",require:"json",owner:"RunDevelopment"},jsonp:{title:"JSONP",require:"json",owner:"RunDevelopment"},jsstacktrace:{title:"JS stack trace",owner:"sbrl"},"js-templates":{title:"JS Templates",require:"javascript",modify:"javascript",optional:["css","css-extras","graphql","markdown","markup","sql"],owner:"RunDevelopment"},julia:{title:"Julia",owner:"cdagnino"},keepalived:{title:"Keepalived Configure",owner:"dev-itsheng"},keyman:{title:"Keyman",owner:"mcdurdin"},kotlin:{title:"Kotlin",alias:["kt","kts"],aliasTitles:{kts:"Kotlin Script"},require:"clike",owner:"Golmote"},kumir:{title:"KuMir (\u041a\u0443\u041c\u0438\u0440)",alias:"kum",owner:"edukisto"},kusto:{title:"Kusto",owner:"RunDevelopment"},latex:{title:"LaTeX",alias:["tex","context"],aliasTitles:{tex:"TeX",context:"ConTeXt"},owner:"japborst"},latte:{title:"Latte",require:["clike","markup-templating","php"],owner:"nette"},less:{title:"Less",require:"css",optional:"css-extras",owner:"Golmote"},lilypond:{title:"LilyPond",require:"scheme",alias:"ly",owner:"RunDevelopment"},liquid:{title:"Liquid",require:"markup-templating",owner:"cinhtau"},lisp:{title:"Lisp",alias:["emacs","elisp","emacs-lisp"],owner:"JuanCaicedo"},livescript:{title:"LiveScript",owner:"Golmote"},llvm:{title:"LLVM IR",owner:"porglezomp"},log:{title:"Log file",optional:"javastacktrace",owner:"RunDevelopment"},lolcode:{title:"LOLCODE",owner:"Golmote"},lua:{title:"Lua",owner:"Golmote"},magma:{title:"Magma (CAS)",owner:"RunDevelopment"},makefile:{title:"Makefile",owner:"Golmote"},markdown:{title:"Markdown",require:"markup",optional:"yaml",alias:"md",owner:"Golmote"},"markup-templating":{title:"Markup templating",require:"markup",owner:"Golmote"},mata:{title:"Mata",owner:"RunDevelopment"},matlab:{title:"MATLAB",owner:"Golmote"},maxscript:{title:"MAXScript",owner:"RunDevelopment"},mel:{title:"MEL",owner:"Golmote"},mermaid:{title:"Mermaid",owner:"RunDevelopment"},mizar:{title:"Mizar",owner:"Golmote"},mongodb:{title:"MongoDB",owner:"airs0urce",require:"javascript"},monkey:{title:"Monkey",owner:"Golmote"},moonscript:{title:"MoonScript",alias:"moon",owner:"RunDevelopment"},n1ql:{title:"N1QL",owner:"TMWilds"},n4js:{title:"N4JS",require:"javascript",optional:"jsdoc",alias:"n4jsd",owner:"bsmith-n4"},"nand2tetris-hdl":{title:"Nand To Tetris HDL",owner:"stephanmax"},naniscript:{title:"Naninovel Script",owner:"Elringus",alias:"nani"},nasm:{title:"NASM",owner:"rbmj"},neon:{title:"NEON",owner:"nette"},nevod:{title:"Nevod",owner:"nezaboodka"},nginx:{title:"nginx",owner:"volado"},nim:{title:"Nim",owner:"Golmote"},nix:{title:"Nix",owner:"Golmote"},nsis:{title:"NSIS",owner:"idleberg"},objectivec:{title:"Objective-C",require:"c",alias:"objc",owner:"uranusjr"},ocaml:{title:"OCaml",owner:"Golmote"},odin:{title:"Odin",owner:"edukisto"},opencl:{title:"OpenCL",require:"c",modify:["c","cpp"],owner:"Milania1"},openqasm:{title:"OpenQasm",alias:"qasm",owner:"RunDevelopment"},oz:{title:"Oz",owner:"Golmote"},parigp:{title:"PARI/GP",owner:"Golmote"},parser:{title:"Parser",require:"markup",owner:"Golmote"},pascal:{title:"Pascal",alias:"objectpascal",aliasTitles:{objectpascal:"Object Pascal"},owner:"Golmote"},pascaligo:{title:"Pascaligo",owner:"DefinitelyNotAGoat"},psl:{title:"PATROL Scripting Language",owner:"bertysentry"},pcaxis:{title:"PC-Axis",alias:"px",owner:"RunDevelopment"},peoplecode:{title:"PeopleCode",alias:"pcode",owner:"RunDevelopment"},perl:{title:"Perl",owner:"Golmote"},php:{title:"PHP",require:"markup-templating",owner:"milesj"},phpdoc:{title:"PHPDoc",require:["php","javadoclike"],modify:"php",owner:"RunDevelopment"},"php-extras":{title:"PHP Extras",require:"php",modify:"php",owner:"milesj"},"plant-uml":{title:"PlantUML",alias:"plantuml",owner:"RunDevelopment"},plsql:{title:"PL/SQL",require:"sql",owner:"Golmote"},powerquery:{title:"PowerQuery",alias:["pq","mscript"],owner:"peterbud"},powershell:{title:"PowerShell",owner:"nauzilus"},processing:{title:"Processing",require:"clike",owner:"Golmote"},prolog:{title:"Prolog",owner:"Golmote"},promql:{title:"PromQL",owner:"arendjr"},properties:{title:".properties",owner:"Golmote"},protobuf:{title:"Protocol Buffers",require:"clike",owner:"just-boris"},pug:{title:"Pug",require:["markup","javascript"],optional:["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],owner:"Golmote"},puppet:{title:"Puppet",owner:"Golmote"},pure:{title:"Pure",optional:["c","cpp","fortran"],owner:"Golmote"},purebasic:{title:"PureBasic",require:"clike",alias:"pbfasm",owner:"HeX0R101"},purescript:{title:"PureScript",require:"haskell",alias:"purs",owner:"sriharshachilakapati"},python:{title:"Python",alias:"py",owner:"multipetros"},qsharp:{title:"Q#",require:"clike",alias:"qs",owner:"fedonman"},q:{title:"Q (kdb+ database)",owner:"Golmote"},qml:{title:"QML",require:"javascript",owner:"RunDevelopment"},qore:{title:"Qore",require:"clike",owner:"temnroegg"},r:{title:"R",owner:"Golmote"},racket:{title:"Racket",require:"scheme",alias:"rkt",owner:"RunDevelopment"},cshtml:{title:"Razor C#",alias:"razor",require:["markup","csharp"],optional:["css","css-extras","javascript","js-extras"],owner:"RunDevelopment"},jsx:{title:"React JSX",require:["markup","javascript"],optional:["jsdoc","js-extras","js-templates"],owner:"vkbansal"},tsx:{title:"React TSX",require:["jsx","typescript"]},reason:{title:"Reason",require:"clike",owner:"Golmote"},regex:{title:"Regex",owner:"RunDevelopment"},rego:{title:"Rego",owner:"JordanSh"},renpy:{title:"Ren'py",alias:"rpy",owner:"HyuchiaDiego"},rescript:{title:"ReScript",alias:"res",owner:"vmarcosp"},rest:{title:"reST (reStructuredText)",owner:"Golmote"},rip:{title:"Rip",owner:"ravinggenius"},roboconf:{title:"Roboconf",owner:"Golmote"},robotframework:{title:"Robot Framework",alias:"robot",owner:"RunDevelopment"},ruby:{title:"Ruby",require:"clike",alias:"rb",owner:"samflores"},rust:{title:"Rust",owner:"Golmote"},sas:{title:"SAS",optional:["groovy","lua","sql"],owner:"Golmote"},sass:{title:"Sass (Sass)",require:"css",optional:"css-extras",owner:"Golmote"},scss:{title:"Sass (Scss)",require:"css",optional:"css-extras",owner:"MoOx"},scala:{title:"Scala",require:"java",owner:"jozic"},scheme:{title:"Scheme",owner:"bacchus123"},"shell-session":{title:"Shell session",require:"bash",alias:["sh-session","shellsession"],owner:"RunDevelopment"},smali:{title:"Smali",owner:"RunDevelopment"},smalltalk:{title:"Smalltalk",owner:"Golmote"},smarty:{title:"Smarty",require:"markup-templating",optional:"php",owner:"Golmote"},sml:{title:"SML",alias:"smlnj",aliasTitles:{smlnj:"SML/NJ"},owner:"RunDevelopment"},solidity:{title:"Solidity (Ethereum)",alias:"sol",require:"clike",owner:"glachaud"},"solution-file":{title:"Solution file",alias:"sln",owner:"RunDevelopment"},soy:{title:"Soy (Closure Template)",require:"markup-templating",owner:"Golmote"},sparql:{title:"SPARQL",require:"turtle",owner:"Triply-Dev",alias:"rq"},"splunk-spl":{title:"Splunk SPL",owner:"RunDevelopment"},sqf:{title:"SQF: Status Quo Function (Arma 3)",require:"clike",owner:"RunDevelopment"},sql:{title:"SQL",owner:"multipetros"},squirrel:{title:"Squirrel",require:"clike",owner:"RunDevelopment"},stan:{title:"Stan",owner:"RunDevelopment"},stata:{title:"Stata Ado",require:["mata","java","python"],owner:"RunDevelopment"},iecst:{title:"Structured Text (IEC 61131-3)",owner:"serhioromano"},stylus:{title:"Stylus",owner:"vkbansal"},supercollider:{title:"SuperCollider",alias:"sclang",owner:"RunDevelopment"},swift:{title:"Swift",owner:"chrischares"},systemd:{title:"Systemd configuration file",owner:"RunDevelopment"},"t4-templating":{title:"T4 templating",owner:"RunDevelopment"},"t4-cs":{title:"T4 Text Templates (C#)",require:["t4-templating","csharp"],alias:"t4",owner:"RunDevelopment"},"t4-vb":{title:"T4 Text Templates (VB)",require:["t4-templating","vbnet"],owner:"RunDevelopment"},tap:{title:"TAP",owner:"isaacs",require:"yaml"},tcl:{title:"Tcl",owner:"PeterChaplin"},tt2:{title:"Template Toolkit 2",require:["clike","markup-templating"],owner:"gflohr"},textile:{title:"Textile",require:"markup",optional:"css",owner:"Golmote"},toml:{title:"TOML",owner:"RunDevelopment"},tremor:{title:"Tremor",alias:["trickle","troy"],owner:"darach",aliasTitles:{trickle:"trickle",troy:"troy"}},turtle:{title:"Turtle",alias:"trig",aliasTitles:{trig:"TriG"},owner:"jakubklimek"},twig:{title:"Twig",require:"markup-templating",owner:"brandonkelly"},typescript:{title:"TypeScript",require:"javascript",optional:"js-templates",alias:"ts",owner:"vkbansal"},typoscript:{title:"TypoScript",alias:"tsconfig",aliasTitles:{tsconfig:"TSConfig"},owner:"dkern"},unrealscript:{title:"UnrealScript",alias:["uscript","uc"],owner:"RunDevelopment"},uorazor:{title:"UO Razor Script",owner:"jaseowns"},uri:{title:"URI",alias:"url",aliasTitles:{url:"URL"},owner:"RunDevelopment"},v:{title:"V",require:"clike",owner:"taggon"},vala:{title:"Vala",require:"clike",optional:"regex",owner:"TemplarVolk"},vbnet:{title:"VB.Net",require:"basic",owner:"Bigsby"},velocity:{title:"Velocity",require:"markup",owner:"Golmote"},verilog:{title:"Verilog",owner:"a-rey"},vhdl:{title:"VHDL",owner:"a-rey"},vim:{title:"vim",owner:"westonganger"},"visual-basic":{title:"Visual Basic",alias:["vb","vba"],aliasTitles:{vba:"VBA"},owner:"Golmote"},warpscript:{title:"WarpScript",owner:"RunDevelopment"},wasm:{title:"WebAssembly",owner:"Golmote"},"web-idl":{title:"Web IDL",alias:"webidl",owner:"RunDevelopment"},wiki:{title:"Wiki markup",require:"markup",owner:"Golmote"},wolfram:{title:"Wolfram language",alias:["mathematica","nb","wl"],aliasTitles:{mathematica:"Mathematica",nb:"Mathematica Notebook"},owner:"msollami"},wren:{title:"Wren",owner:"clsource"},xeora:{title:"Xeora",require:"markup",alias:"xeoracube",aliasTitles:{xeoracube:"XeoraCube"},owner:"freakmaxi"},"xml-doc":{title:"XML doc (.net)",require:"markup",modify:["csharp","fsharp","vbnet"],owner:"RunDevelopment"},xojo:{title:"Xojo (REALbasic)",owner:"Golmote"},xquery:{title:"XQuery",require:"markup",owner:"Golmote"},yaml:{title:"YAML",alias:"yml",owner:"hason"},yang:{title:"YANG",owner:"RunDevelopment"},zig:{title:"Zig",owner:"RunDevelopment"}},plugins:{meta:{path:"plugins/{id}/prism-{id}",link:"plugins/{id}/"},"line-highlight":{title:"Line Highlight",description:"Highlights specific lines and/or line ranges."},"line-numbers":{title:"Line Numbers",description:"Line number at the beginning of code lines.",owner:"kuba-kubula"},"show-invisibles":{title:"Show Invisibles",description:"Show hidden characters such as tabs and line breaks.",optional:["autolinker","data-uri-highlight"]},autolinker:{title:"Autolinker",description:"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},wpd:{title:"WebPlatform Docs",description:'Makes tokens link to WebPlatform.org documentation. The links open in a new tab.'},"custom-class":{title:"Custom Class",description:"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.",owner:"dvkndn",noCSS:!0},"file-highlight":{title:"File Highlight",description:"Fetch external files and highlight them with Prism. Used on the Prism website itself.",noCSS:!0},"show-language":{title:"Show Language",description:"Display the highlighted language in code blocks (inline code does not show the label).",owner:"nauzilus",noCSS:!0,require:"toolbar"},"jsonp-highlight":{title:"JSONP Highlight",description:"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).",noCSS:!0,owner:"nauzilus"},"highlight-keywords":{title:"Highlight Keywords",description:"Adds special CSS classes for each keyword for fine-grained highlighting.",owner:"vkbansal",noCSS:!0},"remove-initial-line-feed":{title:"Remove initial line feed",description:"Removes the initial line feed in code blocks.",owner:"Golmote",noCSS:!0},"inline-color":{title:"Inline color",description:"Adds a small inline preview for colors in style sheets.",require:"css-extras",owner:"RunDevelopment"},previewers:{title:"Previewers",description:"Previewers for angles, colors, gradients, easing and time.",require:"css-extras",owner:"Golmote"},autoloader:{title:"Autoloader",description:"Automatically loads the needed languages to highlight the code blocks.",owner:"Golmote",noCSS:!0},"keep-markup":{title:"Keep Markup",description:"Prevents custom markup from being dropped out during highlighting.",owner:"Golmote",optional:"normalize-whitespace",noCSS:!0},"command-line":{title:"Command Line",description:"Display a command line with a prompt and, optionally, the output/response from the commands.",owner:"chriswells0"},"unescaped-markup":{title:"Unescaped Markup",description:"Write markup without having to escape anything."},"normalize-whitespace":{title:"Normalize Whitespace",description:"Supports multiple operations to normalize whitespace in code blocks.",owner:"zeitgeist87",optional:"unescaped-markup",noCSS:!0},"data-uri-highlight":{title:"Data-URI Highlight",description:"Highlights data-URI contents.",owner:"Golmote",noCSS:!0},toolbar:{title:"Toolbar",description:"Attach a toolbar for plugins to easily register buttons on the top of a code block.",owner:"mAAdhaTTah"},"copy-to-clipboard":{title:"Copy to Clipboard Button",description:"Add a button that copies the code block to the clipboard when clicked.",owner:"mAAdhaTTah",require:"toolbar",noCSS:!0},"download-button":{title:"Download Button",description:"A button in the toolbar of a code block adding a convenient way to download a code file.",owner:"Golmote",require:"toolbar",noCSS:!0},"match-braces":{title:"Match braces",description:"Highlights matching braces.",owner:"RunDevelopment"},"diff-highlight":{title:"Diff Highlight",description:"Highlights the code inside diff blocks.",owner:"RunDevelopment",require:"diff"},"filter-highlight-all":{title:"Filter highlightAll",description:"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.",owner:"RunDevelopment",noCSS:!0},treeview:{title:"Treeview",description:"A language with special styles to highlight file system tree structures.",owner:"Golmote"}}})},2885:function(e,t,n){const r=n(29901),i=n(39642),o=new Set;function a(e){void 0===e?e=Object.keys(r.languages).filter((e=>"meta"!=e)):Array.isArray(e)||(e=[e]);const t=[...o,...Object.keys(Prism.languages)];i(r,e,t).load((e=>{if(!(e in r.languages))return void(a.silent||console.warn("Language does not exist: "+e));const t="./prism-"+e;delete n.c[n(16500).resolve(t)],delete Prism.languages[e],n(16500)(t),o.add(e)}))}a.silent=!1,e.exports=a},6726:function(e,t,n){var r={"./":2885};function i(e){var t=o(e);return n(t)}function o(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}i.keys=function(){return Object.keys(r)},i.resolve=o,e.exports=i,i.id=6726},16500:function(e,t,n){var r={"./":2885};function i(e){var t=o(e);return n(t)}function o(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}i.keys=function(){return Object.keys(r)},i.resolve=o,e.exports=i,i.id=16500},39642:function(e){"use strict";var t=function(){var e=function(){};function t(e,t){Array.isArray(e)?e.forEach(t):null!=e&&t(e,0)}function n(e){for(var t={},n=0,r=e.length;n "));var c={},s=e[r];if(s){function u(t){if(!(t in e))throw new Error(r+" depends on an unknown component "+t);if(!(t in c))for(var a in i(t,o),c[t]=!0,n[t])c[a]=!0}t(s.require,u),t(s.optional,u),t(s.modify,u)}n[r]=c,o.pop()}}return function(e){var t=n[e];return t||(i(e,r),t=n[e]),t}}function i(e){for(var t in e)return!0;return!1}return function(o,a,c){var s=function(e){var t={};for(var n in e){var r=e[n];for(var i in r)if("meta"!=i){var o=r[i];t[i]="string"==typeof o?{title:o}:o}}return t}(o),u=function(e){var n;return function(r){if(r in e)return r;if(!n)for(var i in n={},e){var o=e[i];t(o&&o.alias,(function(t){if(t in n)throw new Error(t+" cannot be alias for both "+i+" and "+n[t]);if(t in e)throw new Error(t+" cannot be alias of "+i+" because it is a component.");n[t]=i}))}return n[r]||r}}(s);a=a.map(u),c=(c||[]).map(u);var l=n(a),d=n(c);a.forEach((function e(n){var r=s[n];t(r&&r.require,(function(t){t in d||(l[t]=!0,e(t))}))}));for(var h,p=r(s),f=l;i(f);){for(var m in h={},f){var g=s[m];t(g&&g.modify,(function(e){e in d&&(h[e]=!0)}))}for(var b in d)if(!(b in l))for(var v in p(b))if(v in l){h[b]=!0;break}for(var y in f=h)l[y]=!0}var k={getIds:function(){var e=[];return k.load((function(t){e.push(t)})),e},load:function(t,n){return function(t,n,r,i){var o=i?i.series:void 0,a=i?i.parallel:e,c={},s={};function u(e){if(e in c)return c[e];s[e]=!0;var i,l=[];for(var d in t(e))d in n&&l.push(d);if(0===l.length)i=r(e);else{var h=a(l.map((function(e){var t=u(e);return delete s[e],t})));o?i=o(h,(function(){return r(e)})):r(e)}return c[e]=i}for(var l in n)u(l);var d=[];for(var h in s)d.push(c[h]);return a(d)}(p,l,t,n)}};return k}}();e.exports=t},92703:function(e,t,n){"use strict";var r=n(50414);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,o,a){if(a!==r){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:i};return n.PropTypes=n,n}},45697:function(e,t,n){e.exports=n(92703)()},50414:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},64448:function(e,t,n){"use strict";var r=n(67294),i=n(27418),o=n(63840);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n