1
0
mirror of https://github.com/oauth2-proxy/oauth2-proxy.git synced 2025-05-13 22:06:40 +02:00
oauth2-proxy/1.d056dcee.js

1 line
24 KiB
JavaScript
Raw Normal View History

(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{110:function(e,t,n){"use strict";n.d(t,"a",(function(){return p})),n.d(t,"b",(function(){return h}));var r=n(0),o=n.n(r),i=n(83),a=n(86),u=!!a.useAllDocsData,c=function(e){return"docs-preferred-version-"+e},s={save:function(e,t,n){"none"===t||window.localStorage.setItem(c(e),n)},read:function(e,t){return"none"===t?null:window.localStorage.getItem(c(e))},clear:function(e,t){"none"===t||window.localStorage.removeItem(c(e))}};function f(e){var t=e.pluginIds,n=e.versionPersistence,r=e.allDocsData;var o={};return t.forEach((function(e){o[e]=function(e){var t=s.read(e,n);return r[e].versions.some((function(e){return e.name===t}))?{preferredVersionName:t}:(s.clear(e,n),{preferredVersionName:null})}(e)})),o}function l(){var e=Object(a.useAllDocsData)(),t=Object(i.a)().docs.versionPersistence,n=Object(r.useMemo)((function(){return Object.keys(e)}),[e]),o=Object(r.useState)((function(){return function(e){var t={};return e.forEach((function(e){t[e]={preferredVersionName:null}})),t}(n)})),u=o[0],c=o[1];return Object(r.useEffect)((function(){c(f({allDocsData:e,versionPersistence:t,pluginIds:n}))}),[e,t,n]),[u,Object(r.useMemo)((function(){return{savePreferredVersion:function(e,n){s.save(e,t,n),c((function(t){var r;return Object.assign({},t,((r={})[e]={preferredVersionName:n},r))}))}}}),[c])]}var d=Object(r.createContext)(null);function p(e){var t=e.children;return u?o.a.createElement(v,null,t):o.a.createElement(o.a.Fragment,null,t)}function v(e){var t=e.children,n=l();return o.a.createElement(d.Provider,{value:n},t)}function h(){var e=Object(r.useContext)(d);if(!e)throw new Error("Can't find docs preferred context, maybe you forgot to use the DocsPreferredVersionContextProvider ?");return e}},117:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useDocVersionSuggestions=t.useActiveDocContext=t.useActiveVersion=t.useLatestVersion=t.useVersions=t.useActivePluginAndVersion=t.useActivePlugin=t.useDocsData=t.useAllDocsData=void 0;var r=n(89),o=n(118),i=n(119);t.useAllDocsData=function(){return o.useAllPluginInstancesData("docusaurus-plugin-content-docs")},t.useDocsData=function(e){return o.usePluginData("docusaurus-plugin-content-docs",e)},t.useActivePlugin=function(e){void 0===e&&(e={});var n=t.useAllDocsData(),o=r.useLocation().pathname;return i.getActivePlugin(n,o,e)},t.useActivePluginAndVersion=function(e){void 0===e&&(e={});var n=t.useActivePlugin(e),o=r.useLocation().pathname;if(n)return{activePlugin:n,activeVersion:i.getActiveVersion(n.pluginData,o)}},t.useVersions=function(e){return t.useDocsData(e).versions},t.useLatestVersion=function(e){var n=t.useDocsData(e);return i.getLatestVersion(n)},t.useActiveVersion=function(e){var n=t.useDocsData(e),o=r.useLocation().pathname;return i.getActiveVersion(n,o)},t.useActiveDocContext=function(e){var n=t.useDocsData(e),o=r.useLocation().pathname;return i.getActiveDocContext(n,o)},t.useDocVersionSuggestions=function(e){var n=t.useDocsData(e),o=r.useLocation().pathname;return i.getDocVersionSuggestions(n,o)}},118:function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return o})),n.d(t,"useAllPluginInstancesData",(function(){return i})),n.d(t,"usePluginData",(function(){return a}));var r=n(85);function o(){var e=Object(r.a)().globalData;if(!e)throw new Error("Docusaurus global data not found");return e}function i(e){var t=o()[e];if(!t)throw new Error("Docusaurus plugin global data not found for pluginName="+e);return t}function a(e,t){void 0===t&&(t="default");var n=i(e)[t];if(!n)throw new Error("Docusaurus plugin global data not found for pluginName="+e+" and pluginId="+t);return n}},119: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(89);t.getActivePlugin=function(e,t,n){void 0===n&&(n={});var o=Object.entries(e).find((function(e){e[0];var n=e[1];return!!r.matchPath(t,{path:n.path,exact:!1,strict:!1})})),i=o?{pluginId:o[0],pluginData:o[1]}:void 0;if(