@dr.pogodin/react-utils 1.21.1 → 1.21.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. package/build/development/client/index.js +0 -7
  2. package/build/development/client/index.js.map +1 -1
  3. package/build/development/client/init.js +3 -17
  4. package/build/development/client/init.js.map +1 -1
  5. package/build/development/index.js +0 -13
  6. package/build/development/index.js.map +1 -1
  7. package/build/development/server/Cache.js +2 -9
  8. package/build/development/server/Cache.js.map +1 -1
  9. package/build/development/server/index.js +7 -32
  10. package/build/development/server/index.js.map +1 -1
  11. package/build/development/server/renderer.js +24 -80
  12. package/build/development/server/renderer.js.map +1 -1
  13. package/build/development/server/server.js +21 -61
  14. package/build/development/server/server.js.map +1 -1
  15. package/build/development/server/utils/errors.js +2 -9
  16. package/build/development/server/utils/errors.js.map +1 -1
  17. package/build/development/server/utils/index.js +0 -4
  18. package/build/development/shared/components/Button/index.js +2 -13
  19. package/build/development/shared/components/Button/index.js.map +1 -1
  20. package/build/development/shared/components/Checkbox/index.js +2 -9
  21. package/build/development/shared/components/Checkbox/index.js.map +1 -1
  22. package/build/development/shared/components/CodeSplit/index.js +11 -22
  23. package/build/development/shared/components/CodeSplit/index.js.map +1 -1
  24. package/build/development/shared/components/Dropdown/index.js +0 -11
  25. package/build/development/shared/components/Dropdown/index.js.map +1 -1
  26. package/build/development/shared/components/GenericLink/index.js +3 -9
  27. package/build/development/shared/components/GenericLink/index.js.map +1 -1
  28. package/build/development/shared/components/Input/index.js +0 -7
  29. package/build/development/shared/components/Input/index.js.map +1 -1
  30. package/build/development/shared/components/Link.js +3 -6
  31. package/build/development/shared/components/Link.js.map +1 -1
  32. package/build/development/shared/components/MetaTags.js +1 -8
  33. package/build/development/shared/components/MetaTags.js.map +1 -1
  34. package/build/development/shared/components/Modal/index.js +2 -19
  35. package/build/development/shared/components/Modal/index.js.map +1 -1
  36. package/build/development/shared/components/NavLink.js +2 -6
  37. package/build/development/shared/components/NavLink.js.map +1 -1
  38. package/build/development/shared/components/PageLayout/index.js +0 -7
  39. package/build/development/shared/components/PageLayout/index.js.map +1 -1
  40. package/build/development/shared/components/ScalableRect/index.js +1 -6
  41. package/build/development/shared/components/ScalableRect/index.js.map +1 -1
  42. package/build/development/shared/components/Throbber/index.js +0 -9
  43. package/build/development/shared/components/Throbber/index.js.map +1 -1
  44. package/build/development/shared/components/WithTooltip/Tooltip.js +9 -28
  45. package/build/development/shared/components/WithTooltip/Tooltip.js.map +1 -1
  46. package/build/development/shared/components/WithTooltip/index.js +0 -16
  47. package/build/development/shared/components/WithTooltip/index.js.map +1 -1
  48. package/build/development/shared/components/YouTubeVideo/index.js +3 -11
  49. package/build/development/shared/components/YouTubeVideo/index.js.map +1 -1
  50. package/build/development/shared/components/index.js +0 -17
  51. package/build/development/shared/components/index.js.map +1 -1
  52. package/build/development/shared/utils/Barrier.js +1 -13
  53. package/build/development/shared/utils/Barrier.js.map +1 -1
  54. package/build/development/shared/utils/Emitter.js +4 -13
  55. package/build/development/shared/utils/Emitter.js.map +1 -1
  56. package/build/development/shared/utils/Semaphore.js +13 -19
  57. package/build/development/shared/utils/Semaphore.js.map +1 -1
  58. package/build/development/shared/utils/config.js +0 -5
  59. package/build/development/shared/utils/config.js.map +1 -1
  60. package/build/development/shared/utils/index.js +5 -26
  61. package/build/development/shared/utils/index.js.map +1 -1
  62. package/build/development/shared/utils/isomorphy.js +6 -12
  63. package/build/development/shared/utils/isomorphy.js.map +1 -1
  64. package/build/development/shared/utils/jest/E2eSsrEnv.js +20 -41
  65. package/build/development/shared/utils/jest/E2eSsrEnv.js.map +1 -1
  66. package/build/development/shared/utils/jest/index.js +10 -31
  67. package/build/development/shared/utils/jest/index.js.map +1 -1
  68. package/build/development/shared/utils/splitComponent.js +2 -5
  69. package/build/development/shared/utils/splitComponent.js.map +1 -1
  70. package/build/development/shared/utils/time.js +52 -14
  71. package/build/development/shared/utils/time.js.map +1 -1
  72. package/build/development/shared/utils/webpack.js +1 -5
  73. package/build/development/shared/utils/webpack.js.map +1 -1
  74. package/build/development/style.css +5 -24
  75. package/build/development/web.bundle.js +27 -27
  76. package/build/production/client/index.js.map +1 -1
  77. package/build/production/client/init.js.map +1 -1
  78. package/build/production/index.js.map +1 -1
  79. package/build/production/server/Cache.js.map +1 -1
  80. package/build/production/server/index.js.map +1 -1
  81. package/build/production/server/renderer.js.map +1 -1
  82. package/build/production/server/server.js.map +1 -1
  83. package/build/production/server/utils/errors.js.map +1 -1
  84. package/build/production/shared/components/Button/index.js.map +1 -1
  85. package/build/production/shared/components/Checkbox/index.js.map +1 -1
  86. package/build/production/shared/components/CodeSplit/index.js.map +1 -1
  87. package/build/production/shared/components/Dropdown/index.js.map +1 -1
  88. package/build/production/shared/components/GenericLink/index.js.map +1 -1
  89. package/build/production/shared/components/Input/index.js.map +1 -1
  90. package/build/production/shared/components/Link.js.map +1 -1
  91. package/build/production/shared/components/MetaTags.js.map +1 -1
  92. package/build/production/shared/components/Modal/index.js.map +1 -1
  93. package/build/production/shared/components/NavLink.js.map +1 -1
  94. package/build/production/shared/components/PageLayout/index.js.map +1 -1
  95. package/build/production/shared/components/ScalableRect/index.js.map +1 -1
  96. package/build/production/shared/components/Throbber/index.js.map +1 -1
  97. package/build/production/shared/components/WithTooltip/Tooltip.js.map +1 -1
  98. package/build/production/shared/components/WithTooltip/index.js.map +1 -1
  99. package/build/production/shared/components/YouTubeVideo/index.js.map +1 -1
  100. package/build/production/shared/components/index.js.map +1 -1
  101. package/build/production/shared/utils/Barrier.js.map +1 -1
  102. package/build/production/shared/utils/Emitter.js.map +1 -1
  103. package/build/production/shared/utils/Semaphore.js.map +1 -1
  104. package/build/production/shared/utils/config.js.map +1 -1
  105. package/build/production/shared/utils/index.js.map +1 -1
  106. package/build/production/shared/utils/isomorphy.js.map +1 -1
  107. package/build/production/shared/utils/jest/E2eSsrEnv.js.map +1 -1
  108. package/build/production/shared/utils/jest/index.js.map +1 -1
  109. package/build/production/shared/utils/splitComponent.js.map +1 -1
  110. package/build/production/shared/utils/time.js +21 -2
  111. package/build/production/shared/utils/time.js.map +1 -1
  112. package/build/production/shared/utils/webpack.js.map +1 -1
  113. package/build/production/style.css +1 -1
  114. package/build/production/style.css.map +1 -1
  115. package/build/production/web.bundle.js +1 -1
  116. package/build/production/web.bundle.js.map +1 -1
  117. package/config/babel/node-ssr.js +1 -1
  118. package/package.json +33 -31
@@ -1 +1 @@
1
- {"version":3,"file":"E2eSsrEnv.js","names":["E2eSsrEnv","JsdomEnv","loadWebpackConfig","options","pragmas","JSON","parse","defaults","context","testFolder","fs","global","webpackOutputFs","factory","require","path","resolve","rootDir","webpackConfig","buildInfo","existsSync","readFileSync","runWebpack","compiler","webpack","outputFileSystem","Promise","done","fail","run","err","stats","hasErrors","console","error","toJson","errors","Error","webpackStats","runSsr","logger","undefined","debug","noop","info","log","warn","root","process","cwd","register","envName","babelEnv","extensions","entry","p","Application","entryExportName","renderer","ssrFactory","status","markup","ssrRequest","cookie","send","set","value","locals","devMiddleware","ssrMarkup","ssrOptions","ssrStatus","constructor","config","docblockPragmas","request","url","csrfToken","projectConfig","dom","createFsFromVolume","Volume","dirname","testPath","withSsr","setup","REACT_UTILS_FORCE_CLIENT_SIDE","teardown","Object","keys","cache","forEach","key","revert"],"sources":["../../../../../src/shared/utils/jest/E2eSsrEnv.js"],"sourcesContent":["/**\n * Jest environment for end-to-end SSR and client-side testing. It relies on\n * the standard react-utils mechanics to execute SSR of given scene, and also\n * Webpack build of the code for client-side execution, it further exposes\n * Jsdom environment for the client-side testing of the outcomes.\n */\n/* eslint-disable global-require, import/no-dynamic-require */\n\n// BEWARE: The module is not imported into the JU module / the main assembly of\n// the library, because doing so easily breaks stuff:\n// 1) This module depends on Node-specific modules, which would make JU\n// incompatible with JsDom if included into JU.\n// 2) If this module is weakly imported from somewhere else in the lib,\n// it seems to randomly break tests using it for a different reason,\n// probably some sort of a require-loop, or some issues with weak\n// require in that scenario.\n\nimport path from 'path';\nimport ssrFactory from 'server/renderer';\n\nimport { defaults, noop, set } from 'lodash';\n\n// As this environment is a part of the Jest testing utils,\n// we assume development dependencies are available when it is used.\n/* eslint-disable import/no-extraneous-dependencies */\nimport register from '@babel/register';\nimport JsdomEnv from 'jest-environment-jsdom';\nimport { createFsFromVolume, Volume } from 'memfs';\nimport webpack from 'webpack';\n/* eslint-enable import/no-extraneous-dependencies */\n\nexport default class E2eSsrEnv extends JsdomEnv {\n /**\n * Loads Webpack config, and exposes it to the environment via global\n * webpackConfig object.\n */\n loadWebpackConfig() {\n let options = this.pragmas['webpack-config-options'];\n options = options ? JSON.parse(options) : {};\n defaults(options, {\n context: this.testFolder,\n fs: this.global.webpackOutputFs,\n });\n\n let factory = this.pragmas['webpack-config-factory'] || '';\n factory = require(path.resolve(this.rootDir, factory));\n this.global.webpackConfig = factory(options);\n\n const fs = this.global.webpackOutputFs;\n let buildInfo = `${options.context}/.build-info`;\n if (fs.existsSync(buildInfo)) {\n buildInfo = fs.readFileSync(buildInfo, 'utf8');\n this.global.buildInfo = JSON.parse(buildInfo);\n }\n }\n\n /**\n * Executes Webpack build.\n * @return {Promise}\n */\n async runWebpack() {\n this.loadWebpackConfig();\n\n const compiler = webpack(this.global.webpackConfig);\n compiler.outputFileSystem = this.global.webpackOutputFs;\n return new Promise((done, fail) => {\n compiler.run((err, stats) => {\n if (err) fail(err);\n if (stats.hasErrors()) {\n console.error(stats.toJson().errors);\n fail(Error('Webpack compilation failed'));\n }\n\n this.global.webpackStats = stats.toJson();\n\n // Keeps reference to the raw Webpack stats object, which should be\n // explicitly passed to the server-side renderer alongside the request,\n // so that it can to pick up asset paths for different named chunks.\n this.webpackStats = stats;\n\n done();\n });\n });\n }\n\n async runSsr() {\n let options = this.pragmas['ssr-options'];\n options = options ? JSON.parse(options) : {};\n\n // TODO: This is temporary to shortcut the logging added to SSR.\n if (options.logger === undefined) {\n options.logger = {\n debug: noop,\n info: noop,\n log: noop,\n warn: noop,\n };\n }\n\n let root;\n switch (options.root) {\n case 'TEST': root = this.testFolder; break;\n default: root = process.cwd();\n }\n\n // Note: This enables Babel transformation for the code dynamically loaded\n // below, as the usual Jest Babel setup does not seem to apply to\n // the environment code, and imports from it.\n register({\n envName: options.babelEnv,\n extensions: ['.js', '.jsx', '.svg'],\n root,\n });\n\n if (!options.buildInfo) options.buildInfo = this.global.buildInfo;\n\n if (options.entry) {\n const p = path.resolve(this.testFolder, options.entry);\n options.Application = require(p)[options.entryExportName || 'default'];\n }\n\n const renderer = ssrFactory(this.global.webpackConfig, options);\n let status = 200; // OK\n const markup = await new Promise((done, fail) => {\n renderer(\n this.ssrRequest,\n\n // TODO: This will do for now, with the current implementation of\n // the renderer, but it will require a rework once the renderer is\n // updated to do streaming.\n {\n cookie: noop,\n send: done,\n set: noop,\n status: (value) => {\n status = value;\n },\n\n // This is how up-to-date Webpack stats are passed to the server in\n // development mode, and we use this here always, instead of having\n // to pass some information via filesystem.\n locals: {\n webpack: {\n devMiddleware: {\n stats: this.webpackStats,\n },\n },\n },\n },\n\n (error) => {\n if (error) fail(error);\n else done('');\n },\n );\n });\n\n this.global.ssrMarkup = markup;\n this.global.ssrOptions = options;\n this.global.ssrStatus = status;\n }\n\n constructor(config, context) {\n const pragmas = context.docblockPragmas;\n let request = pragmas['ssr-request'];\n request = request ? JSON.parse(request) : {};\n if (!request.url) request.url = '/';\n request.csrfToken = noop;\n\n // This ensures the initial JsDom URL matches the value we use for SSR.\n set(\n config.projectConfig,\n 'testEnvironmentOptions.url',\n `http://localhost${request.url}`,\n );\n\n super(config, context);\n\n this.global.dom = this.dom;\n this.global.webpackOutputFs = createFsFromVolume(new Volume());\n\n // Extracts necessary settings from config and context.\n const { projectConfig } = config;\n this.rootDir = projectConfig.rootDir;\n this.testFolder = path.dirname(context.testPath);\n this.withSsr = !pragmas['no-ssr'];\n this.ssrRequest = request;\n this.pragmas = pragmas;\n }\n\n async setup() {\n await super.setup();\n await this.runWebpack();\n if (this.withSsr) await this.runSsr();\n this.global.REACT_UTILS_FORCE_CLIENT_SIDE = true;\n }\n\n async teardown() {\n delete this.global.REACT_UTILS_FORCE_CLIENT_SIDE;\n\n // Resets module cache and @babel/register. Effectively this ensures that\n // the next time an instance of this environment is set up, all modules are\n // transformed by Babel from scratch, thus taking into account the latest\n // Babel config (which may change between different environment instances,\n // which does not seem to be taken into account by Babel / Node caches\n // automatically).\n Object.keys(require.cache).forEach((key) => {\n delete require.cache[key];\n });\n register.revert();\n super.teardown();\n }\n}\n"],"mappings":"gLAiBA,kDACA,0EAEA,8BAKA,iEACA,oFACA,4BACA,wDA5BA;AACA;AACA;AACA;AACA;AACA,G,CACA,8D,CAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAOA;AACA;AACA,sD,CAKA,qDAEe,KAAMA,UAAN,QAAwBC,8BAAS,CAC9C;AACF;AACA;AACA,KACEC,iBAAiB,EAAG,CAClB,GAAIC,QAAO,CAAG,KAAKC,OAAL,CAAa,wBAAb,CAAd,CACAD,OAAO,CAAGA,OAAO,CAAGE,IAAI,CAACC,KAAL,CAAWH,OAAX,CAAH,CAAyB,EAA1C,CACA,GAAAI,gBAAA,EAASJ,OAAT,CAAkB,CAChBK,OAAO,CAAE,KAAKC,UADE,CAEhBC,EAAE,CAAE,KAAKC,MAAL,CAAYC,eAFA,CAAlB,EAKA,GAAIC,QAAO,CAAG,KAAKT,OAAL,CAAa,wBAAb,GAA0C,EAAxD,CACAS,OAAO,CAAGC,OAAO,CAACC,aAAA,CAAKC,OAAL,CAAa,KAAKC,OAAlB,CAA2BJ,OAA3B,CAAD,CAAjB,CACA,KAAKF,MAAL,CAAYO,aAAZ,CAA4BL,OAAO,CAACV,OAAD,CAAnC,CAEA,KAAMO,GAAE,CAAG,KAAKC,MAAL,CAAYC,eAAvB,CACA,GAAIO,UAAS,CAAI,GAAEhB,OAAO,CAACK,OAAQ,cAAnC,CACA,GAAIE,EAAE,CAACU,UAAH,CAAcD,SAAd,CAAJ,CAA8B,CAC5BA,SAAS,CAAGT,EAAE,CAACW,YAAH,CAAgBF,SAAhB,CAA2B,MAA3B,CAAZ,CACA,KAAKR,MAAL,CAAYQ,SAAZ,CAAwBd,IAAI,CAACC,KAAL,CAAWa,SAAX,CACzB,CACF,CAED;AACF;AACA;AACA,KACkB,KAAVG,WAAU,EAAG,CACjB,KAAKpB,iBAAL,GAEA,KAAMqB,SAAQ,CAAG,GAAAC,gBAAA,EAAQ,KAAKb,MAAL,CAAYO,aAApB,CAAjB,CACAK,QAAQ,CAACE,gBAAT,CAA4B,KAAKd,MAAL,CAAYC,eAAxC,CACA,MAAO,IAAIc,QAAJ,CAAY,CAACC,IAAD,CAAOC,IAAP,GAAgB,CACjCL,QAAQ,CAACM,GAAT,CAAa,CAACC,GAAD,CAAMC,KAAN,GAAgB,CAC3B,GAAID,GAAJ,CAASF,IAAI,CAACE,GAAD,CAAJ,CACT,GAAIC,KAAK,CAACC,SAAN,EAAJ,CAAuB,CACrBC,OAAO,CAACC,KAAR,CAAcH,KAAK,CAACI,MAAN,GAAeC,MAA7B,EACAR,IAAI,CAACS,KAAK,CAAC,4BAAD,CAAN,CACL,CAED,KAAK1B,MAAL,CAAY2B,YAAZ,CAA2BP,KAAK,CAACI,MAAN,EAA3B,CAEA;AACA;AACA;AACA,KAAKG,YAAL,CAAoBP,KAApB,CAEAJ,IAAI,EACL,CAfD,CAgBD,CAjBM,CAkBR,CAEW,KAANY,OAAM,EAAG,CACb,GAAIpC,QAAO,CAAG,KAAKC,OAAL,CAAa,aAAb,CAAd,CACAD,OAAO,CAAGA,OAAO,CAAGE,IAAI,CAACC,KAAL,CAAWH,OAAX,CAAH,CAAyB,EAA1C,CAEA;AACA,GAAIA,OAAO,CAACqC,MAAR,GAAmBC,SAAvB,CAAkC,CAChCtC,OAAO,CAACqC,MAAR,CAAiB,CACfE,KAAK,CAAEC,YADQ,CAEfC,IAAI,CAAED,YAFS,CAGfE,GAAG,CAAEF,YAHU,CAIfG,IAAI,CAAEH,YAJS,CAMlB,CAED,GAAII,KAAJ,CACA,OAAQ5C,OAAO,CAAC4C,IAAhB,EACE,IAAK,MAAL,CAAaA,IAAI,CAAG,KAAKtC,UAAZ,CAAwB,MACrC,QAASsC,IAAI,CAAGC,OAAO,CAACC,GAAR,EAAP,CAFX,CAKA;AACA;AACA;AACA,GAAAC,iBAAA,EAAS,CACPC,OAAO,CAAEhD,OAAO,CAACiD,QADV,CAEPC,UAAU,CAAE,CAAC,KAAD,CAAQ,MAAR,CAAgB,MAAhB,CAFL,CAGPN,IAHO,CAAT,EAMA,GAAI,CAAC5C,OAAO,CAACgB,SAAb,CAAwBhB,OAAO,CAACgB,SAAR,CAAoB,KAAKR,MAAL,CAAYQ,SAAhC,CAExB,GAAIhB,OAAO,CAACmD,KAAZ,CAAmB,CACjB,KAAMC,EAAC,CAAGxC,aAAA,CAAKC,OAAL,CAAa,KAAKP,UAAlB,CAA8BN,OAAO,CAACmD,KAAtC,CAAV,CACAnD,OAAO,CAACqD,WAAR,CAAsB1C,OAAO,CAACyC,CAAD,CAAP,CAAWpD,OAAO,CAACsD,eAAR,EAA2B,SAAtC,CACvB,CAED,KAAMC,SAAQ,CAAG,GAAAC,iBAAA,EAAW,KAAKhD,MAAL,CAAYO,aAAvB,CAAsCf,OAAtC,CAAjB,CACA,GAAIyD,OAAM,CAAG,GAAb,CAAkB;AAClB,KAAMC,OAAM,CAAG,KAAM,IAAInC,QAAJ,CAAY,CAACC,IAAD,CAAOC,IAAP,GAAgB,CAC/C8B,QAAQ,CACN,KAAKI,UADC,CAGN;AACA;AACA;AACA,CACEC,MAAM,CAAEpB,YADV,CAEEqB,IAAI,CAAErC,IAFR,CAGEsC,GAAG,CAAEtB,YAHP,CAIEiB,MAAM,CAAGM,KAAD,EAAW,CACjBN,MAAM,CAAGM,KACV,CANH,CAQE;AACA;AACA;AACAC,MAAM,CAAE,CACN3C,OAAO,CAAE,CACP4C,aAAa,CAAE,CACbrC,KAAK,CAAE,KAAKO,YADC,CADR,CADH,CAXV,CANM,CA0BLJ,KAAD,EAAW,CACT,GAAIA,KAAJ,CAAWN,IAAI,CAACM,KAAD,CAAJ,CAAX,IACKP,KAAI,CAAC,EAAD,CACV,CA7BK,CA+BT,CAhCoB,CAArB,CAkCA,KAAKhB,MAAL,CAAY0D,SAAZ,CAAwBR,MAAxB,CACA,KAAKlD,MAAL,CAAY2D,UAAZ,CAAyBnE,OAAzB,CACA,KAAKQ,MAAL,CAAY4D,SAAZ,CAAwBX,MACzB,CAEDY,WAAW,CAACC,MAAD,CAASjE,OAAT,CAAkB,CAC3B,KAAMJ,QAAO,CAAGI,OAAO,CAACkE,eAAxB,CACA,GAAIC,QAAO,CAAGvE,OAAO,CAAC,aAAD,CAArB,CACAuE,OAAO,CAAGA,OAAO,CAAGtE,IAAI,CAACC,KAAL,CAAWqE,OAAX,CAAH,CAAyB,EAA1C,CACA,GAAI,CAACA,OAAO,CAACC,GAAb,CAAkBD,OAAO,CAACC,GAAR,CAAc,GAAd,CAClBD,OAAO,CAACE,SAAR,CAAoBlC,YAApB,CAEA;AACA,GAAAsB,WAAA,EACEQ,MAAM,CAACK,aADT,CAEE,4BAFF,CAGG,mBAAkBH,OAAO,CAACC,GAAI,EAHjC,EAMA,MAAMH,MAAN,CAAcjE,OAAd,EAEA,KAAKG,MAAL,CAAYoE,GAAZ,CAAkB,KAAKA,GAAvB,CACA,KAAKpE,MAAL,CAAYC,eAAZ,CAA8B,GAAAoE,yBAAA,EAAmB,GAAIC,cAAvB,CAA9B,CAEA;AACA,KAAM,CAAEH,aAAF,EAAoBL,MAA1B,CACA,KAAKxD,OAAL,CAAe6D,aAAa,CAAC7D,OAA7B,CACA,KAAKR,UAAL,CAAkBM,aAAA,CAAKmE,OAAL,CAAa1E,OAAO,CAAC2E,QAArB,CAAlB,CACA,KAAKC,OAAL,CAAe,CAAChF,OAAO,CAAC,QAAD,CAAvB,CACA,KAAK0D,UAAL,CAAkBa,OAAlB,CACA,KAAKvE,OAAL,CAAeA,OAChB,CAEU,KAALiF,MAAK,EAAG,CACZ,KAAM,OAAMA,KAAN,EAAN,CACA,KAAM,MAAK/D,UAAL,EAAN,CACA,GAAI,KAAK8D,OAAT,CAAkB,KAAM,MAAK7C,MAAL,EAAN,CAClB,KAAK5B,MAAL,CAAY2E,6BAAZ,CAA4C,IAC7C,CAEa,KAARC,SAAQ,EAAG,CACf,MAAO,MAAK5E,MAAL,CAAY2E,6BAAnB,CAEA;AACA;AACA;AACA;AACA;AACA;AACAE,MAAM,CAACC,IAAP,CAAY3E,OAAO,CAAC4E,KAApB,EAA2BC,OAA3B,CAAoCC,GAAD,EAAS,CAC1C,MAAO9E,QAAO,CAAC4E,KAAR,CAAcE,GAAd,CACR,CAFD,EAGA1C,iBAAA,CAAS2C,MAAT,GACA,MAAMN,QAAN,EACD,CApL6C,C"}
1
+ {"version":3,"file":"E2eSsrEnv.js","names":["E2eSsrEnv","JsdomEnv","loadWebpackConfig","options","pragmas","JSON","parse","defaults","context","testFolder","fs","global","webpackOutputFs","factory","require","path","resolve","rootDir","webpackConfig","buildInfo","existsSync","readFileSync","runWebpack","compiler","webpack","outputFileSystem","Promise","done","fail","run","err","stats","hasErrors","console","error","toJson","errors","Error","webpackStats","runSsr","logger","undefined","debug","noop","info","log","warn","root","process","cwd","register","envName","babelEnv","extensions","entry","p","Application","entryExportName","renderer","ssrFactory","status","markup","ssrRequest","cookie","send","set","value","locals","devMiddleware","ssrMarkup","ssrOptions","ssrStatus","constructor","config","docblockPragmas","request","url","csrfToken","projectConfig","dom","createFsFromVolume","Volume","dirname","testPath","withSsr","setup","REACT_UTILS_FORCE_CLIENT_SIDE","teardown","Object","keys","cache","forEach","key","revert"],"sources":["../../../../../src/shared/utils/jest/E2eSsrEnv.js"],"sourcesContent":["/**\n * Jest environment for end-to-end SSR and client-side testing. It relies on\n * the standard react-utils mechanics to execute SSR of given scene, and also\n * Webpack build of the code for client-side execution, it further exposes\n * Jsdom environment for the client-side testing of the outcomes.\n */\n/* eslint-disable global-require, import/no-dynamic-require */\n\n// BEWARE: The module is not imported into the JU module / the main assembly of\n// the library, because doing so easily breaks stuff:\n// 1) This module depends on Node-specific modules, which would make JU\n// incompatible with JsDom if included into JU.\n// 2) If this module is weakly imported from somewhere else in the lib,\n// it seems to randomly break tests using it for a different reason,\n// probably some sort of a require-loop, or some issues with weak\n// require in that scenario.\n\nimport path from 'path';\nimport ssrFactory from 'server/renderer';\n\nimport { defaults, noop, set } from 'lodash';\n\n// As this environment is a part of the Jest testing utils,\n// we assume development dependencies are available when it is used.\n/* eslint-disable import/no-extraneous-dependencies */\nimport register from '@babel/register';\nimport JsdomEnv from 'jest-environment-jsdom';\nimport { createFsFromVolume, Volume } from 'memfs';\nimport webpack from 'webpack';\n/* eslint-enable import/no-extraneous-dependencies */\n\nexport default class E2eSsrEnv extends JsdomEnv {\n /**\n * Loads Webpack config, and exposes it to the environment via global\n * webpackConfig object.\n */\n loadWebpackConfig() {\n let options = this.pragmas['webpack-config-options'];\n options = options ? JSON.parse(options) : {};\n defaults(options, {\n context: this.testFolder,\n fs: this.global.webpackOutputFs,\n });\n\n let factory = this.pragmas['webpack-config-factory'] || '';\n factory = require(path.resolve(this.rootDir, factory));\n this.global.webpackConfig = factory(options);\n\n const fs = this.global.webpackOutputFs;\n let buildInfo = `${options.context}/.build-info`;\n if (fs.existsSync(buildInfo)) {\n buildInfo = fs.readFileSync(buildInfo, 'utf8');\n this.global.buildInfo = JSON.parse(buildInfo);\n }\n }\n\n /**\n * Executes Webpack build.\n * @return {Promise}\n */\n async runWebpack() {\n this.loadWebpackConfig();\n\n const compiler = webpack(this.global.webpackConfig);\n compiler.outputFileSystem = this.global.webpackOutputFs;\n return new Promise((done, fail) => {\n compiler.run((err, stats) => {\n if (err) fail(err);\n if (stats.hasErrors()) {\n console.error(stats.toJson().errors);\n fail(Error('Webpack compilation failed'));\n }\n\n this.global.webpackStats = stats.toJson();\n\n // Keeps reference to the raw Webpack stats object, which should be\n // explicitly passed to the server-side renderer alongside the request,\n // so that it can to pick up asset paths for different named chunks.\n this.webpackStats = stats;\n\n done();\n });\n });\n }\n\n async runSsr() {\n let options = this.pragmas['ssr-options'];\n options = options ? JSON.parse(options) : {};\n\n // TODO: This is temporary to shortcut the logging added to SSR.\n if (options.logger === undefined) {\n options.logger = {\n debug: noop,\n info: noop,\n log: noop,\n warn: noop,\n };\n }\n\n let root;\n switch (options.root) {\n case 'TEST': root = this.testFolder; break;\n default: root = process.cwd();\n }\n\n // Note: This enables Babel transformation for the code dynamically loaded\n // below, as the usual Jest Babel setup does not seem to apply to\n // the environment code, and imports from it.\n register({\n envName: options.babelEnv,\n extensions: ['.js', '.jsx', '.svg'],\n root,\n });\n\n if (!options.buildInfo) options.buildInfo = this.global.buildInfo;\n\n if (options.entry) {\n const p = path.resolve(this.testFolder, options.entry);\n options.Application = require(p)[options.entryExportName || 'default'];\n }\n\n const renderer = ssrFactory(this.global.webpackConfig, options);\n let status = 200; // OK\n const markup = await new Promise((done, fail) => {\n renderer(\n this.ssrRequest,\n\n // TODO: This will do for now, with the current implementation of\n // the renderer, but it will require a rework once the renderer is\n // updated to do streaming.\n {\n cookie: noop,\n send: done,\n set: noop,\n status: (value) => {\n status = value;\n },\n\n // This is how up-to-date Webpack stats are passed to the server in\n // development mode, and we use this here always, instead of having\n // to pass some information via filesystem.\n locals: {\n webpack: {\n devMiddleware: {\n stats: this.webpackStats,\n },\n },\n },\n },\n\n (error) => {\n if (error) fail(error);\n else done('');\n },\n );\n });\n\n this.global.ssrMarkup = markup;\n this.global.ssrOptions = options;\n this.global.ssrStatus = status;\n }\n\n constructor(config, context) {\n const pragmas = context.docblockPragmas;\n let request = pragmas['ssr-request'];\n request = request ? JSON.parse(request) : {};\n if (!request.url) request.url = '/';\n request.csrfToken = noop;\n\n // This ensures the initial JsDom URL matches the value we use for SSR.\n set(\n config.projectConfig,\n 'testEnvironmentOptions.url',\n `http://localhost${request.url}`,\n );\n\n super(config, context);\n\n this.global.dom = this.dom;\n this.global.webpackOutputFs = createFsFromVolume(new Volume());\n\n // Extracts necessary settings from config and context.\n const { projectConfig } = config;\n this.rootDir = projectConfig.rootDir;\n this.testFolder = path.dirname(context.testPath);\n this.withSsr = !pragmas['no-ssr'];\n this.ssrRequest = request;\n this.pragmas = pragmas;\n }\n\n async setup() {\n await super.setup();\n await this.runWebpack();\n if (this.withSsr) await this.runSsr();\n this.global.REACT_UTILS_FORCE_CLIENT_SIDE = true;\n }\n\n async teardown() {\n delete this.global.REACT_UTILS_FORCE_CLIENT_SIDE;\n\n // Resets module cache and @babel/register. Effectively this ensures that\n // the next time an instance of this environment is set up, all modules are\n // transformed by Babel from scratch, thus taking into account the latest\n // Babel config (which may change between different environment instances,\n // which does not seem to be taken into account by Babel / Node caches\n // automatically).\n Object.keys(require.cache).forEach((key) => {\n delete require.cache[key];\n });\n register.revert();\n super.teardown();\n }\n}\n"],"mappings":"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"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["global","IS_REACT_ACT_ENVIRONMENT","originalProcessVersions","process","versions","mockClientSide","Object","defineProperty","value","unmockClientSide","writable","getMockUuid","seed","x","toString","padStart","slice","mockTimer","time","mockdate","set","Date","now","jest","advanceTimersByTime","mount","scene","root","res","document","createElement","body","appendChild","destroy","act","unmount","remove","createRoot","render","component","Renderer","create","toJSON","shallowRender","renderer","ShallowRenderer","getRenderOutput","shallowSnapshot","expect","toMatchSnapshot","snapshot","simulate","TU","Simulate"],"sources":["../../../../../src/shared/utils/jest/index.jsx"],"sourcesContent":["/* global expect, jest, document */\n/* eslint-disable import/no-extraneous-dependencies */\n\nimport mockdate from 'mockdate';\nimport { createRoot } from 'react-dom/client';\nimport TU, { act } from 'react-dom/test-utils';\n\n/* eslint-disable import/no-extraneous-dependencies */\nimport Renderer from 'react-test-renderer';\nimport ShallowRenderer from 'react-test-renderer/shallow';\n/* eslint-enable import/no-extraneous-dependencies */\n\n/**\n * An alias for [act(..)](https://reactjs.org/docs/test-utils.html#act)\n * from `react-dom/test-utils`.\n * @param {function} action\n */\nexport { act };\n\nglobal.IS_REACT_ACT_ENVIRONMENT = true;\n\nconst originalProcessVersions = process.versions;\n\n/**\n * Tricks **react-utils** into thinking the test is running within client-side\n * (browser) environment.\n */\nexport function mockClientSide() {\n Object.defineProperty(process, 'versions', { value: null });\n}\n\n/**\n * Reverts the effect of {@link module:JU.mockClientSide mockClientSide(..)}.\n */\nexport function unmockClientSide() {\n Object.defineProperty(process, 'versions', {\n value: originalProcessVersions,\n writable: false,\n });\n}\n\n/**\n * Generates a mock UUID, or better said it determenistically transforms given\n * `seed` number into a UUID-formatted string.\n * @param {number} seed\n * @return {string}\n */\nexport function getMockUuid(seed = 0) {\n const x = seed.toString(16).padStart(32, '0');\n return `${x.slice(0, 8)}-${x.slice(8, 12)}-${x.slice(12, 16)}-${x.slice(16, 20)}-${x.slice(20)}`;\n}\n\n/**\n * Advances mock timers, and mock date by the specified time.\n * @param {number} time Time step [ms].\n * @returns {Promise} Wait for this to \"jump after\" any async code which should\n * be executed because of the mock time movement.\n */\nexport async function mockTimer(time) {\n mockdate.set(time + Date.now());\n jest.advanceTimersByTime(time);\n}\n\n/**\n * Mounts `scene` to the DOM, and returns the root scene element.\n * @param {React.ReactNode} scene\n * @return {HTMLElement} Created container DOM element with destroy() function\n * attached.\n */\nexport function mount(scene) {\n let root;\n const res = document.createElement('div');\n document.body.appendChild(res);\n res.destroy = () => {\n act(() => root.unmount());\n res.remove();\n };\n act(() => {\n root = createRoot(res);\n root.render(scene);\n });\n return res;\n}\n\n/* OLD STUFF BELOW THIS MARK */\n\n/**\n * Renders provided ReactJS component into JSON representation of the component\n * tree, using [`react-test-renderer`](https://www.npmjs.com/package/react-test-renderer).\n * @param {object} component ReactJS component to render.\n * @return {object} JSON representation of the rendered tree.\n * @example\n * import { JU } from '@dr.pogodin/react-utils';\n * console.log(JU.render(<div>Example</div>));\n */\nexport function render(component) {\n return Renderer.create(component).toJSON();\n}\n\n/**\n * Generates a shallow render of given ReactJS component, using\n * [react-test-renderer/shallow](https://reactjs.org/docs/shallow-renderer.html)\n * and returns the result.\n * @param {object} component ReactJS component to render.\n * @return {object} JSON representation of the shallow component's render tree.\n */\nexport function shallowRender(component) {\n const renderer = new ShallowRenderer();\n renderer.render(component);\n return renderer.getRenderOutput();\n}\n\n/**\n * Makes a shallow snapshot test of the given ReactJS component, and also\n * returns JSON representation of the rendered component tree. Under the hood\n * it uses {@link module:JU.shallowRender shallowRender(..)} to generate\n * the render, then executes `expect(RENDER_RESULT).toMatchSnapshot()`,\n * and finally returns the `RENDER_RESULT` to the caller.\n * @param {object} component ReactJS component to render.\n * @return {object} JSON representation of shallow render.\n */\nexport function shallowSnapshot(component) {\n const res = shallowRender(component);\n expect(res).toMatchSnapshot();\n return res;\n}\n\n/**\n * Makes snapshot test of the given ReactJS component, and also returns JSON\n * representation of the rendered component tree. Under the hood, it uses\n * {@link module:JU.render render(..)} to render it, then executes\n * `expect(RENDER_RESULT).toMatchSnapshot()`, and then returns `RENDER_RESULT`.\n * @param {object} component ReactJS component to render.\n * @return {object} JSON render of the component.\n */\nexport function snapshot(component) {\n const res = render(component);\n expect(res).toMatchSnapshot();\n return res;\n}\n\nexport const simulate = TU.Simulate;\n"],"mappings":"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"}
1
+ {"version":3,"file":"index.js","names":["global","IS_REACT_ACT_ENVIRONMENT","originalProcessVersions","process","versions","mockClientSide","Object","defineProperty","value","unmockClientSide","writable","getMockUuid","seed","x","toString","padStart","slice","mockTimer","time","mockdate","set","Date","now","jest","advanceTimersByTime","mount","scene","root","res","document","createElement","body","appendChild","destroy","act","unmount","remove","createRoot","render","component","Renderer","create","toJSON","shallowRender","renderer","ShallowRenderer","getRenderOutput","shallowSnapshot","expect","toMatchSnapshot","snapshot","simulate","TU","Simulate"],"sources":["../../../../../src/shared/utils/jest/index.jsx"],"sourcesContent":["/* global expect, jest, document */\n/* eslint-disable import/no-extraneous-dependencies */\n\nimport mockdate from 'mockdate';\nimport { createRoot } from 'react-dom/client';\nimport TU, { act } from 'react-dom/test-utils';\n\n/* eslint-disable import/no-extraneous-dependencies */\nimport Renderer from 'react-test-renderer';\nimport ShallowRenderer from 'react-test-renderer/shallow';\n/* eslint-enable import/no-extraneous-dependencies */\n\n/**\n * An alias for [act(..)](https://reactjs.org/docs/test-utils.html#act)\n * from `react-dom/test-utils`.\n * @param {function} action\n */\nexport { act };\n\nglobal.IS_REACT_ACT_ENVIRONMENT = true;\n\nconst originalProcessVersions = process.versions;\n\n/**\n * Tricks **react-utils** into thinking the test is running within client-side\n * (browser) environment.\n */\nexport function mockClientSide() {\n Object.defineProperty(process, 'versions', { value: null });\n}\n\n/**\n * Reverts the effect of {@link module:JU.mockClientSide mockClientSide(..)}.\n */\nexport function unmockClientSide() {\n Object.defineProperty(process, 'versions', {\n value: originalProcessVersions,\n writable: false,\n });\n}\n\n/**\n * Generates a mock UUID, or better said it determenistically transforms given\n * `seed` number into a UUID-formatted string.\n * @param {number} seed\n * @return {string}\n */\nexport function getMockUuid(seed = 0) {\n const x = seed.toString(16).padStart(32, '0');\n return `${x.slice(0, 8)}-${x.slice(8, 12)}-${x.slice(12, 16)}-${x.slice(16, 20)}-${x.slice(20)}`;\n}\n\n/**\n * Advances mock timers, and mock date by the specified time.\n * @param {number} time Time step [ms].\n * @returns {Promise} Wait for this to \"jump after\" any async code which should\n * be executed because of the mock time movement.\n */\nexport async function mockTimer(time) {\n mockdate.set(time + Date.now());\n jest.advanceTimersByTime(time);\n}\n\n/**\n * Mounts `scene` to the DOM, and returns the root scene element.\n * @param {React.ReactNode} scene\n * @return {HTMLElement} Created container DOM element with destroy() function\n * attached.\n */\nexport function mount(scene) {\n let root;\n const res = document.createElement('div');\n document.body.appendChild(res);\n res.destroy = () => {\n act(() => root.unmount());\n res.remove();\n };\n act(() => {\n root = createRoot(res);\n root.render(scene);\n });\n return res;\n}\n\n/* OLD STUFF BELOW THIS MARK */\n\n/**\n * Renders provided ReactJS component into JSON representation of the component\n * tree, using [`react-test-renderer`](https://www.npmjs.com/package/react-test-renderer).\n * @param {object} component ReactJS component to render.\n * @return {object} JSON representation of the rendered tree.\n * @example\n * import { JU } from '@dr.pogodin/react-utils';\n * console.log(JU.render(<div>Example</div>));\n */\nexport function render(component) {\n return Renderer.create(component).toJSON();\n}\n\n/**\n * Generates a shallow render of given ReactJS component, using\n * [react-test-renderer/shallow](https://reactjs.org/docs/shallow-renderer.html)\n * and returns the result.\n * @param {object} component ReactJS component to render.\n * @return {object} JSON representation of the shallow component's render tree.\n */\nexport function shallowRender(component) {\n const renderer = new ShallowRenderer();\n renderer.render(component);\n return renderer.getRenderOutput();\n}\n\n/**\n * Makes a shallow snapshot test of the given ReactJS component, and also\n * returns JSON representation of the rendered component tree. Under the hood\n * it uses {@link module:JU.shallowRender shallowRender(..)} to generate\n * the render, then executes `expect(RENDER_RESULT).toMatchSnapshot()`,\n * and finally returns the `RENDER_RESULT` to the caller.\n * @param {object} component ReactJS component to render.\n * @return {object} JSON representation of shallow render.\n */\nexport function shallowSnapshot(component) {\n const res = shallowRender(component);\n expect(res).toMatchSnapshot();\n return res;\n}\n\n/**\n * Makes snapshot test of the given ReactJS component, and also returns JSON\n * representation of the rendered component tree. Under the hood, it uses\n * {@link module:JU.render render(..)} to render it, then executes\n * `expect(RENDER_RESULT).toMatchSnapshot()`, and then returns `RENDER_RESULT`.\n * @param {object} component ReactJS component to render.\n * @return {object} JSON render of the component.\n */\nexport function snapshot(component) {\n const res = render(component);\n expect(res).toMatchSnapshot();\n return res;\n}\n\nexport const simulate = TU.Simulate;\n"],"mappings":"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"}
@@ -1 +1 @@
1
- {"version":3,"file":"splitComponent.js","names":["splitComponent","chunkName","getComponent","placeholder","children","props","createElement","CodeSplit"],"sources":["../../../../src/shared/utils/splitComponent.js"],"sourcesContent":["/* eslint-disable react/jsx-props-no-spreading */\n\nimport { createElement } from 'react';\n\nimport CodeSplit from 'components/CodeSplit';\n\n/**\n * Wraps a regular React component into a \"code splitting\" component,\n * i.e. all code used exclusively by that component and its sub-tree\n * will go into a separate, asynchronously loaded, code chunk for\n * the client-side.\n * @param {object} options\n * @param {string} options.chunkName\n * @param {function} options.getComponent\n * @param {React.Element} [options.placeholder]\n * @return {React.ElementType}\n */\nexport default function splitComponent({\n chunkName,\n getComponent,\n placeholder,\n}) {\n // eslint-disable-next-line react/prop-types\n return ({ children, ...props } = {}) => createElement(\n CodeSplit,\n {\n ...props,\n chunkName,\n getComponent,\n placeholder,\n },\n children,\n );\n}\n"],"mappings":"wLAEA,4BAEA,0EAJA,iD,CAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GACe,QAASA,eAAT,CAAwB,CACrCC,SADqC,CAErCC,YAFqC,CAGrCC,WAHqC,CAAxB,CAIZ,CACD;AACA,MAAO,CAAC,CAAEC,QAAF,CAAY,GAAGC,KAAf,EAAyB,EAA1B,gBAAiC,GAAAC,oBAAA,EACtCC,kBADsC,CAEtC,CACE,GAAGF,KADL,CAEEJ,SAFF,CAGEC,YAHF,CAIEC,WAJF,CAFsC,CAQtCC,QARsC,CAUzC"}
1
+ {"version":3,"file":"splitComponent.js","names":["splitComponent","chunkName","getComponent","placeholder","children","props","createElement","CodeSplit"],"sources":["../../../../src/shared/utils/splitComponent.js"],"sourcesContent":["/* eslint-disable react/jsx-props-no-spreading */\n\nimport { createElement } from 'react';\n\nimport CodeSplit from 'components/CodeSplit';\n\n/**\n * Wraps a regular React component into a \"code splitting\" component,\n * i.e. all code used exclusively by that component and its sub-tree\n * will go into a separate, asynchronously loaded, code chunk for\n * the client-side.\n * @param {object} options\n * @param {string} options.chunkName\n * @param {function} options.getComponent\n * @param {React.Element} [options.placeholder]\n * @return {React.ElementType}\n */\nexport default function splitComponent({\n chunkName,\n getComponent,\n placeholder,\n}) {\n // eslint-disable-next-line react/prop-types\n return ({ children, ...props } = {}) => createElement(\n CodeSplit,\n {\n ...props,\n chunkName,\n getComponent,\n placeholder,\n },\n children,\n );\n}\n"],"mappings":"wLAEA,4BAEA,0EAJA,kDAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GACe,QAASA,eAAc,CAAC,CACrCC,SAAS,CACTC,YAAY,CACZC,WACF,CAAC,CAAE,CACD;AACA,MAAO,CAAC,CAAEC,QAAQ,CAAE,GAAGC,KAAM,CAAC,CAAG,CAAC,CAAC,gBAAK,GAAAC,oBAAa,EACnDC,kBAAS,CACT,CACE,GAAGF,KAAK,CACRJ,SAAS,CACTC,YAAY,CACZC,WACF,CAAC,CACDC,QAAQ,CAEZ"}
@@ -1,4 +1,4 @@
1
- "use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;exports.timer=timer;var _dayjs=_interopRequireDefault(require("dayjs"));var _lodash=require("lodash");var _Barrier=require("./Barrier");/**
1
+ "use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;exports.timer=timer;exports.useCurrent=useCurrent;var _dayjs=_interopRequireDefault(require("dayjs"));var _lodash=require("lodash");var _react=require("react");var _reactGlobalState=require("@dr.pogodin/react-global-state");var _Barrier=require("./Barrier");/**
2
2
  * @static
3
3
  * @const SEC_MS
4
4
  * @desc One second, expressed in milliseconds (equals 1000 ms).
@@ -48,5 +48,24 @@
48
48
  * @return {Barrier} Resolves after the timeout. It has additional
49
49
  * .abort() method attached, which cancels the pending timer resolution
50
50
  * (without resolving or rejecting the barrier).
51
- */async function timer(timeout){const res=new _Barrier.Barrier;if(timeout>0){const id=setTimeout(res.resolve.bind(res),timeout);res.abort=()=>clearTimeout(id)}else{res.abort=_lodash.noop;res.resolve()}return res}_dayjs.default.timer=timer;var _default=_dayjs.default;exports.default=_default;
51
+ */async function timer(timeout){const res=new _Barrier.Barrier;if(timeout>0){const id=setTimeout(res.resolve.bind(res),timeout);res.abort=()=>clearTimeout(id)}else{res.abort=_lodash.noop;res.resolve()}return res}/**
52
+ * This react hook wraps Date.now() function in a SSR friendly way,
53
+ * ensuring that all calls to useCurrent() within the same render return
54
+ * exactly the same time (which is retrieved from Date.now() first, and
55
+ * then stored in the global state to be reused in all other calls), which
56
+ * is also passed and used in the first client side render, and then updated
57
+ * with a finite precision to avoid infinite re-rendering loops.
58
+ * @param {object} [options] Optional settings.
59
+ * @param {string} [options.globalStatePath="currentTime"] Global state path
60
+ * to keep the current time value.
61
+ * @param {number} [options.precision= 5 * time.SEC_MS] Current time precision.
62
+ * The hook won't update the current time stored in the global state unless it
63
+ * is different from Date.now() result by this number (in milliseconds).
64
+ * Default to 5 seconds.
65
+ * @param {boolean} [options.autorefresh=false] Set `true` to automatically
66
+ * refresh time stored in the global state with the given `precision` (and
67
+ * thus automatically re-rendering components dependent on this hook, or
68
+ * the global state with the period equal to the `precision`.
69
+ * @return {number} Unix timestamp in milliseconds.
70
+ */function useCurrent({autorefresh=false,globalStatePath="currentTime",precision=5*_dayjs.default.SEC_MS}={}){const[now,setter]=(0,_reactGlobalState.useGlobalState)(globalStatePath,Date.now);(0,_react.useEffect)(()=>{let timerId;const update=()=>{setter(old=>{const neu=Date.now();return Math.abs(neu-old)>precision?neu:old});if(autorefresh)timerId=setTimeout(update,precision)};update();return()=>{if(timerId)clearTimeout(timerId)}},[autorefresh,precision,setter]);return now}_dayjs.default.timer=timer;_dayjs.default.useCurrent=useCurrent;var _default=_dayjs.default;exports.default=_default;
52
71
  //# sourceMappingURL=time.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"time.js","names":["dayjs","SEC_MS","MIN_MS","HOUR_MS","DAY_MS","YEAR_MS","now","Date","timer","timeout","res","Barrier","id","setTimeout","resolve","bind","abort","clearTimeout","noop"],"sources":["../../../../src/shared/utils/time.js"],"sourcesContent":["import dayjs from 'dayjs';\nimport { noop } from 'lodash';\n\nimport { Barrier } from './Barrier';\n\n/**\n * @static\n * @const SEC_MS\n * @desc One second, expressed in milliseconds (equals 1000 ms).\n * @example\n * import { time } from '@dr.pogodin/react-utils';\n * console.log(time.SEC_MS); // Prints: 1000\n */\ndayjs.SEC_MS = 1000;\n\n/**\n * @static\n * @const MIN_MS\n * @desc One minute, expressed in milliseconds (equals 60 &times; `SEC_MS`).\n * @example\n * import { time } from '@dr.pogodin/react-utils';\n * console.log(time.MIN_MS); // Prints: 60000\n */\ndayjs.MIN_MS = 60 * dayjs.SEC_MS;\n\n/**\n * @static\n * @const HOUR_MS\n * @desc One hour, expressed in milliseconds (equals 60 &times; `MIN_MS`).\n * @example\n * import { time } from '@dr.pogodin/react-utils';\n * console.log(time.HOUR_MS); // Prints: 3600000\n */\ndayjs.HOUR_MS = 60 * dayjs.MIN_MS;\n\n/**\n * @static\n * @const DAY_MS\n * @desc One day, expressed in milliseconds (equals 24 &times; `HOUR_MS`).\n * @example\n * import { time } from '@dr.pogodin/react-utils';\n * console.log(time.DAY_MS); // Prints: 86400000\n */\ndayjs.DAY_MS = 24 * dayjs.HOUR_MS;\n\n/**\n * @static\n * @const YEAR_MS\n * @desc One year, expressed in milliseconds (equals 365 &times; `DAY_MS`,\n * thus a normal, non-leap year).\n * @example\n * import { time } from '@dr.pogodin/react-utils';\n * console.log(time.YEAR_MS); // Prints: 31536000000\n */\ndayjs.YEAR_MS = 365 * dayjs.DAY_MS;\n\n/**\n * @static\n * @func now\n * @desc Returns Unix timestamp [ms] (thus, it is just an alias for `Date.now`).\n * @return {number}\n * @example\n * import { time } from '@dr.pogodin/react-utils';\n * console.log(time.now()); // Prints the current timestamp, e.g. 1618608761000.\n */\ndayjs.now = Date.now;\n\n/**\n * Creates a Promise, which resolves after the given timeout.\n * @param {number} timeout Timeout [ms].\n * @return {Barrier} Resolves after the timeout. It has additional\n * .abort() method attached, which cancels the pending timer resolution\n * (without resolving or rejecting the barrier).\n */\nexport async function timer(timeout) {\n const res = new Barrier();\n if (timeout > 0) {\n const id = setTimeout(res.resolve.bind(res), timeout);\n res.abort = () => clearTimeout(id);\n } else {\n res.abort = noop;\n res.resolve();\n }\n return res;\n}\n\ndayjs.timer = timer;\n\nexport default dayjs;\n"],"mappings":"oMAAA,oDACA,8BAEA,kCAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GACAA,cAAA,CAAMC,MAAN,CAAe,IAAf,CAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GACAD,cAAA,CAAME,MAAN,CAAe,GAAKF,cAAA,CAAMC,MAA1B,CAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GACAD,cAAA,CAAMG,OAAN,CAAgB,GAAKH,cAAA,CAAME,MAA3B,CAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GACAF,cAAA,CAAMI,MAAN,CAAe,GAAKJ,cAAA,CAAMG,OAA1B,CAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GACAH,cAAA,CAAMK,OAAN,CAAgB,IAAML,cAAA,CAAMI,MAA5B,CAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GACAJ,cAAA,CAAMM,GAAN,CAAYC,IAAI,CAACD,GAAjB,CAEA;AACA;AACA;AACA;AACA;AACA;AACA,GACO,cAAeE,MAAf,CAAqBC,OAArB,CAA8B,CACnC,KAAMC,IAAG,CAAG,GAAIC,iBAAhB,CACA,GAAIF,OAAO,CAAG,CAAd,CAAiB,CACf,KAAMG,GAAE,CAAGC,UAAU,CAACH,GAAG,CAACI,OAAJ,CAAYC,IAAZ,CAAiBL,GAAjB,CAAD,CAAwBD,OAAxB,CAArB,CACAC,GAAG,CAACM,KAAJ,CAAY,IAAMC,YAAY,CAACL,EAAD,CAC/B,CAHD,IAGO,CACLF,GAAG,CAACM,KAAJ,CAAYE,YAAZ,CACAR,GAAG,CAACI,OAAJ,EACD,CACD,MAAOJ,IACR,CAEDV,cAAA,CAAMQ,KAAN,CAAcA,KAAd,C,aAEeR,c"}
1
+ {"version":3,"file":"time.js","names":["dayjs","SEC_MS","MIN_MS","HOUR_MS","DAY_MS","YEAR_MS","now","Date","timer","timeout","res","Barrier","id","setTimeout","resolve","bind","abort","clearTimeout","noop","useCurrent","autorefresh","globalStatePath","precision","setter","useGlobalState","useEffect","timerId","update","old","neu","Math","abs"],"sources":["../../../../src/shared/utils/time.js"],"sourcesContent":["import dayjs from 'dayjs';\nimport { noop } from 'lodash';\nimport { useEffect } from 'react';\n\nimport { useGlobalState } from '@dr.pogodin/react-global-state';\n\nimport { Barrier } from './Barrier';\n\n/**\n * @static\n * @const SEC_MS\n * @desc One second, expressed in milliseconds (equals 1000 ms).\n * @example\n * import { time } from '@dr.pogodin/react-utils';\n * console.log(time.SEC_MS); // Prints: 1000\n */\ndayjs.SEC_MS = 1000;\n\n/**\n * @static\n * @const MIN_MS\n * @desc One minute, expressed in milliseconds (equals 60 &times; `SEC_MS`).\n * @example\n * import { time } from '@dr.pogodin/react-utils';\n * console.log(time.MIN_MS); // Prints: 60000\n */\ndayjs.MIN_MS = 60 * dayjs.SEC_MS;\n\n/**\n * @static\n * @const HOUR_MS\n * @desc One hour, expressed in milliseconds (equals 60 &times; `MIN_MS`).\n * @example\n * import { time } from '@dr.pogodin/react-utils';\n * console.log(time.HOUR_MS); // Prints: 3600000\n */\ndayjs.HOUR_MS = 60 * dayjs.MIN_MS;\n\n/**\n * @static\n * @const DAY_MS\n * @desc One day, expressed in milliseconds (equals 24 &times; `HOUR_MS`).\n * @example\n * import { time } from '@dr.pogodin/react-utils';\n * console.log(time.DAY_MS); // Prints: 86400000\n */\ndayjs.DAY_MS = 24 * dayjs.HOUR_MS;\n\n/**\n * @static\n * @const YEAR_MS\n * @desc One year, expressed in milliseconds (equals 365 &times; `DAY_MS`,\n * thus a normal, non-leap year).\n * @example\n * import { time } from '@dr.pogodin/react-utils';\n * console.log(time.YEAR_MS); // Prints: 31536000000\n */\ndayjs.YEAR_MS = 365 * dayjs.DAY_MS;\n\n/**\n * @static\n * @func now\n * @desc Returns Unix timestamp [ms] (thus, it is just an alias for `Date.now`).\n * @return {number}\n * @example\n * import { time } from '@dr.pogodin/react-utils';\n * console.log(time.now()); // Prints the current timestamp, e.g. 1618608761000.\n */\ndayjs.now = Date.now;\n\n/**\n * Creates a Promise, which resolves after the given timeout.\n * @param {number} timeout Timeout [ms].\n * @return {Barrier} Resolves after the timeout. It has additional\n * .abort() method attached, which cancels the pending timer resolution\n * (without resolving or rejecting the barrier).\n */\nexport async function timer(timeout) {\n const res = new Barrier();\n if (timeout > 0) {\n const id = setTimeout(res.resolve.bind(res), timeout);\n res.abort = () => clearTimeout(id);\n } else {\n res.abort = noop;\n res.resolve();\n }\n return res;\n}\n\n/**\n * This react hook wraps Date.now() function in a SSR friendly way,\n * ensuring that all calls to useCurrent() within the same render return\n * exactly the same time (which is retrieved from Date.now() first, and\n * then stored in the global state to be reused in all other calls), which\n * is also passed and used in the first client side render, and then updated\n * with a finite precision to avoid infinite re-rendering loops.\n * @param {object} [options] Optional settings.\n * @param {string} [options.globalStatePath=\"currentTime\"] Global state path\n * to keep the current time value.\n * @param {number} [options.precision= 5 * time.SEC_MS] Current time precision.\n * The hook won't update the current time stored in the global state unless it\n * is different from Date.now() result by this number (in milliseconds).\n * Default to 5 seconds.\n * @param {boolean} [options.autorefresh=false] Set `true` to automatically\n * refresh time stored in the global state with the given `precision` (and\n * thus automatically re-rendering components dependent on this hook, or\n * the global state with the period equal to the `precision`.\n * @return {number} Unix timestamp in milliseconds.\n */\nexport function useCurrent({\n autorefresh = false,\n globalStatePath = 'currentTime',\n precision = 5 * dayjs.SEC_MS,\n} = {}) {\n const [now, setter] = useGlobalState(globalStatePath, Date.now);\n useEffect(() => {\n let timerId;\n const update = () => {\n setter((old) => {\n const neu = Date.now();\n return Math.abs(neu - old) > precision ? neu : old;\n });\n if (autorefresh) timerId = setTimeout(update, precision);\n };\n update();\n return () => {\n if (timerId) clearTimeout(timerId);\n };\n }, [autorefresh, precision, setter]);\n return now;\n}\n\ndayjs.timer = timer;\ndayjs.useCurrent = useCurrent;\n\nexport default dayjs;\n"],"mappings":"kOAAA,oDACA,8BACA,4BAEA,gEAEA,kCAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GACAA,cAAK,CAACC,MAAM,CAAG,IAAI,CAEnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GACAD,cAAK,CAACE,MAAM,CAAG,EAAE,CAAGF,cAAK,CAACC,MAAM,CAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GACAD,cAAK,CAACG,OAAO,CAAG,EAAE,CAAGH,cAAK,CAACE,MAAM,CAEjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GACAF,cAAK,CAACI,MAAM,CAAG,EAAE,CAAGJ,cAAK,CAACG,OAAO,CAEjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GACAH,cAAK,CAACK,OAAO,CAAG,GAAG,CAAGL,cAAK,CAACI,MAAM,CAElC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GACAJ,cAAK,CAACM,GAAG,CAAGC,IAAI,CAACD,GAAG,CAEpB;AACA;AACA;AACA;AACA;AACA;AACA,GACO,cAAeE,MAAK,CAACC,OAAO,CAAE,CACnC,KAAMC,IAAG,CAAG,GAAIC,iBAAS,CACzB,GAAIF,OAAO,CAAG,CAAC,CAAE,CACf,KAAMG,GAAE,CAAGC,UAAU,CAACH,GAAG,CAACI,OAAO,CAACC,IAAI,CAACL,GAAG,CAAC,CAAED,OAAO,CAAC,CACrDC,GAAG,CAACM,KAAK,CAAG,IAAMC,YAAY,CAACL,EAAE,CACnC,CAAC,IAAM,CACLF,GAAG,CAACM,KAAK,CAAGE,YAAI,CAChBR,GAAG,CAACI,OAAO,EACb,CACA,MAAOJ,IACT,CAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GACO,QAASS,WAAU,CAAC,CACzBC,WAAW,CAAG,KAAK,CACnBC,eAAe,CAAG,aAAa,CAC/BC,SAAS,CAAG,CAAC,CAAGtB,cAAK,CAACC,MACxB,CAAC,CAAG,CAAC,CAAC,CAAE,CACN,KAAM,CAACK,GAAG,CAAEiB,MAAM,CAAC,CAAG,GAAAC,gCAAc,EAACH,eAAe,CAAEd,IAAI,CAACD,GAAG,CAAC,CAC/D,GAAAmB,gBAAS,EAAC,IAAM,CACd,GAAIC,QAAO,CACX,KAAMC,OAAM,CAAG,IAAM,CACnBJ,MAAM,CAAEK,GAAG,EAAK,CACd,KAAMC,IAAG,CAAGtB,IAAI,CAACD,GAAG,EAAE,CACtB,MAAOwB,KAAI,CAACC,GAAG,CAACF,GAAG,CAAGD,GAAG,CAAC,CAAGN,SAAS,CAAGO,GAAG,CAAGD,GACjD,CAAC,CAAC,CACF,GAAIR,WAAW,CAAEM,OAAO,CAAGb,UAAU,CAACc,MAAM,CAAEL,SAAS,CACzD,CAAC,CACDK,MAAM,EAAE,CACR,MAAO,IAAM,CACX,GAAID,OAAO,CAAET,YAAY,CAACS,OAAO,CACnC,CACF,CAAC,CAAE,CAACN,WAAW,CAAEE,SAAS,CAAEC,MAAM,CAAC,CAAC,CACpC,MAAOjB,IACT,CAEAN,cAAK,CAACQ,KAAK,CAAGA,KAAK,CACnBR,cAAK,CAACmB,UAAU,CAAGA,UAAU,CAAC,aAEfnB,cAAK"}
@@ -1 +1 @@
1
- {"version":3,"file":"webpack.js","names":["requireWeak","modulePath","basePath","IS_CLIENT_SIDE","resolve","eval","path","default","def","named","Object","entries","forEach","key","value","Error","resolveWeak"],"sources":["../../../../src/shared/utils/webpack.js"],"sourcesContent":["import { IS_CLIENT_SIDE } from './isomorphy';\n\n/**\n * Requires the specified module without including it into the bundle during\n * Webpack build.\n * @param {string} modulePath\n * @param {string} [basePath]\n * @return {object} Required module.\n */\nexport function requireWeak(modulePath, basePath) {\n if (IS_CLIENT_SIDE) return null;\n\n try {\n /* eslint-disable no-eval */\n const { resolve } = eval('require')('path');\n const path = basePath ? resolve(basePath, modulePath) : modulePath;\n const { default: def, ...named } = eval('require')(path);\n /* eslint-enable no-eval */\n\n if (!def) return named;\n\n Object.entries(named).forEach(([key, value]) => {\n if (def[key]) throw Error('Conflict between default and named exports');\n def[key] = value;\n });\n return def;\n } catch {\n return null;\n }\n}\n\n/**\n * Resolves specified module path with help of Babel's module resolver.\n * Yes, the function itself just returns its argument to the caller, but Babel\n * is configured to resolve the first argument of resolveWeak(..) function, thus\n * the result will be the resolved path.\n * @param {string} modulePath\n * @return {string} Absolute or relative path to the module.\n */\nexport function resolveWeak(modulePath) {\n return modulePath;\n}\n"],"mappings":"sIAAA,sCAEA;AACA;AACA;AACA;AACA;AACA;AACA,GACO,QAASA,YAAT,CAAqBC,UAArB,CAAiCC,QAAjC,CAA2C,CAChD,GAAIC,yBAAJ,CAAoB,MAAO,KAAP,CAEpB,GAAI,CACF,4BACA,KAAM,CAAEC,OAAF,EAAcC,IAAI,CAAC,SAAD,CAAJ,CAAgB,MAAhB,CAApB,CACA,KAAMC,KAAI,CAAGJ,QAAQ,CAAGE,OAAO,CAACF,QAAD,CAAWD,UAAX,CAAV,CAAmCA,UAAxD,CACA,KAAM,CAAEM,OAAO,CAAEC,GAAX,CAAgB,GAAGC,KAAnB,EAA6BJ,IAAI,CAAC,SAAD,CAAJ,CAAgBC,IAAhB,CAAnC,CACA,2BAEA,GAAI,CAACE,GAAL,CAAU,MAAOC,MAAP,CAEVC,MAAM,CAACC,OAAP,CAAeF,KAAf,EAAsBG,OAAtB,CAA8B,CAAC,CAACC,GAAD,CAAMC,KAAN,CAAD,GAAkB,CAC9C,GAAIN,GAAG,CAACK,GAAD,CAAP,CAAc,KAAME,MAAK,CAAC,4CAAD,CAAX,CACdP,GAAG,CAACK,GAAD,CAAH,CAAWC,KACZ,CAHD,EAIA,MAAON,IACR,CAAC,KAAM,CACN,MAAO,KACR,CACF,CAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GACO,QAASQ,YAAT,CAAqBf,UAArB,CAAiC,CACtC,MAAOA,WACR"}
1
+ {"version":3,"file":"webpack.js","names":["requireWeak","modulePath","basePath","IS_CLIENT_SIDE","resolve","eval","path","default","def","named","Object","entries","forEach","key","value","Error","resolveWeak"],"sources":["../../../../src/shared/utils/webpack.js"],"sourcesContent":["import { IS_CLIENT_SIDE } from './isomorphy';\n\n/**\n * Requires the specified module without including it into the bundle during\n * Webpack build.\n * @param {string} modulePath\n * @param {string} [basePath]\n * @return {object} Required module.\n */\nexport function requireWeak(modulePath, basePath) {\n if (IS_CLIENT_SIDE) return null;\n\n try {\n /* eslint-disable no-eval */\n const { resolve } = eval('require')('path');\n const path = basePath ? resolve(basePath, modulePath) : modulePath;\n const { default: def, ...named } = eval('require')(path);\n /* eslint-enable no-eval */\n\n if (!def) return named;\n\n Object.entries(named).forEach(([key, value]) => {\n if (def[key]) throw Error('Conflict between default and named exports');\n def[key] = value;\n });\n return def;\n } catch {\n return null;\n }\n}\n\n/**\n * Resolves specified module path with help of Babel's module resolver.\n * Yes, the function itself just returns its argument to the caller, but Babel\n * is configured to resolve the first argument of resolveWeak(..) function, thus\n * the result will be the resolved path.\n * @param {string} modulePath\n * @return {string} Absolute or relative path to the module.\n */\nexport function resolveWeak(modulePath) {\n return modulePath;\n}\n"],"mappings":"sIAAA,sCAEA;AACA;AACA;AACA;AACA;AACA;AACA,GACO,QAASA,YAAW,CAACC,UAAU,CAAEC,QAAQ,CAAE,CAChD,GAAIC,yBAAc,CAAE,MAAO,KAAI,CAE/B,GAAI,CACF,4BACA,KAAM,CAAEC,OAAQ,CAAC,CAAGC,IAAI,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAC3C,KAAMC,KAAI,CAAGJ,QAAQ,CAAGE,OAAO,CAACF,QAAQ,CAAED,UAAU,CAAC,CAAGA,UAAU,CAClE,KAAM,CAAEM,OAAO,CAAEC,GAAG,CAAE,GAAGC,KAAM,CAAC,CAAGJ,IAAI,CAAC,SAAS,CAAC,CAACC,IAAI,CAAC,CACxD,2BAEA,GAAI,CAACE,GAAG,CAAE,MAAOC,MAAK,CAEtBC,MAAM,CAACC,OAAO,CAACF,KAAK,CAAC,CAACG,OAAO,CAAC,CAAC,CAACC,GAAG,CAAEC,KAAK,CAAC,GAAK,CAC9C,GAAIN,GAAG,CAACK,GAAG,CAAC,CAAE,KAAME,MAAK,CAAC,4CAA4C,CAAC,CACvEP,GAAG,CAACK,GAAG,CAAC,CAAGC,KACb,CAAC,CAAC,CACF,MAAON,IACT,CAAE,KAAM,CACN,MAAO,KACT,CACF,CAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GACO,QAASQ,YAAW,CAACf,UAAU,CAAE,CACtC,MAAOA,WACT"}
@@ -1,2 +1,2 @@
1
- a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{border:0;font:inherit;font-size:100%;margin:0;padding:0;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:"";content:none}table{border-collapse:collapse;border-spacing:0}body{text-rendering:auto}*{box-sizing:border-box}.zH52sA[disabled]{cursor:not-allowed}.E1FNQT,.KM0v4f.E1FNQT,._3jm1-Q._0plpDL.E1FNQT{background-image:linear-gradient(0deg,#d3d3d3,#fff 50%,#fff);border:1px solid gray;border-radius:.3em;color:inherit;cursor:pointer;display:inline-block;font:inherit;margin:.1em;padding:.3em 1.2em;text-align:center;text-decoration:none}.E1FNQT:visited,.KM0v4f.E1FNQT:visited,._3jm1-Q._0plpDL.E1FNQT:visited{color:inherit}.E1FNQT.MAe9O6,.E1FNQT:active,.KM0v4f.E1FNQT.MAe9O6,.KM0v4f.E1FNQT:active,._3jm1-Q._0plpDL.E1FNQT.MAe9O6,._3jm1-Q._0plpDL.E1FNQT:active{background-image:linear-gradient(180deg,#d3d3d3,#fff 50%,#fff);border-color:gray;box-shadow:inset 0 1px 3px 0 #d3d3d3}.E1FNQT:focus,.KM0v4f.E1FNQT:focus,._3jm1-Q._0plpDL.E1FNQT:focus{border-color:blue;box-shadow:0 0 3px 1px #add8e6;outline:none}.Br9IWV,.KM0v4f.Br9IWV,._3jm1-Q._0plpDL.Br9IWV{cursor:not-allowed;opacity:.33}.Br9IWV.MAe9O6,.Br9IWV:active,.KM0v4f.Br9IWV.MAe9O6,.KM0v4f.Br9IWV:active,._3jm1-Q._0plpDL.Br9IWV.MAe9O6,._3jm1-Q._0plpDL.Br9IWV:active{background-image:linear-gradient(0deg,#d3d3d3,#fff 50%,#fff);box-shadow:none}.A-f8qJ,.dNQcC6.A-f8qJ,.earXxa.qAPfQ6.A-f8qJ{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:#fff;border:1px solid gray;border-radius:.3em;cursor:pointer;font:inherit;height:1.5em;margin:0;outline:none;width:1.5em}.A-f8qJ:checked:after,.dNQcC6.A-f8qJ:checked:after,.earXxa.qAPfQ6.A-f8qJ:checked:after{background:#000;border-radius:.3em;content:"";display:block;height:1em;margin:.2em;width:1em}.A-f8qJ:focus,.dNQcC6.A-f8qJ:focus,.earXxa.qAPfQ6.A-f8qJ:focus{border-color:blue;box-shadow:0 0 3px 1px #add8e6}.Kr0g3M,.dNQcC6.Kr0g3M,.earXxa.qAPfQ6.Kr0g3M{align-items:center;display:inline-flex;margin:.1em}._3dML-O,.dNQcC6._3dML-O,.earXxa.qAPfQ6._3dML-O{margin:0 .6em 0 1.5em}.-zPK7Y,.D4XHG2.N3nd34.-zPK7Y,.haRIry.-zPK7Y{background-image:linear-gradient(0deg,#d3d3d3,#fff 50%,#fff);border:1px solid gray;border-radius:0 .3em .3em 0;padding:.3em .6em;pointer-events:none;position:absolute;right:0}.D4XHG2.N3nd34._9CQpeA,._9CQpeA,.haRIry._9CQpeA{align-items:center;display:inline-flex;margin:.1em;position:relative}:active+.-zPK7Y,:active+.D4XHG2.N3nd34.-zPK7Y,:active+.haRIry.-zPK7Y{background-image:linear-gradient(180deg,#d3d3d3,#fff 50%,#fff);border-bottom-right-radius:0}:focus+.-zPK7Y,:focus+.D4XHG2.N3nd34.-zPK7Y,:focus+.haRIry.-zPK7Y{border-color:blue blue blue gray}.D4XHG2.N3nd34.Gv0kyu,.Gv0kyu,.haRIry.Gv0kyu{margin:0 .6em 0 1.5em}.D4XHG2.N3nd34.RdW3yR,.RdW3yR,.haRIry.RdW3yR{display:none}.D4XHG2.N3nd34.JXK1uw,.JXK1uw,.haRIry.JXK1uw{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:#fff;border:1px solid gray;border-radius:.3em;color:inherit;cursor:pointer;display:inline-block;font:inherit;outline:none;padding:.3em 3.3em calc(.3em + 1px) 1.2em}.D4XHG2.N3nd34.JXK1uw:active,.JXK1uw:active,.haRIry.JXK1uw:active{background:#fff;border-bottom-left-radius:0;border-bottom-right-radius:0}.D4XHG2.N3nd34.JXK1uw:focus,.JXK1uw:focus,.haRIry.JXK1uw:focus{border-color:blue;box-shadow:0 0 3px 1px #add8e6}.Cxx397,.X5WszA.Cxx397,._8s7GCr.TVlBYc.Cxx397{align-items:center;display:inline-flex;margin:.1em}.M07d4s,.X5WszA.M07d4s,._8s7GCr.TVlBYc.M07d4s{border:1px solid gray;border-radius:.3em;cursor:text;font:inherit;outline:none;padding:.3em .3em calc(.3em + 1px)}.M07d4s:focus,.X5WszA.M07d4s:focus,._8s7GCr.TVlBYc.M07d4s:focus{border-color:blue;box-shadow:0 0 3px 1px #add8e6}.X5WszA.gfbdq-,._8s7GCr.TVlBYc.gfbdq-,.gfbdq-{margin:0 .6em 0 1.5em}.T3cuHB,.m3-mdC.J15Z4H.T3cuHB,.m4mL-M.T3cuHB{display:flex;min-height:100vh;overflow:hidden;width:100%}.m3-mdC.J15Z4H.pPlQO2,.m4mL-M.pPlQO2,.pPlQO2{overflow:hidden;padding:1.2em;width:1024px}.lqNh4h,.m3-mdC.J15Z4H.lqNh4h,.m4mL-M.lqNh4h{flex:1;overflow:hidden}.Ah-Nsc.Wki41G.ye2BZo,.Szmbbz.ye2BZo,.ye2BZo{background:#eee;height:100%;left:0;opacity:.8;position:fixed;top:0;width:100%;z-index:998}.Ah-Nsc.Wki41G.ye2BZo:focus,.Szmbbz.ye2BZo:focus,.ye2BZo:focus{outline:none}.Ah-Nsc.Wki41G.gyZ4rc,.Szmbbz.gyZ4rc,.gyZ4rc{background:#fff;border-radius:4;box-shadow:0 0 14px 1px rgba(38,38,40,.15);left:50%;max-height:95vh;max-width:1024px;overflow:hidden;padding:.6em 1.2em;position:fixed;top:50%;transform:translate(-50%,-50%);width:480px;z-index:999}@media(max-width:1280px){.Ah-Nsc.Wki41G.gyZ4rc,.Szmbbz.gyZ4rc,.gyZ4rc{max-width:95vw}}body.scrolling-disabled-by-modal{overflow:hidden}.EznFz3{position:relative;width:100%}._0vb7tq{height:100%;position:absolute;width:100%}.XIxe9o.YOyORH._7zdld4,._7zdld4,.uIObt7._7zdld4{display:inline-block}.XIxe9o.YOyORH.dBrB4g,.dBrB4g,.uIObt7.dBrB4g{-webkit-animation:TJe-6j .4s ease-in infinite alternate;animation:TJe-6j .4s ease-in infinite alternate;background:#000;border-radius:.3em;display:inline-block;height:.6em;margin:0 .1em;position:relative;width:.6em}@-webkit-keyframes TJe-6j{0%{top:-.3em}to{top:.3em}}@keyframes TJe-6j{0%{top:-.3em}to{top:.3em}}.XIxe9o.YOyORH.dBrB4g:first-child,.dBrB4g:first-child,.uIObt7.dBrB4g:first-child{-webkit-animation-delay:-.2s;animation-delay:-.2s}.XIxe9o.YOyORH.dBrB4g:last-child,.dBrB4g:last-child,.uIObt7.dBrB4g:last-child{-webkit-animation-delay:.2s;animation-delay:.2s}@-webkit-keyframes L4ubm-{0%{opacity:0}to{opacity:1}}@keyframes L4ubm-{0%{opacity:0}to{opacity:1}}.GdZucr.M9gywF,.M9gywF,._4xT7zE.zd-vnH.M9gywF{border:.6em solid gray;height:0;pointer-events:none;position:absolute;width:0}.GdZucr.f9gY8K,._4xT7zE.zd-vnH.f9gY8K,.f9gY8K{-webkit-animation:L4ubm- .6s;animation:L4ubm- .6s;background:gray;border-radius:.3em;color:#fff;display:inline-block;left:0;padding:0 .3em;position:absolute;top:0}.GdZucr._4qDBRM,._4qDBRM,._4xT7zE.zd-vnH._4qDBRM{display:inline-block}* .sXHM81,.r3ABzd.YKcPnR .sXHM81,.veKyYi .sXHM81{background:#f5f5f5}* .SlV2zw,.r3ABzd.YKcPnR .SlV2zw,.veKyYi .SlV2zw{height:100%;position:relative;width:100%}* .jTxmOX,._5a9XX1._7sH52O .jTxmOX,.dzIcLh .jTxmOX{position:absolute;text-align:center;top:40%;transform:translateY(50%);width:100%}
1
+ a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{border:0;font:inherit;font-size:100%;margin:0;padding:0;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:"";content:none}table{border-collapse:collapse;border-spacing:0}body{text-rendering:auto}*{box-sizing:border-box}.zH52sA[disabled]{cursor:not-allowed}.E1FNQT,.KM0v4f.E1FNQT,._3jm1-Q._0plpDL.E1FNQT{background-image:linear-gradient(0deg,#d3d3d3,#fff 50%,#fff);border:1px solid gray;border-radius:.3em;color:inherit;cursor:pointer;display:inline-block;font:inherit;margin:.1em;padding:.3em 1.2em;text-align:center;text-decoration:none}.E1FNQT:visited,.KM0v4f.E1FNQT:visited,._3jm1-Q._0plpDL.E1FNQT:visited{color:inherit}.E1FNQT.MAe9O6,.E1FNQT:active,.KM0v4f.E1FNQT.MAe9O6,.KM0v4f.E1FNQT:active,._3jm1-Q._0plpDL.E1FNQT.MAe9O6,._3jm1-Q._0plpDL.E1FNQT:active{background-image:linear-gradient(180deg,#d3d3d3,#fff 50%,#fff);border-color:gray;box-shadow:inset 0 1px 3px 0 #d3d3d3}.E1FNQT:focus,.KM0v4f.E1FNQT:focus,._3jm1-Q._0plpDL.E1FNQT:focus{border-color:blue;box-shadow:0 0 3px 1px #add8e6;outline:none}.Br9IWV,.KM0v4f.Br9IWV,._3jm1-Q._0plpDL.Br9IWV{cursor:not-allowed;opacity:.33}.Br9IWV.MAe9O6,.Br9IWV:active,.KM0v4f.Br9IWV.MAe9O6,.KM0v4f.Br9IWV:active,._3jm1-Q._0plpDL.Br9IWV.MAe9O6,._3jm1-Q._0plpDL.Br9IWV:active{background-image:linear-gradient(0deg,#d3d3d3,#fff 50%,#fff);box-shadow:none}.A-f8qJ,.dNQcC6.A-f8qJ,.earXxa.qAPfQ6.A-f8qJ{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:#fff;border:1px solid gray;border-radius:.3em;cursor:pointer;font:inherit;height:1.5em;margin:0;outline:none;width:1.5em}.A-f8qJ:checked:after,.dNQcC6.A-f8qJ:checked:after,.earXxa.qAPfQ6.A-f8qJ:checked:after{background:#000;border-radius:.3em;content:"";display:block;height:1em;margin:.2em;width:1em}.A-f8qJ:focus,.dNQcC6.A-f8qJ:focus,.earXxa.qAPfQ6.A-f8qJ:focus{border-color:blue;box-shadow:0 0 3px 1px #add8e6}.Kr0g3M,.dNQcC6.Kr0g3M,.earXxa.qAPfQ6.Kr0g3M{align-items:center;display:inline-flex;margin:.1em}._3dML-O,.dNQcC6._3dML-O,.earXxa.qAPfQ6._3dML-O{margin:0 .6em 0 1.5em}.-zPK7Y,.D4XHG2.N3nd34.-zPK7Y,.haRIry.-zPK7Y{background-image:linear-gradient(0deg,#d3d3d3,#fff 50%,#fff);border:1px solid gray;border-radius:0 .3em .3em 0;padding:.3em .6em;pointer-events:none;position:absolute;right:0}.D4XHG2.N3nd34._9CQpeA,._9CQpeA,.haRIry._9CQpeA{align-items:center;display:inline-flex;margin:.1em;position:relative}:active+.-zPK7Y,:active+.D4XHG2.N3nd34.-zPK7Y,:active+.haRIry.-zPK7Y{background-image:linear-gradient(180deg,#d3d3d3,#fff 50%,#fff);border-bottom-right-radius:0}:focus+.-zPK7Y,:focus+.D4XHG2.N3nd34.-zPK7Y,:focus+.haRIry.-zPK7Y{border-color:blue blue blue gray}.D4XHG2.N3nd34.Gv0kyu,.Gv0kyu,.haRIry.Gv0kyu{margin:0 .6em 0 1.5em}.D4XHG2.N3nd34.RdW3yR,.RdW3yR,.haRIry.RdW3yR{display:none}.D4XHG2.N3nd34.JXK1uw,.JXK1uw,.haRIry.JXK1uw{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:#fff;border:1px solid gray;border-radius:.3em;color:inherit;cursor:pointer;display:inline-block;font:inherit;outline:none;padding:.3em 3.3em calc(.3em + 1px) 1.2em}.D4XHG2.N3nd34.JXK1uw:active,.JXK1uw:active,.haRIry.JXK1uw:active{background:#fff;border-bottom-left-radius:0;border-bottom-right-radius:0}.D4XHG2.N3nd34.JXK1uw:focus,.JXK1uw:focus,.haRIry.JXK1uw:focus{border-color:blue;box-shadow:0 0 3px 1px #add8e6}.Cxx397,.X5WszA.Cxx397,._8s7GCr.TVlBYc.Cxx397{align-items:center;display:inline-flex;margin:.1em}.M07d4s,.X5WszA.M07d4s,._8s7GCr.TVlBYc.M07d4s{border:1px solid gray;border-radius:.3em;cursor:text;font:inherit;outline:none;padding:.3em .3em calc(.3em + 1px)}.M07d4s:focus,.X5WszA.M07d4s:focus,._8s7GCr.TVlBYc.M07d4s:focus{border-color:blue;box-shadow:0 0 3px 1px #add8e6}.X5WszA.gfbdq-,._8s7GCr.TVlBYc.gfbdq-,.gfbdq-{margin:0 .6em 0 1.5em}.T3cuHB,.m3-mdC.J15Z4H.T3cuHB,.m4mL-M.T3cuHB{display:flex;min-height:100vh;overflow:hidden;width:100%}.m3-mdC.J15Z4H.pPlQO2,.m4mL-M.pPlQO2,.pPlQO2{overflow:hidden;padding:1.2em;width:1024px}.lqNh4h,.m3-mdC.J15Z4H.lqNh4h,.m4mL-M.lqNh4h{flex:1;overflow:hidden}.Ah-Nsc.Wki41G.ye2BZo,.Szmbbz.ye2BZo,.ye2BZo{background:#eee;height:100%;left:0;opacity:.8;position:fixed;top:0;width:100%;z-index:998}.Ah-Nsc.Wki41G.ye2BZo:focus,.Szmbbz.ye2BZo:focus,.ye2BZo:focus{outline:none}.Ah-Nsc.Wki41G.gyZ4rc,.Szmbbz.gyZ4rc,.gyZ4rc{background:#fff;border-radius:4;box-shadow:0 0 14px 1px rgba(38,38,40,.15);left:50%;max-height:95vh;max-width:1024px;overflow:hidden;padding:.6em 1.2em;position:fixed;top:50%;transform:translate(-50%,-50%);width:480px;z-index:999}@media(max-width:1280px){.Ah-Nsc.Wki41G.gyZ4rc,.Szmbbz.gyZ4rc,.gyZ4rc{max-width:95vw}}body.scrolling-disabled-by-modal{overflow:hidden}.EznFz3{position:relative;width:100%}._0vb7tq{height:100%;position:absolute;width:100%}.XIxe9o.YOyORH._7zdld4,._7zdld4,.uIObt7._7zdld4{display:inline-block}.XIxe9o.YOyORH.dBrB4g,.dBrB4g,.uIObt7.dBrB4g{animation:TJe-6j .4s ease-in infinite alternate;background:#000;border-radius:.3em;display:inline-block;height:.6em;margin:0 .1em;position:relative;width:.6em}@keyframes TJe-6j{0%{top:-.3em}to{top:.3em}}.XIxe9o.YOyORH.dBrB4g:first-child,.dBrB4g:first-child,.uIObt7.dBrB4g:first-child{animation-delay:-.2s}.XIxe9o.YOyORH.dBrB4g:last-child,.dBrB4g:last-child,.uIObt7.dBrB4g:last-child{animation-delay:.2s}@keyframes L4ubm-{0%{opacity:0}to{opacity:1}}.GdZucr.M9gywF,.M9gywF,._4xT7zE.zd-vnH.M9gywF{border:.6em solid gray;height:0;pointer-events:none;position:absolute;width:0}.GdZucr.f9gY8K,._4xT7zE.zd-vnH.f9gY8K,.f9gY8K{animation:L4ubm- .6s;background:gray;border-radius:.3em;color:#fff;display:inline-block;left:0;padding:0 .3em;position:absolute;top:0}.GdZucr._4qDBRM,._4qDBRM,._4xT7zE.zd-vnH._4qDBRM{display:inline-block}* .sXHM81,.r3ABzd.YKcPnR .sXHM81,.veKyYi .sXHM81{background:#f5f5f5}* .SlV2zw,.r3ABzd.YKcPnR .SlV2zw,.veKyYi .SlV2zw{height:100%;position:relative;width:100%}* .jTxmOX,._5a9XX1._7sH52O .jTxmOX,.dzIcLh .jTxmOX{position:absolute;text-align:center;top:40%;transform:translateY(50%);width:100%}
2
2
  /*# sourceMappingURL=style.css.map*/
@@ -1 +1 @@
1
- {"version":3,"file":"style.css","mappings":"AAUA,2ZASE,SACA,aACA,eAJA,SACA,UAIA,wBAIF,8EAEE,cAGF,KACE,cAGF,MACE,gBAGF,aACE,YAGF,oDACE,WACA,aAGF,MACE,yBACA,iBC9CF,KACE,oBAGF,EACE,sBCTF,kBACE,mBCMA,+CACE,6DACA,sBACA,mBACA,cACA,eACA,qBACA,aACA,YACA,mBACA,kBACA,qBAEA,uEACE,cAGF,wIAEE,+DAEA,kBADA,oCACA,CAGF,iEAEE,kBADA,+BAEA,aAKJ,+CACE,mBACA,YAKA,wIAEE,6DACA,gBC9CJ,6CACE,6DACA,gBACA,sBACA,mBACA,eACA,aACA,aAEA,SADA,aAEA,YAGE,uFACE,gBACA,mBACA,WACA,cACA,WACA,YACA,UAIJ,+DACE,kBACA,+BAIJ,6CACE,mBACA,oBACA,YAGF,gDACE,sBCnCF,6CACE,6DACA,sBACA,4BACA,kBACA,oBACA,kBACA,QAGF,gDACE,mBACA,oBACA,YACA,kBAGF,qEACE,+DACA,6BAGF,kEAEE,iCAGF,6CACE,sBAIF,0DAEA,6CACE,6DACA,gBACA,sBACA,mBACA,cACA,eACA,qBACA,aACA,aACA,0CAEA,kEACE,gBACA,4BACA,6BAGF,+DACE,kBACA,+BCxDJ,8CACE,mBACA,oBACA,YAGF,8CACE,sBACA,mBACA,YACA,aACA,aACA,mCAEA,gEACE,kBACA,+BAIJ,8CACE,sBCZF,6CACE,aACA,iBACA,gBACA,WAGF,6CACE,gBACA,cACA,YCNQ,CDSV,6CACE,OACA,gBEtBF,6CACE,gBACA,YACA,OACA,WACA,eACA,MACA,WACA,YAEA,4EAGF,6CACE,gBAEA,gBADA,2CASA,SAPA,gBACA,gBDPQ,CCQR,gBACA,mBAEA,eACA,QAEA,+BAJA,YAKA,YDeF,yBC5BA,6CAgBI,gBCjCJ,iCACE,gBCFJ,QACE,kBACA,WAGF,SACE,YACA,kBACA,WCLA,gDACE,qBAGF,6CAME,wGACA,gBACA,mBACA,qBACA,YACA,cACA,kBACA,WAZA,0BACE,aACA,aAFF,kBACE,aACA,aAYF,mIACA,8HCvBJ,0BACE,aACA,cAFF,kBACE,aACA,cAMA,8CACE,uBAIA,QAAO,CAHP,oBACA,kBACA,OACA,CAOF,8CASE,kDARA,gBACA,mBACA,WACA,qBAIA,OAHA,eACA,kBACA,KAEA,CAGF,iDACE,qBC9BF,iDACE,mBAGF,iDACE,YACA,kBACA,WCPF,mDACE,kBACA,kBACA,QACA,0BACA","sources":["webpack://@dr.pogodin/react-utils/./src/styles/_global/reset.css","webpack://@dr.pogodin/react-utils/./src/styles/global.scss","webpack://@dr.pogodin/react-utils/./src/shared/components/GenericLink/style.scss","webpack://@dr.pogodin/react-utils/./src/shared/components/Button/style.scss","webpack://@dr.pogodin/react-utils/./src/shared/components/Checkbox/theme.scss","webpack://@dr.pogodin/react-utils/./src/shared/components/Dropdown/theme.scss","webpack://@dr.pogodin/react-utils/./src/shared/components/Input/theme.scss","webpack://@dr.pogodin/react-utils/./src/shared/components/PageLayout/base-theme.scss","webpack://@dr.pogodin/react-utils/./src/styles/_mixins/media.scss","webpack://@dr.pogodin/react-utils/./src/shared/components/Modal/base-theme.scss","webpack://@dr.pogodin/react-utils/./src/shared/components/Modal/styles.scss","webpack://@dr.pogodin/react-utils/./src/shared/components/ScalableRect/style.scss","webpack://@dr.pogodin/react-utils/./src/shared/components/Throbber/theme.scss","webpack://@dr.pogodin/react-utils/./src/shared/components/WithTooltip/default-theme.scss","webpack://@dr.pogodin/react-utils/./src/shared/components/YouTubeVideo/base.scss","webpack://@dr.pogodin/react-utils/./src/shared/components/YouTubeVideo/throbber.scss"],"sourcesContent":["/* Eric Meyer's \"Reset CSS\" 2.0 */\n\n/* http://meyerweb.com/eric/tools/css/reset/\n v2.0 | 20110126\n License: none (public domain)\n*/\n\n/* Having all selectors at individual lines is unreadable in the case of this\n * style reset sheet. */\n/* stylelint-disable selector-list-comma-newline-after */\na, abbr, acronym, address, applet, article, aside, audio, b, big, blockquote,\nbody, canvas, caption, center, cite, code, dd, del, details, dfn, div, dl, dt,\nem, embed, fieldset, figcaption, figure, footer, form, h1, h2, h3, h4, h5, h6,\nheader, hgroup, html, i, iframe, img, ins, kbd, label, legend, li, mark, menu,\nnav, object, ol, output, p, pre, q, ruby, s, samp, section, small, span,\nstrike, strong,sub, summary, sup, table, tbody, td, tfoot, th, thead, time, tr,\ntt, u, ul, var, video {\n margin: 0;\n padding: 0;\n border: 0;\n font: inherit;\n font-size: 100%;\n vertical-align: baseline;\n}\n\n/* HTML5 display-role reset for older browsers */\narticle, aside, details, figcaption, figure, footer, header, hgroup, menu, nav,\nsection {\n display: block;\n}\n\nbody {\n line-height: 1;\n}\n\nol, ul {\n list-style: none;\n}\n\nblockquote, q {\n quotes: none;\n}\n\nblockquote::before, blockquote::after, q::before, q::after {\n content: \"\";\n content: none;\n}\n\ntable {\n border-collapse: collapse;\n border-spacing: 0;\n}\n","/* Global styles. */\n\n@import \"_global/reset\";\n\nbody {\n text-rendering: auto;\n}\n\n* {\n box-sizing: border-box;\n}\n",".link[disabled] {\n cursor: not-allowed;\n}\n","/**\n * The default button theme.\n */\n\n*,\n.context,\n.ad.hoc {\n &.button {\n background-image: linear-gradient(to top, lightgray, white 50%, white);\n border: solid 1px gray;\n border-radius: 0.3em;\n color: inherit;\n cursor: pointer;\n display: inline-block;\n font: inherit;\n margin: 0.1em;\n padding: 0.3em 1.2em;\n text-align: center;\n text-decoration: none;\n\n &:visited {\n color: inherit;\n }\n\n &.active,\n &:active {\n background-image: linear-gradient(to bottom, lightgray, white 50%, white);\n box-shadow: inset 0 1px 3px 0 lightgray;\n border-color: gray;\n }\n\n &:focus {\n box-shadow: 0 0 3px 1px lightblue;\n border-color: blue;\n outline: none;\n }\n }\n\n /* Additional styling of disabled buttons. */\n &.disabled {\n cursor: not-allowed;\n opacity: 0.33;\n\n // Note: this \"cancels out\" the active state styling of an active button,\n // which is defined above, thus ensuring a click on disabled button does\n // not alter its appearance (does not result in visual press).\n &.active,\n &:active {\n background-image: linear-gradient(to top, lightgray, white 50%, white);\n box-shadow: none;\n }\n }\n}\n","*,\n.context,\n.ad.hoc {\n &.checkbox {\n appearance: none;\n background: white;\n border: 1px solid gray;\n border-radius: 0.3em;\n cursor: pointer;\n font: inherit;\n height: 1.5em;\n outline: none;\n margin: 0;\n width: 1.5em;\n\n &:checked {\n &::after {\n background: black;\n border-radius: 0.3em;\n content: \"\";\n display: block;\n height: 1em;\n margin: 0.2em;\n width: 1em;\n }\n }\n\n &:focus {\n border-color: blue;\n box-shadow: 0 0 3px 1px lightblue;\n }\n }\n\n &.container {\n align-items: center;\n display: inline-flex;\n margin: 0.1em;\n }\n\n &.label {\n margin: 0 0.6em 0 1.5em;\n }\n}\n","@import \"styles/mixins\";\n\n*,\n.context,\n.ad.hoc {\n &.arrow {\n background-image: linear-gradient(to top, lightgray, white 50%, white);\n border: 1px solid gray;\n border-radius: 0 0.3em 0.3em 0;\n padding: 0.3em 0.6em;\n pointer-events: none;\n position: absolute;\n right: 0;\n }\n\n &.container {\n align-items: center;\n display: inline-flex;\n margin: 0.1em;\n position: relative;\n }\n\n :active + &.arrow {\n background-image: linear-gradient(to bottom, lightgray, white 50%, white);\n border-bottom-right-radius: 0;\n }\n\n :focus + &.arrow {\n border-color: blue;\n border-left-color: gray;\n }\n\n &.label {\n margin: 0 0.6em 0 1.5em;\n }\n\n &.option { /* Empty style */ }\n &.hiddenOption { display: none; }\n\n &.select {\n appearance: none;\n background: white;\n border: 1px solid gray;\n border-radius: 0.3em;\n color: inherit;\n cursor: pointer;\n display: inline-block;\n font: inherit;\n outline: none;\n padding: 0.3em 3.3em calc(0.3em + 1px) 1.2em;\n\n &:active {\n background: white;\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n }\n\n &:focus {\n border-color: blue;\n box-shadow: 0 0 3px 1px lightblue;\n }\n }\n}\n","*,\n.context,\n.ad.hoc {\n &.container {\n align-items: center;\n display: inline-flex;\n margin: 0.1em;\n }\n\n &.input {\n border: 1px solid gray;\n border-radius: 0.3em;\n cursor: text;\n font: inherit;\n outline: none;\n padding: 0.3em 0.3em calc(0.3em + 1px);\n\n &:focus {\n border-color: blue;\n box-shadow: 0 0 3px 1px lightblue;\n }\n }\n\n &.label {\n margin: 0 0.6em 0 1.5em;\n }\n}\n","/**\n * Base theme: symmetric 3-columns layout, with the center column occupying all\n * screen up to mid screen size. For larger screen sizes the main column is\n * limited by the mid screen size, and the free space is filled with side\n * columns on left and right.\n */\n\n@import \"styles/mixins\";\n\n*,\n.context,\n.ad.hoc {\n &.container {\n display: flex;\n min-height: 100vh;\n overflow: hidden;\n width: 100%;\n }\n\n &.mainPanel {\n overflow: hidden;\n padding: 1.2em;\n width: $screen-md;\n }\n\n &.sidePanel {\n flex: 1;\n overflow: hidden;\n }\n}\n","/**\n * Mixins for different layout sizes: xs, sm, md, lg.\n * Breaking points are defined in _variables.scss\n * The range mixins A-to-B all means \"for the sizes from A to B, both\n * inclusive\", in particular it means that mixin A-to-lg is equivalent to\n * all sizes from A (inclusive) and larger.\n *\n * NOTE: For convenience, these mixins are sorted not alphabetically, but,\n * first, by increase of the first size; second, by increase of the second size.\n */\n\n/* Break points. */\n\n$screen-xs: 320px !default;\n$screen-sm: 495px !default;\n$screen-mm: 768px !default;\n$screen-md: 1024px !default;\n$screen-lg: 1280px !default;\n\n/* XS */\n\n@mixin xs {\n @media (max-width: #{$screen-xs}) {\n @content;\n }\n}\n\n@mixin xs-to-sm {\n @media (max-width: #{$screen-sm}) {\n @content;\n }\n}\n\n@mixin xs-to-mm {\n @media (max-width: #{$screen-mm}) {\n @content;\n }\n}\n\n@mixin xs-to-md {\n @media (max-width: #{$screen-md}) {\n @content;\n }\n}\n\n@mixin xs-to-lg {\n @media (max-width: #{$screen-lg}) {\n @content;\n }\n}\n\n/* SM */\n\n@mixin sm {\n @media (min-width: #{$screen-xs + 1px}) and (max-width: #{$screen-sm}) {\n @content;\n }\n}\n\n@mixin sm-to-mm {\n @media (min-width: #{$screen-xs + 1px}) and (max-width: #{$screen-mm}) {\n @content;\n }\n}\n\n@mixin sm-to-md {\n @media (min-width: #{$screen-xs + 1px}) and (max-width: #{$screen-md}) {\n @content;\n }\n}\n\n@mixin sm-to-lg {\n @media (min-width: #{$screen-xs + 1px}) and (max-width: #{$screen-lg}) {\n @content;\n }\n}\n\n@mixin sm-to-xl {\n @media (min-width: #{$screen-xs + 1px}) {\n @content;\n }\n}\n\n/* MM */\n\n@mixin mm {\n @media (min-width: #{$screen-sm + 1px}) and (max-width: #{$screen-mm}) {\n @content;\n }\n}\n\n@mixin mm-to-md {\n @media (min-width: #{$screen-sm + 1px}) and (max-width: #{$screen-md}) {\n @content;\n }\n}\n\n@mixin mm-to-lg {\n @media (min-width: #{$screen-sm + 1px}) and (max-width: #{$screen-lg}) {\n @content;\n }\n}\n\n@mixin mm-to-xl {\n @media (min-width: #{$screen-sm + 1px}) {\n @content;\n }\n}\n\n/* MD */\n\n@mixin md {\n @media (min-width: #{$screen-mm + 1px}) and (max-width: #{$screen-md}) {\n @content;\n }\n}\n\n@mixin md-to-lg {\n @media (min-width: #{$screen-mm + 1px}) and (max-width: #{$screen-lg}) {\n @content;\n }\n}\n\n@mixin md-to-xl {\n @media (min-width: #{$screen-mm + 1px}) {\n @content;\n }\n}\n\n/* LG */\n\n@mixin lg {\n @media (min-width: #{$screen-md + 1px}) and (max-width: #{$screen-lg}) {\n @content;\n }\n}\n\n@mixin lg-to-xl {\n @media (min-width: #{$screen-md + 1px}) {\n @content;\n }\n}\n\n/* XL */\n\n@mixin xl {\n @media (min-width: #{$screen-lg + 1px}) {\n @content;\n }\n}\n","@import \"styles/mixins\";\n\n*,\n.context,\n.ad.hoc {\n &.overlay {\n background: #eee;\n height: 100%;\n left: 0;\n opacity: 0.8;\n position: fixed;\n top: 0;\n width: 100%;\n z-index: 998;\n\n &:focus { outline: none; }\n }\n\n &.container {\n background: #fff;\n box-shadow: 0 0 14px 1px rgba(38 38 40 / 15%);\n border-radius: 4;\n max-height: 95vh;\n max-width: $screen-md;\n overflow: hidden;\n padding: 0.6em 1.2em;\n width: 480px;\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n z-index: 999;\n\n @include xs-to-lg {\n max-width: 95vw;\n }\n }\n}\n",":global {\n body.scrolling-disabled-by-modal {\n overflow: hidden;\n }\n}\n",".container {\n position: relative;\n width: 100%;\n}\n\n.wrapper {\n height: 100%;\n position: absolute;\n width: 100%;\n}\n","*,\n.context,\n.ad.hoc {\n &.container {\n display: inline-block;\n }\n\n &.circle {\n @keyframes bouncing {\n from { top: -0.3em; }\n to { top: 0.3em; }\n }\n\n animation: bouncing 0.4s ease-in infinite alternate;\n background: black;\n border-radius: 0.3em;\n display: inline-block;\n height: 0.6em;\n margin: 0 0.1em;\n position: relative;\n width: 0.6em;\n\n &:first-child { animation-delay: -0.2s; }\n &:last-child { animation-delay: 0.2s; }\n }\n}\n","@keyframes appearance {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n\n*,\n.ad.hoc,\n.context {\n &.arrow {\n border: 0.6em solid grey;\n pointer-events: none;\n position: absolute;\n width: 0;\n height: 0;\n }\n\n /*\n &.content { }\n */\n\n &.container {\n background: grey;\n border-radius: 0.3em;\n color: white;\n display: inline-block;\n padding: 0 0.3em;\n position: absolute;\n top: 0;\n left: 0;\n animation: appearance 0.6s;\n }\n\n &.wrapper {\n display: inline-block;\n }\n}\n","*,\n.context,\n.ad.hoc {\n .container {\n background: whitesmoke;\n }\n\n .video {\n height: 100%;\n position: relative;\n width: 100%;\n }\n}\n","*,\n.context,\n.ad.hoc {\n .container {\n position: absolute;\n text-align: center;\n top: 40%;\n transform: translateY(50%);\n width: 100%;\n }\n}\n"],"names":[],"sourceRoot":""}
1
+ {"version":3,"file":"style.css","mappings":"AAUA,2ZASE,SACA,aACA,eAJA,SACA,UAIA,wBAIF,8EAEE,cAGF,KACE,cAGF,MACE,gBAGF,aACE,YAGF,oDACE,WACA,aAGF,MACE,yBACA,iBC9CF,KACE,oBAGF,EACE,sBCTF,kBACE,mBCMA,+CACE,6DACA,sBACA,mBACA,cACA,eACA,qBACA,aACA,YACA,mBACA,kBACA,qBAEA,uEACE,cAGF,wIAEE,+DAEA,kBADA,oCACA,CAGF,iEAEE,kBADA,+BAEA,aAKJ,+CACE,mBACA,YAKA,wIAEE,6DACA,gBC9CJ,6CACE,6DACA,gBACA,sBACA,mBACA,eACA,aACA,aAEA,SADA,aAEA,YAGE,uFACE,gBACA,mBACA,WACA,cACA,WACA,YACA,UAIJ,+DACE,kBACA,+BAIJ,6CACE,mBACA,oBACA,YAGF,gDACE,sBCnCF,6CACE,6DACA,sBACA,4BACA,kBACA,oBACA,kBACA,QAGF,gDACE,mBACA,oBACA,YACA,kBAGF,qEACE,+DACA,6BAGF,kEAEE,iCAGF,6CACE,sBAIF,0DAEA,6CACE,6DACA,gBACA,sBACA,mBACA,cACA,eACA,qBACA,aACA,aACA,0CAEA,kEACE,gBACA,4BACA,6BAGF,+DACE,kBACA,+BCxDJ,8CACE,mBACA,oBACA,YAGF,8CACE,sBACA,mBACA,YACA,aACA,aACA,mCAEA,gEACE,kBACA,+BAIJ,8CACE,sBCZF,6CACE,aACA,iBACA,gBACA,WAGF,6CACE,gBACA,cACA,YCNQ,CDSV,6CACE,OACA,gBEtBF,6CACE,gBACA,YACA,OACA,WACA,eACA,MACA,WACA,YAEA,4EAGF,6CACE,gBAEA,gBADA,2CASA,SAPA,gBACA,gBDPQ,CCQR,gBACA,mBAEA,eACA,QAEA,+BAJA,YAKA,YDeF,yBC5BA,6CAgBI,gBCjCJ,iCACE,gBCFJ,QACE,kBACA,WAGF,SACE,YACA,kBACA,WCLA,gDACE,qBAGF,6CAME,gDACA,gBACA,mBACA,qBACA,YACA,cACA,kBACA,WAZA,kBACE,aACA,aAYF,sGACA,kGCvBJ,kBACE,aACA,cAMA,8CACE,uBAIA,QAAO,CAHP,oBACA,kBACA,OACA,CAOF,8CASE,qBARA,gBACA,mBACA,WACA,qBAIA,OAHA,eACA,kBACA,KAEA,CAGF,iDACE,qBC9BF,iDACE,mBAGF,iDACE,YACA,kBACA,WCPF,mDACE,kBACA,kBACA,QACA,0BACA","sources":["webpack://@dr.pogodin/react-utils/./src/styles/_global/reset.css","webpack://@dr.pogodin/react-utils/./src/styles/global.scss","webpack://@dr.pogodin/react-utils/./src/shared/components/GenericLink/style.scss","webpack://@dr.pogodin/react-utils/./src/shared/components/Button/style.scss","webpack://@dr.pogodin/react-utils/./src/shared/components/Checkbox/theme.scss","webpack://@dr.pogodin/react-utils/./src/shared/components/Dropdown/theme.scss","webpack://@dr.pogodin/react-utils/./src/shared/components/Input/theme.scss","webpack://@dr.pogodin/react-utils/./src/shared/components/PageLayout/base-theme.scss","webpack://@dr.pogodin/react-utils/./src/styles/_mixins/media.scss","webpack://@dr.pogodin/react-utils/./src/shared/components/Modal/base-theme.scss","webpack://@dr.pogodin/react-utils/./src/shared/components/Modal/styles.scss","webpack://@dr.pogodin/react-utils/./src/shared/components/ScalableRect/style.scss","webpack://@dr.pogodin/react-utils/./src/shared/components/Throbber/theme.scss","webpack://@dr.pogodin/react-utils/./src/shared/components/WithTooltip/default-theme.scss","webpack://@dr.pogodin/react-utils/./src/shared/components/YouTubeVideo/base.scss","webpack://@dr.pogodin/react-utils/./src/shared/components/YouTubeVideo/throbber.scss"],"sourcesContent":["/* Eric Meyer's \"Reset CSS\" 2.0 */\n\n/* http://meyerweb.com/eric/tools/css/reset/\n v2.0 | 20110126\n License: none (public domain)\n*/\n\n/* Having all selectors at individual lines is unreadable in the case of this\n * style reset sheet. */\n/* stylelint-disable selector-list-comma-newline-after */\na, abbr, acronym, address, applet, article, aside, audio, b, big, blockquote,\nbody, canvas, caption, center, cite, code, dd, del, details, dfn, div, dl, dt,\nem, embed, fieldset, figcaption, figure, footer, form, h1, h2, h3, h4, h5, h6,\nheader, hgroup, html, i, iframe, img, ins, kbd, label, legend, li, mark, menu,\nnav, object, ol, output, p, pre, q, ruby, s, samp, section, small, span,\nstrike, strong,sub, summary, sup, table, tbody, td, tfoot, th, thead, time, tr,\ntt, u, ul, var, video {\n margin: 0;\n padding: 0;\n border: 0;\n font: inherit;\n font-size: 100%;\n vertical-align: baseline;\n}\n\n/* HTML5 display-role reset for older browsers */\narticle, aside, details, figcaption, figure, footer, header, hgroup, menu, nav,\nsection {\n display: block;\n}\n\nbody {\n line-height: 1;\n}\n\nol, ul {\n list-style: none;\n}\n\nblockquote, q {\n quotes: none;\n}\n\nblockquote::before, blockquote::after, q::before, q::after {\n content: \"\";\n content: none;\n}\n\ntable {\n border-collapse: collapse;\n border-spacing: 0;\n}\n","/* Global styles. */\n\n@import \"_global/reset\";\n\nbody {\n text-rendering: auto;\n}\n\n* {\n box-sizing: border-box;\n}\n",".link[disabled] {\n cursor: not-allowed;\n}\n","/**\n * The default button theme.\n */\n\n*,\n.context,\n.ad.hoc {\n &.button {\n background-image: linear-gradient(to top, lightgray, white 50%, white);\n border: solid 1px gray;\n border-radius: 0.3em;\n color: inherit;\n cursor: pointer;\n display: inline-block;\n font: inherit;\n margin: 0.1em;\n padding: 0.3em 1.2em;\n text-align: center;\n text-decoration: none;\n\n &:visited {\n color: inherit;\n }\n\n &.active,\n &:active {\n background-image: linear-gradient(to bottom, lightgray, white 50%, white);\n box-shadow: inset 0 1px 3px 0 lightgray;\n border-color: gray;\n }\n\n &:focus {\n box-shadow: 0 0 3px 1px lightblue;\n border-color: blue;\n outline: none;\n }\n }\n\n /* Additional styling of disabled buttons. */\n &.disabled {\n cursor: not-allowed;\n opacity: 0.33;\n\n // Note: this \"cancels out\" the active state styling of an active button,\n // which is defined above, thus ensuring a click on disabled button does\n // not alter its appearance (does not result in visual press).\n &.active,\n &:active {\n background-image: linear-gradient(to top, lightgray, white 50%, white);\n box-shadow: none;\n }\n }\n}\n","*,\n.context,\n.ad.hoc {\n &.checkbox {\n appearance: none;\n background: white;\n border: 1px solid gray;\n border-radius: 0.3em;\n cursor: pointer;\n font: inherit;\n height: 1.5em;\n outline: none;\n margin: 0;\n width: 1.5em;\n\n &:checked {\n &::after {\n background: black;\n border-radius: 0.3em;\n content: \"\";\n display: block;\n height: 1em;\n margin: 0.2em;\n width: 1em;\n }\n }\n\n &:focus {\n border-color: blue;\n box-shadow: 0 0 3px 1px lightblue;\n }\n }\n\n &.container {\n align-items: center;\n display: inline-flex;\n margin: 0.1em;\n }\n\n &.label {\n margin: 0 0.6em 0 1.5em;\n }\n}\n","@import \"styles/mixins\";\n\n*,\n.context,\n.ad.hoc {\n &.arrow {\n background-image: linear-gradient(to top, lightgray, white 50%, white);\n border: 1px solid gray;\n border-radius: 0 0.3em 0.3em 0;\n padding: 0.3em 0.6em;\n pointer-events: none;\n position: absolute;\n right: 0;\n }\n\n &.container {\n align-items: center;\n display: inline-flex;\n margin: 0.1em;\n position: relative;\n }\n\n :active + &.arrow {\n background-image: linear-gradient(to bottom, lightgray, white 50%, white);\n border-bottom-right-radius: 0;\n }\n\n :focus + &.arrow {\n border-color: blue;\n border-left-color: gray;\n }\n\n &.label {\n margin: 0 0.6em 0 1.5em;\n }\n\n &.option { /* Empty style */ }\n &.hiddenOption { display: none; }\n\n &.select {\n appearance: none;\n background: white;\n border: 1px solid gray;\n border-radius: 0.3em;\n color: inherit;\n cursor: pointer;\n display: inline-block;\n font: inherit;\n outline: none;\n padding: 0.3em 3.3em calc(0.3em + 1px) 1.2em;\n\n &:active {\n background: white;\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n }\n\n &:focus {\n border-color: blue;\n box-shadow: 0 0 3px 1px lightblue;\n }\n }\n}\n","*,\n.context,\n.ad.hoc {\n &.container {\n align-items: center;\n display: inline-flex;\n margin: 0.1em;\n }\n\n &.input {\n border: 1px solid gray;\n border-radius: 0.3em;\n cursor: text;\n font: inherit;\n outline: none;\n padding: 0.3em 0.3em calc(0.3em + 1px);\n\n &:focus {\n border-color: blue;\n box-shadow: 0 0 3px 1px lightblue;\n }\n }\n\n &.label {\n margin: 0 0.6em 0 1.5em;\n }\n}\n","/**\n * Base theme: symmetric 3-columns layout, with the center column occupying all\n * screen up to mid screen size. For larger screen sizes the main column is\n * limited by the mid screen size, and the free space is filled with side\n * columns on left and right.\n */\n\n@import \"styles/mixins\";\n\n*,\n.context,\n.ad.hoc {\n &.container {\n display: flex;\n min-height: 100vh;\n overflow: hidden;\n width: 100%;\n }\n\n &.mainPanel {\n overflow: hidden;\n padding: 1.2em;\n width: $screen-md;\n }\n\n &.sidePanel {\n flex: 1;\n overflow: hidden;\n }\n}\n","/**\n * Mixins for different layout sizes: xs, sm, md, lg.\n * Breaking points are defined in _variables.scss\n * The range mixins A-to-B all means \"for the sizes from A to B, both\n * inclusive\", in particular it means that mixin A-to-lg is equivalent to\n * all sizes from A (inclusive) and larger.\n *\n * NOTE: For convenience, these mixins are sorted not alphabetically, but,\n * first, by increase of the first size; second, by increase of the second size.\n */\n\n/* Break points. */\n\n$screen-xs: 320px !default;\n$screen-sm: 495px !default;\n$screen-mm: 768px !default;\n$screen-md: 1024px !default;\n$screen-lg: 1280px !default;\n\n/* XS */\n\n@mixin xs {\n @media (max-width: #{$screen-xs}) {\n @content;\n }\n}\n\n@mixin xs-to-sm {\n @media (max-width: #{$screen-sm}) {\n @content;\n }\n}\n\n@mixin xs-to-mm {\n @media (max-width: #{$screen-mm}) {\n @content;\n }\n}\n\n@mixin xs-to-md {\n @media (max-width: #{$screen-md}) {\n @content;\n }\n}\n\n@mixin xs-to-lg {\n @media (max-width: #{$screen-lg}) {\n @content;\n }\n}\n\n/* SM */\n\n@mixin sm {\n @media (min-width: #{$screen-xs + 1px}) and (max-width: #{$screen-sm}) {\n @content;\n }\n}\n\n@mixin sm-to-mm {\n @media (min-width: #{$screen-xs + 1px}) and (max-width: #{$screen-mm}) {\n @content;\n }\n}\n\n@mixin sm-to-md {\n @media (min-width: #{$screen-xs + 1px}) and (max-width: #{$screen-md}) {\n @content;\n }\n}\n\n@mixin sm-to-lg {\n @media (min-width: #{$screen-xs + 1px}) and (max-width: #{$screen-lg}) {\n @content;\n }\n}\n\n@mixin sm-to-xl {\n @media (min-width: #{$screen-xs + 1px}) {\n @content;\n }\n}\n\n/* MM */\n\n@mixin mm {\n @media (min-width: #{$screen-sm + 1px}) and (max-width: #{$screen-mm}) {\n @content;\n }\n}\n\n@mixin mm-to-md {\n @media (min-width: #{$screen-sm + 1px}) and (max-width: #{$screen-md}) {\n @content;\n }\n}\n\n@mixin mm-to-lg {\n @media (min-width: #{$screen-sm + 1px}) and (max-width: #{$screen-lg}) {\n @content;\n }\n}\n\n@mixin mm-to-xl {\n @media (min-width: #{$screen-sm + 1px}) {\n @content;\n }\n}\n\n/* MD */\n\n@mixin md {\n @media (min-width: #{$screen-mm + 1px}) and (max-width: #{$screen-md}) {\n @content;\n }\n}\n\n@mixin md-to-lg {\n @media (min-width: #{$screen-mm + 1px}) and (max-width: #{$screen-lg}) {\n @content;\n }\n}\n\n@mixin md-to-xl {\n @media (min-width: #{$screen-mm + 1px}) {\n @content;\n }\n}\n\n/* LG */\n\n@mixin lg {\n @media (min-width: #{$screen-md + 1px}) and (max-width: #{$screen-lg}) {\n @content;\n }\n}\n\n@mixin lg-to-xl {\n @media (min-width: #{$screen-md + 1px}) {\n @content;\n }\n}\n\n/* XL */\n\n@mixin xl {\n @media (min-width: #{$screen-lg + 1px}) {\n @content;\n }\n}\n","@import \"styles/mixins\";\n\n*,\n.context,\n.ad.hoc {\n &.overlay {\n background: #eee;\n height: 100%;\n left: 0;\n opacity: 0.8;\n position: fixed;\n top: 0;\n width: 100%;\n z-index: 998;\n\n &:focus { outline: none; }\n }\n\n &.container {\n background: #fff;\n box-shadow: 0 0 14px 1px rgba(38 38 40 / 15%);\n border-radius: 4;\n max-height: 95vh;\n max-width: $screen-md;\n overflow: hidden;\n padding: 0.6em 1.2em;\n width: 480px;\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n z-index: 999;\n\n @include xs-to-lg {\n max-width: 95vw;\n }\n }\n}\n",":global {\n body.scrolling-disabled-by-modal {\n overflow: hidden;\n }\n}\n",".container {\n position: relative;\n width: 100%;\n}\n\n.wrapper {\n height: 100%;\n position: absolute;\n width: 100%;\n}\n","*,\n.context,\n.ad.hoc {\n &.container {\n display: inline-block;\n }\n\n &.circle {\n @keyframes bouncing {\n from { top: -0.3em; }\n to { top: 0.3em; }\n }\n\n animation: bouncing 0.4s ease-in infinite alternate;\n background: black;\n border-radius: 0.3em;\n display: inline-block;\n height: 0.6em;\n margin: 0 0.1em;\n position: relative;\n width: 0.6em;\n\n &:first-child { animation-delay: -0.2s; }\n &:last-child { animation-delay: 0.2s; }\n }\n}\n","@keyframes appearance {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n\n*,\n.ad.hoc,\n.context {\n &.arrow {\n border: 0.6em solid grey;\n pointer-events: none;\n position: absolute;\n width: 0;\n height: 0;\n }\n\n /*\n &.content { }\n */\n\n &.container {\n background: grey;\n border-radius: 0.3em;\n color: white;\n display: inline-block;\n padding: 0 0.3em;\n position: absolute;\n top: 0;\n left: 0;\n animation: appearance 0.6s;\n }\n\n &.wrapper {\n display: inline-block;\n }\n}\n","*,\n.context,\n.ad.hoc {\n .container {\n background: whitesmoke;\n }\n\n .video {\n height: 100%;\n position: relative;\n width: 100%;\n }\n}\n","*,\n.context,\n.ad.hoc {\n .container {\n position: absolute;\n text-align: center;\n top: 40%;\n transform: translateY(50%);\n width: 100%;\n }\n}\n"],"names":[],"sourceRoot":""}
@@ -1,3 +1,3 @@
1
1
  /*! For license information please see web.bundle.js.LICENSE.txt */
2
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@babel/runtime/helpers/classPrivateFieldGet"),require("@babel/runtime/helpers/classPrivateFieldSet"),require("@dr.pogodin/react-global-state"),require("@dr.pogodin/react-themes"),require("axios"),require("dayjs"),require("lodash"),require("prop-types"),require("qs"),require("react"),require("react-dom"),require("react-dom/client"),require("react-helmet"),require("react-router-dom")):"function"==typeof define&&define.amd?define(["@babel/runtime/helpers/classPrivateFieldGet","@babel/runtime/helpers/classPrivateFieldSet","@dr.pogodin/react-global-state","@dr.pogodin/react-themes","axios","dayjs","lodash","prop-types","qs","react","react-dom","react-dom/client","react-helmet","react-router-dom"],t):"object"==typeof exports?exports["@dr.pogodin/react-utils"]=t(require("@babel/runtime/helpers/classPrivateFieldGet"),require("@babel/runtime/helpers/classPrivateFieldSet"),require("@dr.pogodin/react-global-state"),require("@dr.pogodin/react-themes"),require("axios"),require("dayjs"),require("lodash"),require("prop-types"),require("qs"),require("react"),require("react-dom"),require("react-dom/client"),require("react-helmet"),require("react-router-dom")):e["@dr.pogodin/react-utils"]=t(e["@babel/runtime/helpers/classPrivateFieldGet"],e["@babel/runtime/helpers/classPrivateFieldSet"],e["@dr.pogodin/react-global-state"],e["@dr.pogodin/react-themes"],e.axios,e.dayjs,e.lodash,e["prop-types"],e.qs,e.react,e["react-dom"],e["react-dom/client"],e["react-helmet"],e["react-router-dom"])}("undefined"!=typeof self?self:this,(function(__WEBPACK_EXTERNAL_MODULE__226__,__WEBPACK_EXTERNAL_MODULE__556__,__WEBPACK_EXTERNAL_MODULE__899__,__WEBPACK_EXTERNAL_MODULE__198__,__WEBPACK_EXTERNAL_MODULE__300__,__WEBPACK_EXTERNAL_MODULE__760__,__WEBPACK_EXTERNAL_MODULE__467__,__WEBPACK_EXTERNAL_MODULE__99__,__WEBPACK_EXTERNAL_MODULE__656__,__WEBPACK_EXTERNAL_MODULE__156__,__WEBPACK_EXTERNAL_MODULE__111__,__WEBPACK_EXTERNAL_MODULE__715__,__WEBPACK_EXTERNAL_MODULE__383__,__WEBPACK_EXTERNAL_MODULE__128__){return function(){"use strict";var __webpack_modules__={450:function(e,t,n){n.r(t),n.d(t,{IS_CLIENT_SIDE:function(){return r},IS_SERVER_SIDE:function(){return o},buildTimestamp:function(){return l},getBuildInfo:function(){return c},isDevBuild:function(){return i},isProdBuild:function(){return a}});const r="object"!=typeof process||!process.versions||!process.versions.node||!!n.g.REACT_UTILS_FORCE_CLIENT_SIDE,o=!r;function i(){return!1}function a(){return!0}function c(){return(r?window:n.g).TRU_BUILD_INFO}function l(){return c().timestamp}},869:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{requireWeak:function(){return requireWeak},resolveWeak:function(){return resolveWeak}});var _isomorphy__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(450);function requireWeak(modulePath,basePath){if(_isomorphy__WEBPACK_IMPORTED_MODULE_0__.IS_CLIENT_SIDE)return null;try{const{resolve:resolve}=eval("require")("path"),path=basePath?resolve(basePath,modulePath):modulePath,{default:def,...named}=eval("require")(path);return def?(Object.entries(named).forEach((e=>{let[t,n]=e;if(def[t])throw Error("Conflict between default and named exports");def[t]=n})),def):named}catch{return null}}function resolveWeak(e){return e}},251:function(e,t,n){var r=n(156),o=Symbol.for("react.element"),i=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,c=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function s(e,t,n){var r,i={},s=null,u=null;for(r in void 0!==n&&(s=""+n),void 0!==t.key&&(s=""+t.key),void 0!==t.ref&&(u=t.ref),t)a.call(t,r)&&!l.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:o,type:e,key:s,ref:u,props:i,_owner:c.current}}t.Fragment=i,t.jsx=s,t.jsxs=s},893:function(e,t,n){e.exports=n(251)},226:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__226__},556:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__556__},899:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__899__},198:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__198__},300:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__300__},760:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__760__},467:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__467__},99:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__99__},656:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__656__},156:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__156__},111:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__111__},715:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__715__},383:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__383__},128:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__128__}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var n=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](n,n.exports,__webpack_require__),n.exports}__webpack_require__.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=function(e,t){for(var n in t)__webpack_require__.o(t,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};return function(){__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Barrier:function(){return b},BaseModal:function(){return he},Button:function(){return $},Checkbox:function(){return Q},Dropdown:function(){return ne},Emitter:function(){return g},GlobalStateProvider:function(){return O.GlobalStateProvider},Input:function(){return ie},JU:function(){return W},Link:function(){return G},MetaTags:function(){return _e},Modal:function(){return me},NavLink:function(){return be},PT:function(){return A},PageLayout:function(){return le},ScalableRect:function(){return Ee},Semaphore:function(){return S},ThemeProvider:function(){return e.ThemeProvider},Throbber:function(){return ve},WithTooltip:function(){return Ne},YouTubeVideo:function(){return Oe},api:function(){return I()},client:function(){return Z},config:function(){return r},getGlobalState:function(){return O.getGlobalState},getSsrContext:function(){return O.getSsrContext},isomorphy:function(){return o},newBarrier:function(){return E},server:function(){return je},splitComponent:function(){return B},themed:function(){return t()},time:function(){return v},useAsyncCollection:function(){return O.useAsyncCollection},useAsyncData:function(){return O.useAsyncData},useGlobalState:function(){return O.useGlobalState},webpack:function(){return n},withRetries:function(){return U}});var e=__webpack_require__(198),t=__webpack_require__.n(e),n=__webpack_require__(869),r=(0,n.requireWeak)("config")||window.CONFIG||{},o=__webpack_require__(450),i=__webpack_require__(760),a=__webpack_require__.n(i),c=__webpack_require__(467),l=__webpack_require__(226),s=__webpack_require__.n(l),u=__webpack_require__(556),_=__webpack_require__.n(u);function d(e,t,n){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,n)}var p=new WeakMap,h=new WeakMap,f=new WeakMap,m=new WeakMap;class b extends Promise{constructor(e){let t,n;super(((r,o)=>{t=e=>{r(e),_()(this,h,!0)},n=e=>{o(e),_()(this,m,!0)},e&&e(t,n)})),d(this,p,{writable:!0,value:void 0}),d(this,h,{writable:!0,value:!1}),d(this,f,{writable:!0,value:void 0}),d(this,m,{writable:!0,value:!1}),_()(this,p,t),_()(this,f,n)}get resolve(){return s()(this,p)}get resolved(){return s()(this,h)}get reject(){return s()(this,f)}get rejected(){return s()(this,m)}then(e,t){const n=super.then(e,t);return _()(n,p,s()(this,p)),_()(n,f,s()(this,f)),n}}function E(e){return new b(e)}async function w(e){const t=new b;if(e>0){const n=setTimeout(t.resolve.bind(t),e);t.abort=()=>clearTimeout(n)}else t.abort=c.noop,t.resolve();return t}a().SEC_MS=1e3,a().MIN_MS=60*a().SEC_MS,a().HOUR_MS=60*a().MIN_MS,a().DAY_MS=24*a().HOUR_MS,a().YEAR_MS=365*a().DAY_MS,a().now=Date.now,a().timer=w;var v=a();class g{constructor(){this.listeners=[]}get hasListeners(){return!!this.listeners.length}addListener(e){return this.listeners.includes(e)||this.listeners.push(e),()=>this.removeListener(e)}emit(){const{listeners:e}=this;for(let t=0;t<e.length;++t)e[t](...arguments)}removeListener(e){const t=this.listeners.indexOf(e);t>=0&&this.listeners.splice(t,1)}}function y(e,t,n){x(e,t),t.set(e,n)}function x(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function T(e,t,n){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return n}var k=new WeakSet,C=new WeakMap,P=new WeakMap,N=new WeakMap;class S{constructor(e){var t;x(this,t=k),t.add(this),y(this,C,{writable:!0,value:!1}),y(this,P,{writable:!0,value:[]}),y(this,N,{writable:!0,value:void 0}),_()(this,N,!!e)}get ready(){return s()(this,N)}setReady(e){const t=!!e;s()(this,N)!==t&&(_()(this,N,t),t&&!s()(this,C)&&T(this,k,q).call(this))}async seize(){await this.waitReady(),this.setReady(!1)}async waitReady(){if(!s()(this,N)||s()(this,P).length){const e=E();s()(this,P).push(e),await e,s()(this,P).shift()}}}function q(){if(s()(this,N)&&s()(this,P).length&&(s()(this,P)[0].resolve(),s()(this,P).length))return setTimeout(T(this,k,q).bind(this)),void _()(this,C,!0);_()(this,C,!1)}var R=__webpack_require__(156),A=__webpack_require__(99),L=__webpack_require__.n(A),O=__webpack_require__(899),j=__webpack_require__(893);function M(e){let{children:t,chunkName:n,getComponent:r,placeholder:i,...a}=e;const{current:c}=(0,R.useRef)({mounted:!1,pendingStyles:[]}),{publicPath:l}=(0,o.getBuildInfo)(),s=(0,R.lazy)((async()=>{const e=await r();return c.pendingStyles.length&&await Promise.all(c.pendingStyles),e.default?e:{default:e}}));if(o.IS_SERVER_SIDE){const{chunks:e}=(0,O.getGlobalState)().ssrContext;if(e.includes(n))throw Error(`Chunk name clash for "${n}"`);e.push(n)}else c.mounted||(c.mounted=!0,window.CHUNK_GROUPS[n].forEach((e=>{if(!e.endsWith(".css"))return;const t=`${l}/${e}`;let n=document.querySelector(`link[href="${t}"]`);if(!n){n=document.createElement("link"),n.setAttribute("href",t),n.setAttribute("rel","stylesheet");const e=E();n.onload=e.resolve,n.onerror=e.resolve,c.pendingStyles.push(e),document.querySelector("head").appendChild(n)}window.STYLESHEET_USAGE_COUNTERS||={},window.STYLESHEET_USAGE_COUNTERS[t]||=0,++window.STYLESHEET_USAGE_COUNTERS[t]})));return(0,R.useEffect)((()=>()=>{c.mounted=!1,window.CHUNK_GROUPS[n].forEach((e=>{if(!e.endsWith(".css"))return;const t=`${l}/${e}`;if(--window.STYLESHEET_USAGE_COUNTERS[t]<=0){const e=document.querySelector(`link[href="${t}"]`);document.querySelector("head").removeChild(e)}}))}),[n,c,l]),(0,j.jsx)(R.Suspense,{fallback:i,children:(0,j.jsx)(s,{...a,children:t})})}function B(e){let{chunkName:t,getComponent:n,placeholder:r}=e;return function(){let{children:e,...o}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,R.createElement)(M,{...o,chunkName:t,getComponent:n,placeholder:r},e)}}let D;M.propTypes={children:L().node,chunkName:L().string.isRequired,getComponent:L().func.isRequired,placeholder:L().node},M.defaultProps={children:void 0,placeholder:void 0},t().COMPOSE=e.COMPOSE,t().PRIORITY=e.PRIORITY;try{D=process.env.NODE_CONFIG_ENV}catch{}const W="production"!==(D||"production")&&n.requireWeak("./jest","/");async function U(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e3;for(let r=1;;++r)try{return await e()}catch(e){if(!(r<t))throw e;await w(n)}}var X=__webpack_require__(300),I=__webpack_require__.n(X),K=__webpack_require__(128);function Y(e){let{children:t,className:n,disabled:r,enforceA:o,keepScrollPosition:i,onClick:a,onMouseDown:c,openNewTab:l,replace:s,routerLinkType:u,to:_,...d}=e;return r||o||l||_.match(/^(#|(https?|mailto):)/)?(0,j.jsx)("a",{className:(n?n+" ":"")+"zH52sA",disabled:r,href:_,onClick:r?e=>e.preventDefault():a,onMouseDown:r?e=>e.preventDefault():c,rel:"noopener noreferrer",target:l?"_blank":"",children:t}):(0,R.createElement)(u,{className:n,disabled:r,onMouseDown:c,replace:s,to:_,onClick:e=>{a&&a(e),i||window.scroll(0,0)},...d},t)}function G(e){return(0,j.jsx)(Y,{...e,routerLinkType:K.Link})}function F(e){let{active:t,children:n,disabled:r,enforceA:o,onClick:i,onMouseDown:a,openNewTab:c,replace:l,theme:s,to:u}=e,_=s.button;return t&&s.active&&(_+=` ${s.active}`),r?(s.disabled&&(_+=` ${s.disabled}`),(0,j.jsx)("div",{className:_,children:n})):u?(0,j.jsx)(G,{className:_,enforceA:o,onClick:i,onMouseDown:a,openNewTab:c,replace:l,to:u,children:n}):(0,j.jsx)("div",{className:_,onClick:i,onKeyPress:i,onMouseDown:a,role:"button",tabIndex:0,children:n})}Y.defaultProps={children:null,className:null,disabled:!1,enforceA:!1,keepScrollPosition:!1,onClick:null,onMouseDown:null,openNewTab:!1,replace:!1,to:""},Y.propTypes={children:L().node,className:L().string,disabled:L().bool,enforceA:L().bool,keepScrollPosition:L().bool,onClick:L().func,onMouseDown:L().func,openNewTab:L().bool,replace:L().bool,routerLinkType:L().elementType.isRequired,to:L().oneOfType([L().object,L().string])};const H=t()("Button",["active","button","disabled"],{button:"E1FNQT",context:"KM0v4f",ad:"_3jm1-Q",hoc:"_0plpDL",active:"MAe9O6",disabled:"Br9IWV"})(F);F.defaultProps={active:!1,children:void 0,disabled:!1,enforceA:!1,onClick:void 0,onMouseDown:void 0,openNewTab:!1,replace:!1,to:void 0},F.propTypes={active:L().bool,children:L().node,disabled:L().bool,enforceA:L().bool,onClick:L().func,onMouseDown:L().func,openNewTab:L().bool,replace:L().bool,theme:H.themeType.isRequired,to:L().oneOfType([L().object,L().string])};var $=H;function z(e){let{checked:t,label:n,onChange:r,theme:o}=e;return(0,j.jsxs)("div",{className:o.container,children:[void 0===n?null:(0,j.jsx)("p",{className:o.label,children:n}),(0,j.jsx)("input",{checked:t,className:o.checkbox,onChange:r,type:"checkbox"})]})}const V=t()("Checkbox",["checkbox","container","label"],{checkbox:"A-f8qJ",context:"dNQcC6",ad:"earXxa",hoc:"qAPfQ6",container:"Kr0g3M",label:"_3dML-O"})(z);z.propTypes={checked:L().bool,label:L().string,onChange:L().func,theme:V.themeType.isRequired},z.defaultProps={checked:void 0,label:void 0,onChange:void 0};var Q=V,J=__webpack_require__(715);function Z(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=document.getElementById("react-view"),r=(0,j.jsx)(O.GlobalStateProvider,{initialState:window.ISTATE,children:(0,j.jsx)(K.BrowserRouter,{children:(0,j.jsx)(e,{})})});t.dontHydrate?(0,J.createRoot)(n).render(r):(0,J.hydrateRoot)(n,r)}function ee(e){let{filter:t,label:n,onChange:r,options:o,theme:i,value:a}=e;const l=[(0,j.jsx)("option",{className:i.hiddenOption,children:"‌"},"__reactUtilsHiddenOption")];for(let e=0;e<o.length;++e){let n=o[e];t&&!t(n)||((0,c.isString)(n)&&(n={value:n}),l.push((0,j.jsx)("option",{className:i.option,value:n.value,children:void 0===n.name?n.value:n.name},n.value)))}return(0,j.jsxs)("div",{className:i.container,children:[void 0===n?null:(0,j.jsx)("p",{className:i.label,children:n}),(0,j.jsx)("select",{className:i.select,onChange:r,value:a,children:l}),(0,j.jsx)("div",{className:i.arrow,children:"▼"})]})}const te=t()("Dropdown",["arrow","container","hiddenOption","label","option","select"],{arrow:"-zPK7Y",context:"haRIry",ad:"D4XHG2",hoc:"N3nd34",container:"_9CQpeA",label:"Gv0kyu",hiddenOption:"RdW3yR",select:"JXK1uw"})(ee);ee.propTypes={filter:L().func,label:L().string,onChange:L().func,options:L().arrayOf(L().oneOfType([L().shape({name:L().node,value:L().string.isRequired}),L().string]).isRequired),theme:te.themeType.isRequired,value:L().string},ee.defaultProps={filter:void 0,label:void 0,onChange:void 0,options:[],value:void 0};var ne=te;const re=(0,R.forwardRef)(((e,t)=>{let{label:n,theme:r,...o}=e;return(0,j.jsxs)("span",{className:r.container,children:[void 0===n?null:(0,j.jsx)("p",{className:r.label,children:n}),(0,j.jsx)("input",{className:r.input,ref:t,...o})]})})),oe=t()("Input",["container","input","label"],{container:"Cxx397",context:"X5WszA",ad:"_8s7GCr",hoc:"TVlBYc",input:"M07d4s",label:"gfbdq-"})(re);re.propTypes={label:L().string,theme:oe.themeType.isRequired},re.defaultProps={label:void 0};var ie=oe;function ae(e){let{children:t,leftSidePanelContent:n,rightSidePanelContent:r,theme:o}=e;return(0,j.jsxs)("div",{className:o.container,children:[(0,j.jsx)("div",{className:[o.sidePanel,o.leftSidePanel].join(" "),children:n}),(0,j.jsx)("div",{className:o.mainPanel,children:t}),(0,j.jsx)("div",{className:[o.sidePanel,o.rightSidePanel].join(" "),children:r})]})}const ce=t()("PageLayout",["container","leftSidePanel","mainPanel","rightSidePanel","sidePanel"],{container:"T3cuHB",context:"m4mL-M",ad:"m3-mdC",hoc:"J15Z4H",mainPanel:"pPlQO2",sidePanel:"lqNh4h"})(ae);ae.propTypes={children:L().node,leftSidePanelContent:L().node,rightSidePanelContent:L().node,theme:ce.themeType.isRequired},ae.defaultProps={children:null,leftSidePanelContent:null,rightSidePanelContent:null};var le=ce,se=__webpack_require__(383);const ue=(0,R.createContext)();function _e(e){let{children:t,description:n,image:r,siteName:o,socialDescription:i,socialTitle:a,title:c,url:l}=e;const s=a||c,u=i||n,_=(0,R.useMemo)((()=>({description:n,image:r,siteName:o,socialDescription:i,socialTitle:a,title:c,url:l})),[n,r,o,i,a,c,l]);return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(se.Helmet,{children:[(0,j.jsx)("title",{children:c}),(0,j.jsx)("meta",{name:"description",content:n}),(0,j.jsx)("meta",{name:"twitter:card",content:"summary_large_image"}),(0,j.jsx)("meta",{name:"twitter:title",content:s}),(0,j.jsx)("meta",{name:"twitter:description",content:u}),r?(0,j.jsx)("meta",{name:"twitter:image",content:r}):null,o?(0,j.jsx)("meta",{name:"twitter:site",content:`@${o}`}):null,(0,j.jsx)("meta",{name:"og:title",content:s}),r?(0,j.jsx)("meta",{name:"og:image",content:r}):null,r?(0,j.jsx)("meta",{name:"og:image:alt",content:s}):null,(0,j.jsx)("meta",{name:"og:description",content:u}),o?(0,j.jsx)("meta",{name:"og:sitename",content:o}):null,l?(0,j.jsx)("meta",{name:"og:url",content:l}):null]}),t?(0,j.jsx)(ue.Provider,{value:_,children:t}):null]})}_e.Context=ue,_e.defaultProps={children:null,image:null,siteName:null,socialDescription:null,socialTitle:null,url:null},_e.propTypes={children:L().node,description:L().string.isRequired,image:L().string,siteName:L().string,socialDescription:L().string,socialTitle:L().string,title:L().string.isRequired,url:L().string};var de=__webpack_require__(111),pe=__webpack_require__.n(de);function he(e){let{children:t,onCancel:n,theme:r}=e;const o=(0,R.useRef)(),i=(0,R.useRef)(),[a,c]=(0,R.useState)();(0,R.useEffect)((()=>{const e=document.createElement("div");return document.body.classList.add("scrolling-disabled-by-modal"),document.body.appendChild(e),c(e),()=>{document.body.classList.remove("scrolling-disabled-by-modal"),document.body.removeChild(e)}}),[]);const l=(0,R.useMemo)((()=>(0,j.jsx)("div",{onFocus:()=>{const e=o.current.querySelectorAll("*");for(let t=e.length-1;t>=0;--t)if(e[t].focus(),document.activeElement===e[t])return;i.current.focus()},tabIndex:"0"})),[]);return a?pe().createPortal((0,j.jsxs)(j.Fragment,{children:[l,(0,j.jsx)("div",{"aria-label":"Cancel",className:r.overlay,onClick:()=>n(),onKeyDown:e=>{"Escape"===e.key&&n()},ref:e=>{e&&e!==i.current&&(i.current=e,e.focus())},role:"button",tabIndex:"0"}),(0,j.jsx)("div",{"aria-modal":"true",className:r.container,onWheel:e=>e.stopPropagation(),ref:o,role:"dialog",children:t}),(0,j.jsx)("div",{onFocus:()=>{i.current.focus()},tabIndex:"0"}),l]}),a):null}const fe=t()("Modal",["container","overlay"],{overlay:"ye2BZo",context:"Szmbbz",ad:"Ah-Nsc",hoc:"Wki41G",container:"gyZ4rc"})(he);he.propTypes={onCancel:L().func,children:L().node,theme:fe.themeType.isRequired},he.defaultProps={onCancel:c.noop,children:null};var me=fe;function be(e){return(0,j.jsx)(Y,{...e,routerLinkType:K.NavLink})}function Ee(e){let{children:t,className:n,ratio:r}=e;const o=r.split(":"),i=100*o[1]/o[0]+"%",a=(0,j.jsx)("div",{style:{paddingBottom:i},className:"EznFz3",children:(0,j.jsx)("div",{className:"_0vb7tq",children:t})});return n?(0,j.jsx)("div",{className:n,children:a}):a}function we(e){let{theme:t}=e;return(0,j.jsxs)("span",{className:(t.container?t.container+" ":"")+"_7zdld4",children:[(0,j.jsx)("span",{className:(t.circle?t.circle+" ":"")+"dBrB4g"}),(0,j.jsx)("span",{className:(t.circle?t.circle+" ":"")+"dBrB4g"}),(0,j.jsx)("span",{className:(t.circle?t.circle+" ":"")+"dBrB4g"})]})}Ee.defaultProps={children:null,className:null,ratio:"1:1"},Ee.propTypes={children:L().node,className:L().string,ratio:L().string},we.defaultProps={theme:{}},we.propTypes={theme:L().shape({container:L().string,circle:L().string})};var ve=t()("Throbber",["circle","container"],{container:"_7zdld4",context:"uIObt7",ad:"XIxe9o",hoc:"YOyORH",circle:"dBrB4g",bouncing:"TJe-6j"})(we);const ge={ABOVE_CURSOR:"ABOVE_CURSOR",ABOVE_ELEMENT:"ABOVE_ELEMENT",BELOW_CURSOR:"BELOW_CURSOR",BELOW_ELEMENT:"BELOW_ELEMENT"},ye=["border-bottom-color:transparent","border-left-color:transparent","border-right-color:transparent"].join(";"),xe=["border-top-color:transparent","border-left-color:transparent","border-right-color:transparent"].join(";");const Te=(0,R.forwardRef)(((e,t)=>{let{children:n,theme:r}=e;const[o,i]=(0,R.useState)(null),a=(e,t,n,r)=>o&&function(e,t,n,r,o){const i=function(e){return{arrow:e.arrow.getBoundingClientRect(),container:e.container.getBoundingClientRect()}}(o),a=function(){const{pageXOffset:e,pageYOffset:t}=window,{documentElement:{clientHeight:n,clientWidth:r}}=document;return{left:e,right:e+r,top:t,bottom:t+n}}(),c=function(e,t,n){const{arrow:r,container:o}=n;return{arrowX:.5*(o.width-r.width),arrowY:o.height,containerX:e-o.width/2,containerY:t-o.height-r.height/1.5,baseArrowStyle:ye}}(e,t,i);if(c.containerX<a.left+6)c.containerX=a.left+6,c.arrowX=Math.max(6,e-c.containerX-i.arrow.width/2);else{const t=a.right-6-i.container.width;c.containerX>t&&(c.containerX=t,c.arrowX=Math.min(i.container.width-6,e-c.containerX-i.arrow.width/2))}c.containerY<a.top+6&&(c.containerY+=i.container.height+2*i.arrow.height,c.arrowY-=i.container.height+i.arrow.height,c.baseArrowStyle=xe);const l=`left:${c.containerX}px;top:${c.containerY}px`;o.container.setAttribute("style",l);const s=`${c.baseArrowStyle};left:${c.arrowX}px;top:${c.arrowY}px`;o.arrow.setAttribute("style",s)}(e,t,0,0,o);return(0,R.useImperativeHandle)(t,(()=>({pointTo:a}))),(0,R.useEffect)((()=>{const e=function(e){const t=document.createElement("div");e.arrow&&t.setAttribute("class",e.arrow);const n=document.createElement("div");e.content&&n.setAttribute("class",e.content);const r=document.createElement("div");return e.container&&r.setAttribute("class",e.container),r.appendChild(t),r.appendChild(n),document.body.appendChild(r),{container:r,arrow:t,content:n}}(r);return i(e),()=>{document.body.removeChild(e.container),i(null)}}),[r]),o?(0,de.createPortal)(n,o.content):null}));Te.propTypes={children:L().node,theme:L().shape().isRequired},Te.defaultProps={children:null};var ke=Te;function Ce(e){let{children:t,placement:n,tip:r,theme:o}=e;const i=(0,R.useRef)(),a=(0,R.useRef)(),[c,l]=(0,R.useState)(!1);return(0,R.useEffect)((()=>{if(c&&null!==r){const e=()=>l(!1);return window.addEventListener("scroll",e),()=>window.removeEventListener("scroll",e)}}),[c,r]),(0,j.jsxs)("div",{className:o.wrapper,onMouseLeave:()=>l(!1),onMouseMove:e=>((e,t)=>{if(c){const r=a.current.getBoundingClientRect();e<r.left||e>r.right||t<r.top||t>r.bottom?l(!1):i.current&&i.current.pointTo(e+window.pageXOffset,t+window.pageYOffset,n,a.current)}else l(!0)})(e.clientX,e.clientY),ref:a,children:[c&&null!==r?(0,j.jsx)(ke,{ref:i,theme:o,children:r}):null,t]})}const Pe=t()("WithTooltip",["appearance","arrow","container","content","wrapper"],{arrow:"M9gywF",ad:"_4xT7zE",hoc:"zd-vnH",context:"GdZucr",container:"f9gY8K",appearance:"L4ubm-",wrapper:"_4qDBRM"})(Ce);Pe.PLACEMENTS=ge,Ce.propTypes={children:L().node,placement:L().oneOf(Object.values(ge)),theme:Pe.themeType.isRequired,tip:L().node},Ce.defaultProps={children:null,placement:ge.ABOVE_CURSOR,tip:null};var Ne=Pe,Se=__webpack_require__(656),qe=__webpack_require__.n(Se),Re={container:"jTxmOX",context:"dzIcLh",ad:"_5a9XX1",hoc:"_7sH52O"};function Ae(e){let{autoplay:t,src:n,theme:r,title:o}=e,[i,a]=n.split("?");a=a?qe().parse(a):{};const c=a.v||i.match(/\/([a-zA-Z0-9-_]*)$/)[1];return i=`https://www.youtube.com/embed/${c}`,delete a.v,a.autoplay=t?1:0,i+=`?${qe().stringify(a)}`,(0,j.jsxs)(Ee,{className:r.container,ratio:"16:9",children:[(0,j.jsx)(ve,{theme:Re}),(0,j.jsx)("iframe",{allow:"autoplay",allowFullScreen:!0,className:r.video,src:i,title:o})]})}const Le=t()("YouTubeVideo",["container","video"],{container:"sXHM81",context:"veKyYi",ad:"r3ABzd",hoc:"YKcPnR",video:"SlV2zw"})(Ae);Ae.propTypes={autoplay:L().bool,src:L().string.isRequired,theme:Le.themeType.isRequired,title:L().string},Ae.defaultProps={autoplay:!1,title:""};var Oe=Le;const je=n.requireWeak("./server","/")}(),__webpack_exports__}()}));
2
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@babel/runtime/helpers/classPrivateFieldGet"),require("@babel/runtime/helpers/classPrivateFieldSet"),require("@dr.pogodin/react-global-state"),require("@dr.pogodin/react-themes"),require("axios"),require("dayjs"),require("lodash"),require("prop-types"),require("qs"),require("react"),require("react-dom"),require("react-dom/client"),require("react-helmet"),require("react-router-dom")):"function"==typeof define&&define.amd?define(["@babel/runtime/helpers/classPrivateFieldGet","@babel/runtime/helpers/classPrivateFieldSet","@dr.pogodin/react-global-state","@dr.pogodin/react-themes","axios","dayjs","lodash","prop-types","qs","react","react-dom","react-dom/client","react-helmet","react-router-dom"],t):"object"==typeof exports?exports["@dr.pogodin/react-utils"]=t(require("@babel/runtime/helpers/classPrivateFieldGet"),require("@babel/runtime/helpers/classPrivateFieldSet"),require("@dr.pogodin/react-global-state"),require("@dr.pogodin/react-themes"),require("axios"),require("dayjs"),require("lodash"),require("prop-types"),require("qs"),require("react"),require("react-dom"),require("react-dom/client"),require("react-helmet"),require("react-router-dom")):e["@dr.pogodin/react-utils"]=t(e["@babel/runtime/helpers/classPrivateFieldGet"],e["@babel/runtime/helpers/classPrivateFieldSet"],e["@dr.pogodin/react-global-state"],e["@dr.pogodin/react-themes"],e.axios,e.dayjs,e.lodash,e["prop-types"],e.qs,e.react,e["react-dom"],e["react-dom/client"],e["react-helmet"],e["react-router-dom"])}("undefined"!=typeof self?self:this,(function(__WEBPACK_EXTERNAL_MODULE__226__,__WEBPACK_EXTERNAL_MODULE__556__,__WEBPACK_EXTERNAL_MODULE__899__,__WEBPACK_EXTERNAL_MODULE__198__,__WEBPACK_EXTERNAL_MODULE__300__,__WEBPACK_EXTERNAL_MODULE__760__,__WEBPACK_EXTERNAL_MODULE__467__,__WEBPACK_EXTERNAL_MODULE__99__,__WEBPACK_EXTERNAL_MODULE__656__,__WEBPACK_EXTERNAL_MODULE__156__,__WEBPACK_EXTERNAL_MODULE__111__,__WEBPACK_EXTERNAL_MODULE__715__,__WEBPACK_EXTERNAL_MODULE__383__,__WEBPACK_EXTERNAL_MODULE__128__){return function(){"use strict";var __webpack_modules__={450:function(e,t,n){n.r(t),n.d(t,{IS_CLIENT_SIDE:function(){return r},IS_SERVER_SIDE:function(){return o},buildTimestamp:function(){return l},getBuildInfo:function(){return c},isDevBuild:function(){return i},isProdBuild:function(){return a}});const r="object"!=typeof process||!process.versions||!process.versions.node||!!n.g.REACT_UTILS_FORCE_CLIENT_SIDE,o=!r;function i(){return!1}function a(){return!0}function c(){return(r?window:n.g).TRU_BUILD_INFO}function l(){return c().timestamp}},869:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{requireWeak:function(){return requireWeak},resolveWeak:function(){return resolveWeak}});var _isomorphy__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(450);function requireWeak(modulePath,basePath){if(_isomorphy__WEBPACK_IMPORTED_MODULE_0__.IS_CLIENT_SIDE)return null;try{const{resolve:resolve}=eval("require")("path"),path=basePath?resolve(basePath,modulePath):modulePath,{default:def,...named}=eval("require")(path);return def?(Object.entries(named).forEach((e=>{let[t,n]=e;if(def[t])throw Error("Conflict between default and named exports");def[t]=n})),def):named}catch{return null}}function resolveWeak(e){return e}},251:function(e,t,n){var r=n(156),o=Symbol.for("react.element"),i=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,c=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function s(e,t,n){var r,i={},s=null,u=null;for(r in void 0!==n&&(s=""+n),void 0!==t.key&&(s=""+t.key),void 0!==t.ref&&(u=t.ref),t)a.call(t,r)&&!l.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:o,type:e,key:s,ref:u,props:i,_owner:c.current}}t.Fragment=i,t.jsx=s,t.jsxs=s},893:function(e,t,n){e.exports=n(251)},226:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__226__},556:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__556__},899:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__899__},198:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__198__},300:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__300__},760:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__760__},467:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__467__},99:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__99__},656:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__656__},156:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__156__},111:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__111__},715:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__715__},383:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__383__},128:function(e){e.exports=__WEBPACK_EXTERNAL_MODULE__128__}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var n=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](n,n.exports,__webpack_require__),n.exports}__webpack_require__.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=function(e,t){for(var n in t)__webpack_require__.o(t,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};return function(){__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Barrier:function(){return w},BaseModal:function(){return he},Button:function(){return $},Checkbox:function(){return Q},Dropdown:function(){return ne},Emitter:function(){return x},GlobalStateProvider:function(){return s.GlobalStateProvider},Input:function(){return ie},JU:function(){return W},Link:function(){return G},MetaTags:function(){return _e},Modal:function(){return me},NavLink:function(){return be},PT:function(){return L},PageLayout:function(){return le},ScalableRect:function(){return Ee},Semaphore:function(){return R},ThemeProvider:function(){return e.ThemeProvider},Throbber:function(){return ve},WithTooltip:function(){return Se},YouTubeVideo:function(){return Oe},api:function(){return I()},client:function(){return Z},config:function(){return r},getGlobalState:function(){return s.getGlobalState},getSsrContext:function(){return s.getSsrContext},isomorphy:function(){return o},newBarrier:function(){return v},server:function(){return je},splitComponent:function(){return D},themed:function(){return t()},time:function(){return y},useAsyncCollection:function(){return s.useAsyncCollection},useAsyncData:function(){return s.useAsyncData},useGlobalState:function(){return s.useGlobalState},webpack:function(){return n},withRetries:function(){return U}});var e=__webpack_require__(198),t=__webpack_require__.n(e),n=__webpack_require__(869),r=(0,n.requireWeak)("config")||window.CONFIG||{},o=__webpack_require__(450),i=__webpack_require__(760),a=__webpack_require__.n(i),c=__webpack_require__(467),l=__webpack_require__(156),s=__webpack_require__(899),u=__webpack_require__(226),_=__webpack_require__.n(u),d=__webpack_require__(556),p=__webpack_require__.n(d);function h(e,t,n){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,n)}var f=new WeakMap,m=new WeakMap,b=new WeakMap,E=new WeakMap;class w extends Promise{constructor(e){let t,n;super(((r,o)=>{t=e=>{r(e),p()(this,m,!0)},n=e=>{o(e),p()(this,E,!0)},e&&e(t,n)})),h(this,f,{writable:!0,value:void 0}),h(this,m,{writable:!0,value:!1}),h(this,b,{writable:!0,value:void 0}),h(this,E,{writable:!0,value:!1}),p()(this,f,t),p()(this,b,n)}get resolve(){return _()(this,f)}get resolved(){return _()(this,m)}get reject(){return _()(this,b)}get rejected(){return _()(this,E)}then(e,t){const n=super.then(e,t);return p()(n,f,_()(this,f)),p()(n,b,_()(this,b)),n}}function v(e){return new w(e)}async function g(e){const t=new w;if(e>0){const n=setTimeout(t.resolve.bind(t),e);t.abort=()=>clearTimeout(n)}else t.abort=c.noop,t.resolve();return t}a().SEC_MS=1e3,a().MIN_MS=60*a().SEC_MS,a().HOUR_MS=60*a().MIN_MS,a().DAY_MS=24*a().HOUR_MS,a().YEAR_MS=365*a().DAY_MS,a().now=Date.now,a().timer=g,a().useCurrent=function(){let{autorefresh:e=!1,globalStatePath:t="currentTime",precision:n=5*a().SEC_MS}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const[r,o]=(0,s.useGlobalState)(t,Date.now);return(0,l.useEffect)((()=>{let t;const r=()=>{o((e=>{const t=Date.now();return Math.abs(t-e)>n?t:e})),e&&(t=setTimeout(r,n))};return r(),()=>{t&&clearTimeout(t)}}),[e,n,o]),r};var y=a();class x{constructor(){this.listeners=[]}get hasListeners(){return!!this.listeners.length}addListener(e){return this.listeners.includes(e)||this.listeners.push(e),()=>this.removeListener(e)}emit(){const{listeners:e}=this;for(let t=0;t<e.length;++t)e[t](...arguments)}removeListener(e){const t=this.listeners.indexOf(e);t>=0&&this.listeners.splice(t,1)}}function T(e,t,n){k(e,t),t.set(e,n)}function k(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function C(e,t,n){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return n}var P=new WeakSet,S=new WeakMap,N=new WeakMap,q=new WeakMap;class R{constructor(e){var t;k(this,t=P),t.add(this),T(this,S,{writable:!0,value:!1}),T(this,N,{writable:!0,value:[]}),T(this,q,{writable:!0,value:void 0}),p()(this,q,!!e)}get ready(){return _()(this,q)}setReady(e){const t=!!e;_()(this,q)!==t&&(p()(this,q,t),t&&!_()(this,S)&&C(this,P,A).call(this))}async seize(){await this.waitReady(),this.setReady(!1)}async waitReady(){if(!_()(this,q)||_()(this,N).length){const e=v();_()(this,N).push(e),await e,_()(this,N).shift()}}}function A(){if(_()(this,q)&&_()(this,N).length&&(_()(this,N)[0].resolve(),_()(this,N).length))return setTimeout(C(this,P,A).bind(this)),void p()(this,S,!0);p()(this,S,!1)}var L=__webpack_require__(99),O=__webpack_require__.n(L),j=__webpack_require__(893);function M(e){let{children:t,chunkName:n,getComponent:r,placeholder:i,...a}=e;const{current:c}=(0,l.useRef)({mounted:!1,pendingStyles:[]}),{publicPath:u}=(0,o.getBuildInfo)(),_=(0,l.lazy)((async()=>{const e=await r();return c.pendingStyles.length&&await Promise.all(c.pendingStyles),e.default?e:{default:e}}));if(o.IS_SERVER_SIDE){const{chunks:e}=(0,s.getGlobalState)().ssrContext;if(e.includes(n))throw Error(`Chunk name clash for "${n}"`);e.push(n)}else c.mounted||(c.mounted=!0,window.CHUNK_GROUPS[n].forEach((e=>{if(!e.endsWith(".css"))return;const t=`${u}/${e}`;let n=document.querySelector(`link[href="${t}"]`);if(!n){n=document.createElement("link"),n.setAttribute("href",t),n.setAttribute("rel","stylesheet");const e=v();n.onload=e.resolve,n.onerror=e.resolve,c.pendingStyles.push(e),document.querySelector("head").appendChild(n)}window.STYLESHEET_USAGE_COUNTERS||={},window.STYLESHEET_USAGE_COUNTERS[t]||=0,++window.STYLESHEET_USAGE_COUNTERS[t]})));return(0,l.useEffect)((()=>()=>{c.mounted=!1,window.CHUNK_GROUPS[n].forEach((e=>{if(!e.endsWith(".css"))return;const t=`${u}/${e}`;if(--window.STYLESHEET_USAGE_COUNTERS[t]<=0){const e=document.querySelector(`link[href="${t}"]`);document.querySelector("head").removeChild(e)}}))}),[n,c,u]),(0,j.jsx)(l.Suspense,{fallback:i,children:(0,j.jsx)(_,{...a,children:t})})}function D(e){let{chunkName:t,getComponent:n,placeholder:r}=e;return function(){let{children:e,...o}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,l.createElement)(M,{...o,chunkName:t,getComponent:n,placeholder:r},e)}}let B;M.propTypes={children:O().node,chunkName:O().string.isRequired,getComponent:O().func.isRequired,placeholder:O().node},M.defaultProps={children:void 0,placeholder:void 0},t().COMPOSE=e.COMPOSE,t().PRIORITY=e.PRIORITY;try{B=process.env.NODE_CONFIG_ENV}catch{}const W="production"!==(B||"production")&&n.requireWeak("./jest","/");async function U(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e3;for(let r=1;;++r)try{return await e()}catch(e){if(!(r<t))throw e;await g(n)}}var X=__webpack_require__(300),I=__webpack_require__.n(X),K=__webpack_require__(128);function Y(e){let{children:t,className:n,disabled:r,enforceA:o,keepScrollPosition:i,onClick:a,onMouseDown:c,openNewTab:s,replace:u,routerLinkType:_,to:d,...p}=e;return r||o||s||d.match(/^(#|(https?|mailto):)/)?(0,j.jsx)("a",{className:(n?n+" ":"")+"zH52sA",disabled:r,href:d,onClick:r?e=>e.preventDefault():a,onMouseDown:r?e=>e.preventDefault():c,rel:"noopener noreferrer",target:s?"_blank":"",children:t}):(0,l.createElement)(_,{className:n,disabled:r,onMouseDown:c,replace:u,to:d,onClick:e=>{a&&a(e),i||window.scroll(0,0)},...p},t)}function G(e){return(0,j.jsx)(Y,{...e,routerLinkType:K.Link})}function F(e){let{active:t,children:n,disabled:r,enforceA:o,onClick:i,onMouseDown:a,openNewTab:c,replace:l,theme:s,to:u}=e,_=s.button;return t&&s.active&&(_+=` ${s.active}`),r?(s.disabled&&(_+=` ${s.disabled}`),(0,j.jsx)("div",{className:_,children:n})):u?(0,j.jsx)(G,{className:_,enforceA:o,onClick:i,onMouseDown:a,openNewTab:c,replace:l,to:u,children:n}):(0,j.jsx)("div",{className:_,onClick:i,onKeyPress:i,onMouseDown:a,role:"button",tabIndex:0,children:n})}Y.defaultProps={children:null,className:null,disabled:!1,enforceA:!1,keepScrollPosition:!1,onClick:null,onMouseDown:null,openNewTab:!1,replace:!1,to:""},Y.propTypes={children:O().node,className:O().string,disabled:O().bool,enforceA:O().bool,keepScrollPosition:O().bool,onClick:O().func,onMouseDown:O().func,openNewTab:O().bool,replace:O().bool,routerLinkType:O().elementType.isRequired,to:O().oneOfType([O().object,O().string])};const H=t()("Button",["active","button","disabled"],{button:"E1FNQT",context:"KM0v4f",ad:"_3jm1-Q",hoc:"_0plpDL",active:"MAe9O6",disabled:"Br9IWV"})(F);F.defaultProps={active:!1,children:void 0,disabled:!1,enforceA:!1,onClick:void 0,onMouseDown:void 0,openNewTab:!1,replace:!1,to:void 0},F.propTypes={active:O().bool,children:O().node,disabled:O().bool,enforceA:O().bool,onClick:O().func,onMouseDown:O().func,openNewTab:O().bool,replace:O().bool,theme:H.themeType.isRequired,to:O().oneOfType([O().object,O().string])};var $=H;function z(e){let{checked:t,label:n,onChange:r,theme:o}=e;return(0,j.jsxs)("div",{className:o.container,children:[void 0===n?null:(0,j.jsx)("p",{className:o.label,children:n}),(0,j.jsx)("input",{checked:t,className:o.checkbox,onChange:r,type:"checkbox"})]})}const V=t()("Checkbox",["checkbox","container","label"],{checkbox:"A-f8qJ",context:"dNQcC6",ad:"earXxa",hoc:"qAPfQ6",container:"Kr0g3M",label:"_3dML-O"})(z);z.propTypes={checked:O().bool,label:O().string,onChange:O().func,theme:V.themeType.isRequired},z.defaultProps={checked:void 0,label:void 0,onChange:void 0};var Q=V,J=__webpack_require__(715);function Z(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=document.getElementById("react-view"),r=(0,j.jsx)(s.GlobalStateProvider,{initialState:window.ISTATE,children:(0,j.jsx)(K.BrowserRouter,{children:(0,j.jsx)(e,{})})});t.dontHydrate?(0,J.createRoot)(n).render(r):(0,J.hydrateRoot)(n,r)}function ee(e){let{filter:t,label:n,onChange:r,options:o,theme:i,value:a}=e;const l=[(0,j.jsx)("option",{className:i.hiddenOption,children:"‌"},"__reactUtilsHiddenOption")];for(let e=0;e<o.length;++e){let n=o[e];t&&!t(n)||((0,c.isString)(n)&&(n={value:n}),l.push((0,j.jsx)("option",{className:i.option,value:n.value,children:void 0===n.name?n.value:n.name},n.value)))}return(0,j.jsxs)("div",{className:i.container,children:[void 0===n?null:(0,j.jsx)("p",{className:i.label,children:n}),(0,j.jsx)("select",{className:i.select,onChange:r,value:a,children:l}),(0,j.jsx)("div",{className:i.arrow,children:"▼"})]})}const te=t()("Dropdown",["arrow","container","hiddenOption","label","option","select"],{arrow:"-zPK7Y",context:"haRIry",ad:"D4XHG2",hoc:"N3nd34",container:"_9CQpeA",label:"Gv0kyu",hiddenOption:"RdW3yR",select:"JXK1uw"})(ee);ee.propTypes={filter:O().func,label:O().string,onChange:O().func,options:O().arrayOf(O().oneOfType([O().shape({name:O().node,value:O().string.isRequired}),O().string]).isRequired),theme:te.themeType.isRequired,value:O().string},ee.defaultProps={filter:void 0,label:void 0,onChange:void 0,options:[],value:void 0};var ne=te;const re=(0,l.forwardRef)(((e,t)=>{let{label:n,theme:r,...o}=e;return(0,j.jsxs)("span",{className:r.container,children:[void 0===n?null:(0,j.jsx)("p",{className:r.label,children:n}),(0,j.jsx)("input",{className:r.input,ref:t,...o})]})})),oe=t()("Input",["container","input","label"],{container:"Cxx397",context:"X5WszA",ad:"_8s7GCr",hoc:"TVlBYc",input:"M07d4s",label:"gfbdq-"})(re);re.propTypes={label:O().string,theme:oe.themeType.isRequired},re.defaultProps={label:void 0};var ie=oe;function ae(e){let{children:t,leftSidePanelContent:n,rightSidePanelContent:r,theme:o}=e;return(0,j.jsxs)("div",{className:o.container,children:[(0,j.jsx)("div",{className:[o.sidePanel,o.leftSidePanel].join(" "),children:n}),(0,j.jsx)("div",{className:o.mainPanel,children:t}),(0,j.jsx)("div",{className:[o.sidePanel,o.rightSidePanel].join(" "),children:r})]})}const ce=t()("PageLayout",["container","leftSidePanel","mainPanel","rightSidePanel","sidePanel"],{container:"T3cuHB",context:"m4mL-M",ad:"m3-mdC",hoc:"J15Z4H",mainPanel:"pPlQO2",sidePanel:"lqNh4h"})(ae);ae.propTypes={children:O().node,leftSidePanelContent:O().node,rightSidePanelContent:O().node,theme:ce.themeType.isRequired},ae.defaultProps={children:null,leftSidePanelContent:null,rightSidePanelContent:null};var le=ce,se=__webpack_require__(383);const ue=(0,l.createContext)();function _e(e){let{children:t,description:n,image:r,siteName:o,socialDescription:i,socialTitle:a,title:c,url:s}=e;const u=a||c,_=i||n,d=(0,l.useMemo)((()=>({description:n,image:r,siteName:o,socialDescription:i,socialTitle:a,title:c,url:s})),[n,r,o,i,a,c,s]);return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(se.Helmet,{children:[(0,j.jsx)("title",{children:c}),(0,j.jsx)("meta",{name:"description",content:n}),(0,j.jsx)("meta",{name:"twitter:card",content:"summary_large_image"}),(0,j.jsx)("meta",{name:"twitter:title",content:u}),(0,j.jsx)("meta",{name:"twitter:description",content:_}),r?(0,j.jsx)("meta",{name:"twitter:image",content:r}):null,o?(0,j.jsx)("meta",{name:"twitter:site",content:`@${o}`}):null,(0,j.jsx)("meta",{name:"og:title",content:u}),r?(0,j.jsx)("meta",{name:"og:image",content:r}):null,r?(0,j.jsx)("meta",{name:"og:image:alt",content:u}):null,(0,j.jsx)("meta",{name:"og:description",content:_}),o?(0,j.jsx)("meta",{name:"og:sitename",content:o}):null,s?(0,j.jsx)("meta",{name:"og:url",content:s}):null]}),t?(0,j.jsx)(ue.Provider,{value:d,children:t}):null]})}_e.Context=ue,_e.defaultProps={children:null,image:null,siteName:null,socialDescription:null,socialTitle:null,url:null},_e.propTypes={children:O().node,description:O().string.isRequired,image:O().string,siteName:O().string,socialDescription:O().string,socialTitle:O().string,title:O().string.isRequired,url:O().string};var de=__webpack_require__(111),pe=__webpack_require__.n(de);function he(e){let{children:t,onCancel:n,theme:r}=e;const o=(0,l.useRef)(),i=(0,l.useRef)(),[a,c]=(0,l.useState)();(0,l.useEffect)((()=>{const e=document.createElement("div");return document.body.classList.add("scrolling-disabled-by-modal"),document.body.appendChild(e),c(e),()=>{document.body.classList.remove("scrolling-disabled-by-modal"),document.body.removeChild(e)}}),[]);const s=(0,l.useMemo)((()=>(0,j.jsx)("div",{onFocus:()=>{const e=o.current.querySelectorAll("*");for(let t=e.length-1;t>=0;--t)if(e[t].focus(),document.activeElement===e[t])return;i.current.focus()},tabIndex:"0"})),[]);return a?pe().createPortal((0,j.jsxs)(j.Fragment,{children:[s,(0,j.jsx)("div",{"aria-label":"Cancel",className:r.overlay,onClick:()=>n(),onKeyDown:e=>{"Escape"===e.key&&n()},ref:e=>{e&&e!==i.current&&(i.current=e,e.focus())},role:"button",tabIndex:"0"}),(0,j.jsx)("div",{"aria-modal":"true",className:r.container,onWheel:e=>e.stopPropagation(),ref:o,role:"dialog",children:t}),(0,j.jsx)("div",{onFocus:()=>{i.current.focus()},tabIndex:"0"}),s]}),a):null}const fe=t()("Modal",["container","overlay"],{overlay:"ye2BZo",context:"Szmbbz",ad:"Ah-Nsc",hoc:"Wki41G",container:"gyZ4rc"})(he);he.propTypes={onCancel:O().func,children:O().node,theme:fe.themeType.isRequired},he.defaultProps={onCancel:c.noop,children:null};var me=fe;function be(e){return(0,j.jsx)(Y,{...e,routerLinkType:K.NavLink})}function Ee(e){let{children:t,className:n,ratio:r}=e;const o=r.split(":"),i=100*o[1]/o[0]+"%",a=(0,j.jsx)("div",{style:{paddingBottom:i},className:"EznFz3",children:(0,j.jsx)("div",{className:"_0vb7tq",children:t})});return n?(0,j.jsx)("div",{className:n,children:a}):a}function we(e){let{theme:t}=e;return(0,j.jsxs)("span",{className:(t.container?t.container+" ":"")+"_7zdld4",children:[(0,j.jsx)("span",{className:(t.circle?t.circle+" ":"")+"dBrB4g"}),(0,j.jsx)("span",{className:(t.circle?t.circle+" ":"")+"dBrB4g"}),(0,j.jsx)("span",{className:(t.circle?t.circle+" ":"")+"dBrB4g"})]})}Ee.defaultProps={children:null,className:null,ratio:"1:1"},Ee.propTypes={children:O().node,className:O().string,ratio:O().string},we.defaultProps={theme:{}},we.propTypes={theme:O().shape({container:O().string,circle:O().string})};var ve=t()("Throbber",["circle","container"],{container:"_7zdld4",context:"uIObt7",ad:"XIxe9o",hoc:"YOyORH",circle:"dBrB4g",bouncing:"TJe-6j"})(we);const ge={ABOVE_CURSOR:"ABOVE_CURSOR",ABOVE_ELEMENT:"ABOVE_ELEMENT",BELOW_CURSOR:"BELOW_CURSOR",BELOW_ELEMENT:"BELOW_ELEMENT"},ye=["border-bottom-color:transparent","border-left-color:transparent","border-right-color:transparent"].join(";"),xe=["border-top-color:transparent","border-left-color:transparent","border-right-color:transparent"].join(";");const Te=(0,l.forwardRef)(((e,t)=>{let{children:n,theme:r}=e;const[o,i]=(0,l.useState)(null),a=(e,t,n,r)=>o&&function(e,t,n,r,o){const i=function(e){return{arrow:e.arrow.getBoundingClientRect(),container:e.container.getBoundingClientRect()}}(o),a=function(){const{pageXOffset:e,pageYOffset:t}=window,{documentElement:{clientHeight:n,clientWidth:r}}=document;return{left:e,right:e+r,top:t,bottom:t+n}}(),c=function(e,t,n){const{arrow:r,container:o}=n;return{arrowX:.5*(o.width-r.width),arrowY:o.height,containerX:e-o.width/2,containerY:t-o.height-r.height/1.5,baseArrowStyle:ye}}(e,t,i);if(c.containerX<a.left+6)c.containerX=a.left+6,c.arrowX=Math.max(6,e-c.containerX-i.arrow.width/2);else{const t=a.right-6-i.container.width;c.containerX>t&&(c.containerX=t,c.arrowX=Math.min(i.container.width-6,e-c.containerX-i.arrow.width/2))}c.containerY<a.top+6&&(c.containerY+=i.container.height+2*i.arrow.height,c.arrowY-=i.container.height+i.arrow.height,c.baseArrowStyle=xe);const l=`left:${c.containerX}px;top:${c.containerY}px`;o.container.setAttribute("style",l);const s=`${c.baseArrowStyle};left:${c.arrowX}px;top:${c.arrowY}px`;o.arrow.setAttribute("style",s)}(e,t,0,0,o);return(0,l.useImperativeHandle)(t,(()=>({pointTo:a}))),(0,l.useEffect)((()=>{const e=function(e){const t=document.createElement("div");e.arrow&&t.setAttribute("class",e.arrow);const n=document.createElement("div");e.content&&n.setAttribute("class",e.content);const r=document.createElement("div");return e.container&&r.setAttribute("class",e.container),r.appendChild(t),r.appendChild(n),document.body.appendChild(r),{container:r,arrow:t,content:n}}(r);return i(e),()=>{document.body.removeChild(e.container),i(null)}}),[r]),o?(0,de.createPortal)(n,o.content):null}));Te.propTypes={children:O().node,theme:O().shape().isRequired},Te.defaultProps={children:null};var ke=Te;function Ce(e){let{children:t,placement:n,tip:r,theme:o}=e;const i=(0,l.useRef)(),a=(0,l.useRef)(),[c,s]=(0,l.useState)(!1);return(0,l.useEffect)((()=>{if(c&&null!==r){const e=()=>s(!1);return window.addEventListener("scroll",e),()=>window.removeEventListener("scroll",e)}}),[c,r]),(0,j.jsxs)("div",{className:o.wrapper,onMouseLeave:()=>s(!1),onMouseMove:e=>((e,t)=>{if(c){const r=a.current.getBoundingClientRect();e<r.left||e>r.right||t<r.top||t>r.bottom?s(!1):i.current&&i.current.pointTo(e+window.pageXOffset,t+window.pageYOffset,n,a.current)}else s(!0)})(e.clientX,e.clientY),ref:a,children:[c&&null!==r?(0,j.jsx)(ke,{ref:i,theme:o,children:r}):null,t]})}const Pe=t()("WithTooltip",["appearance","arrow","container","content","wrapper"],{arrow:"M9gywF",ad:"_4xT7zE",hoc:"zd-vnH",context:"GdZucr",container:"f9gY8K",appearance:"L4ubm-",wrapper:"_4qDBRM"})(Ce);Pe.PLACEMENTS=ge,Ce.propTypes={children:O().node,placement:O().oneOf(Object.values(ge)),theme:Pe.themeType.isRequired,tip:O().node},Ce.defaultProps={children:null,placement:ge.ABOVE_CURSOR,tip:null};var Se=Pe,Ne=__webpack_require__(656),qe=__webpack_require__.n(Ne),Re={container:"jTxmOX",context:"dzIcLh",ad:"_5a9XX1",hoc:"_7sH52O"};function Ae(e){let{autoplay:t,src:n,theme:r,title:o}=e,[i,a]=n.split("?");a=a?qe().parse(a):{};const c=a.v||i.match(/\/([a-zA-Z0-9-_]*)$/)[1];return i=`https://www.youtube.com/embed/${c}`,delete a.v,a.autoplay=t?1:0,i+=`?${qe().stringify(a)}`,(0,j.jsxs)(Ee,{className:r.container,ratio:"16:9",children:[(0,j.jsx)(ve,{theme:Re}),(0,j.jsx)("iframe",{allow:"autoplay",allowFullScreen:!0,className:r.video,src:i,title:o})]})}const Le=t()("YouTubeVideo",["container","video"],{container:"sXHM81",context:"veKyYi",ad:"r3ABzd",hoc:"YKcPnR",video:"SlV2zw"})(Ae);Ae.propTypes={autoplay:O().bool,src:O().string.isRequired,theme:Le.themeType.isRequired,title:O().string},Ae.defaultProps={autoplay:!1,title:""};var Oe=Le;const je=n.requireWeak("./server","/")}(),__webpack_exports__}()}));
3
3
  //# sourceMappingURL=web.bundle.js.map