From b1229f9214ecd2646e5084b4b2d07f321b5c9515 Mon Sep 17 00:00:00 2001 From: Ricky Patel Date: Fri, 11 Mar 2022 19:19:19 -0800 Subject: [PATCH] #397: Added playgrounds to doc site --- docs/0.60a3b0c3.iframe.bundle.js | 255 +- docs/0.735c46de4979e48773c9.manager.bundle.js | 2 + ...979e48773c9.manager.bundle.js.LICENSE.txt} | 0 docs/0.9badb1b633b6cc87c4d7.manager.bundle.js | 3060 - docs/1.52392f60ef6b7acc3a2b.manager.bundle.js | 1 + docs/4.d1f984030e3983670c86.manager.bundle.js | 4326 - docs/5.a088b92742d2cd1d1ce8.manager.bundle.js | 5639 - docs/5.b02e262080963d4d48b7.manager.bundle.js | 1 + docs/6.1df326893cc27df85a9c.manager.bundle.js | 7369 - docs/6.a67260176351c801b158.manager.bundle.js | 2 + ...351c801b158.manager.bundle.js.LICENSE.txt} | 0 docs/7.a67e246fa7e75f516751.manager.bundle.js | 461 - docs/7.efbfa2ae2943af5271a3.manager.bundle.js | 1 + docs/8.549f5a37f87ff9f82935.manager.bundle.js | 1 + docs/8.c81b105a504f01483e58.manager.bundle.js | 66 - docs/iframe.html | 2 +- docs/index.html | 2 +- ...ain.c128d239493043dc1244.manager.bundle.js | 30 - docs/main.c39720cb.iframe.bundle.js | 23437 --- docs/main.d90f16d6.iframe.bundle.js | 1 + ...ain.e10bb10cb6625f7249ea.manager.bundle.js | 1 + ...ain.7292f78630155b4c27d2.manager.bundle.js | 192 - docs/runtime~main.89de9395.iframe.bundle.js | 186 +- ...ain.efc7e154cd2d4bf07193.manager.bundle.js | 1 + ...ain.3db6df61f92cafe64500.manager.bundle.js | 2 + ...92cafe64500.manager.bundle.js.LICENSE.txt} | 0 ...ain.57652101a022e3bf1559.manager.bundle.js | 104267 ----------- docs/vendors~main.8f9ff9e9.iframe.bundle.js | 3 + ...ain.8f9ff9e9.iframe.bundle.js.LICENSE.txt} | 0 ...vendors~main.8f9ff9e9.iframe.bundle.js.map | 1 + docs/vendors~main.d9556628.iframe.bundle.js | 136429 --------------- ...vendors~main.d9556628.iframe.bundle.js.map | 1 - stories/Multistep/Actions/README.md | 2 +- stories/Multistep/Actions/index.js | 2 +- stories/Playground/Format/README.md | 5 +- stories/Playground/Format/index.js | 36 +- stories/Playground/Schema/README.md | 5 +- stories/Playground/Schema/index.js | 33 +- stories/index.js | 15 +- stories/utils/StoryWrapper.js | 2 +- 40 files changed, 44 insertions(+), 285795 deletions(-) create mode 100644 docs/0.735c46de4979e48773c9.manager.bundle.js rename docs/{4.d1f984030e3983670c86.manager.bundle.js.LICENSE.txt => 0.735c46de4979e48773c9.manager.bundle.js.LICENSE.txt} (100%) delete mode 100644 docs/0.9badb1b633b6cc87c4d7.manager.bundle.js create mode 100644 docs/1.52392f60ef6b7acc3a2b.manager.bundle.js delete mode 100644 docs/4.d1f984030e3983670c86.manager.bundle.js delete mode 100644 docs/5.a088b92742d2cd1d1ce8.manager.bundle.js create mode 100644 docs/5.b02e262080963d4d48b7.manager.bundle.js delete mode 100644 docs/6.1df326893cc27df85a9c.manager.bundle.js create mode 100644 docs/6.a67260176351c801b158.manager.bundle.js rename docs/{6.1df326893cc27df85a9c.manager.bundle.js.LICENSE.txt => 6.a67260176351c801b158.manager.bundle.js.LICENSE.txt} (100%) delete mode 100644 docs/7.a67e246fa7e75f516751.manager.bundle.js create mode 100644 docs/7.efbfa2ae2943af5271a3.manager.bundle.js create mode 100644 docs/8.549f5a37f87ff9f82935.manager.bundle.js delete mode 100644 docs/8.c81b105a504f01483e58.manager.bundle.js delete mode 100644 docs/main.c128d239493043dc1244.manager.bundle.js delete mode 100644 docs/main.c39720cb.iframe.bundle.js create mode 100644 docs/main.d90f16d6.iframe.bundle.js create mode 100644 docs/main.e10bb10cb6625f7249ea.manager.bundle.js delete mode 100644 docs/runtime~main.7292f78630155b4c27d2.manager.bundle.js create mode 100644 docs/runtime~main.efc7e154cd2d4bf07193.manager.bundle.js create mode 100644 docs/vendors~main.3db6df61f92cafe64500.manager.bundle.js rename docs/{vendors~main.57652101a022e3bf1559.manager.bundle.js.LICENSE.txt => vendors~main.3db6df61f92cafe64500.manager.bundle.js.LICENSE.txt} (100%) delete mode 100644 docs/vendors~main.57652101a022e3bf1559.manager.bundle.js create mode 100644 docs/vendors~main.8f9ff9e9.iframe.bundle.js rename docs/{vendors~main.d9556628.iframe.bundle.js.LICENSE.txt => vendors~main.8f9ff9e9.iframe.bundle.js.LICENSE.txt} (100%) create mode 100644 docs/vendors~main.8f9ff9e9.iframe.bundle.js.map delete mode 100644 docs/vendors~main.d9556628.iframe.bundle.js delete mode 100644 docs/vendors~main.d9556628.iframe.bundle.js.map diff --git a/docs/0.60a3b0c3.iframe.bundle.js b/docs/0.60a3b0c3.iframe.bundle.js index 2d7a77da..366217e7 100644 --- a/docs/0.60a3b0c3.iframe.bundle.js +++ b/docs/0.60a3b0c3.iframe.bundle.js @@ -1,254 +1 @@ -(window.webpackJsonp = window.webpackJsonp || []).push([ - [0], - { - './node_modules/@storybook/preview-web/dist/esm/renderDocs.js': function( - module, - __webpack_exports__, - __webpack_require__ - ) { - 'use strict'; - __webpack_require__.r(__webpack_exports__), - __webpack_require__.d(__webpack_exports__, 'renderDocs', function() { - return renderDocs; - }), - __webpack_require__.d(__webpack_exports__, 'unmountDocs', function() { - return unmountDocs; - }); - __webpack_require__('./node_modules/regenerator-runtime/runtime.js'), - __webpack_require__( - './node_modules/@storybook/preview-web/node_modules/core-js/modules/es.promise.js' - ), - __webpack_require__( - './node_modules/@storybook/preview-web/node_modules/core-js/modules/es.object.to-string.js' - ); - var react = __webpack_require__('./node_modules/react/index.js'), - react_default = __webpack_require__.n(react), - react_dom = __webpack_require__('./node_modules/react-dom/index.js'), - react_dom_default = __webpack_require__.n(react_dom), - wrapper = { - fontSize: '14px', - letterSpacing: '0.2px', - margin: '10px 0' - }, - main = { - margin: 'auto', - padding: 30, - borderRadius: 10, - background: 'rgba(0,0,0,0.03)' - }, - heading = { textAlign: 'center' }, - NoDocs_NoDocs = function NoDocs() { - return react_default.a.createElement( - 'div', - { style: wrapper, className: 'sb-nodocs sb-wrapper' }, - react_default.a.createElement( - 'div', - { style: main }, - react_default.a.createElement( - 'h1', - { style: heading }, - 'No Docs' - ), - react_default.a.createElement( - 'p', - null, - "Sorry, but there are no docs for the selected story. To add them, set the story's ", - react_default.a.createElement('code', null, 'docs'), - ' parameter. If you think this is an error:' - ), - react_default.a.createElement( - 'ul', - null, - react_default.a.createElement( - 'li', - null, - 'Please check the story definition.' - ), - react_default.a.createElement( - 'li', - null, - 'Please check the Storybook config.' - ), - react_default.a.createElement( - 'li', - null, - 'Try reloading the page.' - ) - ), - react_default.a.createElement( - 'p', - null, - "If the problem persists, check the browser console, or the terminal you've run Storybook from." - ) - ) - ); - }; - function asyncGeneratorStep( - gen, - resolve, - reject, - _next, - _throw, - key, - arg - ) { - try { - var info = gen[key](arg), - value = info.value; - } catch (error) { - return void reject(error); - } - info.done ? resolve(value) : Promise.resolve(value).then(_next, _throw); - } - function _asyncToGenerator(fn) { - return function() { - var self = this, - args = arguments; - return new Promise(function(resolve, reject) { - var gen = fn.apply(self, args); - function _next(value) { - asyncGeneratorStep( - gen, - resolve, - reject, - _next, - _throw, - 'next', - value - ); - } - function _throw(err) { - asyncGeneratorStep( - gen, - resolve, - reject, - _next, - _throw, - 'throw', - err - ); - } - _next(void 0); - }); - }; - } - function renderDocs(story, docsContext, element, callback) { - return (function renderDocsAsync(_x, _x2, _x3) { - return _renderDocsAsync.apply(this, arguments); - })(story, docsContext, element).then(callback); - } - function _renderDocsAsync() { - return (_renderDocsAsync = _asyncToGenerator( - regeneratorRuntime.mark(function _callee( - story, - docsContext, - element - ) { - var _docs$getContainer, - _docs$getPage, - docs, - DocsContainer, - Page, - docsElement; - return regeneratorRuntime.wrap(function _callee$(_context) { - for (;;) - switch ((_context.prev = _context.next)) { - case 0: - if ( - !( - (null != (docs = story.parameters.docs) && - docs.getPage) || - (null != docs && docs.page) - ) || - ((null != docs && docs.getContainer) || - (null != docs && docs.container)) - ) { - _context.next = 3; - break; - } - throw new Error( - 'No `docs.container` set, did you run `addon-docs/preset`?' - ); - case 3: - if (((_context.t1 = docs.container), _context.t1)) { - _context.next = 8; - break; - } - return ( - (_context.next = 7), - null === (_docs$getContainer = docs.getContainer) || - void 0 === _docs$getContainer - ? void 0 - : _docs$getContainer.call(docs) - ); - case 7: - _context.t1 = _context.sent; - case 8: - if (((_context.t0 = _context.t1), _context.t0)) { - _context.next = 11; - break; - } - _context.t0 = function(_ref) { - var children = _ref.children; - return react_default.a.createElement( - react_default.a.Fragment, - null, - children - ); - }; - case 11: - if ( - ((DocsContainer = _context.t0), - (_context.t3 = docs.page), - _context.t3) - ) { - _context.next = 17; - break; - } - return ( - (_context.next = 16), - null === (_docs$getPage = docs.getPage) || - void 0 === _docs$getPage - ? void 0 - : _docs$getPage.call(docs) - ); - case 16: - _context.t3 = _context.sent; - case 17: - if (((_context.t2 = _context.t3), _context.t2)) { - _context.next = 20; - break; - } - _context.t2 = NoDocs_NoDocs; - case 20: - return ( - (Page = _context.t2), - (docsElement = react_default.a.createElement( - DocsContainer, - { key: story.componentId, context: docsContext }, - react_default.a.createElement(Page, null) - )), - (_context.next = 24), - new Promise(function(resolve) { - react_dom_default.a.render( - docsElement, - element, - resolve - ); - }) - ); - case 24: - case 'end': - return _context.stop(); - } - }, _callee); - }) - )).apply(this, arguments); - } - function unmountDocs(element) { - react_dom_default.a.unmountComponentAtNode(element); - } - NoDocs_NoDocs.displayName = 'NoDocs'; - } - } -]); +(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{"./node_modules/@storybook/preview-web/dist/esm/renderDocs.js":function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,"renderDocs",(function(){return renderDocs})),__webpack_require__.d(__webpack_exports__,"unmountDocs",(function(){return unmountDocs}));__webpack_require__("./node_modules/regenerator-runtime/runtime.js"),__webpack_require__("./node_modules/@storybook/preview-web/node_modules/core-js/modules/es.promise.js"),__webpack_require__("./node_modules/@storybook/preview-web/node_modules/core-js/modules/es.object.to-string.js");var react=__webpack_require__("./node_modules/react/index.js"),react_default=__webpack_require__.n(react),react_dom=__webpack_require__("./node_modules/react-dom/index.js"),react_dom_default=__webpack_require__.n(react_dom),wrapper={fontSize:"14px",letterSpacing:"0.2px",margin:"10px 0"},main={margin:"auto",padding:30,borderRadius:10,background:"rgba(0,0,0,0.03)"},heading={textAlign:"center"},NoDocs_NoDocs=function NoDocs(){return react_default.a.createElement("div",{style:wrapper,className:"sb-nodocs sb-wrapper"},react_default.a.createElement("div",{style:main},react_default.a.createElement("h1",{style:heading},"No Docs"),react_default.a.createElement("p",null,"Sorry, but there are no docs for the selected story. To add them, set the story's ",react_default.a.createElement("code",null,"docs")," parameter. If you think this is an error:"),react_default.a.createElement("ul",null,react_default.a.createElement("li",null,"Please check the story definition."),react_default.a.createElement("li",null,"Please check the Storybook config."),react_default.a.createElement("li",null,"Try reloading the page.")),react_default.a.createElement("p",null,"If the problem persists, check the browser console, or the terminal you've run Storybook from.")))};function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg),value=info.value}catch(error){return void reject(error)}info.done?resolve(value):Promise.resolve(value).then(_next,_throw)}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise((function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value)}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err)}_next(void 0)}))}}function renderDocs(story,docsContext,element,callback){return function renderDocsAsync(_x,_x2,_x3){return _renderDocsAsync.apply(this,arguments)}(story,docsContext,element).then(callback)}function _renderDocsAsync(){return(_renderDocsAsync=_asyncToGenerator(regeneratorRuntime.mark((function _callee(story,docsContext,element){var _docs$getContainer,_docs$getPage,docs,DocsContainer,Page,docsElement;return regeneratorRuntime.wrap((function _callee$(_context){for(;;)switch(_context.prev=_context.next){case 0:if(!(null!=(docs=story.parameters.docs)&&docs.getPage||null!=docs&&docs.page)||(null!=docs&&docs.getContainer||null!=docs&&docs.container)){_context.next=3;break}throw new Error("No `docs.container` set, did you run `addon-docs/preset`?");case 3:if(_context.t1=docs.container,_context.t1){_context.next=8;break}return _context.next=7,null===(_docs$getContainer=docs.getContainer)||void 0===_docs$getContainer?void 0:_docs$getContainer.call(docs);case 7:_context.t1=_context.sent;case 8:if(_context.t0=_context.t1,_context.t0){_context.next=11;break}_context.t0=function(_ref){var children=_ref.children;return react_default.a.createElement(react_default.a.Fragment,null,children)};case 11:if(DocsContainer=_context.t0,_context.t3=docs.page,_context.t3){_context.next=17;break}return _context.next=16,null===(_docs$getPage=docs.getPage)||void 0===_docs$getPage?void 0:_docs$getPage.call(docs);case 16:_context.t3=_context.sent;case 17:if(_context.t2=_context.t3,_context.t2){_context.next=20;break}_context.t2=NoDocs_NoDocs;case 20:return Page=_context.t2,docsElement=react_default.a.createElement(DocsContainer,{key:story.componentId,context:docsContext},react_default.a.createElement(Page,null)),_context.next=24,new Promise((function(resolve){react_dom_default.a.render(docsElement,element,resolve)}));case 24:case"end":return _context.stop()}}),_callee)})))).apply(this,arguments)}function unmountDocs(element){react_dom_default.a.unmountComponentAtNode(element)}NoDocs_NoDocs.displayName="NoDocs"}}]); \ No newline at end of file diff --git a/docs/0.735c46de4979e48773c9.manager.bundle.js b/docs/0.735c46de4979e48773c9.manager.bundle.js new file mode 100644 index 00000000..18e77e71 --- /dev/null +++ b/docs/0.735c46de4979e48773c9.manager.bundle.js @@ -0,0 +1,2 @@ +/*! For license information please see 0.735c46de4979e48773c9.manager.bundle.js.LICENSE.txt */ +(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{1503:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,"createCopyToClipboardFunction",(function(){return createCopyToClipboardFunction})),__webpack_require__.d(__webpack_exports__,"SyntaxHighlighter",(function(){return syntaxhighlighter_SyntaxHighlighter}));__webpack_require__(134),__webpack_require__(58),__webpack_require__(11),__webpack_require__(162),__webpack_require__(8),__webpack_require__(122),__webpack_require__(5),__webpack_require__(13),__webpack_require__(14),__webpack_require__(9),__webpack_require__(10),__webpack_require__(12),__webpack_require__(16),__webpack_require__(15),__webpack_require__(22),__webpack_require__(74),__webpack_require__(21);var react=__webpack_require__(0),react_default=__webpack_require__.n(react),esm=__webpack_require__(30),dist_esm=__webpack_require__(1),global_window=__webpack_require__(6),window_default=__webpack_require__.n(global_window),memoizerific=__webpack_require__(37),memoizerific_default=__webpack_require__.n(memoizerific),jsx=__webpack_require__(1574),prism_jsx=__webpack_require__.n(jsx).a,bash=__webpack_require__(1646),prism_bash=__webpack_require__.n(bash).a,css=__webpack_require__(1573),prism_css=__webpack_require__.n(css).a,js_extras=__webpack_require__(1642),prism_js_extras=__webpack_require__.n(js_extras).a,json=__webpack_require__(1643),prism_json=__webpack_require__.n(json).a,graphql=__webpack_require__(1648),prism_graphql=__webpack_require__.n(graphql).a,markup=__webpack_require__(1572),prism_markup=__webpack_require__.n(markup).a,markdown=__webpack_require__(1645),prism_markdown=__webpack_require__.n(markdown).a,yaml=__webpack_require__(1644),prism_yaml=__webpack_require__.n(yaml).a,tsx=__webpack_require__(1647),prism_tsx=__webpack_require__.n(tsx).a,typescript=__webpack_require__(1575),prism_typescript=__webpack_require__.n(typescript).a,objectWithoutProperties=__webpack_require__(1640),objectWithoutProperties_default=__webpack_require__.n(objectWithoutProperties),objectSpread=__webpack_require__(386),objectSpread_default=__webpack_require__.n(objectSpread),helpers_extends=__webpack_require__(748),extends_default=__webpack_require__.n(helpers_extends);function createStyleObject(classNames){var elementStyle=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},stylesheet=arguments.length>2?arguments[2]:void 0;return classNames.reduce((function(styleObject,className){return objectSpread_default()({},styleObject,stylesheet[className])}),elementStyle)}function createClassNameString(classNames){return classNames.join(" ")}function createElement(_ref){var node=_ref.node,stylesheet=_ref.stylesheet,_ref$style=_ref.style,style=void 0===_ref$style?{}:_ref$style,useInlineStyles=_ref.useInlineStyles,key=_ref.key,properties=node.properties,type=node.type,TagName=node.tagName,value=node.value;if("text"===type)return value;if(TagName){var childrenCreator=function createChildren(stylesheet,useInlineStyles){var childrenCount=0;return function(children){return childrenCount+=1,children.map((function(child,i){return createElement({node:child,stylesheet:stylesheet,useInlineStyles:useInlineStyles,key:"code-segment-".concat(childrenCount,"-").concat(i)})}))}}(stylesheet,useInlineStyles),nonStylesheetClassNames=useInlineStyles&&properties.className&&properties.className.filter((function(className){return!stylesheet[className]})),className=nonStylesheetClassNames&&nonStylesheetClassNames.length?nonStylesheetClassNames:void 0,props=useInlineStyles?objectSpread_default()({},properties,{className:className&&createClassNameString(className)},{style:createStyleObject(properties.className,Object.assign({},properties.style,style),stylesheet)}):objectSpread_default()({},properties,{className:createClassNameString(properties.className)}),children=childrenCreator(node.children);return react_default.a.createElement(TagName,extends_default()({key:key},props),children)}}var newLineRegex=/\n/g;function AllLineNumbers(_ref2){var codeString=_ref2.codeString,codeStyle=_ref2.codeStyle,_ref2$containerStyle=_ref2.containerStyle,containerStyle=void 0===_ref2$containerStyle?{float:"left",paddingRight:"10px"}:_ref2$containerStyle,_ref2$numberStyle=_ref2.numberStyle,numberStyle=void 0===_ref2$numberStyle?{}:_ref2$numberStyle,startingLineNumber=_ref2.startingLineNumber;return react_default.a.createElement("code",{style:Object.assign({},codeStyle,containerStyle)},function getAllLineNumbers(_ref){var lines=_ref.lines,startingLineNumber=_ref.startingLineNumber,style=_ref.style;return lines.map((function(_,i){var number=i+startingLineNumber;return react_default.a.createElement("span",{key:"line-".concat(i),className:"react-syntax-highlighter-line-number",style:"function"==typeof style?style(number):style},"".concat(number,"\n"))}))}({lines:codeString.replace(/\n$/,"").split("\n"),style:numberStyle,startingLineNumber:startingLineNumber}))}function getInlineLineNumber(lineNumber,inlineLineNumberStyle){return{type:"element",tagName:"span",properties:{key:"line-number--".concat(lineNumber),className:["comment","linenumber","react-syntax-highlighter-line-number"],style:inlineLineNumberStyle},children:[{type:"text",value:lineNumber}]}}function assembleLineNumberStyles(lineNumberStyle,lineNumber,largestLineNumber){var num,len,defaultLineNumberStyle={display:"inline-block",minWidth:(num=largestLineNumber,len=num.toString().length,"".concat(len,"em")),paddingRight:"1em",textAlign:"right",userSelect:"none"},customLineNumberStyle="function"==typeof lineNumberStyle?lineNumberStyle(lineNumber):lineNumberStyle;return objectSpread_default()({},defaultLineNumberStyle,customLineNumberStyle)}function createLineElement(_ref3){var children=_ref3.children,lineNumber=_ref3.lineNumber,lineNumberStyle=_ref3.lineNumberStyle,largestLineNumber=_ref3.largestLineNumber,showInlineLineNumbers=_ref3.showInlineLineNumbers,_ref3$lineProps=_ref3.lineProps,lineProps=void 0===_ref3$lineProps?{}:_ref3$lineProps,_ref3$className=_ref3.className,className=void 0===_ref3$className?[]:_ref3$className,properties="function"==typeof lineProps?lineProps(lineNumber):lineProps;if(properties.className=className,lineNumber&&showInlineLineNumbers){var inlineLineNumberStyle=assembleLineNumberStyles(lineNumberStyle,lineNumber,largestLineNumber);children.unshift(getInlineLineNumber(lineNumber,inlineLineNumberStyle))}return{type:"element",tagName:"span",properties:properties,children:children}}function flattenCodeTree(tree){for(var className=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],newTree=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=0;i2&&void 0!==arguments[2]?arguments[2]:[];return createLineElement({children:children,lineNumber:lineNumber,lineNumberStyle:lineNumberStyle,largestLineNumber:largestLineNumber,showInlineLineNumbers:showInlineLineNumbers,lineProps:lineProps,className:className})}function createUnwrappedLine(children,lineNumber){if(lineNumber&&showInlineLineNumbers){var inlineLineNumberStyle=assembleLineNumberStyles(lineNumberStyle,lineNumber,largestLineNumber);children.unshift(getInlineLineNumber(lineNumber,inlineLineNumberStyle))}return children}function createLine(children,lineNumber){var className=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return wrapLines||className.length>0?createWrappedLine(children,lineNumber,className):createUnwrappedLine(children,lineNumber)}for(var _loop=function _loop(){var node=tree[index],value=node.children[0].value;if(function getNewLines(str){return str.match(newLineRegex)}(value)){var splitValue=value.split("\n");splitValue.forEach((function(text,i){var lineNumber=showLineNumbers&&newTree.length+startingLineNumber,newChild={type:"text",value:"".concat(text,"\n")};if(0===i){var _line=createLine(tree.slice(lastLineBreakIndex+1,index).concat(createLineElement({children:[newChild],className:node.properties.className})),lineNumber);newTree.push(_line)}else if(i===splitValue.length-1){if(tree[index+1]&&tree[index+1].children&&tree[index+1].children[0]){var newElem=createLineElement({children:[{type:"text",value:"".concat(text)}],className:node.properties.className});tree.splice(index+1,0,newElem)}else{var _line2=createLine([newChild],lineNumber,node.properties.className);newTree.push(_line2)}}else{var _line3=createLine([newChild],lineNumber,node.properties.className);newTree.push(_line3)}})),lastLineBreakIndex=index}index++};index=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg),value=info.value}catch(error){return void reject(error)}info.done?resolve(value):Promise.resolve(value).then(_next,_throw)}function _slicedToArray(arr,i){return function _arrayWithHoles(arr){if(Array.isArray(arr))return arr}(arr)||function _iterableToArrayLimit(arr,i){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(arr)))return;var _arr=[],_n=!0,_d=!1,_e=void 0;try{for(var _s,_i=arr[Symbol.iterator]();!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{_n||null==_i.return||_i.return()}finally{if(_d)throw _e}}return _arr}(arr,i)||function _unsupportedIterableToArray(o,minLen){if(!o)return;if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}(arr,i)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i=48&&code<=57}},1572:function(module,exports,__webpack_require__){"use strict";function markup(Prism){Prism.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup,Prism.hooks.add("wrap",(function(env){"entity"===env.type&&(env.attributes.title=env.content.value.replace(/&/,"&"))})),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function addInlined(tagName,lang){var includedCdataInside={};includedCdataInside["language-"+lang]={pattern:/(^$)/i,lookbehind:!0,inside:Prism.languages[lang]},includedCdataInside.cdata=/^$/i;var inside={"included-cdata":{pattern://i,inside:includedCdataInside}};inside["language-"+lang]={pattern:/[\s\S]+/,inside:Prism.languages[lang]};var def={};def[tagName]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,(function(){return tagName})),"i"),lookbehind:!0,greedy:!0,inside:inside},Prism.languages.insertBefore("markup","cdata",def)}}),Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(attrName,lang){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+attrName+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[lang,"language-"+lang],inside:Prism.languages[lang]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml}module.exports=markup,markup.displayName="markup",markup.aliases=["html","mathml","svg","xml","ssml","atom","rss"]},1573:function(module,exports,__webpack_require__){"use strict";function css(Prism){!function(Prism){var string=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;Prism.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+string.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+string.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+string.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:string,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},Prism.languages.css.atrule.inside.rest=Prism.languages.css;var markup=Prism.languages.markup;markup&&(markup.tag.addInlined("style","css"),markup.tag.addAttribute("style","css"))}(Prism)}module.exports=css,css.displayName="css",css.aliases=[]},1574:function(module,exports,__webpack_require__){"use strict";function jsx(Prism){!function(Prism){var javascript=Prism.util.clone(Prism.languages.javascript),space=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,braces=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,spread=/(?:\{*\.{3}(?:[^{}]|)*\})/.source;function re(source,flags){return source=source.replace(//g,(function(){return space})).replace(//g,(function(){return braces})).replace(//g,(function(){return spread})),RegExp(source,flags)}spread=re(spread).source,Prism.languages.jsx=Prism.languages.extend("markup",javascript),Prism.languages.jsx.tag.pattern=re(/<\/?(?:[\w.:-]+(?:+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|))?|))**\/?)?>/.source),Prism.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/i,Prism.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/i,Prism.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,Prism.languages.jsx.tag.inside.comment=javascript.comment,Prism.languages.insertBefore("inside","attr-name",{spread:{pattern:re(//.source),inside:Prism.languages.jsx}},Prism.languages.jsx.tag),Prism.languages.insertBefore("inside","special-attr",{script:{pattern:re(/=/.source),inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:Prism.languages.jsx},alias:"language-javascript"}},Prism.languages.jsx.tag);var stringifyToken=function(token){return token?"string"==typeof token?token:"string"==typeof token.content?token.content:token.content.map(stringifyToken).join(""):""},walkTokens=function(tokens){for(var openedTags=[],i=0;i0&&openedTags[openedTags.length-1].tagName===stringifyToken(token.content[0].content[1])&&openedTags.pop():"/>"===token.content[token.content.length-1].content||openedTags.push({tagName:stringifyToken(token.content[0].content[1]),openedBraces:0}):openedTags.length>0&&"punctuation"===token.type&&"{"===token.content?openedTags[openedTags.length-1].openedBraces++:openedTags.length>0&&openedTags[openedTags.length-1].openedBraces>0&&"punctuation"===token.type&&"}"===token.content?openedTags[openedTags.length-1].openedBraces--:notTagNorBrace=!0),(notTagNorBrace||"string"==typeof token)&&openedTags.length>0&&0===openedTags[openedTags.length-1].openedBraces){var plainText=stringifyToken(token);i0&&("string"==typeof tokens[i-1]||"plain-text"===tokens[i-1].type)&&(plainText=stringifyToken(tokens[i-1])+plainText,tokens.splice(i-1,1),i--),tokens[i]=new Prism.Token("plain-text",plainText,null,plainText)}token.content&&"string"!=typeof token.content&&walkTokens(token.content)}};Prism.hooks.add("after-tokenize",(function(env){"jsx"!==env.language&&"tsx"!==env.language||walkTokens(env.tokens)}))}(Prism)}module.exports=jsx,jsx.displayName="jsx",jsx.aliases=[]},1575:function(module,exports,__webpack_require__){"use strict";function typescript(Prism){!function(Prism){Prism.languages.typescript=Prism.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:string|Function|any|number|boolean|Array|symbol|console|Promise|unknown|never)\b/}),Prism.languages.typescript.keyword.push(/\b(?:abstract|as|declare|implements|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete Prism.languages.typescript.parameter;var typeInside=Prism.languages.extend("typescript",{});delete typeInside["class-name"],Prism.languages.typescript["class-name"].inside=typeInside,Prism.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:typeInside}}}}),Prism.languages.ts=Prism.languages.typescript}(Prism)}module.exports=typescript,typescript.displayName="typescript",typescript.aliases=["ts"]},1613:function(module,exports,__webpack_require__){"use strict";(function(global){var ctx="object"==typeof globalThis?globalThis:"object"==typeof self?self:"object"==typeof window?window:"object"==typeof global?global:{},restore=function capture(){var defined="Prism"in ctx,current=defined?ctx.Prism:void 0;return function restore(){defined?ctx.Prism=current:delete ctx.Prism;defined=void 0,current=void 0}}();ctx.Prism={manual:!0,disableWorkerMessageHandler:!0};var h=__webpack_require__(1614),decode=__webpack_require__(1630),Prism=__webpack_require__(1637),markup=__webpack_require__(1572),css=__webpack_require__(1573),clike=__webpack_require__(1638),js=__webpack_require__(1639);restore();var own={}.hasOwnProperty;function Refractor(){}Refractor.prototype=Prism;var refract=new Refractor;function register(grammar){if("function"!=typeof grammar||!grammar.displayName)throw new Error("Expected `function` for `grammar`, got `"+grammar+"`");void 0===refract.languages[grammar.displayName]&&grammar(refract)}module.exports=refract,refract.highlight=function highlight(value,name){var grammar,sup=Prism.highlight;if("string"!=typeof value)throw new Error("Expected `string` for `value`, got `"+value+"`");if("Object"===refract.util.type(name))grammar=name,name=null;else{if("string"!=typeof name)throw new Error("Expected `string` for `name`, got `"+name+"`");if(!own.call(refract.languages,name))throw new Error("Unknown language: `"+name+"` is not registered");grammar=refract.languages[name]}return sup.call(this,value,grammar,name)},refract.register=register,refract.alias=function alias(name,alias){var key,list,length,index,languages=refract.languages,map=name;alias&&((map={})[name]=alias);for(key in map)for(list=map[key],length=(list="string"==typeof list?[list]:list).length,index=-1;++index4&&"data"===normal.slice(0,4)&&valid.test(value)&&("-"===value.charAt(4)?prop=function datasetToProperty(attribute){var value=attribute.slice(5).replace(dash,camelcase);return"data"+value.charAt(0).toUpperCase()+value.slice(1)}(value):value=function datasetToAttribute(property){var value=property.slice(4);if(dash.test(value))return property;"-"!==(value=value.replace(cap,kebab)).charAt(0)&&(value="-"+value);return"data"+value}(value),Type=DefinedInfo);return new Type(prop,value)};var valid=/^data[-\w.:]+$/i,dash=/-[a-z]/g,cap=/[A-Z]/g;function kebab($0){return"-"+$0.toLowerCase()}function camelcase($0){return $0.charAt(1).toUpperCase()}},1627:function(module,exports,__webpack_require__){"use strict";module.exports=function parse(selector,defaultTagName){var subvalue,previous,match,value=selector||"",name=defaultTagName||"div",props={},start=0;for(;start65535&&(output+=fromCharCode((reference-=65536)>>>10|55296),reference=56320|1023&reference),reference=output+fromCharCode(reference))):type!==name&&warning(4,diff)),reference?(flush(),prev=now(),index=end-1,column+=end-start+1,result.push(reference),(next=now()).offset++,handleReference&&handleReference.call(referenceContext,reference,{start:prev,end:next},value.slice(start-1,end)),prev=next):(characters=value.slice(start-1,end),queue+=characters,column+=characters.length,index=end-1)}else 10===character&&(line++,lines++,column=0),character==character?(queue+=fromCharCode(character),column++):flush();return result.join("");function now(){return{line:line,column:column,offset:index+(pos.offset||0)}}function parseError(code,offset){var position=now();position.column+=offset,position.offset+=offset,handleWarning.call(warningContext,messages[code],position,code)}function flush(){queue&&(result.push(queue),handleText&&handleText.call(textContext,queue,{start:prev,end:now()}),queue="")}}(value,settings)};var own={}.hasOwnProperty,fromCharCode=String.fromCharCode,noop=Function.prototype,defaults={warning:null,reference:null,text:null,warningContext:null,referenceContext:null,textContext:null,position:{},additional:null,attribute:!1,nonTerminated:!0},name="named",hexa="hexadecimal",deci="decimal",bases={hexadecimal:16,decimal:10},tests={};tests.named=alphanumerical,tests[deci]=decimal,tests[hexa]=hexadecimal;var messages={};function prohibited(code){return code>=55296&&code<=57343||code>1114111}function disallowed(code){return code>=1&&code<=8||11===code||code>=13&&code<=31||code>=127&&code<=159||code>=64976&&code<=65007||65535==(65535&code)||65534==(65535&code)}messages[1]="Named character references must be terminated by a semicolon",messages[2]="Numeric character references must be terminated by a semicolon",messages[3]="Named character references cannot be empty",messages[4]="Numeric character references cannot be empty",messages[5]="Named character references must be known",messages[6]="Numeric character references cannot be disallowed",messages[7]="Numeric character references cannot be outside the permissible Unicode range"},1631:function(module){module.exports=JSON.parse('{"AElig":"Æ","AMP":"&","Aacute":"Á","Acirc":"Â","Agrave":"À","Aring":"Å","Atilde":"Ã","Auml":"Ä","COPY":"©","Ccedil":"Ç","ETH":"Ð","Eacute":"É","Ecirc":"Ê","Egrave":"È","Euml":"Ë","GT":">","Iacute":"Í","Icirc":"Î","Igrave":"Ì","Iuml":"Ï","LT":"<","Ntilde":"Ñ","Oacute":"Ó","Ocirc":"Ô","Ograve":"Ò","Oslash":"Ø","Otilde":"Õ","Ouml":"Ö","QUOT":"\\"","REG":"®","THORN":"Þ","Uacute":"Ú","Ucirc":"Û","Ugrave":"Ù","Uuml":"Ü","Yacute":"Ý","aacute":"á","acirc":"â","acute":"´","aelig":"æ","agrave":"à","amp":"&","aring":"å","atilde":"ã","auml":"ä","brvbar":"¦","ccedil":"ç","cedil":"¸","cent":"¢","copy":"©","curren":"¤","deg":"°","divide":"÷","eacute":"é","ecirc":"ê","egrave":"è","eth":"ð","euml":"ë","frac12":"½","frac14":"¼","frac34":"¾","gt":">","iacute":"í","icirc":"î","iexcl":"¡","igrave":"ì","iquest":"¿","iuml":"ï","laquo":"«","lt":"<","macr":"¯","micro":"µ","middot":"·","nbsp":" ","not":"¬","ntilde":"ñ","oacute":"ó","ocirc":"ô","ograve":"ò","ordf":"ª","ordm":"º","oslash":"ø","otilde":"õ","ouml":"ö","para":"¶","plusmn":"±","pound":"£","quot":"\\"","raquo":"»","reg":"®","sect":"§","shy":"­","sup1":"¹","sup2":"²","sup3":"³","szlig":"ß","thorn":"þ","times":"×","uacute":"ú","ucirc":"û","ugrave":"ù","uml":"¨","uuml":"ü","yacute":"ý","yen":"¥","yuml":"ÿ"}')},1632:function(module){module.exports=JSON.parse('{"0":"�","128":"€","130":"‚","131":"ƒ","132":"„","133":"…","134":"†","135":"‡","136":"ˆ","137":"‰","138":"Š","139":"‹","140":"Œ","142":"Ž","145":"‘","146":"’","147":"“","148":"”","149":"•","150":"–","151":"—","152":"˜","153":"™","154":"š","155":"›","156":"œ","158":"ž","159":"Ÿ"}')},1633:function(module,exports,__webpack_require__){"use strict";module.exports=function hexadecimal(character){var code="string"==typeof character?character.charCodeAt(0):character;return code>=97&&code<=102||code>=65&&code<=70||code>=48&&code<=57}},1634:function(module,exports,__webpack_require__){"use strict";var alphabetical=__webpack_require__(1635),decimal=__webpack_require__(1571);module.exports=function alphanumerical(character){return alphabetical(character)||decimal(character)}},1635:function(module,exports,__webpack_require__){"use strict";module.exports=function alphabetical(character){var code="string"==typeof character?character.charCodeAt(0):character;return code>=97&&code<=122||code>=65&&code<=90}},1636:function(module,exports,__webpack_require__){"use strict";var el;module.exports=function decodeEntity(characters){var char,entity="&"+characters+";";if((el=el||document.createElement("i")).innerHTML=entity,59===(char=el.textContent).charCodeAt(char.length-1)&&"semi"!==characters)return!1;return char!==entity&&char}},1637:function(module,exports,__webpack_require__){(function(global){var Prism=function(_self){var lang=/\blang(?:uage)?-([\w-]+)\b/i,uniqueId=0,plainTextGrammar={},_={manual:_self.Prism&&_self.Prism.manual,disableWorkerMessageHandler:_self.Prism&&_self.Prism.disableWorkerMessageHandler,util:{encode:function encode(tokens){return tokens instanceof Token?new Token(tokens.type,encode(tokens.content),tokens.alias):Array.isArray(tokens)?tokens.map(encode):tokens.replace(/&/g,"&").replace(/=rematch.reach);pos+=currentNode.value.length,currentNode=currentNode.next){var str=currentNode.value;if(tokenList.length>text.length)return;if(!(str instanceof Token)){var match,removeCount=1;if(greedy){if(!(match=matchPattern(pattern,pos,text,lookbehind)))break;var from=match.index,to=match.index+match[0].length,p=pos;for(p+=currentNode.value.length;from>=p;)p+=(currentNode=currentNode.next).value.length;if(pos=p-=currentNode.value.length,currentNode.value instanceof Token)continue;for(var k=currentNode;k!==tokenList.tail&&(prematch.reach&&(rematch.reach=reach);var removeFrom=currentNode.prev;if(before&&(removeFrom=addAfter(tokenList,removeFrom,before),pos+=before.length),removeRange(tokenList,removeFrom,removeCount),currentNode=addAfter(tokenList,removeFrom,new Token(token,inside?_.tokenize(matchStr,inside):matchStr,alias,matchStr)),after&&addAfter(tokenList,currentNode,after),removeCount>1){var nestedRematch={cause:token+","+j,reach:reach};matchGrammar(text,tokenList,grammar,currentNode.prev,pos,nestedRematch),rematch&&nestedRematch.reach>rematch.reach&&(rematch.reach=nestedRematch.reach)}}}}}}function LinkedList(){var head={value:null,prev:null,next:null},tail={value:null,prev:head,next:null};head.next=tail,this.head=head,this.tail=tail,this.length=0}function addAfter(list,node,value){var next=node.next,newNode={value:value,prev:node,next:next};return node.next=newNode,next.prev=newNode,list.length++,newNode}function removeRange(list,node,count){for(var next=node.next,i=0;i"+env.content+""},!_self.document)return _self.addEventListener?(_.disableWorkerMessageHandler||_self.addEventListener("message",(function(evt){var message=JSON.parse(evt.data),lang=message.language,code=message.code,immediateClose=message.immediateClose;_self.postMessage(_.highlight(code,_.languages[lang],lang)),immediateClose&&_self.close()}),!1),_):_;var script=_.util.currentScript();function highlightAutomaticallyCallback(){_.manual||_.highlightAll()}if(script&&(_.filename=script.src,script.hasAttribute("data-manual")&&(_.manual=!0)),!_.manual){var readyState=document.readyState;"loading"===readyState||"interactive"===readyState&&script&&script.defer?document.addEventListener("DOMContentLoaded",highlightAutomaticallyCallback):window.requestAnimationFrame?window.requestAnimationFrame(highlightAutomaticallyCallback):window.setTimeout(highlightAutomaticallyCallback,16)}return _}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{});module.exports&&(module.exports=Prism),void 0!==global&&(global.Prism=Prism)}).call(this,__webpack_require__(100))},1638:function(module,exports,__webpack_require__){"use strict";function clike(Prism){Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|interface|extends|implements|trait|instanceof|new)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,boolean:/\b(?:true|false)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}}module.exports=clike,clike.displayName="clike",clike.aliases=[]},1639:function(module,exports,__webpack_require__){"use strict";function javascript(Prism){Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),Prism.languages.js=Prism.languages.javascript}module.exports=javascript,javascript.displayName="javascript",javascript.aliases=["js"]},1640:function(module,exports,__webpack_require__){var objectWithoutPropertiesLoose=__webpack_require__(1641);module.exports=function _objectWithoutProperties(source,excluded){if(null==source)return{};var key,i,target=objectWithoutPropertiesLoose(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target},module.exports.default=module.exports,module.exports.__esModule=!0},1641:function(module,exports){module.exports=function _objectWithoutPropertiesLoose(source,excluded){if(null==source)return{};var key,i,target={},sourceKeys=Object.keys(source);for(i=0;i=0||(target[key]=source[key]);return target},module.exports.default=module.exports,module.exports.__esModule=!0},1642:function(module,exports,__webpack_require__){"use strict";function jsExtras(Prism){!function(Prism){function withId(source,flags){return RegExp(source.replace(//g,(function(){return/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source})),flags)}Prism.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+Prism.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),Prism.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+Prism.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),Prism.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:(?:Uint|Int)(?:8|16|32)|Uint8Clamped|Float(?:32|64))?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|(?:Weak)?(?:Set|Map)|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),Prism.languages.insertBefore("javascript","keyword",{imports:{pattern:withId(/(\bimport\b\s*)(?:(?:\s*,\s*(?:\*\s*as\s+|\{[^{}]*\}))?|\*\s*as\s+|\{[^{}]*\})(?=\s*\bfrom\b)/.source),lookbehind:!0,inside:Prism.languages.javascript},exports:{pattern:withId(/(\bexport\b\s*)(?:\*(?:\s*as\s+)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source),lookbehind:!0,inside:Prism.languages.javascript}}),Prism.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\b(?:await|break|catch|continue|do|else|for|finally|if|return|switch|throw|try|while|yield)\b/,alias:"control-flow"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),Prism.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),Prism.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:withId(/(\.\s*)#?/.source),lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|location|navigator|performance|(?:local|session)Storage|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var maybeClassNameTokens=["function","function-variable","method","method-variable","property-access"],i=0;i|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,properties="(?:"+tag.source+"(?:[ \t]+"+anchorOrAlias.source+")?|"+anchorOrAlias.source+"(?:[ \t]+"+tag.source+")?)",plainKey=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-])(?:[ \t]*(?:(?![#:])|:))*/.source.replace(//g,(function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source})),string=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function createValuePattern(value,flags){flags=(flags||"").replace(/m/g,"")+"m";var pattern=/([:\-,[{]\s*(?:\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<>/g,(function(){return properties})).replace(/<>/g,(function(){return value}));return RegExp(pattern,flags)}Prism.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<>/g,(function(){return properties}))),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<>[ \t]+)?)<>(?=\s*:\s)/.source.replace(/<>/g,(function(){return properties})).replace(/<>/g,(function(){return"(?:"+plainKey+"|"+string+")"}))),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:createValuePattern(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:createValuePattern(/true|false/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:createValuePattern(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:createValuePattern(string),lookbehind:!0,greedy:!0},number:{pattern:createValuePattern(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:tag,important:anchorOrAlias,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},Prism.languages.yml=Prism.languages.yaml}(Prism)}module.exports=yaml,yaml.displayName="yaml",yaml.aliases=["yml"]},1645:function(module,exports,__webpack_require__){"use strict";function markdown(Prism){!function(Prism){var inner=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function createInline(pattern){return pattern=pattern.replace(//g,(function(){return inner})),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+pattern+")")}var tableCell=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,tableRow=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,(function(){return tableCell})),tableLine=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;Prism.languages.markdown=Prism.languages.extend("markup",{}),Prism.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"font-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:Prism.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+tableRow+tableLine+"(?:"+tableRow+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+tableRow+tableLine+")(?:"+tableRow+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(tableCell),inside:Prism.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+tableRow+")"+tableLine+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+tableRow+"$"),inside:{"table-header":{pattern:RegExp(tableCell),alias:"important",inside:Prism.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:createInline(/\b__(?:(?!_)|_(?:(?!_))+_)+__\b|\*\*(?:(?!\*)|\*(?:(?!\*))+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:createInline(/\b_(?:(?!_)|__(?:(?!_))+__)+_\b|\*(?:(?!\*)|\*\*(?:(?!\*))+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:createInline(/(~~?)(?:(?!~))+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:createInline(/!?\[(?:(?!\]))+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\]))+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach((function(token){["url","bold","italic","strike","code-snippet"].forEach((function(inside){token!==inside&&(Prism.languages.markdown[token].inside.content.inside[inside]=Prism.languages.markdown[inside])}))})),Prism.hooks.add("after-tokenize",(function(env){"markdown"!==env.language&&"md"!==env.language||function walkTokens(tokens){if(tokens&&"string"!=typeof tokens)for(var i=0,l=tokens.length;i",quot:'"'},fromCodePoint=String.fromCodePoint||String.fromCharCode;Prism.languages.md=Prism.languages.markdown}(Prism)}module.exports=markdown,markdown.displayName="markdown",markdown.aliases=["md"]},1646:function(module,exports,__webpack_require__){"use strict";function bash(Prism){!function(Prism){var envVars="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",commandAfterHeredoc={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},insideString={bash:commandAfterHeredoc,environment:{pattern:RegExp("\\$"+envVars),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+envVars),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|x[0-9a-fA-F]{1,2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8})/};Prism.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+envVars),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:insideString},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:commandAfterHeredoc}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:insideString},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:insideString.entity}}],environment:{pattern:RegExp("\\$?"+envVars),alias:"constant"},variable:insideString.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|aptitude|apt-cache|apt-get|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:if|then|else|elif|fi|for|while|in|case|esac|function|select|do|done|until)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|break|cd|continue|eval|exec|exit|export|getopts|hash|pwd|readonly|return|shift|test|times|trap|umask|unset|alias|bind|builtin|caller|command|declare|echo|enable|help|let|local|logout|mapfile|printf|read|readarray|source|type|typeset|ulimit|unalias|set|shopt)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:true|false)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},commandAfterHeredoc.inside=Prism.languages.bash;for(var toBeCopied=["comment","function-name","for-or-select","assign-left","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],inside=insideString.variable[1].inside,i=0;i0)){var mutationEnd=findClosingBracket(/^\{$/,/^\}$/);if(-1===mutationEnd)continue;for(var i=currentIndex;i=0&&addAlias(varToken,"variable-input")}}}}function getToken(offset){return validTokens[currentIndex+offset]}function isTokenType(types,offset){offset=offset||0;for(var i=0;i 1 ? _len - 1 : 0), - _key = 1; - _key < _len; - _key++ - ) - args[_key - 1] = arguments[_key]; - return fn.apply(void 0, args); - } - }, - setRef = function setRef(ref, node) { - if ('function' == typeof ref) return safeInvoke(ref, node); - null != ref && (ref.current = node); - }, - fromEntries = function fromEntries(entries) { - return entries.reduce(function(acc, _ref) { - var key = _ref[0], - value = _ref[1]; - return (acc[key] = value), acc; - }, {}); - }, - useIsomorphicLayoutEffect = - 'undefined' != typeof window && - window.document && - window.document.createElement - ? react.useLayoutEffect - : react.useEffect; - function getWindow(node) { - if (null == node) return window; - if ('[object Window]' !== node.toString()) { - var ownerDocument = node.ownerDocument; - return (ownerDocument && ownerDocument.defaultView) || window; - } - return node; - } - function isElement(node) { - return ( - node instanceof getWindow(node).Element || node instanceof Element - ); - } - function isHTMLElement(node) { - return ( - node instanceof getWindow(node).HTMLElement || - node instanceof HTMLElement - ); - } - function isShadowRoot(node) { - return ( - 'undefined' != typeof ShadowRoot && - (node instanceof getWindow(node).ShadowRoot || - node instanceof ShadowRoot) - ); - } - var math_max = Math.max, - math_min = Math.min, - round = Math.round; - function getBoundingClientRect(element, includeScale) { - void 0 === includeScale && (includeScale = !1); - var rect = element.getBoundingClientRect(), - scaleX = 1, - scaleY = 1; - if (isHTMLElement(element) && includeScale) { - var offsetHeight = element.offsetHeight, - offsetWidth = element.offsetWidth; - offsetWidth > 0 && (scaleX = round(rect.width) / offsetWidth || 1), - offsetHeight > 0 && - (scaleY = round(rect.height) / offsetHeight || 1); - } - return { - width: rect.width / scaleX, - height: rect.height / scaleY, - top: rect.top / scaleY, - right: rect.right / scaleX, - bottom: rect.bottom / scaleY, - left: rect.left / scaleX, - x: rect.left / scaleX, - y: rect.top / scaleY - }; - } - function getWindowScroll(node) { - var win = getWindow(node); - return { scrollLeft: win.pageXOffset, scrollTop: win.pageYOffset }; - } - function getNodeName(element) { - return element ? (element.nodeName || '').toLowerCase() : null; - } - function getDocumentElement(element) { - return ( - (isElement(element) ? element.ownerDocument : element.document) || - window.document - ).documentElement; - } - function getWindowScrollBarX(element) { - return ( - getBoundingClientRect(getDocumentElement(element)).left + - getWindowScroll(element).scrollLeft - ); - } - function getComputedStyle(element) { - return getWindow(element).getComputedStyle(element); - } - function isScrollParent(element) { - var _getComputedStyle = getComputedStyle(element), - overflow = _getComputedStyle.overflow, - overflowX = _getComputedStyle.overflowX, - overflowY = _getComputedStyle.overflowY; - return /auto|scroll|overlay|hidden/.test( - overflow + overflowY + overflowX - ); - } - function getCompositeRect( - elementOrVirtualElement, - offsetParent, - isFixed - ) { - void 0 === isFixed && (isFixed = !1); - var isOffsetParentAnElement = isHTMLElement(offsetParent), - offsetParentIsScaled = - isHTMLElement(offsetParent) && - (function isElementScaled(element) { - var rect = element.getBoundingClientRect(), - scaleX = round(rect.width) / element.offsetWidth || 1, - scaleY = round(rect.height) / element.offsetHeight || 1; - return 1 !== scaleX || 1 !== scaleY; - })(offsetParent), - documentElement = getDocumentElement(offsetParent), - rect = getBoundingClientRect( - elementOrVirtualElement, - offsetParentIsScaled - ), - scroll = { scrollLeft: 0, scrollTop: 0 }, - offsets = { x: 0, y: 0 }; - return ( - (isOffsetParentAnElement || (!isOffsetParentAnElement && !isFixed)) && - (('body' !== getNodeName(offsetParent) || - isScrollParent(documentElement)) && - (scroll = (function getNodeScroll(node) { - return node !== getWindow(node) && isHTMLElement(node) - ? (function getHTMLElementScroll(element) { - return { - scrollLeft: element.scrollLeft, - scrollTop: element.scrollTop - }; - })(node) - : getWindowScroll(node); - })(offsetParent)), - isHTMLElement(offsetParent) - ? (((offsets = getBoundingClientRect(offsetParent, !0)).x += - offsetParent.clientLeft), - (offsets.y += offsetParent.clientTop)) - : documentElement && - (offsets.x = getWindowScrollBarX(documentElement))), - { - x: rect.left + scroll.scrollLeft - offsets.x, - y: rect.top + scroll.scrollTop - offsets.y, - width: rect.width, - height: rect.height - } - ); - } - function getLayoutRect(element) { - var clientRect = getBoundingClientRect(element), - width = element.offsetWidth, - height = element.offsetHeight; - return ( - Math.abs(clientRect.width - width) <= 1 && (width = clientRect.width), - Math.abs(clientRect.height - height) <= 1 && - (height = clientRect.height), - { - x: element.offsetLeft, - y: element.offsetTop, - width: width, - height: height - } - ); - } - function getParentNode(element) { - return 'html' === getNodeName(element) - ? element - : element.assignedSlot || - element.parentNode || - (isShadowRoot(element) ? element.host : null) || - getDocumentElement(element); - } - function getScrollParent(node) { - return ['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0 - ? node.ownerDocument.body - : isHTMLElement(node) && isScrollParent(node) - ? node - : getScrollParent(getParentNode(node)); - } - function listScrollParents(element, list) { - var _element$ownerDocumen; - void 0 === list && (list = []); - var scrollParent = getScrollParent(element), - isBody = - scrollParent === - (null == (_element$ownerDocumen = element.ownerDocument) - ? void 0 - : _element$ownerDocumen.body), - win = getWindow(scrollParent), - target = isBody - ? [win].concat( - win.visualViewport || [], - isScrollParent(scrollParent) ? scrollParent : [] - ) - : scrollParent, - updatedList = list.concat(target); - return isBody - ? updatedList - : updatedList.concat(listScrollParents(getParentNode(target))); - } - function isTableElement(element) { - return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0; - } - function getTrueOffsetParent(element) { - return isHTMLElement(element) && - 'fixed' !== getComputedStyle(element).position - ? element.offsetParent - : null; - } - function getOffsetParent(element) { - for ( - var window = getWindow(element), - offsetParent = getTrueOffsetParent(element); - offsetParent && - isTableElement(offsetParent) && - 'static' === getComputedStyle(offsetParent).position; - - ) - offsetParent = getTrueOffsetParent(offsetParent); - return offsetParent && - ('html' === getNodeName(offsetParent) || - ('body' === getNodeName(offsetParent) && - 'static' === getComputedStyle(offsetParent).position)) - ? window - : offsetParent || - (function getContainingBlock(element) { - var isFirefox = - -1 !== navigator.userAgent.toLowerCase().indexOf('firefox'); - if ( - -1 !== navigator.userAgent.indexOf('Trident') && - isHTMLElement(element) && - 'fixed' === getComputedStyle(element).position - ) - return null; - for ( - var currentNode = getParentNode(element); - isHTMLElement(currentNode) && - ['html', 'body'].indexOf(getNodeName(currentNode)) < 0; - - ) { - var css = getComputedStyle(currentNode); - if ( - 'none' !== css.transform || - 'none' !== css.perspective || - 'paint' === css.contain || - -1 !== - ['transform', 'perspective'].indexOf(css.willChange) || - (isFirefox && 'filter' === css.willChange) || - (isFirefox && css.filter && 'none' !== css.filter) - ) - return currentNode; - currentNode = currentNode.parentNode; - } - return null; - })(element) || - window; - } - var enums = __webpack_require__(430); - function order(modifiers) { - var map = new Map(), - visited = new Set(), - result = []; - function sort(modifier) { - visited.add(modifier.name), - [] - .concat(modifier.requires || [], modifier.requiresIfExists || []) - .forEach(function(dep) { - if (!visited.has(dep)) { - var depModifier = map.get(dep); - depModifier && sort(depModifier); - } - }), - result.push(modifier); - } - return ( - modifiers.forEach(function(modifier) { - map.set(modifier.name, modifier); - }), - modifiers.forEach(function(modifier) { - visited.has(modifier.name) || sort(modifier); - }), - result - ); - } - var DEFAULT_OPTIONS = { - placement: 'bottom', - modifiers: [], - strategy: 'absolute' - }; - function areValidElements() { - for ( - var _len = arguments.length, args = new Array(_len), _key = 0; - _key < _len; - _key++ - ) - args[_key] = arguments[_key]; - return !args.some(function(element) { - return !( - element && 'function' == typeof element.getBoundingClientRect - ); - }); - } - function popperGenerator(generatorOptions) { - void 0 === generatorOptions && (generatorOptions = {}); - var _generatorOptions = generatorOptions, - _generatorOptions$def = _generatorOptions.defaultModifiers, - defaultModifiers = - void 0 === _generatorOptions$def ? [] : _generatorOptions$def, - _generatorOptions$def2 = _generatorOptions.defaultOptions, - defaultOptions = - void 0 === _generatorOptions$def2 - ? DEFAULT_OPTIONS - : _generatorOptions$def2; - return function createPopper(reference, popper, options) { - void 0 === options && (options = defaultOptions); - var fn, - pending, - state = { - placement: 'bottom', - orderedModifiers: [], - options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions), - modifiersData: {}, - elements: { reference: reference, popper: popper }, - attributes: {}, - styles: {} - }, - effectCleanupFns = [], - isDestroyed = !1, - instance = { - state: state, - setOptions: function setOptions(setOptionsAction) { - var options = - 'function' == typeof setOptionsAction - ? setOptionsAction(state.options) - : setOptionsAction; - cleanupModifierEffects(), - (state.options = Object.assign( - {}, - defaultOptions, - state.options, - options - )), - (state.scrollParents = { - reference: isElement(reference) - ? listScrollParents(reference) - : reference.contextElement - ? listScrollParents(reference.contextElement) - : [], - popper: listScrollParents(popper) - }); - var orderedModifiers = (function orderModifiers(modifiers) { - var orderedModifiers = order(modifiers); - return enums.g.reduce(function(acc, phase) { - return acc.concat( - orderedModifiers.filter(function(modifier) { - return modifier.phase === phase; - }) - ); - }, []); - })( - (function mergeByName(modifiers) { - var merged = modifiers.reduce(function(merged, current) { - var existing = merged[current.name]; - return ( - (merged[current.name] = existing - ? Object.assign({}, existing, current, { - options: Object.assign( - {}, - existing.options, - current.options - ), - data: Object.assign( - {}, - existing.data, - current.data - ) - }) - : current), - merged - ); - }, {}); - return Object.keys(merged).map(function(key) { - return merged[key]; - }); - })([].concat(defaultModifiers, state.options.modifiers)) - ); - return ( - (state.orderedModifiers = orderedModifiers.filter(function( - m - ) { - return m.enabled; - })), - (function runModifierEffects() { - state.orderedModifiers.forEach(function(_ref3) { - var name = _ref3.name, - _ref3$options = _ref3.options, - options = void 0 === _ref3$options ? {} : _ref3$options, - effect = _ref3.effect; - if ('function' == typeof effect) { - var cleanupFn = effect({ - state: state, - name: name, - instance: instance, - options: options - }), - noopFn = function noopFn() {}; - effectCleanupFns.push(cleanupFn || noopFn); - } - }); - })(), - instance.update() - ); - }, - forceUpdate: function forceUpdate() { - if (!isDestroyed) { - var _state$elements = state.elements, - reference = _state$elements.reference, - popper = _state$elements.popper; - if (areValidElements(reference, popper)) { - (state.rects = { - reference: getCompositeRect( - reference, - getOffsetParent(popper), - 'fixed' === state.options.strategy - ), - popper: getLayoutRect(popper) - }), - (state.reset = !1), - (state.placement = state.options.placement), - state.orderedModifiers.forEach(function(modifier) { - return (state.modifiersData[ - modifier.name - ] = Object.assign({}, modifier.data)); - }); - for ( - var index = 0; - index < state.orderedModifiers.length; - index++ - ) - if (!0 !== state.reset) { - var _state$orderedModifie = - state.orderedModifiers[index], - fn = _state$orderedModifie.fn, - _state$orderedModifie2 = - _state$orderedModifie.options, - _options = - void 0 === _state$orderedModifie2 - ? {} - : _state$orderedModifie2, - name = _state$orderedModifie.name; - 'function' == typeof fn && - (state = - fn({ - state: state, - options: _options, - name: name, - instance: instance - }) || state); - } else (state.reset = !1), (index = -1); - } - } - }, - update: ((fn = function() { - return new Promise(function(resolve) { - instance.forceUpdate(), resolve(state); - }); - }), - function() { - return ( - pending || - (pending = new Promise(function(resolve) { - Promise.resolve().then(function() { - (pending = void 0), resolve(fn()); - }); - })), - pending - ); - }), - destroy: function destroy() { - cleanupModifierEffects(), (isDestroyed = !0); - } - }; - if (!areValidElements(reference, popper)) return instance; - function cleanupModifierEffects() { - effectCleanupFns.forEach(function(fn) { - return fn(); - }), - (effectCleanupFns = []); - } - return ( - instance.setOptions(options).then(function(state) { - !isDestroyed && - options.onFirstUpdate && - options.onFirstUpdate(state); - }), - instance - ); - }; - } - var passive = { passive: !0 }; - function getBasePlacement(placement) { - return placement.split('-')[0]; - } - function getVariation(placement) { - return placement.split('-')[1]; - } - function getMainAxisFromPlacement(placement) { - return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y'; - } - function computeOffsets(_ref) { - var offsets, - reference = _ref.reference, - element = _ref.element, - placement = _ref.placement, - basePlacement = placement ? getBasePlacement(placement) : null, - variation = placement ? getVariation(placement) : null, - commonX = reference.x + reference.width / 2 - element.width / 2, - commonY = reference.y + reference.height / 2 - element.height / 2; - switch (basePlacement) { - case enums.m: - offsets = { x: commonX, y: reference.y - element.height }; - break; - case enums.c: - offsets = { x: commonX, y: reference.y + reference.height }; - break; - case enums.k: - offsets = { x: reference.x + reference.width, y: commonY }; - break; - case enums.f: - offsets = { x: reference.x - element.width, y: commonY }; - break; - default: - offsets = { x: reference.x, y: reference.y }; - } - var mainAxis = basePlacement - ? getMainAxisFromPlacement(basePlacement) - : null; - if (null != mainAxis) { - var len = 'y' === mainAxis ? 'height' : 'width'; - switch (variation) { - case enums.l: - offsets[mainAxis] = - offsets[mainAxis] - (reference[len] / 2 - element[len] / 2); - break; - case enums.e: - offsets[mainAxis] = - offsets[mainAxis] + (reference[len] / 2 - element[len] / 2); - } - } - return offsets; - } - var unsetSides = { - top: 'auto', - right: 'auto', - bottom: 'auto', - left: 'auto' - }; - function mapToStyles(_ref2) { - var _Object$assign2, - popper = _ref2.popper, - popperRect = _ref2.popperRect, - placement = _ref2.placement, - variation = _ref2.variation, - offsets = _ref2.offsets, - position = _ref2.position, - gpuAcceleration = _ref2.gpuAcceleration, - adaptive = _ref2.adaptive, - roundOffsets = _ref2.roundOffsets, - isFixed = _ref2.isFixed, - _ref3 = - !0 === roundOffsets - ? (function roundOffsetsByDPR(_ref) { - var x = _ref.x, - y = _ref.y, - dpr = window.devicePixelRatio || 1; - return { - x: round(x * dpr) / dpr || 0, - y: round(y * dpr) / dpr || 0 - }; - })(offsets) - : 'function' == typeof roundOffsets - ? roundOffsets(offsets) - : offsets, - _ref3$x = _ref3.x, - x = void 0 === _ref3$x ? 0 : _ref3$x, - _ref3$y = _ref3.y, - y = void 0 === _ref3$y ? 0 : _ref3$y, - hasX = offsets.hasOwnProperty('x'), - hasY = offsets.hasOwnProperty('y'), - sideX = enums.f, - sideY = enums.m, - win = window; - if (adaptive) { - var offsetParent = getOffsetParent(popper), - heightProp = 'clientHeight', - widthProp = 'clientWidth'; - if ( - (offsetParent === getWindow(popper) && - 'static' !== - getComputedStyle((offsetParent = getDocumentElement(popper))) - .position && - 'absolute' === position && - ((heightProp = 'scrollHeight'), (widthProp = 'scrollWidth')), - (offsetParent = offsetParent), - placement === enums.m || - ((placement === enums.f || placement === enums.k) && - variation === enums.e)) - ) - (sideY = enums.c), - (y -= - (isFixed && win.visualViewport - ? win.visualViewport.height - : offsetParent[heightProp]) - popperRect.height), - (y *= gpuAcceleration ? 1 : -1); - if ( - placement === enums.f || - ((placement === enums.m || placement === enums.c) && - variation === enums.e) - ) - (sideX = enums.k), - (x -= - (isFixed && win.visualViewport - ? win.visualViewport.width - : offsetParent[widthProp]) - popperRect.width), - (x *= gpuAcceleration ? 1 : -1); - } - var _Object$assign, - commonStyles = Object.assign( - { position: position }, - adaptive && unsetSides - ); - return gpuAcceleration - ? Object.assign( - {}, - commonStyles, - (((_Object$assign = {})[sideY] = hasY ? '0' : ''), - (_Object$assign[sideX] = hasX ? '0' : ''), - (_Object$assign.transform = - (win.devicePixelRatio || 1) <= 1 - ? 'translate(' + x + 'px, ' + y + 'px)' - : 'translate3d(' + x + 'px, ' + y + 'px, 0)'), - _Object$assign) - ) - : Object.assign( - {}, - commonStyles, - (((_Object$assign2 = {})[sideY] = hasY ? y + 'px' : ''), - (_Object$assign2[sideX] = hasX ? x + 'px' : ''), - (_Object$assign2.transform = ''), - _Object$assign2) - ); - } - var hash = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' }; - function getOppositePlacement(placement) { - return placement.replace(/left|right|bottom|top/g, function(matched) { - return hash[matched]; - }); - } - var getOppositeVariationPlacement_hash = { start: 'end', end: 'start' }; - function getOppositeVariationPlacement(placement) { - return placement.replace(/start|end/g, function(matched) { - return getOppositeVariationPlacement_hash[matched]; - }); - } - function contains(parent, child) { - var rootNode = child.getRootNode && child.getRootNode(); - if (parent.contains(child)) return !0; - if (rootNode && isShadowRoot(rootNode)) { - var next = child; - do { - if (next && parent.isSameNode(next)) return !0; - next = next.parentNode || next.host; - } while (next); - } - return !1; - } - function rectToClientRect(rect) { - return Object.assign({}, rect, { - left: rect.x, - top: rect.y, - right: rect.x + rect.width, - bottom: rect.y + rect.height - }); - } - function getClientRectFromMixedType(element, clippingParent) { - return clippingParent === enums.o - ? rectToClientRect( - (function getViewportRect(element) { - var win = getWindow(element), - html = getDocumentElement(element), - visualViewport = win.visualViewport, - width = html.clientWidth, - height = html.clientHeight, - x = 0, - y = 0; - return ( - visualViewport && - ((width = visualViewport.width), - (height = visualViewport.height), - /^((?!chrome|android).)*safari/i.test( - navigator.userAgent - ) || - ((x = visualViewport.offsetLeft), - (y = visualViewport.offsetTop))), - { - width: width, - height: height, - x: x + getWindowScrollBarX(element), - y: y - } - ); - })(element) - ) - : isElement(clippingParent) - ? (function getInnerBoundingClientRect(element) { - var rect = getBoundingClientRect(element); - return ( - (rect.top = rect.top + element.clientTop), - (rect.left = rect.left + element.clientLeft), - (rect.bottom = rect.top + element.clientHeight), - (rect.right = rect.left + element.clientWidth), - (rect.width = element.clientWidth), - (rect.height = element.clientHeight), - (rect.x = rect.left), - (rect.y = rect.top), - rect - ); - })(clippingParent) - : rectToClientRect( - (function getDocumentRect(element) { - var _element$ownerDocumen, - html = getDocumentElement(element), - winScroll = getWindowScroll(element), - body = - null == (_element$ownerDocumen = element.ownerDocument) - ? void 0 - : _element$ownerDocumen.body, - width = math_max( - html.scrollWidth, - html.clientWidth, - body ? body.scrollWidth : 0, - body ? body.clientWidth : 0 - ), - height = math_max( - html.scrollHeight, - html.clientHeight, - body ? body.scrollHeight : 0, - body ? body.clientHeight : 0 - ), - x = -winScroll.scrollLeft + getWindowScrollBarX(element), - y = -winScroll.scrollTop; - return ( - 'rtl' === getComputedStyle(body || html).direction && - (x += - math_max( - html.clientWidth, - body ? body.clientWidth : 0 - ) - width), - { width: width, height: height, x: x, y: y } - ); - })(getDocumentElement(element)) - ); - } - function getClippingRect(element, boundary, rootBoundary) { - var mainClippingParents = - 'clippingParents' === boundary - ? (function getClippingParents(element) { - var clippingParents = listScrollParents( - getParentNode(element) - ), - canEscapeClipping = - ['absolute', 'fixed'].indexOf( - getComputedStyle(element).position - ) >= 0, - clipperElement = - canEscapeClipping && isHTMLElement(element) - ? getOffsetParent(element) - : element; - return isElement(clipperElement) - ? clippingParents.filter(function(clippingParent) { - return ( - isElement(clippingParent) && - contains(clippingParent, clipperElement) && - 'body' !== getNodeName(clippingParent) && - (!canEscapeClipping || - 'static' !== - getComputedStyle(clippingParent).position) - ); - }) - : []; - })(element) - : [].concat(boundary), - clippingParents = [].concat(mainClippingParents, [rootBoundary]), - firstClippingParent = clippingParents[0], - clippingRect = clippingParents.reduce(function( - accRect, - clippingParent - ) { - var rect = getClientRectFromMixedType(element, clippingParent); - return ( - (accRect.top = math_max(rect.top, accRect.top)), - (accRect.right = math_min(rect.right, accRect.right)), - (accRect.bottom = math_min(rect.bottom, accRect.bottom)), - (accRect.left = math_max(rect.left, accRect.left)), - accRect - ); - }, - getClientRectFromMixedType(element, firstClippingParent)); - return ( - (clippingRect.width = clippingRect.right - clippingRect.left), - (clippingRect.height = clippingRect.bottom - clippingRect.top), - (clippingRect.x = clippingRect.left), - (clippingRect.y = clippingRect.top), - clippingRect - ); - } - function mergePaddingObject(paddingObject) { - return Object.assign( - {}, - { top: 0, right: 0, bottom: 0, left: 0 }, - paddingObject - ); - } - function expandToHashMap(value, keys) { - return keys.reduce(function(hashMap, key) { - return (hashMap[key] = value), hashMap; - }, {}); - } - function detectOverflow(state, options) { - void 0 === options && (options = {}); - var _options = options, - _options$placement = _options.placement, - placement = - void 0 === _options$placement - ? state.placement - : _options$placement, - _options$boundary = _options.boundary, - boundary = void 0 === _options$boundary ? enums.d : _options$boundary, - _options$rootBoundary = _options.rootBoundary, - rootBoundary = - void 0 === _options$rootBoundary ? enums.o : _options$rootBoundary, - _options$elementConte = _options.elementContext, - elementContext = - void 0 === _options$elementConte ? enums.i : _options$elementConte, - _options$altBoundary = _options.altBoundary, - altBoundary = void 0 !== _options$altBoundary && _options$altBoundary, - _options$padding = _options.padding, - padding = void 0 === _options$padding ? 0 : _options$padding, - paddingObject = mergePaddingObject( - 'number' != typeof padding - ? padding - : expandToHashMap(padding, enums.b) - ), - altContext = elementContext === enums.i ? enums.j : enums.i, - popperRect = state.rects.popper, - element = state.elements[altBoundary ? altContext : elementContext], - clippingClientRect = getClippingRect( - isElement(element) - ? element - : element.contextElement || - getDocumentElement(state.elements.popper), - boundary, - rootBoundary - ), - referenceClientRect = getBoundingClientRect(state.elements.reference), - popperOffsets = computeOffsets({ - reference: referenceClientRect, - element: popperRect, - strategy: 'absolute', - placement: placement - }), - popperClientRect = rectToClientRect( - Object.assign({}, popperRect, popperOffsets) - ), - elementClientRect = - elementContext === enums.i ? popperClientRect : referenceClientRect, - overflowOffsets = { - top: - clippingClientRect.top - - elementClientRect.top + - paddingObject.top, - bottom: - elementClientRect.bottom - - clippingClientRect.bottom + - paddingObject.bottom, - left: - clippingClientRect.left - - elementClientRect.left + - paddingObject.left, - right: - elementClientRect.right - - clippingClientRect.right + - paddingObject.right - }, - offsetData = state.modifiersData.offset; - if (elementContext === enums.i && offsetData) { - var offset = offsetData[placement]; - Object.keys(overflowOffsets).forEach(function(key) { - var multiply = [enums.k, enums.c].indexOf(key) >= 0 ? 1 : -1, - axis = [enums.m, enums.c].indexOf(key) >= 0 ? 'y' : 'x'; - overflowOffsets[key] += offset[axis] * multiply; - }); - } - return overflowOffsets; - } - function within(min, value, max) { - return math_max(min, math_min(value, max)); - } - function getSideOffsets(overflow, rect, preventedOffsets) { - return ( - void 0 === preventedOffsets && (preventedOffsets = { x: 0, y: 0 }), - { - top: overflow.top - rect.height - preventedOffsets.y, - right: overflow.right - rect.width + preventedOffsets.x, - bottom: overflow.bottom - rect.height + preventedOffsets.y, - left: overflow.left - rect.width - preventedOffsets.x - } - ); - } - function isAnySideFullyClipped(overflow) { - return [enums.m, enums.k, enums.c, enums.f].some(function(side) { - return overflow[side] >= 0; - }); - } - var popper_createPopper = popperGenerator({ - defaultModifiers: [ - { - name: 'eventListeners', - enabled: !0, - phase: 'write', - fn: function fn() {}, - effect: function effect(_ref) { - var state = _ref.state, - instance = _ref.instance, - options = _ref.options, - _options$scroll = options.scroll, - scroll = void 0 === _options$scroll || _options$scroll, - _options$resize = options.resize, - resize = void 0 === _options$resize || _options$resize, - window = getWindow(state.elements.popper), - scrollParents = [].concat( - state.scrollParents.reference, - state.scrollParents.popper - ); - return ( - scroll && - scrollParents.forEach(function(scrollParent) { - scrollParent.addEventListener( - 'scroll', - instance.update, - passive - ); - }), - resize && - window.addEventListener('resize', instance.update, passive), - function() { - scroll && - scrollParents.forEach(function(scrollParent) { - scrollParent.removeEventListener( - 'scroll', - instance.update, - passive - ); - }), - resize && - window.removeEventListener( - 'resize', - instance.update, - passive - ); - } - ); - }, - data: {} - }, - { - name: 'popperOffsets', - enabled: !0, - phase: 'read', - fn: function popperOffsets_popperOffsets(_ref) { - var state = _ref.state, - name = _ref.name; - state.modifiersData[name] = computeOffsets({ - reference: state.rects.reference, - element: state.rects.popper, - strategy: 'absolute', - placement: state.placement - }); - }, - data: {} - }, - { - name: 'computeStyles', - enabled: !0, - phase: 'beforeWrite', - fn: function computeStyles(_ref4) { - var state = _ref4.state, - options = _ref4.options, - _options$gpuAccelerat = options.gpuAcceleration, - gpuAcceleration = - void 0 === _options$gpuAccelerat || _options$gpuAccelerat, - _options$adaptive = options.adaptive, - adaptive = void 0 === _options$adaptive || _options$adaptive, - _options$roundOffsets = options.roundOffsets, - roundOffsets = - void 0 === _options$roundOffsets || _options$roundOffsets, - commonStyles = { - placement: getBasePlacement(state.placement), - variation: getVariation(state.placement), - popper: state.elements.popper, - popperRect: state.rects.popper, - gpuAcceleration: gpuAcceleration, - isFixed: 'fixed' === state.options.strategy - }; - null != state.modifiersData.popperOffsets && - (state.styles.popper = Object.assign( - {}, - state.styles.popper, - mapToStyles( - Object.assign({}, commonStyles, { - offsets: state.modifiersData.popperOffsets, - position: state.options.strategy, - adaptive: adaptive, - roundOffsets: roundOffsets - }) - ) - )), - null != state.modifiersData.arrow && - (state.styles.arrow = Object.assign( - {}, - state.styles.arrow, - mapToStyles( - Object.assign({}, commonStyles, { - offsets: state.modifiersData.arrow, - position: 'absolute', - adaptive: !1, - roundOffsets: roundOffsets - }) - ) - )), - (state.attributes.popper = Object.assign( - {}, - state.attributes.popper, - { 'data-popper-placement': state.placement } - )); - }, - data: {} - }, - { - name: 'applyStyles', - enabled: !0, - phase: 'write', - fn: function applyStyles(_ref) { - var state = _ref.state; - Object.keys(state.elements).forEach(function(name) { - var style = state.styles[name] || {}, - attributes = state.attributes[name] || {}, - element = state.elements[name]; - isHTMLElement(element) && - getNodeName(element) && - (Object.assign(element.style, style), - Object.keys(attributes).forEach(function(name) { - var value = attributes[name]; - !1 === value - ? element.removeAttribute(name) - : element.setAttribute(name, !0 === value ? '' : value); - })); - }); - }, - effect: function applyStyles_effect(_ref2) { - var state = _ref2.state, - initialStyles = { - popper: { - position: state.options.strategy, - left: '0', - top: '0', - margin: '0' - }, - arrow: { position: 'absolute' }, - reference: {} - }; - return ( - Object.assign( - state.elements.popper.style, - initialStyles.popper - ), - (state.styles = initialStyles), - state.elements.arrow && - Object.assign( - state.elements.arrow.style, - initialStyles.arrow - ), - function() { - Object.keys(state.elements).forEach(function(name) { - var element = state.elements[name], - attributes = state.attributes[name] || {}, - style = Object.keys( - state.styles.hasOwnProperty(name) - ? state.styles[name] - : initialStyles[name] - ).reduce(function(style, property) { - return (style[property] = ''), style; - }, {}); - isHTMLElement(element) && - getNodeName(element) && - (Object.assign(element.style, style), - Object.keys(attributes).forEach(function(attribute) { - element.removeAttribute(attribute); - })); - }); - } - ); - }, - requires: ['computeStyles'] - }, - { - name: 'offset', - enabled: !0, - phase: 'main', - requires: ['popperOffsets'], - fn: function offset_offset(_ref2) { - var state = _ref2.state, - options = _ref2.options, - name = _ref2.name, - _options$offset = options.offset, - offset = - void 0 === _options$offset ? [0, 0] : _options$offset, - data = enums.h.reduce(function(acc, placement) { - return ( - (acc[placement] = (function distanceAndSkiddingToXY( - placement, - rects, - offset - ) { - var basePlacement = getBasePlacement(placement), - invertDistance = - [enums.f, enums.m].indexOf(basePlacement) >= 0 - ? -1 - : 1, - _ref = - 'function' == typeof offset - ? offset( - Object.assign({}, rects, { - placement: placement - }) - ) - : offset, - skidding = _ref[0], - distance = _ref[1]; - return ( - (skidding = skidding || 0), - (distance = (distance || 0) * invertDistance), - [enums.f, enums.k].indexOf(basePlacement) >= 0 - ? { x: distance, y: skidding } - : { x: skidding, y: distance } - ); - })(placement, state.rects, offset)), - acc - ); - }, {}), - _data$state$placement = data[state.placement], - x = _data$state$placement.x, - y = _data$state$placement.y; - null != state.modifiersData.popperOffsets && - ((state.modifiersData.popperOffsets.x += x), - (state.modifiersData.popperOffsets.y += y)), - (state.modifiersData[name] = data); - } - }, - { - name: 'flip', - enabled: !0, - phase: 'main', - fn: function flip(_ref) { - var state = _ref.state, - options = _ref.options, - name = _ref.name; - if (!state.modifiersData[name]._skip) { - for ( - var _options$mainAxis = options.mainAxis, - checkMainAxis = - void 0 === _options$mainAxis || _options$mainAxis, - _options$altAxis = options.altAxis, - checkAltAxis = - void 0 === _options$altAxis || _options$altAxis, - specifiedFallbackPlacements = options.fallbackPlacements, - padding = options.padding, - boundary = options.boundary, - rootBoundary = options.rootBoundary, - altBoundary = options.altBoundary, - _options$flipVariatio = options.flipVariations, - flipVariations = - void 0 === _options$flipVariatio || - _options$flipVariatio, - allowedAutoPlacements = options.allowedAutoPlacements, - preferredPlacement = state.options.placement, - basePlacement = getBasePlacement(preferredPlacement), - fallbackPlacements = - specifiedFallbackPlacements || - (basePlacement === preferredPlacement || !flipVariations - ? [getOppositePlacement(preferredPlacement)] - : (function getExpandedFallbackPlacements(placement) { - if (getBasePlacement(placement) === enums.a) - return []; - var oppositePlacement = getOppositePlacement( - placement - ); - return [ - getOppositeVariationPlacement(placement), - oppositePlacement, - getOppositeVariationPlacement(oppositePlacement) - ]; - })(preferredPlacement)), - placements = [preferredPlacement] - .concat(fallbackPlacements) - .reduce(function(acc, placement) { - return acc.concat( - getBasePlacement(placement) === enums.a - ? (function computeAutoPlacement(state, options) { - void 0 === options && (options = {}); - var _options = options, - placement = _options.placement, - boundary = _options.boundary, - rootBoundary = _options.rootBoundary, - padding = _options.padding, - flipVariations = _options.flipVariations, - _options$allowedAutoP = - _options.allowedAutoPlacements, - allowedAutoPlacements = - void 0 === _options$allowedAutoP - ? enums.h - : _options$allowedAutoP, - variation = getVariation(placement), - placements = variation - ? flipVariations - ? enums.n - : enums.n.filter(function(placement) { - return ( - getVariation(placement) === - variation - ); - }) - : enums.b, - allowedPlacements = placements.filter( - function(placement) { - return ( - allowedAutoPlacements.indexOf( - placement - ) >= 0 - ); - } - ); - 0 === allowedPlacements.length && - (allowedPlacements = placements); - var overflows = allowedPlacements.reduce( - function(acc, placement) { - return ( - (acc[placement] = detectOverflow( - state, - { - placement: placement, - boundary: boundary, - rootBoundary: rootBoundary, - padding: padding - } - )[getBasePlacement(placement)]), - acc - ); - }, - {} - ); - return Object.keys(overflows).sort(function( - a, - b - ) { - return overflows[a] - overflows[b]; - }); - })(state, { - placement: placement, - boundary: boundary, - rootBoundary: rootBoundary, - padding: padding, - flipVariations: flipVariations, - allowedAutoPlacements: allowedAutoPlacements - }) - : placement - ); - }, []), - referenceRect = state.rects.reference, - popperRect = state.rects.popper, - checksMap = new Map(), - makeFallbackChecks = !0, - firstFittingPlacement = placements[0], - i = 0; - i < placements.length; - i++ - ) { - var placement = placements[i], - _basePlacement = getBasePlacement(placement), - isStartVariation = getVariation(placement) === enums.l, - isVertical = - [enums.m, enums.c].indexOf(_basePlacement) >= 0, - len = isVertical ? 'width' : 'height', - overflow = detectOverflow(state, { - placement: placement, - boundary: boundary, - rootBoundary: rootBoundary, - altBoundary: altBoundary, - padding: padding - }), - mainVariationSide = isVertical - ? isStartVariation - ? enums.k - : enums.f - : isStartVariation - ? enums.c - : enums.m; - referenceRect[len] > popperRect[len] && - (mainVariationSide = getOppositePlacement( - mainVariationSide - )); - var altVariationSide = getOppositePlacement( - mainVariationSide - ), - checks = []; - if ( - (checkMainAxis && - checks.push(overflow[_basePlacement] <= 0), - checkAltAxis && - checks.push( - overflow[mainVariationSide] <= 0, - overflow[altVariationSide] <= 0 - ), - checks.every(function(check) { - return check; - })) - ) { - (firstFittingPlacement = placement), - (makeFallbackChecks = !1); - break; - } - checksMap.set(placement, checks); - } - if (makeFallbackChecks) - for ( - var _loop = function _loop(_i) { - var fittingPlacement = placements.find(function( - placement - ) { - var checks = checksMap.get(placement); - if (checks) - return checks.slice(0, _i).every(function(check) { - return check; - }); - }); - if (fittingPlacement) - return ( - (firstFittingPlacement = fittingPlacement), - 'break' - ); - }, - _i = flipVariations ? 3 : 1; - _i > 0; - _i-- - ) { - if ('break' === _loop(_i)) break; - } - state.placement !== firstFittingPlacement && - ((state.modifiersData[name]._skip = !0), - (state.placement = firstFittingPlacement), - (state.reset = !0)); - } - }, - requiresIfExists: ['offset'], - data: { _skip: !1 } - }, - { - name: 'preventOverflow', - enabled: !0, - phase: 'main', - fn: function preventOverflow(_ref) { - var state = _ref.state, - options = _ref.options, - name = _ref.name, - _options$mainAxis = options.mainAxis, - checkMainAxis = - void 0 === _options$mainAxis || _options$mainAxis, - _options$altAxis = options.altAxis, - checkAltAxis = - void 0 !== _options$altAxis && _options$altAxis, - boundary = options.boundary, - rootBoundary = options.rootBoundary, - altBoundary = options.altBoundary, - padding = options.padding, - _options$tether = options.tether, - tether = void 0 === _options$tether || _options$tether, - _options$tetherOffset = options.tetherOffset, - tetherOffset = - void 0 === _options$tetherOffset - ? 0 - : _options$tetherOffset, - overflow = detectOverflow(state, { - boundary: boundary, - rootBoundary: rootBoundary, - padding: padding, - altBoundary: altBoundary - }), - basePlacement = getBasePlacement(state.placement), - variation = getVariation(state.placement), - isBasePlacement = !variation, - mainAxis = getMainAxisFromPlacement(basePlacement), - altAxis = (function getAltAxis(axis) { - return 'x' === axis ? 'y' : 'x'; - })(mainAxis), - popperOffsets = state.modifiersData.popperOffsets, - referenceRect = state.rects.reference, - popperRect = state.rects.popper, - tetherOffsetValue = - 'function' == typeof tetherOffset - ? tetherOffset( - Object.assign({}, state.rects, { - placement: state.placement - }) - ) - : tetherOffset, - normalizedTetherOffsetValue = - 'number' == typeof tetherOffsetValue - ? { - mainAxis: tetherOffsetValue, - altAxis: tetherOffsetValue - } - : Object.assign( - { mainAxis: 0, altAxis: 0 }, - tetherOffsetValue - ), - offsetModifierState = state.modifiersData.offset - ? state.modifiersData.offset[state.placement] - : null, - data = { x: 0, y: 0 }; - if (popperOffsets) { - if (checkMainAxis) { - var _offsetModifierState$, - mainSide = 'y' === mainAxis ? enums.m : enums.f, - altSide = 'y' === mainAxis ? enums.c : enums.k, - len = 'y' === mainAxis ? 'height' : 'width', - offset = popperOffsets[mainAxis], - min = offset + overflow[mainSide], - max = offset - overflow[altSide], - additive = tether ? -popperRect[len] / 2 : 0, - minLen = - variation === enums.l - ? referenceRect[len] - : popperRect[len], - maxLen = - variation === enums.l - ? -popperRect[len] - : -referenceRect[len], - arrowElement = state.elements.arrow, - arrowRect = - tether && arrowElement - ? getLayoutRect(arrowElement) - : { width: 0, height: 0 }, - arrowPaddingObject = state.modifiersData[ - 'arrow#persistent' - ] - ? state.modifiersData['arrow#persistent'].padding - : { top: 0, right: 0, bottom: 0, left: 0 }, - arrowPaddingMin = arrowPaddingObject[mainSide], - arrowPaddingMax = arrowPaddingObject[altSide], - arrowLen = within(0, referenceRect[len], arrowRect[len]), - minOffset = isBasePlacement - ? referenceRect[len] / 2 - - additive - - arrowLen - - arrowPaddingMin - - normalizedTetherOffsetValue.mainAxis - : minLen - - arrowLen - - arrowPaddingMin - - normalizedTetherOffsetValue.mainAxis, - maxOffset = isBasePlacement - ? -referenceRect[len] / 2 + - additive + - arrowLen + - arrowPaddingMax + - normalizedTetherOffsetValue.mainAxis - : maxLen + - arrowLen + - arrowPaddingMax + - normalizedTetherOffsetValue.mainAxis, - arrowOffsetParent = - state.elements.arrow && - getOffsetParent(state.elements.arrow), - clientOffset = arrowOffsetParent - ? 'y' === mainAxis - ? arrowOffsetParent.clientTop || 0 - : arrowOffsetParent.clientLeft || 0 - : 0, - offsetModifierValue = - null != - (_offsetModifierState$ = - null == offsetModifierState - ? void 0 - : offsetModifierState[mainAxis]) - ? _offsetModifierState$ - : 0, - tetherMax = offset + maxOffset - offsetModifierValue, - preventedOffset = within( - tether - ? math_min( - min, - offset + - minOffset - - offsetModifierValue - - clientOffset - ) - : min, - offset, - tether ? math_max(max, tetherMax) : max - ); - (popperOffsets[mainAxis] = preventedOffset), - (data[mainAxis] = preventedOffset - offset); - } - if (checkAltAxis) { - var _offsetModifierState$2, - _mainSide = 'x' === mainAxis ? enums.m : enums.f, - _altSide = 'x' === mainAxis ? enums.c : enums.k, - _offset = popperOffsets[altAxis], - _len = 'y' === altAxis ? 'height' : 'width', - _min = _offset + overflow[_mainSide], - _max = _offset - overflow[_altSide], - isOriginSide = - -1 !== [enums.m, enums.f].indexOf(basePlacement), - _offsetModifierValue = - null != - (_offsetModifierState$2 = - null == offsetModifierState - ? void 0 - : offsetModifierState[altAxis]) - ? _offsetModifierState$2 - : 0, - _tetherMin = isOriginSide - ? _min - : _offset - - referenceRect[_len] - - popperRect[_len] - - _offsetModifierValue + - normalizedTetherOffsetValue.altAxis, - _tetherMax = isOriginSide - ? _offset + - referenceRect[_len] + - popperRect[_len] - - _offsetModifierValue - - normalizedTetherOffsetValue.altAxis - : _max, - _preventedOffset = - tether && isOriginSide - ? (function withinMaxClamp(min, value, max) { - var v = within(min, value, max); - return v > max ? max : v; - })(_tetherMin, _offset, _tetherMax) - : within( - tether ? _tetherMin : _min, - _offset, - tether ? _tetherMax : _max - ); - (popperOffsets[altAxis] = _preventedOffset), - (data[altAxis] = _preventedOffset - _offset); - } - state.modifiersData[name] = data; - } - }, - requiresIfExists: ['offset'] - }, - { - name: 'arrow', - enabled: !0, - phase: 'main', - fn: function arrow(_ref) { - var _state$modifiersData$, - state = _ref.state, - name = _ref.name, - options = _ref.options, - arrowElement = state.elements.arrow, - popperOffsets = state.modifiersData.popperOffsets, - basePlacement = getBasePlacement(state.placement), - axis = getMainAxisFromPlacement(basePlacement), - len = - [enums.f, enums.k].indexOf(basePlacement) >= 0 - ? 'height' - : 'width'; - if (arrowElement && popperOffsets) { - var paddingObject = (function toPaddingObject( - padding, - state - ) { - return mergePaddingObject( - 'number' != - typeof (padding = - 'function' == typeof padding - ? padding( - Object.assign({}, state.rects, { - placement: state.placement - }) - ) - : padding) - ? padding - : expandToHashMap(padding, enums.b) - ); - })(options.padding, state), - arrowRect = getLayoutRect(arrowElement), - minProp = 'y' === axis ? enums.m : enums.f, - maxProp = 'y' === axis ? enums.c : enums.k, - endDiff = - state.rects.reference[len] + - state.rects.reference[axis] - - popperOffsets[axis] - - state.rects.popper[len], - startDiff = - popperOffsets[axis] - state.rects.reference[axis], - arrowOffsetParent = getOffsetParent(arrowElement), - clientSize = arrowOffsetParent - ? 'y' === axis - ? arrowOffsetParent.clientHeight || 0 - : arrowOffsetParent.clientWidth || 0 - : 0, - centerToReference = endDiff / 2 - startDiff / 2, - min = paddingObject[minProp], - max = clientSize - arrowRect[len] - paddingObject[maxProp], - center = - clientSize / 2 - arrowRect[len] / 2 + centerToReference, - offset = within(min, center, max), - axisProp = axis; - state.modifiersData[name] = (((_state$modifiersData$ = {})[ - axisProp - ] = offset), - (_state$modifiersData$.centerOffset = offset - center), - _state$modifiersData$); - } - }, - effect: function arrow_effect(_ref2) { - var state = _ref2.state, - _options$element = _ref2.options.element, - arrowElement = - void 0 === _options$element - ? '[data-popper-arrow]' - : _options$element; - null != arrowElement && - ('string' != typeof arrowElement || - (arrowElement = state.elements.popper.querySelector( - arrowElement - ))) && - contains(state.elements.popper, arrowElement) && - (state.elements.arrow = arrowElement); - }, - requires: ['popperOffsets'], - requiresIfExists: ['preventOverflow'] - }, - { - name: 'hide', - enabled: !0, - phase: 'main', - requiresIfExists: ['preventOverflow'], - fn: function hide(_ref) { - var state = _ref.state, - name = _ref.name, - referenceRect = state.rects.reference, - popperRect = state.rects.popper, - preventedOffsets = state.modifiersData.preventOverflow, - referenceOverflow = detectOverflow(state, { - elementContext: 'reference' - }), - popperAltOverflow = detectOverflow(state, { - altBoundary: !0 - }), - referenceClippingOffsets = getSideOffsets( - referenceOverflow, - referenceRect - ), - popperEscapeOffsets = getSideOffsets( - popperAltOverflow, - popperRect, - preventedOffsets - ), - isReferenceHidden = isAnySideFullyClipped( - referenceClippingOffsets - ), - hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets); - (state.modifiersData[name] = { - referenceClippingOffsets: referenceClippingOffsets, - popperEscapeOffsets: popperEscapeOffsets, - isReferenceHidden: isReferenceHidden, - hasPopperEscaped: hasPopperEscaped - }), - (state.attributes.popper = Object.assign( - {}, - state.attributes.popper, - { - 'data-popper-reference-hidden': isReferenceHidden, - 'data-popper-escaped': hasPopperEscaped - } - )); - } - } - ] - }), - react_fast_compare = __webpack_require__(848), - react_fast_compare_default = __webpack_require__.n(react_fast_compare), - EMPTY_MODIFIERS = [], - NOOP = function NOOP() {}, - NOOP_PROMISE = function NOOP_PROMISE() { - return Promise.resolve(null); - }, - Popper_EMPTY_MODIFIERS = []; - function Popper(_ref) { - var _ref$placement = _ref.placement, - placement = void 0 === _ref$placement ? 'bottom' : _ref$placement, - _ref$strategy = _ref.strategy, - strategy = void 0 === _ref$strategy ? 'absolute' : _ref$strategy, - _ref$modifiers = _ref.modifiers, - modifiers = - void 0 === _ref$modifiers ? Popper_EMPTY_MODIFIERS : _ref$modifiers, - referenceElement = _ref.referenceElement, - onFirstUpdate = _ref.onFirstUpdate, - innerRef = _ref.innerRef, - children = _ref.children, - referenceNode = react.useContext(ManagerReferenceNodeContext), - _React$useState = react.useState(null), - popperElement = _React$useState[0], - setPopperElement = _React$useState[1], - _React$useState2 = react.useState(null), - arrowElement = _React$useState2[0], - setArrowElement = _React$useState2[1]; - react.useEffect( - function() { - setRef(innerRef, popperElement); - }, - [innerRef, popperElement] - ); - var options = react.useMemo( - function() { - return { - placement: placement, - strategy: strategy, - onFirstUpdate: onFirstUpdate, - modifiers: [].concat(modifiers, [ - { - name: 'arrow', - enabled: null != arrowElement, - options: { element: arrowElement } - } - ]) - }; - }, - [placement, strategy, onFirstUpdate, modifiers, arrowElement] - ), - _usePopper = (function usePopper( - referenceElement, - popperElement, - options - ) { - void 0 === options && (options = {}); - var prevOptions = react.useRef(null), - optionsWithDefaults = { - onFirstUpdate: options.onFirstUpdate, - placement: options.placement || 'bottom', - strategy: options.strategy || 'absolute', - modifiers: options.modifiers || EMPTY_MODIFIERS - }, - _React$useState = react.useState({ - styles: { - popper: { - position: optionsWithDefaults.strategy, - left: '0', - top: '0' - }, - arrow: { position: 'absolute' } - }, - attributes: {} - }), - state = _React$useState[0], - setState = _React$useState[1], - updateStateModifier = react.useMemo(function() { - return { - name: 'updateState', - enabled: !0, - phase: 'write', - fn: function fn(_ref) { - var state = _ref.state, - elements = Object.keys(state.elements); - setState({ - styles: fromEntries( - elements.map(function(element) { - return [element, state.styles[element] || {}]; - }) - ), - attributes: fromEntries( - elements.map(function(element) { - return [element, state.attributes[element]]; - }) - ) - }); - }, - requires: ['computeStyles'] - }; - }, []), - popperOptions = react.useMemo( - function() { - var newOptions = { - onFirstUpdate: optionsWithDefaults.onFirstUpdate, - placement: optionsWithDefaults.placement, - strategy: optionsWithDefaults.strategy, - modifiers: [].concat(optionsWithDefaults.modifiers, [ - updateStateModifier, - { name: 'applyStyles', enabled: !1 } - ]) - }; - return react_fast_compare_default()( - prevOptions.current, - newOptions - ) - ? prevOptions.current || newOptions - : ((prevOptions.current = newOptions), newOptions); - }, - [ - optionsWithDefaults.onFirstUpdate, - optionsWithDefaults.placement, - optionsWithDefaults.strategy, - optionsWithDefaults.modifiers, - updateStateModifier - ] - ), - popperInstanceRef = react.useRef(); - return ( - useIsomorphicLayoutEffect( - function() { - popperInstanceRef.current && - popperInstanceRef.current.setOptions(popperOptions); - }, - [popperOptions] - ), - useIsomorphicLayoutEffect( - function() { - if (null != referenceElement && null != popperElement) { - var popperInstance = (options.createPopper || - popper_createPopper)( - referenceElement, - popperElement, - popperOptions - ); - return ( - (popperInstanceRef.current = popperInstance), - function() { - popperInstance.destroy(), - (popperInstanceRef.current = null); - } - ); - } - }, - [referenceElement, popperElement, options.createPopper] - ), - { - state: popperInstanceRef.current - ? popperInstanceRef.current.state - : null, - styles: state.styles, - attributes: state.attributes, - update: popperInstanceRef.current - ? popperInstanceRef.current.update - : null, - forceUpdate: popperInstanceRef.current - ? popperInstanceRef.current.forceUpdate - : null - } - ); - })(referenceElement || referenceNode, popperElement, options), - state = _usePopper.state, - styles = _usePopper.styles, - forceUpdate = _usePopper.forceUpdate, - update = _usePopper.update, - childrenProps = react.useMemo( - function() { - return { - ref: setPopperElement, - style: styles.popper, - placement: state ? state.placement : placement, - hasPopperEscaped: - state && state.modifiersData.hide - ? state.modifiersData.hide.hasPopperEscaped - : null, - isReferenceHidden: - state && state.modifiersData.hide - ? state.modifiersData.hide.isReferenceHidden - : null, - arrowProps: { style: styles.arrow, ref: setArrowElement }, - forceUpdate: forceUpdate || NOOP, - update: update || NOOP_PROMISE - }; - }, - [ - setPopperElement, - setArrowElement, - placement, - state, - styles, - update, - forceUpdate - ] - ); - return unwrapArray(children)(childrenProps); - } - var warning = __webpack_require__(925), - warning_default = __webpack_require__.n(warning); - function Reference(_ref) { - var children = _ref.children, - innerRef = _ref.innerRef, - setReferenceNode = react.useContext( - ManagerReferenceNodeSetterContext - ), - refHandler = react.useCallback( - function(node) { - setRef(innerRef, node), safeInvoke(setReferenceNode, node); - }, - [innerRef, setReferenceNode] - ); - return ( - react.useEffect(function() { - return function() { - return setRef(innerRef, null); - }; - }), - react.useEffect( - function() { - warning_default()( - Boolean(setReferenceNode), - '`Reference` should not be used outside of a `Manager` component.' - ); - }, - [setReferenceNode] - ), - unwrapArray(children)({ ref: refHandler }) - ); - } - var TooltipContext = react_default.a.createContext({}), - callAll = function callAll() { - for ( - var _len = arguments.length, fns = new Array(_len), _key = 0; - _key < _len; - _key++ - ) - fns[_key] = arguments[_key]; - return function() { - for ( - var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; - _key2 < _len2; - _key2++ - ) - args[_key2] = arguments[_key2]; - return fns.forEach(function(fn) { - return fn && fn.apply(void 0, args); - }); - }; - }, - canUseDOM = function canUseDOM() { - return !( - 'undefined' == typeof window || - !window.document || - !window.document.createElement - ); - }, - react_popper_tooltip_setRef = function setRef(ref, node) { - if ('function' == typeof ref) return ref(node); - null != ref && (ref.current = node); - }, - react_popper_tooltip_Tooltip = (function(_Component) { - function Tooltip() { - for ( - var _this, - _len = arguments.length, - args = new Array(_len), - _key = 0; - _key < _len; - _key++ - ) - args[_key] = arguments[_key]; - return ( - ((_this = - _Component.call.apply(_Component, [this].concat(args)) || - this).observer = void 0), - (_this.tooltipRef = void 0), - (_this.handleOutsideClick = function(event) { - if ( - _this.tooltipRef && - !_this.tooltipRef.contains(event.target) - ) { - var parentOutsideClickHandler = - _this.context.parentOutsideClickHandler, - _this$props = _this.props, - hideTooltip = _this$props.hideTooltip; - (0, _this$props.clearScheduled)(), - hideTooltip(), - parentOutsideClickHandler && - parentOutsideClickHandler(event); - } - }), - (_this.handleOutsideRightClick = function(event) { - if ( - _this.tooltipRef && - !_this.tooltipRef.contains(event.target) - ) { - var parentOutsideRightClickHandler = - _this.context.parentOutsideRightClickHandler, - _this$props2 = _this.props, - hideTooltip = _this$props2.hideTooltip; - (0, _this$props2.clearScheduled)(), - hideTooltip(), - parentOutsideRightClickHandler && - parentOutsideRightClickHandler(event); - } - }), - (_this.addOutsideClickHandler = function() { - document.body.addEventListener( - 'touchend', - _this.handleOutsideClick - ), - document.body.addEventListener( - 'click', - _this.handleOutsideClick - ); - }), - (_this.removeOutsideClickHandler = function() { - document.body.removeEventListener( - 'touchend', - _this.handleOutsideClick - ), - document.body.removeEventListener( - 'click', - _this.handleOutsideClick - ); - }), - (_this.addOutsideRightClickHandler = function() { - return document.body.addEventListener( - 'contextmenu', - _this.handleOutsideRightClick - ); - }), - (_this.removeOutsideRightClickHandler = function() { - return document.body.removeEventListener( - 'contextmenu', - _this.handleOutsideRightClick - ); - }), - (_this.getTooltipRef = function(node) { - (_this.tooltipRef = node), - react_popper_tooltip_setRef(_this.props.innerRef, node); - }), - (_this.getArrowProps = function(props) { - return ( - void 0 === props && (props = {}), - Object(esm_extends.a)({}, props, { - style: Object(esm_extends.a)( - {}, - props.style, - _this.props.arrowProps.style - ) - }) - ); - }), - (_this.getTooltipProps = function(props) { - return ( - void 0 === props && (props = {}), - Object(esm_extends.a)( - {}, - props, - _this.isTriggeredBy('hover') && { - onMouseEnter: callAll( - _this.props.clearScheduled, - props.onMouseEnter - ), - onMouseLeave: callAll( - _this.props.hideTooltip, - props.onMouseLeave - ) - }, - { - style: Object(esm_extends.a)( - {}, - props.style, - _this.props.style - ) - } - ) - ); - }), - (_this.contextValue = { - isParentNoneTriggered: 'none' === _this.props.trigger, - addParentOutsideClickHandler: _this.addOutsideClickHandler, - addParentOutsideRightClickHandler: - _this.addOutsideRightClickHandler, - parentOutsideClickHandler: _this.handleOutsideClick, - parentOutsideRightClickHandler: _this.handleOutsideRightClick, - removeParentOutsideClickHandler: - _this.removeOutsideClickHandler, - removeParentOutsideRightClickHandler: - _this.removeOutsideRightClickHandler - }), - _this - ); - } - Object(inheritsLoose.a)(Tooltip, _Component); - var _proto = Tooltip.prototype; - return ( - (_proto.componentDidMount = function componentDidMount() { - var _this2 = this; - if ( - ((this.observer = new MutationObserver(function() { - _this2.props.update(); - })).observe( - this.tooltipRef, - this.props.mutationObserverOptions - ), - this.isTriggeredBy('hover') || - this.isTriggeredBy('click') || - this.isTriggeredBy('right-click')) - ) { - var _this$context = this.context, - removeParentOutsideClickHandler = - _this$context.removeParentOutsideClickHandler, - removeParentOutsideRightClickHandler = - _this$context.removeParentOutsideRightClickHandler; - this.addOutsideClickHandler(), - this.addOutsideRightClickHandler(), - removeParentOutsideClickHandler && - removeParentOutsideClickHandler(), - removeParentOutsideRightClickHandler && - removeParentOutsideRightClickHandler(); - } - }), - (_proto.componentDidUpdate = function componentDidUpdate() { - this.props.closeOnReferenceHidden && - this.props.isReferenceHidden && - this.props.hideTooltip(); - }), - (_proto.componentWillUnmount = function componentWillUnmount() { - if ( - (this.observer && this.observer.disconnect(), - this.isTriggeredBy('hover') || - this.isTriggeredBy('click') || - this.isTriggeredBy('right-click')) - ) { - var _this$context2 = this.context, - isParentNoneTriggered = _this$context2.isParentNoneTriggered, - addParentOutsideClickHandler = - _this$context2.addParentOutsideClickHandler, - addParentOutsideRightClickHandler = - _this$context2.addParentOutsideRightClickHandler; - this.removeOutsideClickHandler(), - this.removeOutsideRightClickHandler(), - (this.handleOutsideClick = void 0), - (this.handleOutsideRightClick = void 0), - !isParentNoneTriggered && - addParentOutsideClickHandler && - addParentOutsideClickHandler(), - !isParentNoneTriggered && - addParentOutsideRightClickHandler && - addParentOutsideRightClickHandler(); - } - }), - (_proto.render = function render() { - var _this$props3 = this.props, - arrowProps = _this$props3.arrowProps, - placement = _this$props3.placement, - tooltip = _this$props3.tooltip; - return react_default.a.createElement( - TooltipContext.Provider, - { value: this.contextValue }, - tooltip({ - arrowRef: arrowProps.ref, - getArrowProps: this.getArrowProps, - getTooltipProps: this.getTooltipProps, - placement: placement, - tooltipRef: this.getTooltipRef - }) - ); - }), - (_proto.isTriggeredBy = function isTriggeredBy(event) { - var trigger = this.props.trigger; - return ( - trigger === event || - (Array.isArray(trigger) && trigger.includes(event)) - ); - }), - Tooltip - ); - })(react.Component); - react_popper_tooltip_Tooltip.contextType = TooltipContext; - var react_popper_tooltip_TooltipTrigger = (function(_Component) { - function TooltipTrigger() { - for ( - var _this, - _len = arguments.length, - args = new Array(_len), - _key = 0; - _key < _len; - _key++ - ) - args[_key] = arguments[_key]; - return ( - ((_this = - _Component.call.apply(_Component, [this].concat(args)) || - this).state = { tooltipShown: _this.props.defaultTooltipShown }), - (_this.hideTimeout = void 0), - (_this.showTimeout = void 0), - (_this.popperOffset = void 0), - (_this.setTooltipState = function(state) { - var cb = function cb() { - return _this.props.onVisibilityChange(state.tooltipShown); - }; - _this.isControlled() ? cb() : _this.setState(state, cb); - }), - (_this.clearScheduled = function() { - clearTimeout(_this.hideTimeout), clearTimeout(_this.showTimeout); - }), - (_this.showTooltip = function(_ref) { - var pageX = _ref.pageX, - pageY = _ref.pageY; - _this.clearScheduled(); - var state = { tooltipShown: !0 }; - _this.props.followCursor && - (state = Object(esm_extends.a)({}, state, { - pageX: pageX, - pageY: pageY - })), - (_this.showTimeout = window.setTimeout(function() { - return _this.setTooltipState(state); - }, _this.props.delayShow)); - }), - (_this.hideTooltip = function() { - _this.clearScheduled(), - (_this.hideTimeout = window.setTimeout(function() { - return _this.setTooltipState({ tooltipShown: !1 }); - }, _this.props.delayHide)); - }), - (_this.toggleTooltip = function(_ref2) { - var pageX = _ref2.pageX, - pageY = _ref2.pageY, - action = _this.getState() ? 'hideTooltip' : 'showTooltip'; - _this[action]({ pageX: pageX, pageY: pageY }); - }), - (_this.clickToggle = function(event) { - event.preventDefault(); - var pageX = event.pageX, - pageY = event.pageY, - action = _this.props.followCursor - ? 'showTooltip' - : 'toggleTooltip'; - _this[action]({ pageX: pageX, pageY: pageY }); - }), - (_this.contextMenuToggle = function(event) { - event.preventDefault(); - var pageX = event.pageX, - pageY = event.pageY, - action = _this.props.followCursor - ? 'showTooltip' - : 'toggleTooltip'; - _this[action]({ pageX: pageX, pageY: pageY }); - }), - (_this.getTriggerProps = function(props) { - return ( - void 0 === props && (props = {}), - Object(esm_extends.a)( - {}, - props, - _this.isTriggeredBy('click') && { - onClick: callAll(_this.clickToggle, props.onClick), - onTouchEnd: callAll(_this.clickToggle, props.onTouchEnd) - }, - _this.isTriggeredBy('right-click') && { - onContextMenu: callAll( - _this.contextMenuToggle, - props.onContextMenu - ) - }, - _this.isTriggeredBy('hover') && - Object(esm_extends.a)( - { - onMouseEnter: callAll( - _this.showTooltip, - props.onMouseEnter - ), - onMouseLeave: callAll( - _this.hideTooltip, - props.onMouseLeave - ) - }, - _this.props.followCursor && { - onMouseMove: callAll( - _this.showTooltip, - props.onMouseMove - ) - } - ), - _this.isTriggeredBy('focus') && { - onFocus: callAll(_this.showTooltip, props.onFocus), - onBlur: callAll(_this.hideTooltip, props.onBlur) - } - ) - ); - }), - _this - ); - } - Object(inheritsLoose.a)(TooltipTrigger, _Component); - var _proto = TooltipTrigger.prototype; - return ( - (_proto.componentWillUnmount = function componentWillUnmount() { - this.clearScheduled(); - }), - (_proto.render = function render() { - var _this2 = this, - _this$props = this.props, - children = _this$props.children, - tooltip = _this$props.tooltip, - placement = _this$props.placement, - trigger = _this$props.trigger, - getTriggerRef = _this$props.getTriggerRef, - modifiers = _this$props.modifiers, - closeOnReferenceHidden = _this$props.closeOnReferenceHidden, - usePortal = _this$props.usePortal, - portalContainer = _this$props.portalContainer, - followCursor = _this$props.followCursor, - getTooltipRef = _this$props.getTooltipRef, - mutationObserverOptions = _this$props.mutationObserverOptions, - restProps = Object(objectWithoutPropertiesLoose.a)(_this$props, [ - 'children', - 'tooltip', - 'placement', - 'trigger', - 'getTriggerRef', - 'modifiers', - 'closeOnReferenceHidden', - 'usePortal', - 'portalContainer', - 'followCursor', - 'getTooltipRef', - 'mutationObserverOptions' - ]), - popper = react_default.a.createElement( - Popper, - Object(esm_extends.a)( - { - innerRef: getTooltipRef, - placement: placement, - modifiers: [ - { - name: 'followCursor', - enabled: followCursor, - phase: 'main', - fn: function fn(data) { - _this2.popperOffset = data.state.rects.popper; - } - } - ].concat(modifiers) - }, - restProps - ), - function(_ref3) { - var ref = _ref3.ref, - style = _ref3.style, - placement = _ref3.placement, - arrowProps = _ref3.arrowProps, - isReferenceHidden = _ref3.isReferenceHidden, - update = _ref3.update; - if (followCursor && _this2.popperOffset) { - var _this2$state = _this2.state, - pageX = _this2$state.pageX, - pageY = _this2$state.pageY, - _this2$popperOffset = _this2.popperOffset, - width = _this2$popperOffset.width, - height = _this2$popperOffset.height, - x = - pageX + width > - window.pageXOffset + document.body.offsetWidth - ? pageX - width - : pageX, - y = - pageY + height > - window.pageYOffset + document.body.offsetHeight - ? pageY - height - : pageY; - style.transform = 'translate3d(' + x + 'px, ' + y + 'px, 0'; - } - return react_default.a.createElement( - react_popper_tooltip_Tooltip, - Object(esm_extends.a)( - { - arrowProps: arrowProps, - closeOnReferenceHidden: closeOnReferenceHidden, - isReferenceHidden: isReferenceHidden, - placement: placement, - update: update, - style: style, - tooltip: tooltip, - trigger: trigger, - mutationObserverOptions: mutationObserverOptions - }, - { - clearScheduled: _this2.clearScheduled, - hideTooltip: _this2.hideTooltip, - innerRef: ref - } - ) - ); - } - ); - return react_default.a.createElement( - Manager, - null, - react_default.a.createElement( - Reference, - { innerRef: getTriggerRef }, - function(_ref4) { - var ref = _ref4.ref; - return children({ - getTriggerProps: _this2.getTriggerProps, - triggerRef: ref - }); - } - ), - this.getState() && - (usePortal - ? Object(react_dom.createPortal)(popper, portalContainer) - : popper) - ); - }), - (_proto.isControlled = function isControlled() { - return void 0 !== this.props.tooltipShown; - }), - (_proto.getState = function getState() { - return this.isControlled() - ? this.props.tooltipShown - : this.state.tooltipShown; - }), - (_proto.isTriggeredBy = function isTriggeredBy(event) { - var trigger = this.props.trigger; - return ( - trigger === event || - (Array.isArray(trigger) && trigger.includes(event)) - ); - }), - TooltipTrigger - ); - })(react.Component); - react_popper_tooltip_TooltipTrigger.defaultProps = { - closeOnReferenceHidden: !0, - defaultTooltipShown: !1, - delayHide: 0, - delayShow: 0, - followCursor: !1, - onVisibilityChange: function noop() {}, - placement: 'right', - portalContainer: canUseDOM() ? document.body : null, - trigger: 'hover', - usePortal: canUseDOM(), - mutationObserverOptions: { childList: !0, subtree: !0 }, - modifiers: [] - }; - var react_popper_tooltip = react_popper_tooltip_TooltipTrigger, - memoizerific = (__webpack_require__(109), - __webpack_require__(28), - __webpack_require__(303), - __webpack_require__(18), - __webpack_require__(31)), - memoizerific_default = __webpack_require__.n(memoizerific), - utils = __webpack_require__(105); - function _extends() { - return ( - (_extends = - Object.assign || - function(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i]; - for (var key in source) - Object.prototype.hasOwnProperty.call(source, key) && - (target[key] = source[key]); - } - return target; - }), - _extends.apply(this, arguments) - ); - } - function _objectWithoutProperties(source, excluded) { - if (null == source) return {}; - var key, - i, - target = (function _objectWithoutPropertiesLoose(source, excluded) { - if (null == source) return {}; - var key, - i, - target = {}, - sourceKeys = Object.keys(source); - for (i = 0; i < sourceKeys.length; i++) - (key = sourceKeys[i]), - excluded.indexOf(key) >= 0 || (target[key] = source[key]); - return target; - })(source, excluded); - if (Object.getOwnPropertySymbols) { - var sourceSymbolKeys = Object.getOwnPropertySymbols(source); - for (i = 0; i < sourceSymbolKeys.length; i++) - (key = sourceSymbolKeys[i]), - excluded.indexOf(key) >= 0 || - (Object.prototype.propertyIsEnumerable.call(source, key) && - (target[key] = source[key])); - } - return target; - } - var _templateObject, - _templateObject2, - match = memoizerific_default()(1e3)(function(requests, actual, value) { - var fallback = - arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : 0; - return actual.split('-')[0] === requests ? value : fallback; - }), - Arrow = esm.styled.div( - { position: 'absolute', borderStyle: 'solid' }, - function(_ref) { - var placement = _ref.placement, - x = 0, - y = 0; - switch (!0) { - case placement.startsWith('left') || - placement.startsWith('right'): - y = 8; - break; - case placement.startsWith('top') || - placement.startsWith('bottom'): - x = 8; - } - return { - transform: 'translate3d('.concat(x, 'px, ').concat(y, 'px, 0px)') - }; - }, - function(_ref2) { - var theme = _ref2.theme, - color = _ref2.color, - placement = _ref2.placement; - return { - bottom: ''.concat(match('top', placement, -8, 'auto'), 'px'), - top: ''.concat(match('bottom', placement, -8, 'auto'), 'px'), - right: ''.concat(match('left', placement, -8, 'auto'), 'px'), - left: ''.concat(match('right', placement, -8, 'auto'), 'px'), - borderBottomWidth: ''.concat( - match('top', placement, '0', 8), - 'px' - ), - borderTopWidth: ''.concat( - match('bottom', placement, '0', 8), - 'px' - ), - borderRightWidth: ''.concat( - match('left', placement, '0', 8), - 'px' - ), - borderLeftWidth: ''.concat( - match('right', placement, '0', 8), - 'px' - ), - borderTopColor: match( - 'top', - placement, - theme.color[color] || color || 'light' === theme.base - ? Object(utils.c)(theme.background.app) - : Object(utils.a)(theme.background.app), - 'transparent' - ), - borderBottomColor: match( - 'bottom', - placement, - theme.color[color] || color || 'light' === theme.base - ? Object(utils.c)(theme.background.app) - : Object(utils.a)(theme.background.app), - 'transparent' - ), - borderLeftColor: match( - 'left', - placement, - theme.color[color] || color || 'light' === theme.base - ? Object(utils.c)(theme.background.app) - : Object(utils.a)(theme.background.app), - 'transparent' - ), - borderRightColor: match( - 'right', - placement, - theme.color[color] || color || 'light' === theme.base - ? Object(utils.c)(theme.background.app) - : Object(utils.a)(theme.background.app), - 'transparent' - ) - }; - } - ), - Wrapper = esm.styled.div( - function(_ref3) { - return { - display: _ref3.hidden ? 'none' : 'inline-block', - zIndex: 2147483647 - }; - }, - function(_ref4) { - var theme = _ref4.theme, - color = _ref4.color; - return _ref4.hasChrome - ? { - background: - theme.color[color] || color || 'light' === theme.base - ? Object(utils.c)(theme.background.app) - : Object(utils.a)(theme.background.app), - filter: - '\n drop-shadow(0px 5px 5px rgba(0,0,0,0.05))\n drop-shadow(0 1px 3px rgba(0,0,0,0.1))\n ', - borderRadius: 2 * theme.appBorderRadius, - fontSize: theme.typography.size.s1 - } - : {}; - } - ), - Tooltip_Tooltip = function Tooltip(_ref5) { - var placement = _ref5.placement, - hasChrome = _ref5.hasChrome, - children = _ref5.children, - arrowProps = _ref5.arrowProps, - tooltipRef = _ref5.tooltipRef, - arrowRef = _ref5.arrowRef, - color = _ref5.color, - props = _objectWithoutProperties(_ref5, [ - 'placement', - 'hasChrome', - 'children', - 'arrowProps', - 'tooltipRef', - 'arrowRef', - 'color' - ]); - return react_default.a.createElement( - Wrapper, - _extends( - { hasChrome: hasChrome, placement: placement, ref: tooltipRef }, - props, - { color: color } - ), - hasChrome && - react_default.a.createElement( - Arrow, - _extends({ placement: placement, ref: arrowRef }, arrowProps, { - color: color - }) - ), - children - ); - }; - function _slicedToArray(arr, i) { - return ( - (function _arrayWithHoles(arr) { - if (Array.isArray(arr)) return arr; - })(arr) || - (function _iterableToArrayLimit(arr, i) { - if ( - 'undefined' == typeof Symbol || - !(Symbol.iterator in Object(arr)) - ) - return; - var _arr = [], - _n = !0, - _d = !1, - _e = void 0; - try { - for ( - var _s, _i = arr[Symbol.iterator](); - !(_n = (_s = _i.next()).done) && - (_arr.push(_s.value), !i || _arr.length !== i); - _n = !0 - ); - } catch (err) { - (_d = !0), (_e = err); - } finally { - try { - _n || null == _i.return || _i.return(); - } finally { - if (_d) throw _e; - } - } - return _arr; - })(arr, i) || - (function _unsupportedIterableToArray(o, minLen) { - if (!o) return; - if ('string' == typeof o) return _arrayLikeToArray(o, minLen); - var n = Object.prototype.toString.call(o).slice(8, -1); - 'Object' === n && o.constructor && (n = o.constructor.name); - if ('Map' === n || 'Set' === n) return Array.from(o); - if ( - 'Arguments' === n || - /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) - ) - return _arrayLikeToArray(o, minLen); - })(arr, i) || - (function _nonIterableRest() { - throw new TypeError( - 'Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.' - ); - })() - ); - } - function _arrayLikeToArray(arr, len) { - (null == len || len > arr.length) && (len = arr.length); - for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; - return arr2; - } - function WithTooltip_extends() { - return ( - (WithTooltip_extends = - Object.assign || - function(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i]; - for (var key in source) - Object.prototype.hasOwnProperty.call(source, key) && - (target[key] = source[key]); - } - return target; - }), - WithTooltip_extends.apply(this, arguments) - ); - } - function WithTooltip_objectWithoutProperties(source, excluded) { - if (null == source) return {}; - var key, - i, - target = (function WithTooltip_objectWithoutPropertiesLoose( - source, - excluded - ) { - if (null == source) return {}; - var key, - i, - target = {}, - sourceKeys = Object.keys(source); - for (i = 0; i < sourceKeys.length; i++) - (key = sourceKeys[i]), - excluded.indexOf(key) >= 0 || (target[key] = source[key]); - return target; - })(source, excluded); - if (Object.getOwnPropertySymbols) { - var sourceSymbolKeys = Object.getOwnPropertySymbols(source); - for (i = 0; i < sourceSymbolKeys.length; i++) - (key = sourceSymbolKeys[i]), - excluded.indexOf(key) >= 0 || - (Object.prototype.propertyIsEnumerable.call(source, key) && - (target[key] = source[key])); - } - return target; - } - function _taggedTemplateLiteral(strings, raw) { - return ( - raw || (raw = strings.slice(0)), - Object.freeze( - Object.defineProperties(strings, { - raw: { value: Object.freeze(raw) } - }) - ) - ); - } - (Tooltip_Tooltip.displayName = 'Tooltip'), - (Tooltip_Tooltip.defaultProps = { - color: void 0, - arrowRef: void 0, - tooltipRef: void 0, - hasChrome: !0, - placement: 'top', - arrowProps: {} - }); - var WithTooltip_document = window_default.a.document, - TargetContainer = esm.styled.div( - _templateObject || - (_templateObject = _taggedTemplateLiteral([ - '\n display: inline-block;\n cursor: ', - ';\n' - ])), - function(props) { - return 'hover' === props.mode ? 'default' : 'pointer'; - } - ), - TargetSvgContainer = esm.styled.g( - _templateObject2 || - (_templateObject2 = _taggedTemplateLiteral([ - '\n cursor: ', - ';\n' - ])), - function(props) { - return 'hover' === props.mode ? 'default' : 'pointer'; - } - ), - WithTooltip_WithTooltipPure = function WithTooltipPure(_ref) { - var svg = _ref.svg, - trigger = _ref.trigger, - placement = (_ref.closeOnClick, _ref.placement), - modifiers = _ref.modifiers, - hasChrome = _ref.hasChrome, - _tooltip = _ref.tooltip, - children = _ref.children, - tooltipShown = _ref.tooltipShown, - onVisibilityChange = _ref.onVisibilityChange, - props = WithTooltip_objectWithoutProperties(_ref, [ - 'svg', - 'trigger', - 'closeOnClick', - 'placement', - 'modifiers', - 'hasChrome', - 'tooltip', - 'children', - 'tooltipShown', - 'onVisibilityChange' - ]), - Container = svg ? TargetSvgContainer : TargetContainer; - return react_default.a.createElement( - react_popper_tooltip, - { - placement: placement, - trigger: trigger, - modifiers: modifiers, - tooltipShown: tooltipShown, - onVisibilityChange: onVisibilityChange, - tooltip: function tooltip(_ref2) { - var getTooltipProps = _ref2.getTooltipProps, - getArrowProps = _ref2.getArrowProps, - tooltipRef = _ref2.tooltipRef, - arrowRef = _ref2.arrowRef, - tooltipPlacement = _ref2.placement; - return react_default.a.createElement( - Tooltip_Tooltip, - WithTooltip_extends( - { - hasChrome: hasChrome, - placement: tooltipPlacement, - tooltipRef: tooltipRef, - arrowRef: arrowRef, - arrowProps: getArrowProps() - }, - getTooltipProps() - ), - 'function' == typeof _tooltip - ? _tooltip({ - onHide: function onHide() { - return onVisibilityChange(!1); - } - }) - : _tooltip - ); - } - }, - function(_ref3) { - var getTriggerProps = _ref3.getTriggerProps, - triggerRef = _ref3.triggerRef; - return react_default.a.createElement( - Container, - WithTooltip_extends( - { ref: triggerRef }, - getTriggerProps(), - props - ), - children - ); - } - ); - }; - (WithTooltip_WithTooltipPure.displayName = 'WithTooltipPure'), - (WithTooltip_WithTooltipPure.defaultProps = { - svg: !1, - trigger: 'hover', - closeOnClick: !1, - placement: 'top', - modifiers: [ - { name: 'preventOverflow', options: { padding: 8 } }, - { name: 'offset', options: { offset: [8, 8] } }, - { name: 'arrow', options: { padding: 8 } } - ], - hasChrome: !0, - tooltipShown: !1 - }); - var WithTooltip_WithToolTipState = function WithToolTipState(_ref4) { - var startOpen = _ref4.startOpen, - onChange = _ref4.onVisibilityChange, - rest = WithTooltip_objectWithoutProperties(_ref4, [ - 'startOpen', - 'onVisibilityChange' - ]), - _useState2 = _slicedToArray( - Object(react.useState)(startOpen || !1), - 2 - ), - tooltipShown = _useState2[0], - setTooltipShown = _useState2[1], - onVisibilityChange = Object(react.useCallback)( - function(visibility) { - (onChange && !1 === onChange(visibility)) || - setTooltipShown(visibility); - }, - [onChange] - ); - return ( - Object(react.useEffect)(function() { - var hide = function hide() { - return onVisibilityChange(!1); - }; - WithTooltip_document.addEventListener('keydown', hide, !1); - var iframes = Array.from( - WithTooltip_document.getElementsByTagName('iframe') - ), - unbinders = []; - return ( - iframes.forEach(function(iframe) { - var bind = function bind() { - try { - iframe.contentWindow.document && - (iframe.contentWindow.document.addEventListener( - 'click', - hide - ), - unbinders.push(function() { - try { - iframe.contentWindow.document.removeEventListener( - 'click', - hide - ); - } catch (e) {} - })); - } catch (e) {} - }; - bind(), - iframe.addEventListener('load', bind), - unbinders.push(function() { - iframe.removeEventListener('load', bind); - }); - }), - function() { - WithTooltip_document.removeEventListener('keydown', hide), - unbinders.forEach(function(unbind) { - unbind(); - }); - } - ); - }), - react_default.a.createElement( - WithTooltip_WithTooltipPure, - WithTooltip_extends({}, rest, { - tooltipShown: tooltipShown, - onVisibilityChange: onVisibilityChange - }) - ) - ); - }; - WithTooltip_WithToolTipState.displayName = 'WithToolTipState'; - }, - 925: function(module, exports, __webpack_require__) { - 'use strict'; - var warning = function() {}; - module.exports = warning; - } - } -]); diff --git a/docs/1.52392f60ef6b7acc3a2b.manager.bundle.js b/docs/1.52392f60ef6b7acc3a2b.manager.bundle.js new file mode 100644 index 00000000..7f38d821 --- /dev/null +++ b/docs/1.52392f60ef6b7acc3a2b.manager.bundle.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{1611:function(module,exports,__webpack_require__){"use strict";var warning=function(){};module.exports=warning},817:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,"WithTooltipPure",(function(){return WithTooltip_WithTooltipPure})),__webpack_require__.d(__webpack_exports__,"WithToolTipState",(function(){return WithTooltip_WithToolTipState})),__webpack_require__.d(__webpack_exports__,"WithTooltip",(function(){return WithTooltip_WithToolTipState}));__webpack_require__(16),__webpack_require__(88),__webpack_require__(21),__webpack_require__(5),__webpack_require__(11),__webpack_require__(13),__webpack_require__(8),__webpack_require__(14),__webpack_require__(10),__webpack_require__(12),__webpack_require__(15),__webpack_require__(22),__webpack_require__(9),__webpack_require__(65);var react=__webpack_require__(0),react_default=__webpack_require__.n(react),esm=__webpack_require__(1),global_window=__webpack_require__(6),window_default=__webpack_require__.n(global_window),objectWithoutPropertiesLoose=__webpack_require__(63),esm_extends=__webpack_require__(7),inheritsLoose=__webpack_require__(210),react_dom=__webpack_require__(271),ManagerReferenceNodeContext=react.createContext(),ManagerReferenceNodeSetterContext=react.createContext();function Manager(_ref){var children=_ref.children,_React$useState=react.useState(null),referenceNode=_React$useState[0],setReferenceNode=_React$useState[1],hasUnmounted=react.useRef(!1);react.useEffect((function(){return function(){hasUnmounted.current=!0}}),[]);var handleSetReferenceNode=react.useCallback((function(node){hasUnmounted.current||setReferenceNode(node)}),[]);return react.createElement(ManagerReferenceNodeContext.Provider,{value:referenceNode},react.createElement(ManagerReferenceNodeSetterContext.Provider,{value:handleSetReferenceNode},children))}var unwrapArray=function unwrapArray(arg){return Array.isArray(arg)?arg[0]:arg},safeInvoke=function safeInvoke(fn){if("function"==typeof fn){for(var _len=arguments.length,args=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++)args[_key-1]=arguments[_key];return fn.apply(void 0,args)}},setRef=function setRef(ref,node){if("function"==typeof ref)return safeInvoke(ref,node);null!=ref&&(ref.current=node)},fromEntries=function fromEntries(entries){return entries.reduce((function(acc,_ref){var key=_ref[0],value=_ref[1];return acc[key]=value,acc}),{})},useIsomorphicLayoutEffect="undefined"!=typeof window&&window.document&&window.document.createElement?react.useLayoutEffect:react.useEffect;function getWindow(node){if(null==node)return window;if("[object Window]"!==node.toString()){var ownerDocument=node.ownerDocument;return ownerDocument&&ownerDocument.defaultView||window}return node}function isElement(node){return node instanceof getWindow(node).Element||node instanceof Element}function isHTMLElement(node){return node instanceof getWindow(node).HTMLElement||node instanceof HTMLElement}function isShadowRoot(node){return"undefined"!=typeof ShadowRoot&&(node instanceof getWindow(node).ShadowRoot||node instanceof ShadowRoot)}var math_max=Math.max,math_min=Math.min,round=Math.round;function getBoundingClientRect(element,includeScale){void 0===includeScale&&(includeScale=!1);var rect=element.getBoundingClientRect(),scaleX=1,scaleY=1;if(isHTMLElement(element)&&includeScale){var offsetHeight=element.offsetHeight,offsetWidth=element.offsetWidth;offsetWidth>0&&(scaleX=round(rect.width)/offsetWidth||1),offsetHeight>0&&(scaleY=round(rect.height)/offsetHeight||1)}return{width:rect.width/scaleX,height:rect.height/scaleY,top:rect.top/scaleY,right:rect.right/scaleX,bottom:rect.bottom/scaleY,left:rect.left/scaleX,x:rect.left/scaleX,y:rect.top/scaleY}}function getWindowScroll(node){var win=getWindow(node);return{scrollLeft:win.pageXOffset,scrollTop:win.pageYOffset}}function getNodeName(element){return element?(element.nodeName||"").toLowerCase():null}function getDocumentElement(element){return((isElement(element)?element.ownerDocument:element.document)||window.document).documentElement}function getWindowScrollBarX(element){return getBoundingClientRect(getDocumentElement(element)).left+getWindowScroll(element).scrollLeft}function getComputedStyle(element){return getWindow(element).getComputedStyle(element)}function isScrollParent(element){var _getComputedStyle=getComputedStyle(element),overflow=_getComputedStyle.overflow,overflowX=_getComputedStyle.overflowX,overflowY=_getComputedStyle.overflowY;return/auto|scroll|overlay|hidden/.test(overflow+overflowY+overflowX)}function getCompositeRect(elementOrVirtualElement,offsetParent,isFixed){void 0===isFixed&&(isFixed=!1);var isOffsetParentAnElement=isHTMLElement(offsetParent),offsetParentIsScaled=isHTMLElement(offsetParent)&&function isElementScaled(element){var rect=element.getBoundingClientRect(),scaleX=round(rect.width)/element.offsetWidth||1,scaleY=round(rect.height)/element.offsetHeight||1;return 1!==scaleX||1!==scaleY}(offsetParent),documentElement=getDocumentElement(offsetParent),rect=getBoundingClientRect(elementOrVirtualElement,offsetParentIsScaled),scroll={scrollLeft:0,scrollTop:0},offsets={x:0,y:0};return(isOffsetParentAnElement||!isOffsetParentAnElement&&!isFixed)&&(("body"!==getNodeName(offsetParent)||isScrollParent(documentElement))&&(scroll=function getNodeScroll(node){return node!==getWindow(node)&&isHTMLElement(node)?function getHTMLElementScroll(element){return{scrollLeft:element.scrollLeft,scrollTop:element.scrollTop}}(node):getWindowScroll(node)}(offsetParent)),isHTMLElement(offsetParent)?((offsets=getBoundingClientRect(offsetParent,!0)).x+=offsetParent.clientLeft,offsets.y+=offsetParent.clientTop):documentElement&&(offsets.x=getWindowScrollBarX(documentElement))),{x:rect.left+scroll.scrollLeft-offsets.x,y:rect.top+scroll.scrollTop-offsets.y,width:rect.width,height:rect.height}}function getLayoutRect(element){var clientRect=getBoundingClientRect(element),width=element.offsetWidth,height=element.offsetHeight;return Math.abs(clientRect.width-width)<=1&&(width=clientRect.width),Math.abs(clientRect.height-height)<=1&&(height=clientRect.height),{x:element.offsetLeft,y:element.offsetTop,width:width,height:height}}function getParentNode(element){return"html"===getNodeName(element)?element:element.assignedSlot||element.parentNode||(isShadowRoot(element)?element.host:null)||getDocumentElement(element)}function getScrollParent(node){return["html","body","#document"].indexOf(getNodeName(node))>=0?node.ownerDocument.body:isHTMLElement(node)&&isScrollParent(node)?node:getScrollParent(getParentNode(node))}function listScrollParents(element,list){var _element$ownerDocumen;void 0===list&&(list=[]);var scrollParent=getScrollParent(element),isBody=scrollParent===(null==(_element$ownerDocumen=element.ownerDocument)?void 0:_element$ownerDocumen.body),win=getWindow(scrollParent),target=isBody?[win].concat(win.visualViewport||[],isScrollParent(scrollParent)?scrollParent:[]):scrollParent,updatedList=list.concat(target);return isBody?updatedList:updatedList.concat(listScrollParents(getParentNode(target)))}function isTableElement(element){return["table","td","th"].indexOf(getNodeName(element))>=0}function getTrueOffsetParent(element){return isHTMLElement(element)&&"fixed"!==getComputedStyle(element).position?element.offsetParent:null}function getOffsetParent(element){for(var window=getWindow(element),offsetParent=getTrueOffsetParent(element);offsetParent&&isTableElement(offsetParent)&&"static"===getComputedStyle(offsetParent).position;)offsetParent=getTrueOffsetParent(offsetParent);return offsetParent&&("html"===getNodeName(offsetParent)||"body"===getNodeName(offsetParent)&&"static"===getComputedStyle(offsetParent).position)?window:offsetParent||function getContainingBlock(element){var isFirefox=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&isHTMLElement(element)&&"fixed"===getComputedStyle(element).position)return null;for(var currentNode=getParentNode(element);isHTMLElement(currentNode)&&["html","body"].indexOf(getNodeName(currentNode))<0;){var css=getComputedStyle(currentNode);if("none"!==css.transform||"none"!==css.perspective||"paint"===css.contain||-1!==["transform","perspective"].indexOf(css.willChange)||isFirefox&&"filter"===css.willChange||isFirefox&&css.filter&&"none"!==css.filter)return currentNode;currentNode=currentNode.parentNode}return null}(element)||window}var enums=__webpack_require__(815);function order(modifiers){var map=new Map,visited=new Set,result=[];function sort(modifier){visited.add(modifier.name),[].concat(modifier.requires||[],modifier.requiresIfExists||[]).forEach((function(dep){if(!visited.has(dep)){var depModifier=map.get(dep);depModifier&&sort(depModifier)}})),result.push(modifier)}return modifiers.forEach((function(modifier){map.set(modifier.name,modifier)})),modifiers.forEach((function(modifier){visited.has(modifier.name)||sort(modifier)})),result}var DEFAULT_OPTIONS={placement:"bottom",modifiers:[],strategy:"absolute"};function areValidElements(){for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return!args.some((function(element){return!(element&&"function"==typeof element.getBoundingClientRect)}))}function popperGenerator(generatorOptions){void 0===generatorOptions&&(generatorOptions={});var _generatorOptions=generatorOptions,_generatorOptions$def=_generatorOptions.defaultModifiers,defaultModifiers=void 0===_generatorOptions$def?[]:_generatorOptions$def,_generatorOptions$def2=_generatorOptions.defaultOptions,defaultOptions=void 0===_generatorOptions$def2?DEFAULT_OPTIONS:_generatorOptions$def2;return function createPopper(reference,popper,options){void 0===options&&(options=defaultOptions);var fn,pending,state={placement:"bottom",orderedModifiers:[],options:Object.assign({},DEFAULT_OPTIONS,defaultOptions),modifiersData:{},elements:{reference:reference,popper:popper},attributes:{},styles:{}},effectCleanupFns=[],isDestroyed=!1,instance={state:state,setOptions:function setOptions(setOptionsAction){var options="function"==typeof setOptionsAction?setOptionsAction(state.options):setOptionsAction;cleanupModifierEffects(),state.options=Object.assign({},defaultOptions,state.options,options),state.scrollParents={reference:isElement(reference)?listScrollParents(reference):reference.contextElement?listScrollParents(reference.contextElement):[],popper:listScrollParents(popper)};var orderedModifiers=function orderModifiers(modifiers){var orderedModifiers=order(modifiers);return enums.g.reduce((function(acc,phase){return acc.concat(orderedModifiers.filter((function(modifier){return modifier.phase===phase})))}),[])}(function mergeByName(modifiers){var merged=modifiers.reduce((function(merged,current){var existing=merged[current.name];return merged[current.name]=existing?Object.assign({},existing,current,{options:Object.assign({},existing.options,current.options),data:Object.assign({},existing.data,current.data)}):current,merged}),{});return Object.keys(merged).map((function(key){return merged[key]}))}([].concat(defaultModifiers,state.options.modifiers)));return state.orderedModifiers=orderedModifiers.filter((function(m){return m.enabled})),function runModifierEffects(){state.orderedModifiers.forEach((function(_ref3){var name=_ref3.name,_ref3$options=_ref3.options,options=void 0===_ref3$options?{}:_ref3$options,effect=_ref3.effect;if("function"==typeof effect){var cleanupFn=effect({state:state,name:name,instance:instance,options:options}),noopFn=function noopFn(){};effectCleanupFns.push(cleanupFn||noopFn)}}))}(),instance.update()},forceUpdate:function forceUpdate(){if(!isDestroyed){var _state$elements=state.elements,reference=_state$elements.reference,popper=_state$elements.popper;if(areValidElements(reference,popper)){state.rects={reference:getCompositeRect(reference,getOffsetParent(popper),"fixed"===state.options.strategy),popper:getLayoutRect(popper)},state.reset=!1,state.placement=state.options.placement,state.orderedModifiers.forEach((function(modifier){return state.modifiersData[modifier.name]=Object.assign({},modifier.data)}));for(var index=0;index=0?"x":"y"}function computeOffsets(_ref){var offsets,reference=_ref.reference,element=_ref.element,placement=_ref.placement,basePlacement=placement?getBasePlacement(placement):null,variation=placement?getVariation(placement):null,commonX=reference.x+reference.width/2-element.width/2,commonY=reference.y+reference.height/2-element.height/2;switch(basePlacement){case enums.m:offsets={x:commonX,y:reference.y-element.height};break;case enums.c:offsets={x:commonX,y:reference.y+reference.height};break;case enums.k:offsets={x:reference.x+reference.width,y:commonY};break;case enums.f:offsets={x:reference.x-element.width,y:commonY};break;default:offsets={x:reference.x,y:reference.y}}var mainAxis=basePlacement?getMainAxisFromPlacement(basePlacement):null;if(null!=mainAxis){var len="y"===mainAxis?"height":"width";switch(variation){case enums.l:offsets[mainAxis]=offsets[mainAxis]-(reference[len]/2-element[len]/2);break;case enums.e:offsets[mainAxis]=offsets[mainAxis]+(reference[len]/2-element[len]/2)}}return offsets}var unsetSides={top:"auto",right:"auto",bottom:"auto",left:"auto"};function mapToStyles(_ref2){var _Object$assign2,popper=_ref2.popper,popperRect=_ref2.popperRect,placement=_ref2.placement,variation=_ref2.variation,offsets=_ref2.offsets,position=_ref2.position,gpuAcceleration=_ref2.gpuAcceleration,adaptive=_ref2.adaptive,roundOffsets=_ref2.roundOffsets,isFixed=_ref2.isFixed,_ref3=!0===roundOffsets?function roundOffsetsByDPR(_ref){var x=_ref.x,y=_ref.y,dpr=window.devicePixelRatio||1;return{x:round(x*dpr)/dpr||0,y:round(y*dpr)/dpr||0}}(offsets):"function"==typeof roundOffsets?roundOffsets(offsets):offsets,_ref3$x=_ref3.x,x=void 0===_ref3$x?0:_ref3$x,_ref3$y=_ref3.y,y=void 0===_ref3$y?0:_ref3$y,hasX=offsets.hasOwnProperty("x"),hasY=offsets.hasOwnProperty("y"),sideX=enums.f,sideY=enums.m,win=window;if(adaptive){var offsetParent=getOffsetParent(popper),heightProp="clientHeight",widthProp="clientWidth";if(offsetParent===getWindow(popper)&&"static"!==getComputedStyle(offsetParent=getDocumentElement(popper)).position&&"absolute"===position&&(heightProp="scrollHeight",widthProp="scrollWidth"),offsetParent=offsetParent,placement===enums.m||(placement===enums.f||placement===enums.k)&&variation===enums.e)sideY=enums.c,y-=(isFixed&&win.visualViewport?win.visualViewport.height:offsetParent[heightProp])-popperRect.height,y*=gpuAcceleration?1:-1;if(placement===enums.f||(placement===enums.m||placement===enums.c)&&variation===enums.e)sideX=enums.k,x-=(isFixed&&win.visualViewport?win.visualViewport.width:offsetParent[widthProp])-popperRect.width,x*=gpuAcceleration?1:-1}var _Object$assign,commonStyles=Object.assign({position:position},adaptive&&unsetSides);return gpuAcceleration?Object.assign({},commonStyles,((_Object$assign={})[sideY]=hasY?"0":"",_Object$assign[sideX]=hasX?"0":"",_Object$assign.transform=(win.devicePixelRatio||1)<=1?"translate("+x+"px, "+y+"px)":"translate3d("+x+"px, "+y+"px, 0)",_Object$assign)):Object.assign({},commonStyles,((_Object$assign2={})[sideY]=hasY?y+"px":"",_Object$assign2[sideX]=hasX?x+"px":"",_Object$assign2.transform="",_Object$assign2))}var hash={left:"right",right:"left",bottom:"top",top:"bottom"};function getOppositePlacement(placement){return placement.replace(/left|right|bottom|top/g,(function(matched){return hash[matched]}))}var getOppositeVariationPlacement_hash={start:"end",end:"start"};function getOppositeVariationPlacement(placement){return placement.replace(/start|end/g,(function(matched){return getOppositeVariationPlacement_hash[matched]}))}function contains(parent,child){var rootNode=child.getRootNode&&child.getRootNode();if(parent.contains(child))return!0;if(rootNode&&isShadowRoot(rootNode)){var next=child;do{if(next&&parent.isSameNode(next))return!0;next=next.parentNode||next.host}while(next)}return!1}function rectToClientRect(rect){return Object.assign({},rect,{left:rect.x,top:rect.y,right:rect.x+rect.width,bottom:rect.y+rect.height})}function getClientRectFromMixedType(element,clippingParent){return clippingParent===enums.o?rectToClientRect(function getViewportRect(element){var win=getWindow(element),html=getDocumentElement(element),visualViewport=win.visualViewport,width=html.clientWidth,height=html.clientHeight,x=0,y=0;return visualViewport&&(width=visualViewport.width,height=visualViewport.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(x=visualViewport.offsetLeft,y=visualViewport.offsetTop)),{width:width,height:height,x:x+getWindowScrollBarX(element),y:y}}(element)):isElement(clippingParent)?function getInnerBoundingClientRect(element){var rect=getBoundingClientRect(element);return rect.top=rect.top+element.clientTop,rect.left=rect.left+element.clientLeft,rect.bottom=rect.top+element.clientHeight,rect.right=rect.left+element.clientWidth,rect.width=element.clientWidth,rect.height=element.clientHeight,rect.x=rect.left,rect.y=rect.top,rect}(clippingParent):rectToClientRect(function getDocumentRect(element){var _element$ownerDocumen,html=getDocumentElement(element),winScroll=getWindowScroll(element),body=null==(_element$ownerDocumen=element.ownerDocument)?void 0:_element$ownerDocumen.body,width=math_max(html.scrollWidth,html.clientWidth,body?body.scrollWidth:0,body?body.clientWidth:0),height=math_max(html.scrollHeight,html.clientHeight,body?body.scrollHeight:0,body?body.clientHeight:0),x=-winScroll.scrollLeft+getWindowScrollBarX(element),y=-winScroll.scrollTop;return"rtl"===getComputedStyle(body||html).direction&&(x+=math_max(html.clientWidth,body?body.clientWidth:0)-width),{width:width,height:height,x:x,y:y}}(getDocumentElement(element)))}function getClippingRect(element,boundary,rootBoundary){var mainClippingParents="clippingParents"===boundary?function getClippingParents(element){var clippingParents=listScrollParents(getParentNode(element)),canEscapeClipping=["absolute","fixed"].indexOf(getComputedStyle(element).position)>=0,clipperElement=canEscapeClipping&&isHTMLElement(element)?getOffsetParent(element):element;return isElement(clipperElement)?clippingParents.filter((function(clippingParent){return isElement(clippingParent)&&contains(clippingParent,clipperElement)&&"body"!==getNodeName(clippingParent)&&(!canEscapeClipping||"static"!==getComputedStyle(clippingParent).position)})):[]}(element):[].concat(boundary),clippingParents=[].concat(mainClippingParents,[rootBoundary]),firstClippingParent=clippingParents[0],clippingRect=clippingParents.reduce((function(accRect,clippingParent){var rect=getClientRectFromMixedType(element,clippingParent);return accRect.top=math_max(rect.top,accRect.top),accRect.right=math_min(rect.right,accRect.right),accRect.bottom=math_min(rect.bottom,accRect.bottom),accRect.left=math_max(rect.left,accRect.left),accRect}),getClientRectFromMixedType(element,firstClippingParent));return clippingRect.width=clippingRect.right-clippingRect.left,clippingRect.height=clippingRect.bottom-clippingRect.top,clippingRect.x=clippingRect.left,clippingRect.y=clippingRect.top,clippingRect}function mergePaddingObject(paddingObject){return Object.assign({},{top:0,right:0,bottom:0,left:0},paddingObject)}function expandToHashMap(value,keys){return keys.reduce((function(hashMap,key){return hashMap[key]=value,hashMap}),{})}function detectOverflow(state,options){void 0===options&&(options={});var _options=options,_options$placement=_options.placement,placement=void 0===_options$placement?state.placement:_options$placement,_options$boundary=_options.boundary,boundary=void 0===_options$boundary?enums.d:_options$boundary,_options$rootBoundary=_options.rootBoundary,rootBoundary=void 0===_options$rootBoundary?enums.o:_options$rootBoundary,_options$elementConte=_options.elementContext,elementContext=void 0===_options$elementConte?enums.i:_options$elementConte,_options$altBoundary=_options.altBoundary,altBoundary=void 0!==_options$altBoundary&&_options$altBoundary,_options$padding=_options.padding,padding=void 0===_options$padding?0:_options$padding,paddingObject=mergePaddingObject("number"!=typeof padding?padding:expandToHashMap(padding,enums.b)),altContext=elementContext===enums.i?enums.j:enums.i,popperRect=state.rects.popper,element=state.elements[altBoundary?altContext:elementContext],clippingClientRect=getClippingRect(isElement(element)?element:element.contextElement||getDocumentElement(state.elements.popper),boundary,rootBoundary),referenceClientRect=getBoundingClientRect(state.elements.reference),popperOffsets=computeOffsets({reference:referenceClientRect,element:popperRect,strategy:"absolute",placement:placement}),popperClientRect=rectToClientRect(Object.assign({},popperRect,popperOffsets)),elementClientRect=elementContext===enums.i?popperClientRect:referenceClientRect,overflowOffsets={top:clippingClientRect.top-elementClientRect.top+paddingObject.top,bottom:elementClientRect.bottom-clippingClientRect.bottom+paddingObject.bottom,left:clippingClientRect.left-elementClientRect.left+paddingObject.left,right:elementClientRect.right-clippingClientRect.right+paddingObject.right},offsetData=state.modifiersData.offset;if(elementContext===enums.i&&offsetData){var offset=offsetData[placement];Object.keys(overflowOffsets).forEach((function(key){var multiply=[enums.k,enums.c].indexOf(key)>=0?1:-1,axis=[enums.m,enums.c].indexOf(key)>=0?"y":"x";overflowOffsets[key]+=offset[axis]*multiply}))}return overflowOffsets}function within(min,value,max){return math_max(min,math_min(value,max))}function getSideOffsets(overflow,rect,preventedOffsets){return void 0===preventedOffsets&&(preventedOffsets={x:0,y:0}),{top:overflow.top-rect.height-preventedOffsets.y,right:overflow.right-rect.width+preventedOffsets.x,bottom:overflow.bottom-rect.height+preventedOffsets.y,left:overflow.left-rect.width-preventedOffsets.x}}function isAnySideFullyClipped(overflow){return[enums.m,enums.k,enums.c,enums.f].some((function(side){return overflow[side]>=0}))}var popper_createPopper=popperGenerator({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function fn(){},effect:function effect(_ref){var state=_ref.state,instance=_ref.instance,options=_ref.options,_options$scroll=options.scroll,scroll=void 0===_options$scroll||_options$scroll,_options$resize=options.resize,resize=void 0===_options$resize||_options$resize,window=getWindow(state.elements.popper),scrollParents=[].concat(state.scrollParents.reference,state.scrollParents.popper);return scroll&&scrollParents.forEach((function(scrollParent){scrollParent.addEventListener("scroll",instance.update,passive)})),resize&&window.addEventListener("resize",instance.update,passive),function(){scroll&&scrollParents.forEach((function(scrollParent){scrollParent.removeEventListener("scroll",instance.update,passive)})),resize&&window.removeEventListener("resize",instance.update,passive)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function popperOffsets_popperOffsets(_ref){var state=_ref.state,name=_ref.name;state.modifiersData[name]=computeOffsets({reference:state.rects.reference,element:state.rects.popper,strategy:"absolute",placement:state.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function computeStyles(_ref4){var state=_ref4.state,options=_ref4.options,_options$gpuAccelerat=options.gpuAcceleration,gpuAcceleration=void 0===_options$gpuAccelerat||_options$gpuAccelerat,_options$adaptive=options.adaptive,adaptive=void 0===_options$adaptive||_options$adaptive,_options$roundOffsets=options.roundOffsets,roundOffsets=void 0===_options$roundOffsets||_options$roundOffsets,commonStyles={placement:getBasePlacement(state.placement),variation:getVariation(state.placement),popper:state.elements.popper,popperRect:state.rects.popper,gpuAcceleration:gpuAcceleration,isFixed:"fixed"===state.options.strategy};null!=state.modifiersData.popperOffsets&&(state.styles.popper=Object.assign({},state.styles.popper,mapToStyles(Object.assign({},commonStyles,{offsets:state.modifiersData.popperOffsets,position:state.options.strategy,adaptive:adaptive,roundOffsets:roundOffsets})))),null!=state.modifiersData.arrow&&(state.styles.arrow=Object.assign({},state.styles.arrow,mapToStyles(Object.assign({},commonStyles,{offsets:state.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:roundOffsets})))),state.attributes.popper=Object.assign({},state.attributes.popper,{"data-popper-placement":state.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function applyStyles(_ref){var state=_ref.state;Object.keys(state.elements).forEach((function(name){var style=state.styles[name]||{},attributes=state.attributes[name]||{},element=state.elements[name];isHTMLElement(element)&&getNodeName(element)&&(Object.assign(element.style,style),Object.keys(attributes).forEach((function(name){var value=attributes[name];!1===value?element.removeAttribute(name):element.setAttribute(name,!0===value?"":value)})))}))},effect:function applyStyles_effect(_ref2){var state=_ref2.state,initialStyles={popper:{position:state.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(state.elements.popper.style,initialStyles.popper),state.styles=initialStyles,state.elements.arrow&&Object.assign(state.elements.arrow.style,initialStyles.arrow),function(){Object.keys(state.elements).forEach((function(name){var element=state.elements[name],attributes=state.attributes[name]||{},style=Object.keys(state.styles.hasOwnProperty(name)?state.styles[name]:initialStyles[name]).reduce((function(style,property){return style[property]="",style}),{});isHTMLElement(element)&&getNodeName(element)&&(Object.assign(element.style,style),Object.keys(attributes).forEach((function(attribute){element.removeAttribute(attribute)})))}))}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function offset_offset(_ref2){var state=_ref2.state,options=_ref2.options,name=_ref2.name,_options$offset=options.offset,offset=void 0===_options$offset?[0,0]:_options$offset,data=enums.h.reduce((function(acc,placement){return acc[placement]=function distanceAndSkiddingToXY(placement,rects,offset){var basePlacement=getBasePlacement(placement),invertDistance=[enums.f,enums.m].indexOf(basePlacement)>=0?-1:1,_ref="function"==typeof offset?offset(Object.assign({},rects,{placement:placement})):offset,skidding=_ref[0],distance=_ref[1];return skidding=skidding||0,distance=(distance||0)*invertDistance,[enums.f,enums.k].indexOf(basePlacement)>=0?{x:distance,y:skidding}:{x:skidding,y:distance}}(placement,state.rects,offset),acc}),{}),_data$state$placement=data[state.placement],x=_data$state$placement.x,y=_data$state$placement.y;null!=state.modifiersData.popperOffsets&&(state.modifiersData.popperOffsets.x+=x,state.modifiersData.popperOffsets.y+=y),state.modifiersData[name]=data}},{name:"flip",enabled:!0,phase:"main",fn:function flip(_ref){var state=_ref.state,options=_ref.options,name=_ref.name;if(!state.modifiersData[name]._skip){for(var _options$mainAxis=options.mainAxis,checkMainAxis=void 0===_options$mainAxis||_options$mainAxis,_options$altAxis=options.altAxis,checkAltAxis=void 0===_options$altAxis||_options$altAxis,specifiedFallbackPlacements=options.fallbackPlacements,padding=options.padding,boundary=options.boundary,rootBoundary=options.rootBoundary,altBoundary=options.altBoundary,_options$flipVariatio=options.flipVariations,flipVariations=void 0===_options$flipVariatio||_options$flipVariatio,allowedAutoPlacements=options.allowedAutoPlacements,preferredPlacement=state.options.placement,basePlacement=getBasePlacement(preferredPlacement),fallbackPlacements=specifiedFallbackPlacements||(basePlacement===preferredPlacement||!flipVariations?[getOppositePlacement(preferredPlacement)]:function getExpandedFallbackPlacements(placement){if(getBasePlacement(placement)===enums.a)return[];var oppositePlacement=getOppositePlacement(placement);return[getOppositeVariationPlacement(placement),oppositePlacement,getOppositeVariationPlacement(oppositePlacement)]}(preferredPlacement)),placements=[preferredPlacement].concat(fallbackPlacements).reduce((function(acc,placement){return acc.concat(getBasePlacement(placement)===enums.a?function computeAutoPlacement(state,options){void 0===options&&(options={});var _options=options,placement=_options.placement,boundary=_options.boundary,rootBoundary=_options.rootBoundary,padding=_options.padding,flipVariations=_options.flipVariations,_options$allowedAutoP=_options.allowedAutoPlacements,allowedAutoPlacements=void 0===_options$allowedAutoP?enums.h:_options$allowedAutoP,variation=getVariation(placement),placements=variation?flipVariations?enums.n:enums.n.filter((function(placement){return getVariation(placement)===variation})):enums.b,allowedPlacements=placements.filter((function(placement){return allowedAutoPlacements.indexOf(placement)>=0}));0===allowedPlacements.length&&(allowedPlacements=placements);var overflows=allowedPlacements.reduce((function(acc,placement){return acc[placement]=detectOverflow(state,{placement:placement,boundary:boundary,rootBoundary:rootBoundary,padding:padding})[getBasePlacement(placement)],acc}),{});return Object.keys(overflows).sort((function(a,b){return overflows[a]-overflows[b]}))}(state,{placement:placement,boundary:boundary,rootBoundary:rootBoundary,padding:padding,flipVariations:flipVariations,allowedAutoPlacements:allowedAutoPlacements}):placement)}),[]),referenceRect=state.rects.reference,popperRect=state.rects.popper,checksMap=new Map,makeFallbackChecks=!0,firstFittingPlacement=placements[0],i=0;i=0,len=isVertical?"width":"height",overflow=detectOverflow(state,{placement:placement,boundary:boundary,rootBoundary:rootBoundary,altBoundary:altBoundary,padding:padding}),mainVariationSide=isVertical?isStartVariation?enums.k:enums.f:isStartVariation?enums.c:enums.m;referenceRect[len]>popperRect[len]&&(mainVariationSide=getOppositePlacement(mainVariationSide));var altVariationSide=getOppositePlacement(mainVariationSide),checks=[];if(checkMainAxis&&checks.push(overflow[_basePlacement]<=0),checkAltAxis&&checks.push(overflow[mainVariationSide]<=0,overflow[altVariationSide]<=0),checks.every((function(check){return check}))){firstFittingPlacement=placement,makeFallbackChecks=!1;break}checksMap.set(placement,checks)}if(makeFallbackChecks)for(var _loop=function _loop(_i){var fittingPlacement=placements.find((function(placement){var checks=checksMap.get(placement);if(checks)return checks.slice(0,_i).every((function(check){return check}))}));if(fittingPlacement)return firstFittingPlacement=fittingPlacement,"break"},_i=flipVariations?3:1;_i>0;_i--){if("break"===_loop(_i))break}state.placement!==firstFittingPlacement&&(state.modifiersData[name]._skip=!0,state.placement=firstFittingPlacement,state.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function preventOverflow(_ref){var state=_ref.state,options=_ref.options,name=_ref.name,_options$mainAxis=options.mainAxis,checkMainAxis=void 0===_options$mainAxis||_options$mainAxis,_options$altAxis=options.altAxis,checkAltAxis=void 0!==_options$altAxis&&_options$altAxis,boundary=options.boundary,rootBoundary=options.rootBoundary,altBoundary=options.altBoundary,padding=options.padding,_options$tether=options.tether,tether=void 0===_options$tether||_options$tether,_options$tetherOffset=options.tetherOffset,tetherOffset=void 0===_options$tetherOffset?0:_options$tetherOffset,overflow=detectOverflow(state,{boundary:boundary,rootBoundary:rootBoundary,padding:padding,altBoundary:altBoundary}),basePlacement=getBasePlacement(state.placement),variation=getVariation(state.placement),isBasePlacement=!variation,mainAxis=getMainAxisFromPlacement(basePlacement),altAxis=function getAltAxis(axis){return"x"===axis?"y":"x"}(mainAxis),popperOffsets=state.modifiersData.popperOffsets,referenceRect=state.rects.reference,popperRect=state.rects.popper,tetherOffsetValue="function"==typeof tetherOffset?tetherOffset(Object.assign({},state.rects,{placement:state.placement})):tetherOffset,normalizedTetherOffsetValue="number"==typeof tetherOffsetValue?{mainAxis:tetherOffsetValue,altAxis:tetherOffsetValue}:Object.assign({mainAxis:0,altAxis:0},tetherOffsetValue),offsetModifierState=state.modifiersData.offset?state.modifiersData.offset[state.placement]:null,data={x:0,y:0};if(popperOffsets){if(checkMainAxis){var _offsetModifierState$,mainSide="y"===mainAxis?enums.m:enums.f,altSide="y"===mainAxis?enums.c:enums.k,len="y"===mainAxis?"height":"width",offset=popperOffsets[mainAxis],min=offset+overflow[mainSide],max=offset-overflow[altSide],additive=tether?-popperRect[len]/2:0,minLen=variation===enums.l?referenceRect[len]:popperRect[len],maxLen=variation===enums.l?-popperRect[len]:-referenceRect[len],arrowElement=state.elements.arrow,arrowRect=tether&&arrowElement?getLayoutRect(arrowElement):{width:0,height:0},arrowPaddingObject=state.modifiersData["arrow#persistent"]?state.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},arrowPaddingMin=arrowPaddingObject[mainSide],arrowPaddingMax=arrowPaddingObject[altSide],arrowLen=within(0,referenceRect[len],arrowRect[len]),minOffset=isBasePlacement?referenceRect[len]/2-additive-arrowLen-arrowPaddingMin-normalizedTetherOffsetValue.mainAxis:minLen-arrowLen-arrowPaddingMin-normalizedTetherOffsetValue.mainAxis,maxOffset=isBasePlacement?-referenceRect[len]/2+additive+arrowLen+arrowPaddingMax+normalizedTetherOffsetValue.mainAxis:maxLen+arrowLen+arrowPaddingMax+normalizedTetherOffsetValue.mainAxis,arrowOffsetParent=state.elements.arrow&&getOffsetParent(state.elements.arrow),clientOffset=arrowOffsetParent?"y"===mainAxis?arrowOffsetParent.clientTop||0:arrowOffsetParent.clientLeft||0:0,offsetModifierValue=null!=(_offsetModifierState$=null==offsetModifierState?void 0:offsetModifierState[mainAxis])?_offsetModifierState$:0,tetherMax=offset+maxOffset-offsetModifierValue,preventedOffset=within(tether?math_min(min,offset+minOffset-offsetModifierValue-clientOffset):min,offset,tether?math_max(max,tetherMax):max);popperOffsets[mainAxis]=preventedOffset,data[mainAxis]=preventedOffset-offset}if(checkAltAxis){var _offsetModifierState$2,_mainSide="x"===mainAxis?enums.m:enums.f,_altSide="x"===mainAxis?enums.c:enums.k,_offset=popperOffsets[altAxis],_len="y"===altAxis?"height":"width",_min=_offset+overflow[_mainSide],_max=_offset-overflow[_altSide],isOriginSide=-1!==[enums.m,enums.f].indexOf(basePlacement),_offsetModifierValue=null!=(_offsetModifierState$2=null==offsetModifierState?void 0:offsetModifierState[altAxis])?_offsetModifierState$2:0,_tetherMin=isOriginSide?_min:_offset-referenceRect[_len]-popperRect[_len]-_offsetModifierValue+normalizedTetherOffsetValue.altAxis,_tetherMax=isOriginSide?_offset+referenceRect[_len]+popperRect[_len]-_offsetModifierValue-normalizedTetherOffsetValue.altAxis:_max,_preventedOffset=tether&&isOriginSide?function withinMaxClamp(min,value,max){var v=within(min,value,max);return v>max?max:v}(_tetherMin,_offset,_tetherMax):within(tether?_tetherMin:_min,_offset,tether?_tetherMax:_max);popperOffsets[altAxis]=_preventedOffset,data[altAxis]=_preventedOffset-_offset}state.modifiersData[name]=data}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function arrow(_ref){var _state$modifiersData$,state=_ref.state,name=_ref.name,options=_ref.options,arrowElement=state.elements.arrow,popperOffsets=state.modifiersData.popperOffsets,basePlacement=getBasePlacement(state.placement),axis=getMainAxisFromPlacement(basePlacement),len=[enums.f,enums.k].indexOf(basePlacement)>=0?"height":"width";if(arrowElement&&popperOffsets){var paddingObject=function toPaddingObject(padding,state){return mergePaddingObject("number"!=typeof(padding="function"==typeof padding?padding(Object.assign({},state.rects,{placement:state.placement})):padding)?padding:expandToHashMap(padding,enums.b))}(options.padding,state),arrowRect=getLayoutRect(arrowElement),minProp="y"===axis?enums.m:enums.f,maxProp="y"===axis?enums.c:enums.k,endDiff=state.rects.reference[len]+state.rects.reference[axis]-popperOffsets[axis]-state.rects.popper[len],startDiff=popperOffsets[axis]-state.rects.reference[axis],arrowOffsetParent=getOffsetParent(arrowElement),clientSize=arrowOffsetParent?"y"===axis?arrowOffsetParent.clientHeight||0:arrowOffsetParent.clientWidth||0:0,centerToReference=endDiff/2-startDiff/2,min=paddingObject[minProp],max=clientSize-arrowRect[len]-paddingObject[maxProp],center=clientSize/2-arrowRect[len]/2+centerToReference,offset=within(min,center,max),axisProp=axis;state.modifiersData[name]=((_state$modifiersData$={})[axisProp]=offset,_state$modifiersData$.centerOffset=offset-center,_state$modifiersData$)}},effect:function arrow_effect(_ref2){var state=_ref2.state,_options$element=_ref2.options.element,arrowElement=void 0===_options$element?"[data-popper-arrow]":_options$element;null!=arrowElement&&("string"!=typeof arrowElement||(arrowElement=state.elements.popper.querySelector(arrowElement)))&&contains(state.elements.popper,arrowElement)&&(state.elements.arrow=arrowElement)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function hide(_ref){var state=_ref.state,name=_ref.name,referenceRect=state.rects.reference,popperRect=state.rects.popper,preventedOffsets=state.modifiersData.preventOverflow,referenceOverflow=detectOverflow(state,{elementContext:"reference"}),popperAltOverflow=detectOverflow(state,{altBoundary:!0}),referenceClippingOffsets=getSideOffsets(referenceOverflow,referenceRect),popperEscapeOffsets=getSideOffsets(popperAltOverflow,popperRect,preventedOffsets),isReferenceHidden=isAnySideFullyClipped(referenceClippingOffsets),hasPopperEscaped=isAnySideFullyClipped(popperEscapeOffsets);state.modifiersData[name]={referenceClippingOffsets:referenceClippingOffsets,popperEscapeOffsets:popperEscapeOffsets,isReferenceHidden:isReferenceHidden,hasPopperEscaped:hasPopperEscaped},state.attributes.popper=Object.assign({},state.attributes.popper,{"data-popper-reference-hidden":isReferenceHidden,"data-popper-escaped":hasPopperEscaped})}}]}),react_fast_compare=__webpack_require__(746),react_fast_compare_default=__webpack_require__.n(react_fast_compare),EMPTY_MODIFIERS=[],NOOP=function NOOP(){},NOOP_PROMISE=function NOOP_PROMISE(){return Promise.resolve(null)},Popper_EMPTY_MODIFIERS=[];function Popper(_ref){var _ref$placement=_ref.placement,placement=void 0===_ref$placement?"bottom":_ref$placement,_ref$strategy=_ref.strategy,strategy=void 0===_ref$strategy?"absolute":_ref$strategy,_ref$modifiers=_ref.modifiers,modifiers=void 0===_ref$modifiers?Popper_EMPTY_MODIFIERS:_ref$modifiers,referenceElement=_ref.referenceElement,onFirstUpdate=_ref.onFirstUpdate,innerRef=_ref.innerRef,children=_ref.children,referenceNode=react.useContext(ManagerReferenceNodeContext),_React$useState=react.useState(null),popperElement=_React$useState[0],setPopperElement=_React$useState[1],_React$useState2=react.useState(null),arrowElement=_React$useState2[0],setArrowElement=_React$useState2[1];react.useEffect((function(){setRef(innerRef,popperElement)}),[innerRef,popperElement]);var options=react.useMemo((function(){return{placement:placement,strategy:strategy,onFirstUpdate:onFirstUpdate,modifiers:[].concat(modifiers,[{name:"arrow",enabled:null!=arrowElement,options:{element:arrowElement}}])}}),[placement,strategy,onFirstUpdate,modifiers,arrowElement]),_usePopper=function usePopper(referenceElement,popperElement,options){void 0===options&&(options={});var prevOptions=react.useRef(null),optionsWithDefaults={onFirstUpdate:options.onFirstUpdate,placement:options.placement||"bottom",strategy:options.strategy||"absolute",modifiers:options.modifiers||EMPTY_MODIFIERS},_React$useState=react.useState({styles:{popper:{position:optionsWithDefaults.strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),state=_React$useState[0],setState=_React$useState[1],updateStateModifier=react.useMemo((function(){return{name:"updateState",enabled:!0,phase:"write",fn:function fn(_ref){var state=_ref.state,elements=Object.keys(state.elements);setState({styles:fromEntries(elements.map((function(element){return[element,state.styles[element]||{}]}))),attributes:fromEntries(elements.map((function(element){return[element,state.attributes[element]]})))})},requires:["computeStyles"]}}),[]),popperOptions=react.useMemo((function(){var newOptions={onFirstUpdate:optionsWithDefaults.onFirstUpdate,placement:optionsWithDefaults.placement,strategy:optionsWithDefaults.strategy,modifiers:[].concat(optionsWithDefaults.modifiers,[updateStateModifier,{name:"applyStyles",enabled:!1}])};return react_fast_compare_default()(prevOptions.current,newOptions)?prevOptions.current||newOptions:(prevOptions.current=newOptions,newOptions)}),[optionsWithDefaults.onFirstUpdate,optionsWithDefaults.placement,optionsWithDefaults.strategy,optionsWithDefaults.modifiers,updateStateModifier]),popperInstanceRef=react.useRef();return useIsomorphicLayoutEffect((function(){popperInstanceRef.current&&popperInstanceRef.current.setOptions(popperOptions)}),[popperOptions]),useIsomorphicLayoutEffect((function(){if(null!=referenceElement&&null!=popperElement){var popperInstance=(options.createPopper||popper_createPopper)(referenceElement,popperElement,popperOptions);return popperInstanceRef.current=popperInstance,function(){popperInstance.destroy(),popperInstanceRef.current=null}}}),[referenceElement,popperElement,options.createPopper]),{state:popperInstanceRef.current?popperInstanceRef.current.state:null,styles:state.styles,attributes:state.attributes,update:popperInstanceRef.current?popperInstanceRef.current.update:null,forceUpdate:popperInstanceRef.current?popperInstanceRef.current.forceUpdate:null}}(referenceElement||referenceNode,popperElement,options),state=_usePopper.state,styles=_usePopper.styles,forceUpdate=_usePopper.forceUpdate,update=_usePopper.update,childrenProps=react.useMemo((function(){return{ref:setPopperElement,style:styles.popper,placement:state?state.placement:placement,hasPopperEscaped:state&&state.modifiersData.hide?state.modifiersData.hide.hasPopperEscaped:null,isReferenceHidden:state&&state.modifiersData.hide?state.modifiersData.hide.isReferenceHidden:null,arrowProps:{style:styles.arrow,ref:setArrowElement},forceUpdate:forceUpdate||NOOP,update:update||NOOP_PROMISE}}),[setPopperElement,setArrowElement,placement,state,styles,update,forceUpdate]);return unwrapArray(children)(childrenProps)}var warning=__webpack_require__(1611),warning_default=__webpack_require__.n(warning);function Reference(_ref){var children=_ref.children,innerRef=_ref.innerRef,setReferenceNode=react.useContext(ManagerReferenceNodeSetterContext),refHandler=react.useCallback((function(node){setRef(innerRef,node),safeInvoke(setReferenceNode,node)}),[innerRef,setReferenceNode]);return react.useEffect((function(){return function(){return setRef(innerRef,null)}})),react.useEffect((function(){warning_default()(Boolean(setReferenceNode),"`Reference` should not be used outside of a `Manager` component.")}),[setReferenceNode]),unwrapArray(children)({ref:refHandler})}var TooltipContext=react_default.a.createContext({}),callAll=function callAll(){for(var _len=arguments.length,fns=new Array(_len),_key=0;_key<_len;_key++)fns[_key]=arguments[_key];return function(){for(var _len2=arguments.length,args=new Array(_len2),_key2=0;_key2<_len2;_key2++)args[_key2]=arguments[_key2];return fns.forEach((function(fn){return fn&&fn.apply(void 0,args)}))}},canUseDOM=function canUseDOM(){return!("undefined"==typeof window||!window.document||!window.document.createElement)},react_popper_tooltip_setRef=function setRef(ref,node){if("function"==typeof ref)return ref(node);null!=ref&&(ref.current=node)},react_popper_tooltip_Tooltip=function(_Component){function Tooltip(){for(var _this,_len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return(_this=_Component.call.apply(_Component,[this].concat(args))||this).observer=void 0,_this.tooltipRef=void 0,_this.handleOutsideClick=function(event){if(_this.tooltipRef&&!_this.tooltipRef.contains(event.target)){var parentOutsideClickHandler=_this.context.parentOutsideClickHandler,_this$props=_this.props,hideTooltip=_this$props.hideTooltip;(0,_this$props.clearScheduled)(),hideTooltip(),parentOutsideClickHandler&&parentOutsideClickHandler(event)}},_this.handleOutsideRightClick=function(event){if(_this.tooltipRef&&!_this.tooltipRef.contains(event.target)){var parentOutsideRightClickHandler=_this.context.parentOutsideRightClickHandler,_this$props2=_this.props,hideTooltip=_this$props2.hideTooltip;(0,_this$props2.clearScheduled)(),hideTooltip(),parentOutsideRightClickHandler&&parentOutsideRightClickHandler(event)}},_this.addOutsideClickHandler=function(){document.body.addEventListener("touchend",_this.handleOutsideClick),document.body.addEventListener("click",_this.handleOutsideClick)},_this.removeOutsideClickHandler=function(){document.body.removeEventListener("touchend",_this.handleOutsideClick),document.body.removeEventListener("click",_this.handleOutsideClick)},_this.addOutsideRightClickHandler=function(){return document.body.addEventListener("contextmenu",_this.handleOutsideRightClick)},_this.removeOutsideRightClickHandler=function(){return document.body.removeEventListener("contextmenu",_this.handleOutsideRightClick)},_this.getTooltipRef=function(node){_this.tooltipRef=node,react_popper_tooltip_setRef(_this.props.innerRef,node)},_this.getArrowProps=function(props){return void 0===props&&(props={}),Object(esm_extends.a)({},props,{style:Object(esm_extends.a)({},props.style,_this.props.arrowProps.style)})},_this.getTooltipProps=function(props){return void 0===props&&(props={}),Object(esm_extends.a)({},props,_this.isTriggeredBy("hover")&&{onMouseEnter:callAll(_this.props.clearScheduled,props.onMouseEnter),onMouseLeave:callAll(_this.props.hideTooltip,props.onMouseLeave)},{style:Object(esm_extends.a)({},props.style,_this.props.style)})},_this.contextValue={isParentNoneTriggered:"none"===_this.props.trigger,addParentOutsideClickHandler:_this.addOutsideClickHandler,addParentOutsideRightClickHandler:_this.addOutsideRightClickHandler,parentOutsideClickHandler:_this.handleOutsideClick,parentOutsideRightClickHandler:_this.handleOutsideRightClick,removeParentOutsideClickHandler:_this.removeOutsideClickHandler,removeParentOutsideRightClickHandler:_this.removeOutsideRightClickHandler},_this}Object(inheritsLoose.a)(Tooltip,_Component);var _proto=Tooltip.prototype;return _proto.componentDidMount=function componentDidMount(){var _this2=this;if((this.observer=new MutationObserver((function(){_this2.props.update()}))).observe(this.tooltipRef,this.props.mutationObserverOptions),this.isTriggeredBy("hover")||this.isTriggeredBy("click")||this.isTriggeredBy("right-click")){var _this$context=this.context,removeParentOutsideClickHandler=_this$context.removeParentOutsideClickHandler,removeParentOutsideRightClickHandler=_this$context.removeParentOutsideRightClickHandler;this.addOutsideClickHandler(),this.addOutsideRightClickHandler(),removeParentOutsideClickHandler&&removeParentOutsideClickHandler(),removeParentOutsideRightClickHandler&&removeParentOutsideRightClickHandler()}},_proto.componentDidUpdate=function componentDidUpdate(){this.props.closeOnReferenceHidden&&this.props.isReferenceHidden&&this.props.hideTooltip()},_proto.componentWillUnmount=function componentWillUnmount(){if(this.observer&&this.observer.disconnect(),this.isTriggeredBy("hover")||this.isTriggeredBy("click")||this.isTriggeredBy("right-click")){var _this$context2=this.context,isParentNoneTriggered=_this$context2.isParentNoneTriggered,addParentOutsideClickHandler=_this$context2.addParentOutsideClickHandler,addParentOutsideRightClickHandler=_this$context2.addParentOutsideRightClickHandler;this.removeOutsideClickHandler(),this.removeOutsideRightClickHandler(),this.handleOutsideClick=void 0,this.handleOutsideRightClick=void 0,!isParentNoneTriggered&&addParentOutsideClickHandler&&addParentOutsideClickHandler(),!isParentNoneTriggered&&addParentOutsideRightClickHandler&&addParentOutsideRightClickHandler()}},_proto.render=function render(){var _this$props3=this.props,arrowProps=_this$props3.arrowProps,placement=_this$props3.placement,tooltip=_this$props3.tooltip;return react_default.a.createElement(TooltipContext.Provider,{value:this.contextValue},tooltip({arrowRef:arrowProps.ref,getArrowProps:this.getArrowProps,getTooltipProps:this.getTooltipProps,placement:placement,tooltipRef:this.getTooltipRef}))},_proto.isTriggeredBy=function isTriggeredBy(event){var trigger=this.props.trigger;return trigger===event||Array.isArray(trigger)&&trigger.includes(event)},Tooltip}(react.Component);react_popper_tooltip_Tooltip.contextType=TooltipContext;var react_popper_tooltip_TooltipTrigger=function(_Component){function TooltipTrigger(){for(var _this,_len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return(_this=_Component.call.apply(_Component,[this].concat(args))||this).state={tooltipShown:_this.props.defaultTooltipShown},_this.hideTimeout=void 0,_this.showTimeout=void 0,_this.popperOffset=void 0,_this.setTooltipState=function(state){var cb=function cb(){return _this.props.onVisibilityChange(state.tooltipShown)};_this.isControlled()?cb():_this.setState(state,cb)},_this.clearScheduled=function(){clearTimeout(_this.hideTimeout),clearTimeout(_this.showTimeout)},_this.showTooltip=function(_ref){var pageX=_ref.pageX,pageY=_ref.pageY;_this.clearScheduled();var state={tooltipShown:!0};_this.props.followCursor&&(state=Object(esm_extends.a)({},state,{pageX:pageX,pageY:pageY})),_this.showTimeout=window.setTimeout((function(){return _this.setTooltipState(state)}),_this.props.delayShow)},_this.hideTooltip=function(){_this.clearScheduled(),_this.hideTimeout=window.setTimeout((function(){return _this.setTooltipState({tooltipShown:!1})}),_this.props.delayHide)},_this.toggleTooltip=function(_ref2){var pageX=_ref2.pageX,pageY=_ref2.pageY,action=_this.getState()?"hideTooltip":"showTooltip";_this[action]({pageX:pageX,pageY:pageY})},_this.clickToggle=function(event){event.preventDefault();var pageX=event.pageX,pageY=event.pageY,action=_this.props.followCursor?"showTooltip":"toggleTooltip";_this[action]({pageX:pageX,pageY:pageY})},_this.contextMenuToggle=function(event){event.preventDefault();var pageX=event.pageX,pageY=event.pageY,action=_this.props.followCursor?"showTooltip":"toggleTooltip";_this[action]({pageX:pageX,pageY:pageY})},_this.getTriggerProps=function(props){return void 0===props&&(props={}),Object(esm_extends.a)({},props,_this.isTriggeredBy("click")&&{onClick:callAll(_this.clickToggle,props.onClick),onTouchEnd:callAll(_this.clickToggle,props.onTouchEnd)},_this.isTriggeredBy("right-click")&&{onContextMenu:callAll(_this.contextMenuToggle,props.onContextMenu)},_this.isTriggeredBy("hover")&&Object(esm_extends.a)({onMouseEnter:callAll(_this.showTooltip,props.onMouseEnter),onMouseLeave:callAll(_this.hideTooltip,props.onMouseLeave)},_this.props.followCursor&&{onMouseMove:callAll(_this.showTooltip,props.onMouseMove)}),_this.isTriggeredBy("focus")&&{onFocus:callAll(_this.showTooltip,props.onFocus),onBlur:callAll(_this.hideTooltip,props.onBlur)})},_this}Object(inheritsLoose.a)(TooltipTrigger,_Component);var _proto=TooltipTrigger.prototype;return _proto.componentWillUnmount=function componentWillUnmount(){this.clearScheduled()},_proto.render=function render(){var _this2=this,_this$props=this.props,children=_this$props.children,tooltip=_this$props.tooltip,placement=_this$props.placement,trigger=_this$props.trigger,getTriggerRef=_this$props.getTriggerRef,modifiers=_this$props.modifiers,closeOnReferenceHidden=_this$props.closeOnReferenceHidden,usePortal=_this$props.usePortal,portalContainer=_this$props.portalContainer,followCursor=_this$props.followCursor,getTooltipRef=_this$props.getTooltipRef,mutationObserverOptions=_this$props.mutationObserverOptions,restProps=Object(objectWithoutPropertiesLoose.a)(_this$props,["children","tooltip","placement","trigger","getTriggerRef","modifiers","closeOnReferenceHidden","usePortal","portalContainer","followCursor","getTooltipRef","mutationObserverOptions"]),popper=react_default.a.createElement(Popper,Object(esm_extends.a)({innerRef:getTooltipRef,placement:placement,modifiers:[{name:"followCursor",enabled:followCursor,phase:"main",fn:function fn(data){_this2.popperOffset=data.state.rects.popper}}].concat(modifiers)},restProps),(function(_ref3){var ref=_ref3.ref,style=_ref3.style,placement=_ref3.placement,arrowProps=_ref3.arrowProps,isReferenceHidden=_ref3.isReferenceHidden,update=_ref3.update;if(followCursor&&_this2.popperOffset){var _this2$state=_this2.state,pageX=_this2$state.pageX,pageY=_this2$state.pageY,_this2$popperOffset=_this2.popperOffset,width=_this2$popperOffset.width,height=_this2$popperOffset.height,x=pageX+width>window.pageXOffset+document.body.offsetWidth?pageX-width:pageX,y=pageY+height>window.pageYOffset+document.body.offsetHeight?pageY-height:pageY;style.transform="translate3d("+x+"px, "+y+"px, 0"}return react_default.a.createElement(react_popper_tooltip_Tooltip,Object(esm_extends.a)({arrowProps:arrowProps,closeOnReferenceHidden:closeOnReferenceHidden,isReferenceHidden:isReferenceHidden,placement:placement,update:update,style:style,tooltip:tooltip,trigger:trigger,mutationObserverOptions:mutationObserverOptions},{clearScheduled:_this2.clearScheduled,hideTooltip:_this2.hideTooltip,innerRef:ref}))}));return react_default.a.createElement(Manager,null,react_default.a.createElement(Reference,{innerRef:getTriggerRef},(function(_ref4){var ref=_ref4.ref;return children({getTriggerProps:_this2.getTriggerProps,triggerRef:ref})})),this.getState()&&(usePortal?Object(react_dom.createPortal)(popper,portalContainer):popper))},_proto.isControlled=function isControlled(){return void 0!==this.props.tooltipShown},_proto.getState=function getState(){return this.isControlled()?this.props.tooltipShown:this.state.tooltipShown},_proto.isTriggeredBy=function isTriggeredBy(event){var trigger=this.props.trigger;return trigger===event||Array.isArray(trigger)&&trigger.includes(event)},TooltipTrigger}(react.Component);react_popper_tooltip_TooltipTrigger.defaultProps={closeOnReferenceHidden:!0,defaultTooltipShown:!1,delayHide:0,delayShow:0,followCursor:!1,onVisibilityChange:function noop(){},placement:"right",portalContainer:canUseDOM()?document.body:null,trigger:"hover",usePortal:canUseDOM(),mutationObserverOptions:{childList:!0,subtree:!0},modifiers:[]};var react_popper_tooltip=react_popper_tooltip_TooltipTrigger,memoizerific=(__webpack_require__(111),__webpack_require__(35),__webpack_require__(283),__webpack_require__(19),__webpack_require__(37)),memoizerific_default=__webpack_require__.n(memoizerific),utils=__webpack_require__(144);function _extends(){return _extends=Object.assign||function(target){for(var i=1;i=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var _templateObject,_templateObject2,match=memoizerific_default()(1e3)((function(requests,actual,value){var fallback=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return actual.split("-")[0]===requests?value:fallback})),Arrow=esm.styled.div({position:"absolute",borderStyle:"solid"},(function(_ref){var placement=_ref.placement,x=0,y=0;switch(!0){case placement.startsWith("left")||placement.startsWith("right"):y=8;break;case placement.startsWith("top")||placement.startsWith("bottom"):x=8}return{transform:"translate3d(".concat(x,"px, ").concat(y,"px, 0px)")}}),(function(_ref2){var theme=_ref2.theme,color=_ref2.color,placement=_ref2.placement;return{bottom:"".concat(match("top",placement,-8,"auto"),"px"),top:"".concat(match("bottom",placement,-8,"auto"),"px"),right:"".concat(match("left",placement,-8,"auto"),"px"),left:"".concat(match("right",placement,-8,"auto"),"px"),borderBottomWidth:"".concat(match("top",placement,"0",8),"px"),borderTopWidth:"".concat(match("bottom",placement,"0",8),"px"),borderRightWidth:"".concat(match("left",placement,"0",8),"px"),borderLeftWidth:"".concat(match("right",placement,"0",8),"px"),borderTopColor:match("top",placement,theme.color[color]||color||"light"===theme.base?Object(utils.c)(theme.background.app):Object(utils.a)(theme.background.app),"transparent"),borderBottomColor:match("bottom",placement,theme.color[color]||color||"light"===theme.base?Object(utils.c)(theme.background.app):Object(utils.a)(theme.background.app),"transparent"),borderLeftColor:match("left",placement,theme.color[color]||color||"light"===theme.base?Object(utils.c)(theme.background.app):Object(utils.a)(theme.background.app),"transparent"),borderRightColor:match("right",placement,theme.color[color]||color||"light"===theme.base?Object(utils.c)(theme.background.app):Object(utils.a)(theme.background.app),"transparent")}})),Wrapper=esm.styled.div((function(_ref3){return{display:_ref3.hidden?"none":"inline-block",zIndex:2147483647}}),(function(_ref4){var theme=_ref4.theme,color=_ref4.color;return _ref4.hasChrome?{background:theme.color[color]||color||"light"===theme.base?Object(utils.c)(theme.background.app):Object(utils.a)(theme.background.app),filter:"\n drop-shadow(0px 5px 5px rgba(0,0,0,0.05))\n drop-shadow(0 1px 3px rgba(0,0,0,0.1))\n ",borderRadius:2*theme.appBorderRadius,fontSize:theme.typography.size.s1}:{}})),Tooltip_Tooltip=function Tooltip(_ref5){var placement=_ref5.placement,hasChrome=_ref5.hasChrome,children=_ref5.children,arrowProps=_ref5.arrowProps,tooltipRef=_ref5.tooltipRef,arrowRef=_ref5.arrowRef,color=_ref5.color,props=_objectWithoutProperties(_ref5,["placement","hasChrome","children","arrowProps","tooltipRef","arrowRef","color"]);return react_default.a.createElement(Wrapper,_extends({hasChrome:hasChrome,placement:placement,ref:tooltipRef},props,{color:color}),hasChrome&&react_default.a.createElement(Arrow,_extends({placement:placement,ref:arrowRef},arrowProps,{color:color})),children)};function _slicedToArray(arr,i){return function _arrayWithHoles(arr){if(Array.isArray(arr))return arr}(arr)||function _iterableToArrayLimit(arr,i){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(arr)))return;var _arr=[],_n=!0,_d=!1,_e=void 0;try{for(var _s,_i=arr[Symbol.iterator]();!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{_n||null==_i.return||_i.return()}finally{if(_d)throw _e}}return _arr}(arr,i)||function _unsupportedIterableToArray(o,minLen){if(!o)return;if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}(arr,i)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}Tooltip_Tooltip.displayName="Tooltip",Tooltip_Tooltip.defaultProps={color:void 0,arrowRef:void 0,tooltipRef:void 0,hasChrome:!0,placement:"top",arrowProps:{}};var WithTooltip_document=window_default.a.document,TargetContainer=esm.styled.div(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n display: inline-block;\n cursor: ",";\n"])),(function(props){return"hover"===props.mode?"default":"pointer"})),TargetSvgContainer=esm.styled.g(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n cursor: ",";\n"])),(function(props){return"hover"===props.mode?"default":"pointer"})),WithTooltip_WithTooltipPure=function WithTooltipPure(_ref){var svg=_ref.svg,trigger=_ref.trigger,placement=(_ref.closeOnClick,_ref.placement),modifiers=_ref.modifiers,hasChrome=_ref.hasChrome,_tooltip=_ref.tooltip,children=_ref.children,tooltipShown=_ref.tooltipShown,onVisibilityChange=_ref.onVisibilityChange,props=WithTooltip_objectWithoutProperties(_ref,["svg","trigger","closeOnClick","placement","modifiers","hasChrome","tooltip","children","tooltipShown","onVisibilityChange"]),Container=svg?TargetSvgContainer:TargetContainer;return react_default.a.createElement(react_popper_tooltip,{placement:placement,trigger:trigger,modifiers:modifiers,tooltipShown:tooltipShown,onVisibilityChange:onVisibilityChange,tooltip:function tooltip(_ref2){var getTooltipProps=_ref2.getTooltipProps,getArrowProps=_ref2.getArrowProps,tooltipRef=_ref2.tooltipRef,arrowRef=_ref2.arrowRef,tooltipPlacement=_ref2.placement;return react_default.a.createElement(Tooltip_Tooltip,WithTooltip_extends({hasChrome:hasChrome,placement:tooltipPlacement,tooltipRef:tooltipRef,arrowRef:arrowRef,arrowProps:getArrowProps()},getTooltipProps()),"function"==typeof _tooltip?_tooltip({onHide:function onHide(){return onVisibilityChange(!1)}}):_tooltip)}},(function(_ref3){var getTriggerProps=_ref3.getTriggerProps,triggerRef=_ref3.triggerRef;return react_default.a.createElement(Container,WithTooltip_extends({ref:triggerRef},getTriggerProps(),props),children)}))};WithTooltip_WithTooltipPure.displayName="WithTooltipPure",WithTooltip_WithTooltipPure.defaultProps={svg:!1,trigger:"hover",closeOnClick:!1,placement:"top",modifiers:[{name:"preventOverflow",options:{padding:8}},{name:"offset",options:{offset:[8,8]}},{name:"arrow",options:{padding:8}}],hasChrome:!0,tooltipShown:!1};var WithTooltip_WithToolTipState=function WithToolTipState(_ref4){var startOpen=_ref4.startOpen,onChange=_ref4.onVisibilityChange,rest=WithTooltip_objectWithoutProperties(_ref4,["startOpen","onVisibilityChange"]),_useState2=_slicedToArray(Object(react.useState)(startOpen||!1),2),tooltipShown=_useState2[0],setTooltipShown=_useState2[1],onVisibilityChange=Object(react.useCallback)((function(visibility){onChange&&!1===onChange(visibility)||setTooltipShown(visibility)}),[onChange]);return Object(react.useEffect)((function(){var hide=function hide(){return onVisibilityChange(!1)};WithTooltip_document.addEventListener("keydown",hide,!1);var iframes=Array.from(WithTooltip_document.getElementsByTagName("iframe")),unbinders=[];return iframes.forEach((function(iframe){var bind=function bind(){try{iframe.contentWindow.document&&(iframe.contentWindow.document.addEventListener("click",hide),unbinders.push((function(){try{iframe.contentWindow.document.removeEventListener("click",hide)}catch(e){}})))}catch(e){}};bind(),iframe.addEventListener("load",bind),unbinders.push((function(){iframe.removeEventListener("load",bind)}))})),function(){WithTooltip_document.removeEventListener("keydown",hide),unbinders.forEach((function(unbind){unbind()}))}})),react_default.a.createElement(WithTooltip_WithTooltipPure,WithTooltip_extends({},rest,{tooltipShown:tooltipShown,onVisibilityChange:onVisibilityChange}))};WithTooltip_WithToolTipState.displayName="WithToolTipState"}}]); \ No newline at end of file diff --git a/docs/4.d1f984030e3983670c86.manager.bundle.js b/docs/4.d1f984030e3983670c86.manager.bundle.js deleted file mode 100644 index a56e38fc..00000000 --- a/docs/4.d1f984030e3983670c86.manager.bundle.js +++ /dev/null @@ -1,4326 +0,0 @@ -/*! For license information please see 4.d1f984030e3983670c86.manager.bundle.js.LICENSE.txt */ -(window.webpackJsonp = window.webpackJsonp || []).push([ - [4], - { - 1457: function(module, exports, __webpack_require__) { - (function(global) { - var Prism = (function(_self) { - var lang = /\blang(?:uage)?-([\w-]+)\b/i, - uniqueId = 0, - plainTextGrammar = {}, - _ = { - manual: _self.Prism && _self.Prism.manual, - disableWorkerMessageHandler: - _self.Prism && _self.Prism.disableWorkerMessageHandler, - util: { - encode: function encode(tokens) { - return tokens instanceof Token - ? new Token( - tokens.type, - encode(tokens.content), - tokens.alias - ) - : Array.isArray(tokens) - ? tokens.map(encode) - : tokens - .replace(/&/g, '&') - .replace(/= rematch.reach); - pos += currentNode.value.length, - currentNode = currentNode.next - ) { - var str = currentNode.value; - if (tokenList.length > text.length) return; - if (!(str instanceof Token)) { - var match, - removeCount = 1; - if (greedy) { - if ( - !(match = matchPattern( - pattern, - pos, - text, - lookbehind - )) - ) - break; - var from = match.index, - to = match.index + match[0].length, - p = pos; - for (p += currentNode.value.length; from >= p; ) - p += (currentNode = currentNode.next).value.length; - if ( - ((pos = p -= currentNode.value.length), - currentNode.value instanceof Token) - ) - continue; - for ( - var k = currentNode; - k !== tokenList.tail && - (p < to || 'string' == typeof k.value); - k = k.next - ) - removeCount++, (p += k.value.length); - removeCount--, - (str = text.slice(pos, p)), - (match.index -= pos); - } else if ( - !(match = matchPattern(pattern, 0, str, lookbehind)) - ) - continue; - from = match.index; - var matchStr = match[0], - before = str.slice(0, from), - after = str.slice(from + matchStr.length), - reach = pos + str.length; - rematch && - reach > rematch.reach && - (rematch.reach = reach); - var removeFrom = currentNode.prev; - if ( - (before && - ((removeFrom = addAfter( - tokenList, - removeFrom, - before - )), - (pos += before.length)), - removeRange(tokenList, removeFrom, removeCount), - (currentNode = addAfter( - tokenList, - removeFrom, - new Token( - token, - inside ? _.tokenize(matchStr, inside) : matchStr, - alias, - matchStr - ) - )), - after && addAfter(tokenList, currentNode, after), - removeCount > 1) - ) { - var nestedRematch = { - cause: token + ',' + j, - reach: reach - }; - matchGrammar( - text, - tokenList, - grammar, - currentNode.prev, - pos, - nestedRematch - ), - rematch && - nestedRematch.reach > rematch.reach && - (rematch.reach = nestedRematch.reach); - } - } - } - } - } - } - function LinkedList() { - var head = { value: null, prev: null, next: null }, - tail = { value: null, prev: head, next: null }; - (head.next = tail), - (this.head = head), - (this.tail = tail), - (this.length = 0); - } - function addAfter(list, node, value) { - var next = node.next, - newNode = { value: value, prev: node, next: next }; - return ( - (node.next = newNode), - (next.prev = newNode), - list.length++, - newNode - ); - } - function removeRange(list, node, count) { - for ( - var next = node.next, i = 0; - i < count && next !== list.tail; - i++ - ) - next = next.next; - (node.next = next), (next.prev = node), (list.length -= i); - } - if ( - ((_self.Prism = _), - (Token.stringify = function stringify(o, language) { - if ('string' == typeof o) return o; - if (Array.isArray(o)) { - var s = ''; - return ( - o.forEach(function(e) { - s += stringify(e, language); - }), - s - ); - } - var env = { - type: o.type, - content: stringify(o.content, language), - tag: 'span', - classes: ['token', o.type], - attributes: {}, - language: language - }, - aliases = o.alias; - aliases && - (Array.isArray(aliases) - ? Array.prototype.push.apply(env.classes, aliases) - : env.classes.push(aliases)), - _.hooks.run('wrap', env); - var attributes = ''; - for (var name in env.attributes) - attributes += - ' ' + - name + - '="' + - (env.attributes[name] || '').replace(/"/g, '"') + - '"'; - return ( - '<' + - env.tag + - ' class="' + - env.classes.join(' ') + - '"' + - attributes + - '>' + - env.content + - '' - ); - }), - !_self.document) - ) - return _self.addEventListener - ? (_.disableWorkerMessageHandler || - _self.addEventListener( - 'message', - function(evt) { - var message = JSON.parse(evt.data), - lang = message.language, - code = message.code, - immediateClose = message.immediateClose; - _self.postMessage( - _.highlight(code, _.languages[lang], lang) - ), - immediateClose && _self.close(); - }, - !1 - ), - _) - : _; - var script = _.util.currentScript(); - function highlightAutomaticallyCallback() { - _.manual || _.highlightAll(); - } - if ( - (script && - ((_.filename = script.src), - script.hasAttribute('data-manual') && (_.manual = !0)), - !_.manual) - ) { - var readyState = document.readyState; - 'loading' === readyState || - ('interactive' === readyState && script && script.defer) - ? document.addEventListener( - 'DOMContentLoaded', - highlightAutomaticallyCallback - ) - : window.requestAnimationFrame - ? window.requestAnimationFrame(highlightAutomaticallyCallback) - : window.setTimeout(highlightAutomaticallyCallback, 16); - } - return _; - })( - 'undefined' != typeof window - ? window - : 'undefined' != typeof WorkerGlobalScope && - self instanceof WorkerGlobalScope - ? self - : {} - ); - module.exports && (module.exports = Prism), - void 0 !== global && (global.Prism = Prism); - }.call(this, __webpack_require__(89))); - }, - 1654: function(module, __webpack_exports__, __webpack_require__) { - 'use strict'; - __webpack_require__.r(__webpack_exports__), - __webpack_require__.d( - __webpack_exports__, - 'createCopyToClipboardFunction', - function() { - return createCopyToClipboardFunction; - } - ), - __webpack_require__.d( - __webpack_exports__, - 'SyntaxHighlighter', - function() { - return syntaxhighlighter_SyntaxHighlighter; - } - ); - __webpack_require__(153), - __webpack_require__(79), - __webpack_require__(14), - __webpack_require__(154), - __webpack_require__(8), - __webpack_require__(127), - __webpack_require__(6), - __webpack_require__(11), - __webpack_require__(13), - __webpack_require__(9), - __webpack_require__(10), - __webpack_require__(12), - __webpack_require__(17), - __webpack_require__(15), - __webpack_require__(20), - __webpack_require__(86), - __webpack_require__(19); - var react = __webpack_require__(0), - react_default = __webpack_require__.n(react), - esm = __webpack_require__(41), - dist_esm = __webpack_require__(1), - global_window = __webpack_require__(7), - window_default = __webpack_require__.n(global_window), - memoizerific = __webpack_require__(31), - memoizerific_default = __webpack_require__.n(memoizerific), - jsx = __webpack_require__(1667), - prism_jsx = __webpack_require__.n(jsx).a, - bash = __webpack_require__(1706), - prism_bash = __webpack_require__.n(bash).a, - css = __webpack_require__(1666), - prism_css = __webpack_require__.n(css).a, - js_extras = __webpack_require__(1702), - prism_js_extras = __webpack_require__.n(js_extras).a, - json = __webpack_require__(1703), - prism_json = __webpack_require__.n(json).a, - graphql = __webpack_require__(1708), - prism_graphql = __webpack_require__.n(graphql).a, - markup = __webpack_require__(1665), - prism_markup = __webpack_require__.n(markup).a, - markdown = __webpack_require__(1705), - prism_markdown = __webpack_require__.n(markdown).a, - yaml = __webpack_require__(1704), - prism_yaml = __webpack_require__.n(yaml).a, - tsx = __webpack_require__(1707), - prism_tsx = __webpack_require__.n(tsx).a, - typescript = __webpack_require__(1668), - prism_typescript = __webpack_require__.n(typescript).a, - objectWithoutProperties = __webpack_require__(1700), - objectWithoutProperties_default = __webpack_require__.n( - objectWithoutProperties - ), - objectSpread = __webpack_require__(433), - objectSpread_default = __webpack_require__.n(objectSpread), - helpers_extends = __webpack_require__(850), - extends_default = __webpack_require__.n(helpers_extends); - function createStyleObject(classNames) { - var elementStyle = - arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, - stylesheet = arguments.length > 2 ? arguments[2] : void 0; - return classNames.reduce(function(styleObject, className) { - return objectSpread_default()({}, styleObject, stylesheet[className]); - }, elementStyle); - } - function createClassNameString(classNames) { - return classNames.join(' '); - } - function createElement(_ref) { - var node = _ref.node, - stylesheet = _ref.stylesheet, - _ref$style = _ref.style, - style = void 0 === _ref$style ? {} : _ref$style, - useInlineStyles = _ref.useInlineStyles, - key = _ref.key, - properties = node.properties, - type = node.type, - TagName = node.tagName, - value = node.value; - if ('text' === type) return value; - if (TagName) { - var childrenCreator = (function createChildren( - stylesheet, - useInlineStyles - ) { - var childrenCount = 0; - return function(children) { - return ( - (childrenCount += 1), - children.map(function(child, i) { - return createElement({ - node: child, - stylesheet: stylesheet, - useInlineStyles: useInlineStyles, - key: 'code-segment-'.concat(childrenCount, '-').concat(i) - }); - }) - ); - }; - })(stylesheet, useInlineStyles), - nonStylesheetClassNames = - useInlineStyles && - properties.className && - properties.className.filter(function(className) { - return !stylesheet[className]; - }), - className = - nonStylesheetClassNames && nonStylesheetClassNames.length - ? nonStylesheetClassNames - : void 0, - props = useInlineStyles - ? objectSpread_default()( - {}, - properties, - { className: className && createClassNameString(className) }, - { - style: createStyleObject( - properties.className, - Object.assign({}, properties.style, style), - stylesheet - ) - } - ) - : objectSpread_default()({}, properties, { - className: createClassNameString(properties.className) - }), - children = childrenCreator(node.children); - return react_default.a.createElement( - TagName, - extends_default()({ key: key }, props), - children - ); - } - } - var newLineRegex = /\n/g; - function AllLineNumbers(_ref2) { - var codeString = _ref2.codeString, - codeStyle = _ref2.codeStyle, - _ref2$containerStyle = _ref2.containerStyle, - containerStyle = - void 0 === _ref2$containerStyle - ? { float: 'left', paddingRight: '10px' } - : _ref2$containerStyle, - _ref2$numberStyle = _ref2.numberStyle, - numberStyle = void 0 === _ref2$numberStyle ? {} : _ref2$numberStyle, - startingLineNumber = _ref2.startingLineNumber; - return react_default.a.createElement( - 'code', - { style: Object.assign({}, codeStyle, containerStyle) }, - (function getAllLineNumbers(_ref) { - var lines = _ref.lines, - startingLineNumber = _ref.startingLineNumber, - style = _ref.style; - return lines.map(function(_, i) { - var number = i + startingLineNumber; - return react_default.a.createElement( - 'span', - { - key: 'line-'.concat(i), - className: 'react-syntax-highlighter-line-number', - style: 'function' == typeof style ? style(number) : style - }, - ''.concat(number, '\n') - ); - }); - })({ - lines: codeString.replace(/\n$/, '').split('\n'), - style: numberStyle, - startingLineNumber: startingLineNumber - }) - ); - } - function getInlineLineNumber(lineNumber, inlineLineNumberStyle) { - return { - type: 'element', - tagName: 'span', - properties: { - key: 'line-number--'.concat(lineNumber), - className: [ - 'comment', - 'linenumber', - 'react-syntax-highlighter-line-number' - ], - style: inlineLineNumberStyle - }, - children: [{ type: 'text', value: lineNumber }] - }; - } - function assembleLineNumberStyles( - lineNumberStyle, - lineNumber, - largestLineNumber - ) { - var num, - len, - defaultLineNumberStyle = { - display: 'inline-block', - minWidth: ((num = largestLineNumber), - (len = num.toString().length), - ''.concat(len, 'em')), - paddingRight: '1em', - textAlign: 'right', - userSelect: 'none' - }, - customLineNumberStyle = - 'function' == typeof lineNumberStyle - ? lineNumberStyle(lineNumber) - : lineNumberStyle; - return objectSpread_default()( - {}, - defaultLineNumberStyle, - customLineNumberStyle - ); - } - function createLineElement(_ref3) { - var children = _ref3.children, - lineNumber = _ref3.lineNumber, - lineNumberStyle = _ref3.lineNumberStyle, - largestLineNumber = _ref3.largestLineNumber, - showInlineLineNumbers = _ref3.showInlineLineNumbers, - _ref3$lineProps = _ref3.lineProps, - lineProps = void 0 === _ref3$lineProps ? {} : _ref3$lineProps, - _ref3$className = _ref3.className, - className = void 0 === _ref3$className ? [] : _ref3$className, - properties = - 'function' == typeof lineProps ? lineProps(lineNumber) : lineProps; - if ( - ((properties.className = className), - lineNumber && showInlineLineNumbers) - ) { - var inlineLineNumberStyle = assembleLineNumberStyles( - lineNumberStyle, - lineNumber, - largestLineNumber - ); - children.unshift( - getInlineLineNumber(lineNumber, inlineLineNumberStyle) - ); - } - return { - type: 'element', - tagName: 'span', - properties: properties, - children: children - }; - } - function flattenCodeTree(tree) { - for ( - var className = - arguments.length > 1 && void 0 !== arguments[1] - ? arguments[1] - : [], - newTree = - arguments.length > 2 && void 0 !== arguments[2] - ? arguments[2] - : [], - i = 0; - i < tree.length; - i++ - ) { - var node = tree[i]; - if ('text' === node.type) - newTree.push( - createLineElement({ children: [node], className: className }) - ); - else if (node.children) { - var classNames = className.concat(node.properties.className); - newTree = newTree.concat( - flattenCodeTree(node.children, classNames) - ); - } - } - return newTree; - } - function processLines( - codeTree, - wrapLines, - lineProps, - showLineNumbers, - showInlineLineNumbers, - startingLineNumber, - largestLineNumber, - lineNumberStyle - ) { - var _ref4, - tree = flattenCodeTree(codeTree.value), - newTree = [], - lastLineBreakIndex = -1, - index = 0; - function createWrappedLine(children, lineNumber) { - var className = - arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : []; - return createLineElement({ - children: children, - lineNumber: lineNumber, - lineNumberStyle: lineNumberStyle, - largestLineNumber: largestLineNumber, - showInlineLineNumbers: showInlineLineNumbers, - lineProps: lineProps, - className: className - }); - } - function createUnwrappedLine(children, lineNumber) { - if (lineNumber && showInlineLineNumbers) { - var inlineLineNumberStyle = assembleLineNumberStyles( - lineNumberStyle, - lineNumber, - largestLineNumber - ); - children.unshift( - getInlineLineNumber(lineNumber, inlineLineNumberStyle) - ); - } - return children; - } - function createLine(children, lineNumber) { - var className = - arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : []; - return wrapLines || className.length > 0 - ? createWrappedLine(children, lineNumber, className) - : createUnwrappedLine(children, lineNumber); - } - for ( - var _loop = function _loop() { - var node = tree[index], - value = node.children[0].value; - if ( - (function getNewLines(str) { - return str.match(newLineRegex); - })(value) - ) { - var splitValue = value.split('\n'); - splitValue.forEach(function(text, i) { - var lineNumber = - showLineNumbers && newTree.length + startingLineNumber, - newChild = { type: 'text', value: ''.concat(text, '\n') }; - if (0 === i) { - var _line = createLine( - tree - .slice(lastLineBreakIndex + 1, index) - .concat( - createLineElement({ - children: [newChild], - className: node.properties.className - }) - ), - lineNumber - ); - newTree.push(_line); - } else if (i === splitValue.length - 1) { - if ( - tree[index + 1] && - tree[index + 1].children && - tree[index + 1].children[0] - ) { - var newElem = createLineElement({ - children: [{ type: 'text', value: ''.concat(text) }], - className: node.properties.className - }); - tree.splice(index + 1, 0, newElem); - } else { - var _line2 = createLine( - [newChild], - lineNumber, - node.properties.className - ); - newTree.push(_line2); - } - } else { - var _line3 = createLine( - [newChild], - lineNumber, - node.properties.className - ); - newTree.push(_line3); - } - }), - (lastLineBreakIndex = index); - } - index++; - }; - index < tree.length; - - ) - _loop(); - if (lastLineBreakIndex !== tree.length - 1) { - var children = tree.slice(lastLineBreakIndex + 1, tree.length); - if (children && children.length) { - var line = createLine( - children, - newTree.length + startingLineNumber - ); - newTree.push(line); - } - } - return wrapLines ? newTree : (_ref4 = []).concat.apply(_ref4, newTree); - } - function defaultRenderer(_ref5) { - var rows = _ref5.rows, - stylesheet = _ref5.stylesheet, - useInlineStyles = _ref5.useInlineStyles; - return rows.map(function(node, i) { - return createElement({ - node: node, - stylesheet: stylesheet, - useInlineStyles: useInlineStyles, - key: 'code-segement'.concat(i) - }); - }); - } - function isHighlightJs(astGenerator) { - return astGenerator && void 0 !== astGenerator.highlightAuto; - } - var defaultAstGenerator, - defaultStyle, - core = __webpack_require__(1673), - core_default = __webpack_require__.n(core), - prism_light_SyntaxHighlighter = ((defaultAstGenerator = core_default.a), - (defaultStyle = {}), - function SyntaxHighlighter(_ref7) { - var language = _ref7.language, - children = _ref7.children, - _ref7$style = _ref7.style, - style = void 0 === _ref7$style ? defaultStyle : _ref7$style, - _ref7$customStyle = _ref7.customStyle, - customStyle = void 0 === _ref7$customStyle ? {} : _ref7$customStyle, - _ref7$codeTagProps = _ref7.codeTagProps, - codeTagProps = - void 0 === _ref7$codeTagProps - ? { - className: language ? 'language-'.concat(language) : void 0, - style: style['code[class*="language-"]'] - } - : _ref7$codeTagProps, - _ref7$useInlineStyles = _ref7.useInlineStyles, - useInlineStyles = - void 0 === _ref7$useInlineStyles || _ref7$useInlineStyles, - _ref7$showLineNumbers = _ref7.showLineNumbers, - showLineNumbers = - void 0 !== _ref7$showLineNumbers && _ref7$showLineNumbers, - _ref7$showInlineLineN = _ref7.showInlineLineNumbers, - showInlineLineNumbers = - void 0 !== _ref7$showInlineLineN && _ref7$showInlineLineN, - _ref7$startingLineNum = _ref7.startingLineNumber, - startingLineNumber = - void 0 === _ref7$startingLineNum ? 1 : _ref7$startingLineNum, - lineNumberContainerStyle = _ref7.lineNumberContainerStyle, - _ref7$lineNumberStyle = _ref7.lineNumberStyle, - lineNumberStyle = - void 0 === _ref7$lineNumberStyle ? {} : _ref7$lineNumberStyle, - wrapLines = _ref7.wrapLines, - _ref7$lineProps = _ref7.lineProps, - lineProps = void 0 === _ref7$lineProps ? {} : _ref7$lineProps, - renderer = _ref7.renderer, - _ref7$PreTag = _ref7.PreTag, - PreTag = void 0 === _ref7$PreTag ? 'pre' : _ref7$PreTag, - _ref7$CodeTag = _ref7.CodeTag, - CodeTag = void 0 === _ref7$CodeTag ? 'code' : _ref7$CodeTag, - _ref7$code = _ref7.code, - code = - void 0 === _ref7$code - ? Array.isArray(children) - ? children[0] - : children - : _ref7$code, - astGenerator = _ref7.astGenerator, - rest = objectWithoutProperties_default()(_ref7, [ - 'language', - 'children', - 'style', - 'customStyle', - 'codeTagProps', - 'useInlineStyles', - 'showLineNumbers', - 'showInlineLineNumbers', - 'startingLineNumber', - 'lineNumberContainerStyle', - 'lineNumberStyle', - 'wrapLines', - 'lineProps', - 'renderer', - 'PreTag', - 'CodeTag', - 'code', - 'astGenerator' - ]); - astGenerator = astGenerator || defaultAstGenerator; - var allLineNumbers = showLineNumbers - ? react_default.a.createElement(AllLineNumbers, { - containerStyle: lineNumberContainerStyle, - codeStyle: codeTagProps.style || {}, - numberStyle: lineNumberStyle, - startingLineNumber: startingLineNumber, - codeString: code - }) - : null, - defaultPreStyle = style.hljs || - style['pre[class*="language-"]'] || { backgroundColor: '#fff' }, - generatorClassName = isHighlightJs(astGenerator) - ? 'hljs' - : 'prismjs', - preProps = useInlineStyles - ? Object.assign({}, rest, { - style: Object.assign({}, defaultPreStyle, customStyle) - }) - : Object.assign({}, rest, { - className: rest.className - ? ''.concat(generatorClassName, ' ').concat(rest.className) - : generatorClassName, - style: Object.assign({}, customStyle) - }); - if (!astGenerator) - return react_default.a.createElement( - PreTag, - preProps, - allLineNumbers, - react_default.a.createElement(CodeTag, codeTagProps, code) - ); - (wrapLines = !(!renderer || void 0 !== wrapLines) || wrapLines), - (renderer = renderer || defaultRenderer); - var defaultCodeValue = [{ type: 'text', value: code }], - codeTree = (function getCodeTree(_ref6) { - var astGenerator = _ref6.astGenerator, - language = _ref6.language, - code = _ref6.code, - defaultCodeValue = _ref6.defaultCodeValue; - if (isHighlightJs(astGenerator)) { - var hasLanguage = (function(astGenerator, language) { - return -1 !== astGenerator.listLanguages().indexOf(language); - })(astGenerator, language); - return 'text' === language - ? { value: defaultCodeValue, language: 'text' } - : hasLanguage - ? astGenerator.highlight(language, code) - : astGenerator.highlightAuto(code); - } - try { - return language && 'text' !== language - ? { value: astGenerator.highlight(code, language) } - : { value: defaultCodeValue }; - } catch (e) { - return { value: defaultCodeValue }; - } - })({ - astGenerator: astGenerator, - language: language, - code: code, - defaultCodeValue: defaultCodeValue - }); - null === codeTree.language && (codeTree.value = defaultCodeValue); - var rows = processLines( - codeTree, - wrapLines, - lineProps, - showLineNumbers, - showInlineLineNumbers, - startingLineNumber, - codeTree.value.length + startingLineNumber, - lineNumberStyle - ); - return react_default.a.createElement( - PreTag, - preProps, - react_default.a.createElement( - CodeTag, - codeTagProps, - !showInlineLineNumbers && allLineNumbers, - renderer({ - rows: rows, - stylesheet: style, - useInlineStyles: useInlineStyles - }) - ) - ); - }); - prism_light_SyntaxHighlighter.registerLanguage = function(_, language) { - return core_default.a.register(language); - }; - var prism_light = prism_light_SyntaxHighlighter, - ActionBar = __webpack_require__(414), - ScrollArea = __webpack_require__(412), - ts_dedent_esm = __webpack_require__(62), - formatter = memoizerific_default()(2)(function(code) { - return Object(ts_dedent_esm.a)(code); - }); - function _extends() { - return ( - (_extends = - Object.assign || - function(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i]; - for (var key in source) - Object.prototype.hasOwnProperty.call(source, key) && - (target[key] = source[key]); - } - return target; - }), - _extends.apply(this, arguments) - ); - } - function _objectWithoutProperties(source, excluded) { - if (null == source) return {}; - var key, - i, - target = (function _objectWithoutPropertiesLoose(source, excluded) { - if (null == source) return {}; - var key, - i, - target = {}, - sourceKeys = Object.keys(source); - for (i = 0; i < sourceKeys.length; i++) - (key = sourceKeys[i]), - excluded.indexOf(key) >= 0 || (target[key] = source[key]); - return target; - })(source, excluded); - if (Object.getOwnPropertySymbols) { - var sourceSymbolKeys = Object.getOwnPropertySymbols(source); - for (i = 0; i < sourceSymbolKeys.length; i++) - (key = sourceSymbolKeys[i]), - excluded.indexOf(key) >= 0 || - (Object.prototype.propertyIsEnumerable.call(source, key) && - (target[key] = source[key])); - } - return target; - } - function asyncGeneratorStep( - gen, - resolve, - reject, - _next, - _throw, - key, - arg - ) { - try { - var info = gen[key](arg), - value = info.value; - } catch (error) { - return void reject(error); - } - info.done ? resolve(value) : Promise.resolve(value).then(_next, _throw); - } - function _slicedToArray(arr, i) { - return ( - (function _arrayWithHoles(arr) { - if (Array.isArray(arr)) return arr; - })(arr) || - (function _iterableToArrayLimit(arr, i) { - if ( - 'undefined' == typeof Symbol || - !(Symbol.iterator in Object(arr)) - ) - return; - var _arr = [], - _n = !0, - _d = !1, - _e = void 0; - try { - for ( - var _s, _i = arr[Symbol.iterator](); - !(_n = (_s = _i.next()).done) && - (_arr.push(_s.value), !i || _arr.length !== i); - _n = !0 - ); - } catch (err) { - (_d = !0), (_e = err); - } finally { - try { - _n || null == _i.return || _i.return(); - } finally { - if (_d) throw _e; - } - } - return _arr; - })(arr, i) || - (function _unsupportedIterableToArray(o, minLen) { - if (!o) return; - if ('string' == typeof o) return _arrayLikeToArray(o, minLen); - var n = Object.prototype.toString.call(o).slice(8, -1); - 'Object' === n && o.constructor && (n = o.constructor.name); - if ('Map' === n || 'Set' === n) return Array.from(o); - if ( - 'Arguments' === n || - /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) - ) - return _arrayLikeToArray(o, minLen); - })(arr, i) || - (function _nonIterableRest() { - throw new TypeError( - 'Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.' - ); - })() - ); - } - function _arrayLikeToArray(arr, len) { - (null == len || len > arr.length) && (len = arr.length); - for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; - return arr2; - } - var syntaxhighlighter_navigator = window_default.a.navigator, - syntaxhighlighter_document = window_default.a.document, - globalWindow = window_default.a.window; - prism_light.registerLanguage('jsextra', prism_js_extras), - prism_light.registerLanguage('jsx', prism_jsx), - prism_light.registerLanguage('json', prism_json), - prism_light.registerLanguage('yml', prism_yaml), - prism_light.registerLanguage('md', prism_markdown), - prism_light.registerLanguage('bash', prism_bash), - prism_light.registerLanguage('css', prism_css), - prism_light.registerLanguage('html', prism_markup), - prism_light.registerLanguage('tsx', prism_tsx), - prism_light.registerLanguage('typescript', prism_typescript), - prism_light.registerLanguage('graphql', prism_graphql); - var themedSyntax = memoizerific_default()(2)(function(theme) { - return Object.entries(theme.code || {}).reduce(function(acc, _ref) { - var _ref2 = _slicedToArray(_ref, 2), - key = _ref2[0], - val = _ref2[1]; - return Object.assign( - {}, - acc, - (function _defineProperty(obj, key, value) { - return ( - key in obj - ? Object.defineProperty(obj, key, { - value: value, - enumerable: !0, - configurable: !0, - writable: !0 - }) - : (obj[key] = value), - obj - ); - })({}, '* .'.concat(key), val) - ); - }, {}); - }), - copyToClipboard = createCopyToClipboardFunction(); - function createCopyToClipboardFunction() { - return null != syntaxhighlighter_navigator && - syntaxhighlighter_navigator.clipboard - ? function(text) { - return syntaxhighlighter_navigator.clipboard.writeText(text); - } - : (function() { - var _ref3 = (function _asyncToGenerator(fn) { - return function() { - var self = this, - args = arguments; - return new Promise(function(resolve, reject) { - var gen = fn.apply(self, args); - function _next(value) { - asyncGeneratorStep( - gen, - resolve, - reject, - _next, - _throw, - 'next', - value - ); - } - function _throw(err) { - asyncGeneratorStep( - gen, - resolve, - reject, - _next, - _throw, - 'throw', - err - ); - } - _next(void 0); - }); - }; - })( - regeneratorRuntime.mark(function _callee(text) { - var tmp, focus; - return regeneratorRuntime.wrap(function _callee$(_context) { - for (;;) - switch ((_context.prev = _context.next)) { - case 0: - (tmp = syntaxhighlighter_document.createElement( - 'TEXTAREA' - )), - (focus = syntaxhighlighter_document.activeElement), - (tmp.value = text), - syntaxhighlighter_document.body.appendChild(tmp), - tmp.select(), - syntaxhighlighter_document.execCommand('copy'), - syntaxhighlighter_document.body.removeChild(tmp), - focus.focus(); - case 8: - case 'end': - return _context.stop(); - } - }, _callee); - }) - ); - return function(_x) { - return _ref3.apply(this, arguments); - }; - })(); - } - var Wrapper = dist_esm.styled.div( - function(_ref4) { - return { - position: 'relative', - overflow: 'hidden', - color: _ref4.theme.color.defaultText - }; - }, - function(_ref5) { - var theme = _ref5.theme; - return _ref5.bordered - ? { - border: '1px solid '.concat(theme.appBorderColor), - borderRadius: theme.borderRadius, - background: theme.background.content - } - : {}; - } - ), - Scroller = Object(dist_esm.styled)(function(_ref6) { - var children = _ref6.children, - className = _ref6.className; - return react_default.a.createElement( - ScrollArea.a, - { horizontal: !0, vertical: !0, className: className }, - children - ); - })( - { position: 'relative' }, - function(_ref7) { - return { '& code': { paddingRight: _ref7.theme.layoutMargin } }; - }, - function(_ref8) { - var theme = _ref8.theme; - return themedSyntax(theme); - } - ), - Pre = dist_esm.styled.pre(function(_ref9) { - var theme = _ref9.theme; - return { - display: 'flex', - justifyContent: 'flex-start', - margin: 0, - padding: _ref9.padded ? theme.layoutMargin : 0 - }; - }), - Code = dist_esm.styled.code({ flex: 1, paddingRight: 0, opacity: 1 }), - syntaxhighlighter_SyntaxHighlighter = function SyntaxHighlighter( - _ref10 - ) { - var children = _ref10.children, - _ref10$language = _ref10.language, - language = void 0 === _ref10$language ? 'jsx' : _ref10$language, - _ref10$copyable = _ref10.copyable, - copyable = void 0 !== _ref10$copyable && _ref10$copyable, - _ref10$bordered = _ref10.bordered, - bordered = void 0 !== _ref10$bordered && _ref10$bordered, - _ref10$padded = _ref10.padded, - padded = void 0 !== _ref10$padded && _ref10$padded, - _ref10$format = _ref10.format, - format = void 0 === _ref10$format || _ref10$format, - _ref10$className = _ref10.className, - className = void 0 === _ref10$className ? null : _ref10$className, - _ref10$showLineNumber = _ref10.showLineNumbers, - showLineNumbers = - void 0 !== _ref10$showLineNumber && _ref10$showLineNumber, - rest = _objectWithoutProperties(_ref10, [ - 'children', - 'language', - 'copyable', - 'bordered', - 'padded', - 'format', - 'className', - 'showLineNumbers' - ]); - if ('string' != typeof children || !children.trim()) return null; - var highlightableCode = format - ? formatter(children) - : children.trim(), - _useState2 = _slicedToArray(Object(react.useState)(!1), 2), - copied = _useState2[0], - setCopied = _useState2[1], - onClick = function onClick(e) { - e.preventDefault(); - var selectedText = globalWindow.getSelection().toString(), - textToCopy = - 'click' !== e.type && selectedText - ? selectedText - : highlightableCode; - copyToClipboard(textToCopy) - .then(function() { - setCopied(!0), - globalWindow.setTimeout(function() { - return setCopied(!1); - }, 1500); - }) - .catch(esm.a.error); - }; - return react_default.a.createElement( - Wrapper, - { - bordered: bordered, - padded: padded, - className: className, - onCopyCapture: onClick - }, - react_default.a.createElement( - Scroller, - null, - react_default.a.createElement( - prism_light, - _extends( - { - padded: padded || bordered, - language: language, - showLineNumbers: showLineNumbers, - showInlineLineNumbers: showLineNumbers, - useInlineStyles: !1, - PreTag: Pre, - CodeTag: Code, - lineNumberContainerStyle: {} - }, - rest - ), - highlightableCode - ) - ), - copyable - ? react_default.a.createElement(ActionBar.a, { - actionItems: [ - { title: copied ? 'Copied' : 'Copy', onClick: onClick } - ] - }) - : null - ); - }; - syntaxhighlighter_SyntaxHighlighter.displayName = 'SyntaxHighlighter'; - __webpack_exports__.default = syntaxhighlighter_SyntaxHighlighter; - }, - 1657: function(module, exports, __webpack_require__) { - 'use strict'; - var normalize = __webpack_require__(1658), - Schema = __webpack_require__(1660), - DefinedInfo = __webpack_require__(1661); - module.exports = function create(definition) { - var prop, - info, - space = definition.space, - mustUseProperty = definition.mustUseProperty || [], - attributes = definition.attributes || {}, - props = definition.properties, - transform = definition.transform, - property = {}, - normal = {}; - for (prop in props) - (info = new DefinedInfo( - prop, - transform(attributes, prop), - props[prop], - space - )), - -1 !== mustUseProperty.indexOf(prop) && (info.mustUseProperty = !0), - (property[prop] = info), - (normal[normalize(prop)] = prop), - (normal[normalize(info.attribute)] = prop); - return new Schema(property, normal, space); - }; - }, - 1658: function(module, exports, __webpack_require__) { - 'use strict'; - module.exports = function normalize(value) { - return value.toLowerCase(); - }; - }, - 1659: function(module, exports, __webpack_require__) { - 'use strict'; - var powers = 0; - function increment() { - return Math.pow(2, ++powers); - } - (exports.boolean = increment()), - (exports.booleanish = increment()), - (exports.overloadedBoolean = increment()), - (exports.number = increment()), - (exports.spaceSeparated = increment()), - (exports.commaSeparated = increment()), - (exports.commaOrSpaceSeparated = increment()); - }, - 1660: function(module, exports, __webpack_require__) { - 'use strict'; - module.exports = Schema; - var proto = Schema.prototype; - function Schema(property, normal, space) { - (this.property = property), - (this.normal = normal), - space && (this.space = space); - } - (proto.space = null), (proto.normal = {}), (proto.property = {}); - }, - 1661: function(module, exports, __webpack_require__) { - 'use strict'; - var Info = __webpack_require__(1662), - types = __webpack_require__(1659); - (module.exports = DefinedInfo), - (DefinedInfo.prototype = new Info()), - (DefinedInfo.prototype.defined = !0); - var checks = [ - 'boolean', - 'booleanish', - 'overloadedBoolean', - 'number', - 'commaSeparated', - 'spaceSeparated', - 'commaOrSpaceSeparated' - ], - checksLength = checks.length; - function DefinedInfo(property, attribute, mask, space) { - var check, - index = -1; - for ( - mark(this, 'space', space), Info.call(this, property, attribute); - ++index < checksLength; - - ) - mark( - this, - (check = checks[index]), - (mask & types[check]) === types[check] - ); - } - function mark(values, key, value) { - value && (values[key] = value); - } - }, - 1662: function(module, exports, __webpack_require__) { - 'use strict'; - module.exports = Info; - var proto = Info.prototype; - function Info(property, attribute) { - (this.property = property), (this.attribute = attribute); - } - (proto.space = null), - (proto.attribute = null), - (proto.property = null), - (proto.boolean = !1), - (proto.booleanish = !1), - (proto.overloadedBoolean = !1), - (proto.number = !1), - (proto.commaSeparated = !1), - (proto.spaceSeparated = !1), - (proto.commaOrSpaceSeparated = !1), - (proto.mustUseProperty = !1), - (proto.defined = !1); - }, - 1663: function(module, exports, __webpack_require__) { - 'use strict'; - var caseSensitiveTransform = __webpack_require__(1682); - module.exports = function caseInsensitiveTransform(attributes, property) { - return caseSensitiveTransform(attributes, property.toLowerCase()); - }; - }, - 1664: function(module, exports, __webpack_require__) { - 'use strict'; - module.exports = function decimal(character) { - var code = - 'string' == typeof character ? character.charCodeAt(0) : character; - return code >= 48 && code <= 57; - }; - }, - 1665: function(module, exports, __webpack_require__) { - 'use strict'; - function markup(Prism) { - (Prism.languages.markup = { - comment: { pattern: //, greedy: !0 }, - prolog: { pattern: /<\?[\s\S]+?\?>/, greedy: !0 }, - doctype: { - pattern: /"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i, - greedy: !0, - inside: { - 'internal-subset': { - pattern: /(^[^\[]*\[)[\s\S]+(?=\]>$)/, - lookbehind: !0, - greedy: !0, - inside: null - }, - string: { pattern: /"[^"]*"|'[^']*'/, greedy: !0 }, - punctuation: /^$|[[\]]/, - 'doctype-tag': /^DOCTYPE/i, - name: /[^\s<>'"]+/ - } - }, - cdata: { pattern: //i, greedy: !0 }, - tag: { - pattern: /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/, - greedy: !0, - inside: { - tag: { - pattern: /^<\/?[^\s>\/]+/, - inside: { punctuation: /^<\/?/, namespace: /^[^\s>\/:]+:/ } - }, - 'special-attr': [], - 'attr-value': { - pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/, - inside: { - punctuation: [{ pattern: /^=/, alias: 'attr-equals' }, /"|'/] - } - }, - punctuation: /\/?>/, - 'attr-name': { - pattern: /[^\s>\/]+/, - inside: { namespace: /^[^\s>\/:]+:/ } - } - } - }, - entity: [ - { pattern: /&[\da-z]{1,8};/i, alias: 'named-entity' }, - /&#x?[\da-f]{1,8};/i - ] - }), - (Prism.languages.markup.tag.inside['attr-value'].inside.entity = - Prism.languages.markup.entity), - (Prism.languages.markup.doctype.inside['internal-subset'].inside = - Prism.languages.markup), - Prism.hooks.add('wrap', function(env) { - 'entity' === env.type && - (env.attributes.title = env.content.value.replace(/&/, '&')); - }), - Object.defineProperty(Prism.languages.markup.tag, 'addInlined', { - value: function addInlined(tagName, lang) { - var includedCdataInside = {}; - (includedCdataInside['language-' + lang] = { - pattern: /(^$)/i, - lookbehind: !0, - inside: Prism.languages[lang] - }), - (includedCdataInside.cdata = /^$/i); - var inside = { - 'included-cdata': { - pattern: //i, - inside: includedCdataInside - } - }; - inside['language-' + lang] = { - pattern: /[\s\S]+/, - inside: Prism.languages[lang] - }; - var def = {}; - (def[tagName] = { - pattern: RegExp( - /(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace( - /__/g, - function() { - return tagName; - } - ), - 'i' - ), - lookbehind: !0, - greedy: !0, - inside: inside - }), - Prism.languages.insertBefore('markup', 'cdata', def); - } - }), - Object.defineProperty(Prism.languages.markup.tag, 'addAttribute', { - value: function(attrName, lang) { - Prism.languages.markup.tag.inside['special-attr'].push({ - pattern: RegExp( - /(^|["'\s])/.source + - '(?:' + - attrName + - ')' + - /\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source, - 'i' - ), - lookbehind: !0, - inside: { - 'attr-name': /^[^\s=]+/, - 'attr-value': { - pattern: /=[\s\S]+/, - inside: { - value: { - pattern: /(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/, - lookbehind: !0, - alias: [lang, 'language-' + lang], - inside: Prism.languages[lang] - }, - punctuation: [ - { pattern: /^=/, alias: 'attr-equals' }, - /"|'/ - ] - } - } - } - }); - } - }), - (Prism.languages.html = Prism.languages.markup), - (Prism.languages.mathml = Prism.languages.markup), - (Prism.languages.svg = Prism.languages.markup), - (Prism.languages.xml = Prism.languages.extend('markup', {})), - (Prism.languages.ssml = Prism.languages.xml), - (Prism.languages.atom = Prism.languages.xml), - (Prism.languages.rss = Prism.languages.xml); - } - (module.exports = markup), - (markup.displayName = 'markup'), - (markup.aliases = [ - 'html', - 'mathml', - 'svg', - 'xml', - 'ssml', - 'atom', - 'rss' - ]); - }, - 1666: function(module, exports, __webpack_require__) { - 'use strict'; - function css(Prism) { - !(function(Prism) { - var string = /(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/; - (Prism.languages.css = { - comment: /\/\*[\s\S]*?\*\//, - atrule: { - pattern: /@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/, - inside: { - rule: /^@[\w-]+/, - 'selector-function-argument': { - pattern: /(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/, - lookbehind: !0, - alias: 'selector' - }, - keyword: { - pattern: /(^|[^\w-])(?:and|not|only|or)(?![\w-])/, - lookbehind: !0 - } - } - }, - url: { - pattern: RegExp( - '\\burl\\((?:' + - string.source + - '|' + - /(?:[^\\\r\n()"']|\\[\s\S])*/.source + - ')\\)', - 'i' - ), - greedy: !0, - inside: { - function: /^url/i, - punctuation: /^\(|\)$/, - string: { - pattern: RegExp('^' + string.source + '$'), - alias: 'url' - } - } - }, - selector: { - pattern: RegExp( - '(^|[{}\\s])[^{}\\s](?:[^{};"\'\\s]|\\s+(?![\\s{])|' + - string.source + - ')*(?=\\s*\\{)' - ), - lookbehind: !0 - }, - string: { pattern: string, greedy: !0 }, - property: { - pattern: /(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i, - lookbehind: !0 - }, - important: /!important\b/i, - function: { - pattern: /(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i, - lookbehind: !0 - }, - punctuation: /[(){};:,]/ - }), - (Prism.languages.css.atrule.inside.rest = Prism.languages.css); - var markup = Prism.languages.markup; - markup && - (markup.tag.addInlined('style', 'css'), - markup.tag.addAttribute('style', 'css')); - })(Prism); - } - (module.exports = css), (css.displayName = 'css'), (css.aliases = []); - }, - 1667: function(module, exports, __webpack_require__) { - 'use strict'; - function jsx(Prism) { - !(function(Prism) { - var javascript = Prism.util.clone(Prism.languages.javascript), - space = /(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source, - braces = /(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source, - spread = /(?:\{*\.{3}(?:[^{}]|)*\})/.source; - function re(source, flags) { - return ( - (source = source - .replace(//g, function() { - return space; - }) - .replace(//g, function() { - return braces; - }) - .replace(//g, function() { - return spread; - })), - RegExp(source, flags) - ); - } - (spread = re(spread).source), - (Prism.languages.jsx = Prism.languages.extend( - 'markup', - javascript - )), - (Prism.languages.jsx.tag.pattern = re( - /<\/?(?:[\w.:-]+(?:+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|))?|))**\/?)?>/ - .source - )), - (Prism.languages.jsx.tag.inside.tag.pattern = /^<\/?[^\s>\/]*/i), - (Prism.languages.jsx.tag.inside[ - 'attr-value' - ].pattern = /=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/i), - (Prism.languages.jsx.tag.inside.tag.inside[ - 'class-name' - ] = /^[A-Z]\w*(?:\.[A-Z]\w*)*$/), - (Prism.languages.jsx.tag.inside.comment = javascript.comment), - Prism.languages.insertBefore( - 'inside', - 'attr-name', - { - spread: { - pattern: re(//.source), - inside: Prism.languages.jsx - } - }, - Prism.languages.jsx.tag - ), - Prism.languages.insertBefore( - 'inside', - 'special-attr', - { - script: { - pattern: re(/=/.source), - inside: { - 'script-punctuation': { - pattern: /^=(?=\{)/, - alias: 'punctuation' - }, - rest: Prism.languages.jsx - }, - alias: 'language-javascript' - } - }, - Prism.languages.jsx.tag - ); - var stringifyToken = function(token) { - return token - ? 'string' == typeof token - ? token - : 'string' == typeof token.content - ? token.content - : token.content.map(stringifyToken).join('') - : ''; - }, - walkTokens = function(tokens) { - for (var openedTags = [], i = 0; i < tokens.length; i++) { - var token = tokens[i], - notTagNorBrace = !1; - if ( - ('string' != typeof token && - ('tag' === token.type && - token.content[0] && - 'tag' === token.content[0].type - ? ' 0 && - openedTags[openedTags.length - 1].tagName === - stringifyToken(token.content[0].content[1]) && - openedTags.pop() - : '/>' === - token.content[token.content.length - 1].content || - openedTags.push({ - tagName: stringifyToken( - token.content[0].content[1] - ), - openedBraces: 0 - }) - : openedTags.length > 0 && - 'punctuation' === token.type && - '{' === token.content - ? openedTags[openedTags.length - 1].openedBraces++ - : openedTags.length > 0 && - openedTags[openedTags.length - 1].openedBraces > 0 && - 'punctuation' === token.type && - '}' === token.content - ? openedTags[openedTags.length - 1].openedBraces-- - : (notTagNorBrace = !0)), - (notTagNorBrace || 'string' == typeof token) && - openedTags.length > 0 && - 0 === openedTags[openedTags.length - 1].openedBraces) - ) { - var plainText = stringifyToken(token); - i < tokens.length - 1 && - ('string' == typeof tokens[i + 1] || - 'plain-text' === tokens[i + 1].type) && - ((plainText += stringifyToken(tokens[i + 1])), - tokens.splice(i + 1, 1)), - i > 0 && - ('string' == typeof tokens[i - 1] || - 'plain-text' === tokens[i - 1].type) && - ((plainText = stringifyToken(tokens[i - 1]) + plainText), - tokens.splice(i - 1, 1), - i--), - (tokens[i] = new Prism.Token( - 'plain-text', - plainText, - null, - plainText - )); - } - token.content && - 'string' != typeof token.content && - walkTokens(token.content); - } - }; - Prism.hooks.add('after-tokenize', function(env) { - ('jsx' !== env.language && 'tsx' !== env.language) || - walkTokens(env.tokens); - }); - })(Prism); - } - (module.exports = jsx), (jsx.displayName = 'jsx'), (jsx.aliases = []); - }, - 1668: function(module, exports, __webpack_require__) { - 'use strict'; - function typescript(Prism) { - !(function(Prism) { - (Prism.languages.typescript = Prism.languages.extend('javascript', { - 'class-name': { - pattern: /(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/, - lookbehind: !0, - greedy: !0, - inside: null - }, - builtin: /\b(?:string|Function|any|number|boolean|Array|symbol|console|Promise|unknown|never)\b/ - })), - Prism.languages.typescript.keyword.push( - /\b(?:abstract|as|declare|implements|is|keyof|readonly|require)\b/, - /\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/, - /\btype\b(?=\s*(?:[\{*]|$))/ - ), - delete Prism.languages.typescript.parameter; - var typeInside = Prism.languages.extend('typescript', {}); - delete typeInside['class-name'], - (Prism.languages.typescript['class-name'].inside = typeInside), - Prism.languages.insertBefore('typescript', 'function', { - decorator: { - pattern: /@[$\w\xA0-\uFFFF]+/, - inside: { - at: { pattern: /^@/, alias: 'operator' }, - function: /^[\s\S]+/ - } - }, - 'generic-function': { - pattern: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/, - greedy: !0, - inside: { - function: /^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/, - generic: { - pattern: /<[\s\S]+/, - alias: 'class-name', - inside: typeInside - } - } - } - }), - (Prism.languages.ts = Prism.languages.typescript); - })(Prism); - } - (module.exports = typescript), - (typescript.displayName = 'typescript'), - (typescript.aliases = ['ts']); - }, - 1673: function(module, exports, __webpack_require__) { - 'use strict'; - (function(global) { - var ctx = - 'object' == typeof globalThis - ? globalThis - : 'object' == typeof self - ? self - : 'object' == typeof window - ? window - : 'object' == typeof global - ? global - : {}, - restore = (function capture() { - var defined = 'Prism' in ctx, - current = defined ? ctx.Prism : void 0; - return function restore() { - defined ? (ctx.Prism = current) : delete ctx.Prism; - (defined = void 0), (current = void 0); - }; - })(); - ctx.Prism = { manual: !0, disableWorkerMessageHandler: !0 }; - var h = __webpack_require__(1674), - decode = __webpack_require__(1690), - Prism = __webpack_require__(1457), - markup = __webpack_require__(1665), - css = __webpack_require__(1666), - clike = __webpack_require__(1698), - js = __webpack_require__(1699); - restore(); - var own = {}.hasOwnProperty; - function Refractor() {} - Refractor.prototype = Prism; - var refract = new Refractor(); - function register(grammar) { - if ('function' != typeof grammar || !grammar.displayName) - throw new Error( - 'Expected `function` for `grammar`, got `' + grammar + '`' - ); - void 0 === refract.languages[grammar.displayName] && grammar(refract); - } - (module.exports = refract), - (refract.highlight = function highlight(value, name) { - var grammar, - sup = Prism.highlight; - if ('string' != typeof value) - throw new Error( - 'Expected `string` for `value`, got `' + value + '`' - ); - if ('Object' === refract.util.type(name)) - (grammar = name), (name = null); - else { - if ('string' != typeof name) - throw new Error( - 'Expected `string` for `name`, got `' + name + '`' - ); - if (!own.call(refract.languages, name)) - throw new Error( - 'Unknown language: `' + name + '` is not registered' - ); - grammar = refract.languages[name]; - } - return sup.call(this, value, grammar, name); - }), - (refract.register = register), - (refract.alias = function alias(name, alias) { - var key, - list, - length, - index, - languages = refract.languages, - map = name; - alias && ((map = {})[name] = alias); - for (key in map) - for ( - list = map[key], - length = (list = 'string' == typeof list ? [list] : list) - .length, - index = -1; - ++index < length; - - ) - languages[list[index]] = languages[key]; - }), - (refract.registered = function registered(language) { - if ('string' != typeof language) - throw new Error( - 'Expected `string` for `language`, got `' + language + '`' - ); - return own.call(refract.languages, language); - }), - (refract.listLanguages = function listLanguages() { - var language, - languages = refract.languages, - list = []; - for (language in languages) - own.call(languages, language) && - 'object' == typeof languages[language] && - list.push(language); - return list; - }), - register(markup), - register(css), - register(clike), - register(js), - (refract.util.encode = function encode(tokens) { - return tokens; - }), - (refract.Token.stringify = function stringify( - value, - language, - parent - ) { - var env; - if ('string' == typeof value) return { type: 'text', value: value }; - if ('Array' === refract.util.type(value)) - return (function stringifyAll(values, language) { - var value, - result = [], - length = values.length, - index = -1; - for (; ++index < length; ) - '' !== (value = values[index]) && - null != value && - result.push(value); - (index = -1), (length = result.length); - for (; ++index < length; ) - (value = result[index]), - (result[index] = refract.Token.stringify( - value, - language, - result - )); - return result; - })(value, language); - (env = { - type: value.type, - content: refract.Token.stringify(value.content, language, parent), - tag: 'span', - classes: ['token', value.type], - attributes: {}, - language: language, - parent: parent - }), - value.alias && (env.classes = env.classes.concat(value.alias)); - return ( - refract.hooks.run('wrap', env), - h( - env.tag + '.' + env.classes.join('.'), - (function attributes(attrs) { - var key; - for (key in attrs) attrs[key] = decode(attrs[key]); - return attrs; - })(env.attributes), - env.content - ) - ); - }); - }.call(this, __webpack_require__(89))); - }, - 1674: function(module, exports, __webpack_require__) { - 'use strict'; - module.exports = __webpack_require__(1675); - }, - 1675: function(module, exports, __webpack_require__) { - 'use strict'; - var schema = __webpack_require__(1676), - html = __webpack_require__(1685)(schema, 'div'); - (html.displayName = 'html'), (module.exports = html); - }, - 1676: function(module, exports, __webpack_require__) { - 'use strict'; - var merge = __webpack_require__(1677), - xlink = __webpack_require__(1679), - xml = __webpack_require__(1680), - xmlns = __webpack_require__(1681), - aria = __webpack_require__(1683), - html = __webpack_require__(1684); - module.exports = merge([xml, xlink, xmlns, aria, html]); - }, - 1677: function(module, exports, __webpack_require__) { - 'use strict'; - var xtend = __webpack_require__(1678), - Schema = __webpack_require__(1660); - module.exports = function merge(definitions) { - var info, - space, - length = definitions.length, - property = [], - normal = [], - index = -1; - for (; ++index < length; ) - (info = definitions[index]), - property.push(info.property), - normal.push(info.normal), - (space = info.space); - return new Schema( - xtend.apply(null, property), - xtend.apply(null, normal), - space - ); - }; - }, - 1678: function(module, exports) { - module.exports = function extend() { - for (var target = {}, i = 0; i < arguments.length; i++) { - var source = arguments[i]; - for (var key in source) - hasOwnProperty.call(source, key) && (target[key] = source[key]); - } - return target; - }; - var hasOwnProperty = Object.prototype.hasOwnProperty; - }, - 1679: function(module, exports, __webpack_require__) { - 'use strict'; - var create = __webpack_require__(1657); - module.exports = create({ - space: 'xlink', - transform: function xlinkTransform(_, prop) { - return 'xlink:' + prop.slice(5).toLowerCase(); - }, - properties: { - xLinkActuate: null, - xLinkArcRole: null, - xLinkHref: null, - xLinkRole: null, - xLinkShow: null, - xLinkTitle: null, - xLinkType: null - } - }); - }, - 1680: function(module, exports, __webpack_require__) { - 'use strict'; - var create = __webpack_require__(1657); - module.exports = create({ - space: 'xml', - transform: function xmlTransform(_, prop) { - return 'xml:' + prop.slice(3).toLowerCase(); - }, - properties: { xmlLang: null, xmlBase: null, xmlSpace: null } - }); - }, - 1681: function(module, exports, __webpack_require__) { - 'use strict'; - var create = __webpack_require__(1657), - caseInsensitiveTransform = __webpack_require__(1663); - module.exports = create({ - space: 'xmlns', - attributes: { xmlnsxlink: 'xmlns:xlink' }, - transform: caseInsensitiveTransform, - properties: { xmlns: null, xmlnsXLink: null } - }); - }, - 1682: function(module, exports, __webpack_require__) { - 'use strict'; - module.exports = function caseSensitiveTransform(attributes, attribute) { - return attribute in attributes ? attributes[attribute] : attribute; - }; - }, - 1683: function(module, exports, __webpack_require__) { - 'use strict'; - var types = __webpack_require__(1659), - create = __webpack_require__(1657), - booleanish = types.booleanish, - number = types.number, - spaceSeparated = types.spaceSeparated; - module.exports = create({ - transform: function ariaTransform(_, prop) { - return 'role' === prop ? prop : 'aria-' + prop.slice(4).toLowerCase(); - }, - properties: { - ariaActiveDescendant: null, - ariaAtomic: booleanish, - ariaAutoComplete: null, - ariaBusy: booleanish, - ariaChecked: booleanish, - ariaColCount: number, - ariaColIndex: number, - ariaColSpan: number, - ariaControls: spaceSeparated, - ariaCurrent: null, - ariaDescribedBy: spaceSeparated, - ariaDetails: null, - ariaDisabled: booleanish, - ariaDropEffect: spaceSeparated, - ariaErrorMessage: null, - ariaExpanded: booleanish, - ariaFlowTo: spaceSeparated, - ariaGrabbed: booleanish, - ariaHasPopup: null, - ariaHidden: booleanish, - ariaInvalid: null, - ariaKeyShortcuts: null, - ariaLabel: null, - ariaLabelledBy: spaceSeparated, - ariaLevel: number, - ariaLive: null, - ariaModal: booleanish, - ariaMultiLine: booleanish, - ariaMultiSelectable: booleanish, - ariaOrientation: null, - ariaOwns: spaceSeparated, - ariaPlaceholder: null, - ariaPosInSet: number, - ariaPressed: booleanish, - ariaReadOnly: booleanish, - ariaRelevant: null, - ariaRequired: booleanish, - ariaRoleDescription: spaceSeparated, - ariaRowCount: number, - ariaRowIndex: number, - ariaRowSpan: number, - ariaSelected: booleanish, - ariaSetSize: number, - ariaSort: null, - ariaValueMax: number, - ariaValueMin: number, - ariaValueNow: number, - ariaValueText: null, - role: null - } - }); - }, - 1684: function(module, exports, __webpack_require__) { - 'use strict'; - var types = __webpack_require__(1659), - create = __webpack_require__(1657), - caseInsensitiveTransform = __webpack_require__(1663), - boolean = types.boolean, - overloadedBoolean = types.overloadedBoolean, - booleanish = types.booleanish, - number = types.number, - spaceSeparated = types.spaceSeparated, - commaSeparated = types.commaSeparated; - module.exports = create({ - space: 'html', - attributes: { - acceptcharset: 'accept-charset', - classname: 'class', - htmlfor: 'for', - httpequiv: 'http-equiv' - }, - transform: caseInsensitiveTransform, - mustUseProperty: ['checked', 'multiple', 'muted', 'selected'], - properties: { - abbr: null, - accept: commaSeparated, - acceptCharset: spaceSeparated, - accessKey: spaceSeparated, - action: null, - allow: null, - allowFullScreen: boolean, - allowPaymentRequest: boolean, - allowUserMedia: boolean, - alt: null, - as: null, - async: boolean, - autoCapitalize: null, - autoComplete: spaceSeparated, - autoFocus: boolean, - autoPlay: boolean, - capture: boolean, - charSet: null, - checked: boolean, - cite: null, - className: spaceSeparated, - cols: number, - colSpan: null, - content: null, - contentEditable: booleanish, - controls: boolean, - controlsList: spaceSeparated, - coords: number | commaSeparated, - crossOrigin: null, - data: null, - dateTime: null, - decoding: null, - default: boolean, - defer: boolean, - dir: null, - dirName: null, - disabled: boolean, - download: overloadedBoolean, - draggable: booleanish, - encType: null, - enterKeyHint: null, - form: null, - formAction: null, - formEncType: null, - formMethod: null, - formNoValidate: boolean, - formTarget: null, - headers: spaceSeparated, - height: number, - hidden: boolean, - high: number, - href: null, - hrefLang: null, - htmlFor: spaceSeparated, - httpEquiv: spaceSeparated, - id: null, - imageSizes: null, - imageSrcSet: commaSeparated, - inputMode: null, - integrity: null, - is: null, - isMap: boolean, - itemId: null, - itemProp: spaceSeparated, - itemRef: spaceSeparated, - itemScope: boolean, - itemType: spaceSeparated, - kind: null, - label: null, - lang: null, - language: null, - list: null, - loading: null, - loop: boolean, - low: number, - manifest: null, - max: null, - maxLength: number, - media: null, - method: null, - min: null, - minLength: number, - multiple: boolean, - muted: boolean, - name: null, - nonce: null, - noModule: boolean, - noValidate: boolean, - onAbort: null, - onAfterPrint: null, - onAuxClick: null, - onBeforePrint: null, - onBeforeUnload: null, - onBlur: null, - onCancel: null, - onCanPlay: null, - onCanPlayThrough: null, - onChange: null, - onClick: null, - onClose: null, - onContextMenu: null, - onCopy: null, - onCueChange: null, - onCut: null, - onDblClick: null, - onDrag: null, - onDragEnd: null, - onDragEnter: null, - onDragExit: null, - onDragLeave: null, - onDragOver: null, - onDragStart: null, - onDrop: null, - onDurationChange: null, - onEmptied: null, - onEnded: null, - onError: null, - onFocus: null, - onFormData: null, - onHashChange: null, - onInput: null, - onInvalid: null, - onKeyDown: null, - onKeyPress: null, - onKeyUp: null, - onLanguageChange: null, - onLoad: null, - onLoadedData: null, - onLoadedMetadata: null, - onLoadEnd: null, - onLoadStart: null, - onMessage: null, - onMessageError: null, - onMouseDown: null, - onMouseEnter: null, - onMouseLeave: null, - onMouseMove: null, - onMouseOut: null, - onMouseOver: null, - onMouseUp: null, - onOffline: null, - onOnline: null, - onPageHide: null, - onPageShow: null, - onPaste: null, - onPause: null, - onPlay: null, - onPlaying: null, - onPopState: null, - onProgress: null, - onRateChange: null, - onRejectionHandled: null, - onReset: null, - onResize: null, - onScroll: null, - onSecurityPolicyViolation: null, - onSeeked: null, - onSeeking: null, - onSelect: null, - onSlotChange: null, - onStalled: null, - onStorage: null, - onSubmit: null, - onSuspend: null, - onTimeUpdate: null, - onToggle: null, - onUnhandledRejection: null, - onUnload: null, - onVolumeChange: null, - onWaiting: null, - onWheel: null, - open: boolean, - optimum: number, - pattern: null, - ping: spaceSeparated, - placeholder: null, - playsInline: boolean, - poster: null, - preload: null, - readOnly: boolean, - referrerPolicy: null, - rel: spaceSeparated, - required: boolean, - reversed: boolean, - rows: number, - rowSpan: number, - sandbox: spaceSeparated, - scope: null, - scoped: boolean, - seamless: boolean, - selected: boolean, - shape: null, - size: number, - sizes: null, - slot: null, - span: number, - spellCheck: booleanish, - src: null, - srcDoc: null, - srcLang: null, - srcSet: commaSeparated, - start: number, - step: null, - style: null, - tabIndex: number, - target: null, - title: null, - translate: null, - type: null, - typeMustMatch: boolean, - useMap: null, - value: booleanish, - width: number, - wrap: null, - align: null, - aLink: null, - archive: spaceSeparated, - axis: null, - background: null, - bgColor: null, - border: number, - borderColor: null, - bottomMargin: number, - cellPadding: null, - cellSpacing: null, - char: null, - charOff: null, - classId: null, - clear: null, - code: null, - codeBase: null, - codeType: null, - color: null, - compact: boolean, - declare: boolean, - event: null, - face: null, - frame: null, - frameBorder: null, - hSpace: number, - leftMargin: number, - link: null, - longDesc: null, - lowSrc: null, - marginHeight: number, - marginWidth: number, - noResize: boolean, - noHref: boolean, - noShade: boolean, - noWrap: boolean, - object: null, - profile: null, - prompt: null, - rev: null, - rightMargin: number, - rules: null, - scheme: null, - scrolling: booleanish, - standby: null, - summary: null, - text: null, - topMargin: number, - valueType: null, - version: null, - vAlign: null, - vLink: null, - vSpace: number, - allowTransparency: null, - autoCorrect: null, - autoSave: null, - disablePictureInPicture: boolean, - disableRemotePlayback: boolean, - prefix: null, - property: null, - results: number, - security: null, - unselectable: null - } - }); - }, - 1685: function(module, exports, __webpack_require__) { - 'use strict'; - var find = __webpack_require__(1686), - normalize = __webpack_require__(1658), - parseSelector = __webpack_require__(1687), - spaces = __webpack_require__(1688).parse, - commas = __webpack_require__(1689).parse; - module.exports = function factory(schema, defaultTagName, caseSensitive) { - var adjust = caseSensitive - ? (function createAdjustMap(values) { - var value, - length = values.length, - index = -1, - result = {}; - for (; ++index < length; ) - result[(value = values[index]).toLowerCase()] = value; - return result; - })(caseSensitive) - : null; - return function h(selector, properties) { - var property, - node = parseSelector(selector, defaultTagName), - children = Array.prototype.slice.call(arguments, 2), - name = node.tagName.toLowerCase(); - (node.tagName = - adjust && own.call(adjust, name) ? adjust[name] : name), - properties && - isChildren(properties, node) && - (children.unshift(properties), (properties = null)); - if (properties) - for (property in properties) - addProperty(node.properties, property, properties[property]); - addChild(node.children, children), - 'template' === node.tagName && - ((node.content = { type: 'root', children: node.children }), - (node.children = [])); - return node; - }; - function addProperty(properties, key, value) { - var info, property, result; - null != value && - value == value && - ((property = (info = find(schema, key)).property), - 'string' == typeof (result = value) && - (info.spaceSeparated - ? (result = spaces(result)) - : info.commaSeparated - ? (result = commas(result)) - : info.commaOrSpaceSeparated && - (result = spaces(commas(result).join(' ')))), - 'style' === property && - 'string' != typeof value && - (result = (function style(value) { - var key, - result = []; - for (key in value) result.push([key, value[key]].join(': ')); - return result.join('; '); - })(result)), - 'className' === property && - properties.className && - (result = properties.className.concat(result)), - (properties[property] = (function parsePrimitives( - info, - name, - value - ) { - var index, length, result; - if ('object' != typeof value || !('length' in value)) - return parsePrimitive(info, name, value); - (length = value.length), (index = -1), (result = []); - for (; ++index < length; ) - result[index] = parsePrimitive(info, name, value[index]); - return result; - })(info, property, result))); - } - }; - var own = {}.hasOwnProperty; - function isChildren(value, node) { - return ( - 'string' == typeof value || - 'length' in value || - (function isNode(tagName, value) { - var type = value.type; - if ('input' === tagName || !type || 'string' != typeof type) - return !1; - if ('object' == typeof value.children && 'length' in value.children) - return !0; - if (((type = type.toLowerCase()), 'button' === tagName)) - return ( - 'menu' !== type && - 'submit' !== type && - 'reset' !== type && - 'button' !== type - ); - return 'value' in value; - })(node.tagName, value) - ); - } - function addChild(nodes, value) { - var index, length; - if ('string' != typeof value && 'number' != typeof value) - if ('object' == typeof value && 'length' in value) - for (index = -1, length = value.length; ++index < length; ) - addChild(nodes, value[index]); - else { - if ('object' != typeof value || !('type' in value)) - throw new Error( - 'Expected node, nodes, or string, got `' + value + '`' - ); - nodes.push(value); - } - else nodes.push({ type: 'text', value: String(value) }); - } - function parsePrimitive(info, name, value) { - var result = value; - return ( - info.number || info.positiveNumber - ? isNaN(result) || '' === result || (result = Number(result)) - : (info.boolean || info.overloadedBoolean) && - ('string' != typeof result || - ('' !== result && normalize(value) !== normalize(name)) || - (result = !0)), - result - ); - } - }, - 1686: function(module, exports, __webpack_require__) { - 'use strict'; - var normalize = __webpack_require__(1658), - DefinedInfo = __webpack_require__(1661), - Info = __webpack_require__(1662); - module.exports = function find(schema, value) { - var normal = normalize(value), - prop = value, - Type = Info; - if (normal in schema.normal) - return schema.property[schema.normal[normal]]; - normal.length > 4 && - 'data' === normal.slice(0, 4) && - valid.test(value) && - ('-' === value.charAt(4) - ? (prop = (function datasetToProperty(attribute) { - var value = attribute.slice(5).replace(dash, camelcase); - return 'data' + value.charAt(0).toUpperCase() + value.slice(1); - })(value)) - : (value = (function datasetToAttribute(property) { - var value = property.slice(4); - if (dash.test(value)) return property; - '-' !== (value = value.replace(cap, kebab)).charAt(0) && - (value = '-' + value); - return 'data' + value; - })(value)), - (Type = DefinedInfo)); - return new Type(prop, value); - }; - var valid = /^data[-\w.:]+$/i, - dash = /-[a-z]/g, - cap = /[A-Z]/g; - function kebab($0) { - return '-' + $0.toLowerCase(); - } - function camelcase($0) { - return $0.charAt(1).toUpperCase(); - } - }, - 1687: function(module, exports, __webpack_require__) { - 'use strict'; - module.exports = function parse(selector, defaultTagName) { - var subvalue, - previous, - match, - value = selector || '', - name = defaultTagName || 'div', - props = {}, - start = 0; - for (; start < value.length; ) - (search.lastIndex = start), - (match = search.exec(value)), - (subvalue = value.slice( - start, - match ? match.index : value.length - )) && - (previous - ? '#' === previous - ? (props.id = subvalue) - : props.className - ? props.className.push(subvalue) - : (props.className = [subvalue]) - : (name = subvalue), - (start += subvalue.length)), - match && ((previous = match[0]), start++); - return { - type: 'element', - tagName: name, - properties: props, - children: [] - }; - }; - var search = /[#.]/g; - }, - 1688: function(module, exports, __webpack_require__) { - 'use strict'; - (exports.parse = function parse(value) { - var input = String(value || '').trim(); - return '' === input ? [] : input.split(whiteSpace); - }), - (exports.stringify = function stringify(values) { - return values.join(' ').trim(); - }); - var whiteSpace = /[ \t\n\r\f]+/g; - }, - 1689: function(module, exports, __webpack_require__) { - 'use strict'; - (exports.parse = function parse(value) { - var val, - values = [], - input = String(value || ''), - index = input.indexOf(','), - lastIndex = 0, - end = !1; - for (; !end; ) - -1 === index && ((index = input.length), (end = !0)), - (!(val = input.slice(lastIndex, index).trim()) && end) || - values.push(val), - (lastIndex = index + 1), - (index = input.indexOf(',', lastIndex)); - return values; - }), - (exports.stringify = function stringify(values, options) { - var settings = options || {}, - left = !1 === settings.padLeft ? '' : ' ', - right = settings.padRight ? ' ' : ''; - '' === values[values.length - 1] && (values = values.concat('')); - return values.join(right + ',' + left).trim(); - }); - }, - 1690: function(module, exports, __webpack_require__) { - 'use strict'; - var legacy = __webpack_require__(1691), - invalid = __webpack_require__(1692), - decimal = __webpack_require__(1664), - hexadecimal = __webpack_require__(1693), - alphanumerical = __webpack_require__(1694), - decodeEntity = __webpack_require__(1696); - module.exports = function parseEntities(value, options) { - var option, - key, - settings = {}; - options || (options = {}); - for (key in defaults) - (option = options[key]), - (settings[key] = null == option ? defaults[key] : option); - (settings.position.indent || settings.position.start) && - ((settings.indent = settings.position.indent || []), - (settings.position = settings.position.start)); - return (function parse(value, settings) { - var entityCharacters, - namedEntity, - terminated, - characters, - character, - reference, - following, - warning, - reason, - output, - entity, - begin, - start, - type, - test, - prev, - next, - diff, - end, - additional = settings.additional, - nonTerminated = settings.nonTerminated, - handleText = settings.text, - handleReference = settings.reference, - handleWarning = settings.warning, - textContext = settings.textContext, - referenceContext = settings.referenceContext, - warningContext = settings.warningContext, - pos = settings.position, - indent = settings.indent || [], - length = value.length, - index = 0, - lines = -1, - column = pos.column || 1, - line = pos.line || 1, - queue = '', - result = []; - 'string' == typeof additional && - (additional = additional.charCodeAt(0)); - (prev = now()), - (warning = handleWarning ? parseError : noop), - index--, - length++; - for (; ++index < length; ) - if ( - (10 === character && (column = indent[lines] || 1), - 38 === (character = value.charCodeAt(index))) - ) { - if ( - 9 === (following = value.charCodeAt(index + 1)) || - 10 === following || - 12 === following || - 32 === following || - 38 === following || - 60 === following || - following != following || - (additional && following === additional) - ) { - (queue += fromCharCode(character)), column++; - continue; - } - for ( - begin = start = index + 1, - end = start, - 35 === following - ? ((end = ++begin), - 88 === (following = value.charCodeAt(end)) || - 120 === following - ? ((type = hexa), (end = ++begin)) - : (type = deci)) - : (type = name), - entityCharacters = '', - entity = '', - characters = '', - test = tests[type], - end--; - ++end < length && test((following = value.charCodeAt(end))); - - ) - (characters += fromCharCode(following)), - type === name && - own.call(legacy, characters) && - ((entityCharacters = characters), - (entity = legacy[characters])); - (terminated = 59 === value.charCodeAt(end)) && - (end++, - (namedEntity = type === name && decodeEntity(characters)) && - ((entityCharacters = characters), (entity = namedEntity))), - (diff = 1 + end - start), - (terminated || nonTerminated) && - (characters - ? type === name - ? (terminated && !entity - ? warning(5, 1) - : (entityCharacters !== characters && - ((diff = - 1 + - (end = begin + entityCharacters.length) - - begin), - (terminated = !1)), - terminated || - ((reason = entityCharacters ? 1 : 3), - settings.attribute - ? 61 === (following = value.charCodeAt(end)) - ? (warning(reason, diff), (entity = null)) - : alphanumerical(following) - ? (entity = null) - : warning(reason, diff) - : warning(reason, diff))), - (reference = entity)) - : (terminated || warning(2, diff), - prohibited( - (reference = parseInt(characters, bases[type])) - ) - ? (warning(7, diff), - (reference = fromCharCode(65533))) - : reference in invalid - ? (warning(6, diff), - (reference = invalid[reference])) - : ((output = ''), - disallowed(reference) && warning(6, diff), - reference > 65535 && - ((output += fromCharCode( - ((reference -= 65536) >>> 10) | 55296 - )), - (reference = 56320 | (1023 & reference))), - (reference = output + fromCharCode(reference)))) - : type !== name && warning(4, diff)), - reference - ? (flush(), - (prev = now()), - (index = end - 1), - (column += end - start + 1), - result.push(reference), - (next = now()).offset++, - handleReference && - handleReference.call( - referenceContext, - reference, - { start: prev, end: next }, - value.slice(start - 1, end) - ), - (prev = next)) - : ((characters = value.slice(start - 1, end)), - (queue += characters), - (column += characters.length), - (index = end - 1)); - } else - 10 === character && (line++, lines++, (column = 0)), - character == character - ? ((queue += fromCharCode(character)), column++) - : flush(); - return result.join(''); - function now() { - return { - line: line, - column: column, - offset: index + (pos.offset || 0) - }; - } - function parseError(code, offset) { - var position = now(); - (position.column += offset), - (position.offset += offset), - handleWarning.call( - warningContext, - messages[code], - position, - code - ); - } - function flush() { - queue && - (result.push(queue), - handleText && - handleText.call(textContext, queue, { - start: prev, - end: now() - }), - (queue = '')); - } - })(value, settings); - }; - var own = {}.hasOwnProperty, - fromCharCode = String.fromCharCode, - noop = Function.prototype, - defaults = { - warning: null, - reference: null, - text: null, - warningContext: null, - referenceContext: null, - textContext: null, - position: {}, - additional: null, - attribute: !1, - nonTerminated: !0 - }, - name = 'named', - hexa = 'hexadecimal', - deci = 'decimal', - bases = { hexadecimal: 16, decimal: 10 }, - tests = {}; - (tests.named = alphanumerical), - (tests[deci] = decimal), - (tests[hexa] = hexadecimal); - var messages = {}; - function prohibited(code) { - return (code >= 55296 && code <= 57343) || code > 1114111; - } - function disallowed(code) { - return ( - (code >= 1 && code <= 8) || - 11 === code || - (code >= 13 && code <= 31) || - (code >= 127 && code <= 159) || - (code >= 64976 && code <= 65007) || - 65535 == (65535 & code) || - 65534 == (65535 & code) - ); - } - (messages[1] = - 'Named character references must be terminated by a semicolon'), - (messages[2] = - 'Numeric character references must be terminated by a semicolon'), - (messages[3] = 'Named character references cannot be empty'), - (messages[4] = 'Numeric character references cannot be empty'), - (messages[5] = 'Named character references must be known'), - (messages[6] = 'Numeric character references cannot be disallowed'), - (messages[7] = - 'Numeric character references cannot be outside the permissible Unicode range'); - }, - 1691: function(module) { - module.exports = JSON.parse( - '{"AElig":"Æ","AMP":"&","Aacute":"Á","Acirc":"Â","Agrave":"À","Aring":"Å","Atilde":"Ã","Auml":"Ä","COPY":"©","Ccedil":"Ç","ETH":"Ð","Eacute":"É","Ecirc":"Ê","Egrave":"È","Euml":"Ë","GT":">","Iacute":"Í","Icirc":"Î","Igrave":"Ì","Iuml":"Ï","LT":"<","Ntilde":"Ñ","Oacute":"Ó","Ocirc":"Ô","Ograve":"Ò","Oslash":"Ø","Otilde":"Õ","Ouml":"Ö","QUOT":"\\"","REG":"®","THORN":"Þ","Uacute":"Ú","Ucirc":"Û","Ugrave":"Ù","Uuml":"Ü","Yacute":"Ý","aacute":"á","acirc":"â","acute":"´","aelig":"æ","agrave":"à","amp":"&","aring":"å","atilde":"ã","auml":"ä","brvbar":"¦","ccedil":"ç","cedil":"¸","cent":"¢","copy":"©","curren":"¤","deg":"°","divide":"÷","eacute":"é","ecirc":"ê","egrave":"è","eth":"ð","euml":"ë","frac12":"½","frac14":"¼","frac34":"¾","gt":">","iacute":"í","icirc":"î","iexcl":"¡","igrave":"ì","iquest":"¿","iuml":"ï","laquo":"«","lt":"<","macr":"¯","micro":"µ","middot":"·","nbsp":" ","not":"¬","ntilde":"ñ","oacute":"ó","ocirc":"ô","ograve":"ò","ordf":"ª","ordm":"º","oslash":"ø","otilde":"õ","ouml":"ö","para":"¶","plusmn":"±","pound":"£","quot":"\\"","raquo":"»","reg":"®","sect":"§","shy":"­","sup1":"¹","sup2":"²","sup3":"³","szlig":"ß","thorn":"þ","times":"×","uacute":"ú","ucirc":"û","ugrave":"ù","uml":"¨","uuml":"ü","yacute":"ý","yen":"¥","yuml":"ÿ"}' - ); - }, - 1692: function(module) { - module.exports = JSON.parse( - '{"0":"�","128":"€","130":"‚","131":"ƒ","132":"„","133":"…","134":"†","135":"‡","136":"ˆ","137":"‰","138":"Š","139":"‹","140":"Œ","142":"Ž","145":"‘","146":"’","147":"“","148":"”","149":"•","150":"–","151":"—","152":"˜","153":"™","154":"š","155":"›","156":"œ","158":"ž","159":"Ÿ"}' - ); - }, - 1693: function(module, exports, __webpack_require__) { - 'use strict'; - module.exports = function hexadecimal(character) { - var code = - 'string' == typeof character ? character.charCodeAt(0) : character; - return ( - (code >= 97 && code <= 102) || - (code >= 65 && code <= 70) || - (code >= 48 && code <= 57) - ); - }; - }, - 1694: function(module, exports, __webpack_require__) { - 'use strict'; - var alphabetical = __webpack_require__(1695), - decimal = __webpack_require__(1664); - module.exports = function alphanumerical(character) { - return alphabetical(character) || decimal(character); - }; - }, - 1695: function(module, exports, __webpack_require__) { - 'use strict'; - module.exports = function alphabetical(character) { - var code = - 'string' == typeof character ? character.charCodeAt(0) : character; - return (code >= 97 && code <= 122) || (code >= 65 && code <= 90); - }; - }, - 1696: function(module, exports, __webpack_require__) { - 'use strict'; - var el; - module.exports = function decodeEntity(characters) { - var char, - entity = '&' + characters + ';'; - if ( - (((el = el || document.createElement('i')).innerHTML = entity), - 59 === (char = el.textContent).charCodeAt(char.length - 1) && - 'semi' !== characters) - ) - return !1; - return char !== entity && char; - }; - }, - 1698: function(module, exports, __webpack_require__) { - 'use strict'; - function clike(Prism) { - Prism.languages.clike = { - comment: [ - { - pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/, - lookbehind: !0, - greedy: !0 - }, - { pattern: /(^|[^\\:])\/\/.*/, lookbehind: !0, greedy: !0 } - ], - string: { - pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/, - greedy: !0 - }, - 'class-name': { - pattern: /(\b(?:class|interface|extends|implements|trait|instanceof|new)\s+|\bcatch\s+\()[\w.\\]+/i, - lookbehind: !0, - inside: { punctuation: /[.\\]/ } - }, - keyword: /\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/, - boolean: /\b(?:true|false)\b/, - function: /\b\w+(?=\()/, - number: /\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i, - operator: /[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/, - punctuation: /[{}[\];(),.:]/ - }; - } - (module.exports = clike), - (clike.displayName = 'clike'), - (clike.aliases = []); - }, - 1699: function(module, exports, __webpack_require__) { - 'use strict'; - function javascript(Prism) { - (Prism.languages.javascript = Prism.languages.extend('clike', { - 'class-name': [ - Prism.languages.clike['class-name'], - { - pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:prototype|constructor))/, - lookbehind: !0 - } - ], - keyword: [ - { pattern: /((?:^|\})\s*)catch\b/, lookbehind: !0 }, - { - pattern: /(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/, - lookbehind: !0 - } - ], - function: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/, - number: /\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/, - operator: /--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/ - })), - (Prism.languages.javascript[ - 'class-name' - ][0].pattern = /(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/), - Prism.languages.insertBefore('javascript', 'keyword', { - regex: { - pattern: /((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/, - lookbehind: !0, - greedy: !0, - inside: { - 'regex-source': { - pattern: /^(\/)[\s\S]+(?=\/[a-z]*$)/, - lookbehind: !0, - alias: 'language-regex', - inside: Prism.languages.regex - }, - 'regex-delimiter': /^\/|\/$/, - 'regex-flags': /^[a-z]+$/ - } - }, - 'function-variable': { - pattern: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/, - alias: 'function' - }, - parameter: [ - { - pattern: /(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/, - lookbehind: !0, - inside: Prism.languages.javascript - }, - { - pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i, - lookbehind: !0, - inside: Prism.languages.javascript - }, - { - pattern: /(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/, - lookbehind: !0, - inside: Prism.languages.javascript - }, - { - pattern: /((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/, - lookbehind: !0, - inside: Prism.languages.javascript - } - ], - constant: /\b[A-Z](?:[A-Z_]|\dx?)*\b/ - }), - Prism.languages.insertBefore('javascript', 'string', { - hashbang: { pattern: /^#!.*/, greedy: !0, alias: 'comment' }, - 'template-string': { - pattern: /`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/, - greedy: !0, - inside: { - 'template-punctuation': { pattern: /^`|`$/, alias: 'string' }, - interpolation: { - pattern: /((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/, - lookbehind: !0, - inside: { - 'interpolation-punctuation': { - pattern: /^\$\{|\}$/, - alias: 'punctuation' - }, - rest: Prism.languages.javascript - } - }, - string: /[\s\S]+/ - } - } - }), - Prism.languages.markup && - (Prism.languages.markup.tag.addInlined('script', 'javascript'), - Prism.languages.markup.tag.addAttribute( - /on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/ - .source, - 'javascript' - )), - (Prism.languages.js = Prism.languages.javascript); - } - (module.exports = javascript), - (javascript.displayName = 'javascript'), - (javascript.aliases = ['js']); - }, - 1700: function(module, exports, __webpack_require__) { - var objectWithoutPropertiesLoose = __webpack_require__(1701); - (module.exports = function _objectWithoutProperties(source, excluded) { - if (null == source) return {}; - var key, - i, - target = objectWithoutPropertiesLoose(source, excluded); - if (Object.getOwnPropertySymbols) { - var sourceSymbolKeys = Object.getOwnPropertySymbols(source); - for (i = 0; i < sourceSymbolKeys.length; i++) - (key = sourceSymbolKeys[i]), - excluded.indexOf(key) >= 0 || - (Object.prototype.propertyIsEnumerable.call(source, key) && - (target[key] = source[key])); - } - return target; - }), - (module.exports.default = module.exports), - (module.exports.__esModule = !0); - }, - 1701: function(module, exports) { - (module.exports = function _objectWithoutPropertiesLoose( - source, - excluded - ) { - if (null == source) return {}; - var key, - i, - target = {}, - sourceKeys = Object.keys(source); - for (i = 0; i < sourceKeys.length; i++) - (key = sourceKeys[i]), - excluded.indexOf(key) >= 0 || (target[key] = source[key]); - return target; - }), - (module.exports.default = module.exports), - (module.exports.__esModule = !0); - }, - 1702: function(module, exports, __webpack_require__) { - 'use strict'; - function jsExtras(Prism) { - !(function(Prism) { - function withId(source, flags) { - return RegExp( - source.replace(//g, function() { - return /(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/ - .source; - }), - flags - ); - } - Prism.languages.insertBefore('javascript', 'function-variable', { - 'method-variable': { - pattern: RegExp( - '(\\.\\s*)' + - Prism.languages.javascript['function-variable'].pattern.source - ), - lookbehind: !0, - alias: [ - 'function-variable', - 'method', - 'function', - 'property-access' - ] - } - }), - Prism.languages.insertBefore('javascript', 'function', { - method: { - pattern: RegExp( - '(\\.\\s*)' + Prism.languages.javascript.function.source - ), - lookbehind: !0, - alias: ['function', 'property-access'] - } - }), - Prism.languages.insertBefore('javascript', 'constant', { - 'known-class-name': [ - { - pattern: /\b(?:(?:(?:Uint|Int)(?:8|16|32)|Uint8Clamped|Float(?:32|64))?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|(?:Weak)?(?:Set|Map)|WebAssembly)\b/, - alias: 'class-name' - }, - { pattern: /\b(?:[A-Z]\w*)Error\b/, alias: 'class-name' } - ] - }), - Prism.languages.insertBefore('javascript', 'keyword', { - imports: { - pattern: withId( - /(\bimport\b\s*)(?:(?:\s*,\s*(?:\*\s*as\s+|\{[^{}]*\}))?|\*\s*as\s+|\{[^{}]*\})(?=\s*\bfrom\b)/ - .source - ), - lookbehind: !0, - inside: Prism.languages.javascript - }, - exports: { - pattern: withId( - /(\bexport\b\s*)(?:\*(?:\s*as\s+)?(?=\s*\bfrom\b)|\{[^{}]*\})/ - .source - ), - lookbehind: !0, - inside: Prism.languages.javascript - } - }), - Prism.languages.javascript.keyword.unshift( - { - pattern: /\b(?:as|default|export|from|import)\b/, - alias: 'module' - }, - { - pattern: /\b(?:await|break|catch|continue|do|else|for|finally|if|return|switch|throw|try|while|yield)\b/, - alias: 'control-flow' - }, - { pattern: /\bnull\b/, alias: ['null', 'nil'] }, - { pattern: /\bundefined\b/, alias: 'nil' } - ), - Prism.languages.insertBefore('javascript', 'operator', { - spread: { pattern: /\.{3}/, alias: 'operator' }, - arrow: { pattern: /=>/, alias: 'operator' } - }), - Prism.languages.insertBefore('javascript', 'punctuation', { - 'property-access': { - pattern: withId(/(\.\s*)#?/.source), - lookbehind: !0 - }, - 'maybe-class-name': { - pattern: /(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/, - lookbehind: !0 - }, - dom: { - pattern: /\b(?:document|location|navigator|performance|(?:local|session)Storage|window)\b/, - alias: 'variable' - }, - console: { pattern: /\bconsole(?=\s*\.)/, alias: 'class-name' } - }); - for ( - var maybeClassNameTokens = [ - 'function', - 'function-variable', - 'method', - 'method-variable', - 'property-access' - ], - i = 0; - i < maybeClassNameTokens.length; - i++ - ) { - var token = maybeClassNameTokens[i], - value = Prism.languages.javascript[token]; - 'RegExp' === Prism.util.type(value) && - (value = Prism.languages.javascript[token] = { pattern: value }); - var inside = value.inside || {}; - (value.inside = inside), - (inside['maybe-class-name'] = /^[A-Z][\s\S]*/); - } - })(Prism); - } - (module.exports = jsExtras), - (jsExtras.displayName = 'jsExtras'), - (jsExtras.aliases = []); - }, - 1703: function(module, exports, __webpack_require__) { - 'use strict'; - function json(Prism) { - (Prism.languages.json = { - property: { - pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/, - lookbehind: !0, - greedy: !0 - }, - string: { - pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/, - lookbehind: !0, - greedy: !0 - }, - comment: { pattern: /\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/, greedy: !0 }, - number: /-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i, - punctuation: /[{}[\],]/, - operator: /:/, - boolean: /\b(?:true|false)\b/, - null: { pattern: /\bnull\b/, alias: 'keyword' } - }), - (Prism.languages.webmanifest = Prism.languages.json); - } - (module.exports = json), - (json.displayName = 'json'), - (json.aliases = ['webmanifest']); - }, - 1704: function(module, exports, __webpack_require__) { - 'use strict'; - function yaml(Prism) { - !(function(Prism) { - var anchorOrAlias = /[*&][^\s[\]{},]+/, - tag = /!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/, - properties = - '(?:' + - tag.source + - '(?:[ \t]+' + - anchorOrAlias.source + - ')?|' + - anchorOrAlias.source + - '(?:[ \t]+' + - tag.source + - ')?)', - plainKey = /(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-])(?:[ \t]*(?:(?![#:])|:))*/.source.replace( - //g, - function() { - return /[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/ - .source; - } - ), - string = /"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source; - function createValuePattern(value, flags) { - flags = (flags || '').replace(/m/g, '') + 'm'; - var pattern = /([:\-,[{]\s*(?:\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source - .replace(/<>/g, function() { - return properties; - }) - .replace(/<>/g, function() { - return value; - }); - return RegExp(pattern, flags); - } - (Prism.languages.yaml = { - scalar: { - pattern: RegExp( - /([\-:]\s*(?:\s<>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace( - /<>/g, - function() { - return properties; - } - ) - ), - lookbehind: !0, - alias: 'string' - }, - comment: /#.*/, - key: { - pattern: RegExp( - /((?:^|[:\-,[{\r\n?])[ \t]*(?:<>[ \t]+)?)<>(?=\s*:\s)/.source - .replace(/<>/g, function() { - return properties; - }) - .replace(/<>/g, function() { - return '(?:' + plainKey + '|' + string + ')'; - }) - ), - lookbehind: !0, - greedy: !0, - alias: 'atrule' - }, - directive: { - pattern: /(^[ \t]*)%.+/m, - lookbehind: !0, - alias: 'important' - }, - datetime: { - pattern: createValuePattern( - /\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/ - .source - ), - lookbehind: !0, - alias: 'number' - }, - boolean: { - pattern: createValuePattern(/true|false/.source, 'i'), - lookbehind: !0, - alias: 'important' - }, - null: { - pattern: createValuePattern(/null|~/.source, 'i'), - lookbehind: !0, - alias: 'important' - }, - string: { - pattern: createValuePattern(string), - lookbehind: !0, - greedy: !0 - }, - number: { - pattern: createValuePattern( - /[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/ - .source, - 'i' - ), - lookbehind: !0 - }, - tag: tag, - important: anchorOrAlias, - punctuation: /---|[:[\]{}\-,|>?]|\.\.\./ - }), - (Prism.languages.yml = Prism.languages.yaml); - })(Prism); - } - (module.exports = yaml), - (yaml.displayName = 'yaml'), - (yaml.aliases = ['yml']); - }, - 1705: function(module, exports, __webpack_require__) { - 'use strict'; - function markdown(Prism) { - !(function(Prism) { - var inner = /(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source; - function createInline(pattern) { - return ( - (pattern = pattern.replace(//g, function() { - return inner; - })), - RegExp(/((?:^|[^\\])(?:\\{2})*)/.source + '(?:' + pattern + ')') - ); - } - var tableCell = /(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/ - .source, - tableRow = /\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace( - /__/g, - function() { - return tableCell; - } - ), - tableLine = /\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/ - .source; - (Prism.languages.markdown = Prism.languages.extend('markup', {})), - Prism.languages.insertBefore('markdown', 'prolog', { - 'front-matter-block': { - pattern: /(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/, - lookbehind: !0, - greedy: !0, - inside: { - punctuation: /^---|---$/, - 'font-matter': { - pattern: /\S+(?:\s+\S+)*/, - alias: ['yaml', 'language-yaml'], - inside: Prism.languages.yaml - } - } - }, - blockquote: { pattern: /^>(?:[\t ]*>)*/m, alias: 'punctuation' }, - table: { - pattern: RegExp( - '^' + tableRow + tableLine + '(?:' + tableRow + ')*', - 'm' - ), - inside: { - 'table-data-rows': { - pattern: RegExp( - '^(' + tableRow + tableLine + ')(?:' + tableRow + ')*$' - ), - lookbehind: !0, - inside: { - 'table-data': { - pattern: RegExp(tableCell), - inside: Prism.languages.markdown - }, - punctuation: /\|/ - } - }, - 'table-line': { - pattern: RegExp('^(' + tableRow + ')' + tableLine + '$'), - lookbehind: !0, - inside: { punctuation: /\||:?-{3,}:?/ } - }, - 'table-header-row': { - pattern: RegExp('^' + tableRow + '$'), - inside: { - 'table-header': { - pattern: RegExp(tableCell), - alias: 'important', - inside: Prism.languages.markdown - }, - punctuation: /\|/ - } - } - } - }, - code: [ - { - pattern: /((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/, - lookbehind: !0, - alias: 'keyword' - }, - { - pattern: /^```[\s\S]*?^```$/m, - greedy: !0, - inside: { - 'code-block': { - pattern: /^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m, - lookbehind: !0 - }, - 'code-language': { pattern: /^(```).+/, lookbehind: !0 }, - punctuation: /```/ - } - } - ], - title: [ - { - pattern: /\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m, - alias: 'important', - inside: { punctuation: /==+$|--+$/ } - }, - { - pattern: /(^\s*)#.+/m, - lookbehind: !0, - alias: 'important', - inside: { punctuation: /^#+|#+$/ } - } - ], - hr: { - pattern: /(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m, - lookbehind: !0, - alias: 'punctuation' - }, - list: { - pattern: /(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m, - lookbehind: !0, - alias: 'punctuation' - }, - 'url-reference': { - pattern: /!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/, - inside: { - variable: { pattern: /^(!?\[)[^\]]+/, lookbehind: !0 }, - string: /(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/, - punctuation: /^[\[\]!:]|[<>]/ - }, - alias: 'url' - }, - bold: { - pattern: createInline( - /\b__(?:(?!_)|_(?:(?!_))+_)+__\b|\*\*(?:(?!\*)|\*(?:(?!\*))+\*)+\*\*/ - .source - ), - lookbehind: !0, - greedy: !0, - inside: { - content: { - pattern: /(^..)[\s\S]+(?=..$)/, - lookbehind: !0, - inside: {} - }, - punctuation: /\*\*|__/ - } - }, - italic: { - pattern: createInline( - /\b_(?:(?!_)|__(?:(?!_))+__)+_\b|\*(?:(?!\*)|\*\*(?:(?!\*))+\*\*)+\*/ - .source - ), - lookbehind: !0, - greedy: !0, - inside: { - content: { - pattern: /(^.)[\s\S]+(?=.$)/, - lookbehind: !0, - inside: {} - }, - punctuation: /[*_]/ - } - }, - strike: { - pattern: createInline(/(~~?)(?:(?!~))+\2/.source), - lookbehind: !0, - greedy: !0, - inside: { - content: { - pattern: /(^~~?)[\s\S]+(?=\1$)/, - lookbehind: !0, - inside: {} - }, - punctuation: /~~?/ - } - }, - 'code-snippet': { - pattern: /(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/, - lookbehind: !0, - greedy: !0, - alias: ['code', 'keyword'] - }, - url: { - pattern: createInline( - /!?\[(?:(?!\]))+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\]))+\])/ - .source - ), - lookbehind: !0, - greedy: !0, - inside: { - operator: /^!/, - content: { - pattern: /(^\[)[^\]]+(?=\])/, - lookbehind: !0, - inside: {} - }, - variable: { - pattern: /(^\][ \t]?\[)[^\]]+(?=\]$)/, - lookbehind: !0 - }, - url: { pattern: /(^\]\()[^\s)]+/, lookbehind: !0 }, - string: { - pattern: /(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/, - lookbehind: !0 - } - } - } - }), - ['url', 'bold', 'italic', 'strike'].forEach(function(token) { - ['url', 'bold', 'italic', 'strike', 'code-snippet'].forEach( - function(inside) { - token !== inside && - (Prism.languages.markdown[token].inside.content.inside[ - inside - ] = Prism.languages.markdown[inside]); - } - ); - }), - Prism.hooks.add('after-tokenize', function(env) { - ('markdown' !== env.language && 'md' !== env.language) || - (function walkTokens(tokens) { - if (tokens && 'string' != typeof tokens) - for (var i = 0, l = tokens.length; i < l; i++) { - var token = tokens[i]; - if ('code' === token.type) { - var codeLang = token.content[1], - codeBlock = token.content[3]; - if ( - codeLang && - codeBlock && - 'code-language' === codeLang.type && - 'code-block' === codeBlock.type && - 'string' == typeof codeLang.content - ) { - var lang = codeLang.content - .replace(/\b#/g, 'sharp') - .replace(/\b\+\+/g, 'pp'), - alias = - 'language-' + - (lang = (/[a-z][\w-]*/i.exec(lang) || [ - '' - ])[0].toLowerCase()); - codeBlock.alias - ? 'string' == typeof codeBlock.alias - ? (codeBlock.alias = [codeBlock.alias, alias]) - : codeBlock.alias.push(alias) - : (codeBlock.alias = [alias]); - } - } else walkTokens(token.content); - } - })(env.tokens); - }), - Prism.hooks.add('wrap', function(env) { - if ('code-block' === env.type) { - for ( - var codeLang = '', i = 0, l = env.classes.length; - i < l; - i++ - ) { - var cls = env.classes[i], - match = /language-(.+)/.exec(cls); - if (match) { - codeLang = match[1]; - break; - } - } - var grammar = Prism.languages[codeLang]; - if (grammar) - env.content = Prism.highlight( - (function textContent(html) { - var text = html.replace(tagPattern, ''); - return (text = text.replace( - /&(\w{1,8}|#x?[\da-f]{1,8});/gi, - function(m, code) { - var value; - if ('#' === (code = code.toLowerCase())[0]) - return ( - (value = - 'x' === code[1] - ? parseInt(code.slice(2), 16) - : Number(code.slice(1))), - fromCodePoint(value) - ); - var known = KNOWN_ENTITY_NAMES[code]; - return known || m; - } - )); - })(env.content.value), - grammar, - codeLang - ); - else if ( - codeLang && - 'none' !== codeLang && - Prism.plugins.autoloader - ) { - var id = - 'md-' + - new Date().valueOf() + - '-' + - Math.floor(1e16 * Math.random()); - (env.attributes.id = id), - Prism.plugins.autoloader.loadLanguages( - codeLang, - function() { - var ele = document.getElementById(id); - ele && - (ele.innerHTML = Prism.highlight( - ele.textContent, - Prism.languages[codeLang], - codeLang - )); - } - ); - } - } - }); - var tagPattern = RegExp( - Prism.languages.markup.tag.pattern.source, - 'gi' - ), - KNOWN_ENTITY_NAMES = { amp: '&', lt: '<', gt: '>', quot: '"' }, - fromCodePoint = String.fromCodePoint || String.fromCharCode; - Prism.languages.md = Prism.languages.markdown; - })(Prism); - } - (module.exports = markdown), - (markdown.displayName = 'markdown'), - (markdown.aliases = ['md']); - }, - 1706: function(module, exports, __webpack_require__) { - 'use strict'; - function bash(Prism) { - !(function(Prism) { - var envVars = - '\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b', - commandAfterHeredoc = { - pattern: /(^(["']?)\w+\2)[ \t]+\S.*/, - lookbehind: !0, - alias: 'punctuation', - inside: null - }, - insideString = { - bash: commandAfterHeredoc, - environment: { - pattern: RegExp('\\$' + envVars), - alias: 'constant' - }, - variable: [ - { - pattern: /\$?\(\([\s\S]+?\)\)/, - greedy: !0, - inside: { - variable: [ - { pattern: /(^\$\(\([\s\S]+)\)\)/, lookbehind: !0 }, - /^\$\(\(/ - ], - number: /\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/, - operator: /--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/, - punctuation: /\(\(?|\)\)?|,|;/ - } - }, - { - pattern: /\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/, - greedy: !0, - inside: { variable: /^\$\(|^`|\)$|`$/ } - }, - { - pattern: /\$\{[^}]+\}/, - greedy: !0, - inside: { - operator: /:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/, - punctuation: /[\[\]]/, - environment: { - pattern: RegExp('(\\{)' + envVars), - lookbehind: !0, - alias: 'constant' - } - } - }, - /\$(?:\w+|[#?*!@$])/ - ], - entity: /\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|x[0-9a-fA-F]{1,2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8})/ - }; - (Prism.languages.bash = { - shebang: { pattern: /^#!\s*\/.*/, alias: 'important' }, - comment: { pattern: /(^|[^"{\\$])#.*/, lookbehind: !0 }, - 'function-name': [ - { - pattern: /(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/, - lookbehind: !0, - alias: 'function' - }, - { pattern: /\b[\w-]+(?=\s*\(\s*\)\s*\{)/, alias: 'function' } - ], - 'for-or-select': { - pattern: /(\b(?:for|select)\s+)\w+(?=\s+in\s)/, - alias: 'variable', - lookbehind: !0 - }, - 'assign-left': { - pattern: /(^|[\s;|&]|[<>]\()\w+(?=\+?=)/, - inside: { - environment: { - pattern: RegExp('(^|[\\s;|&]|[<>]\\()' + envVars), - lookbehind: !0, - alias: 'constant' - } - }, - alias: 'variable', - lookbehind: !0 - }, - string: [ - { - pattern: /((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/, - lookbehind: !0, - greedy: !0, - inside: insideString - }, - { - pattern: /((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/, - lookbehind: !0, - greedy: !0, - inside: { bash: commandAfterHeredoc } - }, - { - pattern: /(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/, - lookbehind: !0, - greedy: !0, - inside: insideString - }, - { pattern: /(^|[^$\\])'[^']*'/, lookbehind: !0, greedy: !0 }, - { - pattern: /\$'(?:[^'\\]|\\[\s\S])*'/, - greedy: !0, - inside: { entity: insideString.entity } - } - ], - environment: { - pattern: RegExp('\\$?' + envVars), - alias: 'constant' - }, - variable: insideString.variable, - function: { - pattern: /(^|[\s;|&]|[<>]\()(?:add|apropos|apt|aptitude|apt-cache|apt-get|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/, - lookbehind: !0 - }, - keyword: { - pattern: /(^|[\s;|&]|[<>]\()(?:if|then|else|elif|fi|for|while|in|case|esac|function|select|do|done|until)(?=$|[)\s;|&])/, - lookbehind: !0 - }, - builtin: { - pattern: /(^|[\s;|&]|[<>]\()(?:\.|:|break|cd|continue|eval|exec|exit|export|getopts|hash|pwd|readonly|return|shift|test|times|trap|umask|unset|alias|bind|builtin|caller|command|declare|echo|enable|help|let|local|logout|mapfile|printf|read|readarray|source|type|typeset|ulimit|unalias|set|shopt)(?=$|[)\s;|&])/, - lookbehind: !0, - alias: 'class-name' - }, - boolean: { - pattern: /(^|[\s;|&]|[<>]\()(?:true|false)(?=$|[)\s;|&])/, - lookbehind: !0 - }, - 'file-descriptor': { pattern: /\B&\d\b/, alias: 'important' }, - operator: { - pattern: /\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/, - inside: { - 'file-descriptor': { pattern: /^\d/, alias: 'important' } - } - }, - punctuation: /\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/, - number: { - pattern: /(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/, - lookbehind: !0 - } - }), - (commandAfterHeredoc.inside = Prism.languages.bash); - for ( - var toBeCopied = [ - 'comment', - 'function-name', - 'for-or-select', - 'assign-left', - 'string', - 'environment', - 'function', - 'keyword', - 'builtin', - 'boolean', - 'file-descriptor', - 'operator', - 'punctuation', - 'number' - ], - inside = insideString.variable[1].inside, - i = 0; - i < toBeCopied.length; - i++ - ) - inside[toBeCopied[i]] = Prism.languages.bash[toBeCopied[i]]; - Prism.languages.shell = Prism.languages.bash; - })(Prism); - } - (module.exports = bash), - (bash.displayName = 'bash'), - (bash.aliases = ['shell']); - }, - 1707: function(module, exports, __webpack_require__) { - 'use strict'; - var refractorJsx = __webpack_require__(1667), - refractorTypescript = __webpack_require__(1668); - function tsx(Prism) { - Prism.register(refractorJsx), - Prism.register(refractorTypescript), - (function(Prism) { - var typescript = Prism.util.clone(Prism.languages.typescript); - Prism.languages.tsx = Prism.languages.extend('jsx', typescript); - var tag = Prism.languages.tsx.tag; - (tag.pattern = RegExp( - /(^|[^\w$]|(?=<\/))/.source + '(?:' + tag.pattern.source + ')', - tag.pattern.flags - )), - (tag.lookbehind = !0); - })(Prism); - } - (module.exports = tsx), (tsx.displayName = 'tsx'), (tsx.aliases = []); - }, - 1708: function(module, exports, __webpack_require__) { - 'use strict'; - function graphql(Prism) { - (Prism.languages.graphql = { - comment: /#.*/, - description: { - pattern: /(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i, - greedy: !0, - alias: 'string', - inside: { - 'language-markdown': { - pattern: /(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/, - lookbehind: !0, - inside: Prism.languages.markdown - } - } - }, - string: { - pattern: /"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/, - greedy: !0 - }, - number: /(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i, - boolean: /\b(?:true|false)\b/, - variable: /\$[a-z_]\w*/i, - directive: { pattern: /@[a-z_]\w*/i, alias: 'function' }, - 'attr-name': { - pattern: /[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i, - greedy: !0 - }, - 'atom-input': { - pattern: /[A-Z]\w*Input(?=!?.*$)/m, - alias: 'class-name' - }, - scalar: /\b(?:Boolean|Float|ID|Int|String)\b/, - constant: /\b[A-Z][A-Z_\d]*\b/, - 'class-name': { - pattern: /(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/, - lookbehind: !0 - }, - fragment: { - pattern: /(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/, - lookbehind: !0, - alias: 'function' - }, - 'definition-mutation': { - pattern: /(\bmutation\s+)[a-zA-Z_]\w*/, - lookbehind: !0, - alias: 'function' - }, - 'definition-query': { - pattern: /(\bquery\s+)[a-zA-Z_]\w*/, - lookbehind: !0, - alias: 'function' - }, - keyword: /\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/, - operator: /[!=|&]|\.{3}/, - 'property-query': /\w+(?=\s*\()/, - object: /\w+(?=\s*\{)/, - punctuation: /[!(){}\[\]:=,]/, - property: /\w+/ - }), - Prism.hooks.add('after-tokenize', function afterTokenizeGraphql(env) { - if ('graphql' === env.language) - for ( - var validTokens = env.tokens.filter(function(token) { - return ( - 'string' != typeof token && - 'comment' !== token.type && - 'scalar' !== token.type - ); - }), - currentIndex = 0; - currentIndex < validTokens.length; - - ) { - var startToken = validTokens[currentIndex++]; - if ( - 'keyword' === startToken.type && - 'mutation' === startToken.content - ) { - var inputVariables = []; - if ( - isTokenType(['definition-mutation', 'punctuation']) && - '(' === getToken(1).content - ) { - currentIndex += 2; - var definitionEnd = findClosingBracket(/^\($/, /^\)$/); - if (-1 === definitionEnd) continue; - for (; currentIndex < definitionEnd; currentIndex++) { - var t = getToken(0); - 'variable' === t.type && - (addAlias(t, 'variable-input'), - inputVariables.push(t.content)); - } - currentIndex = definitionEnd + 1; - } - if ( - isTokenType(['punctuation', 'property-query']) && - '{' === getToken(0).content && - (currentIndex++, - addAlias(getToken(0), 'property-mutation'), - inputVariables.length > 0) - ) { - var mutationEnd = findClosingBracket(/^\{$/, /^\}$/); - if (-1 === mutationEnd) continue; - for (var i = currentIndex; i < mutationEnd; i++) { - var varToken = validTokens[i]; - 'variable' === varToken.type && - inputVariables.indexOf(varToken.content) >= 0 && - addAlias(varToken, 'variable-input'); - } - } - } - } - function getToken(offset) { - return validTokens[currentIndex + offset]; - } - function isTokenType(types, offset) { - offset = offset || 0; - for (var i = 0; i < types.length; i++) { - var token = getToken(i + offset); - if (!token || token.type !== types[i]) return !1; - } - return !0; - } - function findClosingBracket(open, close) { - for ( - var stackHeight = 1, i = currentIndex; - i < validTokens.length; - i++ - ) { - var token = validTokens[i], - content = token.content; - if ('punctuation' === token.type && 'string' == typeof content) - if (open.test(content)) stackHeight++; - else if (close.test(content) && 0 === --stackHeight) return i; - } - return -1; - } - function addAlias(token, alias) { - var aliases = token.alias; - aliases - ? Array.isArray(aliases) || (token.alias = aliases = [aliases]) - : (token.alias = aliases = []), - aliases.push(alias); - } - }); - } - (module.exports = graphql), - (graphql.displayName = 'graphql'), - (graphql.aliases = []); - } - } -]); diff --git a/docs/5.a088b92742d2cd1d1ce8.manager.bundle.js b/docs/5.a088b92742d2cd1d1ce8.manager.bundle.js deleted file mode 100644 index 57042e41..00000000 --- a/docs/5.a088b92742d2cd1d1ce8.manager.bundle.js +++ /dev/null @@ -1,5639 +0,0 @@ -(window.webpackJsonp = window.webpackJsonp || []).push([ - [5], - { - 1197: function(module, exports, __webpack_require__) { - var global = __webpack_require__(714), - setGlobal = __webpack_require__(1198), - store = - global['__core-js_shared__'] || setGlobal('__core-js_shared__', {}); - module.exports = store; - }, - 1198: function(module, exports, __webpack_require__) { - var global = __webpack_require__(714), - defineProperty = Object.defineProperty; - module.exports = function(key, value) { - try { - defineProperty(global, key, { - value: value, - configurable: !0, - writable: !0 - }); - } catch (error) { - global[key] = value; - } - return value; - }; - }, - 1199: function(module, exports, __webpack_require__) { - var uncurryThis = __webpack_require__(715), - id = 0, - postfix = Math.random(), - toString = uncurryThis((1).toString); - module.exports = function(key) { - return ( - 'Symbol(' + - (void 0 === key ? '' : key) + - ')_' + - toString(++id + postfix, 36) - ); - }; - }, - 1200: function(module, exports, __webpack_require__) { - var global = __webpack_require__(714), - isObject = __webpack_require__(824), - document = global.document, - EXISTS = isObject(document) && isObject(document.createElement); - module.exports = function(it) { - return EXISTS ? document.createElement(it) : {}; - }; - }, - 1201: function(module, exports, __webpack_require__) { - var uncurryThis = __webpack_require__(715), - isCallable = __webpack_require__(766), - store = __webpack_require__(1197), - functionToString = uncurryThis(Function.toString); - isCallable(store.inspectSource) || - (store.inspectSource = function(it) { - return functionToString(it); - }), - (module.exports = store.inspectSource); - }, - 1202: function(module, exports, __webpack_require__) { - var internalObjectKeys = __webpack_require__(1217), - hiddenKeys = __webpack_require__(1206).concat('length', 'prototype'); - exports.f = - Object.getOwnPropertyNames || - function getOwnPropertyNames(O) { - return internalObjectKeys(O, hiddenKeys); - }; - }, - 1203: function(module, exports, __webpack_require__) { - var toIntegerOrInfinity = __webpack_require__(1204), - max = Math.max, - min = Math.min; - module.exports = function(index, length) { - var integer = toIntegerOrInfinity(index); - return integer < 0 ? max(integer + length, 0) : min(integer, length); - }; - }, - 1204: function(module, exports) { - var ceil = Math.ceil, - floor = Math.floor; - module.exports = function(argument) { - var number = +argument; - return number != number || 0 === number - ? 0 - : (number > 0 ? floor : ceil)(number); - }; - }, - 1205: function(module, exports, __webpack_require__) { - var toIntegerOrInfinity = __webpack_require__(1204), - min = Math.min; - module.exports = function(argument) { - return argument > 0 - ? min(toIntegerOrInfinity(argument), 9007199254740991) - : 0; - }; - }, - 1206: function(module, exports) { - module.exports = [ - 'constructor', - 'hasOwnProperty', - 'isPrototypeOf', - 'propertyIsEnumerable', - 'toLocaleString', - 'toString', - 'valueOf' - ]; - }, - 1207: function(module, exports, __webpack_require__) { - var internalObjectKeys = __webpack_require__(1217), - enumBugKeys = __webpack_require__(1206); - module.exports = - Object.keys || - function keys(O) { - return internalObjectKeys(O, enumBugKeys); - }; - }, - 1208: function(module, exports, __webpack_require__) { - var bind = __webpack_require__(1227), - uncurryThis = __webpack_require__(715), - IndexedObject = __webpack_require__(889), - toObject = __webpack_require__(830), - lengthOfArrayLike = __webpack_require__(835), - arraySpeciesCreate = __webpack_require__(1467), - push = uncurryThis([].push), - createMethod = function(TYPE) { - var IS_MAP = 1 == TYPE, - IS_FILTER = 2 == TYPE, - IS_SOME = 3 == TYPE, - IS_EVERY = 4 == TYPE, - IS_FIND_INDEX = 6 == TYPE, - IS_FILTER_REJECT = 7 == TYPE, - NO_HOLES = 5 == TYPE || IS_FIND_INDEX; - return function($this, callbackfn, that, specificCreate) { - for ( - var value, - result, - O = toObject($this), - self = IndexedObject(O), - boundFunction = bind(callbackfn, that), - length = lengthOfArrayLike(self), - index = 0, - create = specificCreate || arraySpeciesCreate, - target = IS_MAP - ? create($this, length) - : IS_FILTER || IS_FILTER_REJECT - ? create($this, 0) - : void 0; - length > index; - index++ - ) - if ( - (NO_HOLES || index in self) && - ((result = boundFunction((value = self[index]), index, O)), - TYPE) - ) - if (IS_MAP) target[index] = result; - else if (result) - switch (TYPE) { - case 3: - return !0; - case 5: - return value; - case 6: - return index; - case 2: - push(target, value); - } - else - switch (TYPE) { - case 4: - return !1; - case 7: - push(target, value); - } - return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target; - }; - }; - module.exports = { - forEach: createMethod(0), - map: createMethod(1), - filter: createMethod(2), - some: createMethod(3), - every: createMethod(4), - find: createMethod(5), - findIndex: createMethod(6), - filterReject: createMethod(7) - }; - }, - 1209: function(module, exports, __webpack_require__) { - var test = {}; - (test[__webpack_require__(717)('toStringTag')] = 'z'), - (module.exports = '[object z]' === String(test)); - }, - 1210: function(module, exports, __webpack_require__) { - 'use strict'; - var toPropertyKey = __webpack_require__(838), - definePropertyModule = __webpack_require__(820), - createPropertyDescriptor = __webpack_require__(831); - module.exports = function(object, key, value) { - var propertyKey = toPropertyKey(key); - propertyKey in object - ? definePropertyModule.f( - object, - propertyKey, - createPropertyDescriptor(0, value) - ) - : (object[propertyKey] = value); - }; - }, - 1211: function(module, exports, __webpack_require__) { - var defineProperty = __webpack_require__(820).f, - hasOwn = __webpack_require__(819), - TO_STRING_TAG = __webpack_require__(717)('toStringTag'); - module.exports = function(target, TAG, STATIC) { - target && !STATIC && (target = target.prototype), - target && - !hasOwn(target, TO_STRING_TAG) && - defineProperty(target, TO_STRING_TAG, { - configurable: !0, - value: TAG - }); - }; - }, - 1212: function(module, exports, __webpack_require__) { - 'use strict'; - var $propertyIsEnumerable = {}.propertyIsEnumerable, - getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor, - NASHORN_BUG = - getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1); - exports.f = NASHORN_BUG - ? function propertyIsEnumerable(V) { - var descriptor = getOwnPropertyDescriptor(this, V); - return !!descriptor && descriptor.enumerable; - } - : $propertyIsEnumerable; - }, - 1213: function(module, exports, __webpack_require__) { - var NATIVE_SYMBOL = __webpack_require__(913); - module.exports = - NATIVE_SYMBOL && !Symbol.sham && 'symbol' == typeof Symbol.iterator; - }, - 1214: function(module, exports, __webpack_require__) { - var match, - version, - global = __webpack_require__(714), - userAgent = __webpack_require__(1460), - process = global.process, - Deno = global.Deno, - versions = (process && process.versions) || (Deno && Deno.version), - v8 = versions && versions.v8; - v8 && - (version = - (match = v8.split('.'))[0] > 0 && match[0] < 4 - ? 1 - : +(match[0] + match[1])), - !version && - userAgent && - (!(match = userAgent.match(/Edge\/(\d+)/)) || match[1] >= 74) && - (match = userAgent.match(/Chrome\/(\d+)/)) && - (version = +match[1]), - (module.exports = version); - }, - 1215: function(module, exports, __webpack_require__) { - var DESCRIPTORS = __webpack_require__(821), - fails = __webpack_require__(716), - createElement = __webpack_require__(1200); - module.exports = - !DESCRIPTORS && - !fails(function() { - return ( - 7 != - Object.defineProperty(createElement('div'), 'a', { - get: function() { - return 7; - } - }).a - ); - }); - }, - 1216: function(module, exports, __webpack_require__) { - var hasOwn = __webpack_require__(819), - ownKeys = __webpack_require__(1463), - getOwnPropertyDescriptorModule = __webpack_require__(871), - definePropertyModule = __webpack_require__(820); - module.exports = function(target, source, exceptions) { - for ( - var keys = ownKeys(source), - defineProperty = definePropertyModule.f, - getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f, - i = 0; - i < keys.length; - i++ - ) { - var key = keys[i]; - hasOwn(target, key) || - (exceptions && hasOwn(exceptions, key)) || - defineProperty(target, key, getOwnPropertyDescriptor(source, key)); - } - }; - }, - 1217: function(module, exports, __webpack_require__) { - var uncurryThis = __webpack_require__(715), - hasOwn = __webpack_require__(819), - toIndexedObject = __webpack_require__(823), - indexOf = __webpack_require__(1464).indexOf, - hiddenKeys = __webpack_require__(842), - push = uncurryThis([].push); - module.exports = function(object, names) { - var key, - O = toIndexedObject(object), - i = 0, - result = []; - for (key in O) - !hasOwn(hiddenKeys, key) && hasOwn(O, key) && push(result, key); - for (; names.length > i; ) - hasOwn(O, (key = names[i++])) && - (~indexOf(result, key) || push(result, key)); - return result; - }; - }, - 1225: function(module, exports) { - exports.f = Object.getOwnPropertySymbols; - }, - 1226: function(module, exports, __webpack_require__) { - 'use strict'; - var $forEach = __webpack_require__(1208).forEach, - STRICT_METHOD = __webpack_require__(1228)('forEach'); - module.exports = STRICT_METHOD - ? [].forEach - : function forEach(callbackfn) { - return $forEach( - this, - callbackfn, - arguments.length > 1 ? arguments[1] : void 0 - ); - }; - }, - 1227: function(module, exports, __webpack_require__) { - var uncurryThis = __webpack_require__(715), - aCallable = __webpack_require__(919), - bind = uncurryThis(uncurryThis.bind); - module.exports = function(fn, that) { - return ( - aCallable(fn), - void 0 === that - ? fn - : bind - ? bind(fn, that) - : function() { - return fn.apply(that, arguments); - } - ); - }; - }, - 1228: function(module, exports, __webpack_require__) { - 'use strict'; - var fails = __webpack_require__(716); - module.exports = function(METHOD_NAME, argument) { - var method = [][METHOD_NAME]; - return ( - !!method && - fails(function() { - method.call( - null, - argument || - function() { - throw 1; - }, - 1 - ); - }) - ); - }; - }, - 1229: function(module, exports) { - module.exports = { - CSSRuleList: 0, - CSSStyleDeclaration: 0, - CSSValueList: 0, - ClientRectList: 0, - DOMRectList: 0, - DOMStringList: 0, - DOMTokenList: 1, - DataTransferItemList: 0, - FileList: 0, - HTMLAllCollection: 0, - HTMLCollection: 0, - HTMLFormElement: 0, - HTMLSelectElement: 0, - MediaList: 0, - MimeTypeArray: 0, - NamedNodeMap: 0, - NodeList: 1, - PaintRequestList: 0, - Plugin: 0, - PluginArray: 0, - SVGLengthList: 0, - SVGNumberList: 0, - SVGPathSegList: 0, - SVGPointList: 0, - SVGStringList: 0, - SVGTransformList: 0, - SourceBufferList: 0, - StyleSheetList: 0, - TextTrackCueList: 0, - TextTrackList: 0, - TouchList: 0 - }; - }, - 1230: function(module, exports, __webpack_require__) { - var classList = __webpack_require__(1200)('span').classList, - DOMTokenListPrototype = - classList && classList.constructor && classList.constructor.prototype; - module.exports = - DOMTokenListPrototype === Object.prototype - ? void 0 - : DOMTokenListPrototype; - }, - 1231: function(module, exports, __webpack_require__) { - var $ = __webpack_require__(817), - DESCRIPTORS = __webpack_require__(821); - $( - { - target: 'Object', - stat: !0, - forced: !DESCRIPTORS, - sham: !DESCRIPTORS - }, - { defineProperty: __webpack_require__(820).f } - ); - }, - 1232: function(module, exports, __webpack_require__) { - function _slicedToArray(arr, i) { - return ( - (function _arrayWithHoles(arr) { - if (Array.isArray(arr)) return arr; - })(arr) || - (function _iterableToArrayLimit(arr, i) { - var _i = - null == arr - ? null - : ('undefined' != typeof Symbol && arr[Symbol.iterator]) || - arr['@@iterator']; - if (null == _i) return; - var _s, - _e, - _arr = [], - _n = !0, - _d = !1; - try { - for ( - _i = _i.call(arr); - !(_n = (_s = _i.next()).done) && - (_arr.push(_s.value), !i || _arr.length !== i); - _n = !0 - ); - } catch (err) { - (_d = !0), (_e = err); - } finally { - try { - _n || null == _i.return || _i.return(); - } finally { - if (_d) throw _e; - } - } - return _arr; - })(arr, i) || - (function _unsupportedIterableToArray(o, minLen) { - if (!o) return; - if ('string' == typeof o) return _arrayLikeToArray(o, minLen); - var n = Object.prototype.toString.call(o).slice(8, -1); - 'Object' === n && o.constructor && (n = o.constructor.name); - if ('Map' === n || 'Set' === n) return Array.from(o); - if ( - 'Arguments' === n || - /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) - ) - return _arrayLikeToArray(o, minLen); - })(arr, i) || - (function _nonIterableRest() { - throw new TypeError( - 'Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.' - ); - })() - ); - } - function _arrayLikeToArray(arr, len) { - (null == len || len > arr.length) && (len = arr.length); - for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; - return arr2; - } - __webpack_require__(870), - __webpack_require__(1231), - __webpack_require__(1470), - __webpack_require__(1472), - __webpack_require__(1473), - __webpack_require__(1474), - __webpack_require__(1235), - __webpack_require__(1479), - __webpack_require__(1480), - __webpack_require__(1481), - __webpack_require__(1524), - __webpack_require__(1527), - __webpack_require__(1528), - __webpack_require__(1531), - __webpack_require__(1545), - __webpack_require__(1546), - __webpack_require__(1455), - __webpack_require__(1566), - __webpack_require__(1567), - __webpack_require__(1568), - __webpack_require__(1569); - for ( - var cssKeywords = __webpack_require__(1710), - reverseKeywords = {}, - _i = 0, - _Object$keys = Object.keys(cssKeywords); - _i < _Object$keys.length; - _i++ - ) { - var key = _Object$keys[_i]; - reverseKeywords[cssKeywords[key]] = key; - } - var convert = { - rgb: { channels: 3, labels: 'rgb' }, - hsl: { channels: 3, labels: 'hsl' }, - hsv: { channels: 3, labels: 'hsv' }, - hwb: { channels: 3, labels: 'hwb' }, - cmyk: { channels: 4, labels: 'cmyk' }, - xyz: { channels: 3, labels: 'xyz' }, - lab: { channels: 3, labels: 'lab' }, - lch: { channels: 3, labels: 'lch' }, - hex: { channels: 1, labels: ['hex'] }, - keyword: { channels: 1, labels: ['keyword'] }, - ansi16: { channels: 1, labels: ['ansi16'] }, - ansi256: { channels: 1, labels: ['ansi256'] }, - hcg: { channels: 3, labels: ['h', 'c', 'g'] }, - apple: { channels: 3, labels: ['r16', 'g16', 'b16'] }, - gray: { channels: 1, labels: ['gray'] } - }; - module.exports = convert; - for ( - var _i2 = 0, _Object$keys2 = Object.keys(convert); - _i2 < _Object$keys2.length; - _i2++ - ) { - var model = _Object$keys2[_i2]; - if (!('channels' in convert[model])) - throw new Error('missing channels property: ' + model); - if (!('labels' in convert[model])) - throw new Error('missing channel labels property: ' + model); - if (convert[model].labels.length !== convert[model].channels) - throw new Error('channel and label counts mismatch: ' + model); - var _convert$model = convert[model], - channels = _convert$model.channels, - labels = _convert$model.labels; - delete convert[model].channels, - delete convert[model].labels, - Object.defineProperty(convert[model], 'channels', { - value: channels - }), - Object.defineProperty(convert[model], 'labels', { value: labels }); - } - (convert.rgb.hsl = function(rgb) { - var h, - r = rgb[0] / 255, - g = rgb[1] / 255, - b = rgb[2] / 255, - min = Math.min(r, g, b), - max = Math.max(r, g, b), - delta = max - min; - max === min - ? (h = 0) - : r === max - ? (h = (g - b) / delta) - : g === max - ? (h = 2 + (b - r) / delta) - : b === max && (h = 4 + (r - g) / delta), - (h = Math.min(60 * h, 360)) < 0 && (h += 360); - var l = (min + max) / 2; - return [ - h, - 100 * - (max === min - ? 0 - : l <= 0.5 - ? delta / (max + min) - : delta / (2 - max - min)), - 100 * l - ]; - }), - (convert.rgb.hsv = function(rgb) { - var rdif, - gdif, - bdif, - h, - s, - r = rgb[0] / 255, - g = rgb[1] / 255, - b = rgb[2] / 255, - v = Math.max(r, g, b), - diff = v - Math.min(r, g, b), - diffc = function diffc(c) { - return (v - c) / 6 / diff + 0.5; - }; - return ( - 0 === diff - ? ((h = 0), (s = 0)) - : ((s = diff / v), - (rdif = diffc(r)), - (gdif = diffc(g)), - (bdif = diffc(b)), - r === v - ? (h = bdif - gdif) - : g === v - ? (h = 1 / 3 + rdif - bdif) - : b === v && (h = 2 / 3 + gdif - rdif), - h < 0 ? (h += 1) : h > 1 && (h -= 1)), - [360 * h, 100 * s, 100 * v] - ); - }), - (convert.rgb.hwb = function(rgb) { - var r = rgb[0], - g = rgb[1], - b = rgb[2]; - return [ - convert.rgb.hsl(rgb)[0], - 100 * ((1 / 255) * Math.min(r, Math.min(g, b))), - 100 * (b = 1 - (1 / 255) * Math.max(r, Math.max(g, b))) - ]; - }), - (convert.rgb.cmyk = function(rgb) { - var r = rgb[0] / 255, - g = rgb[1] / 255, - b = rgb[2] / 255, - k = Math.min(1 - r, 1 - g, 1 - b); - return [ - 100 * ((1 - r - k) / (1 - k) || 0), - 100 * ((1 - g - k) / (1 - k) || 0), - 100 * ((1 - b - k) / (1 - k) || 0), - 100 * k - ]; - }), - (convert.rgb.keyword = function(rgb) { - var reversed = reverseKeywords[rgb]; - if (reversed) return reversed; - for ( - var currentClosestKeyword, - x, - y, - currentClosestDistance = 1 / 0, - _i3 = 0, - _Object$keys3 = Object.keys(cssKeywords); - _i3 < _Object$keys3.length; - _i3++ - ) { - var keyword = _Object$keys3[_i3], - value = cssKeywords[keyword], - distance = ((x = rgb), - (y = value), - Math.pow(x[0] - y[0], 2) + - Math.pow(x[1] - y[1], 2) + - Math.pow(x[2] - y[2], 2)); - distance < currentClosestDistance && - ((currentClosestDistance = distance), - (currentClosestKeyword = keyword)); - } - return currentClosestKeyword; - }), - (convert.keyword.rgb = function(keyword) { - return cssKeywords[keyword]; - }), - (convert.rgb.xyz = function(rgb) { - var r = rgb[0] / 255, - g = rgb[1] / 255, - b = rgb[2] / 255; - return [ - 100 * - (0.4124 * - (r = - r > 0.04045 - ? Math.pow((r + 0.055) / 1.055, 2.4) - : r / 12.92) + - 0.3576 * - (g = - g > 0.04045 - ? Math.pow((g + 0.055) / 1.055, 2.4) - : g / 12.92) + - 0.1805 * - (b = - b > 0.04045 - ? Math.pow((b + 0.055) / 1.055, 2.4) - : b / 12.92)), - 100 * (0.2126 * r + 0.7152 * g + 0.0722 * b), - 100 * (0.0193 * r + 0.1192 * g + 0.9505 * b) - ]; - }), - (convert.rgb.lab = function(rgb) { - var xyz = convert.rgb.xyz(rgb), - x = xyz[0], - y = xyz[1], - z = xyz[2]; - return ( - (y /= 100), - (z /= 108.883), - (x = - (x /= 95.047) > 0.008856 - ? Math.pow(x, 1 / 3) - : 7.787 * x + 16 / 116), - [ - 116 * - (y = y > 0.008856 ? Math.pow(y, 1 / 3) : 7.787 * y + 16 / 116) - - 16, - 500 * (x - y), - 200 * - (y - - (z = - z > 0.008856 ? Math.pow(z, 1 / 3) : 7.787 * z + 16 / 116)) - ] - ); - }), - (convert.hsl.rgb = function(hsl) { - var t2, - t3, - val, - h = hsl[0] / 360, - s = hsl[1] / 100, - l = hsl[2] / 100; - if (0 === s) return [(val = 255 * l), val, val]; - for ( - var t1 = 2 * l - (t2 = l < 0.5 ? l * (1 + s) : l + s - l * s), - rgb = [0, 0, 0], - i = 0; - i < 3; - i++ - ) - (t3 = h + (1 / 3) * -(i - 1)) < 0 && t3++, - t3 > 1 && t3--, - (val = - 6 * t3 < 1 - ? t1 + 6 * (t2 - t1) * t3 - : 2 * t3 < 1 - ? t2 - : 3 * t3 < 2 - ? t1 + (t2 - t1) * (2 / 3 - t3) * 6 - : t1), - (rgb[i] = 255 * val); - return rgb; - }), - (convert.hsl.hsv = function(hsl) { - var h = hsl[0], - s = hsl[1] / 100, - l = hsl[2] / 100, - smin = s, - lmin = Math.max(l, 0.01); - return ( - (s *= (l *= 2) <= 1 ? l : 2 - l), - (smin *= lmin <= 1 ? lmin : 2 - lmin), - [ - h, - 100 * (0 === l ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s)), - 100 * ((l + s) / 2) - ] - ); - }), - (convert.hsv.rgb = function(hsv) { - var h = hsv[0] / 60, - s = hsv[1] / 100, - v = hsv[2] / 100, - hi = Math.floor(h) % 6, - f = h - Math.floor(h), - p = 255 * v * (1 - s), - q = 255 * v * (1 - s * f), - t = 255 * v * (1 - s * (1 - f)); - switch (((v *= 255), hi)) { - case 0: - return [v, t, p]; - case 1: - return [q, v, p]; - case 2: - return [p, v, t]; - case 3: - return [p, q, v]; - case 4: - return [t, p, v]; - case 5: - return [v, p, q]; - } - }), - (convert.hsv.hsl = function(hsv) { - var sl, - l, - h = hsv[0], - s = hsv[1] / 100, - v = hsv[2] / 100, - vmin = Math.max(v, 0.01); - l = (2 - s) * v; - var lmin = (2 - s) * vmin; - return ( - (sl = s * vmin), - [ - h, - 100 * (sl = (sl /= lmin <= 1 ? lmin : 2 - lmin) || 0), - 100 * (l /= 2) - ] - ); - }), - (convert.hwb.rgb = function(hwb) { - var f, - h = hwb[0] / 360, - wh = hwb[1] / 100, - bl = hwb[2] / 100, - ratio = wh + bl; - ratio > 1 && ((wh /= ratio), (bl /= ratio)); - var i = Math.floor(6 * h), - v = 1 - bl; - (f = 6 * h - i), 0 != (1 & i) && (f = 1 - f); - var r, - g, - b, - n = wh + f * (v - wh); - switch (i) { - default: - case 6: - case 0: - (r = v), (g = n), (b = wh); - break; - case 1: - (r = n), (g = v), (b = wh); - break; - case 2: - (r = wh), (g = v), (b = n); - break; - case 3: - (r = wh), (g = n), (b = v); - break; - case 4: - (r = n), (g = wh), (b = v); - break; - case 5: - (r = v), (g = wh), (b = n); - } - return [255 * r, 255 * g, 255 * b]; - }), - (convert.cmyk.rgb = function(cmyk) { - var c = cmyk[0] / 100, - m = cmyk[1] / 100, - y = cmyk[2] / 100, - k = cmyk[3] / 100; - return [ - 255 * (1 - Math.min(1, c * (1 - k) + k)), - 255 * (1 - Math.min(1, m * (1 - k) + k)), - 255 * (1 - Math.min(1, y * (1 - k) + k)) - ]; - }), - (convert.xyz.rgb = function(xyz) { - var r, - g, - b, - x = xyz[0] / 100, - y = xyz[1] / 100, - z = xyz[2] / 100; - return ( - (g = -0.9689 * x + 1.8758 * y + 0.0415 * z), - (b = 0.0557 * x + -0.204 * y + 1.057 * z), - (r = - (r = 3.2406 * x + -1.5372 * y + -0.4986 * z) > 0.0031308 - ? 1.055 * Math.pow(r, 1 / 2.4) - 0.055 - : 12.92 * r), - (g = - g > 0.0031308 ? 1.055 * Math.pow(g, 1 / 2.4) - 0.055 : 12.92 * g), - (b = - b > 0.0031308 ? 1.055 * Math.pow(b, 1 / 2.4) - 0.055 : 12.92 * b), - [ - 255 * (r = Math.min(Math.max(0, r), 1)), - 255 * (g = Math.min(Math.max(0, g), 1)), - 255 * (b = Math.min(Math.max(0, b), 1)) - ] - ); - }), - (convert.xyz.lab = function(xyz) { - var x = xyz[0], - y = xyz[1], - z = xyz[2]; - return ( - (y /= 100), - (z /= 108.883), - (x = - (x /= 95.047) > 0.008856 - ? Math.pow(x, 1 / 3) - : 7.787 * x + 16 / 116), - [ - 116 * - (y = y > 0.008856 ? Math.pow(y, 1 / 3) : 7.787 * y + 16 / 116) - - 16, - 500 * (x - y), - 200 * - (y - - (z = - z > 0.008856 ? Math.pow(z, 1 / 3) : 7.787 * z + 16 / 116)) - ] - ); - }), - (convert.lab.xyz = function(lab) { - var x, - y, - z, - l = lab[0]; - (x = lab[1] / 500 + (y = (l + 16) / 116)), (z = y - lab[2] / 200); - var y2 = Math.pow(y, 3), - x2 = Math.pow(x, 3), - z2 = Math.pow(z, 3); - return ( - (y = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787), - (x = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787), - (z = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787), - [(x *= 95.047), (y *= 100), (z *= 108.883)] - ); - }), - (convert.lab.lch = function(lab) { - var h, - l = lab[0], - a = lab[1], - b = lab[2]; - return ( - (h = (360 * Math.atan2(b, a)) / 2 / Math.PI) < 0 && (h += 360), - [l, Math.sqrt(a * a + b * b), h] - ); - }), - (convert.lch.lab = function(lch) { - var l = lch[0], - c = lch[1], - hr = (lch[2] / 360) * 2 * Math.PI; - return [l, c * Math.cos(hr), c * Math.sin(hr)]; - }), - (convert.rgb.ansi16 = function(args) { - var saturation = - arguments.length > 1 && void 0 !== arguments[1] - ? arguments[1] - : null, - _args = _slicedToArray(args, 3), - r = _args[0], - g = _args[1], - b = _args[2], - value = null === saturation ? convert.rgb.hsv(args)[2] : saturation; - if (0 === (value = Math.round(value / 50))) return 30; - var ansi = - 30 + - ((Math.round(b / 255) << 2) | - (Math.round(g / 255) << 1) | - Math.round(r / 255)); - return 2 === value && (ansi += 60), ansi; - }), - (convert.hsv.ansi16 = function(args) { - return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]); - }), - (convert.rgb.ansi256 = function(args) { - var r = args[0], - g = args[1], - b = args[2]; - return r === g && g === b - ? r < 8 - ? 16 - : r > 248 - ? 231 - : Math.round(((r - 8) / 247) * 24) + 232 - : 16 + - 36 * Math.round((r / 255) * 5) + - 6 * Math.round((g / 255) * 5) + - Math.round((b / 255) * 5); - }), - (convert.ansi16.rgb = function(args) { - var color = args % 10; - if (0 === color || 7 === color) - return ( - args > 50 && (color += 3.5), - [(color = (color / 10.5) * 255), color, color] - ); - var mult = 0.5 * (1 + ~~(args > 50)); - return [ - (1 & color) * mult * 255, - ((color >> 1) & 1) * mult * 255, - ((color >> 2) & 1) * mult * 255 - ]; - }), - (convert.ansi256.rgb = function(args) { - if (args >= 232) { - var c = 10 * (args - 232) + 8; - return [c, c, c]; - } - var rem; - return ( - (args -= 16), - [ - (Math.floor(args / 36) / 5) * 255, - (Math.floor((rem = args % 36) / 6) / 5) * 255, - ((rem % 6) / 5) * 255 - ] - ); - }), - (convert.rgb.hex = function(args) { - var string = ( - ((255 & Math.round(args[0])) << 16) + - ((255 & Math.round(args[1])) << 8) + - (255 & Math.round(args[2])) - ) - .toString(16) - .toUpperCase(); - return '000000'.substring(string.length) + string; - }), - (convert.hex.rgb = function(args) { - var match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i); - if (!match) return [0, 0, 0]; - var colorString = match[0]; - 3 === match[0].length && - (colorString = colorString - .split('') - .map(function(char) { - return char + char; - }) - .join('')); - var integer = parseInt(colorString, 16); - return [(integer >> 16) & 255, (integer >> 8) & 255, 255 & integer]; - }), - (convert.rgb.hcg = function(rgb) { - var hue, - r = rgb[0] / 255, - g = rgb[1] / 255, - b = rgb[2] / 255, - max = Math.max(Math.max(r, g), b), - min = Math.min(Math.min(r, g), b), - chroma = max - min; - return ( - (hue = - chroma <= 0 - ? 0 - : max === r - ? ((g - b) / chroma) % 6 - : max === g - ? 2 + (b - r) / chroma - : 4 + (r - g) / chroma), - (hue /= 6), - [ - 360 * (hue %= 1), - 100 * chroma, - 100 * (chroma < 1 ? min / (1 - chroma) : 0) - ] - ); - }), - (convert.hsl.hcg = function(hsl) { - var s = hsl[1] / 100, - l = hsl[2] / 100, - c = l < 0.5 ? 2 * s * l : 2 * s * (1 - l), - f = 0; - return ( - c < 1 && (f = (l - 0.5 * c) / (1 - c)), [hsl[0], 100 * c, 100 * f] - ); - }), - (convert.hsv.hcg = function(hsv) { - var s = hsv[1] / 100, - v = hsv[2] / 100, - c = s * v, - f = 0; - return c < 1 && (f = (v - c) / (1 - c)), [hsv[0], 100 * c, 100 * f]; - }), - (convert.hcg.rgb = function(hcg) { - var h = hcg[0] / 360, - c = hcg[1] / 100, - g = hcg[2] / 100; - if (0 === c) return [255 * g, 255 * g, 255 * g]; - var mg, - pure = [0, 0, 0], - hi = (h % 1) * 6, - v = hi % 1, - w = 1 - v; - switch (Math.floor(hi)) { - case 0: - (pure[0] = 1), (pure[1] = v), (pure[2] = 0); - break; - case 1: - (pure[0] = w), (pure[1] = 1), (pure[2] = 0); - break; - case 2: - (pure[0] = 0), (pure[1] = 1), (pure[2] = v); - break; - case 3: - (pure[0] = 0), (pure[1] = w), (pure[2] = 1); - break; - case 4: - (pure[0] = v), (pure[1] = 0), (pure[2] = 1); - break; - default: - (pure[0] = 1), (pure[1] = 0), (pure[2] = w); - } - return ( - (mg = (1 - c) * g), - [ - 255 * (c * pure[0] + mg), - 255 * (c * pure[1] + mg), - 255 * (c * pure[2] + mg) - ] - ); - }), - (convert.hcg.hsv = function(hcg) { - var c = hcg[1] / 100, - v = c + (hcg[2] / 100) * (1 - c), - f = 0; - return v > 0 && (f = c / v), [hcg[0], 100 * f, 100 * v]; - }), - (convert.hcg.hsl = function(hcg) { - var c = hcg[1] / 100, - l = (hcg[2] / 100) * (1 - c) + 0.5 * c, - s = 0; - return ( - l > 0 && l < 0.5 - ? (s = c / (2 * l)) - : l >= 0.5 && l < 1 && (s = c / (2 * (1 - l))), - [hcg[0], 100 * s, 100 * l] - ); - }), - (convert.hcg.hwb = function(hcg) { - var c = hcg[1] / 100, - v = c + (hcg[2] / 100) * (1 - c); - return [hcg[0], 100 * (v - c), 100 * (1 - v)]; - }), - (convert.hwb.hcg = function(hwb) { - var w = hwb[1] / 100, - v = 1 - hwb[2] / 100, - c = v - w, - g = 0; - return c < 1 && (g = (v - c) / (1 - c)), [hwb[0], 100 * c, 100 * g]; - }), - (convert.apple.rgb = function(apple) { - return [ - (apple[0] / 65535) * 255, - (apple[1] / 65535) * 255, - (apple[2] / 65535) * 255 - ]; - }), - (convert.rgb.apple = function(rgb) { - return [ - (rgb[0] / 255) * 65535, - (rgb[1] / 255) * 65535, - (rgb[2] / 255) * 65535 - ]; - }), - (convert.gray.rgb = function(args) { - return [ - (args[0] / 100) * 255, - (args[0] / 100) * 255, - (args[0] / 100) * 255 - ]; - }), - (convert.gray.hsl = function(args) { - return [0, 0, args[0]]; - }), - (convert.gray.hsv = convert.gray.hsl), - (convert.gray.hwb = function(gray) { - return [0, 100, gray[0]]; - }), - (convert.gray.cmyk = function(gray) { - return [0, 0, 0, gray[0]]; - }), - (convert.gray.lab = function(gray) { - return [gray[0], 0, 0]; - }), - (convert.gray.hex = function(gray) { - var val = 255 & Math.round((gray[0] / 100) * 255), - string = ((val << 16) + (val << 8) + val) - .toString(16) - .toUpperCase(); - return '000000'.substring(string.length) + string; - }), - (convert.rgb.gray = function(rgb) { - return [((rgb[0] + rgb[1] + rgb[2]) / 3 / 255) * 100]; - }); - }, - 1233: function(module, exports, __webpack_require__) { - 'use strict'; - var anObject = __webpack_require__(816); - module.exports = function() { - var that = anObject(this), - result = ''; - return ( - that.global && (result += 'g'), - that.ignoreCase && (result += 'i'), - that.multiline && (result += 'm'), - that.dotAll && (result += 's'), - that.unicode && (result += 'u'), - that.sticky && (result += 'y'), - result - ); - }; - }, - 1234: function(module, exports, __webpack_require__) { - 'use strict'; - __webpack_require__(1235); - var uncurryThis = __webpack_require__(715), - redefine = __webpack_require__(825), - regexpExec = __webpack_require__(869), - fails = __webpack_require__(716), - wellKnownSymbol = __webpack_require__(717), - createNonEnumerableProperty = __webpack_require__(826), - SPECIES = wellKnownSymbol('species'), - RegExpPrototype = RegExp.prototype; - module.exports = function(KEY, exec, FORCED, SHAM) { - var SYMBOL = wellKnownSymbol(KEY), - DELEGATES_TO_SYMBOL = !fails(function() { - var O = {}; - return ( - (O[SYMBOL] = function() { - return 7; - }), - 7 != ''[KEY](O) - ); - }), - DELEGATES_TO_EXEC = - DELEGATES_TO_SYMBOL && - !fails(function() { - var execCalled = !1, - re = /a/; - return ( - 'split' === KEY && - (((re = {}).constructor = {}), - (re.constructor[SPECIES] = function() { - return re; - }), - (re.flags = ''), - (re[SYMBOL] = /./[SYMBOL])), - (re.exec = function() { - return (execCalled = !0), null; - }), - re[SYMBOL](''), - !execCalled - ); - }); - if (!DELEGATES_TO_SYMBOL || !DELEGATES_TO_EXEC || FORCED) { - var uncurriedNativeRegExpMethod = uncurryThis(/./[SYMBOL]), - methods = exec(SYMBOL, ''[KEY], function( - nativeMethod, - regexp, - str, - arg2, - forceStringMethod - ) { - var uncurriedNativeMethod = uncurryThis(nativeMethod), - $exec = regexp.exec; - return $exec === regexpExec || $exec === RegExpPrototype.exec - ? DELEGATES_TO_SYMBOL && !forceStringMethod - ? { - done: !0, - value: uncurriedNativeRegExpMethod(regexp, str, arg2) - } - : { - done: !0, - value: uncurriedNativeMethod(str, regexp, arg2) - } - : { done: !1 }; - }); - redefine(String.prototype, KEY, methods[0]), - redefine(RegExpPrototype, SYMBOL, methods[1]); - } - SHAM && - createNonEnumerableProperty(RegExpPrototype[SYMBOL], 'sham', !0); - }; - }, - 1235: function(module, exports, __webpack_require__) { - 'use strict'; - var $ = __webpack_require__(817), - exec = __webpack_require__(869); - $( - { target: 'RegExp', proto: !0, forced: /./.exec !== exec }, - { exec: exec } - ); - }, - 1236: function(module, exports, __webpack_require__) { - var fails = __webpack_require__(716), - $RegExp = __webpack_require__(714).RegExp, - UNSUPPORTED_Y = fails(function() { - var re = $RegExp('a', 'y'); - return (re.lastIndex = 2), null != re.exec('abcd'); - }), - MISSED_STICKY = - UNSUPPORTED_Y || - fails(function() { - return !$RegExp('a', 'y').sticky; - }), - BROKEN_CARET = - UNSUPPORTED_Y || - fails(function() { - var re = $RegExp('^r', 'gy'); - return (re.lastIndex = 2), null != re.exec('str'); - }); - module.exports = { - BROKEN_CARET: BROKEN_CARET, - MISSED_STICKY: MISSED_STICKY, - UNSUPPORTED_Y: UNSUPPORTED_Y - }; - }, - 1237: function(module, exports, __webpack_require__) { - 'use strict'; - var charAt = __webpack_require__(1238).charAt; - module.exports = function(S, index, unicode) { - return index + (unicode ? charAt(S, index).length : 1); - }; - }, - 1238: function(module, exports, __webpack_require__) { - var uncurryThis = __webpack_require__(715), - toIntegerOrInfinity = __webpack_require__(1204), - toString = __webpack_require__(822), - requireObjectCoercible = __webpack_require__(828), - charAt = uncurryThis(''.charAt), - charCodeAt = uncurryThis(''.charCodeAt), - stringSlice = uncurryThis(''.slice), - createMethod = function(CONVERT_TO_STRING) { - return function($this, pos) { - var first, - second, - S = toString(requireObjectCoercible($this)), - position = toIntegerOrInfinity(pos), - size = S.length; - return position < 0 || position >= size - ? CONVERT_TO_STRING - ? '' - : void 0 - : (first = charCodeAt(S, position)) < 55296 || - first > 56319 || - position + 1 === size || - (second = charCodeAt(S, position + 1)) < 56320 || - second > 57343 - ? CONVERT_TO_STRING - ? charAt(S, position) - : first - : CONVERT_TO_STRING - ? stringSlice(S, position, position + 2) - : second - 56320 + ((first - 55296) << 10) + 65536; - }; - }; - module.exports = { codeAt: createMethod(!1), charAt: createMethod(!0) }; - }, - 1239: function(module, exports, __webpack_require__) { - var global = __webpack_require__(714), - call = __webpack_require__(818), - anObject = __webpack_require__(816), - isCallable = __webpack_require__(766), - classof = __webpack_require__(827), - regexpExec = __webpack_require__(869), - TypeError = global.TypeError; - module.exports = function(R, S) { - var exec = R.exec; - if (isCallable(exec)) { - var result = call(exec, R, S); - return null !== result && anObject(result), result; - } - if ('RegExp' === classof(R)) return call(regexpExec, R, S); - throw TypeError('RegExp#exec called on incompatible receiver'); - }; - }, - 1240: function(module, exports, __webpack_require__) { - var fails = __webpack_require__(716), - wellKnownSymbol = __webpack_require__(717), - V8_VERSION = __webpack_require__(1214), - SPECIES = wellKnownSymbol('species'); - module.exports = function(METHOD_NAME) { - return ( - V8_VERSION >= 51 || - !fails(function() { - var array = []; - return ( - ((array.constructor = {})[SPECIES] = function() { - return { foo: 1 }; - }), - 1 !== array[METHOD_NAME](Boolean).foo - ); - }) - ); - }; - }, - 1446: function(module, exports) { - var FunctionPrototype = Function.prototype, - apply = FunctionPrototype.apply, - bind = FunctionPrototype.bind, - call = FunctionPrototype.call; - module.exports = - ('object' == typeof Reflect && Reflect.apply) || - (bind - ? call.bind(apply) - : function() { - return call.apply(apply, arguments); - }); - }, - 1447: function(module, exports, __webpack_require__) { - var global = __webpack_require__(714), - toAbsoluteIndex = __webpack_require__(1203), - lengthOfArrayLike = __webpack_require__(835), - createProperty = __webpack_require__(1210), - Array = global.Array, - max = Math.max; - module.exports = function(O, start, end) { - for ( - var length = lengthOfArrayLike(O), - k = toAbsoluteIndex(start, length), - fin = toAbsoluteIndex(void 0 === end ? length : end, length), - result = Array(max(fin - k, 0)), - n = 0; - k < fin; - k++, n++ - ) - createProperty(result, n, O[k]); - return (result.length = n), result; - }; - }, - 1448: function(module, exports) { - module.exports = '\t\n\v\f\r                 \u2028\u2029\ufeff'; - }, - 1449: function(module, exports, __webpack_require__) { - var uncurryThis = __webpack_require__(715); - module.exports = uncurryThis([].slice); - }, - 1450: function(module, exports, __webpack_require__) { - var wellKnownSymbol = __webpack_require__(717); - exports.f = wellKnownSymbol; - }, - 1451: function(module, exports, __webpack_require__) { - var path = __webpack_require__(1530), - hasOwn = __webpack_require__(819), - wrappedWellKnownSymbolModule = __webpack_require__(1450), - defineProperty = __webpack_require__(820).f; - module.exports = function(NAME) { - var Symbol = path.Symbol || (path.Symbol = {}); - hasOwn(Symbol, NAME) || - defineProperty(Symbol, NAME, { - value: wrappedWellKnownSymbolModule.f(NAME) - }); - }; - }, - 1452: function(module, exports, __webpack_require__) { - 'use strict'; - var $ = __webpack_require__(817), - call = __webpack_require__(818), - IS_PURE = __webpack_require__(833), - FunctionName = __webpack_require__(843), - isCallable = __webpack_require__(766), - createIteratorConstructor = __webpack_require__(1547), - getPrototypeOf = __webpack_require__(1454), - setPrototypeOf = __webpack_require__(1563), - setToStringTag = __webpack_require__(1211), - createNonEnumerableProperty = __webpack_require__(826), - redefine = __webpack_require__(825), - wellKnownSymbol = __webpack_require__(717), - Iterators = __webpack_require__(837), - IteratorsCore = __webpack_require__(1453), - PROPER_FUNCTION_NAME = FunctionName.PROPER, - CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE, - IteratorPrototype = IteratorsCore.IteratorPrototype, - BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS, - ITERATOR = wellKnownSymbol('iterator'), - returnThis = function() { - return this; - }; - module.exports = function( - Iterable, - NAME, - IteratorConstructor, - next, - DEFAULT, - IS_SET, - FORCED - ) { - createIteratorConstructor(IteratorConstructor, NAME, next); - var CurrentIteratorPrototype, - methods, - KEY, - getIterationMethod = function(KIND) { - if (KIND === DEFAULT && defaultIterator) return defaultIterator; - if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) - return IterablePrototype[KIND]; - switch (KIND) { - case 'keys': - return function keys() { - return new IteratorConstructor(this, KIND); - }; - case 'values': - return function values() { - return new IteratorConstructor(this, KIND); - }; - case 'entries': - return function entries() { - return new IteratorConstructor(this, KIND); - }; - } - return function() { - return new IteratorConstructor(this); - }; - }, - TO_STRING_TAG = NAME + ' Iterator', - INCORRECT_VALUES_NAME = !1, - IterablePrototype = Iterable.prototype, - nativeIterator = - IterablePrototype[ITERATOR] || - IterablePrototype['@@iterator'] || - (DEFAULT && IterablePrototype[DEFAULT]), - defaultIterator = - (!BUGGY_SAFARI_ITERATORS && nativeIterator) || - getIterationMethod(DEFAULT), - anyNativeIterator = - ('Array' == NAME && IterablePrototype.entries) || nativeIterator; - if ( - (anyNativeIterator && - (CurrentIteratorPrototype = getPrototypeOf( - anyNativeIterator.call(new Iterable()) - )) !== Object.prototype && - CurrentIteratorPrototype.next && - (IS_PURE || - getPrototypeOf(CurrentIteratorPrototype) === IteratorPrototype || - (setPrototypeOf - ? setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype) - : isCallable(CurrentIteratorPrototype[ITERATOR]) || - redefine(CurrentIteratorPrototype, ITERATOR, returnThis)), - setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, !0, !0), - IS_PURE && (Iterators[TO_STRING_TAG] = returnThis)), - PROPER_FUNCTION_NAME && - 'values' == DEFAULT && - nativeIterator && - 'values' !== nativeIterator.name && - (!IS_PURE && CONFIGURABLE_FUNCTION_NAME - ? createNonEnumerableProperty(IterablePrototype, 'name', 'values') - : ((INCORRECT_VALUES_NAME = !0), - (defaultIterator = function values() { - return call(nativeIterator, this); - }))), - DEFAULT) - ) - if ( - ((methods = { - values: getIterationMethod('values'), - keys: IS_SET ? defaultIterator : getIterationMethod('keys'), - entries: getIterationMethod('entries') - }), - FORCED) - ) - for (KEY in methods) - (BUGGY_SAFARI_ITERATORS || - INCORRECT_VALUES_NAME || - !(KEY in IterablePrototype)) && - redefine(IterablePrototype, KEY, methods[KEY]); - else - $( - { - target: NAME, - proto: !0, - forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME - }, - methods - ); - return ( - (IS_PURE && !FORCED) || - IterablePrototype[ITERATOR] === defaultIterator || - redefine(IterablePrototype, ITERATOR, defaultIterator, { - name: DEFAULT - }), - (Iterators[NAME] = defaultIterator), - methods - ); - }; - }, - 1453: function(module, exports, __webpack_require__) { - 'use strict'; - var IteratorPrototype, - PrototypeOfArrayIteratorPrototype, - arrayIterator, - fails = __webpack_require__(716), - isCallable = __webpack_require__(766), - create = __webpack_require__(836), - getPrototypeOf = __webpack_require__(1454), - redefine = __webpack_require__(825), - wellKnownSymbol = __webpack_require__(717), - IS_PURE = __webpack_require__(833), - ITERATOR = wellKnownSymbol('iterator'), - BUGGY_SAFARI_ITERATORS = !1; - [].keys && - ('next' in (arrayIterator = [].keys()) - ? (PrototypeOfArrayIteratorPrototype = getPrototypeOf( - getPrototypeOf(arrayIterator) - )) !== Object.prototype && - (IteratorPrototype = PrototypeOfArrayIteratorPrototype) - : (BUGGY_SAFARI_ITERATORS = !0)), - null == IteratorPrototype || - fails(function() { - var test = {}; - return IteratorPrototype[ITERATOR].call(test) !== test; - }) - ? (IteratorPrototype = {}) - : IS_PURE && (IteratorPrototype = create(IteratorPrototype)), - isCallable(IteratorPrototype[ITERATOR]) || - redefine(IteratorPrototype, ITERATOR, function() { - return this; - }), - (module.exports = { - IteratorPrototype: IteratorPrototype, - BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS - }); - }, - 1454: function(module, exports, __webpack_require__) { - var global = __webpack_require__(714), - hasOwn = __webpack_require__(819), - isCallable = __webpack_require__(766), - toObject = __webpack_require__(830), - sharedKey = __webpack_require__(841), - CORRECT_PROTOTYPE_GETTER = __webpack_require__(1554), - IE_PROTO = sharedKey('IE_PROTO'), - Object = global.Object, - ObjectPrototype = Object.prototype; - module.exports = CORRECT_PROTOTYPE_GETTER - ? Object.getPrototypeOf - : function(O) { - var object = toObject(O); - if (hasOwn(object, IE_PROTO)) return object[IE_PROTO]; - var constructor = object.constructor; - return isCallable(constructor) && object instanceof constructor - ? constructor.prototype - : object instanceof Object - ? ObjectPrototype - : null; - }; - }, - 1455: function(module, exports, __webpack_require__) { - 'use strict'; - var toIndexedObject = __webpack_require__(823), - addToUnscopables = __webpack_require__(1565), - Iterators = __webpack_require__(837), - InternalStateModule = __webpack_require__(834), - defineProperty = __webpack_require__(820).f, - defineIterator = __webpack_require__(1452), - IS_PURE = __webpack_require__(833), - DESCRIPTORS = __webpack_require__(821), - setInternalState = InternalStateModule.set, - getInternalState = InternalStateModule.getterFor('Array Iterator'); - module.exports = defineIterator( - Array, - 'Array', - function(iterated, kind) { - setInternalState(this, { - type: 'Array Iterator', - target: toIndexedObject(iterated), - index: 0, - kind: kind - }); - }, - function() { - var state = getInternalState(this), - target = state.target, - kind = state.kind, - index = state.index++; - return !target || index >= target.length - ? ((state.target = void 0), { value: void 0, done: !0 }) - : 'keys' == kind - ? { value: index, done: !1 } - : 'values' == kind - ? { value: target[index], done: !1 } - : { value: [index, target[index]], done: !1 }; - }, - 'values' - ); - var values = (Iterators.Arguments = Iterators.Array); - if ( - (addToUnscopables('keys'), - addToUnscopables('values'), - addToUnscopables('entries'), - !IS_PURE && DESCRIPTORS && 'values' !== values.name) - ) - try { - defineProperty(values, 'name', { value: 'values' }); - } catch (error) {} - }, - 1456: function(module, exports, __webpack_require__) { - var classof = __webpack_require__(858), - getMethod = __webpack_require__(832), - Iterators = __webpack_require__(837), - ITERATOR = __webpack_require__(717)('iterator'); - module.exports = function(it) { - if (null != it) - return ( - getMethod(it, ITERATOR) || - getMethod(it, '@@iterator') || - Iterators[classof(it)] - ); - }; - }, - 1458: function(module, exports, __webpack_require__) { - __webpack_require__(870), - __webpack_require__(1466), - __webpack_require__(1469), - __webpack_require__(1231); - var conversions = __webpack_require__(1232), - route = __webpack_require__(1576), - convert = {}; - Object.keys(conversions).forEach(function(fromModel) { - (convert[fromModel] = {}), - Object.defineProperty(convert[fromModel], 'channels', { - value: conversions[fromModel].channels - }), - Object.defineProperty(convert[fromModel], 'labels', { - value: conversions[fromModel].labels - }); - var routes = route(fromModel); - Object.keys(routes).forEach(function(toModel) { - var fn = routes[toModel]; - (convert[fromModel][toModel] = (function wrapRounded(fn) { - var wrappedFn = function wrappedFn() { - for ( - var _len2 = arguments.length, - args = new Array(_len2), - _key2 = 0; - _key2 < _len2; - _key2++ - ) - args[_key2] = arguments[_key2]; - var arg0 = args[0]; - if (null == arg0) return arg0; - arg0.length > 1 && (args = arg0); - var result = fn(args); - if ('object' == typeof result) - for (var len = result.length, i = 0; i < len; i++) - result[i] = Math.round(result[i]); - return result; - }; - return ( - 'conversion' in fn && (wrappedFn.conversion = fn.conversion), - wrappedFn - ); - })(fn)), - (convert[fromModel][toModel].raw = (function wrapRaw(fn) { - var wrappedFn = function wrappedFn() { - for ( - var _len = arguments.length, args = new Array(_len), _key = 0; - _key < _len; - _key++ - ) - args[_key] = arguments[_key]; - var arg0 = args[0]; - return null == arg0 - ? arg0 - : (arg0.length > 1 && (args = arg0), fn(args)); - }; - return ( - 'conversion' in fn && (wrappedFn.conversion = fn.conversion), - wrappedFn - ); - })(fn)); - }); - }), - (module.exports = convert); - }, - 1459: function(module, exports, __webpack_require__) { - var global = __webpack_require__(714), - call = __webpack_require__(818), - isObject = __webpack_require__(824), - isSymbol = __webpack_require__(905), - getMethod = __webpack_require__(832), - ordinaryToPrimitive = __webpack_require__(1461), - wellKnownSymbol = __webpack_require__(717), - TypeError = global.TypeError, - TO_PRIMITIVE = wellKnownSymbol('toPrimitive'); - module.exports = function(input, pref) { - if (!isObject(input) || isSymbol(input)) return input; - var result, - exoticToPrim = getMethod(input, TO_PRIMITIVE); - if (exoticToPrim) { - if ( - (void 0 === pref && (pref = 'default'), - (result = call(exoticToPrim, input, pref)), - !isObject(result) || isSymbol(result)) - ) - return result; - throw TypeError("Can't convert object to primitive value"); - } - return ( - void 0 === pref && (pref = 'number'), ordinaryToPrimitive(input, pref) - ); - }; - }, - 1460: function(module, exports, __webpack_require__) { - var getBuiltIn = __webpack_require__(829); - module.exports = getBuiltIn('navigator', 'userAgent') || ''; - }, - 1461: function(module, exports, __webpack_require__) { - var global = __webpack_require__(714), - call = __webpack_require__(818), - isCallable = __webpack_require__(766), - isObject = __webpack_require__(824), - TypeError = global.TypeError; - module.exports = function(input, pref) { - var fn, val; - if ( - 'string' === pref && - isCallable((fn = input.toString)) && - !isObject((val = call(fn, input))) - ) - return val; - if ( - isCallable((fn = input.valueOf)) && - !isObject((val = call(fn, input))) - ) - return val; - if ( - 'string' !== pref && - isCallable((fn = input.toString)) && - !isObject((val = call(fn, input))) - ) - return val; - throw TypeError("Can't convert object to primitive value"); - }; - }, - 1462: function(module, exports, __webpack_require__) { - var global = __webpack_require__(714), - isCallable = __webpack_require__(766), - inspectSource = __webpack_require__(1201), - WeakMap = global.WeakMap; - module.exports = - isCallable(WeakMap) && /native code/.test(inspectSource(WeakMap)); - }, - 1463: function(module, exports, __webpack_require__) { - var getBuiltIn = __webpack_require__(829), - uncurryThis = __webpack_require__(715), - getOwnPropertyNamesModule = __webpack_require__(1202), - getOwnPropertySymbolsModule = __webpack_require__(1225), - anObject = __webpack_require__(816), - concat = uncurryThis([].concat); - module.exports = - getBuiltIn('Reflect', 'ownKeys') || - function ownKeys(it) { - var keys = getOwnPropertyNamesModule.f(anObject(it)), - getOwnPropertySymbols = getOwnPropertySymbolsModule.f; - return getOwnPropertySymbols - ? concat(keys, getOwnPropertySymbols(it)) - : keys; - }; - }, - 1464: function(module, exports, __webpack_require__) { - var toIndexedObject = __webpack_require__(823), - toAbsoluteIndex = __webpack_require__(1203), - lengthOfArrayLike = __webpack_require__(835), - createMethod = function(IS_INCLUDES) { - return function($this, el, fromIndex) { - var value, - O = toIndexedObject($this), - length = lengthOfArrayLike(O), - index = toAbsoluteIndex(fromIndex, length); - if (IS_INCLUDES && el != el) { - for (; length > index; ) - if ((value = O[index++]) != value) return !0; - } else - for (; length > index; index++) - if ((IS_INCLUDES || index in O) && O[index] === el) - return IS_INCLUDES || index || 0; - return !IS_INCLUDES && -1; - }; - }; - module.exports = { - includes: createMethod(!0), - indexOf: createMethod(!1) - }; - }, - 1465: function(module, exports, __webpack_require__) { - var fails = __webpack_require__(716), - isCallable = __webpack_require__(766), - replacement = /#|\.prototype\./, - isForced = function(feature, detection) { - var value = data[normalize(feature)]; - return ( - value == POLYFILL || - (value != NATIVE && - (isCallable(detection) ? fails(detection) : !!detection)) - ); - }, - normalize = (isForced.normalize = function(string) { - return String(string) - .replace(replacement, '.') - .toLowerCase(); - }), - data = (isForced.data = {}), - NATIVE = (isForced.NATIVE = 'N'), - POLYFILL = (isForced.POLYFILL = 'P'); - module.exports = isForced; - }, - 1466: function(module, exports, __webpack_require__) { - 'use strict'; - var $ = __webpack_require__(817), - forEach = __webpack_require__(1226); - $( - { target: 'Array', proto: !0, forced: [].forEach != forEach }, - { forEach: forEach } - ); - }, - 1467: function(module, exports, __webpack_require__) { - var arraySpeciesConstructor = __webpack_require__(1468); - module.exports = function(originalArray, length) { - return new (arraySpeciesConstructor(originalArray))( - 0 === length ? 0 : length - ); - }; - }, - 1468: function(module, exports, __webpack_require__) { - var global = __webpack_require__(714), - isArray = __webpack_require__(851), - isConstructor = __webpack_require__(852), - isObject = __webpack_require__(824), - SPECIES = __webpack_require__(717)('species'), - Array = global.Array; - module.exports = function(originalArray) { - var C; - return ( - isArray(originalArray) && - ((C = originalArray.constructor), - ((isConstructor(C) && (C === Array || isArray(C.prototype))) || - (isObject(C) && null === (C = C[SPECIES]))) && - (C = void 0)), - void 0 === C ? Array : C - ); - }; - }, - 1469: function(module, exports, __webpack_require__) { - var global = __webpack_require__(714), - DOMIterables = __webpack_require__(1229), - DOMTokenListPrototype = __webpack_require__(1230), - forEach = __webpack_require__(1226), - createNonEnumerableProperty = __webpack_require__(826), - handlePrototype = function(CollectionPrototype) { - if (CollectionPrototype && CollectionPrototype.forEach !== forEach) - try { - createNonEnumerableProperty( - CollectionPrototype, - 'forEach', - forEach - ); - } catch (error) { - CollectionPrototype.forEach = forEach; - } - }; - for (var COLLECTION_NAME in DOMIterables) - DOMIterables[COLLECTION_NAME] && - handlePrototype( - global[COLLECTION_NAME] && global[COLLECTION_NAME].prototype - ); - handlePrototype(DOMTokenListPrototype); - }, - 1470: function(module, exports, __webpack_require__) { - var TO_STRING_TAG_SUPPORT = __webpack_require__(1209), - redefine = __webpack_require__(825), - toString = __webpack_require__(1471); - TO_STRING_TAG_SUPPORT || - redefine(Object.prototype, 'toString', toString, { unsafe: !0 }); - }, - 1471: function(module, exports, __webpack_require__) { - 'use strict'; - var TO_STRING_TAG_SUPPORT = __webpack_require__(1209), - classof = __webpack_require__(858); - module.exports = TO_STRING_TAG_SUPPORT - ? {}.toString - : function toString() { - return '[object ' + classof(this) + ']'; - }; - }, - 1472: function(module, exports, __webpack_require__) { - 'use strict'; - var uncurryThis = __webpack_require__(715), - PROPER_FUNCTION_NAME = __webpack_require__(843).PROPER, - redefine = __webpack_require__(825), - anObject = __webpack_require__(816), - isPrototypeOf = __webpack_require__(839), - $toString = __webpack_require__(822), - fails = __webpack_require__(716), - regExpFlags = __webpack_require__(1233), - RegExpPrototype = RegExp.prototype, - n$ToString = RegExpPrototype.toString, - getFlags = uncurryThis(regExpFlags), - NOT_GENERIC = fails(function() { - return '/a/b' != n$ToString.call({ source: 'a', flags: 'b' }); - }), - INCORRECT_NAME = PROPER_FUNCTION_NAME && 'toString' != n$ToString.name; - (NOT_GENERIC || INCORRECT_NAME) && - redefine( - RegExp.prototype, - 'toString', - function toString() { - var R = anObject(this), - p = $toString(R.source), - rf = R.flags; - return ( - '/' + - p + - '/' + - $toString( - void 0 === rf && - isPrototypeOf(RegExpPrototype, R) && - !('flags' in RegExpPrototype) - ? getFlags(R) - : rf - ) - ); - }, - { unsafe: !0 } - ); - }, - 1473: function(module, exports, __webpack_require__) { - var uncurryThis = __webpack_require__(715), - redefine = __webpack_require__(825), - DatePrototype = Date.prototype, - un$DateToString = uncurryThis(DatePrototype.toString), - getTime = uncurryThis(DatePrototype.getTime); - 'Invalid Date' != String(new Date(NaN)) && - redefine(DatePrototype, 'toString', function toString() { - var value = getTime(this); - return value == value ? un$DateToString(this) : 'Invalid Date'; - }); - }, - 1474: function(module, exports, __webpack_require__) { - 'use strict'; - var call = __webpack_require__(818), - fixRegExpWellKnownSymbolLogic = __webpack_require__(1234), - anObject = __webpack_require__(816), - toLength = __webpack_require__(1205), - toString = __webpack_require__(822), - requireObjectCoercible = __webpack_require__(828), - getMethod = __webpack_require__(832), - advanceStringIndex = __webpack_require__(1237), - regExpExec = __webpack_require__(1239); - fixRegExpWellKnownSymbolLogic('match', function( - MATCH, - nativeMatch, - maybeCallNative - ) { - return [ - function match(regexp) { - var O = requireObjectCoercible(this), - matcher = null == regexp ? void 0 : getMethod(regexp, MATCH); - return matcher - ? call(matcher, regexp, O) - : new RegExp(regexp)[MATCH](toString(O)); - }, - function(string) { - var rx = anObject(this), - S = toString(string), - res = maybeCallNative(nativeMatch, rx, S); - if (res.done) return res.value; - if (!rx.global) return regExpExec(rx, S); - var fullUnicode = rx.unicode; - rx.lastIndex = 0; - for ( - var result, A = [], n = 0; - null !== (result = regExpExec(rx, S)); - - ) { - var matchStr = toString(result[0]); - (A[n] = matchStr), - '' === matchStr && - (rx.lastIndex = advanceStringIndex( - S, - toLength(rx.lastIndex), - fullUnicode - )), - n++; - } - return 0 === n ? null : A; - } - ]; - }); - }, - 1475: function(module, exports, __webpack_require__) { - var DESCRIPTORS = __webpack_require__(821), - definePropertyModule = __webpack_require__(820), - anObject = __webpack_require__(816), - toIndexedObject = __webpack_require__(823), - objectKeys = __webpack_require__(1207); - module.exports = DESCRIPTORS - ? Object.defineProperties - : function defineProperties(O, Properties) { - anObject(O); - for ( - var key, - props = toIndexedObject(Properties), - keys = objectKeys(Properties), - length = keys.length, - index = 0; - length > index; - - ) - definePropertyModule.f(O, (key = keys[index++]), props[key]); - return O; - }; - }, - 1476: function(module, exports, __webpack_require__) { - var getBuiltIn = __webpack_require__(829); - module.exports = getBuiltIn('document', 'documentElement'); - }, - 1477: function(module, exports, __webpack_require__) { - var fails = __webpack_require__(716), - $RegExp = __webpack_require__(714).RegExp; - module.exports = fails(function() { - var re = $RegExp('.', 's'); - return !(re.dotAll && re.exec('\n') && 's' === re.flags); - }); - }, - 1478: function(module, exports, __webpack_require__) { - var fails = __webpack_require__(716), - $RegExp = __webpack_require__(714).RegExp; - module.exports = fails(function() { - var re = $RegExp('(?b)', 'g'); - return ( - 'b' !== re.exec('b').groups.a || 'bc' !== 'b'.replace(re, '$c') - ); - }); - }, - 1479: function(module, exports, __webpack_require__) { - 'use strict'; - var $ = __webpack_require__(817), - uncurryThis = __webpack_require__(715), - IndexedObject = __webpack_require__(889), - toIndexedObject = __webpack_require__(823), - arrayMethodIsStrict = __webpack_require__(1228), - un$Join = uncurryThis([].join), - ES3_STRINGS = IndexedObject != Object, - STRICT_METHOD = arrayMethodIsStrict('join', ','); - $( - { target: 'Array', proto: !0, forced: ES3_STRINGS || !STRICT_METHOD }, - { - join: function join(separator) { - return un$Join( - toIndexedObject(this), - void 0 === separator ? ',' : separator - ); - } - } - ); - }, - 1480: function(module, exports, __webpack_require__) { - 'use strict'; - var $ = __webpack_require__(817), - $map = __webpack_require__(1208).map; - $( - { - target: 'Array', - proto: !0, - forced: !__webpack_require__(1240)('map') - }, - { - map: function map(callbackfn) { - return $map( - this, - callbackfn, - arguments.length > 1 ? arguments[1] : void 0 - ); - } - } - ); - }, - 1481: function(module, exports, __webpack_require__) { - 'use strict'; - var apply = __webpack_require__(1446), - call = __webpack_require__(818), - uncurryThis = __webpack_require__(715), - fixRegExpWellKnownSymbolLogic = __webpack_require__(1234), - isRegExp = __webpack_require__(1484), - anObject = __webpack_require__(816), - requireObjectCoercible = __webpack_require__(828), - speciesConstructor = __webpack_require__(1485), - advanceStringIndex = __webpack_require__(1237), - toLength = __webpack_require__(1205), - toString = __webpack_require__(822), - getMethod = __webpack_require__(832), - arraySlice = __webpack_require__(1447), - callRegExpExec = __webpack_require__(1239), - regexpExec = __webpack_require__(869), - stickyHelpers = __webpack_require__(1236), - fails = __webpack_require__(716), - UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y, - min = Math.min, - $push = [].push, - exec = uncurryThis(/./.exec), - push = uncurryThis($push), - stringSlice = uncurryThis(''.slice), - SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function() { - var re = /(?:)/, - originalExec = re.exec; - re.exec = function() { - return originalExec.apply(this, arguments); - }; - var result = 'ab'.split(re); - return 2 !== result.length || 'a' !== result[0] || 'b' !== result[1]; - }); - fixRegExpWellKnownSymbolLogic( - 'split', - function(SPLIT, nativeSplit, maybeCallNative) { - var internalSplit; - return ( - (internalSplit = - 'c' == 'abbc'.split(/(b)*/)[1] || - 4 != 'test'.split(/(?:)/, -1).length || - 2 != 'ab'.split(/(?:ab)*/).length || - 4 != '.'.split(/(.?)(.?)/).length || - '.'.split(/()()/).length > 1 || - ''.split(/.?/).length - ? function(separator, limit) { - var string = toString(requireObjectCoercible(this)), - lim = void 0 === limit ? 4294967295 : limit >>> 0; - if (0 === lim) return []; - if (void 0 === separator) return [string]; - if (!isRegExp(separator)) - return call(nativeSplit, string, separator, lim); - for ( - var match, - lastIndex, - lastLength, - output = [], - flags = - (separator.ignoreCase ? 'i' : '') + - (separator.multiline ? 'm' : '') + - (separator.unicode ? 'u' : '') + - (separator.sticky ? 'y' : ''), - lastLastIndex = 0, - separatorCopy = new RegExp( - separator.source, - flags + 'g' - ); - (match = call(regexpExec, separatorCopy, string)) && - !( - (lastIndex = separatorCopy.lastIndex) > lastLastIndex && - (push( - output, - stringSlice(string, lastLastIndex, match.index) - ), - match.length > 1 && - match.index < string.length && - apply($push, output, arraySlice(match, 1)), - (lastLength = match[0].length), - (lastLastIndex = lastIndex), - output.length >= lim) - ); - - ) - separatorCopy.lastIndex === match.index && - separatorCopy.lastIndex++; - return ( - lastLastIndex === string.length - ? (!lastLength && exec(separatorCopy, '')) || - push(output, '') - : push(output, stringSlice(string, lastLastIndex)), - output.length > lim ? arraySlice(output, 0, lim) : output - ); - } - : '0'.split(void 0, 0).length - ? function(separator, limit) { - return void 0 === separator && 0 === limit - ? [] - : call(nativeSplit, this, separator, limit); - } - : nativeSplit), - [ - function split(separator, limit) { - var O = requireObjectCoercible(this), - splitter = - null == separator ? void 0 : getMethod(separator, SPLIT); - return splitter - ? call(splitter, separator, O, limit) - : call(internalSplit, toString(O), separator, limit); - }, - function(string, limit) { - var rx = anObject(this), - S = toString(string), - res = maybeCallNative( - internalSplit, - rx, - S, - limit, - internalSplit !== nativeSplit - ); - if (res.done) return res.value; - var C = speciesConstructor(rx, RegExp), - unicodeMatching = rx.unicode, - flags = - (rx.ignoreCase ? 'i' : '') + - (rx.multiline ? 'm' : '') + - (rx.unicode ? 'u' : '') + - (UNSUPPORTED_Y ? 'g' : 'y'), - splitter = new C( - UNSUPPORTED_Y ? '^(?:' + rx.source + ')' : rx, - flags - ), - lim = void 0 === limit ? 4294967295 : limit >>> 0; - if (0 === lim) return []; - if (0 === S.length) - return null === callRegExpExec(splitter, S) ? [S] : []; - for (var p = 0, q = 0, A = []; q < S.length; ) { - splitter.lastIndex = UNSUPPORTED_Y ? 0 : q; - var e, - z = callRegExpExec( - splitter, - UNSUPPORTED_Y ? stringSlice(S, q) : S - ); - if ( - null === z || - (e = min( - toLength(splitter.lastIndex + (UNSUPPORTED_Y ? q : 0)), - S.length - )) === p - ) - q = advanceStringIndex(S, q, unicodeMatching); - else { - if ((push(A, stringSlice(S, p, q)), A.length === lim)) - return A; - for (var i = 1; i <= z.length - 1; i++) - if ((push(A, z[i]), A.length === lim)) return A; - q = p = e; - } - } - return push(A, stringSlice(S, p)), A; - } - ] - ); - }, - !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC, - UNSUPPORTED_Y - ); - }, - 1484: function(module, exports, __webpack_require__) { - var isObject = __webpack_require__(824), - classof = __webpack_require__(827), - MATCH = __webpack_require__(717)('match'); - module.exports = function(it) { - var isRegExp; - return ( - isObject(it) && - (void 0 !== (isRegExp = it[MATCH]) - ? !!isRegExp - : 'RegExp' == classof(it)) - ); - }; - }, - 1485: function(module, exports, __webpack_require__) { - var anObject = __webpack_require__(816), - aConstructor = __webpack_require__(1523), - SPECIES = __webpack_require__(717)('species'); - module.exports = function(O, defaultConstructor) { - var S, - C = anObject(O).constructor; - return void 0 === C || null == (S = anObject(C)[SPECIES]) - ? defaultConstructor - : aConstructor(S); - }; - }, - 1523: function(module, exports, __webpack_require__) { - var global = __webpack_require__(714), - isConstructor = __webpack_require__(852), - tryToString = __webpack_require__(927), - TypeError = global.TypeError; - module.exports = function(argument) { - if (isConstructor(argument)) return argument; - throw TypeError(tryToString(argument) + ' is not a constructor'); - }; - }, - 1524: function(module, exports, __webpack_require__) { - var $ = __webpack_require__(817), - $parseInt = __webpack_require__(1525); - $({ global: !0, forced: parseInt != $parseInt }, { parseInt: $parseInt }); - }, - 1525: function(module, exports, __webpack_require__) { - var global = __webpack_require__(714), - fails = __webpack_require__(716), - uncurryThis = __webpack_require__(715), - toString = __webpack_require__(822), - trim = __webpack_require__(1526).trim, - whitespaces = __webpack_require__(1448), - $parseInt = global.parseInt, - Symbol = global.Symbol, - ITERATOR = Symbol && Symbol.iterator, - hex = /^[+-]?0x/i, - exec = uncurryThis(hex.exec), - FORCED = - 8 !== $parseInt(whitespaces + '08') || - 22 !== $parseInt(whitespaces + '0x16') || - (ITERATOR && - !fails(function() { - $parseInt(Object(ITERATOR)); - })); - module.exports = FORCED - ? function parseInt(string, radix) { - var S = trim(toString(string)); - return $parseInt(S, radix >>> 0 || (exec(hex, S) ? 16 : 10)); - } - : $parseInt; - }, - 1526: function(module, exports, __webpack_require__) { - var uncurryThis = __webpack_require__(715), - requireObjectCoercible = __webpack_require__(828), - toString = __webpack_require__(822), - whitespaces = __webpack_require__(1448), - replace = uncurryThis(''.replace), - whitespace = '[' + whitespaces + ']', - ltrim = RegExp('^' + whitespace + whitespace + '*'), - rtrim = RegExp(whitespace + whitespace + '*$'), - createMethod = function(TYPE) { - return function($this) { - var string = toString(requireObjectCoercible($this)); - return ( - 1 & TYPE && (string = replace(string, ltrim, '')), - 2 & TYPE && (string = replace(string, rtrim, '')), - string - ); - }; - }; - module.exports = { - start: createMethod(1), - end: createMethod(2), - trim: createMethod(3) - }; - }, - 1527: function(module, exports, __webpack_require__) { - __webpack_require__(817)( - { target: 'Array', stat: !0 }, - { isArray: __webpack_require__(851) } - ); - }, - 1528: function(module, exports, __webpack_require__) { - 'use strict'; - var $ = __webpack_require__(817), - global = __webpack_require__(714), - getBuiltIn = __webpack_require__(829), - apply = __webpack_require__(1446), - call = __webpack_require__(818), - uncurryThis = __webpack_require__(715), - IS_PURE = __webpack_require__(833), - DESCRIPTORS = __webpack_require__(821), - NATIVE_SYMBOL = __webpack_require__(913), - fails = __webpack_require__(716), - hasOwn = __webpack_require__(819), - isArray = __webpack_require__(851), - isCallable = __webpack_require__(766), - isObject = __webpack_require__(824), - isPrototypeOf = __webpack_require__(839), - isSymbol = __webpack_require__(905), - anObject = __webpack_require__(816), - toObject = __webpack_require__(830), - toIndexedObject = __webpack_require__(823), - toPropertyKey = __webpack_require__(838), - $toString = __webpack_require__(822), - createPropertyDescriptor = __webpack_require__(831), - nativeObjectCreate = __webpack_require__(836), - objectKeys = __webpack_require__(1207), - getOwnPropertyNamesModule = __webpack_require__(1202), - getOwnPropertyNamesExternal = __webpack_require__(1529), - getOwnPropertySymbolsModule = __webpack_require__(1225), - getOwnPropertyDescriptorModule = __webpack_require__(871), - definePropertyModule = __webpack_require__(820), - propertyIsEnumerableModule = __webpack_require__(1212), - arraySlice = __webpack_require__(1449), - redefine = __webpack_require__(825), - shared = __webpack_require__(840), - sharedKey = __webpack_require__(841), - hiddenKeys = __webpack_require__(842), - uid = __webpack_require__(1199), - wellKnownSymbol = __webpack_require__(717), - wrappedWellKnownSymbolModule = __webpack_require__(1450), - defineWellKnownSymbol = __webpack_require__(1451), - setToStringTag = __webpack_require__(1211), - InternalStateModule = __webpack_require__(834), - $forEach = __webpack_require__(1208).forEach, - HIDDEN = sharedKey('hidden'), - TO_PRIMITIVE = wellKnownSymbol('toPrimitive'), - setInternalState = InternalStateModule.set, - getInternalState = InternalStateModule.getterFor('Symbol'), - ObjectPrototype = Object.prototype, - $Symbol = global.Symbol, - SymbolPrototype = $Symbol && $Symbol.prototype, - TypeError = global.TypeError, - QObject = global.QObject, - $stringify = getBuiltIn('JSON', 'stringify'), - nativeGetOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f, - nativeDefineProperty = definePropertyModule.f, - nativeGetOwnPropertyNames = getOwnPropertyNamesExternal.f, - nativePropertyIsEnumerable = propertyIsEnumerableModule.f, - push = uncurryThis([].push), - AllSymbols = shared('symbols'), - ObjectPrototypeSymbols = shared('op-symbols'), - StringToSymbolRegistry = shared('string-to-symbol-registry'), - SymbolToStringRegistry = shared('symbol-to-string-registry'), - WellKnownSymbolsStore = shared('wks'), - USE_SETTER = - !QObject || !QObject.prototype || !QObject.prototype.findChild, - setSymbolDescriptor = - DESCRIPTORS && - fails(function() { - return ( - 7 != - nativeObjectCreate( - nativeDefineProperty({}, 'a', { - get: function() { - return nativeDefineProperty(this, 'a', { value: 7 }).a; - } - }) - ).a - ); - }) - ? function(O, P, Attributes) { - var ObjectPrototypeDescriptor = nativeGetOwnPropertyDescriptor( - ObjectPrototype, - P - ); - ObjectPrototypeDescriptor && delete ObjectPrototype[P], - nativeDefineProperty(O, P, Attributes), - ObjectPrototypeDescriptor && - O !== ObjectPrototype && - nativeDefineProperty( - ObjectPrototype, - P, - ObjectPrototypeDescriptor - ); - } - : nativeDefineProperty, - wrap = function(tag, description) { - var symbol = (AllSymbols[tag] = nativeObjectCreate(SymbolPrototype)); - return ( - setInternalState(symbol, { - type: 'Symbol', - tag: tag, - description: description - }), - DESCRIPTORS || (symbol.description = description), - symbol - ); - }, - $defineProperty = function defineProperty(O, P, Attributes) { - O === ObjectPrototype && - $defineProperty(ObjectPrototypeSymbols, P, Attributes), - anObject(O); - var key = toPropertyKey(P); - return ( - anObject(Attributes), - hasOwn(AllSymbols, key) - ? (Attributes.enumerable - ? (hasOwn(O, HIDDEN) && - O[HIDDEN][key] && - (O[HIDDEN][key] = !1), - (Attributes = nativeObjectCreate(Attributes, { - enumerable: createPropertyDescriptor(0, !1) - }))) - : (hasOwn(O, HIDDEN) || - nativeDefineProperty( - O, - HIDDEN, - createPropertyDescriptor(1, {}) - ), - (O[HIDDEN][key] = !0)), - setSymbolDescriptor(O, key, Attributes)) - : nativeDefineProperty(O, key, Attributes) - ); - }, - $defineProperties = function defineProperties(O, Properties) { - anObject(O); - var properties = toIndexedObject(Properties), - keys = objectKeys(properties).concat( - $getOwnPropertySymbols(properties) - ); - return ( - $forEach(keys, function(key) { - (DESCRIPTORS && !call($propertyIsEnumerable, properties, key)) || - $defineProperty(O, key, properties[key]); - }), - O - ); - }, - $propertyIsEnumerable = function propertyIsEnumerable(V) { - var P = toPropertyKey(V), - enumerable = call(nativePropertyIsEnumerable, this, P); - return ( - !( - this === ObjectPrototype && - hasOwn(AllSymbols, P) && - !hasOwn(ObjectPrototypeSymbols, P) - ) && - (!( - enumerable || - !hasOwn(this, P) || - !hasOwn(AllSymbols, P) || - (hasOwn(this, HIDDEN) && this[HIDDEN][P]) - ) || - enumerable) - ); - }, - $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(O, P) { - var it = toIndexedObject(O), - key = toPropertyKey(P); - if ( - it !== ObjectPrototype || - !hasOwn(AllSymbols, key) || - hasOwn(ObjectPrototypeSymbols, key) - ) { - var descriptor = nativeGetOwnPropertyDescriptor(it, key); - return ( - !descriptor || - !hasOwn(AllSymbols, key) || - (hasOwn(it, HIDDEN) && it[HIDDEN][key]) || - (descriptor.enumerable = !0), - descriptor - ); - } - }, - $getOwnPropertyNames = function getOwnPropertyNames(O) { - var names = nativeGetOwnPropertyNames(toIndexedObject(O)), - result = []; - return ( - $forEach(names, function(key) { - hasOwn(AllSymbols, key) || - hasOwn(hiddenKeys, key) || - push(result, key); - }), - result - ); - }, - $getOwnPropertySymbols = function getOwnPropertySymbols(O) { - var IS_OBJECT_PROTOTYPE = O === ObjectPrototype, - names = nativeGetOwnPropertyNames( - IS_OBJECT_PROTOTYPE ? ObjectPrototypeSymbols : toIndexedObject(O) - ), - result = []; - return ( - $forEach(names, function(key) { - !hasOwn(AllSymbols, key) || - (IS_OBJECT_PROTOTYPE && !hasOwn(ObjectPrototype, key)) || - push(result, AllSymbols[key]); - }), - result - ); - }; - (NATIVE_SYMBOL || - (($Symbol = function Symbol() { - if (isPrototypeOf(SymbolPrototype, this)) - throw TypeError('Symbol is not a constructor'); - var description = - arguments.length && void 0 !== arguments[0] - ? $toString(arguments[0]) - : void 0, - tag = uid(description), - setter = function(value) { - this === ObjectPrototype && - call(setter, ObjectPrototypeSymbols, value), - hasOwn(this, HIDDEN) && - hasOwn(this[HIDDEN], tag) && - (this[HIDDEN][tag] = !1), - setSymbolDescriptor( - this, - tag, - createPropertyDescriptor(1, value) - ); - }; - return ( - DESCRIPTORS && - USE_SETTER && - setSymbolDescriptor(ObjectPrototype, tag, { - configurable: !0, - set: setter - }), - wrap(tag, description) - ); - }), - redefine( - (SymbolPrototype = $Symbol.prototype), - 'toString', - function toString() { - return getInternalState(this).tag; - } - ), - redefine($Symbol, 'withoutSetter', function(description) { - return wrap(uid(description), description); - }), - (propertyIsEnumerableModule.f = $propertyIsEnumerable), - (definePropertyModule.f = $defineProperty), - (getOwnPropertyDescriptorModule.f = $getOwnPropertyDescriptor), - (getOwnPropertyNamesModule.f = getOwnPropertyNamesExternal.f = $getOwnPropertyNames), - (getOwnPropertySymbolsModule.f = $getOwnPropertySymbols), - (wrappedWellKnownSymbolModule.f = function(name) { - return wrap(wellKnownSymbol(name), name); - }), - DESCRIPTORS && - (nativeDefineProperty(SymbolPrototype, 'description', { - configurable: !0, - get: function description() { - return getInternalState(this).description; - } - }), - IS_PURE || - redefine( - ObjectPrototype, - 'propertyIsEnumerable', - $propertyIsEnumerable, - { unsafe: !0 } - ))), - $( - { global: !0, wrap: !0, forced: !NATIVE_SYMBOL, sham: !NATIVE_SYMBOL }, - { Symbol: $Symbol } - ), - $forEach(objectKeys(WellKnownSymbolsStore), function(name) { - defineWellKnownSymbol(name); - }), - $( - { target: 'Symbol', stat: !0, forced: !NATIVE_SYMBOL }, - { - for: function(key) { - var string = $toString(key); - if (hasOwn(StringToSymbolRegistry, string)) - return StringToSymbolRegistry[string]; - var symbol = $Symbol(string); - return ( - (StringToSymbolRegistry[string] = symbol), - (SymbolToStringRegistry[symbol] = string), - symbol - ); - }, - keyFor: function keyFor(sym) { - if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol'); - if (hasOwn(SymbolToStringRegistry, sym)) - return SymbolToStringRegistry[sym]; - }, - useSetter: function() { - USE_SETTER = !0; - }, - useSimple: function() { - USE_SETTER = !1; - } - } - ), - $( - { - target: 'Object', - stat: !0, - forced: !NATIVE_SYMBOL, - sham: !DESCRIPTORS - }, - { - create: function create(O, Properties) { - return void 0 === Properties - ? nativeObjectCreate(O) - : $defineProperties(nativeObjectCreate(O), Properties); - }, - defineProperty: $defineProperty, - defineProperties: $defineProperties, - getOwnPropertyDescriptor: $getOwnPropertyDescriptor - } - ), - $( - { target: 'Object', stat: !0, forced: !NATIVE_SYMBOL }, - { - getOwnPropertyNames: $getOwnPropertyNames, - getOwnPropertySymbols: $getOwnPropertySymbols - } - ), - $( - { - target: 'Object', - stat: !0, - forced: fails(function() { - getOwnPropertySymbolsModule.f(1); - }) - }, - { - getOwnPropertySymbols: function getOwnPropertySymbols(it) { - return getOwnPropertySymbolsModule.f(toObject(it)); - } - } - ), - $stringify) && - $( - { - target: 'JSON', - stat: !0, - forced: - !NATIVE_SYMBOL || - fails(function() { - var symbol = $Symbol(); - return ( - '[null]' != $stringify([symbol]) || - '{}' != $stringify({ a: symbol }) || - '{}' != $stringify(Object(symbol)) - ); - }) - }, - { - stringify: function stringify(it, replacer, space) { - var args = arraySlice(arguments), - $replacer = replacer; - if ((isObject(replacer) || void 0 !== it) && !isSymbol(it)) - return ( - isArray(replacer) || - (replacer = function(key, value) { - if ( - (isCallable($replacer) && - (value = call($replacer, this, key, value)), - !isSymbol(value)) - ) - return value; - }), - (args[1] = replacer), - apply($stringify, null, args) - ); - } - } - ); - if (!SymbolPrototype[TO_PRIMITIVE]) { - var valueOf = SymbolPrototype.valueOf; - redefine(SymbolPrototype, TO_PRIMITIVE, function(hint) { - return call(valueOf, this); - }); - } - setToStringTag($Symbol, 'Symbol'), (hiddenKeys[HIDDEN] = !0); - }, - 1529: function(module, exports, __webpack_require__) { - var classof = __webpack_require__(827), - toIndexedObject = __webpack_require__(823), - $getOwnPropertyNames = __webpack_require__(1202).f, - arraySlice = __webpack_require__(1447), - windowNames = - 'object' == typeof window && window && Object.getOwnPropertyNames - ? Object.getOwnPropertyNames(window) - : []; - module.exports.f = function getOwnPropertyNames(it) { - return windowNames && 'Window' == classof(it) - ? (function(it) { - try { - return $getOwnPropertyNames(it); - } catch (error) { - return arraySlice(windowNames); - } - })(it) - : $getOwnPropertyNames(toIndexedObject(it)); - }; - }, - 1530: function(module, exports, __webpack_require__) { - var global = __webpack_require__(714); - module.exports = global; - }, - 1531: function(module, exports, __webpack_require__) { - 'use strict'; - var $ = __webpack_require__(817), - DESCRIPTORS = __webpack_require__(821), - global = __webpack_require__(714), - uncurryThis = __webpack_require__(715), - hasOwn = __webpack_require__(819), - isCallable = __webpack_require__(766), - isPrototypeOf = __webpack_require__(839), - toString = __webpack_require__(822), - defineProperty = __webpack_require__(820).f, - copyConstructorProperties = __webpack_require__(1216), - NativeSymbol = global.Symbol, - SymbolPrototype = NativeSymbol && NativeSymbol.prototype; - if ( - DESCRIPTORS && - isCallable(NativeSymbol) && - (!('description' in SymbolPrototype) || - void 0 !== NativeSymbol().description) - ) { - var EmptyStringDescriptionStore = {}, - SymbolWrapper = function Symbol() { - var description = - arguments.length < 1 || void 0 === arguments[0] - ? void 0 - : toString(arguments[0]), - result = isPrototypeOf(SymbolPrototype, this) - ? new NativeSymbol(description) - : void 0 === description - ? NativeSymbol() - : NativeSymbol(description); - return ( - '' === description && (EmptyStringDescriptionStore[result] = !0), - result - ); - }; - copyConstructorProperties(SymbolWrapper, NativeSymbol), - (SymbolWrapper.prototype = SymbolPrototype), - (SymbolPrototype.constructor = SymbolWrapper); - var NATIVE_SYMBOL = 'Symbol(test)' == String(NativeSymbol('test')), - symbolToString = uncurryThis(SymbolPrototype.toString), - symbolValueOf = uncurryThis(SymbolPrototype.valueOf), - regexp = /^Symbol\((.*)\)[^)]+$/, - replace = uncurryThis(''.replace), - stringSlice = uncurryThis(''.slice); - defineProperty(SymbolPrototype, 'description', { - configurable: !0, - get: function description() { - var symbol = symbolValueOf(this), - string = symbolToString(symbol); - if (hasOwn(EmptyStringDescriptionStore, symbol)) return ''; - var desc = NATIVE_SYMBOL - ? stringSlice(string, 7, -1) - : replace(string, regexp, '$1'); - return '' === desc ? void 0 : desc; - } - }), - $({ global: !0, forced: !0 }, { Symbol: SymbolWrapper }); - } - }, - 1545: function(module, exports, __webpack_require__) { - __webpack_require__(1451)('iterator'); - }, - 1546: function(module, exports, __webpack_require__) { - 'use strict'; - var charAt = __webpack_require__(1238).charAt, - toString = __webpack_require__(822), - InternalStateModule = __webpack_require__(834), - defineIterator = __webpack_require__(1452), - setInternalState = InternalStateModule.set, - getInternalState = InternalStateModule.getterFor('String Iterator'); - defineIterator( - String, - 'String', - function(iterated) { - setInternalState(this, { - type: 'String Iterator', - string: toString(iterated), - index: 0 - }); - }, - function next() { - var point, - state = getInternalState(this), - string = state.string, - index = state.index; - return index >= string.length - ? { value: void 0, done: !0 } - : ((point = charAt(string, index)), - (state.index += point.length), - { value: point, done: !1 }); - } - ); - }, - 1547: function(module, exports, __webpack_require__) { - 'use strict'; - var IteratorPrototype = __webpack_require__(1453).IteratorPrototype, - create = __webpack_require__(836), - createPropertyDescriptor = __webpack_require__(831), - setToStringTag = __webpack_require__(1211), - Iterators = __webpack_require__(837), - returnThis = function() { - return this; - }; - module.exports = function( - IteratorConstructor, - NAME, - next, - ENUMERABLE_NEXT - ) { - var TO_STRING_TAG = NAME + ' Iterator'; - return ( - (IteratorConstructor.prototype = create(IteratorPrototype, { - next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) - })), - setToStringTag(IteratorConstructor, TO_STRING_TAG, !1, !0), - (Iterators[TO_STRING_TAG] = returnThis), - IteratorConstructor - ); - }; - }, - 1554: function(module, exports, __webpack_require__) { - var fails = __webpack_require__(716); - module.exports = !fails(function() { - function F() {} - return ( - (F.prototype.constructor = null), - Object.getPrototypeOf(new F()) !== F.prototype - ); - }); - }, - 1563: function(module, exports, __webpack_require__) { - var uncurryThis = __webpack_require__(715), - anObject = __webpack_require__(816), - aPossiblePrototype = __webpack_require__(1564); - module.exports = - Object.setPrototypeOf || - ('__proto__' in {} - ? (function() { - var setter, - CORRECT_SETTER = !1, - test = {}; - try { - (setter = uncurryThis( - Object.getOwnPropertyDescriptor(Object.prototype, '__proto__') - .set - ))(test, []), - (CORRECT_SETTER = test instanceof Array); - } catch (error) {} - return function setPrototypeOf(O, proto) { - return ( - anObject(O), - aPossiblePrototype(proto), - CORRECT_SETTER ? setter(O, proto) : (O.__proto__ = proto), - O - ); - }; - })() - : void 0); - }, - 1564: function(module, exports, __webpack_require__) { - var global = __webpack_require__(714), - isCallable = __webpack_require__(766), - String = global.String, - TypeError = global.TypeError; - module.exports = function(argument) { - if ('object' == typeof argument || isCallable(argument)) - return argument; - throw TypeError("Can't set " + String(argument) + ' as a prototype'); - }; - }, - 1565: function(module, exports, __webpack_require__) { - var wellKnownSymbol = __webpack_require__(717), - create = __webpack_require__(836), - definePropertyModule = __webpack_require__(820), - UNSCOPABLES = wellKnownSymbol('unscopables'), - ArrayPrototype = Array.prototype; - null == ArrayPrototype[UNSCOPABLES] && - definePropertyModule.f(ArrayPrototype, UNSCOPABLES, { - configurable: !0, - value: create(null) - }), - (module.exports = function(key) { - ArrayPrototype[UNSCOPABLES][key] = !0; - }); - }, - 1566: function(module, exports, __webpack_require__) { - var global = __webpack_require__(714), - DOMIterables = __webpack_require__(1229), - DOMTokenListPrototype = __webpack_require__(1230), - ArrayIteratorMethods = __webpack_require__(1455), - createNonEnumerableProperty = __webpack_require__(826), - wellKnownSymbol = __webpack_require__(717), - ITERATOR = wellKnownSymbol('iterator'), - TO_STRING_TAG = wellKnownSymbol('toStringTag'), - ArrayValues = ArrayIteratorMethods.values, - handlePrototype = function(CollectionPrototype, COLLECTION_NAME) { - if (CollectionPrototype) { - if (CollectionPrototype[ITERATOR] !== ArrayValues) - try { - createNonEnumerableProperty( - CollectionPrototype, - ITERATOR, - ArrayValues - ); - } catch (error) { - CollectionPrototype[ITERATOR] = ArrayValues; - } - if ( - (CollectionPrototype[TO_STRING_TAG] || - createNonEnumerableProperty( - CollectionPrototype, - TO_STRING_TAG, - COLLECTION_NAME - ), - DOMIterables[COLLECTION_NAME]) - ) - for (var METHOD_NAME in ArrayIteratorMethods) - if ( - CollectionPrototype[METHOD_NAME] !== - ArrayIteratorMethods[METHOD_NAME] - ) - try { - createNonEnumerableProperty( - CollectionPrototype, - METHOD_NAME, - ArrayIteratorMethods[METHOD_NAME] - ); - } catch (error) { - CollectionPrototype[METHOD_NAME] = - ArrayIteratorMethods[METHOD_NAME]; - } - } - }; - for (var COLLECTION_NAME in DOMIterables) - handlePrototype( - global[COLLECTION_NAME] && global[COLLECTION_NAME].prototype, - COLLECTION_NAME - ); - handlePrototype(DOMTokenListPrototype, 'DOMTokenList'); - }, - 1567: function(module, exports, __webpack_require__) { - 'use strict'; - var $ = __webpack_require__(817), - global = __webpack_require__(714), - isArray = __webpack_require__(851), - isConstructor = __webpack_require__(852), - isObject = __webpack_require__(824), - toAbsoluteIndex = __webpack_require__(1203), - lengthOfArrayLike = __webpack_require__(835), - toIndexedObject = __webpack_require__(823), - createProperty = __webpack_require__(1210), - wellKnownSymbol = __webpack_require__(717), - arrayMethodHasSpeciesSupport = __webpack_require__(1240), - un$Slice = __webpack_require__(1449), - HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('slice'), - SPECIES = wellKnownSymbol('species'), - Array = global.Array, - max = Math.max; - $( - { target: 'Array', proto: !0, forced: !HAS_SPECIES_SUPPORT }, - { - slice: function slice(start, end) { - var Constructor, - result, - n, - O = toIndexedObject(this), - length = lengthOfArrayLike(O), - k = toAbsoluteIndex(start, length), - fin = toAbsoluteIndex(void 0 === end ? length : end, length); - if ( - isArray(O) && - ((Constructor = O.constructor), - ((isConstructor(Constructor) && - (Constructor === Array || isArray(Constructor.prototype))) || - (isObject(Constructor) && - null === (Constructor = Constructor[SPECIES]))) && - (Constructor = void 0), - Constructor === Array || void 0 === Constructor) - ) - return un$Slice(O, k, fin); - for ( - result = new (void 0 === Constructor ? Array : Constructor)( - max(fin - k, 0) - ), - n = 0; - k < fin; - k++, n++ - ) - k in O && createProperty(result, n, O[k]); - return (result.length = n), result; - } - } - ); - }, - 1568: function(module, exports, __webpack_require__) { - var DESCRIPTORS = __webpack_require__(821), - FUNCTION_NAME_EXISTS = __webpack_require__(843).EXISTS, - uncurryThis = __webpack_require__(715), - defineProperty = __webpack_require__(820).f, - FunctionPrototype = Function.prototype, - functionToString = uncurryThis(FunctionPrototype.toString), - nameRE = /function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/, - regExpExec = uncurryThis(nameRE.exec); - DESCRIPTORS && - !FUNCTION_NAME_EXISTS && - defineProperty(FunctionPrototype, 'name', { - configurable: !0, - get: function() { - try { - return regExpExec(nameRE, functionToString(this))[1]; - } catch (error) { - return ''; - } - } - }); - }, - 1569: function(module, exports, __webpack_require__) { - var $ = __webpack_require__(817), - from = __webpack_require__(1570); - $( - { - target: 'Array', - stat: !0, - forced: !__webpack_require__(1575)(function(iterable) { - Array.from(iterable); - }) - }, - { from: from } - ); - }, - 1570: function(module, exports, __webpack_require__) { - 'use strict'; - var global = __webpack_require__(714), - bind = __webpack_require__(1227), - call = __webpack_require__(818), - toObject = __webpack_require__(830), - callWithSafeIterationClosing = __webpack_require__(1571), - isArrayIteratorMethod = __webpack_require__(1573), - isConstructor = __webpack_require__(852), - lengthOfArrayLike = __webpack_require__(835), - createProperty = __webpack_require__(1210), - getIterator = __webpack_require__(1574), - getIteratorMethod = __webpack_require__(1456), - Array = global.Array; - module.exports = function from(arrayLike) { - var O = toObject(arrayLike), - IS_CONSTRUCTOR = isConstructor(this), - argumentsLength = arguments.length, - mapfn = argumentsLength > 1 ? arguments[1] : void 0, - mapping = void 0 !== mapfn; - mapping && - (mapfn = bind(mapfn, argumentsLength > 2 ? arguments[2] : void 0)); - var length, - result, - step, - iterator, - next, - value, - iteratorMethod = getIteratorMethod(O), - index = 0; - if ( - !iteratorMethod || - (this == Array && isArrayIteratorMethod(iteratorMethod)) - ) - for ( - length = lengthOfArrayLike(O), - result = IS_CONSTRUCTOR ? new this(length) : Array(length); - length > index; - index++ - ) - (value = mapping ? mapfn(O[index], index) : O[index]), - createProperty(result, index, value); - else - for ( - next = (iterator = getIterator(O, iteratorMethod)).next, - result = IS_CONSTRUCTOR ? new this() : []; - !(step = call(next, iterator)).done; - index++ - ) - (value = mapping - ? callWithSafeIterationClosing( - iterator, - mapfn, - [step.value, index], - !0 - ) - : step.value), - createProperty(result, index, value); - return (result.length = index), result; - }; - }, - 1571: function(module, exports, __webpack_require__) { - var anObject = __webpack_require__(816), - iteratorClose = __webpack_require__(1572); - module.exports = function(iterator, fn, value, ENTRIES) { - try { - return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value); - } catch (error) { - iteratorClose(iterator, 'throw', error); - } - }; - }, - 1572: function(module, exports, __webpack_require__) { - var call = __webpack_require__(818), - anObject = __webpack_require__(816), - getMethod = __webpack_require__(832); - module.exports = function(iterator, kind, value) { - var innerResult, innerError; - anObject(iterator); - try { - if (!(innerResult = getMethod(iterator, 'return'))) { - if ('throw' === kind) throw value; - return value; - } - innerResult = call(innerResult, iterator); - } catch (error) { - (innerError = !0), (innerResult = error); - } - if ('throw' === kind) throw value; - if (innerError) throw innerResult; - return anObject(innerResult), value; - }; - }, - 1573: function(module, exports, __webpack_require__) { - var wellKnownSymbol = __webpack_require__(717), - Iterators = __webpack_require__(837), - ITERATOR = wellKnownSymbol('iterator'), - ArrayPrototype = Array.prototype; - module.exports = function(it) { - return ( - void 0 !== it && - (Iterators.Array === it || ArrayPrototype[ITERATOR] === it) - ); - }; - }, - 1574: function(module, exports, __webpack_require__) { - var global = __webpack_require__(714), - call = __webpack_require__(818), - aCallable = __webpack_require__(919), - anObject = __webpack_require__(816), - tryToString = __webpack_require__(927), - getIteratorMethod = __webpack_require__(1456), - TypeError = global.TypeError; - module.exports = function(argument, usingIterator) { - var iteratorMethod = - arguments.length < 2 ? getIteratorMethod(argument) : usingIterator; - if (aCallable(iteratorMethod)) - return anObject(call(iteratorMethod, argument)); - throw TypeError(tryToString(argument) + ' is not iterable'); - }; - }, - 1575: function(module, exports, __webpack_require__) { - var ITERATOR = __webpack_require__(717)('iterator'), - SAFE_CLOSING = !1; - try { - var called = 0, - iteratorWithReturn = { - next: function() { - return { done: !!called++ }; - }, - return: function() { - SAFE_CLOSING = !0; - } - }; - (iteratorWithReturn[ITERATOR] = function() { - return this; - }), - Array.from(iteratorWithReturn, function() { - throw 2; - }); - } catch (error) {} - module.exports = function(exec, SKIP_CLOSING) { - if (!SKIP_CLOSING && !SAFE_CLOSING) return !1; - var ITERATION_SUPPORT = !1; - try { - var object = {}; - (object[ITERATOR] = function() { - return { - next: function() { - return { done: (ITERATION_SUPPORT = !0) }; - } - }; - }), - exec(object); - } catch (error) {} - return ITERATION_SUPPORT; - }; - }, - 1576: function(module, exports, __webpack_require__) { - __webpack_require__(870); - var conversions = __webpack_require__(1232); - function deriveBFS(fromModel) { - var graph = (function buildGraph() { - for ( - var graph = {}, - models = Object.keys(conversions), - len = models.length, - i = 0; - i < len; - i++ - ) - graph[models[i]] = { distance: -1, parent: null }; - return graph; - })(), - queue = [fromModel]; - for (graph[fromModel].distance = 0; queue.length; ) - for ( - var current = queue.pop(), - adjacents = Object.keys(conversions[current]), - len = adjacents.length, - i = 0; - i < len; - i++ - ) { - var adjacent = adjacents[i], - node = graph[adjacent]; - -1 === node.distance && - ((node.distance = graph[current].distance + 1), - (node.parent = current), - queue.unshift(adjacent)); - } - return graph; - } - function link(from, to) { - return function(args) { - return to(from(args)); - }; - } - function wrapConversion(toModel, graph) { - for ( - var path = [graph[toModel].parent, toModel], - fn = conversions[graph[toModel].parent][toModel], - cur = graph[toModel].parent; - graph[cur].parent; - - ) - path.unshift(graph[cur].parent), - (fn = link(conversions[graph[cur].parent][cur], fn)), - (cur = graph[cur].parent); - return (fn.conversion = path), fn; - } - module.exports = function(fromModel) { - for ( - var graph = deriveBFS(fromModel), - conversion = {}, - models = Object.keys(graph), - len = models.length, - i = 0; - i < len; - i++ - ) { - var toModel = models[i]; - null !== graph[toModel].parent && - (conversion[toModel] = wrapConversion(toModel, graph)); - } - return conversion; - }; - }, - 1655: function(module, __webpack_exports__, __webpack_require__) { - 'use strict'; - __webpack_require__.r(__webpack_exports__), - __webpack_require__.d(__webpack_exports__, 'ColorControl', function() { - return Color_ColorControl; - }); - __webpack_require__(19), - __webpack_require__(6), - __webpack_require__(11), - __webpack_require__(8), - __webpack_require__(13), - __webpack_require__(9), - __webpack_require__(10), - __webpack_require__(12), - __webpack_require__(20), - __webpack_require__(18), - __webpack_require__(14), - __webpack_require__(138), - __webpack_require__(64), - __webpack_require__(28), - __webpack_require__(24), - __webpack_require__(240), - __webpack_require__(126), - __webpack_require__(303), - __webpack_require__(109), - __webpack_require__(17), - __webpack_require__(49), - __webpack_require__(15); - var react = __webpack_require__(0), - react_default = __webpack_require__.n(react); - function index_module_u() { - return (index_module_u = - Object.assign || - function(e) { - for (var r = 1; r < arguments.length; r++) { - var t = arguments[r]; - for (var n in t) - Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]); - } - return e; - }).apply(this, arguments); - } - function index_module_c(e, r) { - if (null == e) return {}; - var t, - n, - o = {}, - a = Object.keys(e); - for (n = 0; n < a.length; n++) - r.indexOf((t = a[n])) >= 0 || (o[t] = e[t]); - return o; - } - function index_module_i(e) { - var t = Object(react.useRef)(e), - n = Object(react.useRef)(function(e) { - t.current && t.current(e); - }); - return (t.current = e), n.current; - } - var index_module_s = function(e, r, t) { - return ( - void 0 === r && (r = 0), - void 0 === t && (t = 1), - e > t ? t : e < r ? r : e - ); - }, - index_module_f = function(e) { - return 'touches' in e; - }, - index_module_v = function(e) { - return (e && e.ownerDocument.defaultView) || self; - }, - index_module_d = function(e, r, t) { - var n = e.getBoundingClientRect(), - o = index_module_f(r) - ? (function(e, r) { - for (var t = 0; t < e.length; t++) - if (e[t].identifier === r) return e[t]; - return e[0]; - })(r.touches, t) - : r; - return { - left: index_module_s( - (o.pageX - (n.left + index_module_v(e).pageXOffset)) / n.width - ), - top: index_module_s( - (o.pageY - (n.top + index_module_v(e).pageYOffset)) / n.height - ) - }; - }, - index_module_h = function(e) { - !index_module_f(e) && e.preventDefault(); - }, - index_module_m = react_default.a.memo(function(o) { - var a = o.onMove, - l = o.onKey, - s = index_module_c(o, ['onMove', 'onKey']), - m = Object(react.useRef)(null), - g = index_module_i(a), - p = index_module_i(l), - b = Object(react.useRef)(null), - _ = Object(react.useRef)(!1), - x = Object(react.useMemo)( - function() { - var e = function(e) { - index_module_h(e), - (index_module_f(e) - ? e.touches.length > 0 - : e.buttons > 0) && m.current - ? g(index_module_d(m.current, e, b.current)) - : t(!1); - }, - r = function() { - return t(!1); - }; - function t(t) { - var n = _.current, - o = index_module_v(m.current), - a = t ? o.addEventListener : o.removeEventListener; - a(n ? 'touchmove' : 'mousemove', e), - a(n ? 'touchend' : 'mouseup', r); - } - return [ - function(e) { - var r = e.nativeEvent, - n = m.current; - if ( - n && - (index_module_h(r), - !(function(e, r) { - return r && !index_module_f(e); - })(r, _.current) && n) - ) { - if (index_module_f(r)) { - _.current = !0; - var o = r.changedTouches || []; - o.length && (b.current = o[0].identifier); - } - n.focus(), g(index_module_d(n, r, b.current)), t(!0); - } - }, - function(e) { - var r = e.which || e.keyCode; - r < 37 || - r > 40 || - (e.preventDefault(), - p({ - left: 39 === r ? 0.05 : 37 === r ? -0.05 : 0, - top: 40 === r ? 0.05 : 38 === r ? -0.05 : 0 - })); - }, - t - ]; - }, - [p, g] - ), - C = x[0], - E = x[1], - H = x[2]; - return ( - Object(react.useEffect)( - function() { - return H; - }, - [H] - ), - react_default.a.createElement( - 'div', - index_module_u({}, s, { - onTouchStart: C, - onMouseDown: C, - className: 'react-colorful__interactive', - ref: m, - onKeyDown: E, - tabIndex: 0, - role: 'slider' - }) - ) - ); - }), - index_module_g = function(e) { - return e.filter(Boolean).join(' '); - }, - index_module_p = function(r) { - var t = r.color, - n = r.left, - o = r.top, - a = void 0 === o ? 0.5 : o, - l = index_module_g(['react-colorful__pointer', r.className]); - return react_default.a.createElement( - 'div', - { - className: l, - style: { top: 100 * a + '%', left: 100 * n + '%' } - }, - react_default.a.createElement('div', { - className: 'react-colorful__pointer-fill', - style: { backgroundColor: t } - }) - ); - }, - index_module_b = function(e, r, t) { - return ( - void 0 === r && (r = 0), - void 0 === t && (t = Math.pow(10, r)), - Math.round(t * e) / t - ); - }, - index_module_ = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, - index_module_x = function(e) { - return ( - '#' === e[0] && (e = e.substr(1)), - e.length < 6 - ? { - r: parseInt(e[0] + e[0], 16), - g: parseInt(e[1] + e[1], 16), - b: parseInt(e[2] + e[2], 16), - a: 1 - } - : { - r: parseInt(e.substr(0, 2), 16), - g: parseInt(e.substr(2, 2), 16), - b: parseInt(e.substr(4, 2), 16), - a: 1 - } - ); - }, - index_module_C = function(e, r) { - return ( - void 0 === r && (r = 'deg'), Number(e) * (index_module_[r] || 1) - ); - }, - index_module_E = function(e) { - var r = /hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec( - e - ); - return r - ? M({ - h: index_module_C(r[1], r[2]), - s: Number(r[3]), - l: Number(r[4]), - a: void 0 === r[5] ? 1 : Number(r[5]) / (r[6] ? 100 : 1) - }) - : { h: 0, s: 0, v: 0, a: 1 }; - }, - M = function(e) { - var r = e.s, - t = e.l; - return { - h: e.h, - s: - (r *= (t < 50 ? t : 100 - t) / 100) > 0 - ? ((2 * r) / (t + r)) * 100 - : 0, - v: t + r, - a: e.a - }; - }, - N = function(e) { - var r = e.s, - t = e.v, - n = e.a, - o = ((200 - r) * t) / 100; - return { - h: index_module_b(e.h), - s: index_module_b( - o > 0 && o < 200 - ? ((r * t) / 100 / (o <= 100 ? o : 200 - o)) * 100 - : 0 - ), - l: index_module_b(o / 2), - a: index_module_b(n, 2) - }; - }, - w = function(e) { - var r = N(e); - return 'hsl(' + r.h + ', ' + r.s + '%, ' + r.l + '%)'; - }, - y = function(e) { - var r = N(e); - return 'hsla(' + r.h + ', ' + r.s + '%, ' + r.l + '%, ' + r.a + ')'; - }, - q = function(e) { - var r = e.h, - t = e.s, - n = e.v, - o = e.a; - (r = (r / 360) * 6), (t /= 100), (n /= 100); - var a = Math.floor(r), - l = n * (1 - t), - u = n * (1 - (r - a) * t), - c = n * (1 - (1 - r + a) * t), - i = a % 6; - return { - r: index_module_b(255 * [n, u, l, l, c, n][i]), - g: index_module_b(255 * [c, n, n, u, l, l][i]), - b: index_module_b(255 * [l, l, c, n, n, u][i]), - a: index_module_b(o, 2) - }; - }, - I = function(e) { - var r = /rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec( - e - ); - return r - ? B({ - r: Number(r[1]) / (r[2] ? 100 / 255 : 1), - g: Number(r[3]) / (r[4] ? 100 / 255 : 1), - b: Number(r[5]) / (r[6] ? 100 / 255 : 1), - a: void 0 === r[7] ? 1 : Number(r[7]) / (r[8] ? 100 : 1) - }) - : { h: 0, s: 0, v: 0, a: 1 }; - }, - z = function(e) { - var r = e.toString(16); - return r.length < 2 ? '0' + r : r; - }, - B = function(e) { - var r = e.r, - t = e.g, - n = e.b, - o = e.a, - a = Math.max(r, t, n), - l = a - Math.min(r, t, n), - u = l - ? a === r - ? (t - n) / l - : a === t - ? 2 + (n - r) / l - : 4 + (r - t) / l - : 0; - return { - h: index_module_b(60 * (u < 0 ? u + 6 : u)), - s: index_module_b(a ? (l / a) * 100 : 0), - v: index_module_b((a / 255) * 100), - a: o - }; - }, - K = react_default.a.memo(function(r) { - var t = r.hue, - n = r.onChange, - o = index_module_g(['react-colorful__hue', r.className]); - return react_default.a.createElement( - 'div', - { className: o }, - react_default.a.createElement( - index_module_m, - { - onMove: function(e) { - n({ h: 360 * e.left }); - }, - onKey: function(e) { - n({ h: index_module_s(t + 360 * e.left, 0, 360) }); - }, - 'aria-label': 'Hue', - 'aria-valuetext': index_module_b(t) - }, - react_default.a.createElement(index_module_p, { - className: 'react-colorful__hue-pointer', - left: t / 360, - color: w({ h: t, s: 100, v: 100, a: 1 }) - }) - ) - ); - }), - L = react_default.a.memo(function(r) { - var t = r.hsva, - n = r.onChange, - o = { backgroundColor: w({ h: t.h, s: 100, v: 100, a: 1 }) }; - return react_default.a.createElement( - 'div', - { className: 'react-colorful__saturation', style: o }, - react_default.a.createElement( - index_module_m, - { - onMove: function(e) { - n({ s: 100 * e.left, v: 100 - 100 * e.top }); - }, - onKey: function(e) { - n({ - s: index_module_s(t.s + 100 * e.left, 0, 100), - v: index_module_s(t.v - 100 * e.top, 0, 100) - }); - }, - 'aria-label': 'Color', - 'aria-valuetext': - 'Saturation ' + - index_module_b(t.s) + - '%, Brightness ' + - index_module_b(t.v) + - '%' - }, - react_default.a.createElement(index_module_p, { - className: 'react-colorful__saturation-pointer', - top: 1 - t.v / 100, - left: t.s / 100, - color: w(t) - }) - ) - ); - }), - A = function(e, r) { - if (e === r) return !0; - for (var t in e) if (e[t] !== r[t]) return !1; - return !0; - }, - S = function(e, r) { - return e.replace(/\s/g, '') === r.replace(/\s/g, ''); - }; - function T(e, t, l) { - var u = index_module_i(l), - c = Object(react.useState)(function() { - return e.toHsva(t); - }), - s = c[0], - f = c[1], - v = Object(react.useRef)({ color: t, hsva: s }); - Object(react.useEffect)( - function() { - if (!e.equal(t, v.current.color)) { - var r = e.toHsva(t); - (v.current = { hsva: r, color: t }), f(r); - } - }, - [t, e] - ), - Object(react.useEffect)( - function() { - var r; - A(s, v.current.hsva) || - e.equal((r = e.fromHsva(s)), v.current.color) || - ((v.current = { hsva: s, color: r }), u(r)); - }, - [s, e, u] - ); - var d = Object(react.useCallback)(function(e) { - f(function(r) { - return Object.assign({}, r, e); - }); - }, []); - return [s, d]; - } - var F, - _ColorPicker, - _fallbackColor, - P = - 'undefined' != typeof window - ? react.useLayoutEffect - : react.useEffect, - R = new Map(), - V = function(e) { - P(function() { - var r = e.current ? e.current.ownerDocument : document; - if (void 0 !== r && !R.has(r)) { - var t = r.createElement('style'); - (t.innerHTML = - '.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url(\'data:image/svg+xml;charset=utf-8,\')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}'), - R.set(r, t); - var n = F || __webpack_require__.nc; - n && t.setAttribute('nonce', n), r.head.appendChild(t); - } - }, []); - }, - $ = function(t) { - var n = t.className, - o = t.colorModel, - a = t.color, - l = void 0 === a ? o.defaultColor : a, - i = t.onChange, - s = index_module_c(t, [ - 'className', - 'colorModel', - 'color', - 'onChange' - ]), - f = Object(react.useRef)(null); - V(f); - var v = T(o, l, i), - d = v[0], - h = v[1], - m = index_module_g(['react-colorful', n]); - return react_default.a.createElement( - 'div', - index_module_u({}, s, { ref: f, className: m }), - react_default.a.createElement(L, { hsva: d, onChange: h }), - react_default.a.createElement(K, { - hue: d.h, - onChange: h, - className: 'react-colorful__last-control' - }) - ); - }, - G = { - defaultColor: '000', - toHsva: function(e) { - return B(index_module_x(e)); - }, - fromHsva: function(e) { - return (t = (r = q(e)).g), (n = r.b), '#' + z(r.r) + z(t) + z(n); - var r, t, n; - }, - equal: function(e, r) { - return ( - e.toLowerCase() === r.toLowerCase() || - A(index_module_x(e), index_module_x(r)) - ); - } - }, - Q = function(r) { - var t = r.className, - n = r.hsva, - o = r.onChange, - a = { - backgroundImage: - 'linear-gradient(90deg, ' + - y(Object.assign({}, n, { a: 0 })) + - ', ' + - y(Object.assign({}, n, { a: 1 })) + - ')' - }, - l = index_module_g(['react-colorful__alpha', t]); - return react_default.a.createElement( - 'div', - { className: l }, - react_default.a.createElement('div', { - className: 'react-colorful__alpha-gradient', - style: a - }), - react_default.a.createElement( - index_module_m, - { - onMove: function(e) { - o({ a: e.left }); - }, - onKey: function(e) { - o({ a: index_module_s(n.a + e.left) }); - }, - 'aria-label': 'Alpha', - 'aria-valuetext': index_module_b(100 * n.a) + '%' - }, - react_default.a.createElement(index_module_p, { - className: 'react-colorful__alpha-pointer', - left: n.a, - color: y(n) - }) - ) - ); - }, - U = function(t) { - var n = t.className, - o = t.colorModel, - a = t.color, - l = void 0 === a ? o.defaultColor : a, - i = t.onChange, - s = index_module_c(t, [ - 'className', - 'colorModel', - 'color', - 'onChange' - ]), - f = Object(react.useRef)(null); - V(f); - var v = T(o, l, i), - d = v[0], - h = v[1], - m = index_module_g(['react-colorful', n]); - return react_default.a.createElement( - 'div', - index_module_u({}, s, { ref: f, className: m }), - react_default.a.createElement(L, { hsva: d, onChange: h }), - react_default.a.createElement(K, { hue: d.h, onChange: h }), - react_default.a.createElement(Q, { - hsva: d, - onChange: h, - className: 'react-colorful__last-control' - }) - ); - }, - ee = { - defaultColor: 'hsla(0, 0%, 0%, 1)', - toHsva: index_module_E, - fromHsva: y, - equal: S - }, - ge = { - defaultColor: 'rgba(0, 0, 0, 1)', - toHsva: I, - fromHsva: function(e) { - var r = q(e); - return 'rgba(' + r.r + ', ' + r.g + ', ' + r.b + ', ' + r.a + ')'; - }, - equal: S - }, - color_convert = __webpack_require__(1458), - color_convert_default = __webpack_require__.n(color_convert), - throttle = __webpack_require__(863), - throttle_default = __webpack_require__.n(throttle), - esm = __webpack_require__(1), - TooltipNote = __webpack_require__(601), - lazy_WithTooltip = __webpack_require__(296), - esm_form = __webpack_require__(55), - icon = __webpack_require__(48), - helpers = __webpack_require__(47); - function _slicedToArray(arr, i) { - return ( - (function _arrayWithHoles(arr) { - if (Array.isArray(arr)) return arr; - })(arr) || - (function _iterableToArrayLimit(arr, i) { - if ( - 'undefined' == typeof Symbol || - !(Symbol.iterator in Object(arr)) - ) - return; - var _arr = [], - _n = !0, - _d = !1, - _e = void 0; - try { - for ( - var _s, _i = arr[Symbol.iterator](); - !(_n = (_s = _i.next()).done) && - (_arr.push(_s.value), !i || _arr.length !== i); - _n = !0 - ); - } catch (err) { - (_d = !0), (_e = err); - } finally { - try { - _n || null == _i.return || _i.return(); - } finally { - if (_d) throw _e; - } - } - return _arr; - })(arr, i) || - (function _unsupportedIterableToArray(o, minLen) { - if (!o) return; - if ('string' == typeof o) return _arrayLikeToArray(o, minLen); - var n = Object.prototype.toString.call(o).slice(8, -1); - 'Object' === n && o.constructor && (n = o.constructor.name); - if ('Map' === n || 'Set' === n) return Array.from(o); - if ( - 'Arguments' === n || - /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) - ) - return _arrayLikeToArray(o, minLen); - })(arr, i) || - (function _nonIterableRest() { - throw new TypeError( - 'Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.' - ); - })() - ); - } - function _arrayLikeToArray(arr, len) { - (null == len || len > arr.length) && (len = arr.length); - for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; - return arr2; - } - function _defineProperty(obj, key, value) { - return ( - key in obj - ? Object.defineProperty(obj, key, { - value: value, - enumerable: !0, - configurable: !0, - writable: !0 - }) - : (obj[key] = value), - obj - ); - } - function _extends() { - return ( - (_extends = - Object.assign || - function(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i]; - for (var key in source) - Object.prototype.hasOwnProperty.call(source, key) && - (target[key] = source[key]); - } - return target; - }), - _extends.apply(this, arguments) - ); - } - function _objectWithoutProperties(source, excluded) { - if (null == source) return {}; - var key, - i, - target = (function _objectWithoutPropertiesLoose(source, excluded) { - if (null == source) return {}; - var key, - i, - target = {}, - sourceKeys = Object.keys(source); - for (i = 0; i < sourceKeys.length; i++) - (key = sourceKeys[i]), - excluded.indexOf(key) >= 0 || (target[key] = source[key]); - return target; - })(source, excluded); - if (Object.getOwnPropertySymbols) { - var sourceSymbolKeys = Object.getOwnPropertySymbols(source); - for (i = 0; i < sourceSymbolKeys.length; i++) - (key = sourceSymbolKeys[i]), - excluded.indexOf(key) >= 0 || - (Object.prototype.propertyIsEnumerable.call(source, key) && - (target[key] = source[key])); - } - return target; - } - var Wrapper = esm.styled.div({ position: 'relative', maxWidth: 250 }), - PickerTooltip = Object(esm.styled)(lazy_WithTooltip.a)({ - position: 'absolute', - zIndex: 1, - top: 4, - left: 4 - }), - TooltipContent = esm.styled.div({ - width: 200, - margin: 5, - '.react-colorful__saturation': { borderRadius: '4px 4px 0 0' }, - '.react-colorful__hue': { - boxShadow: 'inset 0 0 0 1px rgb(0 0 0 / 5%)' - }, - '.react-colorful__last-control': { borderRadius: '0 0 4px 4px' } - }), - Note = Object(esm.styled)(TooltipNote.a)(function(_ref) { - return { fontFamily: _ref.theme.typography.fonts.base }; - }), - Swatches = esm.styled.div({ - display: 'grid', - gridTemplateColumns: 'repeat(9, 16px)', - gap: 6, - padding: 3, - marginTop: 5, - width: 200 - }), - SwatchColor = esm.styled.div(function(_ref2) { - var theme = _ref2.theme; - return { - width: 16, - height: 16, - boxShadow: _ref2.active - ? '' - .concat(theme.appBorderColor, ' 0 0 0 1px inset, ') - .concat(theme.color.mediumdark, '50 0 0 0 4px') - : ''.concat(theme.appBorderColor, ' 0 0 0 1px inset'), - borderRadius: theme.appBorderRadius - }; - }), - Color_Swatch = function Swatch(_ref3) { - var value = _ref3.value, - active = _ref3.active, - onClick = _ref3.onClick, - style = _ref3.style, - props = _objectWithoutProperties(_ref3, [ - 'value', - 'active', - 'onClick', - 'style' - ]), - backgroundImage = 'linear-gradient(' - .concat(value, ', ') - .concat(value, '), ') - .concat( - 'url(\'data:image/svg+xml;charset=utf-8,\')', - ', linear-gradient(#fff, #fff)' - ); - return react_default.a.createElement( - SwatchColor, - _extends({}, props, { - active: active, - onClick: onClick, - style: Object.assign({}, style, { - backgroundImage: backgroundImage - }) - }) - ); - }; - Color_Swatch.displayName = 'Swatch'; - var ColorSpace, - Input = Object(esm.styled)(esm_form.a.Input)(function(_ref4) { - return { - width: '100%', - paddingLeft: 30, - paddingRight: 30, - boxSizing: 'border-box', - fontFamily: _ref4.theme.typography.fonts.base - }; - }), - ToggleIcon = Object(esm.styled)(icon.a)(function(_ref5) { - return { - position: 'absolute', - zIndex: 1, - top: 6, - right: 7, - width: 20, - height: 20, - padding: 4, - boxSizing: 'border-box', - cursor: 'pointer', - color: _ref5.theme.input.color - }; - }); - !(function(ColorSpace) { - (ColorSpace.RGB = 'rgb'), - (ColorSpace.HSL = 'hsl'), - (ColorSpace.HEX = 'hex'); - })(ColorSpace || (ColorSpace = {})); - var COLOR_SPACES = Object.values(ColorSpace), - COLOR_REGEXP = /\(([0-9]+),\s*([0-9]+)%?,\s*([0-9]+)%?,?\s*([0-9.]+)?\)/, - RGB_REGEXP = /^\s*rgba?\(([0-9]+),\s*([0-9]+),\s*([0-9]+),?\s*([0-9.]+)?\)\s*$/i, - HSL_REGEXP = /^\s*hsla?\(([0-9]+),\s*([0-9]+)%,\s*([0-9]+)%,?\s*([0-9.]+)?\)\s*$/i, - HEX_REGEXP = /^\s*#?([0-9a-f]{3}|[0-9a-f]{6})\s*$/i, - SHORTHEX_REGEXP = /^\s*#?([0-9a-f]{3})\s*$/i, - ColorPicker = (_defineProperty( - (_ColorPicker = {}), - ColorSpace.HEX, - function(r) { - return react_default.a.createElement( - $, - index_module_u({}, r, { colorModel: G }) - ); - } - ), - _defineProperty(_ColorPicker, ColorSpace.RGB, function(r) { - return react_default.a.createElement( - U, - index_module_u({}, r, { colorModel: ge }) - ); - }), - _defineProperty(_ColorPicker, ColorSpace.HSL, function(r) { - return react_default.a.createElement( - U, - index_module_u({}, r, { colorModel: ee }) - ); - }), - _ColorPicker), - fallbackColor = (_defineProperty( - (_fallbackColor = {}), - ColorSpace.HEX, - 'transparent' - ), - _defineProperty(_fallbackColor, ColorSpace.RGB, 'rgba(0, 0, 0, 0)'), - _defineProperty(_fallbackColor, ColorSpace.HSL, 'hsla(0, 0%, 0%, 0)'), - _fallbackColor), - stringToArgs = function stringToArgs(value) { - var match = null == value ? void 0 : value.match(COLOR_REGEXP); - if (!match) return [0, 0, 0, 1]; - var _match = _slicedToArray(match, 5), - x = _match[1], - y = _match[2], - z = _match[3], - _match$ = _match[4]; - return [x, y, z, void 0 === _match$ ? 1 : _match$].map(Number); - }, - Color_parseValue = function parseValue(value) { - var _ref12; - if (value) { - var valid = !0; - if (RGB_REGEXP.test(value)) { - var _ref8, - _stringToArgs2 = _slicedToArray(stringToArgs(value), 4), - r = _stringToArgs2[0], - g = _stringToArgs2[1], - b = _stringToArgs2[2], - a = _stringToArgs2[3], - _ref7 = _slicedToArray( - color_convert_default.a.rgb.hsl([r, g, b]) || [0, 0, 0], - 3 - ), - h = _ref7[0], - s = _ref7[1], - l = _ref7[2]; - return ( - _defineProperty( - (_ref8 = { - valid: valid, - value: value, - keyword: color_convert_default.a.rgb.keyword([r, g, b]), - colorSpace: ColorSpace.RGB - }), - ColorSpace.RGB, - value - ), - _defineProperty( - _ref8, - ColorSpace.HSL, - 'hsla(' - .concat(h, ', ') - .concat(s, '%, ') - .concat(l, '%, ') - .concat(a, ')') - ), - _defineProperty( - _ref8, - ColorSpace.HEX, - '#'.concat( - color_convert_default.a.rgb.hex([r, g, b]).toLowerCase() - ) - ), - _ref8 - ); - } - if (HSL_REGEXP.test(value)) { - var _ref11, - _stringToArgs4 = _slicedToArray(stringToArgs(value), 4), - _h = _stringToArgs4[0], - _s2 = _stringToArgs4[1], - _l = _stringToArgs4[2], - _a = _stringToArgs4[3], - _ref10 = _slicedToArray( - color_convert_default.a.hsl.rgb([_h, _s2, _l]) || [0, 0, 0], - 3 - ), - _r = _ref10[0], - _g = _ref10[1], - _b = _ref10[2]; - return ( - _defineProperty( - (_ref11 = { - valid: valid, - value: value, - keyword: color_convert_default.a.hsl.keyword([_h, _s2, _l]), - colorSpace: ColorSpace.HSL - }), - ColorSpace.RGB, - 'rgba(' - .concat(_r, ', ') - .concat(_g, ', ') - .concat(_b, ', ') - .concat(_a, ')') - ), - _defineProperty(_ref11, ColorSpace.HSL, value), - _defineProperty( - _ref11, - ColorSpace.HEX, - '#'.concat( - color_convert_default.a.hsl.hex([_h, _s2, _l]).toLowerCase() - ) - ), - _ref11 - ); - } - var plain = value.replace('#', ''), - rgb = - color_convert_default.a.keyword.rgb(plain) || - color_convert_default.a.hex.rgb(plain), - hsl = color_convert_default.a.rgb.hsl(rgb), - mapped = value; - if ( - (/[^#a-f0-9]/i.test(value) - ? (mapped = plain) - : HEX_REGEXP.test(value) && (mapped = '#'.concat(plain)), - mapped.startsWith('#')) - ) - valid = HEX_REGEXP.test(mapped); - else - try { - color_convert_default.a.keyword.hex(mapped); - } catch (e) { - valid = !1; - } - return ( - _defineProperty( - (_ref12 = { - valid: valid, - value: mapped, - keyword: color_convert_default.a.rgb.keyword(rgb), - colorSpace: ColorSpace.HEX - }), - ColorSpace.RGB, - 'rgba(' - .concat(rgb[0], ', ') - .concat(rgb[1], ', ') - .concat(rgb[2], ', 1)') - ), - _defineProperty( - _ref12, - ColorSpace.HSL, - 'hsla(' - .concat(hsl[0], ', ') - .concat(hsl[1], '%, ') - .concat(hsl[2], '%, 1)') - ), - _defineProperty(_ref12, ColorSpace.HEX, mapped), - _ref12 - ); - } - }, - Color_useColorInput = function useColorInput(initialValue, onChange) { - var _useState2 = _slicedToArray( - Object(react.useState)(initialValue || ''), - 2 - ), - value = _useState2[0], - setValue = _useState2[1], - _useState4 = _slicedToArray( - Object(react.useState)(function() { - return Color_parseValue(value); - }), - 2 - ), - color = _useState4[0], - setColor = _useState4[1], - _useState6 = _slicedToArray( - Object(react.useState)( - (null == color ? void 0 : color.colorSpace) || ColorSpace.HEX - ), - 2 - ), - colorSpace = _useState6[0], - setColorSpace = _useState6[1]; - Object(react.useEffect)( - function() { - void 0 === initialValue && - (setValue(''), setColor(void 0), setColorSpace(ColorSpace.HEX)); - }, - [initialValue] - ); - var realValue = Object(react.useMemo)( - function() { - return (function getRealValue(value, color, colorSpace) { - if (!value || null == color || !color.valid) - return fallbackColor[colorSpace]; - if (colorSpace !== ColorSpace.HEX) - return ( - (null == color ? void 0 : color[colorSpace]) || - fallbackColor[colorSpace] - ); - if (!color.hex.startsWith('#')) - try { - return '#'.concat( - color_convert_default.a.keyword.hex(color.hex) - ); - } catch (e) { - return fallbackColor.hex; - } - var short = color.hex.match(SHORTHEX_REGEXP); - if (!short) - return HEX_REGEXP.test(color.hex) - ? color.hex - : fallbackColor.hex; - var _short$1$split2 = _slicedToArray(short[1].split(''), 3), - r = _short$1$split2[0], - g = _short$1$split2[1], - b = _short$1$split2[2]; - return '#' - .concat(r) - .concat(r) - .concat(g) - .concat(g) - .concat(b) - .concat(b); - })(value, color, colorSpace).toLowerCase(); - }, - [value, color, colorSpace] - ), - updateValue = Object(react.useCallback)( - function(update) { - var parsed = Color_parseValue(update); - setValue( - (null == parsed ? void 0 : parsed.value) || update || '' - ), - parsed && - (setColor(parsed), - setColorSpace(parsed.colorSpace), - onChange(parsed.value)); - }, - [onChange] - ), - cycleColorSpace = Object(react.useCallback)( - function() { - var next = COLOR_SPACES.indexOf(colorSpace) + 1; - next >= COLOR_SPACES.length && (next = 0), - setColorSpace(COLOR_SPACES[next]); - var update = - (null == color ? void 0 : color[COLOR_SPACES[next]]) || ''; - setValue(update), onChange(update); - }, - [color, colorSpace, onChange] - ); - return { - value: value, - realValue: realValue, - updateValue: updateValue, - color: color, - colorSpace: colorSpace, - cycleColorSpace: cycleColorSpace - }; - }, - id = function id(value) { - return value.replace(/\s*/, '').toLowerCase(); - }, - Color_ColorControl = function ColorControl(_ref13) { - var name = _ref13.name, - initialValue = _ref13.value, - onChange = _ref13.onChange, - onFocus = _ref13.onFocus, - onBlur = _ref13.onBlur, - presetColors = _ref13.presetColors, - startOpen = _ref13.startOpen, - _useColorInput = Color_useColorInput( - initialValue, - throttle_default()(onChange, 200) - ), - value = _useColorInput.value, - realValue = _useColorInput.realValue, - updateValue = _useColorInput.updateValue, - color = _useColorInput.color, - colorSpace = _useColorInput.colorSpace, - cycleColorSpace = _useColorInput.cycleColorSpace, - _usePresets = (function usePresets( - presetColors, - currentColor, - colorSpace - ) { - var _useState8 = _slicedToArray( - Object(react.useState)( - null != currentColor && currentColor.valid - ? [currentColor] - : [] - ), - 2 - ), - selectedColors = _useState8[0], - setSelectedColors = _useState8[1]; - Object(react.useEffect)( - function() { - void 0 === currentColor && setSelectedColors([]); - }, - [currentColor] - ); - var presets = Object(react.useMemo)( - function() { - return (presetColors || []) - .map(function(preset) { - return 'string' == typeof preset - ? Color_parseValue(preset) - : preset.title - ? Object.assign( - {}, - Color_parseValue(preset.color), - { keyword: preset.title } - ) - : Color_parseValue(preset.color); - }) - .concat(selectedColors) - .filter(Boolean) - .slice(-27); - }, - [presetColors, selectedColors] - ), - addPreset = Object(react.useCallback)( - function(color) { - null != color && - color.valid && - (presets.some(function(preset) { - return id(preset[colorSpace]) === id(color[colorSpace]); - }) || - setSelectedColors(function(arr) { - return arr.concat(color); - })); - }, - [colorSpace, presets] - ); - return { presets: presets, addPreset: addPreset }; - })(presetColors, color, colorSpace), - presets = _usePresets.presets, - addPreset = _usePresets.addPreset, - Picker = ColorPicker[colorSpace]; - return react_default.a.createElement( - Wrapper, - null, - react_default.a.createElement( - PickerTooltip, - { - trigger: 'click', - startOpen: startOpen, - closeOnClick: !0, - onVisibilityChange: function onVisibilityChange() { - return addPreset(color); - }, - tooltip: react_default.a.createElement( - TooltipContent, - null, - react_default.a.createElement(Picker, { - color: 'transparent' === realValue ? '#000000' : realValue, - onChange: updateValue, - onFocus: onFocus, - onBlur: onBlur - }), - presets.length > 0 && - react_default.a.createElement( - Swatches, - null, - presets.map(function(preset, index) { - return react_default.a.createElement( - lazy_WithTooltip.a, - { - key: ''.concat(preset.value, '-').concat(index), - hasChrome: !1, - tooltip: react_default.a.createElement(Note, { - note: preset.keyword || preset.value - }) - }, - react_default.a.createElement(Color_Swatch, { - value: preset[colorSpace], - active: - color && - id(preset[colorSpace]) === id(color[colorSpace]), - onClick: function onClick() { - return updateValue(preset.value); - } - }) - ); - }) - ) - ) - }, - react_default.a.createElement(Color_Swatch, { - value: realValue, - style: { margin: 4 } - }) - ), - react_default.a.createElement(Input, { - id: Object(helpers.a)(name), - value: value, - onChange: function onChange(e) { - return updateValue(e.target.value); - }, - onFocus: function onFocus(e) { - return e.target.select(); - }, - placeholder: 'Choose color...' - }), - value - ? react_default.a.createElement(ToggleIcon, { - icon: 'markup', - onClick: cycleColorSpace - }) - : null - ); - }; - Color_ColorControl.displayName = 'ColorControl'; - __webpack_exports__.default = Color_ColorControl; - }, - 1710: function(module, exports, __webpack_require__) { - 'use strict'; - module.exports = { - aliceblue: [240, 248, 255], - antiquewhite: [250, 235, 215], - aqua: [0, 255, 255], - aquamarine: [127, 255, 212], - azure: [240, 255, 255], - beige: [245, 245, 220], - bisque: [255, 228, 196], - black: [0, 0, 0], - blanchedalmond: [255, 235, 205], - blue: [0, 0, 255], - blueviolet: [138, 43, 226], - brown: [165, 42, 42], - burlywood: [222, 184, 135], - cadetblue: [95, 158, 160], - chartreuse: [127, 255, 0], - chocolate: [210, 105, 30], - coral: [255, 127, 80], - cornflowerblue: [100, 149, 237], - cornsilk: [255, 248, 220], - crimson: [220, 20, 60], - cyan: [0, 255, 255], - darkblue: [0, 0, 139], - darkcyan: [0, 139, 139], - darkgoldenrod: [184, 134, 11], - darkgray: [169, 169, 169], - darkgreen: [0, 100, 0], - darkgrey: [169, 169, 169], - darkkhaki: [189, 183, 107], - darkmagenta: [139, 0, 139], - darkolivegreen: [85, 107, 47], - darkorange: [255, 140, 0], - darkorchid: [153, 50, 204], - darkred: [139, 0, 0], - darksalmon: [233, 150, 122], - darkseagreen: [143, 188, 143], - darkslateblue: [72, 61, 139], - darkslategray: [47, 79, 79], - darkslategrey: [47, 79, 79], - darkturquoise: [0, 206, 209], - darkviolet: [148, 0, 211], - deeppink: [255, 20, 147], - deepskyblue: [0, 191, 255], - dimgray: [105, 105, 105], - dimgrey: [105, 105, 105], - dodgerblue: [30, 144, 255], - firebrick: [178, 34, 34], - floralwhite: [255, 250, 240], - forestgreen: [34, 139, 34], - fuchsia: [255, 0, 255], - gainsboro: [220, 220, 220], - ghostwhite: [248, 248, 255], - gold: [255, 215, 0], - goldenrod: [218, 165, 32], - gray: [128, 128, 128], - green: [0, 128, 0], - greenyellow: [173, 255, 47], - grey: [128, 128, 128], - honeydew: [240, 255, 240], - hotpink: [255, 105, 180], - indianred: [205, 92, 92], - indigo: [75, 0, 130], - ivory: [255, 255, 240], - khaki: [240, 230, 140], - lavender: [230, 230, 250], - lavenderblush: [255, 240, 245], - lawngreen: [124, 252, 0], - lemonchiffon: [255, 250, 205], - lightblue: [173, 216, 230], - lightcoral: [240, 128, 128], - lightcyan: [224, 255, 255], - lightgoldenrodyellow: [250, 250, 210], - lightgray: [211, 211, 211], - lightgreen: [144, 238, 144], - lightgrey: [211, 211, 211], - lightpink: [255, 182, 193], - lightsalmon: [255, 160, 122], - lightseagreen: [32, 178, 170], - lightskyblue: [135, 206, 250], - lightslategray: [119, 136, 153], - lightslategrey: [119, 136, 153], - lightsteelblue: [176, 196, 222], - lightyellow: [255, 255, 224], - lime: [0, 255, 0], - limegreen: [50, 205, 50], - linen: [250, 240, 230], - magenta: [255, 0, 255], - maroon: [128, 0, 0], - mediumaquamarine: [102, 205, 170], - mediumblue: [0, 0, 205], - mediumorchid: [186, 85, 211], - mediumpurple: [147, 112, 219], - mediumseagreen: [60, 179, 113], - mediumslateblue: [123, 104, 238], - mediumspringgreen: [0, 250, 154], - mediumturquoise: [72, 209, 204], - mediumvioletred: [199, 21, 133], - midnightblue: [25, 25, 112], - mintcream: [245, 255, 250], - mistyrose: [255, 228, 225], - moccasin: [255, 228, 181], - navajowhite: [255, 222, 173], - navy: [0, 0, 128], - oldlace: [253, 245, 230], - olive: [128, 128, 0], - olivedrab: [107, 142, 35], - orange: [255, 165, 0], - orangered: [255, 69, 0], - orchid: [218, 112, 214], - palegoldenrod: [238, 232, 170], - palegreen: [152, 251, 152], - paleturquoise: [175, 238, 238], - palevioletred: [219, 112, 147], - papayawhip: [255, 239, 213], - peachpuff: [255, 218, 185], - peru: [205, 133, 63], - pink: [255, 192, 203], - plum: [221, 160, 221], - powderblue: [176, 224, 230], - purple: [128, 0, 128], - rebeccapurple: [102, 51, 153], - red: [255, 0, 0], - rosybrown: [188, 143, 143], - royalblue: [65, 105, 225], - saddlebrown: [139, 69, 19], - salmon: [250, 128, 114], - sandybrown: [244, 164, 96], - seagreen: [46, 139, 87], - seashell: [255, 245, 238], - sienna: [160, 82, 45], - silver: [192, 192, 192], - skyblue: [135, 206, 235], - slateblue: [106, 90, 205], - slategray: [112, 128, 144], - slategrey: [112, 128, 144], - snow: [255, 250, 250], - springgreen: [0, 255, 127], - steelblue: [70, 130, 180], - tan: [210, 180, 140], - teal: [0, 128, 128], - thistle: [216, 191, 216], - tomato: [255, 99, 71], - turquoise: [64, 224, 208], - violet: [238, 130, 238], - wheat: [245, 222, 179], - white: [255, 255, 255], - whitesmoke: [245, 245, 245], - yellow: [255, 255, 0], - yellowgreen: [154, 205, 50] - }; - }, - 714: function(module, exports, __webpack_require__) { - (function(global) { - var check = function(it) { - return it && it.Math == Math && it; - }; - module.exports = - check('object' == typeof globalThis && globalThis) || - check('object' == typeof window && window) || - check('object' == typeof self && self) || - check('object' == typeof global && global) || - (function() { - return this; - })() || - Function('return this')(); - }.call(this, __webpack_require__(89))); - }, - 715: function(module, exports) { - var FunctionPrototype = Function.prototype, - bind = FunctionPrototype.bind, - call = FunctionPrototype.call, - callBind = bind && bind.bind(call); - module.exports = bind - ? function(fn) { - return fn && callBind(call, fn); - } - : function(fn) { - return ( - fn && - function() { - return call.apply(fn, arguments); - } - ); - }; - }, - 716: function(module, exports) { - module.exports = function(exec) { - try { - return !!exec(); - } catch (error) { - return !0; - } - }; - }, - 717: function(module, exports, __webpack_require__) { - var global = __webpack_require__(714), - shared = __webpack_require__(840), - hasOwn = __webpack_require__(819), - uid = __webpack_require__(1199), - NATIVE_SYMBOL = __webpack_require__(913), - USE_SYMBOL_AS_UID = __webpack_require__(1213), - WellKnownSymbolsStore = shared('wks'), - Symbol = global.Symbol, - symbolFor = Symbol && Symbol.for, - createWellKnownSymbol = USE_SYMBOL_AS_UID - ? Symbol - : (Symbol && Symbol.withoutSetter) || uid; - module.exports = function(name) { - if ( - !hasOwn(WellKnownSymbolsStore, name) || - (!NATIVE_SYMBOL && 'string' != typeof WellKnownSymbolsStore[name]) - ) { - var description = 'Symbol.' + name; - NATIVE_SYMBOL && hasOwn(Symbol, name) - ? (WellKnownSymbolsStore[name] = Symbol[name]) - : (WellKnownSymbolsStore[name] = - USE_SYMBOL_AS_UID && symbolFor - ? symbolFor(description) - : createWellKnownSymbol(description)); - } - return WellKnownSymbolsStore[name]; - }; - }, - 766: function(module, exports) { - module.exports = function(argument) { - return 'function' == typeof argument; - }; - }, - 816: function(module, exports, __webpack_require__) { - var global = __webpack_require__(714), - isObject = __webpack_require__(824), - String = global.String, - TypeError = global.TypeError; - module.exports = function(argument) { - if (isObject(argument)) return argument; - throw TypeError(String(argument) + ' is not an object'); - }; - }, - 817: function(module, exports, __webpack_require__) { - var global = __webpack_require__(714), - getOwnPropertyDescriptor = __webpack_require__(871).f, - createNonEnumerableProperty = __webpack_require__(826), - redefine = __webpack_require__(825), - setGlobal = __webpack_require__(1198), - copyConstructorProperties = __webpack_require__(1216), - isForced = __webpack_require__(1465); - module.exports = function(options, source) { - var target, - key, - targetProperty, - sourceProperty, - descriptor, - TARGET = options.target, - GLOBAL = options.global, - STATIC = options.stat; - if ( - (target = GLOBAL - ? global - : STATIC - ? global[TARGET] || setGlobal(TARGET, {}) - : (global[TARGET] || {}).prototype) - ) - for (key in source) { - if ( - ((sourceProperty = source[key]), - (targetProperty = options.noTargetGet - ? (descriptor = getOwnPropertyDescriptor(target, key)) && - descriptor.value - : target[key]), - !isForced( - GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, - options.forced - ) && void 0 !== targetProperty) - ) { - if (typeof sourceProperty == typeof targetProperty) continue; - copyConstructorProperties(sourceProperty, targetProperty); - } - (options.sham || (targetProperty && targetProperty.sham)) && - createNonEnumerableProperty(sourceProperty, 'sham', !0), - redefine(target, key, sourceProperty, options); - } - }; - }, - 818: function(module, exports) { - var call = Function.prototype.call; - module.exports = call.bind - ? call.bind(call) - : function() { - return call.apply(call, arguments); - }; - }, - 819: function(module, exports, __webpack_require__) { - var uncurryThis = __webpack_require__(715), - toObject = __webpack_require__(830), - hasOwnProperty = uncurryThis({}.hasOwnProperty); - module.exports = - Object.hasOwn || - function hasOwn(it, key) { - return hasOwnProperty(toObject(it), key); - }; - }, - 820: function(module, exports, __webpack_require__) { - var global = __webpack_require__(714), - DESCRIPTORS = __webpack_require__(821), - IE8_DOM_DEFINE = __webpack_require__(1215), - anObject = __webpack_require__(816), - toPropertyKey = __webpack_require__(838), - TypeError = global.TypeError, - $defineProperty = Object.defineProperty; - exports.f = DESCRIPTORS - ? $defineProperty - : function defineProperty(O, P, Attributes) { - if ( - (anObject(O), - (P = toPropertyKey(P)), - anObject(Attributes), - IE8_DOM_DEFINE) - ) - try { - return $defineProperty(O, P, Attributes); - } catch (error) {} - if ('get' in Attributes || 'set' in Attributes) - throw TypeError('Accessors not supported'); - return 'value' in Attributes && (O[P] = Attributes.value), O; - }; - }, - 821: function(module, exports, __webpack_require__) { - var fails = __webpack_require__(716); - module.exports = !fails(function() { - return ( - 7 != - Object.defineProperty({}, 1, { - get: function() { - return 7; - } - })[1] - ); - }); - }, - 822: function(module, exports, __webpack_require__) { - var global = __webpack_require__(714), - classof = __webpack_require__(858), - String = global.String; - module.exports = function(argument) { - if ('Symbol' === classof(argument)) - throw TypeError('Cannot convert a Symbol value to a string'); - return String(argument); - }; - }, - 823: function(module, exports, __webpack_require__) { - var IndexedObject = __webpack_require__(889), - requireObjectCoercible = __webpack_require__(828); - module.exports = function(it) { - return IndexedObject(requireObjectCoercible(it)); - }; - }, - 824: function(module, exports, __webpack_require__) { - var isCallable = __webpack_require__(766); - module.exports = function(it) { - return 'object' == typeof it ? null !== it : isCallable(it); - }; - }, - 825: function(module, exports, __webpack_require__) { - var global = __webpack_require__(714), - isCallable = __webpack_require__(766), - hasOwn = __webpack_require__(819), - createNonEnumerableProperty = __webpack_require__(826), - setGlobal = __webpack_require__(1198), - inspectSource = __webpack_require__(1201), - InternalStateModule = __webpack_require__(834), - CONFIGURABLE_FUNCTION_NAME = __webpack_require__(843).CONFIGURABLE, - getInternalState = InternalStateModule.get, - enforceInternalState = InternalStateModule.enforce, - TEMPLATE = String(String).split('String'); - (module.exports = function(O, key, value, options) { - var state, - unsafe = !!options && !!options.unsafe, - simple = !!options && !!options.enumerable, - noTargetGet = !!options && !!options.noTargetGet, - name = options && void 0 !== options.name ? options.name : key; - isCallable(value) && - ('Symbol(' === String(name).slice(0, 7) && - (name = - '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']'), - (!hasOwn(value, 'name') || - (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) && - createNonEnumerableProperty(value, 'name', name), - (state = enforceInternalState(value)).source || - (state.source = TEMPLATE.join( - 'string' == typeof name ? name : '' - ))), - O !== global - ? (unsafe ? !noTargetGet && O[key] && (simple = !0) : delete O[key], - simple - ? (O[key] = value) - : createNonEnumerableProperty(O, key, value)) - : simple - ? (O[key] = value) - : setGlobal(key, value); - })(Function.prototype, 'toString', function toString() { - return ( - (isCallable(this) && getInternalState(this).source) || - inspectSource(this) - ); - }); - }, - 826: function(module, exports, __webpack_require__) { - var DESCRIPTORS = __webpack_require__(821), - definePropertyModule = __webpack_require__(820), - createPropertyDescriptor = __webpack_require__(831); - module.exports = DESCRIPTORS - ? function(object, key, value) { - return definePropertyModule.f( - object, - key, - createPropertyDescriptor(1, value) - ); - } - : function(object, key, value) { - return (object[key] = value), object; - }; - }, - 827: function(module, exports, __webpack_require__) { - var uncurryThis = __webpack_require__(715), - toString = uncurryThis({}.toString), - stringSlice = uncurryThis(''.slice); - module.exports = function(it) { - return stringSlice(toString(it), 8, -1); - }; - }, - 828: function(module, exports, __webpack_require__) { - var TypeError = __webpack_require__(714).TypeError; - module.exports = function(it) { - if (null == it) throw TypeError("Can't call method on " + it); - return it; - }; - }, - 829: function(module, exports, __webpack_require__) { - var global = __webpack_require__(714), - isCallable = __webpack_require__(766), - aFunction = function(argument) { - return isCallable(argument) ? argument : void 0; - }; - module.exports = function(namespace, method) { - return arguments.length < 2 - ? aFunction(global[namespace]) - : global[namespace] && global[namespace][method]; - }; - }, - 830: function(module, exports, __webpack_require__) { - var global = __webpack_require__(714), - requireObjectCoercible = __webpack_require__(828), - Object = global.Object; - module.exports = function(argument) { - return Object(requireObjectCoercible(argument)); - }; - }, - 831: function(module, exports) { - module.exports = function(bitmap, value) { - return { - enumerable: !(1 & bitmap), - configurable: !(2 & bitmap), - writable: !(4 & bitmap), - value: value - }; - }; - }, - 832: function(module, exports, __webpack_require__) { - var aCallable = __webpack_require__(919); - module.exports = function(V, P) { - var func = V[P]; - return null == func ? void 0 : aCallable(func); - }; - }, - 833: function(module, exports) { - module.exports = !1; - }, - 834: function(module, exports, __webpack_require__) { - var set, - get, - has, - NATIVE_WEAK_MAP = __webpack_require__(1462), - global = __webpack_require__(714), - uncurryThis = __webpack_require__(715), - isObject = __webpack_require__(824), - createNonEnumerableProperty = __webpack_require__(826), - hasOwn = __webpack_require__(819), - shared = __webpack_require__(1197), - sharedKey = __webpack_require__(841), - hiddenKeys = __webpack_require__(842), - TypeError = global.TypeError, - WeakMap = global.WeakMap; - if (NATIVE_WEAK_MAP || shared.state) { - var store = shared.state || (shared.state = new WeakMap()), - wmget = uncurryThis(store.get), - wmhas = uncurryThis(store.has), - wmset = uncurryThis(store.set); - (set = function(it, metadata) { - if (wmhas(store, it)) - throw new TypeError('Object already initialized'); - return (metadata.facade = it), wmset(store, it, metadata), metadata; - }), - (get = function(it) { - return wmget(store, it) || {}; - }), - (has = function(it) { - return wmhas(store, it); - }); - } else { - var STATE = sharedKey('state'); - (hiddenKeys[STATE] = !0), - (set = function(it, metadata) { - if (hasOwn(it, STATE)) - throw new TypeError('Object already initialized'); - return ( - (metadata.facade = it), - createNonEnumerableProperty(it, STATE, metadata), - metadata - ); - }), - (get = function(it) { - return hasOwn(it, STATE) ? it[STATE] : {}; - }), - (has = function(it) { - return hasOwn(it, STATE); - }); - } - module.exports = { - set: set, - get: get, - has: has, - enforce: function(it) { - return has(it) ? get(it) : set(it, {}); - }, - getterFor: function(TYPE) { - return function(it) { - var state; - if (!isObject(it) || (state = get(it)).type !== TYPE) - throw TypeError('Incompatible receiver, ' + TYPE + ' required'); - return state; - }; - } - }; - }, - 835: function(module, exports, __webpack_require__) { - var toLength = __webpack_require__(1205); - module.exports = function(obj) { - return toLength(obj.length); - }; - }, - 836: function(module, exports, __webpack_require__) { - var activeXDocument, - anObject = __webpack_require__(816), - defineProperties = __webpack_require__(1475), - enumBugKeys = __webpack_require__(1206), - hiddenKeys = __webpack_require__(842), - html = __webpack_require__(1476), - documentCreateElement = __webpack_require__(1200), - sharedKey = __webpack_require__(841), - IE_PROTO = sharedKey('IE_PROTO'), - EmptyConstructor = function() {}, - scriptTag = function(content) { - return ''; - }, - NullProtoObjectViaActiveX = function(activeXDocument) { - activeXDocument.write(scriptTag('')), activeXDocument.close(); - var temp = activeXDocument.parentWindow.Object; - return (activeXDocument = null), temp; - }, - NullProtoObject = function() { - try { - activeXDocument = new ActiveXObject('htmlfile'); - } catch (error) {} - var iframeDocument, iframe; - NullProtoObject = - 'undefined' != typeof document - ? document.domain && activeXDocument - ? NullProtoObjectViaActiveX(activeXDocument) - : (((iframe = documentCreateElement('iframe')).style.display = - 'none'), - html.appendChild(iframe), - (iframe.src = String('javascript:')), - (iframeDocument = iframe.contentWindow.document).open(), - iframeDocument.write(scriptTag('document.F=Object')), - iframeDocument.close(), - iframeDocument.F) - : NullProtoObjectViaActiveX(activeXDocument); - for (var length = enumBugKeys.length; length--; ) - delete NullProtoObject.prototype[enumBugKeys[length]]; - return NullProtoObject(); - }; - (hiddenKeys[IE_PROTO] = !0), - (module.exports = - Object.create || - function create(O, Properties) { - var result; - return ( - null !== O - ? ((EmptyConstructor.prototype = anObject(O)), - (result = new EmptyConstructor()), - (EmptyConstructor.prototype = null), - (result[IE_PROTO] = O)) - : (result = NullProtoObject()), - void 0 === Properties - ? result - : defineProperties(result, Properties) - ); - }); - }, - 837: function(module, exports) { - module.exports = {}; - }, - 838: function(module, exports, __webpack_require__) { - var toPrimitive = __webpack_require__(1459), - isSymbol = __webpack_require__(905); - module.exports = function(argument) { - var key = toPrimitive(argument, 'string'); - return isSymbol(key) ? key : key + ''; - }; - }, - 839: function(module, exports, __webpack_require__) { - var uncurryThis = __webpack_require__(715); - module.exports = uncurryThis({}.isPrototypeOf); - }, - 840: function(module, exports, __webpack_require__) { - var IS_PURE = __webpack_require__(833), - store = __webpack_require__(1197); - (module.exports = function(key, value) { - return store[key] || (store[key] = void 0 !== value ? value : {}); - })('versions', []).push({ - version: '3.20.0', - mode: IS_PURE ? 'pure' : 'global', - copyright: '© 2021 Denis Pushkarev (zloirock.ru)' - }); - }, - 841: function(module, exports, __webpack_require__) { - var shared = __webpack_require__(840), - uid = __webpack_require__(1199), - keys = shared('keys'); - module.exports = function(key) { - return keys[key] || (keys[key] = uid(key)); - }; - }, - 842: function(module, exports) { - module.exports = {}; - }, - 843: function(module, exports, __webpack_require__) { - var DESCRIPTORS = __webpack_require__(821), - hasOwn = __webpack_require__(819), - FunctionPrototype = Function.prototype, - getDescriptor = DESCRIPTORS && Object.getOwnPropertyDescriptor, - EXISTS = hasOwn(FunctionPrototype, 'name'), - PROPER = EXISTS && 'something' === function something() {}.name, - CONFIGURABLE = - EXISTS && - (!DESCRIPTORS || - (DESCRIPTORS && - getDescriptor(FunctionPrototype, 'name').configurable)); - module.exports = { - EXISTS: EXISTS, - PROPER: PROPER, - CONFIGURABLE: CONFIGURABLE - }; - }, - 851: function(module, exports, __webpack_require__) { - var classof = __webpack_require__(827); - module.exports = - Array.isArray || - function isArray(argument) { - return 'Array' == classof(argument); - }; - }, - 852: function(module, exports, __webpack_require__) { - var uncurryThis = __webpack_require__(715), - fails = __webpack_require__(716), - isCallable = __webpack_require__(766), - classof = __webpack_require__(858), - getBuiltIn = __webpack_require__(829), - inspectSource = __webpack_require__(1201), - noop = function() {}, - empty = [], - construct = getBuiltIn('Reflect', 'construct'), - constructorRegExp = /^\s*(?:class|function)\b/, - exec = uncurryThis(constructorRegExp.exec), - INCORRECT_TO_STRING = !constructorRegExp.exec(noop), - isConstructorModern = function isConstructor(argument) { - if (!isCallable(argument)) return !1; - try { - return construct(noop, empty, argument), !0; - } catch (error) { - return !1; - } - }, - isConstructorLegacy = function isConstructor(argument) { - if (!isCallable(argument)) return !1; - switch (classof(argument)) { - case 'AsyncFunction': - case 'GeneratorFunction': - case 'AsyncGeneratorFunction': - return !1; - } - try { - return ( - INCORRECT_TO_STRING || - !!exec(constructorRegExp, inspectSource(argument)) - ); - } catch (error) { - return !0; - } - }; - (isConstructorLegacy.sham = !0), - (module.exports = - !construct || - fails(function() { - var called; - return ( - isConstructorModern(isConstructorModern.call) || - !isConstructorModern(Object) || - !isConstructorModern(function() { - called = !0; - }) || - called - ); - }) - ? isConstructorLegacy - : isConstructorModern); - }, - 858: function(module, exports, __webpack_require__) { - var global = __webpack_require__(714), - TO_STRING_TAG_SUPPORT = __webpack_require__(1209), - isCallable = __webpack_require__(766), - classofRaw = __webpack_require__(827), - TO_STRING_TAG = __webpack_require__(717)('toStringTag'), - Object = global.Object, - CORRECT_ARGUMENTS = - 'Arguments' == - classofRaw( - (function() { - return arguments; - })() - ); - module.exports = TO_STRING_TAG_SUPPORT - ? classofRaw - : function(it) { - var O, tag, result; - return void 0 === it - ? 'Undefined' - : null === it - ? 'Null' - : 'string' == - typeof (tag = (function(it, key) { - try { - return it[key]; - } catch (error) {} - })((O = Object(it)), TO_STRING_TAG)) - ? tag - : CORRECT_ARGUMENTS - ? classofRaw(O) - : 'Object' == (result = classofRaw(O)) && - isCallable(O.callee) - ? 'Arguments' - : result; - }; - }, - 869: function(module, exports, __webpack_require__) { - 'use strict'; - var re1, - re2, - call = __webpack_require__(818), - uncurryThis = __webpack_require__(715), - toString = __webpack_require__(822), - regexpFlags = __webpack_require__(1233), - stickyHelpers = __webpack_require__(1236), - shared = __webpack_require__(840), - create = __webpack_require__(836), - getInternalState = __webpack_require__(834).get, - UNSUPPORTED_DOT_ALL = __webpack_require__(1477), - UNSUPPORTED_NCG = __webpack_require__(1478), - nativeReplace = shared( - 'native-string-replace', - String.prototype.replace - ), - nativeExec = RegExp.prototype.exec, - patchedExec = nativeExec, - charAt = uncurryThis(''.charAt), - indexOf = uncurryThis(''.indexOf), - replace = uncurryThis(''.replace), - stringSlice = uncurryThis(''.slice), - UPDATES_LAST_INDEX_WRONG = ((re2 = /b*/g), - call(nativeExec, (re1 = /a/), 'a'), - call(nativeExec, re2, 'a'), - 0 !== re1.lastIndex || 0 !== re2.lastIndex), - UNSUPPORTED_Y = stickyHelpers.BROKEN_CARET, - NPCG_INCLUDED = void 0 !== /()??/.exec('')[1]; - (UPDATES_LAST_INDEX_WRONG || - NPCG_INCLUDED || - UNSUPPORTED_Y || - UNSUPPORTED_DOT_ALL || - UNSUPPORTED_NCG) && - (patchedExec = function exec(string) { - var result, - reCopy, - lastIndex, - match, - i, - object, - group, - re = this, - state = getInternalState(re), - str = toString(string), - raw = state.raw; - if (raw) - return ( - (raw.lastIndex = re.lastIndex), - (result = call(patchedExec, raw, str)), - (re.lastIndex = raw.lastIndex), - result - ); - var groups = state.groups, - sticky = UNSUPPORTED_Y && re.sticky, - flags = call(regexpFlags, re), - source = re.source, - charsAdded = 0, - strCopy = str; - if ( - (sticky && - ((flags = replace(flags, 'y', '')), - -1 === indexOf(flags, 'g') && (flags += 'g'), - (strCopy = stringSlice(str, re.lastIndex)), - re.lastIndex > 0 && - (!re.multiline || - (re.multiline && '\n' !== charAt(str, re.lastIndex - 1))) && - ((source = '(?: ' + source + ')'), - (strCopy = ' ' + strCopy), - charsAdded++), - (reCopy = new RegExp('^(?:' + source + ')', flags))), - NPCG_INCLUDED && - (reCopy = new RegExp('^' + source + '$(?!\\s)', flags)), - UPDATES_LAST_INDEX_WRONG && (lastIndex = re.lastIndex), - (match = call(nativeExec, sticky ? reCopy : re, strCopy)), - sticky - ? match - ? ((match.input = stringSlice(match.input, charsAdded)), - (match[0] = stringSlice(match[0], charsAdded)), - (match.index = re.lastIndex), - (re.lastIndex += match[0].length)) - : (re.lastIndex = 0) - : UPDATES_LAST_INDEX_WRONG && - match && - (re.lastIndex = re.global - ? match.index + match[0].length - : lastIndex), - NPCG_INCLUDED && - match && - match.length > 1 && - call(nativeReplace, match[0], reCopy, function() { - for (i = 1; i < arguments.length - 2; i++) - void 0 === arguments[i] && (match[i] = void 0); - }), - match && groups) - ) - for ( - match.groups = object = create(null), i = 0; - i < groups.length; - i++ - ) - object[(group = groups[i])[0]] = match[group[1]]; - return match; - }), - (module.exports = patchedExec); - }, - 870: function(module, exports, __webpack_require__) { - var $ = __webpack_require__(817), - toObject = __webpack_require__(830), - nativeKeys = __webpack_require__(1207); - $( - { - target: 'Object', - stat: !0, - forced: __webpack_require__(716)(function() { - nativeKeys(1); - }) - }, - { - keys: function keys(it) { - return nativeKeys(toObject(it)); - } - } - ); - }, - 871: function(module, exports, __webpack_require__) { - var DESCRIPTORS = __webpack_require__(821), - call = __webpack_require__(818), - propertyIsEnumerableModule = __webpack_require__(1212), - createPropertyDescriptor = __webpack_require__(831), - toIndexedObject = __webpack_require__(823), - toPropertyKey = __webpack_require__(838), - hasOwn = __webpack_require__(819), - IE8_DOM_DEFINE = __webpack_require__(1215), - $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; - exports.f = DESCRIPTORS - ? $getOwnPropertyDescriptor - : function getOwnPropertyDescriptor(O, P) { - if ( - ((O = toIndexedObject(O)), (P = toPropertyKey(P)), IE8_DOM_DEFINE) - ) - try { - return $getOwnPropertyDescriptor(O, P); - } catch (error) {} - if (hasOwn(O, P)) - return createPropertyDescriptor( - !call(propertyIsEnumerableModule.f, O, P), - O[P] - ); - }; - }, - 889: function(module, exports, __webpack_require__) { - var global = __webpack_require__(714), - uncurryThis = __webpack_require__(715), - fails = __webpack_require__(716), - classof = __webpack_require__(827), - Object = global.Object, - split = uncurryThis(''.split); - module.exports = fails(function() { - return !Object('z').propertyIsEnumerable(0); - }) - ? function(it) { - return 'String' == classof(it) ? split(it, '') : Object(it); - } - : Object; - }, - 905: function(module, exports, __webpack_require__) { - var global = __webpack_require__(714), - getBuiltIn = __webpack_require__(829), - isCallable = __webpack_require__(766), - isPrototypeOf = __webpack_require__(839), - USE_SYMBOL_AS_UID = __webpack_require__(1213), - Object = global.Object; - module.exports = USE_SYMBOL_AS_UID - ? function(it) { - return 'symbol' == typeof it; - } - : function(it) { - var $Symbol = getBuiltIn('Symbol'); - return ( - isCallable($Symbol) && - isPrototypeOf($Symbol.prototype, Object(it)) - ); - }; - }, - 913: function(module, exports, __webpack_require__) { - var V8_VERSION = __webpack_require__(1214), - fails = __webpack_require__(716); - module.exports = - !!Object.getOwnPropertySymbols && - !fails(function() { - var symbol = Symbol(); - return ( - !String(symbol) || - !(Object(symbol) instanceof Symbol) || - (!Symbol.sham && V8_VERSION && V8_VERSION < 41) - ); - }); - }, - 919: function(module, exports, __webpack_require__) { - var global = __webpack_require__(714), - isCallable = __webpack_require__(766), - tryToString = __webpack_require__(927), - TypeError = global.TypeError; - module.exports = function(argument) { - if (isCallable(argument)) return argument; - throw TypeError(tryToString(argument) + ' is not a function'); - }; - }, - 927: function(module, exports, __webpack_require__) { - var String = __webpack_require__(714).String; - module.exports = function(argument) { - try { - return String(argument); - } catch (error) { - return 'Object'; - } - }; - } - } -]); diff --git a/docs/5.b02e262080963d4d48b7.manager.bundle.js b/docs/5.b02e262080963d4d48b7.manager.bundle.js new file mode 100644 index 00000000..ec1096c5 --- /dev/null +++ b/docs/5.b02e262080963d4d48b7.manager.bundle.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[5],{1504:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,"ColorControl",(function(){return Color_ColorControl}));__webpack_require__(21),__webpack_require__(5),__webpack_require__(13),__webpack_require__(8),__webpack_require__(14),__webpack_require__(9),__webpack_require__(10),__webpack_require__(12),__webpack_require__(22),__webpack_require__(19),__webpack_require__(11),__webpack_require__(112),__webpack_require__(64),__webpack_require__(35),__webpack_require__(25),__webpack_require__(223),__webpack_require__(123),__webpack_require__(283),__webpack_require__(111),__webpack_require__(16),__webpack_require__(46),__webpack_require__(15);var react=__webpack_require__(0),react_default=__webpack_require__.n(react);function index_module_u(){return(index_module_u=Object.assign||function(e){for(var r=1;r=0||(o[t]=e[t]);return o}function index_module_i(e){var t=Object(react.useRef)(e),n=Object(react.useRef)((function(e){t.current&&t.current(e)}));return t.current=e,n.current}var index_module_s=function(e,r,t){return void 0===r&&(r=0),void 0===t&&(t=1),e>t?t:e0:e.buttons>0)&&m.current?g(index_module_d(m.current,e,b.current)):t(!1)},r=function(){return t(!1)};function t(t){var n=_.current,o=index_module_v(m.current),a=t?o.addEventListener:o.removeEventListener;a(n?"touchmove":"mousemove",e),a(n?"touchend":"mouseup",r)}return[function(e){var r=e.nativeEvent,n=m.current;if(n&&(index_module_h(r),!function(e,r){return r&&!index_module_f(e)}(r,_.current)&&n)){if(index_module_f(r)){_.current=!0;var o=r.changedTouches||[];o.length&&(b.current=o[0].identifier)}n.focus(),g(index_module_d(n,r,b.current)),t(!0)}},function(e){var r=e.which||e.keyCode;r<37||r>40||(e.preventDefault(),p({left:39===r?.05:37===r?-.05:0,top:40===r?.05:38===r?-.05:0}))},t]}),[p,g]),C=x[0],E=x[1],H=x[2];return Object(react.useEffect)((function(){return H}),[H]),react_default.a.createElement("div",index_module_u({},s,{onTouchStart:C,onMouseDown:C,className:"react-colorful__interactive",ref:m,onKeyDown:E,tabIndex:0,role:"slider"}))})),index_module_g=function(e){return e.filter(Boolean).join(" ")},index_module_p=function(r){var t=r.color,n=r.left,o=r.top,a=void 0===o?.5:o,l=index_module_g(["react-colorful__pointer",r.className]);return react_default.a.createElement("div",{className:l,style:{top:100*a+"%",left:100*n+"%"}},react_default.a.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},index_module_b=function(e,r,t){return void 0===r&&(r=0),void 0===t&&(t=Math.pow(10,r)),Math.round(t*e)/t},index_module_={grad:.9,turn:360,rad:360/(2*Math.PI)},index_module_x=function(e){return"#"===e[0]&&(e=e.substr(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:1}:{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:1}},index_module_C=function(e,r){return void 0===r&&(r="deg"),Number(e)*(index_module_[r]||1)},index_module_E=function(e){var r=/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return r?M({h:index_module_C(r[1],r[2]),s:Number(r[3]),l:Number(r[4]),a:void 0===r[5]?1:Number(r[5])/(r[6]?100:1)}):{h:0,s:0,v:0,a:1}},M=function(e){var r=e.s,t=e.l;return{h:e.h,s:(r*=(t<50?t:100-t)/100)>0?2*r/(t+r)*100:0,v:t+r,a:e.a}},N=function(e){var r=e.s,t=e.v,n=e.a,o=(200-r)*t/100;return{h:index_module_b(e.h),s:index_module_b(o>0&&o<200?r*t/100/(o<=100?o:200-o)*100:0),l:index_module_b(o/2),a:index_module_b(n,2)}},w=function(e){var r=N(e);return"hsl("+r.h+", "+r.s+"%, "+r.l+"%)"},y=function(e){var r=N(e);return"hsla("+r.h+", "+r.s+"%, "+r.l+"%, "+r.a+")"},q=function(e){var r=e.h,t=e.s,n=e.v,o=e.a;r=r/360*6,t/=100,n/=100;var a=Math.floor(r),l=n*(1-t),u=n*(1-(r-a)*t),c=n*(1-(1-r+a)*t),i=a%6;return{r:index_module_b(255*[n,u,l,l,c,n][i]),g:index_module_b(255*[c,n,n,u,l,l][i]),b:index_module_b(255*[l,l,c,n,n,u][i]),a:index_module_b(o,2)}},I=function(e){var r=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return r?B({r:Number(r[1])/(r[2]?100/255:1),g:Number(r[3])/(r[4]?100/255:1),b:Number(r[5])/(r[6]?100/255:1),a:void 0===r[7]?1:Number(r[7])/(r[8]?100:1)}):{h:0,s:0,v:0,a:1}},z=function(e){var r=e.toString(16);return r.length<2?"0"+r:r},B=function(e){var r=e.r,t=e.g,n=e.b,o=e.a,a=Math.max(r,t,n),l=a-Math.min(r,t,n),u=l?a===r?(t-n)/l:a===t?2+(n-r)/l:4+(r-t)/l:0;return{h:index_module_b(60*(u<0?u+6:u)),s:index_module_b(a?l/a*100:0),v:index_module_b(a/255*100),a:o}},K=react_default.a.memo((function(r){var t=r.hue,n=r.onChange,o=index_module_g(["react-colorful__hue",r.className]);return react_default.a.createElement("div",{className:o},react_default.a.createElement(index_module_m,{onMove:function(e){n({h:360*e.left})},onKey:function(e){n({h:index_module_s(t+360*e.left,0,360)})},"aria-label":"Hue","aria-valuetext":index_module_b(t)},react_default.a.createElement(index_module_p,{className:"react-colorful__hue-pointer",left:t/360,color:w({h:t,s:100,v:100,a:1})})))})),L=react_default.a.memo((function(r){var t=r.hsva,n=r.onChange,o={backgroundColor:w({h:t.h,s:100,v:100,a:1})};return react_default.a.createElement("div",{className:"react-colorful__saturation",style:o},react_default.a.createElement(index_module_m,{onMove:function(e){n({s:100*e.left,v:100-100*e.top})},onKey:function(e){n({s:index_module_s(t.s+100*e.left,0,100),v:index_module_s(t.v-100*e.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+index_module_b(t.s)+"%, Brightness "+index_module_b(t.v)+"%"},react_default.a.createElement(index_module_p,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:w(t)})))})),A=function(e,r){if(e===r)return!0;for(var t in e)if(e[t]!==r[t])return!1;return!0},S=function(e,r){return e.replace(/\s/g,"")===r.replace(/\s/g,"")};function T(e,t,l){var u=index_module_i(l),c=Object(react.useState)((function(){return e.toHsva(t)})),s=c[0],f=c[1],v=Object(react.useRef)({color:t,hsva:s});Object(react.useEffect)((function(){if(!e.equal(t,v.current.color)){var r=e.toHsva(t);v.current={hsva:r,color:t},f(r)}}),[t,e]),Object(react.useEffect)((function(){var r;A(s,v.current.hsva)||e.equal(r=e.fromHsva(s),v.current.color)||(v.current={hsva:s,color:r},u(r))}),[s,e,u]);var d=Object(react.useCallback)((function(e){f((function(r){return Object.assign({},r,e)}))}),[]);return[s,d]}var F,_ColorPicker,_fallbackColor,P="undefined"!=typeof window?react.useLayoutEffect:react.useEffect,R=new Map,V=function(e){P((function(){var r=e.current?e.current.ownerDocument:document;if(void 0!==r&&!R.has(r)){var t=r.createElement("style");t.innerHTML='.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url(\'data:image/svg+xml;charset=utf-8,\')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}',R.set(r,t);var n=F||__webpack_require__.nc;n&&t.setAttribute("nonce",n),r.head.appendChild(t)}}),[])},$=function(t){var n=t.className,o=t.colorModel,a=t.color,l=void 0===a?o.defaultColor:a,i=t.onChange,s=index_module_c(t,["className","colorModel","color","onChange"]),f=Object(react.useRef)(null);V(f);var v=T(o,l,i),d=v[0],h=v[1],m=index_module_g(["react-colorful",n]);return react_default.a.createElement("div",index_module_u({},s,{ref:f,className:m}),react_default.a.createElement(L,{hsva:d,onChange:h}),react_default.a.createElement(K,{hue:d.h,onChange:h,className:"react-colorful__last-control"}))},G={defaultColor:"000",toHsva:function(e){return B(index_module_x(e))},fromHsva:function(e){return t=(r=q(e)).g,n=r.b,"#"+z(r.r)+z(t)+z(n);var r,t,n},equal:function(e,r){return e.toLowerCase()===r.toLowerCase()||A(index_module_x(e),index_module_x(r))}},Q=function(r){var t=r.className,n=r.hsva,o=r.onChange,a={backgroundImage:"linear-gradient(90deg, "+y(Object.assign({},n,{a:0}))+", "+y(Object.assign({},n,{a:1}))+")"},l=index_module_g(["react-colorful__alpha",t]);return react_default.a.createElement("div",{className:l},react_default.a.createElement("div",{className:"react-colorful__alpha-gradient",style:a}),react_default.a.createElement(index_module_m,{onMove:function(e){o({a:e.left})},onKey:function(e){o({a:index_module_s(n.a+e.left)})},"aria-label":"Alpha","aria-valuetext":index_module_b(100*n.a)+"%"},react_default.a.createElement(index_module_p,{className:"react-colorful__alpha-pointer",left:n.a,color:y(n)})))},U=function(t){var n=t.className,o=t.colorModel,a=t.color,l=void 0===a?o.defaultColor:a,i=t.onChange,s=index_module_c(t,["className","colorModel","color","onChange"]),f=Object(react.useRef)(null);V(f);var v=T(o,l,i),d=v[0],h=v[1],m=index_module_g(["react-colorful",n]);return react_default.a.createElement("div",index_module_u({},s,{ref:f,className:m}),react_default.a.createElement(L,{hsva:d,onChange:h}),react_default.a.createElement(K,{hue:d.h,onChange:h}),react_default.a.createElement(Q,{hsva:d,onChange:h,className:"react-colorful__last-control"}))},ee={defaultColor:"hsla(0, 0%, 0%, 1)",toHsva:index_module_E,fromHsva:y,equal:S},ge={defaultColor:"rgba(0, 0, 0, 1)",toHsva:I,fromHsva:function(e){var r=q(e);return"rgba("+r.r+", "+r.g+", "+r.b+", "+r.a+")"},equal:S},color_convert=__webpack_require__(1649),color_convert_default=__webpack_require__.n(color_convert),throttle=__webpack_require__(760),throttle_default=__webpack_require__.n(throttle),esm=__webpack_require__(1),TooltipNote=__webpack_require__(532),lazy_WithTooltip=__webpack_require__(277),esm_form=__webpack_require__(73),icon=__webpack_require__(50),helpers=__webpack_require__(43);function _slicedToArray(arr,i){return function _arrayWithHoles(arr){if(Array.isArray(arr))return arr}(arr)||function _iterableToArrayLimit(arr,i){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(arr)))return;var _arr=[],_n=!0,_d=!1,_e=void 0;try{for(var _s,_i=arr[Symbol.iterator]();!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{_n||null==_i.return||_i.return()}finally{if(_d)throw _e}}return _arr}(arr,i)||function _unsupportedIterableToArray(o,minLen){if(!o)return;if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}(arr,i)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i=0||(target[key]=source[key]);return target}(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}var Wrapper=esm.styled.div({position:"relative",maxWidth:250}),PickerTooltip=Object(esm.styled)(lazy_WithTooltip.a)({position:"absolute",zIndex:1,top:4,left:4}),TooltipContent=esm.styled.div({width:200,margin:5,".react-colorful__saturation":{borderRadius:"4px 4px 0 0"},".react-colorful__hue":{boxShadow:"inset 0 0 0 1px rgb(0 0 0 / 5%)"},".react-colorful__last-control":{borderRadius:"0 0 4px 4px"}}),Note=Object(esm.styled)(TooltipNote.a)((function(_ref){return{fontFamily:_ref.theme.typography.fonts.base}})),Swatches=esm.styled.div({display:"grid",gridTemplateColumns:"repeat(9, 16px)",gap:6,padding:3,marginTop:5,width:200}),SwatchColor=esm.styled.div((function(_ref2){var theme=_ref2.theme;return{width:16,height:16,boxShadow:_ref2.active?"".concat(theme.appBorderColor," 0 0 0 1px inset, ").concat(theme.color.mediumdark,"50 0 0 0 4px"):"".concat(theme.appBorderColor," 0 0 0 1px inset"),borderRadius:theme.appBorderRadius}})),Color_Swatch=function Swatch(_ref3){var value=_ref3.value,active=_ref3.active,onClick=_ref3.onClick,style=_ref3.style,props=_objectWithoutProperties(_ref3,["value","active","onClick","style"]),backgroundImage="linear-gradient(".concat(value,", ").concat(value,"), ").concat('url(\'data:image/svg+xml;charset=utf-8,\')',", linear-gradient(#fff, #fff)");return react_default.a.createElement(SwatchColor,_extends({},props,{active:active,onClick:onClick,style:Object.assign({},style,{backgroundImage:backgroundImage})}))};Color_Swatch.displayName="Swatch";var ColorSpace,Input=Object(esm.styled)(esm_form.a.Input)((function(_ref4){return{width:"100%",paddingLeft:30,paddingRight:30,boxSizing:"border-box",fontFamily:_ref4.theme.typography.fonts.base}})),ToggleIcon=Object(esm.styled)(icon.a)((function(_ref5){return{position:"absolute",zIndex:1,top:6,right:7,width:20,height:20,padding:4,boxSizing:"border-box",cursor:"pointer",color:_ref5.theme.input.color}}));!function(ColorSpace){ColorSpace.RGB="rgb",ColorSpace.HSL="hsl",ColorSpace.HEX="hex"}(ColorSpace||(ColorSpace={}));var COLOR_SPACES=Object.values(ColorSpace),COLOR_REGEXP=/\(([0-9]+),\s*([0-9]+)%?,\s*([0-9]+)%?,?\s*([0-9.]+)?\)/,RGB_REGEXP=/^\s*rgba?\(([0-9]+),\s*([0-9]+),\s*([0-9]+),?\s*([0-9.]+)?\)\s*$/i,HSL_REGEXP=/^\s*hsla?\(([0-9]+),\s*([0-9]+)%,\s*([0-9]+)%,?\s*([0-9.]+)?\)\s*$/i,HEX_REGEXP=/^\s*#?([0-9a-f]{3}|[0-9a-f]{6})\s*$/i,SHORTHEX_REGEXP=/^\s*#?([0-9a-f]{3})\s*$/i,ColorPicker=(_defineProperty(_ColorPicker={},ColorSpace.HEX,(function(r){return react_default.a.createElement($,index_module_u({},r,{colorModel:G}))})),_defineProperty(_ColorPicker,ColorSpace.RGB,(function(r){return react_default.a.createElement(U,index_module_u({},r,{colorModel:ge}))})),_defineProperty(_ColorPicker,ColorSpace.HSL,(function(r){return react_default.a.createElement(U,index_module_u({},r,{colorModel:ee}))})),_ColorPicker),fallbackColor=(_defineProperty(_fallbackColor={},ColorSpace.HEX,"transparent"),_defineProperty(_fallbackColor,ColorSpace.RGB,"rgba(0, 0, 0, 0)"),_defineProperty(_fallbackColor,ColorSpace.HSL,"hsla(0, 0%, 0%, 0)"),_fallbackColor),stringToArgs=function stringToArgs(value){var match=null==value?void 0:value.match(COLOR_REGEXP);if(!match)return[0,0,0,1];var _match=_slicedToArray(match,5),x=_match[1],y=_match[2],z=_match[3],_match$=_match[4];return[x,y,z,void 0===_match$?1:_match$].map(Number)},Color_parseValue=function parseValue(value){var _ref12;if(value){var valid=!0;if(RGB_REGEXP.test(value)){var _ref8,_stringToArgs2=_slicedToArray(stringToArgs(value),4),r=_stringToArgs2[0],g=_stringToArgs2[1],b=_stringToArgs2[2],a=_stringToArgs2[3],_ref7=_slicedToArray(color_convert_default.a.rgb.hsl([r,g,b])||[0,0,0],3),h=_ref7[0],s=_ref7[1],l=_ref7[2];return _defineProperty(_ref8={valid:valid,value:value,keyword:color_convert_default.a.rgb.keyword([r,g,b]),colorSpace:ColorSpace.RGB},ColorSpace.RGB,value),_defineProperty(_ref8,ColorSpace.HSL,"hsla(".concat(h,", ").concat(s,"%, ").concat(l,"%, ").concat(a,")")),_defineProperty(_ref8,ColorSpace.HEX,"#".concat(color_convert_default.a.rgb.hex([r,g,b]).toLowerCase())),_ref8}if(HSL_REGEXP.test(value)){var _ref11,_stringToArgs4=_slicedToArray(stringToArgs(value),4),_h=_stringToArgs4[0],_s2=_stringToArgs4[1],_l=_stringToArgs4[2],_a=_stringToArgs4[3],_ref10=_slicedToArray(color_convert_default.a.hsl.rgb([_h,_s2,_l])||[0,0,0],3),_r=_ref10[0],_g=_ref10[1],_b=_ref10[2];return _defineProperty(_ref11={valid:valid,value:value,keyword:color_convert_default.a.hsl.keyword([_h,_s2,_l]),colorSpace:ColorSpace.HSL},ColorSpace.RGB,"rgba(".concat(_r,", ").concat(_g,", ").concat(_b,", ").concat(_a,")")),_defineProperty(_ref11,ColorSpace.HSL,value),_defineProperty(_ref11,ColorSpace.HEX,"#".concat(color_convert_default.a.hsl.hex([_h,_s2,_l]).toLowerCase())),_ref11}var plain=value.replace("#",""),rgb=color_convert_default.a.keyword.rgb(plain)||color_convert_default.a.hex.rgb(plain),hsl=color_convert_default.a.rgb.hsl(rgb),mapped=value;if(/[^#a-f0-9]/i.test(value)?mapped=plain:HEX_REGEXP.test(value)&&(mapped="#".concat(plain)),mapped.startsWith("#"))valid=HEX_REGEXP.test(mapped);else try{color_convert_default.a.keyword.hex(mapped)}catch(e){valid=!1}return _defineProperty(_ref12={valid:valid,value:mapped,keyword:color_convert_default.a.rgb.keyword(rgb),colorSpace:ColorSpace.HEX},ColorSpace.RGB,"rgba(".concat(rgb[0],", ").concat(rgb[1],", ").concat(rgb[2],", 1)")),_defineProperty(_ref12,ColorSpace.HSL,"hsla(".concat(hsl[0],", ").concat(hsl[1],"%, ").concat(hsl[2],"%, 1)")),_defineProperty(_ref12,ColorSpace.HEX,mapped),_ref12}},Color_useColorInput=function useColorInput(initialValue,onChange){var _useState2=_slicedToArray(Object(react.useState)(initialValue||""),2),value=_useState2[0],setValue=_useState2[1],_useState4=_slicedToArray(Object(react.useState)((function(){return Color_parseValue(value)})),2),color=_useState4[0],setColor=_useState4[1],_useState6=_slicedToArray(Object(react.useState)((null==color?void 0:color.colorSpace)||ColorSpace.HEX),2),colorSpace=_useState6[0],setColorSpace=_useState6[1];Object(react.useEffect)((function(){void 0===initialValue&&(setValue(""),setColor(void 0),setColorSpace(ColorSpace.HEX))}),[initialValue]);var realValue=Object(react.useMemo)((function(){return function getRealValue(value,color,colorSpace){if(!value||null==color||!color.valid)return fallbackColor[colorSpace];if(colorSpace!==ColorSpace.HEX)return(null==color?void 0:color[colorSpace])||fallbackColor[colorSpace];if(!color.hex.startsWith("#"))try{return"#".concat(color_convert_default.a.keyword.hex(color.hex))}catch(e){return fallbackColor.hex}var short=color.hex.match(SHORTHEX_REGEXP);if(!short)return HEX_REGEXP.test(color.hex)?color.hex:fallbackColor.hex;var _short$1$split2=_slicedToArray(short[1].split(""),3),r=_short$1$split2[0],g=_short$1$split2[1],b=_short$1$split2[2];return"#".concat(r).concat(r).concat(g).concat(g).concat(b).concat(b)}(value,color,colorSpace).toLowerCase()}),[value,color,colorSpace]),updateValue=Object(react.useCallback)((function(update){var parsed=Color_parseValue(update);setValue((null==parsed?void 0:parsed.value)||update||""),parsed&&(setColor(parsed),setColorSpace(parsed.colorSpace),onChange(parsed.value))}),[onChange]),cycleColorSpace=Object(react.useCallback)((function(){var next=COLOR_SPACES.indexOf(colorSpace)+1;next>=COLOR_SPACES.length&&(next=0),setColorSpace(COLOR_SPACES[next]);var update=(null==color?void 0:color[COLOR_SPACES[next]])||"";setValue(update),onChange(update)}),[color,colorSpace,onChange]);return{value:value,realValue:realValue,updateValue:updateValue,color:color,colorSpace:colorSpace,cycleColorSpace:cycleColorSpace}},id=function id(value){return value.replace(/\s*/,"").toLowerCase()},Color_ColorControl=function ColorControl(_ref13){var name=_ref13.name,initialValue=_ref13.value,onChange=_ref13.onChange,onFocus=_ref13.onFocus,onBlur=_ref13.onBlur,presetColors=_ref13.presetColors,startOpen=_ref13.startOpen,_useColorInput=Color_useColorInput(initialValue,throttle_default()(onChange,200)),value=_useColorInput.value,realValue=_useColorInput.realValue,updateValue=_useColorInput.updateValue,color=_useColorInput.color,colorSpace=_useColorInput.colorSpace,cycleColorSpace=_useColorInput.cycleColorSpace,_usePresets=function usePresets(presetColors,currentColor,colorSpace){var _useState8=_slicedToArray(Object(react.useState)(null!=currentColor&¤tColor.valid?[currentColor]:[]),2),selectedColors=_useState8[0],setSelectedColors=_useState8[1];Object(react.useEffect)((function(){void 0===currentColor&&setSelectedColors([])}),[currentColor]);var presets=Object(react.useMemo)((function(){return(presetColors||[]).map((function(preset){return"string"==typeof preset?Color_parseValue(preset):preset.title?Object.assign({},Color_parseValue(preset.color),{keyword:preset.title}):Color_parseValue(preset.color)})).concat(selectedColors).filter(Boolean).slice(-27)}),[presetColors,selectedColors]),addPreset=Object(react.useCallback)((function(color){null!=color&&color.valid&&(presets.some((function(preset){return id(preset[colorSpace])===id(color[colorSpace])}))||setSelectedColors((function(arr){return arr.concat(color)})))}),[colorSpace,presets]);return{presets:presets,addPreset:addPreset}}(presetColors,color,colorSpace),presets=_usePresets.presets,addPreset=_usePresets.addPreset,Picker=ColorPicker[colorSpace];return react_default.a.createElement(Wrapper,null,react_default.a.createElement(PickerTooltip,{trigger:"click",startOpen:startOpen,closeOnClick:!0,onVisibilityChange:function onVisibilityChange(){return addPreset(color)},tooltip:react_default.a.createElement(TooltipContent,null,react_default.a.createElement(Picker,{color:"transparent"===realValue?"#000000":realValue,onChange:updateValue,onFocus:onFocus,onBlur:onBlur}),presets.length>0&&react_default.a.createElement(Swatches,null,presets.map((function(preset,index){return react_default.a.createElement(lazy_WithTooltip.a,{key:"".concat(preset.value,"-").concat(index),hasChrome:!1,tooltip:react_default.a.createElement(Note,{note:preset.keyword||preset.value})},react_default.a.createElement(Color_Swatch,{value:preset[colorSpace],active:color&&id(preset[colorSpace])===id(color[colorSpace]),onClick:function onClick(){return updateValue(preset.value)}}))}))))},react_default.a.createElement(Color_Swatch,{value:realValue,style:{margin:4}})),react_default.a.createElement(Input,{id:Object(helpers.a)(name),value:value,onChange:function onChange(e){return updateValue(e.target.value)},onFocus:function onFocus(e){return e.target.select()},placeholder:"Choose color..."}),value?react_default.a.createElement(ToggleIcon,{icon:"markup",onClick:cycleColorSpace}):null)};Color_ColorControl.displayName="ColorControl";__webpack_exports__.default=Color_ColorControl},1505:function(module,exports,__webpack_require__){(function(global){var check=function(it){return it&&it.Math==Math&&it};module.exports=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof global&&global)||function(){return this}()||Function("return this")()}).call(this,__webpack_require__(100))},1506:function(module,exports){var FunctionPrototype=Function.prototype,bind=FunctionPrototype.bind,call=FunctionPrototype.call,callBind=bind&&bind.bind(call);module.exports=bind?function(fn){return fn&&callBind(call,fn)}:function(fn){return fn&&function(){return call.apply(fn,arguments)}}},1507:function(module,exports){module.exports=function(exec){try{return!!exec()}catch(error){return!0}}},1508:function(module,exports,__webpack_require__){var global=__webpack_require__(1505),shared=__webpack_require__(1535),hasOwn=__webpack_require__(1513),uid=__webpack_require__(1554),NATIVE_SYMBOL=__webpack_require__(1549),USE_SYMBOL_AS_UID=__webpack_require__(1577),WellKnownSymbolsStore=shared("wks"),Symbol=global.Symbol,symbolFor=Symbol&&Symbol.for,createWellKnownSymbol=USE_SYMBOL_AS_UID?Symbol:Symbol&&Symbol.withoutSetter||uid;module.exports=function(name){if(!hasOwn(WellKnownSymbolsStore,name)||!NATIVE_SYMBOL&&"string"!=typeof WellKnownSymbolsStore[name]){var description="Symbol."+name;NATIVE_SYMBOL&&hasOwn(Symbol,name)?WellKnownSymbolsStore[name]=Symbol[name]:WellKnownSymbolsStore[name]=USE_SYMBOL_AS_UID&&symbolFor?symbolFor(description):createWellKnownSymbol(description)}return WellKnownSymbolsStore[name]}},1509:function(module,exports){module.exports=function(argument){return"function"==typeof argument}},1510:function(module,exports,__webpack_require__){var global=__webpack_require__(1505),isObject=__webpack_require__(1518),String=global.String,TypeError=global.TypeError;module.exports=function(argument){if(isObject(argument))return argument;throw TypeError(String(argument)+" is not an object")}},1511:function(module,exports,__webpack_require__){var global=__webpack_require__(1505),getOwnPropertyDescriptor=__webpack_require__(1546).f,createNonEnumerableProperty=__webpack_require__(1520),redefine=__webpack_require__(1519),setGlobal=__webpack_require__(1553),copyConstructorProperties=__webpack_require__(1580),isForced=__webpack_require__(1656);module.exports=function(options,source){var target,key,targetProperty,sourceProperty,descriptor,TARGET=options.target,GLOBAL=options.global,STATIC=options.stat;if(target=GLOBAL?global:STATIC?global[TARGET]||setGlobal(TARGET,{}):(global[TARGET]||{}).prototype)for(key in source){if(sourceProperty=source[key],targetProperty=options.noTargetGet?(descriptor=getOwnPropertyDescriptor(target,key))&&descriptor.value:target[key],!isForced(GLOBAL?key:TARGET+(STATIC?".":"#")+key,options.forced)&&void 0!==targetProperty){if(typeof sourceProperty==typeof targetProperty)continue;copyConstructorProperties(sourceProperty,targetProperty)}(options.sham||targetProperty&&targetProperty.sham)&&createNonEnumerableProperty(sourceProperty,"sham",!0),redefine(target,key,sourceProperty,options)}}},1512:function(module,exports){var call=Function.prototype.call;module.exports=call.bind?call.bind(call):function(){return call.apply(call,arguments)}},1513:function(module,exports,__webpack_require__){var uncurryThis=__webpack_require__(1506),toObject=__webpack_require__(1524),hasOwnProperty=uncurryThis({}.hasOwnProperty);module.exports=Object.hasOwn||function hasOwn(it,key){return hasOwnProperty(toObject(it),key)}},1514:function(module,exports,__webpack_require__){var global=__webpack_require__(1505),DESCRIPTORS=__webpack_require__(1515),IE8_DOM_DEFINE=__webpack_require__(1579),anObject=__webpack_require__(1510),toPropertyKey=__webpack_require__(1533),TypeError=global.TypeError,$defineProperty=Object.defineProperty;exports.f=DESCRIPTORS?$defineProperty:function defineProperty(O,P,Attributes){if(anObject(O),P=toPropertyKey(P),anObject(Attributes),IE8_DOM_DEFINE)try{return $defineProperty(O,P,Attributes)}catch(error){}if("get"in Attributes||"set"in Attributes)throw TypeError("Accessors not supported");return"value"in Attributes&&(O[P]=Attributes.value),O}},1515:function(module,exports,__webpack_require__){var fails=__webpack_require__(1507);module.exports=!fails((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},1516:function(module,exports,__webpack_require__){var global=__webpack_require__(1505),classof=__webpack_require__(1541),String=global.String;module.exports=function(argument){if("Symbol"===classof(argument))throw TypeError("Cannot convert a Symbol value to a string");return String(argument)}},1517:function(module,exports,__webpack_require__){var IndexedObject=__webpack_require__(1547),requireObjectCoercible=__webpack_require__(1522);module.exports=function(it){return IndexedObject(requireObjectCoercible(it))}},1518:function(module,exports,__webpack_require__){var isCallable=__webpack_require__(1509);module.exports=function(it){return"object"==typeof it?null!==it:isCallable(it)}},1519:function(module,exports,__webpack_require__){var global=__webpack_require__(1505),isCallable=__webpack_require__(1509),hasOwn=__webpack_require__(1513),createNonEnumerableProperty=__webpack_require__(1520),setGlobal=__webpack_require__(1553),inspectSource=__webpack_require__(1556),InternalStateModule=__webpack_require__(1529),CONFIGURABLE_FUNCTION_NAME=__webpack_require__(1538).CONFIGURABLE,getInternalState=InternalStateModule.get,enforceInternalState=InternalStateModule.enforce,TEMPLATE=String(String).split("String");(module.exports=function(O,key,value,options){var state,unsafe=!!options&&!!options.unsafe,simple=!!options&&!!options.enumerable,noTargetGet=!!options&&!!options.noTargetGet,name=options&&void 0!==options.name?options.name:key;isCallable(value)&&("Symbol("===String(name).slice(0,7)&&(name="["+String(name).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!hasOwn(value,"name")||CONFIGURABLE_FUNCTION_NAME&&value.name!==name)&&createNonEnumerableProperty(value,"name",name),(state=enforceInternalState(value)).source||(state.source=TEMPLATE.join("string"==typeof name?name:""))),O!==global?(unsafe?!noTargetGet&&O[key]&&(simple=!0):delete O[key],simple?O[key]=value:createNonEnumerableProperty(O,key,value)):simple?O[key]=value:setGlobal(key,value)})(Function.prototype,"toString",(function toString(){return isCallable(this)&&getInternalState(this).source||inspectSource(this)}))},1520:function(module,exports,__webpack_require__){var DESCRIPTORS=__webpack_require__(1515),definePropertyModule=__webpack_require__(1514),createPropertyDescriptor=__webpack_require__(1526);module.exports=DESCRIPTORS?function(object,key,value){return definePropertyModule.f(object,key,createPropertyDescriptor(1,value))}:function(object,key,value){return object[key]=value,object}},1521:function(module,exports,__webpack_require__){var uncurryThis=__webpack_require__(1506),toString=uncurryThis({}.toString),stringSlice=uncurryThis("".slice);module.exports=function(it){return stringSlice(toString(it),8,-1)}},1522:function(module,exports,__webpack_require__){var TypeError=__webpack_require__(1505).TypeError;module.exports=function(it){if(null==it)throw TypeError("Can't call method on "+it);return it}},1523:function(module,exports,__webpack_require__){var global=__webpack_require__(1505),isCallable=__webpack_require__(1509),aFunction=function(argument){return isCallable(argument)?argument:void 0};module.exports=function(namespace,method){return arguments.length<2?aFunction(global[namespace]):global[namespace]&&global[namespace][method]}},1524:function(module,exports,__webpack_require__){var global=__webpack_require__(1505),requireObjectCoercible=__webpack_require__(1522),Object=global.Object;module.exports=function(argument){return Object(requireObjectCoercible(argument))}},1526:function(module,exports){module.exports=function(bitmap,value){return{enumerable:!(1&bitmap),configurable:!(2&bitmap),writable:!(4&bitmap),value:value}}},1527:function(module,exports,__webpack_require__){var aCallable=__webpack_require__(1550);module.exports=function(V,P){var func=V[P];return null==func?void 0:aCallable(func)}},1528:function(module,exports){module.exports=!1},1529:function(module,exports,__webpack_require__){var set,get,has,NATIVE_WEAK_MAP=__webpack_require__(1653),global=__webpack_require__(1505),uncurryThis=__webpack_require__(1506),isObject=__webpack_require__(1518),createNonEnumerableProperty=__webpack_require__(1520),hasOwn=__webpack_require__(1513),shared=__webpack_require__(1552),sharedKey=__webpack_require__(1536),hiddenKeys=__webpack_require__(1537),TypeError=global.TypeError,WeakMap=global.WeakMap;if(NATIVE_WEAK_MAP||shared.state){var store=shared.state||(shared.state=new WeakMap),wmget=uncurryThis(store.get),wmhas=uncurryThis(store.has),wmset=uncurryThis(store.set);set=function(it,metadata){if(wmhas(store,it))throw new TypeError("Object already initialized");return metadata.facade=it,wmset(store,it,metadata),metadata},get=function(it){return wmget(store,it)||{}},has=function(it){return wmhas(store,it)}}else{var STATE=sharedKey("state");hiddenKeys[STATE]=!0,set=function(it,metadata){if(hasOwn(it,STATE))throw new TypeError("Object already initialized");return metadata.facade=it,createNonEnumerableProperty(it,STATE,metadata),metadata},get=function(it){return hasOwn(it,STATE)?it[STATE]:{}},has=function(it){return hasOwn(it,STATE)}}module.exports={set:set,get:get,has:has,enforce:function(it){return has(it)?get(it):set(it,{})},getterFor:function(TYPE){return function(it){var state;if(!isObject(it)||(state=get(it)).type!==TYPE)throw TypeError("Incompatible receiver, "+TYPE+" required");return state}}}},1530:function(module,exports,__webpack_require__){var toLength=__webpack_require__(1560);module.exports=function(obj){return toLength(obj.length)}},1531:function(module,exports,__webpack_require__){var activeXDocument,anObject=__webpack_require__(1510),defineProperties=__webpack_require__(1666),enumBugKeys=__webpack_require__(1561),hiddenKeys=__webpack_require__(1537),html=__webpack_require__(1667),documentCreateElement=__webpack_require__(1555),sharedKey=__webpack_require__(1536),IE_PROTO=sharedKey("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(content){return" \ No newline at end of file + window['STORIES'] = [{"titlePrefix":"","directory":"./stories","files":"index.js","importPathMatcher":"^\\.[\\\\/](?:stories\\/index\\.js)$"}]; \ No newline at end of file diff --git a/docs/index.html b/docs/index.html index 8f4eb38c..908278c7 100644 --- a/docs/index.html +++ b/docs/index.html @@ -56,4 +56,4 @@ - window['DOCS_MODE'] = false; \ No newline at end of file + window['DOCS_MODE'] = false; \ No newline at end of file diff --git a/docs/main.c128d239493043dc1244.manager.bundle.js b/docs/main.c128d239493043dc1244.manager.bundle.js deleted file mode 100644 index 3ba85f7d..00000000 --- a/docs/main.c128d239493043dc1244.manager.bundle.js +++ /dev/null @@ -1,30 +0,0 @@ -(window.webpackJsonp = window.webpackJsonp || []).push([ - [1], - { - 1051: function(module, exports) {}, - 1196: function(module, __webpack_exports__, __webpack_require__) { - 'use strict'; - __webpack_require__.r(__webpack_exports__), - __webpack_require__(80).c.setConfig({ - name: 'Informed', - url: 'https://teslamotors.github.io/informed', - isFullscreen: !1, - showNav: !0, - showPanel: !1, - panelPosition: 'bottom', - sidebarAnimations: !0, - enableShortcuts: !0, - isToolshown: !0, - selectedPanel: void 0 - }); - }, - 928: function(module, exports, __webpack_require__) { - __webpack_require__(929), - __webpack_require__(1196), - __webpack_require__(713), - __webpack_require__(1561), - (module.exports = __webpack_require__(1644)); - } - }, - [[928, 2, 3]] -]); diff --git a/docs/main.c39720cb.iframe.bundle.js b/docs/main.c39720cb.iframe.bundle.js deleted file mode 100644 index d89686e0..00000000 --- a/docs/main.c39720cb.iframe.bundle.js +++ /dev/null @@ -1,23437 +0,0 @@ -(window.webpackJsonp = window.webpackJsonp || []).push([ - [1], - { - './.storybook/assets/normalize.css': function( - module, - exports, - __webpack_require__ - ) { - var api = __webpack_require__( - './node_modules/@storybook/builder-webpack4/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js' - ), - content = __webpack_require__( - './node_modules/@storybook/builder-webpack4/node_modules/css-loader/dist/cjs.js?!./node_modules/postcss-loader/dist/cjs.js?!./.storybook/assets/normalize.css' - ); - 'string' == - typeof (content = content.__esModule ? content.default : content) && - (content = [[module.i, content, '']]); - var options = { insert: 'head', singleton: !1 }; - api(content, options); - module.exports = content.locals || {}; - }, - './.storybook/assets/prism.css': function( - module, - exports, - __webpack_require__ - ) { - var api = __webpack_require__( - './node_modules/@storybook/builder-webpack4/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js' - ), - content = __webpack_require__( - './node_modules/@storybook/builder-webpack4/node_modules/css-loader/dist/cjs.js?!./node_modules/postcss-loader/dist/cjs.js?!./.storybook/assets/prism.css' - ); - 'string' == - typeof (content = content.__esModule ? content.default : content) && - (content = [[module.i, content, '']]); - var options = { insert: 'head', singleton: !1 }; - api(content, options); - module.exports = content.locals || {}; - }, - './.storybook/assets/prism.js': function( - module, - exports, - __webpack_require__ - ) { - (function(global) { - var _self = - 'undefined' != typeof window - ? window - : 'undefined' != typeof WorkerGlobalScope && - self instanceof WorkerGlobalScope - ? self - : {}, - Prism = (function() { - var e = /\blang(?:uage)?-(\w+)\b/i, - t = 0, - n = (_self.Prism = { - manual: _self.Prism && _self.Prism.manual, - util: { - encode: function encode(e) { - return e instanceof a - ? new a(e.type, n.util.encode(e.content), e.alias) - : 'Array' === n.util.type(e) - ? e.map(n.util.encode) - : e - .replace(/&/g, '&') - .replace(/ e.length) return; - if (!(w instanceof s)) { - h.lastIndex = 0; - var P = 1; - if (!(_ = h.exec(w)) && m && b != t.length - 1) { - if (((h.lastIndex = k), !(_ = h.exec(e)))) break; - for ( - var A = _.index + (d ? _[1].length : 0), - j = _.index + _[0].length, - x = b, - O = k, - S = t.length; - S > x && - (j > O || (!t[x].type && !t[x - 1].greedy)); - ++x - ) - A >= (O += t[x].length) && (++b, (k = O)); - if (t[b] instanceof s || t[x - 1].greedy) - continue; - (P = x - b), (w = e.slice(k, O)), (_.index -= k); - } - if (_) { - d && (p = _[1].length); - j = - (A = _.index + p) + (_ = _[0].slice(p)).length; - var _, - N = w.slice(0, A), - C = w.slice(j), - E = [b, P]; - N && (++b, (k += N.length), E.push(N)); - var L = new s( - u, - f ? n.tokenize(_, f) : _, - y, - _, - m - ); - if ( - (E.push(L), - C && E.push(C), - Array.prototype.splice.apply(t, E), - 1 != P && n.matchGrammar(e, t, a, b, k, !0, u), - l) - ) - break; - } else if (l) break; - } - } - } - } - }, - tokenize: function tokenize(e, t) { - var a = [e], - r = t.rest; - if (r) { - for (var i in r) t[i] = r[i]; - delete t.rest; - } - return n.matchGrammar(e, a, t, 0, 0, !1), a; - }, - hooks: { - all: {}, - add: function add(e, t) { - var a = n.hooks.all; - (a[e] = a[e] || []), a[e].push(t); - }, - run: function run(e, t) { - var a = n.hooks.all[e]; - if (a && a.length) for (var r, i = 0; (r = a[i++]); ) r(t); - } - } - }), - a = (n.Token = function(e, t, n, a, r) { - (this.type = e), - (this.content = t), - (this.alias = n), - (this.length = 0 | (a || '').length), - (this.greedy = !!r); - }); - if ( - ((a.stringify = function(e, t, r) { - if ('string' == typeof e) return e; - if ('Array' === n.util.type(e)) - return e - .map(function(n) { - return a.stringify(n, t, e); - }) - .join(''); - var i = { - type: e.type, - content: a.stringify(e.content, t, r), - tag: 'span', - classes: ['token', e.type], - attributes: {}, - language: t, - parent: r - }; - if ( - ('comment' == i.type && (i.attributes.spellcheck = 'true'), - e.alias) - ) { - var l = - 'Array' === n.util.type(e.alias) ? e.alias : [e.alias]; - Array.prototype.push.apply(i.classes, l); - } - n.hooks.run('wrap', i); - var o = Object.keys(i.attributes) - .map(function(e) { - return ( - e + - '="' + - (i.attributes[e] || '').replace(/"/g, '"') + - '"' - ); - }) - .join(' '); - return ( - '<' + - i.tag + - ' class="' + - i.classes.join(' ') + - '"' + - (o ? ' ' + o : '') + - '>' + - i.content + - '' - ); - }), - !_self.document) - ) - return _self.addEventListener - ? (_self.addEventListener( - 'message', - function(e) { - var t = JSON.parse(e.data), - a = t.language, - r = t.code, - i = t.immediateClose; - _self.postMessage(n.highlight(r, n.languages[a], a)), - i && _self.close(); - }, - !1 - ), - _self.Prism) - : _self.Prism; - var r = - document.currentScript || - [].slice.call(document.getElementsByTagName('script')).pop(); - return ( - r && - ((n.filename = r.src), - !document.addEventListener || - n.manual || - r.hasAttribute('data-manual') || - ('loading' !== document.readyState - ? window.requestAnimationFrame - ? window.requestAnimationFrame(n.highlightAll) - : window.setTimeout(n.highlightAll, 16) - : document.addEventListener( - 'DOMContentLoaded', - n.highlightAll - ))), - _self.Prism - ); - })(); - module.exports && (module.exports = Prism), - void 0 !== global && (global.Prism = Prism), - (Prism.languages.markup = { - comment: //, - prolog: /<\?[\s\S]+?\?>/, - doctype: //i, - cdata: //i, - tag: { - pattern: /<\/?(?!\d)[^\s>\/=$<]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\\1|\\?(?!\1)[\s\S])*\1|[^\s'">=]+))?)*\s*\/?>/i, - inside: { - tag: { - pattern: /^<\/?[^\s>\/]+/i, - inside: { punctuation: /^<\/?/, namespace: /^[^\s>\/:]+:/ } - }, - 'attr-value': { - pattern: /=(?:('|")[\s\S]*?(\1)|[^\s>]+)/i, - inside: { punctuation: /[=>"']/ } - }, - punctuation: /\/?>/, - 'attr-name': { - pattern: /[^\s>\/]+/, - inside: { namespace: /^[^\s>\/:]+:/ } - } - } - }, - entity: /&#?[\da-z]{1,8};/i - }), - (Prism.languages.markup.tag.inside['attr-value'].inside.entity = - Prism.languages.markup.entity), - Prism.hooks.add('wrap', function(a) { - 'entity' === a.type && - (a.attributes.title = a.content.replace(/&/, '&')); - }), - (Prism.languages.xml = Prism.languages.markup), - (Prism.languages.html = Prism.languages.markup), - (Prism.languages.mathml = Prism.languages.markup), - (Prism.languages.svg = Prism.languages.markup), - (Prism.languages.css = { - comment: /\/\*[\s\S]*?\*\//, - atrule: { - pattern: /@[\w-]+?.*?(;|(?=\s*\{))/i, - inside: { rule: /@[\w-]+/ } - }, - url: /url\((?:(["'])(\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1|.*?)\)/i, - selector: /[^\{\}\s][^\{\};]*?(?=\s*\{)/, - string: { - pattern: /("|')(\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/, - greedy: !0 - }, - property: /(\b|\B)[\w-]+(?=\s*:)/i, - important: /\B!important\b/i, - function: /[-a-z0-9]+(?=\()/i, - punctuation: /[(){};:]/ - }), - (Prism.languages.css.atrule.inside.rest = Prism.util.clone( - Prism.languages.css - )), - Prism.languages.markup && - (Prism.languages.insertBefore('markup', 'tag', { - style: { - pattern: /()[\s\S]*?(?=<\/style>)/i, - lookbehind: !0, - inside: Prism.languages.css, - alias: 'language-css' - } - }), - Prism.languages.insertBefore( - 'inside', - 'attr-value', - { - 'style-attr': { - pattern: /\s*style=("|').*?\1/i, - inside: { - 'attr-name': { - pattern: /^\s*style/i, - inside: Prism.languages.markup.tag.inside - }, - punctuation: /^\s*=\s*['"]|['"]\s*$/, - 'attr-value': { - pattern: /.+/i, - inside: Prism.languages.css - } - }, - alias: 'language-css' - } - }, - Prism.languages.markup.tag - )), - (Prism.languages.clike = { - comment: [ - { pattern: /(^|[^\\])\/\*[\s\S]*?\*\//, lookbehind: !0 }, - { pattern: /(^|[^\\:])\/\/.*/, lookbehind: !0 } - ], - string: { - pattern: /(["'])(\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/, - greedy: !0 - }, - 'class-name': { - pattern: /((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[a-z0-9_\.\\]+/i, - lookbehind: !0, - inside: { punctuation: /(\.|\\)/ } - }, - keyword: /\b(if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/, - boolean: /\b(true|false)\b/, - function: /[a-z0-9_]+(?=\()/i, - number: /\b-?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)\b/i, - operator: /--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/, - punctuation: /[{}[\];(),.:]/ - }), - (Prism.languages.javascript = Prism.languages.extend('clike', { - keyword: /\b(as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)\b/, - number: /\b-?(0[xX][\dA-Fa-f]+|0[bB][01]+|0[oO][0-7]+|\d*\.?\d+([Ee][+-]?\d+)?|NaN|Infinity)\b/, - function: /[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*(?=\()/i, - operator: /-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/ - })), - Prism.languages.insertBefore('javascript', 'keyword', { - regex: { - pattern: /(^|[^\/])\/(?!\/)(\[[^\]\r\n]+]|\\.|[^\/\\\[\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})]))/, - lookbehind: !0, - greedy: !0 - } - }), - Prism.languages.insertBefore('javascript', 'string', { - 'template-string': { - pattern: /`(?:\\\\|\\?[^\\])*?`/, - greedy: !0, - inside: { - interpolation: { - pattern: /\$\{[^}]+\}/, - inside: { - 'interpolation-punctuation': { - pattern: /^\$\{|\}$/, - alias: 'punctuation' - }, - rest: Prism.languages.javascript - } - }, - string: /[\s\S]+/ - } - } - }), - Prism.languages.markup && - Prism.languages.insertBefore('markup', 'tag', { - script: { - pattern: /()[\s\S]*?(?=<\/script>)/i, - lookbehind: !0, - inside: Prism.languages.javascript, - alias: 'language-javascript' - } - }), - (Prism.languages.js = Prism.languages.javascript), - (Prism.languages.json = { - property: /"(?:\\.|[^\\"])*"(?=\s*:)/gi, - string: /"(?!:)(?:\\.|[^\\"])*"(?!:)/g, - number: /\b-?(0x[\dA-Fa-f]+|\d*\.?\d+([Ee][+-]?\d+)?)\b/g, - punctuation: /[{}[\]);,]/g, - operator: /:/g, - boolean: /\b(true|false)\b/gi, - null: /\bnull\b/gi - }), - (Prism.languages.jsonp = Prism.languages.json), - (function(a) { - var e = a.util.clone(a.languages.javascript); - (a.languages.jsx = a.languages.extend('markup', e)), - (a.languages.jsx.tag.pattern = /<\/?[\w\.:-]+\s*(?:\s+(?:[\w\.:-]+(?:=(?:("|')(\\?[\s\S])*?\1|[^\s'">=]+|(\{[\s\S]*?\})))?|\{\.{3}\w+\}))*\s*\/?>/i), - (a.languages.jsx.tag.inside[ - 'attr-value' - ].pattern = /=(?!\{)(?:('|")[\s\S]*?(\1)|[^\s>]+)/i), - a.languages.insertBefore( - 'inside', - 'attr-name', - { - spread: { - pattern: /\{\.{3}\w+\}/, - inside: { punctuation: /\{|\}|\./, 'attr-value': /\w+/ } - } - }, - a.languages.jsx.tag - ); - var s = a.util.clone(a.languages.jsx); - delete s.punctuation, - (s = a.languages.insertBefore( - 'jsx', - 'operator', - { punctuation: /=(?={)|[{}[\];(),.:]/ }, - { jsx: s } - )), - a.languages.insertBefore( - 'inside', - 'attr-value', - { - script: { - pattern: /=(\{(?:\{[^}]*\}|[^}])+\})/i, - inside: s, - alias: 'language-javascript' - } - }, - a.languages.jsx.tag - ); - })(Prism), - (function() { - if ( - 'undefined' != typeof self && - self.Prism && - self.document && - Function.prototype.bind - ) { - var e = /(?:^|\s)token(?=$|\s)/, - s = /(?:^|\s)active(?=$|\s)/g, - i = /(?:^|\s)flipped(?=$|\s)/g, - o = function o(t, e, s, i) { - (this._elt = null), - (this._type = t), - (this._clsRegexp = RegExp('(?:^|\\s)' + t + '(?=$|\\s)')), - (this._token = null), - (this.updater = e), - (this._mouseout = this.mouseout.bind(this)), - (this.initializer = i); - var n = this; - s || (s = ['*']), - 'Array' !== Prism.util.type(s) && (s = [s]), - s.forEach(function(t) { - 'string' != typeof t && (t = t.lang), - o.byLanguages[t] || (o.byLanguages[t] = []), - o.byLanguages[t].indexOf(n) < 0 && - o.byLanguages[t].push(n); - }), - (o.byType[t] = this); - }; - (o.prototype.init = function() { - this._elt || - ((this._elt = document.createElement('div')), - (this._elt.className = - 'prism-previewer prism-previewer-' + this._type), - document.body.appendChild(this._elt), - this.initializer && this.initializer()); - }), - (o.prototype.check = function(t) { - do { - if ( - e.test(t.className) && - this._clsRegexp.test(t.className) - ) - break; - } while ((t = t.parentNode)); - t && t !== this._token && ((this._token = t), this.show()); - }), - (o.prototype.mouseout = function() { - this._token.removeEventListener( - 'mouseout', - this._mouseout, - !1 - ), - (this._token = null), - this.hide(); - }), - (o.prototype.show = function() { - if ((this._elt || this.init(), this._token)) - if (this.updater.call(this._elt, this._token.textContent)) { - this._token.addEventListener( - 'mouseout', - this._mouseout, - !1 - ); - var e = (function t(_t) { - var e = 0, - s = 0, - i = _t; - if (i.parentNode) { - do { - (e += i.offsetLeft), (s += i.offsetTop); - } while ((i = i.offsetParent) && i.nodeType < 9); - i = _t; - do { - (e -= i.scrollLeft), (s -= i.scrollTop); - } while ( - (i = i.parentNode) && - !/body/i.test(i.nodeName) - ); - } - return { - top: s, - right: innerWidth - e - _t.offsetWidth, - bottom: innerHeight - s - _t.offsetHeight, - left: e - }; - })(this._token); - (this._elt.className += ' active'), - e.top - this._elt.offsetHeight > 0 - ? ((this._elt.className = this._elt.className.replace( - i, - '' - )), - (this._elt.style.top = e.top + 'px'), - (this._elt.style.bottom = '')) - : ((this._elt.className += ' flipped'), - (this._elt.style.bottom = e.bottom + 'px'), - (this._elt.style.top = '')), - (this._elt.style.left = - e.left + - Math.min(200, this._token.offsetWidth / 2) + - 'px'); - } else this.hide(); - }), - (o.prototype.hide = function() { - this._elt.className = this._elt.className.replace(s, ''); - }), - (o.byLanguages = {}), - (o.byType = {}), - (o.initEvents = function(t, e) { - var s = []; - o.byLanguages[e] && (s = s.concat(o.byLanguages[e])), - o.byLanguages['*'] && (s = s.concat(o.byLanguages['*'])), - t.addEventListener( - 'mouseover', - function(t) { - var e = t.target; - s.forEach(function(t) { - t.check(e); - }); - }, - !1 - ); - }), - (Prism.plugins.Previewer = o), - Prism.hooks.add('after-highlight', function(t) { - (o.byLanguages['*'] || o.byLanguages[t.language]) && - o.initEvents(t.element, t.language); - }); - } - })(); - }.call( - this, - __webpack_require__('./node_modules/webpack/buildin/global.js') - )); - }, - './.storybook/assets/styles.css': function( - module, - exports, - __webpack_require__ - ) { - var api = __webpack_require__( - './node_modules/@storybook/builder-webpack4/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js' - ), - content = __webpack_require__( - './node_modules/@storybook/builder-webpack4/node_modules/css-loader/dist/cjs.js?!./node_modules/postcss-loader/dist/cjs.js?!./.storybook/assets/styles.css' - ); - 'string' == - typeof (content = content.__esModule ? content.default : content) && - (content = [[module.i, content, '']]); - var options = { insert: 'head', singleton: !1 }; - api(content, options); - module.exports = content.locals || {}; - }, - './.storybook/preview.js-generated-config-entry.js': function( - module, - __webpack_exports__, - __webpack_require__ - ) { - 'use strict'; - __webpack_require__.r(__webpack_exports__); - var preview_namespaceObject = {}; - __webpack_require__.r(preview_namespaceObject); - var _create, - ClientApi = __webpack_require__( - './node_modules/@storybook/client-api/dist/esm/ClientApi.js' - ), - esm = __webpack_require__( - './node_modules/@storybook/builder-webpack4/node_modules/@storybook/client-logger/dist/esm/index.js' - ), - client = (__webpack_require__('./.storybook/assets/prism.js'), - __webpack_require__('./.storybook/assets/normalize.css'), - __webpack_require__('./.storybook/assets/prism.css'), - __webpack_require__('./.storybook/assets/styles.css'), - __webpack_require__( - './node_modules/@codesandbox/sandpack-react/dist/index.css' - ), - __webpack_require__( - './node_modules/@storybook/react/dist/esm/client/index.js' - )), - storybook_readme = __webpack_require__( - './node_modules/storybook-readme/index.js' - ), - create = __webpack_require__( - './node_modules/@storybook/builder-webpack4/node_modules/@storybook/theming/create.js' - ), - esm_create = __webpack_require__( - './node_modules/@storybook/builder-webpack4/node_modules/@storybook/theming/dist/esm/create.js' - ), - package_0 = __webpack_require__('./package.json'); - function ownKeys(object, enumerableOnly) { - var keys = Object.keys(object); - if (Object.getOwnPropertySymbols) { - var symbols = Object.getOwnPropertySymbols(object); - enumerableOnly && - (symbols = symbols.filter(function(sym) { - return Object.getOwnPropertyDescriptor(object, sym).enumerable; - })), - keys.push.apply(keys, symbols); - } - return keys; - } - function _objectSpread(target) { - for (var i = 1; i < arguments.length; i++) { - var source = null != arguments[i] ? arguments[i] : {}; - i % 2 - ? ownKeys(Object(source), !0).forEach(function(key) { - _defineProperty(target, key, source[key]); - }) - : Object.getOwnPropertyDescriptors - ? Object.defineProperties( - target, - Object.getOwnPropertyDescriptors(source) - ) - : ownKeys(Object(source)).forEach(function(key) { - Object.defineProperty( - target, - key, - Object.getOwnPropertyDescriptor(source, key) - ); - }); - } - return target; - } - function _defineProperty(obj, key, value) { - return ( - key in obj - ? Object.defineProperty(obj, key, { - value: value, - enumerable: !0, - configurable: !0, - writable: !0 - }) - : (obj[key] = value), - obj - ); - } - var theme = Object(create.create)( - (_defineProperty( - (_create = { base: 'light', brandTitle: 'Informed' }), - 'brandTitle', - 'Informed v'.concat(package_0.a) - ), - _defineProperty( - _create, - 'brandUrl', - 'https://teslamotors.github.io/informed' - ), - _defineProperty(_create, 'brandImage', 'car-on-informed.png'), - _create) - ); - function preview_js_generated_config_entry_ownKeys( - object, - enumerableOnly - ) { - var keys = Object.keys(object); - if (Object.getOwnPropertySymbols) { - var symbols = Object.getOwnPropertySymbols(object); - enumerableOnly && - (symbols = symbols.filter(function(sym) { - return Object.getOwnPropertyDescriptor(object, sym).enumerable; - })), - keys.push.apply(keys, symbols); - } - return keys; - } - function preview_js_generated_config_entry_defineProperty( - obj, - key, - value - ) { - return ( - key in obj - ? Object.defineProperty(obj, key, { - value: value, - enumerable: !0, - configurable: !0, - writable: !0 - }) - : (obj[key] = value), - obj - ); - } - Object(client.addParameters)({ - readme: {}, - darkMode: { - darkClass: 'informed-black', - lightClass: 'informed-white', - stylePreview: !0, - dark: _objectSpread(_objectSpread({}, theme), esm_create.a.dark), - light: _objectSpread(_objectSpread({}, esm_create.a.light), theme) - } - }), - Object(client.addDecorator)(storybook_readme.addReadme), - Object.keys(preview_namespaceObject).forEach(function(key) { - var value = preview_namespaceObject[key]; - switch (key) { - case 'args': - case 'argTypes': - return esm.logger.warn( - 'Invalid args/argTypes in config, ignoring.', - JSON.stringify(value) - ); - case 'decorators': - return value.forEach(function(decorator) { - return Object(ClientApi.d)(decorator, !1); - }); - case 'loaders': - return value.forEach(function(loader) { - return Object(ClientApi.e)(loader, !1); - }); - case 'parameters': - return Object(ClientApi.f)( - (function preview_js_generated_config_entry_objectSpread( - target - ) { - for (var i = 1; i < arguments.length; i++) { - var source = null != arguments[i] ? arguments[i] : {}; - i % 2 - ? preview_js_generated_config_entry_ownKeys( - Object(source), - !0 - ).forEach(function(key) { - preview_js_generated_config_entry_defineProperty( - target, - key, - source[key] - ); - }) - : Object.getOwnPropertyDescriptors - ? Object.defineProperties( - target, - Object.getOwnPropertyDescriptors(source) - ) - : preview_js_generated_config_entry_ownKeys( - Object(source) - ).forEach(function(key) { - Object.defineProperty( - target, - key, - Object.getOwnPropertyDescriptor(source, key) - ); - }); - } - return target; - })({}, value), - !1 - ); - case 'argTypesEnhancers': - return value.forEach(function(enhancer) { - return Object(ClientApi.b)(enhancer); - }); - case 'argsEnhancers': - return value.forEach(function(enhancer) { - return Object(ClientApi.c)(enhancer); - }); - case 'render': - return Object(ClientApi.g)(value); - case 'globals': - case 'globalTypes': - var v = {}; - return (v[key] = value), Object(ClientApi.f)(v, !1); - case 'decorateStory': - case 'renderToDOM': - return null; - default: - return console.log(key + ' was not supported :( !'); - } - }); - }, - './generated-stories-entry.js': function( - module, - exports, - __webpack_require__ - ) { - 'use strict'; - (function(module) { - (0, - __webpack_require__( - './node_modules/@storybook/react/dist/esm/client/index.js' - ).configure)( - [__webpack_require__('./stories sync ^\\.[\\\\/](?:index\\.js)$')], - module, - !1 - ); - }.call( - this, - __webpack_require__('./node_modules/webpack/buildin/module.js')(module) - )); - }, - './node_modules/@storybook/builder-webpack4/node_modules/css-loader/dist/cjs.js?!./node_modules/postcss-loader/dist/cjs.js?!./.storybook/assets/normalize.css': function( - module, - exports, - __webpack_require__ - ) { - (exports = __webpack_require__( - './node_modules/@storybook/builder-webpack4/node_modules/css-loader/dist/runtime/api.js' - )(!1)).push([ - module.i, - '/*! normalize.css v3.0.2 | MIT License | git.io/normalize */\n\n/**\n * 1. Set default font family to sans-serif.\n * 2. Prevent iOS text size adjust after orientation change, without disabling\n * user zoom.\n */\n\nhtml {\n font-family: sans-serif; /* 1 */\n -ms-text-size-adjust: 100%; /* 2 */\n -webkit-text-size-adjust: 100%; /* 2 */\n}\n\n/**\n * Remove default margin.\n */\n\nbody {\n margin: 0;\n}\n\n/* HTML5 display definitions\n ========================================================================== */\n\n/**\n * Correct `block` display not defined for any HTML5 element in IE 8/9.\n * Correct `block` display not defined for `details` or `summary` in IE 10/11\n * and Firefox.\n * Correct `block` display not defined for `main` in IE 11.\n */\n\narticle,\naside,\ndetails,\nfigcaption,\nfigure,\nfooter,\nheader,\nhgroup,\nmain,\nmenu,\nnav,\nsection,\nsummary {\n display: block;\n}\n\n/**\n * 1. Correct `inline-block` display not defined in IE 8/9.\n * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.\n */\n\naudio,\ncanvas,\nprogress,\nvideo {\n display: inline-block; /* 1 */\n vertical-align: baseline; /* 2 */\n}\n\n/**\n * Prevent modern browsers from displaying `audio` without controls.\n * Remove excess height in iOS 5 devices.\n */\n\naudio:not([controls]) {\n display: none;\n height: 0;\n}\n\n/**\n * Address `[hidden]` styling not present in IE 8/9/10.\n * Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22.\n */\n\n[hidden],\ntemplate {\n display: none;\n}\n\n/* Links\n ========================================================================== */\n\n/**\n * Remove the gray background color from active links in IE 10.\n */\n\na {\n background-color: transparent;\n}\n\n/**\n * Improve readability when focused and also mouse hovered in all browsers.\n */\n\na:active,\na:hover {\n outline: 0;\n}\n\n/* Text-level semantics\n ========================================================================== */\n\n/**\n * Address styling not present in IE 8/9/10/11, Safari, and Chrome.\n */\n\nabbr[title] {\n border-bottom: 1px dotted;\n}\n\n/**\n * Address style set to `bolder` in Firefox 4+, Safari, and Chrome.\n */\n\nb,\nstrong {\n font-weight: bold;\n}\n\n/**\n * Address styling not present in Safari and Chrome.\n */\n\ndfn {\n font-style: italic;\n}\n\n/**\n * Address variable `h1` font-size and margin within `section` and `article`\n * contexts in Firefox 4+, Safari, and Chrome.\n */\n\nh1 {\n font-size: 2em;\n margin: 0.67em 0;\n}\n\n/**\n * Address styling not present in IE 8/9.\n */\n\nmark {\n background: #ff0;\n color: #000;\n}\n\n/**\n * Address inconsistent and variable font size in all browsers.\n */\n\nsmall {\n font-size: 80%;\n}\n\n/**\n * Prevent `sub` and `sup` affecting `line-height` in all browsers.\n */\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsup {\n top: -0.5em;\n}\n\nsub {\n bottom: -0.25em;\n}\n\n/* Embedded content\n ========================================================================== */\n\n/**\n * Remove border when inside `a` element in IE 8/9/10.\n */\n\nimg {\n border: 0;\n}\n\n/**\n * Correct overflow not hidden in IE 9/10/11.\n */\n\nsvg:not(:root) {\n overflow: hidden;\n}\n\n/* Grouping content\n ========================================================================== */\n\n/**\n * Address margin not present in IE 8/9 and Safari.\n */\n\nfigure {\n margin: 1em 40px;\n}\n\n/**\n * Address differences between Firefox and other browsers.\n */\n\nhr {\n box-sizing: content-box;\n height: 0;\n}\n\n/**\n * Contain overflow in all browsers.\n */\n\npre {\n overflow: auto;\n}\n\n/**\n * Address odd `em`-unit font size rendering in all browsers.\n */\n\ncode,\nkbd,\npre,\nsamp {\n font-family: monospace, monospace;\n font-size: 1em;\n}\n\n/* Forms\n ========================================================================== */\n\n/**\n * Known limitation: by default, Chrome and Safari on OS X allow very limited\n * styling of `select`, unless a `border` property is set.\n */\n\n/**\n * 1. Correct color not being inherited.\n * Known issue: affects color of disabled elements.\n * 2. Correct font properties not being inherited.\n * 3. Address margins set differently in Firefox 4+, Safari, and Chrome.\n */\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n color: inherit; /* 1 */\n font: inherit; /* 2 */\n margin: 0; /* 3 */\n}\n\n/**\n * Address `overflow` set to `hidden` in IE 8/9/10/11.\n */\n\nbutton {\n overflow: visible;\n}\n\n/**\n * Address inconsistent `text-transform` inheritance for `button` and `select`.\n * All other form control elements do not inherit `text-transform` values.\n * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.\n * Correct `select` style inheritance in Firefox.\n */\n\nbutton,\nselect {\n text-transform: none;\n}\n\n/**\n * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`\n * and `video` controls.\n * 2. Correct inability to style clickable `input` types in iOS.\n * 3. Improve usability and consistency of cursor style between image-type\n * `input` and others.\n */\n\nbutton,\nhtml input[type="button"], /* 1 */\ninput[type="reset"],\ninput[type="submit"] {\n -webkit-appearance: button; /* 2 */\n cursor: pointer; /* 3 */\n}\n\n/**\n * Re-set default cursor for disabled elements.\n */\n\nbutton[disabled],\nhtml input[disabled] {\n cursor: default;\n}\n\n/**\n * Remove inner padding and border in Firefox 4+.\n */\n\nbutton::-moz-focus-inner,\ninput::-moz-focus-inner {\n border: 0;\n padding: 0;\n}\n\n/**\n * Address Firefox 4+ setting `line-height` on `input` using `!important` in\n * the UA stylesheet.\n */\n\ninput {\n line-height: normal;\n}\n\n/**\n * It\'s recommended that you don\'t attempt to style these elements.\n * Firefox\'s implementation doesn\'t respect box-sizing, padding, or width.\n *\n * 1. Address box sizing set to `content-box` in IE 8/9/10.\n * 2. Remove excess padding in IE 8/9/10.\n */\n\ninput[type="checkbox"],\ninput[type="radio"] {\n box-sizing: border-box; /* 1 */\n padding: 0; /* 2 */\n}\n\n/**\n * Fix the cursor style for Chrome\'s increment/decrement buttons. For certain\n * `font-size` values of the `input`, it causes the cursor style of the\n * decrement button to change from `default` to `text`.\n */\n\ninput[type="number"]::-webkit-inner-spin-button,\ninput[type="number"]::-webkit-outer-spin-button {\n height: auto;\n}\n\n/**\n * 1. Address `appearance` set to `searchfield` in Safari and Chrome.\n * 2. Address `box-sizing` set to `border-box` in Safari and Chrome\n * (include `-moz` to future-proof).\n */\n\ninput[type="search"] {\n -webkit-appearance: textfield; /* 1 */ /* 2 */\n box-sizing: content-box;\n}\n\n/**\n * Remove inner padding and search cancel button in Safari and Chrome on OS X.\n * Safari (but not Chrome) clips the cancel button when the search input has\n * padding (and `textfield` appearance).\n */\n\ninput[type="search"]::-webkit-search-cancel-button,\ninput[type="search"]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/**\n * Define consistent border, margin, and padding.\n */\n\nfieldset {\n border: 1px solid #c0c0c0;\n margin: 0 2px;\n padding: 0.35em 0.625em 0.75em;\n}\n\n/**\n * 1. Correct `color` not being inherited in IE 8/9/10/11.\n * 2. Remove padding so people aren\'t caught out if they zero out fieldsets.\n */\n\nlegend {\n border: 0; /* 1 */\n padding: 0; /* 2 */\n}\n\n/**\n * Remove default vertical scrollbar in IE 8/9/10/11.\n */\n\ntextarea {\n overflow: auto;\n}\n\n/**\n * Don\'t inherit the `font-weight` (applied by a rule above).\n * NOTE: the default cannot safely be changed in Chrome and Safari on OS X.\n */\n\noptgroup {\n font-weight: bold;\n}\n\n/* Tables\n ========================================================================== */\n\n/**\n * Remove most spacing between table cells.\n */\n\ntable {\n border-collapse: collapse;\n border-spacing: 0;\n}\n\ntd,\nth {\n padding: 0;\n}', - '' - ]), - (module.exports = exports); - }, - './node_modules/@storybook/builder-webpack4/node_modules/css-loader/dist/cjs.js?!./node_modules/postcss-loader/dist/cjs.js?!./.storybook/assets/prism.css': function( - module, - exports, - __webpack_require__ - ) { - (exports = __webpack_require__( - './node_modules/@storybook/builder-webpack4/node_modules/css-loader/dist/runtime/api.js' - )(!1)).push([ - module.i, - '/* http://prismjs.com/download.html?themes=prism-okaidia&languages=markup+css+clike+javascript+json+jsx&plugins=previewer-base */\n/**\n * okaidia theme for JavaScript, CSS and HTML\n * Loosely based on Monokai textmate theme by http://www.monokai.nl/\n * @author ocodia\n */\n\ncode[class*="language-"],\npre[class*="language-"] {\n\tcolor: #f8f8f2 !important;\n\tbackground: none !important;\n\ttext-shadow: 0 1px rgba(0, 0, 0, 0.3) !important;\n\tfont-family: Consolas, Monaco, \'Andale Mono\', \'Ubuntu Mono\', monospace !important;\n\ttext-align: left !important;\n\twhite-space: pre !important;\n\tword-spacing: normal !important;\n\tword-break: normal !important;\n\tword-wrap: normal !important;\n\tline-height: 1.5 !important;\n border: none;\n\n\t-moz-tab-size: 4 !important;\n\t-o-tab-size: 4 !important;\n\ttab-size: 4 !important;\n\n\t-webkit-hyphens: none !important;\n\t-ms-hyphens: none !important;\n\thyphens: none !important;\n}\n\n/* Code blocks */\npre[class*="language-"] {\n\tpadding: 1rem !important;\n\tmargin: 0 0 !important;\n\toverflow: visible !important;\n overflow-x: scroll !important;\n\tborder-radius: 0.3em !important;\n}\n\ncode[class*="language-"] {\n margin: 0 !important;\n padding: 0 !important;\n overflow: visible !important;\n}\n\n:not(pre) > code[class*="language-"],\npre[class*="language-"] {\n\tbackground: #272822 !important;\n}\n\n/* Inline code */\n:not(pre) > code[class*="language-"] {\n\tpadding: .1em !important;\n\tborder-radius: .3em !important;\n\twhite-space: normal !important;\n}\n\n.token.comment,\n.token.prolog,\n.token.doctype,\n.token.cdata {\n\tcolor: slategray !important;\n}\n\n.token.punctuation {\n\tcolor: #f8f8f2 !important;\n}\n\n.namespace {\n\topacity: .7 !important;\n}\n\n.token.property,\n.token.tag,\n.token.constant,\n.token.symbol,\n.token.deleted {\n\tcolor: #f92672 !important;\n}\n\n.token.boolean,\n.token.number {\n\tcolor: #ae81ff !important;\n}\n\n.token.selector,\n.token.attr-name,\n.token.string,\n.token.char,\n.token.builtin,\n.token.inserted {\n\tcolor: #a6e22e !important;\n}\n\n.token.operator,\n.token.entity,\n.token.url,\n.language-css .token.string,\n.style .token.string,\n.token.variable {\n\tcolor: #f8f8f2 !important;\n}\n\n.token.atrule,\n.token.attr-value,\n.token.function {\n\tcolor: #e6db74 !important;\n}\n\n.token.keyword {\n\tcolor: #66d9ef !important;\n}\n\n.token.regex,\n.token.important {\n\tcolor: #fd971f !important;\n}\n\n.token.important,\n.token.bold {\n\tfont-weight: bold !important;\n}\n.token.italic {\n\tfont-style: italic !important;\n}\n\n.token.entity {\n\tcursor: help !important;\n}\n\n.prism-previewer,\n.prism-previewer:before,\n.prism-previewer:after {\n\tposition: absolute !important;\n\tpointer-events: none !important;\n}\n.prism-previewer,\n.prism-previewer:after {\n\tleft: 50% !important;\n}\n.prism-previewer {\n\tmargin-top: -48px !important;\n\twidth: 32px !important;\n\theight: 32px !important;\n\tmargin-left: -16px !important;\n\n\topacity: 0 !important;\n\ttransition: opacity .25s !important;\n}\n.prism-previewer.flipped {\n\tmargin-top: 0 !important;\n\tmargin-bottom: -48px !important;\n}\n.prism-previewer:before,\n.prism-previewer:after {\n\tcontent: \'\' !important;\n\tposition: absolute !important;\n\tpointer-events: none !important;\n}\n.prism-previewer:before {\n\ttop: -5px !important;\n\tright: -5px !important;\n\tleft: -5px !important;\n\tbottom: -5px !important;\n\tborder-radius: 10px !important;\n\tborder: 5px solid #fff !important;\n\tbox-shadow: 0 0 3px rgba(0, 0, 0, 0.5) inset, 0 0 10px rgba(0, 0, 0, 0.75) !important;\n}\n\n.prism-previewer:after {\n\ttop: 100% !important;\n\twidth: 0 !important;\n\theight: 0 !important;\n\tmargin: 5px 0 0 -7px !important;\n\tborder: 7px solid transparent !important;\n\tborder-color: rgba(255, 0, 0, 0) !important;\n\tborder-top-color: #fff !important;\n}\n.prism-previewer.flipped:after {\n\ttop: auto !important;\n\tbottom: 100% !important;\n\tmargin-top: 0 !important;\n\tmargin-bottom: 5px !important;\n\tborder-top-color: rgba(255, 0, 0, 0) !important;\n\tborder-bottom-color: #fff !important;\n}\n.prism-previewer.active {\n\topacity: 1 !important;\n}\n', - '' - ]), - (module.exports = exports); - }, - './node_modules/@storybook/builder-webpack4/node_modules/css-loader/dist/cjs.js?!./node_modules/postcss-loader/dist/cjs.js?!./.storybook/assets/styles.css': function( - module, - exports, - __webpack_require__ - ) { - (exports = __webpack_require__( - './node_modules/@storybook/builder-webpack4/node_modules/css-loader/dist/runtime/api.js' - )(!1)).push([ - module.i, - ":root {\n --informed-font-size--10: 10px;\n --informed-font-size--20: 12px;\n --informed-font-size--30: 14px;\n --informed-font-size--40: 17px;\n --informed-font-size--50: 20px;\n --informed-font-size--55: 23px;\n --informed-font-size--60: 24px;\n --informed-font-size--70: 28px;\n --informed-font-size--75: 34px;\n --informed-font-size--80: 40px;\n --informed-height--pill: 40px;\n --informed-line-height--10: 18px;\n --informed-line-height--20: 20px;\n --informed-line-height--30: 21px;\n --informed-line-height--40: 23px;\n --informed-line-height--50: 24px;\n --informed-line-height--60: 28px;\n --informed-line-height--70: 36px;\n --informed-line-height--75: 45px;\n --informed-line-height--80: 48px;\n}\n\n.body {\n font-family: Helvetica, sans-serif;\n}\n\na > img {\n border-radius: 10px;\n}\n\nh1 {\n letter-spacing: -0.6px;\n font-size: var(--informed-font-size--80, 40px);\n line-height: var(--informed-line-height--80, 48px);\n}\n\nh2 {\n letter-spacing: -0.5px;\n font-size: var(--informed-font-size--70, 28px);\n line-height: var(--informed-line-height--70, 36px);\n}\n\nh3 {\n letter-spacing: -0.6px;\n font-size: var(--informed-font-size--60, 24px);\n line-height: var(--informed-line-height--60, 28px);\n}\n\nh4 {\n letter-spacing: -0.4px;\n font-size: var(--informed-font-size--50, 20px);\n line-height: var(--informed-line-height--60, 28px);\n}\n\nh5 {\n font-size: var(--informed-font-size--40, 17px);\n line-height: var(--informed-line-height--20, 20px);\n}\n\nh6 {\n font-size: var(--informed-font-size--30, 14px);\n line-height: var(--informed-line-height--30, 21px);\n}\n\ninput {\n margin-bottom: 1rem;\n}\n\ninput:not([type='checkbox']):not([type='radio']),\ntextarea,\nselect {\n margin-bottom: 1rem;\n margin-top: 1rem;\n display: block;\n border-radius: 20px;\n width: 85%;\n padding: 10px 20px;\n font-weight: 500;\n border: 1px solid transparent;\n margin-right: 2rem;\n /* max-width: 400px; */\n background-color: #f4f4f4;\n}\n\ninput + small,\ntextarea + small,\nselect + small {\n color: rgb(237, 78, 59);\n padding-bottom: 1rem;\n display: block;\n font-weight: bold;\n}\n\nfieldset small[role='alert'] {\n color: rgb(237, 78, 59);\n padding-bottom: 1rem;\n display: block;\n font-weight: bold;\n}\n\ninput[aria-invalid='true']:not([type='checkbox']):not([type='radio']),\ntextarea[aria-invalid='true'],\nselect[aria-invalid='true'] {\n border: 1px solid rgb(237, 78, 59) !important;\n}\n\ninput[aria-invalid='true'][type='radio'],\ninput[aria-invalid='true'][type='checkbox'] {\n outline: 1px solid rgb(237, 78, 59) !important;\n}\n\n.radio-label {\n display: block;\n}\n\ntextarea {\n max-width: 100%;\n}\n\nfieldset {\n border: none;\n}\n\nselect {\n /* needed */\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n /* SVG background image */\n background-image: url('data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2212%22%20height%3D%2212%22%20viewBox%3D%220%200%2012%2012%22%3E%3Ctitle%3Edown-arrow%3C%2Ftitle%3E%3Cg%20fill%3D%22%23000000%22%3E%3Cpath%20d%3D%22M10.293%2C3.293%2C6%2C7.586%2C1.707%2C3.293A1%2C1%2C0%2C0%2C0%2C.293%2C4.707l5%2C5a1%2C1%2C0%2C0%2C0%2C1.414%2C0l5-5a1%2C1%2C0%2C1%2C0-1.414-1.414Z%22%20fill%3D%22%23000000%22%3E%3C%2Fpath%3E%3C%2Fg%3E%3C%2Fsvg%3E');\n background-size: 0.6em;\n background-position: calc(100% - 1.3em) center;\n background-repeat: no-repeat;\n}\n\n.select:before {\n content: '';\n position: absolute;\n right: 10px;\n top: 8px;\n width: 0;\n height: 0;\n border-left: 10px solid transparent;\n border-right: 10px solid transparent;\n border-top: 10px solid #f00;\n}\n\n.select:after {\n content: '';\n position: absolute;\n right: 10px;\n top: 3px;\n width: 0;\n height: 0;\n border-left: 10px solid transparent;\n border-right: 10px solid transparent;\n border-top: 10px solid #333;\n}\n\nlabel {\n margin-bottom: 1rem;\n display: block;\n}\n\nlegend {\n margin-bottom: 1rem;\n display: block;\n}\n\nbutton {\n text-align: left;\n display: inline-block;\n height: var(--informed-height--pill);\n border: 1px solid transparent;\n border-radius: 20px;\n padding: 5px 40px;\n color: white;\n background-color: #3e6ae1;\n margin-bottom: 1rem;\n margin-top: 1rem;\n margin-right: 1rem;\n}\n\nbutton[type='submit'] {\n display: block;\n}\n\n.button-group {\n display: flex;\n}\n\nhr {\n border: none !important;\n height: 2px !important;\n /* Set the hr color */\n color: #333; /* old IE */\n background-color: #333; /* Modern Browsers */\n margin-top: 2rem;\n margin-bottom: 2rem;\n}\n\npre {\n font-size: 1em !important;\n}\n\n.markdown-body[class] {\n font-size: inherit;\n color: inherit;\n border: inherit;\n}\n\n.markdown-body pre {\n font-size: inherit;\n color: inherit;\n border: inherit;\n border-radius: 10px;\n margin-bottom: 1rem;\n margin-top: 1rem;\n}\n\n.markdown-body[class] h1,\n.markdown-body[class] h2,\n.markdown-body[class] h3,\n.markdown-body[class] h4,\n.markdown-body[class] h5,\n.markdown-body[class] h6 {\n border: inherit;\n margin: inherit;\n padding: inherit;\n margin-top: 2rem !important;\n margin-bottom: 2rem !important;\n}\n\n.markdown-body[class] h1[id] {\n letter-spacing: -0.6px;\n font-size: var(--informed-font-size--80, 40px);\n line-height: var(--informed-line-height--80, 48px);\n margin-top: 2rem;\n margin-bottom: 2rem;\n}\n\n.markdown-body[class] h2[id] {\n letter-spacing: -0.5px;\n font-size: var(--informed-font-size--70, 28px);\n line-height: var(--informed-line-height--70, 36px);\n margin-top: 2rem;\n margin-bottom: 2rem;\n}\n\n.markdown-body[class] h3[id] {\n letter-spacing: -0.6px;\n font-size: var(--informed-font-size--60, 24px);\n line-height: var(--informed-line-height--60, 28px);\n margin-top: 2rem;\n margin-bottom: 2rem;\n}\n\n.markdown-body[class] h4[id] {\n letter-spacing: -0.4px;\n font-size: var(--informed-font-size--50, 20px);\n line-height: var(--informed-line-height--60, 28px);\n margin-top: 2rem;\n margin-bottom: 2rem;\n}\n\n.markdown-body[class] h5[id] {\n font-size: var(--informed-font-size--40, 17px);\n line-height: var(--informed-line-height--20, 20px);\n margin-top: 1rem;\n margin-bottom: 1rem;\n}\n\n.markdown-body[class] h6[id] {\n font-size: var(--informed-font-size--30, 14px);\n line-height: var(--informed-line-height--30, 21px);\n margin-top: 1rem;\n margin-bottom: 1rem;\n}\n\n.markdown-body p {\n margin: inherit;\n}\n\n.markdown-body[class] p {\n}\n\n.markdown-body[class] ul {\n}\n\n.markdown-body[class] ol {\n}\n\n.markdown-body a:active,\n.markdown-body a:hover {\n text-decoration: none !important;\n}\n\n.markdown-body[class] table {\n display: table;\n}\n\n.markdown-body[class] table strong {\n color: rgb(237, 78, 59);\n}\n\nstrong {\n color: rgb(237, 78, 59);\n}\n\n/* .markdown-body[class] table {\n display: table;\n}\n\n.markdown-body thead {\n}\n\n.markdown-body tbody {\n}\n\n.markdown-body table thead tr:nth-child(1n),\n.markdown-body table tbody tr:nth-child(1n) {\n background: inherit;\n border: inherit;\n}\n\n.markdown-body table thead tr:nth-child(1n):first-child th {\n}\n\n.markdown-body thead tr th:nth-child(1n),\n.markdown-body tbody tr th:nth-child(1n) {\n padding: inherit;\n border: inherit;\n}\n\n.markdown-body[class] thead tr th:nth-child(1n),\n.markdown-body[class] tbody tr th:nth-child(1n) {\n}\n\n.markdown-body thead tr td:nth-child(1n),\n.markdown-body tbody tr td:nth-child(1n) {\n padding: inherit;\n border: inherit;\n}\n\n.markdown-body[class] thead tr td:nth-child(1n),\n.markdown-body[class] tbody tr td:nth-child(1n) {\n}\n\n.markdown-body[class] thead tr th:nth-child(1n):first-child,\n.markdown-body[class] tbody tr th:nth-child(1n):first-child,\n.markdown-body[class] thead tr td:nth-child(1n):first-child,\n.markdown-body[class] tbody tr td:nth-child(1n):first-child {\n padding-left: 0;\n}\n\n.markdown-body[class] thead tr th:nth-child(1n):last-child,\n.markdown-body[class] tbody tr th:nth-child(1n):last-child,\n.markdown-body[class] thead tr td:nth-child(1n):last-child,\n.markdown-body[class] tbody tr td:nth-child(1n):last-child {\n padding-right: 0;\n} */\n\n.informed-container {\n padding-left: 4rem;\n padding-right: 4rem;\n margin-top: 2rem;\n margin-bottom: 2rem;\n max-width: 1060px;\n}\n\n.informed-black {\n background-color: black;\n color: white !important;\n}\n\n.informed-black input:not([type='checkbox']):not([type='radio']),\n.informed-black select,\n.informed-black textarea {\n background-color: rgb(58, 60, 65);\n color: white;\n}\n\n.informed-black select {\n background-image: url(\"data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Ctitle%3Edown-arrow%3C/title%3E%3Cg fill='%23000000'%3E%3Cpath d='M10.293,3.293,6,7.586,1.707,3.293A1,1,0,0,0,.293,4.707l5,5a1,1,0,0,0,1.414,0l5-5a1,1,0,1,0-1.414-1.414Z' fill='%23FFFFFF'%3E%3C/path%3E%3C/g%3E%3C/svg%3E\");\n /* filter: invert(1); */\n}\n\n.informed-black .markdown-body[class] table {\n background-color: #000;\n}\n\n.informed-black td {\n background-color: #000;\n}\n\n.informed-black th {\n background-color: #000;\n}\n\n.markdown-body > :first-child {\n margin-top: 2rem !important;\n}\n\n.loader,\n.loader:after {\n border-radius: 50%;\n width: 10em;\n height: 10em;\n}\n\n.loader {\n top: 0px;\n margin: 60px auto;\n font-size: 10px;\n position: fixed;\n top: 50%;\n right: 50%;\n text-indent: -9999em;\n border-top: 1.1em solid rgba(67, 64, 64, 0.2);\n border-right: 1.1em solid rgba(67, 64, 64, 0.2);\n border-bottom: 1.1em solid rgba(67, 64, 64, 0.2);\n border-left: 1.1em solid red;\n transform: translateZ(0);\n -webkit-animation: load8 1.1s infinite linear;\n animation: load8 1.1s infinite linear;\n}\n\n.informed-black .loader {\n border-top: 1.1em solid rgba(255, 255, 255, 0.2);\n border-right: 1.1em solid rgba(255, 255, 255, 0.2);\n border-bottom: 1.1em solid rgba(255, 255, 255, 0.2);\n border-left: 1.1em solid red;\n}\n\n@-webkit-keyframes load8 {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n@keyframes load8 {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n\n/* This is for Car!!! */\n\n.cls-1 {\n fill: #fefefe;\n}\n\n.cls-1,\n.cls-10,\n.cls-11,\n.cls-12,\n.cls-13,\n.cls-14,\n.cls-15,\n.cls-2,\n.cls-3,\n.cls-4,\n.cls-5,\n.cls-6,\n.cls-7,\n.cls-8,\n.cls-9 {\n fill-rule: evenodd;\n}\n\n.cls-2 {\n fill: #cfd5cf;\n}\n\n.cls-11,\n.cls-12,\n.cls-3,\n.cls-5 {\n fill: none;\n stroke-linecap: round;\n stroke-linejoin: round;\n}\n\n.cls-3,\n.cls-5 {\n stroke: #212121;\n}\n\n.cls-11,\n.cls-3 {\n stroke-width: 3px;\n}\n\n.cls-4 {\n fill: #212121;\n}\n\n.cls-12,\n.cls-5 {\n stroke-width: 2px;\n}\n\n.cls-6 {\n fill: #194767;\n}\n\n.cls-7 {\n fill: #1a3850;\n}\n\n.cls-8 {\n fill: #e53046;\n}\n\n.cls-9 {\n fill: #ae3b46;\n}\n\n.cls-10 {\n fill: #e96650;\n}\n\n.car-color-red .cls-8 {\n fill: #e53046;\n}\n\n.car-color-red .cls-9 {\n fill: #ae3b46;\n}\n\n.car-color-red .cls-10 {\n fill: #e96650;\n}\n\n.car-color-blue .cls-8 {\n fill: #4a2eee;\n}\n\n.car-color-blue .cls-9 {\n fill: #2540af;\n}\n\n.car-color-blue .cls-10 {\n fill: #6a72d5;\n}\n\n.car-color-green .cls-8 {\n fill: #0f4d1d;\n}\n\n.car-color-green .cls-9 {\n fill: #126014;\n}\n\n.car-color-green .cls-10 {\n fill: #0d5c18;\n}\n\n.car-color-pink .cls-8 {\n fill: rgb(233, 36, 111);\n}\n\n.car-color-pink .cls-9 {\n fill: rgb(145, 39, 80);\n}\n\n.car-color-pink .cls-10 {\n fill: rgb(155, 18, 70);\n}\n\n.cls-11,\n.cls-12 {\n stroke: #231f20;\n}\n\n.cls-13,\n.cls-16 {\n fill: #848c93;\n}\n\n.cls-14 {\n fill: #020303;\n}\n\n.cls-15 {\n fill: #74848c;\n}\n\n.cls-16 {\n font-size: 40px;\n font-family: HelveticaNeue-Bold, Helvetica Neue;\n font-weight: 700;\n}\n\n#Circleelement {\n -webkit-animation-name: rotate;\n -webkit-animation-duration: 2s;\n -webkit-animation-iteration-count: infinite;\n -webkit-animation-timing-function: linear;\n -moz-animation-name: rotate;\n -moz-animation-duration: 2s;\n -moz-animation-iteration-count: infinite;\n -moz-animation-timing-function: linear;\n animation-name: rotate;\n animation-duration: 2s;\n animation-iteration-count: infinite;\n animation-timing-function: linear;\n}\n@-webkit-keyframes rotate {\n from {\n -webkit-transform: rotate(0deg);\n }\n to {\n -webkit-transform: rotate(360deg);\n }\n}\n\n@keyframes rotate {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n}\n", - '' - ]), - (module.exports = exports); - }, - './package.json': function(module) { - module.exports = JSON.parse('{"a":"4.5.2"}'); - }, - './src/Context.js': function( - module, - __webpack_exports__, - __webpack_require__ - ) { - 'use strict'; - __webpack_require__.d(__webpack_exports__, 'f', function() { - return FormControllerContext; - }), - __webpack_require__.d(__webpack_exports__, 'e', function() { - return FormApiContext; - }), - __webpack_require__.d(__webpack_exports__, 'g', function() { - return FormStateContext; - }), - __webpack_require__.d(__webpack_exports__, 'k', function() { - return MultistepStepContext; - }), - __webpack_require__.d(__webpack_exports__, 'i', function() { - return MultistepApiContext; - }), - __webpack_require__.d(__webpack_exports__, 'j', function() { - return MultistepStateContext; - }), - __webpack_require__.d(__webpack_exports__, 'd', function() { - return ArrayFieldStateContext; - }), - __webpack_require__.d(__webpack_exports__, 'a', function() { - return ArrayFieldApiContext; - }), - __webpack_require__.d(__webpack_exports__, 'b', function() { - return ArrayFieldItemApiContext; - }), - __webpack_require__.d(__webpack_exports__, 'c', function() { - return ArrayFieldItemStateContext; - }), - __webpack_require__.d(__webpack_exports__, 'm', function() { - return RelevanceContext; - }), - __webpack_require__.d(__webpack_exports__, 'l', function() { - return RadioGroupContext; - }), - __webpack_require__.d(__webpack_exports__, 'n', function() { - return ScopeContext; - }), - __webpack_require__.d(__webpack_exports__, 'h', function() { - return InformedContext; - }); - var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( - './node_modules/react/index.js' - ), - react__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n( - react__WEBPACK_IMPORTED_MODULE_0__ - ), - FormControllerContext = react__WEBPACK_IMPORTED_MODULE_0___default.a.createContext( - {} - ), - FormApiContext = react__WEBPACK_IMPORTED_MODULE_0___default.a.createContext( - {} - ), - FormStateContext = react__WEBPACK_IMPORTED_MODULE_0___default.a.createContext( - {} - ), - MultistepStepContext = react__WEBPACK_IMPORTED_MODULE_0___default.a.createContext(), - MultistepApiContext = react__WEBPACK_IMPORTED_MODULE_0___default.a.createContext(), - MultistepStateContext = react__WEBPACK_IMPORTED_MODULE_0___default.a.createContext(), - ArrayFieldStateContext = react__WEBPACK_IMPORTED_MODULE_0___default.a.createContext(), - ArrayFieldApiContext = react__WEBPACK_IMPORTED_MODULE_0___default.a.createContext(), - ArrayFieldItemApiContext = react__WEBPACK_IMPORTED_MODULE_0___default.a.createContext(), - ArrayFieldItemStateContext = react__WEBPACK_IMPORTED_MODULE_0___default.a.createContext(), - RelevanceContext = react__WEBPACK_IMPORTED_MODULE_0___default.a.createContext(), - RadioGroupContext = react__WEBPACK_IMPORTED_MODULE_0___default.a.createContext(), - ScopeContext = react__WEBPACK_IMPORTED_MODULE_0___default.a.createContext(), - InformedContext = react__WEBPACK_IMPORTED_MODULE_0___default.a.createContext(); - }, - './src/debug.js': function( - module, - __webpack_exports__, - __webpack_require__ - ) { - 'use strict'; - (function(process, global) { - function selectColor(namespace, colors) { - for (var hash = 0, i = 0; i < namespace.length; i++) - (hash = (hash << 5) - hash + namespace.charCodeAt(i)), (hash |= 0); - return colors[Math.abs(hash) % colors.length]; - } - function formatNodeArgs(args, config) { - var name = config.namespace; - if (config.useColors) { - var c = config.color, - prefix = ' ' - .concat('[3' + (c < 8 ? c : '8;5;' + c), ';1m') - .concat(name, ' '); - args[0] = prefix + args[0].split('\n').join('\n' + prefix); - } else args[0] = name + ' ' + args[0]; - } - function formatBrowserArgs(args, config) { - if ( - ((args[0] = (config.useColors ? '%c' : '') + config.namespace), - config.useColors) - ) { - var c = 'color: ' + config.color, - index = 0, - lastC = 0; - args[0].replace(/%[a-zA-Z%]/g, function(match) { - '%%' !== match && (index++, '%c' === match && (lastC = index)); - }), - args.splice(lastC, 0, c); - } - } - __webpack_require__.d(__webpack_exports__, 'a', function() { - return Debug; - }); - var browserColors = [ - '#0000CC', - '#0000FF', - '#0033CC', - '#0033FF', - '#0066CC', - '#0066FF', - '#0099CC', - '#0099FF', - '#00CC00', - '#00CC33', - '#00CC66', - '#00CC99', - '#00CCCC', - '#00CCFF', - '#3300CC', - '#3300FF', - '#3333CC', - '#3333FF', - '#3366CC', - '#3366FF', - '#3399CC', - '#3399FF', - '#33CC00', - '#33CC33', - '#33CC66', - '#33CC99', - '#33CCCC', - '#33CCFF', - '#6600CC', - '#6600FF', - '#6633CC', - '#6633FF', - '#66CC00', - '#66CC33', - '#9900CC', - '#9900FF', - '#9933CC', - '#9933FF', - '#99CC00', - '#99CC33', - '#CC0000', - '#CC0033', - '#CC0066', - '#CC0099', - '#CC00CC', - '#CC00FF', - '#CC3300', - '#CC3333', - '#CC3366', - '#CC3399', - '#CC33CC', - '#CC33FF', - '#CC6600', - '#CC6633', - '#CC9900', - '#CC9933', - '#CCCC00', - '#CCCC33', - '#FF0000', - '#FF0033', - '#FF0066', - '#FF0099', - '#FF00CC', - '#FF00FF', - '#FF3300', - '#FF3333', - '#FF3366', - '#FF3399', - '#FF33CC', - '#FF33FF', - '#FF6600', - '#FF6633', - '#FF9900', - '#FF9933', - '#FFCC00', - '#FFCC33' - ]; - function createLogger() { - var prefix = - arguments.length > 0 && void 0 !== arguments[0] - ? arguments[0] - : null, - config = arguments.length > 1 ? arguments[1] : void 0; - return function() { - for ( - var _len = arguments.length, args = new Array(_len), _key = 0; - _key < _len; - _key++ - ) - args[_key] = arguments[_key]; - prefix && args.unshift(prefix); - var matches = config.namespaces.split(',').map(function(namespace) { - return '*' === namespace[namespace.length - 1] - ? new RegExp( - '^' + namespace.slice(0, namespace.length - 1) + '.*$' - ) - : new RegExp('^' + namespace + '$'); - }); - matches.some(function(regex) { - return regex.test(prefix); - }), - selectColor(prefix, config.colors), - config.useColors; - }; - } - function nodeLogger(prefix) { - return createLogger( - prefix, - (function loadNode() { - return { - namespaces: - { - NODE_ENV: 'production', - NODE_PATH: [], - STORYBOOK: 'true', - PUBLIC_URL: '.' - }.DEBUG || '', - colors: [6, 2, 3, 4, 5, 1], - useColors: !0, - formatArgs: formatNodeArgs - }; - })() - ); - } - function browserLogger(prefix) { - return createLogger( - prefix, - (function loadBrowser() { - var namespaces; - try { - namespaces = localStorage.getItem('debug'); - } catch (error) {} - return ( - !namespaces && - void 0 !== process && - 'env' in process && - (namespaces = { - NODE_ENV: 'production', - NODE_PATH: [], - STORYBOOK: 'true', - PUBLIC_URL: '.' - }.DEBUG), - { - namespaces: namespaces || '', - colors: browserColors, - useColors: !0, - formatArgs: formatBrowserArgs - } - ); - })() - ); - } - var Debug = function Debug(prefix) { - return void 0 === process || - 'renderer' === process.type || - !0 === process.browser || - process.__nwjs - ? browserLogger(prefix) - : 'undefined' != typeof window && - void 0 !== window.navigator && - 'ReactNative' === window.navigator.product && - void 0 !== global && - !0 === __DEV__ - ? (console.log( - 'informed:debug: Detected React Native Environment' - ), - (process.type = 'renderer'), - (window.localStorage && window.localStorage.getItem) || - (window.localStorage = { - debug: global.DEBUG_INFORMED || '', - getItem: function getItem() { - return global.DEBUG_INFORMED || ''; - } - }), - browserLogger(prefix)) - : nodeLogger(prefix); - }; - }.call( - this, - __webpack_require__('./node_modules/process/browser.js'), - __webpack_require__('./node_modules/webpack/buildin/global.js') - )); - }, - './src/index.js': function( - module, - __webpack_exports__, - __webpack_require__ - ) { - 'use strict'; - __webpack_require__.d(__webpack_exports__, 'B', function() { - return useForm_useForm; - }), - __webpack_require__.d(__webpack_exports__, 'y', function() { - return useField_useField; - }), - __webpack_require__.d(__webpack_exports__, 'z', function() { - return useFieldApi; - }), - __webpack_require__.d(__webpack_exports__, 'A', function() { - return useFieldState_useFieldState; - }), - __webpack_require__.d(__webpack_exports__, 'C', function() { - return useFormApi; - }), - __webpack_require__.d(__webpack_exports__, 'D', function() { - return useFormState; - }), - __webpack_require__.d(__webpack_exports__, 'v', function() { - return useArrayFieldApi; - }), - __webpack_require__.d(__webpack_exports__, 'w', function() { - return useArrayFieldItemApi; - }), - __webpack_require__.d(__webpack_exports__, 'x', function() { - return useArrayFieldItemState; - }), - __webpack_require__.d(__webpack_exports__, 'G', function() { - return useMultistepApi; - }), - __webpack_require__.d(__webpack_exports__, 'H', function() { - return useMultistepState; - }), - __webpack_require__.d(__webpack_exports__, 'F', function() { - return useInformedState_useInformedState; - }), - __webpack_require__.d(__webpack_exports__, 'E', function() { - return useInformedField_useInformedField; - }), - __webpack_require__.d(__webpack_exports__, 'a', function() { - return ArrayField_ArrayField; - }), - __webpack_require__.d(__webpack_exports__, 'c', function() { - return Debug_Debug; - }), - __webpack_require__.d(__webpack_exports__, 'd', function() { - return DebugField_DebugField; - }), - __webpack_require__.d(__webpack_exports__, 'q', function() { - return Relevant_Relevant; - }), - __webpack_require__.d(__webpack_exports__, 'f', function() { - return Form_Form; - }), - __webpack_require__.d(__webpack_exports__, 'i', function() { - return FormProvider_FormProvider; - }), - __webpack_require__.d(__webpack_exports__, 'l', function() { - return Input; - }), - __webpack_require__.d(__webpack_exports__, 't', function() { - return Select_Select; - }), - __webpack_require__.d(__webpack_exports__, 'n', function() { - return Option_Option; - }), - __webpack_require__.d(__webpack_exports__, 'b', function() { - return Checkbox_Checkbox; - }), - __webpack_require__.d(__webpack_exports__, 'p', function() { - return RadioGroup_RadioGroup; - }), - __webpack_require__.d(__webpack_exports__, 'o', function() { - return Radio_Radio; - }), - __webpack_require__.d(__webpack_exports__, 'u', function() { - return TextArea; - }), - __webpack_require__.d(__webpack_exports__, 'I', function() { - return utils_namespaceObject; - }), - __webpack_require__.d(__webpack_exports__, 'j', function() { - return FormStateAccessor_FormStateAccessor; - }), - __webpack_require__.d(__webpack_exports__, 's', function() { - return Scope_Scope; - }), - __webpack_require__.d(__webpack_exports__, 'r', function() { - return SchemaFields_SchemaFields; - }), - __webpack_require__.d(__webpack_exports__, 'g', function() { - return FormField_FormField; - }), - __webpack_require__.d(__webpack_exports__, 'h', function() { - return FormFields_FormFields; - }), - __webpack_require__.d(__webpack_exports__, 'm', function() { - return Multistep; - }), - __webpack_require__.d(__webpack_exports__, 'e', function() { - return Elon; - }), - __webpack_require__.d(__webpack_exports__, 'k', function() { - return Informed_Informed; - }); - var utils_namespaceObject = {}; - __webpack_require__.r(utils_namespaceObject), - __webpack_require__.d(utils_namespaceObject, 'uuidv4', function() { - return uuidv4; - }), - __webpack_require__.d( - utils_namespaceObject, - 'getParentPath', - function() { - return getParentPath; - } - ), - __webpack_require__.d( - utils_namespaceObject, - 'debounceByName', - function() { - return debounceByName; - } - ), - __webpack_require__.d(utils_namespaceObject, 'debounce', function() { - return debounce; - }), - __webpack_require__.d(utils_namespaceObject, 'Elon', function() { - return Elon; - }), - __webpack_require__.d(utils_namespaceObject, 'isChild', function() { - return isChild; - }), - __webpack_require__.d( - utils_namespaceObject, - 'generateOnChange', - function() { - return generateOnChange; - } - ), - __webpack_require__.d( - utils_namespaceObject, - 'generateOnBlur', - function() { - return generateOnBlur; - } - ), - __webpack_require__.d( - utils_namespaceObject, - 'generateOnFocus', - function() { - return generateOnFocus; - } - ), - __webpack_require__.d( - utils_namespaceObject, - 'generateValue', - function() { - return generateValue; - } - ), - __webpack_require__.d( - utils_namespaceObject, - 'yupToFormErrors', - function() { - return utils_yupToFormErrors; - } - ), - __webpack_require__.d( - utils_namespaceObject, - 'validateYupSchema', - function() { - return validateYupSchema; - } - ), - __webpack_require__.d( - utils_namespaceObject, - 'yupToFormError', - function() { - return yupToFormError; - } - ), - __webpack_require__.d( - utils_namespaceObject, - 'validateYupField', - function() { - return validateYupField; - } - ), - __webpack_require__.d( - utils_namespaceObject, - 'validateAjvSchema', - function() { - return utils_validateAjvSchema; - } - ), - __webpack_require__.d( - utils_namespaceObject, - 'validateRequired', - function() { - return validateRequired; - } - ), - __webpack_require__.d(utils_namespaceObject, 'validateMax', function() { - return validateMax; - }), - __webpack_require__.d(utils_namespaceObject, 'validateMin', function() { - return validateMin; - }), - __webpack_require__.d( - utils_namespaceObject, - 'validateMaxLength', - function() { - return validateMaxLength; - } - ), - __webpack_require__.d( - utils_namespaceObject, - 'validateMinLength', - function() { - return validateMinLength; - } - ), - __webpack_require__.d( - utils_namespaceObject, - 'generateValidationFunction', - function() { - return generateValidationFunction; - } - ), - __webpack_require__.d( - utils_namespaceObject, - 'informedParse', - function() { - return informedParse; - } - ), - __webpack_require__.d( - utils_namespaceObject, - 'informedFormat', - function() { - return informedFormat; - } - ), - __webpack_require__.d( - utils_namespaceObject, - 'informedFormatter', - function() { - return informedFormatter; - } - ), - __webpack_require__.d( - utils_namespaceObject, - 'createIntlNumberFormatter', - function() { - return createIntlNumberFormatter; - } - ), - __webpack_require__.d( - utils_namespaceObject, - 'getSchemaPathFromJsonPath', - function() { - return getSchemaPathFromJsonPath; - } - ), - __webpack_require__.d( - utils_namespaceObject, - 'computeFieldFromProperty', - function() { - return computeFieldFromProperty; - } - ), - __webpack_require__.d( - utils_namespaceObject, - 'computeFieldsFromSchema', - function() { - return computeFieldsFromSchema; - } - ), - __webpack_require__.d( - utils_namespaceObject, - 'checkCondition', - function() { - return checkCondition; - } - ); - var react = __webpack_require__('./node_modules/react/index.js'), - react_default = __webpack_require__.n(react), - Context = __webpack_require__('./src/Context.js'); - function useFormController() { - return Object(react.useContext)(Context.f); - } - function _slicedToArray(arr, i) { - return ( - (function _arrayWithHoles(arr) { - if (Array.isArray(arr)) return arr; - })(arr) || - (function _iterableToArrayLimit(arr, i) { - var _i = - null == arr - ? null - : ('undefined' != typeof Symbol && arr[Symbol.iterator]) || - arr['@@iterator']; - if (null == _i) return; - var _s, - _e, - _arr = [], - _n = !0, - _d = !1; - try { - for ( - _i = _i.call(arr); - !(_n = (_s = _i.next()).done) && - (_arr.push(_s.value), !i || _arr.length !== i); - _n = !0 - ); - } catch (err) { - (_d = !0), (_e = err); - } finally { - try { - _n || null == _i.return || _i.return(); - } finally { - if (_d) throw _e; - } - } - return _arr; - })(arr, i) || - (function _unsupportedIterableToArray(o, minLen) { - if (!o) return; - if ('string' == typeof o) return _arrayLikeToArray(o, minLen); - var n = Object.prototype.toString.call(o).slice(8, -1); - 'Object' === n && o.constructor && (n = o.constructor.name); - if ('Map' === n || 'Set' === n) return Array.from(o); - if ( - 'Arguments' === n || - /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) - ) - return _arrayLikeToArray(o, minLen); - })(arr, i) || - (function _nonIterableRest() { - throw new TypeError( - 'Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.' - ); - })() - ); - } - function _arrayLikeToArray(arr, len) { - (null == len || len > arr.length) && (len = arr.length); - for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; - return arr2; - } - function useStateWithGetter(initial) { - var ref = Object(react.useRef)(), - mounted = Object(react.useRef)(!0), - _useState2 = _slicedToArray(Object(react.useState)(initial), 2), - state = _useState2[0], - setState = _useState2[1]; - ref.current = state; - return ( - Object(react.useEffect)(function() { - return function() { - mounted.current = !1; - }; - }, []), - [ - state, - function set(value) { - (ref.current = value), mounted.current && setState(value); - }, - function get() { - return ref.current; - } - ] - ); - } - var src_debug = __webpack_require__('./src/debug.js'); - function _defineProperties(target, props) { - for (var i = 0; i < props.length; i++) { - var descriptor = props[i]; - (descriptor.enumerable = descriptor.enumerable || !1), - (descriptor.configurable = !0), - 'value' in descriptor && (descriptor.writable = !0), - Object.defineProperty(target, descriptor.key, descriptor); - } - } - function _typeof(obj) { - return ( - (_typeof = - 'function' == typeof Symbol && 'symbol' == typeof Symbol.iterator - ? function _typeof(obj) { - return typeof obj; - } - : function _typeof(obj) { - return obj && - 'function' == typeof Symbol && - obj.constructor === Symbol && - obj !== Symbol.prototype - ? 'symbol' - : typeof obj; - }), - _typeof(obj) - ); - } - var ObjectMap_debug = Object(src_debug.a)('informed:ObjMap\t'), - ldtoPath = function ldtoPath() { - var path = - arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : ''; - return String.prototype.replace - .call(path, /\['(.+?)'\]/g, '.$1') - .split(/[,[\].]+?/) - .filter(Boolean); - }, - ldget = function ldget(obj) { - var path = - arguments.length > 1 && void 0 !== arguments[1] - ? arguments[1] - : '', - defaultValue = arguments.length > 2 ? arguments[2] : void 0, - result = String.prototype.replace - .call(path, /\['(.+?)'\]/g, '.$1') - .split(/[,[\].]+?/) - .filter(Boolean) - .reduce(function(res, key) { - return null != res ? res[key] : res; - }, obj); - return void 0 === result || result === obj ? defaultValue : result; - }, - parentPath = function parentPath(path) { - return '.' - .concat(path) - .replace(/(.*)[.[].*/, '$1') - .replace(/\./, ''); - }, - ldhas = function ldhas(obj, path) { - var pPath = parentPath(path), - key = (function pathKey(path) { - return path.replace(parentPath(path), '').replace(/\./, ''); - })(path), - parentObj = pPath ? ldget(obj, pPath) : obj; - return !( - !parentObj || - !Object.hasOwnProperty.call( - parentObj, - key.replace(/\[(.*)\]/, '$1') - ) - ); - }, - ldset = function ldset(obj) { - var path = - arguments.length > 1 && void 0 !== arguments[1] - ? arguments[1] - : '', - val = arguments.length > 2 ? arguments[2] : void 0; - String.prototype.replace - .call(path, /\['(.+?)'\]/g, '.$1') - .split(/[,[\].]+?/) - .filter(Boolean) - .reduce(function(res, key, i, arr) { - return i === arr.length - 1 - ? ((res[key] = val), res[key]) - : 'object' !== _typeof(res[key]) - ? (Number.isInteger(+arr[i + 1]) - ? (res[key] = []) - : (res[key] = {}), - res[key]) - : (Number.isInteger(+arr[i + 1]) && - !Array.isArray(res[key]) && - (res[key] = []), - res[key]); - }, obj); - }, - ldunset = function ldunset(obj) { - var path = - arguments.length > 1 && void 0 !== arguments[1] - ? arguments[1] - : '', - found = !1; - return ( - String.prototype.replace - .call(path, /\['(.+?)'\]/g, '.$1') - .split(/[,[\].]+?/) - .filter(Boolean) - .reduce(function(res, key, i, arr) { - return void 0 === res - ? res - : i === arr.length - 1 - ? (delete res[key], (found = !0), res[key]) - : res[key]; - }, obj), - found - ); - }, - pathToArrayElem = function pathToArrayElem(path) { - var pathArray = ldtoPath(path); - return Number.isInteger(+pathArray[pathArray.length - 1]); - }, - ObjectMap = (function() { - function ObjectMap() { - !(function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) - throw new TypeError('Cannot call a class as a function'); - })(this, ObjectMap); - } - return ( - (function _createClass(Constructor, protoProps, staticProps) { - return ( - protoProps && - _defineProperties(Constructor.prototype, protoProps), - staticProps && _defineProperties(Constructor, staticProps), - Constructor - ); - })(ObjectMap, null, [ - { - key: 'empty', - value: function empty(object) { - for (var i in object) return !1; - return !0; - } - }, - { - key: 'get', - value: function get(object, path) { - return ldget(object, path); - } - }, - { - key: 'has', - value: function has(object, path) { - return ldhas(object, path); - } - }, - { - key: 'set', - value: function set(object, path, value) { - if (void 0 !== value) - ObjectMap_debug('Setting', path, value), - ldset(object, path, value); - else if ( - pathToArrayElem(path) && - void 0 !== ObjectMap.get(object, path) - ) { - ObjectMap_debug( - 'Special case SETTING', - path, - 'to undefined' - ), - ldset(object, path, void 0); - var pathArray = ldtoPath(path); - cleanup( - object, - (pathArray = pathArray.slice(0, pathArray.length - 1)) - ); - } else - pathToArrayElem(path) || - void 0 === ObjectMap.get(object, path) || - (ObjectMap_debug( - 'Special case REMOVING', - path, - 'from object completley' - ), - ObjectMap.delete(object, path)); - } - }, - { - key: 'delete', - value: function _delete(object, path) { - ObjectMap_debug('DELETE', path), - pathToArrayElem(path) - ? (ObjectMap_debug('ARRAY PATH', path), - this.pullOut(object, path)) - : ldunset(object, path); - var pathArray = ldtoPath(path); - cleanup( - object, - (pathArray = pathArray.slice(0, pathArray.length - 1)) - ), - ObjectMap_debug('DELETED', path); - } - }, - { - key: 'pullOut', - value: function pullOut(object, path) { - var pathArray = ldtoPath(path), - index = pathArray[pathArray.length - 1]; - (pathArray = pathArray.slice(0, pathArray.length - 1)), - ObjectMap_debug('Pulling out:', pathArray, 'index', index); - var arr = ldget(object, pathArray); - ObjectMap_debug('Array Before', arr), - Array.isArray(arr) && - (function ldpullAt(obj) { - var pulled, - path = - arguments.length > 1 && void 0 !== arguments[1] - ? arguments[1] - : ''; - String.prototype.replace - .call(path, /\['(.+?)'\]/g, '.$1') - .split(/[,[\].]+?/) - .filter(Boolean) - .reduce(function(res, key, i, arr) { - return void 0 === res - ? res - : i === arr.length - 1 && Array.isArray(res) - ? ((pulled = res.splice(key, 1)), res[key]) - : res[key]; - }, obj); - })(arr, index), - ObjectMap_debug('Array After', arr), - cleanup(object, pathArray); - } - }, - { - key: 'purge', - value: function purge(obj) { - var newObj = Array.isArray(obj) ? [] : {}; - return ( - Object.keys(obj).forEach(function(key) { - 'object' === _typeof(obj[key]) - ? ((newObj[key] = ObjectMap.purge(obj[key])), - 0 === Object.keys(newObj[key]).length && - delete newObj[key]) - : void 0 !== obj[key] && (newObj[key] = obj[key]); - }), - newObj - ); - } - }, - { - key: 'swap', - value: function swap(object, path, i, j) { - console.log('Swaping out out:', path, i, j); - var arr = ldget(object, path); - console.log('Array', arr), - Array.isArray(arr) && - (function ldSwap(arr, a, b) { - if (arr[a] && arr[b]) { - var oldA = arr[a], - oldB = arr[b]; - (arr[a] = oldB), (arr[b] = oldA); - } else - console.warn( - 'Attempted to swap ' - .concat(a, ' with ') - .concat(b, ' but one of them does not exist :(') - ); - })(arr, i, j); - } - } - ]), - ObjectMap - ); - })(); - function cleanup(obj, path) { - if (0 !== path.length) { - var object = ldget(obj, path); - (Array.isArray(object) - ? object.every(function(e) { - return null == e; - }) - : '{}' === JSON.stringify(object)) && ldunset(obj, path), - cleanup(obj, path.slice(0, path.length - 1)); - } - } - function utils_slicedToArray(arr, i) { - return ( - (function utils_arrayWithHoles(arr) { - if (Array.isArray(arr)) return arr; - })(arr) || - (function utils_iterableToArrayLimit(arr, i) { - var _i = - null == arr - ? null - : ('undefined' != typeof Symbol && arr[Symbol.iterator]) || - arr['@@iterator']; - if (null == _i) return; - var _s, - _e, - _arr = [], - _n = !0, - _d = !1; - try { - for ( - _i = _i.call(arr); - !(_n = (_s = _i.next()).done) && - (_arr.push(_s.value), !i || _arr.length !== i); - _n = !0 - ); - } catch (err) { - (_d = !0), (_e = err); - } finally { - try { - _n || null == _i.return || _i.return(); - } finally { - if (_d) throw _e; - } - } - return _arr; - })(arr, i) || - utils_unsupportedIterableToArray(arr, i) || - (function utils_nonIterableRest() { - throw new TypeError( - 'Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.' - ); - })() - ); - } - function ownKeys(object, enumerableOnly) { - var keys = Object.keys(object); - if (Object.getOwnPropertySymbols) { - var symbols = Object.getOwnPropertySymbols(object); - enumerableOnly && - (symbols = symbols.filter(function(sym) { - return Object.getOwnPropertyDescriptor(object, sym).enumerable; - })), - keys.push.apply(keys, symbols); - } - return keys; - } - function _objectSpread(target) { - for (var i = 1; i < arguments.length; i++) { - var source = null != arguments[i] ? arguments[i] : {}; - i % 2 - ? ownKeys(Object(source), !0).forEach(function(key) { - _defineProperty(target, key, source[key]); - }) - : Object.getOwnPropertyDescriptors - ? Object.defineProperties( - target, - Object.getOwnPropertyDescriptors(source) - ) - : ownKeys(Object(source)).forEach(function(key) { - Object.defineProperty( - target, - key, - Object.getOwnPropertyDescriptor(source, key) - ); - }); - } - return target; - } - function _defineProperty(obj, key, value) { - return ( - key in obj - ? Object.defineProperty(obj, key, { - value: value, - enumerable: !0, - configurable: !0, - writable: !0 - }) - : (obj[key] = value), - obj - ); - } - function _toConsumableArray(arr) { - return ( - (function _arrayWithoutHoles(arr) { - if (Array.isArray(arr)) return utils_arrayLikeToArray(arr); - })(arr) || - (function _iterableToArray(iter) { - if ( - ('undefined' != typeof Symbol && null != iter[Symbol.iterator]) || - null != iter['@@iterator'] - ) - return Array.from(iter); - })(arr) || - utils_unsupportedIterableToArray(arr) || - (function _nonIterableSpread() { - throw new TypeError( - 'Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.' - ); - })() - ); - } - function utils_typeof(obj) { - return ( - (utils_typeof = - 'function' == typeof Symbol && 'symbol' == typeof Symbol.iterator - ? function _typeof(obj) { - return typeof obj; - } - : function _typeof(obj) { - return obj && - 'function' == typeof Symbol && - obj.constructor === Symbol && - obj !== Symbol.prototype - ? 'symbol' - : typeof obj; - }), - utils_typeof(obj) - ); - } - function utils_unsupportedIterableToArray(o, minLen) { - if (o) { - if ('string' == typeof o) return utils_arrayLikeToArray(o, minLen); - var n = Object.prototype.toString.call(o).slice(8, -1); - return ( - 'Object' === n && o.constructor && (n = o.constructor.name), - 'Map' === n || 'Set' === n - ? Array.from(o) - : 'Arguments' === n || - /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) - ? utils_arrayLikeToArray(o, minLen) - : void 0 - ); - } - } - function utils_arrayLikeToArray(arr, len) { - (null == len || len > arr.length) && (len = arr.length); - for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; - return arr2; - } - function utils_defineProperties(target, props) { - for (var i = 0; i < props.length; i++) { - var descriptor = props[i]; - (descriptor.enumerable = descriptor.enumerable || !1), - (descriptor.configurable = !0), - 'value' in descriptor && (descriptor.writable = !0), - Object.defineProperty(target, descriptor.key, descriptor); - } - } - var utils_debug = Object(src_debug.a)('informed:utils\t'), - uuidv4 = function uuidv4() { - return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace( - /[xy]/g, - function(c) { - var r = (16 * Math.random()) | 0; - return ('x' == c ? r : (3 & r) | 8).toString(16); - } - ); - }, - getParentPath = function getParentPath(name) { - return name.replace(/(.*)[.[].*/, '$1'); - }; - function debounceByName(func) { - var _this = this, - timeout = - arguments.length > 1 && void 0 !== arguments[1] - ? arguments[1] - : 300, - timers = {}; - return function() { - for ( - var _len = arguments.length, args = new Array(_len), _key = 0; - _key < _len; - _key++ - ) - args[_key] = arguments[_key]; - var name = args[0]; - clearTimeout(timers[name]), - (timers[name] = setTimeout(function() { - func.apply(_this, args); - }, timeout)); - }; - } - function debounce(func) { - var timer, - _this2 = this, - timeout = - arguments.length > 1 && void 0 !== arguments[1] - ? arguments[1] - : 300; - return function() { - for ( - var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; - _key2 < _len2; - _key2++ - ) - args[_key2] = arguments[_key2]; - clearTimeout(timer), - (timer = setTimeout(function() { - func.apply(_this2, args); - }, timeout)); - }; - } - var Elon = (function() { - function Elon() { - !(function utils_classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) - throw new TypeError('Cannot call a class as a function'); - })(this, Elon); - } - return ( - (function utils_createClass(Constructor, protoProps, staticProps) { - return ( - protoProps && - utils_defineProperties(Constructor.prototype, protoProps), - staticProps && utils_defineProperties(Constructor, staticProps), - Constructor - ); - })(Elon, null, [ - { - key: 'inspect', - value: function inspect(validators) { - return function(value, values) { - for (var i = 0; i < validators.length; i++) { - var res = (0, validators[i])(value, values); - if (res) return res; - } - }; - } - } - ]), - Elon - ); - })(), - isChild = function isChild(parent, child) { - return ( - !(parent.length < child.length) && - child.slice(0, parent.length) === parent - ); - }, - generateOnChange = function generateOnChange(_ref) { - var fieldType = _ref.fieldType, - setValue = _ref.setValue, - multiple = _ref.multiple, - ref = _ref.ref, - setter = function setter(e) { - return setValue(e); - }; - return ( - ('text' !== fieldType && - 'textArea' !== fieldType && - 'number' !== fieldType) || - (setter = function setter(e) { - setValue(e.target.value, e); - }), - 'select' === fieldType && - (setter = function setter(e) { - var selected = Array.from(ref.current) - .filter(function(option) { - return option.selected; - }) - .map(function(option) { - return option.value; - }); - setValue(multiple ? selected : selected[0] || '', e); - }), - 'checkbox' === fieldType && - (setter = function setter(e) { - setValue(e.target.checked, e); - }), - function(e) { - setter(e); - } - ); - }, - generateOnBlur = function generateOnBlur(_ref2) { - var setTouched = _ref2.setTouched; - return function(e) { - setTouched(!0, e); - }; - }, - generateOnFocus = function generateOnFocus(_ref3) { - var setFocused = _ref3.setFocused; - return function(e) { - setFocused(!0, e); - }; - }, - generateValue = function generateValue(_ref4) { - var fieldType = _ref4.fieldType, - maskedValue = _ref4.maskedValue, - multiple = _ref4.multiple, - value = _ref4.value; - switch (fieldType) { - case 'text': - case 'number': - return maskedValue || 0 === maskedValue ? maskedValue : ''; - case 'textArea': - return maskedValue || ''; - case 'select': - return value || (multiple ? [] : ''); - case 'checkbox': - return !!value; - default: - return value; - } - }, - utils_yupToFormErrors = function yupToFormErrors(yupError) { - var errors = {}; - if (yupError.inner) { - if (0 === yupError.inner.length) - return void ObjectMap.set( - errors, - yupError.path, - yupError.message - ); - var _step, - _iterator = (function _createForOfIteratorHelper( - o, - allowArrayLike - ) { - var it = - ('undefined' != typeof Symbol && o[Symbol.iterator]) || - o['@@iterator']; - if (!it) { - if ( - Array.isArray(o) || - (it = utils_unsupportedIterableToArray(o)) || - (allowArrayLike && o && 'number' == typeof o.length) - ) { - it && (o = it); - var i = 0, - F = function F() {}; - return { - s: F, - n: function n() { - return i >= o.length - ? { done: !0 } - : { done: !1, value: o[i++] }; - }, - e: function e(_e2) { - throw _e2; - }, - f: F - }; - } - throw new TypeError( - 'Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.' - ); - } - var err, - normalCompletion = !0, - didErr = !1; - return { - s: function s() { - it = it.call(o); - }, - n: function n() { - var step = it.next(); - return (normalCompletion = step.done), step; - }, - e: function e(_e3) { - (didErr = !0), (err = _e3); - }, - f: function f() { - try { - normalCompletion || null == it.return || it.return(); - } finally { - if (didErr) throw err; - } - } - }; - })(yupError.inner); - try { - for (_iterator.s(); !(_step = _iterator.n()).done; ) { - var err = _step.value; - ObjectMap.get(errors, err.path) || - ObjectMap.set(errors, err.path, err.message); - } - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - } - return errors; - }, - validateYupSchema = function validateYupSchema(schema, values) { - try { - schema.validateSync(values, { abortEarly: !1 }); - } catch (e) { - return utils_yupToFormErrors(e); - } - }, - yupToFormError = function yupToFormError(yupError) { - if (yupError.inner) { - if (0 === yupError.inner.length) return; - return yupError.inner[0].message; - } - }, - validateYupField = function validateYupField(schema, value) { - try { - schema.validateSync(value, { abortEarly: !1 }); - } catch (e) { - return yupToFormError(e); - } - }, - utils_validateAjvSchema = function validateAjvSchema(validate, data) { - validate(data); - var errors = {}; - return ( - validate.errors && - validate.errors.forEach(function(_ref5) { - var message = _ref5.message, - dataPath = _ref5.dataPath, - keyword = _ref5.keyword, - params = _ref5.params, - path = dataPath; - 'required' === keyword && - (path = ''.concat(path, '.').concat(params.missingProperty)), - (path = path.replace('.', '')), - ObjectMap.set(errors, path, message); - }), - errors - ); - }, - validateRequired = function validateRequired( - value, - required, - getErrorMessage - ) { - if (required && (null == value || '' === value)) - return 'string' == typeof required - ? required - : getErrorMessage('required') || 'This field is required'; - }, - validateMax = function validateMax(value, max, getErrorMessage) { - if (null != max && value > max) - return ( - getErrorMessage('maximum') || - 'This field should NOT be more than '.concat(max) - ); - }, - validateMin = function validateMin(value, min, getErrorMessage) { - if (null != min && value < min) - return ( - getErrorMessage('minimum') || - 'This field should NOT be less than '.concat(min) - ); - }, - validateMaxLength = function validateMaxLength( - value, - maxLength, - getErrorMessage - ) { - if ( - null != maxLength && - (null == value ? void 0 : value.length) > maxLength - ) - return ( - getErrorMessage('maxLength') || - 'This field should NOT be more than '.concat( - maxLength, - ' characters' - ) - ); - }, - validateMinLength = function validateMinLength( - value, - minLength, - getErrorMessage - ) { - if ( - null != minLength && - (null == value ? void 0 : value.length) < minLength - ) - return ( - getErrorMessage('minLength') || - 'This field should NOT be shorter than '.concat( - minLength, - ' characters' - ) - ); - }, - generateValidationFunction = function generateValidationFunction( - validationFunc, - yupSchema, - _ref6 - ) { - var required = _ref6.required, - minimum = _ref6.minimum, - maximum = _ref6.maximum, - minLength = _ref6.minLength, - maxLength = _ref6.maxLength, - pattern = _ref6.pattern, - getErrorMessage = _ref6.getErrorMessage; - return function(val, values) { - var error; - return ( - (required && - void 0 !== - (error = validateRequired(val, required, getErrorMessage))) || - (minimum && - void 0 !== - (error = validateMin(val, minimum, getErrorMessage))) || - (maximum && - void 0 !== - (error = validateMax(val, maximum, getErrorMessage))) || - (minLength && - void 0 !== - (error = validateMinLength( - val, - minLength, - getErrorMessage - ))) || - (maxLength && - void 0 !== - (error = validateMaxLength( - val, - maxLength, - getErrorMessage - ))) || - (pattern && - ((error = (function validatePattern( - value, - pattern, - getErrorMessage - ) { - if ( - null != pattern && - !new RegExp(pattern).test(value) && - value - ) - return ( - getErrorMessage('pattern') || - 'This field should match pattern "'.concat( - pattern, - '";' - ) - ); - })(val, pattern, getErrorMessage)), - void 0 !== error)) || - (yupSchema && - void 0 !== (error = validateYupField(yupSchema, val))) || - (validationFunc && (error = validationFunc(val, values))), - error - ); - }; - }, - formatterFromString = function formatterFromString(formatter) { - return formatter.split('').map(function(_char) { - return '#' === _char ? /\d/ : '*' === _char ? /[\w]/ : _char; - }); - }, - informedParse = function informedParse(val, parser) { - if ('object' === utils_typeof(parser) && !Array.isArray(parser)) { - var parsedVal = {}; - return ( - Object.keys(val).forEach(function(key) { - if (parser[key]) { - var value = parser[key](val[key]); - parsedVal[key] = value; - } else parsedVal[key] = val[key]; - }), - parsedVal - ); - } - return parser(val); - }, - informedFormat = function informedFormat(val, frmtr, old) { - if ('object' === utils_typeof(frmtr) && !Array.isArray(frmtr)) { - var formattedVal = {}, - formattedOffset = {}; - return ( - Object.keys(val).forEach(function(key) { - if (frmtr[key]) { - var _informedFormatter = informedFormatter( - val[key], - frmtr[key], - old ? old[val] : void 0, - val - ), - value = _informedFormatter.value, - offset = _informedFormatter.offset; - (formattedVal[key] = value), (formattedOffset[key] = offset); - } else (formattedVal[key] = val[key]), (formattedOffset[key] = 0); - }), - { value: formattedVal, offset: formattedOffset } - ); - } - return informedFormatter(val, frmtr, old, val); - }, - informedFormatter = function informedFormatter(val, frmtr, old, full) { - if ( - (utils_debug('Formatting', val), - utils_debug('Full Value', full), - !val) - ) - return { value: val, offset: 0 }; - var value = ''.concat(val), - formatter = (function getFormatter(formatter, value, full) { - if ('string' == typeof formatter) - return formatterFromString(formatter); - if ('function' == typeof formatter) { - var frmtr = formatter(value, full); - return 'string' == typeof frmtr - ? formatterFromString(frmtr) - : frmtr; - } - if (Array.isArray(formatter)) return formatter; - throw new Error('Formatter must be string, array, or function'); - })(frmtr, value, full), - prefixLength = formatter.findIndex(function(v) { - return 'string' != typeof v; - }), - suffixStart = - formatter.length - - _toConsumableArray(formatter) - .reverse() - .findIndex(function(v) { - return 'string' != typeof v; - }), - formatted = [], - chars = value.split(''), - vIndex = 0, - start = 0, - matchIndex = (function matchingIndex(a, b) { - for ( - var i = 0, mi = -1, matching = !0; - matching && i < a.length; - - ) - a[i] == b[i] ? (mi = i) : (matching = !1), (i += 1); - return mi; - })(formatter.slice(0, prefixLength), chars.slice(0, prefixLength)); - matchIndex > -1 && - ((vIndex = matchIndex + 1), - (formatted = formatted.concat(formatter.slice(0, matchIndex + 1))), - (start = matchIndex + 1)), - matchIndex < 0 && - ((formatted = formatted.concat(formatter.slice(0, prefixLength))), - (start = prefixLength)); - for (var pastPrefix = !1, i = start; i < formatter.length; i++) { - var matcher = formatter[i]; - if ( - (pastPrefix || 'string' == typeof matcher || (pastPrefix = !0), - vIndex != chars.length) - ) { - var curChar = chars[vIndex]; - if ('function' == typeof matcher) - formatted.push(matcher(curChar)), (vIndex += 1); - else { - var match = - 'string' == typeof matcher - ? matcher === curChar - : matcher.test(curChar); - match && 'string' == typeof matcher - ? (formatted.push(matcher), (vIndex += 1)) - : match || 'string' != typeof matcher - ? match && 'string' != typeof matcher - ? (formatted.push(curChar), (vIndex += 1)) - : match || - 'string' == typeof matcher || - ((vIndex += 1), (i -= 1)) - : vIndex != chars.length && formatted.push(matcher); - } - } else { - if (!('string' == typeof matcher && i >= suffixStart)) break; - formatted.push(matcher); - } - } - var formattedString = formatted.join(''), - offset = value ? formattedString.length - value.length : 0; - return ( - value && - old && - value.length < old.length && - value.length >= suffixStart && - (offset = 0), - { value: formattedString, offset: offset } - ); - }, - createIntlNumberFormatter = function createIntlNumberFormatter( - locale, - opts - ) { - var _numberFormatterWitho, - _numberFormatterWitho2, - _numberFormatter$form, - _numberFormatter$form2, - numberFormatter = new Intl.NumberFormat(locale, opts), - decimalChar = - null !== - (_numberFormatterWitho = - null === - (_numberFormatterWitho2 = new Intl.NumberFormat(locale, { - style: null == opts ? void 0 : opts.style, - currency: null == opts ? void 0 : opts.currency - }) - .formatToParts(0.1) - .find(function(_ref7) { - return 'decimal' === _ref7.type; - })) || void 0 === _numberFormatterWitho2 - ? void 0 - : _numberFormatterWitho2.value) && - void 0 !== _numberFormatterWitho - ? _numberFormatterWitho - : '.', - minusChar = - null !== - (_numberFormatter$form = - null === - (_numberFormatter$form2 = numberFormatter - .formatToParts(-1) - .find(function(_ref8) { - return 'minusSign' === _ref8.type; - })) || void 0 === _numberFormatter$form2 - ? void 0 - : _numberFormatter$form2.value) && - void 0 !== _numberFormatter$form - ? _numberFormatter$form - : '-'; - function toNumberString(str) { - return '' - .concat(str) - .split(decimalChar) - .map(function(splitStr) { - return (function stripNonNumeric(str) { - return ''.concat(str).replace(/\D/g, ''); - })(splitStr); - }) - .join('.'); - } - function toFloat(str) { - if ('number' == typeof str) return str; - var _float = parseFloat(toNumberString(str)); - return Number.isNaN(_float) ? void 0 : _float; - } - return { - formatter: function mask(value) { - var isNegative = value.includes(minusChar), - _float2 = toNumberString(value), - fraction = ''.concat(_float2).split('.')[1], - number = isNegative ? -Number(_float2) : Number(_float2), - numberParts = numberFormatter.formatToParts(number); - '0' === fraction && - numberParts.push( - { type: 'decimal', value: decimalChar }, - { type: 'fraction', value: fraction } - ); - var maskArray = numberParts.reduce(function(pv, _ref9) { - var type = _ref9.type, - partValue = _ref9.value; - return ['decimal', 'fraction'].includes(type) && - null == fraction - ? pv - : ['integer', 'fraction'].includes(type) - ? [].concat( - _toConsumableArray(pv), - _toConsumableArray( - partValue - .split('') - .filter(function(_, index) { - return ( - 'fraction' !== type || index < fraction.length - ); - }) - .map(function() { - return /\d/; - }) - ) - ) - : [].concat( - _toConsumableArray(pv), - 'currency' === type || 'minusSign' === type - ? _toConsumableArray(partValue.split('')) - : [partValue] - ); - }, []), - lastDigitIndex = (function findLastIndex(arr, predicate) { - for (var l = arr.length; l--; ) - if (predicate(arr[l])) return l; - return -1; - })(maskArray, function(maskChar) { - return (function isRegexEqual(x, y) { - return ( - x instanceof RegExp && - y instanceof RegExp && - x.source === y.source && - x.global === y.global && - x.ignoreCase === y.ignoreCase && - x.multiline === y.multiline - ); - })(maskChar, /\d/); - }); - -1 === maskArray.indexOf(decimalChar) && - -1 !== ''.concat(value).indexOf(decimalChar) && - ((maskArray = (function insert(arr, index, value) { - var nextArr = _toConsumableArray(arr); - return ( - Array.isArray(value) - ? nextArr.splice.apply( - nextArr, - [index, 0].concat(_toConsumableArray(value)) - ) - : nextArr.splice(index, 0, value), - nextArr - ); - })(maskArray, lastDigitIndex + 1, [decimalChar])), - (lastDigitIndex += 2)); - var endOfMask = maskArray.slice(lastDigitIndex + 1).join(''); - return (maskArray = [].concat( - _toConsumableArray(maskArray.slice(0, lastDigitIndex + 1)), - [endOfMask] - )); - }, - parser: function parser(value) { - if (null != value) - return value.includes(minusChar) - ? -toFloat(value) - : toFloat(value); - } - }; - }, - getSchemaPathFromJsonPath = function getSchemaPathFromJsonPath( - jsonPath - ) { - var schemaPath = jsonPath - .replace(/\./g, '.properties.') - .replace(/\[\d+\]/g, '.items'); - return (schemaPath = 'properties.'.concat(schemaPath)); - }, - computeFieldFromProperty = function computeFieldFromProperty( - propertyName, - property, - prefix - ) { - var uiControl = property['ui:control'], - inputProps = property['ui:props'], - uiBefore = property['ui:before'], - uiAfter = property['ui:after'], - oneOf = property.oneOf, - items = property.items, - schemaEnum = property.enum, - label = property.title, - minimum = property.minimum, - maximum = property.maximum, - minLength = property.minLength, - maxLength = property.maxLength, - pattern = property.pattern, - required = property.required, - type = property.type, - subProperties = property.properties, - allOf = property.allOf, - id = uuidv4(); - inputProps && inputProps.id && (id = inputProps.id); - var field = { - componentType: null != uiControl ? uiControl : type, - name: prefix - ? ''.concat(prefix, '.').concat(propertyName) - : propertyName, - type: type, - uiBefore: uiBefore, - uiAfter: uiAfter, - properties: 'object' === type ? subProperties : void 0, - allOf: 'object' === type ? allOf : void 0, - items: 'array' === type ? items : void 0, - propertyName: propertyName, - required: required, - props: _objectSpread( - { - label: label, - id: id, - minimum: minimum, - maximum: maximum, - minLength: minLength, - maxLength: maxLength, - pattern: pattern - }, - inputProps - ) - }; - if (oneOf) { - var options = property.oneOf.map(function(option) { - var _option$uiProps = option['ui:props'], - inputProps = void 0 === _option$uiProps ? {} : _option$uiProps; - return _objectSpread( - { value: option.const, label: option.title }, - inputProps - ); - }); - field.props.options = options; - } - if (schemaEnum) { - var _options = property.enum.map(function(val) { - return { value: val, label: val }; - }); - field.props.options = _options; - } - if (items && items.oneOf) { - var _options2 = items.oneOf.map(function(option) { - var _option$uiProps2 = option['ui:props'], - inputProps = - void 0 === _option$uiProps2 ? {} : _option$uiProps2; - return _objectSpread( - { value: option.const, label: option.title }, - inputProps - ); - }); - field.props.options = _options2; - } - return field; - }, - computeFieldsFromSchema = function computeFieldsFromSchema( - schema, - onlyValidateSchema - ) { - if (!schema || onlyValidateSchema) - return { properties: [], conditions: [], components: [] }; - var _schema$properties = schema.properties, - properties = - void 0 === _schema$properties ? {} : _schema$properties, - allOf = schema.allOf, - _schema$propertyOrder = schema.propertyOrder, - propertyOrder = - void 0 === _schema$propertyOrder ? [] : _schema$propertyOrder; - if (Object.keys(properties).length > 0) { - var fields = Object.keys(properties) - .sort(function(a, b) { - var aIndex = propertyOrder.indexOf(a), - bIndex = propertyOrder.indexOf(b); - return ( - (aIndex > -1 ? aIndex : propertyOrder.length + 1) - - (bIndex > -1 ? bIndex : propertyOrder.length + 1) - ); - }) - .map(function(propertyName) { - return propertyName; - }), - conditions = [], - components = []; - return ( - allOf && - allOf.forEach(function(item) { - if (item.if) { - var newItem = _objectSpread({}, item); - (newItem.then = { properties: {} }), - (newItem.thenProps = {}), - Object.keys(item.then.properties).forEach(function(name) { - fields.includes(name) - ? (newItem.thenProps[name] = - item.then.properties[name]) - : (newItem.then.properties[name] = - item.then.properties[name]); - }), - conditions.push(newItem); - } else components.push(item); - }), - { - properties: fields, - conditions: conditions, - components: components - } - ); - } - return { properties: [], conditions: [], components: [] }; - }; - function checkCondition(condition, propertyValue) { - return Object.entries(condition).every(function(_ref10) { - var _ref11 = utils_slicedToArray(_ref10, 2), - keyword = _ref11[0], - value = _ref11[1]; - switch (keyword) { - case 'const': - return propertyValue === value; - case 'minimum': - return propertyValue >= value; - case 'exclusiveMinimum': - return propertyValue > value; - case 'maximum': - return propertyValue <= value; - case 'exclusiveMaximum': - return propertyValue < value; - case 'enum': - return !!Array.isArray(value) && value.includes(propertyValue); - case 'pattern': - return new RegExp(value).test(propertyValue); - case 'not': - return propertyValue !== value; - default: - return !1; - } - }); - } - function useScoper() { - var scope = Object(react.useContext)(Context.n); - return Object(react.useCallback)( - function(name) { - return scope === name - ? name - : scope && name - ? ''.concat(scope, '.').concat(name) - : name; - }, - [scope] - ); - } - var useFieldSubscription_debug = Object(src_debug.a)( - 'informed:useFieldSubscription\t' - ), - useFieldSubscription_useFieldSubscription = function useFieldSubscription( - event, - fields, - cb - ) { - var scoped = - !(arguments.length > 3 && void 0 !== arguments[3]) || - arguments[3], - scope = useScoper(), - scopedFields = Object(react.useMemo)( - function() { - return scoped - ? fields.map(function(field) { - return scope(field); - }) - : fields; - }, - [fields] - ), - formController = useFormController(); - Object(react.useEffect)( - function() { - var listener = function listener(target) { - ('_ALL_' === target || - scopedFields.includes(target) || - (target && - scopedFields.some(function(field) { - return isChild(field, target); - }))) && - (useFieldSubscription_debug( - 'subscription ' - .concat(event, ' triggered with target ') - .concat(target, ' for'), - scopedFields - ), - cb(target)); - }; - return ( - formController.emitter.on(event, listener), - function() { - formController.emitter.removeListener(event, listener); - } - ); - }, - [fields] - ); - }; - function useRelevance_toConsumableArray(arr) { - return ( - (function useRelevance_arrayWithoutHoles(arr) { - if (Array.isArray(arr)) return useRelevance_arrayLikeToArray(arr); - })(arr) || - (function useRelevance_iterableToArray(iter) { - if ( - ('undefined' != typeof Symbol && null != iter[Symbol.iterator]) || - null != iter['@@iterator'] - ) - return Array.from(iter); - })(arr) || - useRelevance_unsupportedIterableToArray(arr) || - (function useRelevance_nonIterableSpread() { - throw new TypeError( - 'Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.' - ); - })() - ); - } - function useRelevance_slicedToArray(arr, i) { - return ( - (function useRelevance_arrayWithHoles(arr) { - if (Array.isArray(arr)) return arr; - })(arr) || - (function useRelevance_iterableToArrayLimit(arr, i) { - var _i = - null == arr - ? null - : ('undefined' != typeof Symbol && arr[Symbol.iterator]) || - arr['@@iterator']; - if (null == _i) return; - var _s, - _e, - _arr = [], - _n = !0, - _d = !1; - try { - for ( - _i = _i.call(arr); - !(_n = (_s = _i.next()).done) && - (_arr.push(_s.value), !i || _arr.length !== i); - _n = !0 - ); - } catch (err) { - (_d = !0), (_e = err); - } finally { - try { - _n || null == _i.return || _i.return(); - } finally { - if (_d) throw _e; - } - } - return _arr; - })(arr, i) || - useRelevance_unsupportedIterableToArray(arr, i) || - (function useRelevance_nonIterableRest() { - throw new TypeError( - 'Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.' - ); - })() - ); - } - function useRelevance_unsupportedIterableToArray(o, minLen) { - if (o) { - if ('string' == typeof o) - return useRelevance_arrayLikeToArray(o, minLen); - var n = Object.prototype.toString.call(o).slice(8, -1); - return ( - 'Object' === n && o.constructor && (n = o.constructor.name), - 'Map' === n || 'Set' === n - ? Array.from(o) - : 'Arguments' === n || - /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) - ? useRelevance_arrayLikeToArray(o, minLen) - : void 0 - ); - } - } - function useRelevance_arrayLikeToArray(arr, len) { - (null == len || len > arr.length) && (len = arr.length); - for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; - return arr2; - } - var logger = Object(src_debug.a)('informed:useRelevance\t'), - useRelevance_useRelevance = function useRelevance(_ref) { - var name = _ref.name, - relevant = _ref.relevant, - _ref$relevanceWhen = _ref.relevanceWhen, - relevanceWhen = - void 0 === _ref$relevanceWhen ? [] : _ref$relevanceWhen, - _ref$relevanceDeps = _ref.relevanceDeps, - relevanceDeps = - void 0 === _ref$relevanceDeps ? [] : _ref$relevanceDeps, - formController = useFormController(), - scope = Object(react.useContext)(Context.n), - scopeRef = Object(react.useRef)(scope); - scopeRef.current = scope; - var _useStateWithGetter2 = useRelevance_slicedToArray( - useStateWithGetter(function() { - return ( - !relevant || - relevant({ - formState: formController.getFormState(), - formApi: formController.getFormApi(), - scope: scope, - relevanceDeps: relevanceDeps - }) - ); - }), - 3 - ), - isRelevant = _useStateWithGetter2[0], - setIsRelevant = _useStateWithGetter2[1], - getIsRelevant = _useStateWithGetter2[2], - check = 'function' == typeof relevanceWhen ? [] : relevanceWhen, - fields = Object(react.useMemo)(function() { - return 'function' == typeof relevanceWhen - ? relevanceWhen(scope) - : relevanceWhen; - }, [].concat(useRelevance_toConsumableArray(check), [scope])); - return ( - useFieldSubscription_useFieldSubscription( - 'field-value', - fields, - function(target) { - logger( - 're-evaluating relevance for ' - .concat(name, ' because of ') - .concat(target) - ); - var rel = relevant({ - formState: formController.getFormState(), - formApi: formController.getFormApi(), - scope: scopeRef.current, - relevanceDeps: relevanceDeps - }); - getIsRelevant() != rel && setIsRelevant(rel); - }, - !('function' == typeof relevanceWhen) - ), - Object(react.useEffect)(function() { - if ( - relevant && - 'function' != typeof relevanceWhen && - 0 === relevanceWhen.length - ) { - var listener = function listener(target) { - logger( - 're-evaluating relevance for ' - .concat(name, ' because of ') - .concat(target) - ); - var rel = relevant({ - formState: formController.getFormState(), - formApi: formController.getFormApi(), - scope: scopeRef.current, - relevanceDeps: relevanceDeps - }); - getIsRelevant() != rel && setIsRelevant(rel); - }; - return ( - formController.emitter.on('field', listener), - function() { - formController.emitter.removeListener('field', listener); - } - ); - } - }, []), - Object(react.useEffect)(function() { - relevant && - setIsRelevant( - relevant({ - formState: formController.getFormState(), - formApi: formController.getFormApi(), - scope: scope, - relevanceDeps: relevanceDeps - }) - ); - }, [name].concat(useRelevance_toConsumableArray(relevanceDeps))), - isRelevant - ); - }, - Relevant_Relevant = function Relevant(_ref) { - var when = _ref.when, - relevanceWhen = _ref.relevanceWhen, - relevanceDeps = _ref.relevanceDeps, - children = _ref.children, - formController = useFormController(), - scope = Object(react.useContext)(Context.n), - isRelevant = useRelevance_useRelevance({ - relevant: when, - relevanceWhen: relevanceWhen, - relevanceDeps: relevanceDeps - }), - relevantContext = Object(react.useMemo)( - function() { - return { - isRelevant: isRelevant, - relevant: function relevant() { - return when({ - formState: formController.getFormState(), - formApi: formController.getFormApi(), - scope: scope, - relevanceDeps: relevanceDeps - }); - } - }; - }, - [isRelevant, scope, relevanceDeps] - ); - return react_default.a.createElement( - Context.m.Provider, - { value: relevantContext }, - isRelevant ? children : null - ); - }; - function useFormApi() { - return Object(react.useContext)(Context.e); - } - function useScope(name) { - var scope = Object(react.useContext)(Context.n); - return scope === name - ? name - : scope && name - ? ''.concat(scope, '.').concat(name) - : name; - } - (Relevant_Relevant.__docgenInfo = { - description: '', - methods: [], - displayName: 'Relevant' - }), - 'undefined' != typeof STORYBOOK_REACT_CLASSES && - (STORYBOOK_REACT_CLASSES['src/components/Relevant.js'] = { - name: 'Relevant', - docgenInfo: Relevant_Relevant.__docgenInfo, - path: 'src/components/Relevant.js' - }); - var buildFieldApi = function buildFieldApi(formApi, name) { - return { - getValue: function getValue() { - return formApi.getValue(name); - }, - setValue: function setValue(value, e, key) { - return formApi.setValue(name, value, e, key); - }, - getTouched: function getTouched() { - return formApi.getTouched(name); - }, - setTouched: function setTouched(value, e) { - return formApi.setTouched(name, value, e); - }, - getError: function getError() { - return formApi.getError(name); - }, - setError: function setError(value) { - return formApi.setError(name, value); - }, - getFocused: function getFocused() { - return formApi.getFocused(name); - }, - setFocused: function setFocused(value, e) { - return formApi.setFocused(name, value, e); - }, - reset: function reset(options) { - return formApi.resetField(name, options); - }, - validate: function validate() { - return formApi.validateField(name); - }, - getDirty: function getDirty() { - return formApi.getDirty(name); - }, - getPristine: function getPristine() { - return formApi.getPristine(name); - }, - getMaskedValue: function getMaskedValue() { - return formApi.getMaskedValue(name); - }, - clearValue: function clearValue() { - return formApi.clearValue(name); - } - }; - }; - function useFieldApi(n) { - var scoped = - !(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1], - formApi = useFormApi(), - name = scoped ? useScope(n) : n, - fieldApi = Object(react.useMemo)( - function() { - return buildFieldApi(formApi, name); - }, - [name] - ); - return fieldApi; - } - function useArrayField_ownKeys(object, enumerableOnly) { - var keys = Object.keys(object); - if (Object.getOwnPropertySymbols) { - var symbols = Object.getOwnPropertySymbols(object); - enumerableOnly && - (symbols = symbols.filter(function(sym) { - return Object.getOwnPropertyDescriptor(object, sym).enumerable; - })), - keys.push.apply(keys, symbols); - } - return keys; - } - function useArrayField_objectSpread(target) { - for (var i = 1; i < arguments.length; i++) { - var source = null != arguments[i] ? arguments[i] : {}; - i % 2 - ? useArrayField_ownKeys(Object(source), !0).forEach(function(key) { - useArrayField_defineProperty(target, key, source[key]); - }) - : Object.getOwnPropertyDescriptors - ? Object.defineProperties( - target, - Object.getOwnPropertyDescriptors(source) - ) - : useArrayField_ownKeys(Object(source)).forEach(function(key) { - Object.defineProperty( - target, - key, - Object.getOwnPropertyDescriptor(source, key) - ); - }); - } - return target; - } - function useArrayField_defineProperty(obj, key, value) { - return ( - key in obj - ? Object.defineProperty(obj, key, { - value: value, - enumerable: !0, - configurable: !0, - writable: !0 - }) - : (obj[key] = value), - obj - ); - } - function useArrayField_toConsumableArray(arr) { - return ( - (function useArrayField_arrayWithoutHoles(arr) { - if (Array.isArray(arr)) return useArrayField_arrayLikeToArray(arr); - })(arr) || - (function useArrayField_iterableToArray(iter) { - if ( - ('undefined' != typeof Symbol && null != iter[Symbol.iterator]) || - null != iter['@@iterator'] - ) - return Array.from(iter); - })(arr) || - useArrayField_unsupportedIterableToArray(arr) || - (function useArrayField_nonIterableSpread() { - throw new TypeError( - 'Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.' - ); - })() - ); - } - function useArrayField_slicedToArray(arr, i) { - return ( - (function useArrayField_arrayWithHoles(arr) { - if (Array.isArray(arr)) return arr; - })(arr) || - (function useArrayField_iterableToArrayLimit(arr, i) { - var _i = - null == arr - ? null - : ('undefined' != typeof Symbol && arr[Symbol.iterator]) || - arr['@@iterator']; - if (null == _i) return; - var _s, - _e, - _arr = [], - _n = !0, - _d = !1; - try { - for ( - _i = _i.call(arr); - !(_n = (_s = _i.next()).done) && - (_arr.push(_s.value), !i || _arr.length !== i); - _n = !0 - ); - } catch (err) { - (_d = !0), (_e = err); - } finally { - try { - _n || null == _i.return || _i.return(); - } finally { - if (_d) throw _e; - } - } - return _arr; - })(arr, i) || - useArrayField_unsupportedIterableToArray(arr, i) || - (function useArrayField_nonIterableRest() { - throw new TypeError( - 'Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.' - ); - })() - ); - } - function useArrayField_unsupportedIterableToArray(o, minLen) { - if (o) { - if ('string' == typeof o) - return useArrayField_arrayLikeToArray(o, minLen); - var n = Object.prototype.toString.call(o).slice(8, -1); - return ( - 'Object' === n && o.constructor && (n = o.constructor.name), - 'Map' === n || 'Set' === n - ? Array.from(o) - : 'Arguments' === n || - /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) - ? useArrayField_arrayLikeToArray(o, minLen) - : void 0 - ); - } - } - function useArrayField_arrayLikeToArray(arr, len) { - (null == len || len > arr.length) && (len = arr.length); - for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; - return arr2; - } - var useArrayField_logger = Object(src_debug.a)( - 'informed:useArrayField\t' - ), - useArrayField_useArrayField = function useArrayField(_ref) { - var userName = _ref.name, - initialValue = _ref.initialValue, - arrayFieldApiRef = _ref.arrayFieldApiRef, - name = useScope(userName), - formController = Object(react.useContext)(Context.f), - fieldApi = useFieldApi(name), - fieldsMap = useArrayField_slicedToArray( - Object(react.useState)(function() { - return new Map(); - }), - 1 - )[0], - _useStateWithGetter2 = useArrayField_slicedToArray( - useStateWithGetter(function() { - return formController.getValue(name) - ? formController.getValue(name) - : initialValue || formController.getInitialValue(name) || []; - }), - 3 - ), - initialValues = _useStateWithGetter2[0], - setInitialValues = _useStateWithGetter2[1], - getInitialValues = _useStateWithGetter2[2], - _useStateWithGetter4 = useArrayField_slicedToArray( - useStateWithGetter( - initialValues - ? initialValues.map(function() { - return uuidv4(); - }) - : [] - ), - 3 - ), - keys = _useStateWithGetter4[0], - setKeys = _useStateWithGetter4[1], - getKeys = _useStateWithGetter4[2], - swap = function swap(a, b) { - useArrayField_logger( - 'Swapping', - '' - .concat(name, '[') - .concat(a, '] and ') - .concat(name, '[') - .concat(b, ']') - ), - formController.swap(name, a, b); - var ks = getKeys(), - newKeys = useArrayField_toConsumableArray(ks); - ks[a] && ks[b] - ? ((newKeys[a] = ks[b]), (newKeys[b] = ks[a])) - : console.warn( - 'Attempted to swap ' - .concat(a, ' with ') - .concat(b, ' but one of them does not exist :(') - ), - setKeys(newKeys); - }, - add = function add() { - var amount = - arguments.length > 0 && void 0 !== arguments[0] - ? arguments[0] - : 1, - ks = getKeys(); - if ('number' != typeof amount || !Number(amount) || amount <= 0) - ks.push(uuidv4()); - else for (var i = 0; i < amount; i++) ks.push(uuidv4()); - setKeys(useArrayField_toConsumableArray(ks)); - }, - addWithInitialValue = function addWithInitialValue(initialValue) { - var ks = getKeys(); - ks.push(uuidv4()), setKeys(useArrayField_toConsumableArray(ks)); - var newInitialValues = useArrayField_toConsumableArray( - getInitialValues() - ); - (newInitialValues[ks.length - 1] = initialValue), - setInitialValues(newInitialValues); - }, - reset = function reset() { - formController.remove(name); - var initVals = - initialValue || formController.getInitialValue(name) || []; - setInitialValues(initVals); - var resetKeys = initVals - ? initVals.map(function() { - return uuidv4(); - }) - : []; - setKeys(resetKeys); - }, - meta = { - name: name, - initialValue: initialValue, - fieldApi: useArrayField_objectSpread( - useArrayField_objectSpread({}, fieldApi), - {}, - { reset: reset } - ) - }, - metaRef = Object(react.useRef)(meta); - (metaRef.current = meta), - Object(react.useEffect)( - function() { - return ( - formController.register(name, metaRef), - function() { - formController.deregister(name); - } - ); - }, - [name] - ); - var fields = keys.map(function(key, i) { - var arrayFieldItemApi = { - remove: function remove() { - return (function remove(i) { - var ks = getKeys(); - formController.lockRemoval({ - index: ks.length - 1, - name: name - }); - var newKeys = ks - .slice(0, i) - .concat(ks.slice(i + 1, ks.length)); - setKeys(newKeys); - var initVals = getInitialValues(), - newInitialValues = initVals - .slice(0, i) - .concat(initVals.slice(i + 1, initVals.length)); - setInitialValues(newInitialValues), - formController.pullOut( - ''.concat(name, '[').concat(i, ']') - ); - })(i); - } - }; - return { - arrayFieldItemApi: arrayFieldItemApi, - arrayFieldItemState: { - initialValue: initialValues && initialValues[i], - key: key, - name: ''.concat(name, '[').concat(i, ']'), - index: i, - parent: name - } - }; - }), - arrayFieldApi = Object(react.useMemo)(function() { - return { - add: add, - swap: swap, - addWithInitialValue: addWithInitialValue, - reset: reset - }; - }, []); - arrayFieldApiRef && (arrayFieldApiRef.current = arrayFieldApi); - var arrayFieldState = { fields: fields, name: name }, - wrappedController = Object(react.useMemo)( - function() { - return useArrayField_objectSpread( - useArrayField_objectSpread({}, formController), - {}, - { - register: function register(n, m) { - fieldsMap.set(n, m), formController.register(n, m); - }, - deregister: function deregister(n, m) { - fieldsMap.delete(n), formController.deregister(n, m); - }, - getInitialValue: function getInitialValue(fieldName) { - if ( - RegExp(''.concat(name, '\\[[0-9]+\\]')).test(fieldName) - ) { - var path = fieldName.replace(name, ''), - v = ObjectMap.get(getInitialValues(), path); - return ( - useArrayField_logger( - 'Resetting '.concat(path, ' to ').concat(v) - ), - v - ); - } - return formController.getInitialValue(fieldName); - } - } - ); - }, - [name] - ); - return { - render: function render(children) { - return react_default.a.createElement( - Context.f.Provider, - { value: wrappedController }, - react_default.a.createElement( - Context.a.Provider, - { value: arrayFieldApi }, - react_default.a.createElement( - Context.d.Provider, - { value: arrayFieldState }, - children - ) - ) - ); - }, - arrayFieldState: arrayFieldState, - arrayFieldApi: arrayFieldApi - }; - }; - function useForceUpdate_slicedToArray(arr, i) { - return ( - (function useForceUpdate_arrayWithHoles(arr) { - if (Array.isArray(arr)) return arr; - })(arr) || - (function useForceUpdate_iterableToArrayLimit(arr, i) { - var _i = - null == arr - ? null - : ('undefined' != typeof Symbol && arr[Symbol.iterator]) || - arr['@@iterator']; - if (null == _i) return; - var _s, - _e, - _arr = [], - _n = !0, - _d = !1; - try { - for ( - _i = _i.call(arr); - !(_n = (_s = _i.next()).done) && - (_arr.push(_s.value), !i || _arr.length !== i); - _n = !0 - ); - } catch (err) { - (_d = !0), (_e = err); - } finally { - try { - _n || null == _i.return || _i.return(); - } finally { - if (_d) throw _e; - } - } - return _arr; - })(arr, i) || - (function useForceUpdate_unsupportedIterableToArray(o, minLen) { - if (!o) return; - if ('string' == typeof o) - return useForceUpdate_arrayLikeToArray(o, minLen); - var n = Object.prototype.toString.call(o).slice(8, -1); - 'Object' === n && o.constructor && (n = o.constructor.name); - if ('Map' === n || 'Set' === n) return Array.from(o); - if ( - 'Arguments' === n || - /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) - ) - return useForceUpdate_arrayLikeToArray(o, minLen); - })(arr, i) || - (function useForceUpdate_nonIterableRest() { - throw new TypeError( - 'Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.' - ); - })() - ); - } - function useForceUpdate_arrayLikeToArray(arr, len) { - (null == len || len > arr.length) && (len = arr.length); - for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; - return arr2; - } - var useForceUpdate_useForceUpdate = function useForceUpdate() { - var updateState = useForceUpdate_slicedToArray( - react_default.a.useState(), - 2 - )[1]; - return react_default.a.useCallback(function() { - return updateState({}); - }, []); - }, - useFieldState_debug = Object(src_debug.a)('informed:useFieldState\t'), - useFieldState_useFieldState = function useFieldState(n) { - var scoped = - !(arguments.length > 1 && void 0 !== arguments[1]) || - arguments[1], - name = scoped ? useScope(n) : n, - formController = useFormController(), - forceUpdate = useForceUpdate_useForceUpdate(); - return ( - Object(react.useEffect)( - function() { - var listener = function listener(target) { - ('_ALL_' === target || - target === name || - (target && isChild(name, target))) && - (useFieldState_debug('Updating', name), forceUpdate()); - }; - return ( - formController.emitter.on('field', listener), - forceUpdate(), - function() { - formController.emitter.removeListener('field', listener); - } - ); - }, - [name] - ), - formController.getFieldState(name) - ); - }; - var _excluded = ['relevant', 'relevanceWhen', 'relevanceDeps', 'name'], - _excluded2 = ['children']; - function ArrayField_slicedToArray(arr, i) { - return ( - (function ArrayField_arrayWithHoles(arr) { - if (Array.isArray(arr)) return arr; - })(arr) || - (function ArrayField_iterableToArrayLimit(arr, i) { - var _i = - null == arr - ? null - : ('undefined' != typeof Symbol && arr[Symbol.iterator]) || - arr['@@iterator']; - if (null == _i) return; - var _s, - _e, - _arr = [], - _n = !0, - _d = !1; - try { - for ( - _i = _i.call(arr); - !(_n = (_s = _i.next()).done) && - (_arr.push(_s.value), !i || _arr.length !== i); - _n = !0 - ); - } catch (err) { - (_d = !0), (_e = err); - } finally { - try { - _n || null == _i.return || _i.return(); - } finally { - if (_d) throw _e; - } - } - return _arr; - })(arr, i) || - (function ArrayField_unsupportedIterableToArray(o, minLen) { - if (!o) return; - if ('string' == typeof o) - return ArrayField_arrayLikeToArray(o, minLen); - var n = Object.prototype.toString.call(o).slice(8, -1); - 'Object' === n && o.constructor && (n = o.constructor.name); - if ('Map' === n || 'Set' === n) return Array.from(o); - if ( - 'Arguments' === n || - /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) - ) - return ArrayField_arrayLikeToArray(o, minLen); - })(arr, i) || - (function ArrayField_nonIterableRest() { - throw new TypeError( - 'Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.' - ); - })() - ); - } - function ArrayField_arrayLikeToArray(arr, len) { - (null == len || len > arr.length) && (len = arr.length); - for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; - return arr2; - } - function ArrayField_ownKeys(object, enumerableOnly) { - var keys = Object.keys(object); - if (Object.getOwnPropertySymbols) { - var symbols = Object.getOwnPropertySymbols(object); - enumerableOnly && - (symbols = symbols.filter(function(sym) { - return Object.getOwnPropertyDescriptor(object, sym).enumerable; - })), - keys.push.apply(keys, symbols); - } - return keys; - } - function ArrayField_objectSpread(target) { - for (var i = 1; i < arguments.length; i++) { - var source = null != arguments[i] ? arguments[i] : {}; - i % 2 - ? ArrayField_ownKeys(Object(source), !0).forEach(function(key) { - ArrayField_defineProperty(target, key, source[key]); - }) - : Object.getOwnPropertyDescriptors - ? Object.defineProperties( - target, - Object.getOwnPropertyDescriptors(source) - ) - : ArrayField_ownKeys(Object(source)).forEach(function(key) { - Object.defineProperty( - target, - key, - Object.getOwnPropertyDescriptor(source, key) - ); - }); - } - return target; - } - function ArrayField_defineProperty(obj, key, value) { - return ( - key in obj - ? Object.defineProperty(obj, key, { - value: value, - enumerable: !0, - configurable: !0, - writable: !0 - }) - : (obj[key] = value), - obj - ); - } - function _extends() { - return ( - (_extends = - Object.assign || - function(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i]; - for (var key in source) - Object.prototype.hasOwnProperty.call(source, key) && - (target[key] = source[key]); - } - return target; - }), - _extends.apply(this, arguments) - ); - } - function _objectWithoutProperties(source, excluded) { - if (null == source) return {}; - var key, - i, - target = (function _objectWithoutPropertiesLoose(source, excluded) { - if (null == source) return {}; - var key, - i, - target = {}, - sourceKeys = Object.keys(source); - for (i = 0; i < sourceKeys.length; i++) - (key = sourceKeys[i]), - excluded.indexOf(key) >= 0 || (target[key] = source[key]); - return target; - })(source, excluded); - if (Object.getOwnPropertySymbols) { - var sourceSymbolKeys = Object.getOwnPropertySymbols(source); - for (i = 0; i < sourceSymbolKeys.length; i++) - (key = sourceSymbolKeys[i]), - excluded.indexOf(key) >= 0 || - (Object.prototype.propertyIsEnumerable.call(source, key) && - (target[key] = source[key])); - } - return target; - } - var ArrayField_debug = Object(src_debug.a)('informed:ArrayField\t'), - ArrayField_ArrayField = function ArrayField(_ref) { - var relevant = _ref.relevant, - relevanceWhen = _ref.relevanceWhen, - relevanceDeps = _ref.relevanceDeps, - name = _ref.name, - props = _objectWithoutProperties(_ref, _excluded); - return relevant - ? react_default.a.createElement( - Relevant_Relevant, - { - when: relevant, - relevanceWhen: relevanceWhen, - relevanceDeps: relevanceDeps - }, - react_default.a.createElement( - ArrayField_ArrayFieldWrapper, - _extends({ name: name }, props) - ) - ) - : react_default.a.createElement( - ArrayField_ArrayFieldWrapper, - _extends({ name: name }, props) - ); - }, - ArrayField_ArrayFieldWrapper = function ArrayFieldWrapper(_ref2) { - var children = _ref2.children, - props = _objectWithoutProperties(_ref2, _excluded2), - _useArrayField = useArrayField_useArrayField(props), - render = _useArrayField.render, - arrayFieldState = _useArrayField.arrayFieldState, - arrayFieldApi = _useArrayField.arrayFieldApi; - return render( - 'function' == typeof children - ? children( - ArrayField_objectSpread( - ArrayField_objectSpread( - { - arrayFieldApi: arrayFieldApi, - arrayFieldState: arrayFieldState - }, - arrayFieldApi - ), - arrayFieldState - ) - ) - : children - ); - }, - ArrayField_ArrayFieldItem = function ArrayFieldItem(_ref3) { - var arrayFieldItemState = _ref3.arrayFieldItemState, - arrayFieldItemApi = _ref3.arrayFieldItemApi, - children = _ref3.children, - formController = useFormController(), - fieldsMap = ArrayField_slicedToArray( - Object(react.useState)(function() { - return new Map(); - }), - 1 - )[0], - subState = useFieldState_useFieldState(arrayFieldItemState.name), - itemApi = (function useScopedApi(scope) { - var formApi = useFormApi(), - scopedFormApi = Object(react.useMemo)( - function() { - return (function buildScopedFormApi(scope, formApi) { - return { - getValue: function getValue(field) { - return formApi.getValue( - ''.concat(scope, '.').concat(field) - ); - }, - setValue: function setValue(field, value, e, key) { - return formApi.setValue( - ''.concat(scope, '.').concat(field), - value, - e, - key - ); - }, - getTouched: function getTouched(field) { - return formApi.getTouched( - ''.concat(scope, '.').concat(field) - ); - }, - setTouched: function setTouched(field, value) { - return formApi.setTouched( - ''.concat(scope, '.').concat(field), - value - ); - }, - getFocused: function getFocused(field) { - return formApi.getFocused( - ''.concat(scope, '.').concat(field) - ); - }, - setFocused: function setFocused(field, value) { - return formApi.setFocused( - ''.concat(scope, '.').concat(field), - value - ); - }, - getError: function getError(field) { - return formApi.getError( - ''.concat(scope, '.').concat(field) - ); - }, - setError: function setError(field, value) { - return formApi.setError( - ''.concat(scope, '.').concat(field), - value - ); - }, - resetField: function resetField(field) { - return formApi.resetField( - ''.concat(scope, '.').concat(field) - ); - }, - validate: function validate(field) { - return formApi.validate( - ''.concat(scope, '.').concat(field) - ); - }, - getDirty: function getDirty(field) { - return formApi.getDirty( - ''.concat(scope, '.').concat(field) - ); - }, - getPristine: function getPristine(field) { - return formApi.getPristine( - ''.concat(scope, '.').concat(field) - ); - }, - getMaskedValue: function getMaskedValue(field) { - return formApi.getMaskedValue( - ''.concat(scope, '.').concat(field) - ); - }, - clearValue: function clearValue(field) { - return formApi.clearValue( - ''.concat(scope, '.').concat(field) - ); - } - }; - })(scope, formApi); - }, - [scope] - ); - return scopedFormApi; - })(arrayFieldItemState.name), - wrappedController = Object(react.useMemo)( - function() { - return ArrayField_objectSpread( - ArrayField_objectSpread({}, formController), - {}, - { - register: function register(n, m) { - fieldsMap.set(n, m), formController.register(n, m); - }, - deregister: function deregister(n, m) { - fieldsMap.delete(n), formController.deregister(n, m); - var lockedUntil = formController.getRemovalLocked(); - ArrayField_debug( - 'DEREGISTER', - n, - 'SIZE', - fieldsMap.size, - 'INDEX', - arrayFieldItemState.index, - 'LOCKEDUNTIL', - lockedUntil - ), - null == lockedUntil || - lockedUntil.index !== arrayFieldItemState.index || - lockedUntil.name !== arrayFieldItemState.parent || - Array.from(fieldsMap.keys()).some(function(k) { - return k.includes( - '' - .concat(arrayFieldItemState.parent, '[') - .concat(lockedUntil.index, ']') - ); - }) || - (ArrayField_debug('UNLOCKING'), - formController.unlockRemoval()); - } - } - ); - }, - [arrayFieldItemState.index] - ), - reset = Object(react.useCallback)( - function() { - fieldsMap.forEach(function(fieldMeta) { - fieldMeta.current.fieldApi.reset(); - }); - }, - [arrayFieldItemState.name, arrayFieldItemState.index] - ), - arrayFieldStateValue = ArrayField_objectSpread( - ArrayField_objectSpread({}, arrayFieldItemState), - {}, - { - values: subState.value, - errors: subState.error, - touched: subState.touched - } - ), - arrayFieldItemApiValue = Object(react.useMemo)( - function() { - return ArrayField_objectSpread( - ArrayField_objectSpread( - ArrayField_objectSpread({}, arrayFieldItemApi), - itemApi - ), - {}, - { reset: reset } - ); - }, - [arrayFieldItemState.name, arrayFieldItemState.index] - ); - return 'function' == typeof children - ? react_default.a.createElement( - Context.f.Provider, - { value: wrappedController }, - react_default.a.createElement( - Context.b.Provider, - { value: arrayFieldItemApiValue }, - react_default.a.createElement( - Context.c.Provider, - { value: arrayFieldStateValue }, - react_default.a.createElement( - Context.n.Provider, - { value: arrayFieldItemState.name }, - children( - ArrayField_objectSpread( - ArrayField_objectSpread({}, arrayFieldItemApiValue), - {}, - { - name: arrayFieldItemState.name, - index: arrayFieldItemState.index - } - ) - ) - ) - ) - ) - ) - : react_default.a.createElement( - Context.f.Provider, - { value: wrappedController }, - react_default.a.createElement( - Context.b.Provider, - { value: arrayFieldItemApi }, - react_default.a.createElement( - Context.c.Provider, - { value: arrayFieldItemState }, - react_default.a.createElement( - Context.n.Provider, - { value: arrayFieldItemState.name }, - children - ) - ) - ) - ); - }; - function useFormState() { - return Object(react.useContext)(Context.g); - } - (ArrayField_ArrayField.Items = function(_ref4) { - var children = _ref4.children; - return Object(react.useContext)(Context.d).fields.map(function(_ref5) { - var arrayFieldItemState = _ref5.arrayFieldItemState, - arrayFieldItemApi = _ref5.arrayFieldItemApi, - key = arrayFieldItemState.key; - return react_default.a.createElement( - ArrayField_ArrayFieldItem, - { - key: key, - arrayFieldItemApi: arrayFieldItemApi, - arrayFieldItemState: arrayFieldItemState - }, - children - ); - }); - }), - (ArrayField_ArrayField.__docgenInfo = { - description: '', - methods: [ - { - name: 'Items', - docblock: null, - modifiers: ['static'], - params: [{ name: '{ children }', type: null }], - returns: null - } - ], - displayName: 'ArrayField' - }), - 'undefined' != typeof STORYBOOK_REACT_CLASSES && - (STORYBOOK_REACT_CLASSES['src/components/ArrayField.js'] = { - name: 'ArrayField', - docgenInfo: ArrayField_ArrayField.__docgenInfo, - path: 'src/components/ArrayField.js' - }); - var Debug_Debug = function Debug(props) { - var formState = useFormState(), - displayState = {}; - return ( - Object.keys(props).length > 0 - ? Object.keys(props).forEach(function(key) { - displayState[key] = formState[key]; - }) - : (displayState = formState), - react_default.a.createElement( - 'pre', - null, - react_default.a.createElement( - 'code', - null, - JSON.stringify(displayState, null, 2) - ) - ) - ); - }; - (Debug_Debug.__docgenInfo = { - description: '', - methods: [], - displayName: 'Debug' - }), - 'undefined' != typeof STORYBOOK_REACT_CLASSES && - (STORYBOOK_REACT_CLASSES['src/components/Debug.js'] = { - name: 'Debug', - docgenInfo: Debug_Debug.__docgenInfo, - path: 'src/components/Debug.js' - }); - var DebugField_excluded = ['name']; - function DebugField_objectWithoutProperties(source, excluded) { - if (null == source) return {}; - var key, - i, - target = (function DebugField_objectWithoutPropertiesLoose( - source, - excluded - ) { - if (null == source) return {}; - var key, - i, - target = {}, - sourceKeys = Object.keys(source); - for (i = 0; i < sourceKeys.length; i++) - (key = sourceKeys[i]), - excluded.indexOf(key) >= 0 || (target[key] = source[key]); - return target; - })(source, excluded); - if (Object.getOwnPropertySymbols) { - var sourceSymbolKeys = Object.getOwnPropertySymbols(source); - for (i = 0; i < sourceSymbolKeys.length; i++) - (key = sourceSymbolKeys[i]), - excluded.indexOf(key) >= 0 || - (Object.prototype.propertyIsEnumerable.call(source, key) && - (target[key] = source[key])); - } - return target; - } - var DebugField_DebugField = function DebugField(_ref) { - var name = _ref.name, - props = DebugField_objectWithoutProperties(_ref, DebugField_excluded), - fieldState = useFieldState_useFieldState(name), - displayState = {}; - return ( - Object.keys(props).length > 0 - ? Object.keys(props).forEach(function(key) { - displayState[key] = fieldState[key]; - }) - : (displayState = fieldState), - react_default.a.createElement( - 'pre', - null, - react_default.a.createElement( - 'code', - null, - JSON.stringify(displayState, null, 2) - ) - ) - ); - }; - (DebugField_DebugField.__docgenInfo = { - description: '', - methods: [], - displayName: 'DebugField' - }), - 'undefined' != typeof STORYBOOK_REACT_CLASSES && - (STORYBOOK_REACT_CLASSES['src/components/DebugField.js'] = { - name: 'DebugField', - docgenInfo: DebugField_DebugField.__docgenInfo, - path: 'src/components/DebugField.js' - }); - var Scope_Scope = function Scope(_ref) { - var newScope, - scope = _ref.scope, - children = _ref.children, - parentScope = Object(react.useContext)(Context.n); - return ( - (newScope = parentScope - ? ''.concat(parentScope, '.').concat(scope) - : scope), - react_default.a.createElement( - Context.n.Provider, - { value: newScope }, - children - ) - ); - }; - function useCursorPosition_ownKeys(object, enumerableOnly) { - var keys = Object.keys(object); - if (Object.getOwnPropertySymbols) { - var symbols = Object.getOwnPropertySymbols(object); - enumerableOnly && - (symbols = symbols.filter(function(sym) { - return Object.getOwnPropertyDescriptor(object, sym).enumerable; - })), - keys.push.apply(keys, symbols); - } - return keys; - } - function useCursorPosition_objectSpread(target) { - for (var i = 1; i < arguments.length; i++) { - var source = null != arguments[i] ? arguments[i] : {}; - i % 2 - ? useCursorPosition_ownKeys(Object(source), !0).forEach(function( - key - ) { - useCursorPosition_defineProperty(target, key, source[key]); - }) - : Object.getOwnPropertyDescriptors - ? Object.defineProperties( - target, - Object.getOwnPropertyDescriptors(source) - ) - : useCursorPosition_ownKeys(Object(source)).forEach(function( - key - ) { - Object.defineProperty( - target, - key, - Object.getOwnPropertyDescriptor(source, key) - ); - }); - } - return target; - } - function useCursorPosition_defineProperty(obj, key, value) { - return ( - key in obj - ? Object.defineProperty(obj, key, { - value: value, - enumerable: !0, - configurable: !0, - writable: !0 - }) - : (obj[key] = value), - obj - ); - } - function useCursorPosition_slicedToArray(arr, i) { - return ( - (function useCursorPosition_arrayWithHoles(arr) { - if (Array.isArray(arr)) return arr; - })(arr) || - (function useCursorPosition_iterableToArrayLimit(arr, i) { - var _i = - null == arr - ? null - : ('undefined' != typeof Symbol && arr[Symbol.iterator]) || - arr['@@iterator']; - if (null == _i) return; - var _s, - _e, - _arr = [], - _n = !0, - _d = !1; - try { - for ( - _i = _i.call(arr); - !(_n = (_s = _i.next()).done) && - (_arr.push(_s.value), !i || _arr.length !== i); - _n = !0 - ); - } catch (err) { - (_d = !0), (_e = err); - } finally { - try { - _n || null == _i.return || _i.return(); - } finally { - if (_d) throw _e; - } - } - return _arr; - })(arr, i) || - (function useCursorPosition_unsupportedIterableToArray(o, minLen) { - if (!o) return; - if ('string' == typeof o) - return useCursorPosition_arrayLikeToArray(o, minLen); - var n = Object.prototype.toString.call(o).slice(8, -1); - 'Object' === n && o.constructor && (n = o.constructor.name); - if ('Map' === n || 'Set' === n) return Array.from(o); - if ( - 'Arguments' === n || - /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) - ) - return useCursorPosition_arrayLikeToArray(o, minLen); - })(arr, i) || - (function useCursorPosition_nonIterableRest() { - throw new TypeError( - 'Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.' - ); - })() - ); - } - function useCursorPosition_arrayLikeToArray(arr, len) { - (null == len || len > arr.length) && (len = arr.length); - for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; - return arr2; - } - (Scope_Scope.__docgenInfo = { - description: '', - methods: [], - displayName: 'Scope' - }), - 'undefined' != typeof STORYBOOK_REACT_CLASSES && - (STORYBOOK_REACT_CLASSES['src/components/Scope.js'] = { - name: 'Scope', - docgenInfo: Scope_Scope.__docgenInfo, - path: 'src/components/Scope.js' - }); - var useUpdateEffect_useUpdateEffect = function useUpdateEffect( - effect, - deps - ) { - var firstRef = Object(react.useRef)(!0), - isFirstMount = firstRef.current; - Object(react.useEffect)(function() { - if (!isFirstMount) return effect(); - firstRef.current = !1; - }, deps); - }, - useField_excluded = [ - 'id', - 'type', - 'name', - 'onBlur', - 'onChange', - 'onFocus', - 'validate', - 'asyncValidate', - 'yupSchema', - 'multiple', - 'field', - 'keepState', - 'keepStateIfRelevant', - 'debug', - 'inputRef', - 'inputRefs', - 'relevant', - 'defaultValue', - 'initialValue', - 'autocomplete', - 'showErrorIfError', - 'showErrorIfTouched', - 'showErrorIfDirty', - 'formatter', - 'parser', - 'maintainCursor', - 'required', - 'minimum', - 'maximum', - 'minLength', - 'maxLength', - 'pattern', - 'validateOnMount', - 'validateOn', - 'validateWhen', - 'formatterDependencies', - 'formController', - 'initialize', - 'errorMessage', - 'initializeValueIfPristine', - 'relevanceWhen', - 'relevanceDeps' - ]; - function useField_ownKeys(object, enumerableOnly) { - var keys = Object.keys(object); - if (Object.getOwnPropertySymbols) { - var symbols = Object.getOwnPropertySymbols(object); - enumerableOnly && - (symbols = symbols.filter(function(sym) { - return Object.getOwnPropertyDescriptor(object, sym).enumerable; - })), - keys.push.apply(keys, symbols); - } - return keys; - } - function useField_defineProperty(obj, key, value) { - return ( - key in obj - ? Object.defineProperty(obj, key, { - value: value, - enumerable: !0, - configurable: !0, - writable: !0 - }) - : (obj[key] = value), - obj - ); - } - function useField_toConsumableArray(arr) { - return ( - (function useField_arrayWithoutHoles(arr) { - if (Array.isArray(arr)) return useField_arrayLikeToArray(arr); - })(arr) || - (function useField_iterableToArray(iter) { - if ( - ('undefined' != typeof Symbol && null != iter[Symbol.iterator]) || - null != iter['@@iterator'] - ) - return Array.from(iter); - })(arr) || - useField_unsupportedIterableToArray(arr) || - (function useField_nonIterableSpread() { - throw new TypeError( - 'Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.' - ); - })() - ); - } - function useField_slicedToArray(arr, i) { - return ( - (function useField_arrayWithHoles(arr) { - if (Array.isArray(arr)) return arr; - })(arr) || - (function useField_iterableToArrayLimit(arr, i) { - var _i = - null == arr - ? null - : ('undefined' != typeof Symbol && arr[Symbol.iterator]) || - arr['@@iterator']; - if (null == _i) return; - var _s, - _e, - _arr = [], - _n = !0, - _d = !1; - try { - for ( - _i = _i.call(arr); - !(_n = (_s = _i.next()).done) && - (_arr.push(_s.value), !i || _arr.length !== i); - _n = !0 - ); - } catch (err) { - (_d = !0), (_e = err); - } finally { - try { - _n || null == _i.return || _i.return(); - } finally { - if (_d) throw _e; - } - } - return _arr; - })(arr, i) || - useField_unsupportedIterableToArray(arr, i) || - (function useField_nonIterableRest() { - throw new TypeError( - 'Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.' - ); - })() - ); - } - function useField_unsupportedIterableToArray(o, minLen) { - if (o) { - if ('string' == typeof o) return useField_arrayLikeToArray(o, minLen); - var n = Object.prototype.toString.call(o).slice(8, -1); - return ( - 'Object' === n && o.constructor && (n = o.constructor.name), - 'Map' === n || 'Set' === n - ? Array.from(o) - : 'Arguments' === n || - /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) - ? useField_arrayLikeToArray(o, minLen) - : void 0 - ); - } - } - function useField_arrayLikeToArray(arr, len) { - (null == len || len > arr.length) && (len = arr.length); - for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; - return arr2; - } - function useField_objectWithoutProperties(source, excluded) { - if (null == source) return {}; - var key, - i, - target = (function useField_objectWithoutPropertiesLoose( - source, - excluded - ) { - if (null == source) return {}; - var key, - i, - target = {}, - sourceKeys = Object.keys(source); - for (i = 0; i < sourceKeys.length; i++) - (key = sourceKeys[i]), - excluded.indexOf(key) >= 0 || (target[key] = source[key]); - return target; - })(source, excluded); - if (Object.getOwnPropertySymbols) { - var sourceSymbolKeys = Object.getOwnPropertySymbols(source); - for (i = 0; i < sourceSymbolKeys.length; i++) - (key = sourceSymbolKeys[i]), - excluded.indexOf(key) >= 0 || - (Object.prototype.propertyIsEnumerable.call(source, key) && - (target[key] = source[key])); - } - return target; - } - var useField_logger = Object(src_debug.a)('informed:useField\t'), - useField_useField = function useField(_ref) { - var id = _ref.id, - type = _ref.type, - userName = _ref.name, - onBlur = _ref.onBlur, - onChange = _ref.onChange, - onFocus = _ref.onFocus, - validationFunc = _ref.validate, - asyncValidate = _ref.asyncValidate, - yupSchema = _ref.yupSchema, - multiple = _ref.multiple, - field = _ref.field, - userKeepState = _ref.keepState, - userKeepStateIfRelevant = _ref.keepStateIfRelevant, - debug = _ref.debug, - inputRef = _ref.inputRef, - inputRefs = _ref.inputRefs, - relevant = _ref.relevant, - defaultValue = _ref.defaultValue, - userInitialValue = _ref.initialValue, - userAutocomplete = _ref.autocomplete, - userShowErrorIfError = _ref.showErrorIfError, - userShowErrorIfTouched = _ref.showErrorIfTouched, - userShowErrorIfDirty = _ref.showErrorIfDirty, - formatter = _ref.formatter, - parser = _ref.parser, - userMaintainCursor = _ref.maintainCursor, - required = _ref.required, - minimum = _ref.minimum, - maximum = _ref.maximum, - minLength = _ref.minLength, - maxLength = _ref.maxLength, - pattern = _ref.pattern, - userValidateOnMount = _ref.validateOnMount, - userValidateOn = _ref.validateOn, - _ref$validateWhen = _ref.validateWhen, - validateWhen = - void 0 === _ref$validateWhen ? [] : _ref$validateWhen, - _ref$formatterDepende = _ref.formatterDependencies, - formatterDependencies = - void 0 === _ref$formatterDepende ? [] : _ref$formatterDepende, - userFormController = _ref.formController, - initialize = _ref.initialize, - errorMessage = _ref.errorMessage, - initializeValueIfPristine = _ref.initializeValueIfPristine, - _ref$relevanceWhen = _ref.relevanceWhen, - relevanceWhen = - void 0 === _ref$relevanceWhen ? [] : _ref$relevanceWhen, - _ref$relevanceDeps = _ref.relevanceDeps, - relevanceDeps = - void 0 === _ref$relevanceDeps ? [] : _ref$relevanceDeps, - userProps = useField_objectWithoutProperties( - _ref, - useField_excluded - ), - name = useScope(null != userName ? userName : field); - name || console.warn('name is a required prop!!!!'); - var maintainCursor = - null != userMaintainCursor ? userMaintainCursor : !!formatter, - formController = - null != userFormController - ? userFormController - : useFormController(), - autocomplete = - null != userAutocomplete - ? userAutocomplete - : formController.options.current.autocomplete, - showErrorIfError = - null != userShowErrorIfError - ? userShowErrorIfError - : formController.options.current.showErrorIfError, - showErrorIfTouched = - null != userShowErrorIfTouched - ? userShowErrorIfTouched - : formController.options.current.showErrorIfTouched, - showErrorIfDirty = - null != userShowErrorIfDirty - ? userShowErrorIfDirty - : formController.options.current.showErrorIfDirty, - validateOnMount = - null != userValidateOnMount - ? userValidateOnMount - : formController.options.current.validateOnMount, - validateOn = - null != userValidateOn - ? userValidateOn - : formController.options.current.validateOn, - keepState = - null != userKeepState - ? userKeepState - : formController.options.current.keepState, - keepStateIfRelevant = - null != userKeepStateIfRelevant - ? userKeepStateIfRelevant - : formController.options.current.keepStateIfRelevant, - getInitialValue = function getInitialValue() { - var _ref2; - return null !== - (_ref2 = - null != userInitialValue - ? userInitialValue - : formController.getInitialValue(name)) && void 0 !== _ref2 - ? _ref2 - : defaultValue; - }, - initialValue = useField_slicedToArray( - Object(react.useState)(function() { - return getInitialValue(); - }), - 1 - )[0], - fieldState = useFieldState_useFieldState(name, !1), - fieldApi = useFieldApi(name, !1), - inMultistep = Object(react.useContext)(Context.k), - isRelevant = useRelevance_useRelevance({ - name: name, - relevant: relevant, - relevanceWhen: relevanceWhen, - relevanceDeps: relevanceDeps - }), - relevantContext = Object(react.useContext)(Context.m), - internalRef = Object(react.useRef)(null), - ref = react_default.a.useMemo(function() { - return inputRef || internalRef; - }, []), - fieldId = useField_slicedToArray( - Object(react.useState)(function() { - return id || uuidv4(); - }), - 1 - )[0], - _useCursorPosition = (function useCursorPosition(_ref) { - var value = _ref.value, - inputRef = _ref.inputRef, - inputRefs = _ref.inputRefs, - _ref$maintainCursor = _ref.maintainCursor, - maintainCursor = - void 0 !== _ref$maintainCursor && _ref$maintainCursor, - initialCursor = Object(react.useMemo)(function() { - if (!inputRefs) return 0; - var initOffset = {}; - Object.keys(inputRefs).forEach(function(key) { - return (initOffset[key] = 0); - }); - }, []), - _useStateWithGetter2 = useCursorPosition_slicedToArray( - useStateWithGetter(initialCursor), - 3 - ), - cursor = _useStateWithGetter2[0], - setCursor = _useStateWithGetter2[1], - getCursor = _useStateWithGetter2[2], - _useStateWithGetter4 = useCursorPosition_slicedToArray( - useStateWithGetter(initialCursor), - 3 - ), - cursorOffset = _useStateWithGetter4[0], - setCursorOffset = _useStateWithGetter4[1], - getCursorOffset = _useStateWithGetter4[2], - setCursorCallback = Object(react.useCallback)(function(c, key) { - if (key) { - var newCursor = useCursorPosition_objectSpread( - {}, - getCursor() - ); - (newCursor[key] = c), setCursor(newCursor); - } else setCursor(c); - }, []), - setCursorOffsetCallback = Object(react.useCallback)(function( - c, - key - ) { - if (key) { - var newCursor = useCursorPosition_objectSpread( - {}, - getCursor() - ); - (newCursor[key] = c[key]), setCursorOffset(newCursor); - } else setCursorOffset(c); - }, - []); - return ( - Object(react.useEffect)( - function() { - if (!inputRefs && null != inputRef.current && getCursor()) { - var offset = - getCursorOffset() < 0 ? 0 : getCursorOffset(), - cursorLoc = getCursor() + offset; - maintainCursor && - inputRef.current.setSelectionRange( - cursorLoc, - cursorLoc - ); - } - inputRefs && - getCursor() && - Object.keys(inputRefs).forEach(function(key) { - var offset = - getCursorOffset()[key] < 0 - ? 0 - : getCursorOffset()[key], - cursorLoc = getCursor()[key] + offset; - maintainCursor && - inputRefs[key].current.setSelectionRange( - cursorLoc, - cursorLoc - ); - }); - }, - [value, cursor] - ), - { - setCursorOffset: setCursorOffsetCallback, - setCursor: setCursorCallback, - cursor: cursor, - getCursor: getCursor, - cursorOffset: cursorOffset - } - ); - })({ - value: fieldState.value, - inputRef: ref, - maintainCursor: maintainCursor, - inputRefs: inputRefs - }), - setCursor = _useCursorPosition.setCursor, - setCursorOffset = _useCursorPosition.setCursorOffset, - validate = Object(react.useMemo)(function() { - return generateValidationFunction(validationFunc, yupSchema, { - required: required, - minimum: minimum, - maximum: maximum, - minLength: minLength, - maxLength: maxLength, - pattern: pattern, - getErrorMessage: function getErrorMessage(key) { - return formController.getErrorMessage(key, name); - } - }); - }, []), - meta = { - name: name, - type: type, - onBlur: onBlur, - onChange: onChange, - onFocus: onFocus, - initialValue: initialValue, - keepState: keepState, - keepStateIfRelevant: keepStateIfRelevant, - initializeValueIfPristine: initializeValueIfPristine, - fieldApi: fieldApi, - getInitialValue: getInitialValue, - formatter: formatter, - parser: parser, - setCursorOffset: setCursorOffset, - setCursor: setCursor, - validate: validate, - yupSchema: yupSchema, - validateOn: null != validateOn ? validateOn : 'blur', - validateOnMount: validateOnMount, - validateWhen: validateWhen, - showErrorIfError: showErrorIfError, - showErrorIfTouched: showErrorIfTouched, - showErrorIfDirty: showErrorIfDirty, - asyncValidate: asyncValidate, - initialize: initialize, - errorMessage: errorMessage - }, - metaRef = Object(react.useRef)(meta); - (metaRef.current = meta), - Object(react.useEffect)( - function() { - return ( - useField_logger('Register', name, metaRef.current), - formController.register(name, metaRef), - function() { - useField_logger('De-Register', name, metaRef.current), - formController.deregister(name); - } - ); - }, - [name] - ), - Object(react.useEffect)( - function() { - var metaInfo = metaRef.current; - isRelevant || - keepState || - (useField_logger('RELEVANT REMOVING', metaInfo.name), - formController.remove(metaInfo.name), - useField_logger('RELEVANT De-Register', metaInfo.name), - formController.deregister(metaInfo.name)), - isRelevant && - (useField_logger('RELEVANT Initialize', metaInfo.name), - formController.initialize(metaInfo.name, metaRef), - useField_logger('RELEVANT register', metaInfo.name), - formController.register(metaInfo.name, metaRef)); - }, - [isRelevant] - ), - Object(react.useEffect)(function() { - return function() { - var keepIt = !1, - metaInfo = metaRef.current; - useField_logger('CLEANUP REMOVING', metaInfo.name), - metaInfo.keepState - ? (keepIt = !0) - : relevantContext && !relevantContext.relevant() - ? (keepIt = !1) - : (keepStateIfRelevant || inMultistep) && (keepIt = !0), - keepIt || formController.remove(metaInfo.name); - }; - }, []), - useUpdateEffect_useUpdateEffect(function() { - formController.reformat(metaRef.current.name); - }, useField_toConsumableArray(formatterDependencies)), - useFieldSubscription_useFieldSubscription( - 'field-value', - validateWhen, - function(target) { - useField_logger( - 'revalidating for ' - .concat(metaRef.current.name, ' because of ') - .concat(target) - ), - formController.validateField(metaRef.current.name); - } - ), - Object(react.useLayoutEffect)(function() { - debug && - ref && - ref.current && - ((ref.current.style.background = 'orange'), - setTimeout(function() { - ref.current && (ref.current.style.background = 'grey'); - }, 300)); - }); - var changeHandler = generateOnChange({ - fieldType: type, - setValue: fieldApi.setValue, - multiple: multiple, - ref: ref - }), - blurHandler = generateOnBlur({ setTouched: fieldApi.setTouched }), - focusHandler = generateOnFocus({ setFocused: fieldApi.setFocused }), - hookedValue = generateValue({ - fieldType: type, - maskedValue: fieldState.maskedValue, - multiple: userProps.multiple, - value: fieldState.value - }), - recombinedUserProps = (function useField_objectSpread(target) { - for (var i = 1; i < arguments.length; i++) { - var source = null != arguments[i] ? arguments[i] : {}; - i % 2 - ? useField_ownKeys(Object(source), !0).forEach(function(key) { - useField_defineProperty(target, key, source[key]); - }) - : Object.getOwnPropertyDescriptors - ? Object.defineProperties( - target, - Object.getOwnPropertyDescriptors(source) - ) - : useField_ownKeys(Object(source)).forEach(function(key) { - Object.defineProperty( - target, - key, - Object.getOwnPropertyDescriptor(source, key) - ); - }); - } - return target; - })( - { - id: fieldId, - name: name, - type: type, - multiple: multiple, - autoComplete: autocomplete, - required: required, - min: minimum, - max: maximum, - minLength: minLength, - maxLength: maxLength, - pattern: pattern - }, - userProps - ); - return { - fieldState: fieldState, - fieldApi: fieldApi, - userProps: recombinedUserProps, - informed: { - onChange: changeHandler, - onBlur: blurHandler, - onFocus: focusHandler, - value: hookedValue - }, - ref: ref, - render: function render(children) { - return isRelevant ? children : null; - } - }; - }, - Input_excluded = ['label', 'id']; - function Input_extends() { - return ( - (Input_extends = - Object.assign || - function(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i]; - for (var key in source) - Object.prototype.hasOwnProperty.call(source, key) && - (target[key] = source[key]); - } - return target; - }), - Input_extends.apply(this, arguments) - ); - } - function Input_objectWithoutProperties(source, excluded) { - if (null == source) return {}; - var key, - i, - target = (function Input_objectWithoutPropertiesLoose( - source, - excluded - ) { - if (null == source) return {}; - var key, - i, - target = {}, - sourceKeys = Object.keys(source); - for (i = 0; i < sourceKeys.length; i++) - (key = sourceKeys[i]), - excluded.indexOf(key) >= 0 || (target[key] = source[key]); - return target; - })(source, excluded); - if (Object.getOwnPropertySymbols) { - var sourceSymbolKeys = Object.getOwnPropertySymbols(source); - for (i = 0; i < sourceSymbolKeys.length; i++) - (key = sourceSymbolKeys[i]), - excluded.indexOf(key) >= 0 || - (Object.prototype.propertyIsEnumerable.call(source, key) && - (target[key] = source[key])); - } - return target; - } - var Input = react_default.a.memo(function(props) { - var _useField = useField_useField(props), - render = _useField.render, - userProps = _useField.userProps, - ref = _useField.ref, - fieldState = _useField.fieldState, - fieldApi = _useField.fieldApi, - setValue = fieldApi.setValue, - setTouched = fieldApi.setTouched, - setFocused = fieldApi.setFocused, - maskedValue = fieldState.maskedValue, - showError = fieldState.showError, - error = fieldState.error, - label = userProps.label, - id = userProps.id, - rest = Input_objectWithoutProperties(userProps, Input_excluded); - return render( - react_default.a.createElement( - react_default.a.Fragment, - null, - label - ? react_default.a.createElement('label', { htmlFor: id }, label) - : null, - react_default.a.createElement( - 'input', - Input_extends({ ref: ref, id: id }, rest, { - value: maskedValue || 0 === maskedValue ? maskedValue : '', - onChange: function onChange(e) { - setValue(e.target.value, e); - }, - onBlur: function onBlur(e) { - setTouched(!0, e); - }, - onFocus: function onFocus(e) { - setFocused(!0, e); - }, - 'aria-invalid': !!showError, - 'aria-describedby': ''.concat(id, '-error') - }) - ), - showError - ? react_default.a.createElement( - 'small', - { role: 'alert', id: ''.concat(id, '-error') }, - error - ) - : null - ) - ); - }); - function TextArea_extends() { - return ( - (TextArea_extends = - Object.assign || - function(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i]; - for (var key in source) - Object.prototype.hasOwnProperty.call(source, key) && - (target[key] = source[key]); - } - return target; - }), - TextArea_extends.apply(this, arguments) - ); - } - var TextArea = react_default.a.memo(function(props) { - var _useField = useField_useField(props), - render = _useField.render, - userProps = _useField.userProps, - ref = _useField.ref, - fieldState = _useField.fieldState, - fieldApi = _useField.fieldApi, - setValue = fieldApi.setValue, - setTouched = fieldApi.setTouched, - setFocused = fieldApi.setFocused, - maskedValue = fieldState.maskedValue, - showError = fieldState.showError, - error = fieldState.error, - label = userProps.label, - id = userProps.id; - return render( - react_default.a.createElement( - react_default.a.Fragment, - null, - label - ? react_default.a.createElement('label', { htmlFor: id }, label) - : null, - react_default.a.createElement( - 'textarea', - TextArea_extends({ ref: ref }, userProps, { - value: maskedValue || '', - onChange: function onChange(e) { - setValue(e.target.value, e); - }, - onBlur: function onBlur(e) { - setTouched(!0, e); - }, - onFocus: function onFocus(e) { - setFocused(!0, e); - }, - 'aria-invalid': !!showError, - 'aria-describedby': ''.concat(id, '-error') - }) - ), - showError - ? react_default.a.createElement( - 'small', - { role: 'alert', id: ''.concat(id, '-error') }, - error - ) - : null - ) - ); - }), - Select_excluded = [ - 'id', - 'onBlur', - 'onChange', - 'multiple', - 'label', - 'options', - 'children' - ]; - function Select_extends() { - return ( - (Select_extends = - Object.assign || - function(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i]; - for (var key in source) - Object.prototype.hasOwnProperty.call(source, key) && - (target[key] = source[key]); - } - return target; - }), - Select_extends.apply(this, arguments) - ); - } - function Select_objectWithoutProperties(source, excluded) { - if (null == source) return {}; - var key, - i, - target = (function Select_objectWithoutPropertiesLoose( - source, - excluded - ) { - if (null == source) return {}; - var key, - i, - target = {}, - sourceKeys = Object.keys(source); - for (i = 0; i < sourceKeys.length; i++) - (key = sourceKeys[i]), - excluded.indexOf(key) >= 0 || (target[key] = source[key]); - return target; - })(source, excluded); - if (Object.getOwnPropertySymbols) { - var sourceSymbolKeys = Object.getOwnPropertySymbols(source); - for (i = 0; i < sourceSymbolKeys.length; i++) - (key = sourceSymbolKeys[i]), - excluded.indexOf(key) >= 0 || - (Object.prototype.propertyIsEnumerable.call(source, key) && - (target[key] = source[key])); - } - return target; - } - var Select_Select = function Select(props) { - var _useField = useField_useField(props), - render = _useField.render, - userProps = _useField.userProps, - fieldState = _useField.fieldState, - fieldApi = _useField.fieldApi, - ref = _useField.ref, - setValue = fieldApi.setValue, - setTouched = fieldApi.setTouched, - value = fieldState.value, - showError = fieldState.showError, - error = fieldState.error, - id = userProps.id, - _onBlur = userProps.onBlur, - onChange = userProps.onChange, - multiple = userProps.multiple, - label = userProps.label, - options = userProps.options, - children = userProps.children, - rest = Select_objectWithoutProperties(userProps, Select_excluded); - return render( - react_default.a.createElement( - react_default.a.Fragment, - null, - label - ? react_default.a.createElement( - 'label', - { htmlFor: id }, - ' ', - label, - ' ' - ) - : null, - react_default.a.createElement( - 'select', - Select_extends({}, rest, { - id: id, - multiple: multiple, - ref: ref, - value: value || (multiple ? [] : ''), - 'aria-invalid': !!showError, - 'aria-describedby': ''.concat(id, '-error'), - onChange: function handleChange(e) { - var selected = Array.from(ref.current) - .filter(function(option) { - return option.selected; - }) - .map(function(option) { - return option.value; - }); - setValue(multiple ? selected : selected[0] || ''), - onChange && e && onChange(e); - }, - onBlur: function onBlur(e) { - setTouched(!0), _onBlur && _onBlur(e); - } - }), - options - ? options.map(function(option) { - return react_default.a.createElement( - 'option', - { - key: option.value, - value: option.value, - disabled: option.disabled - }, - option.label - ); - }) - : children - ), - showError - ? react_default.a.createElement( - 'small', - { role: 'alert', id: ''.concat(id, '-error') }, - error - ) - : null - ) - ); - }, - Checkbox_excluded = ['onBlur', 'onChange', 'id', 'label']; - function Checkbox_extends() { - return ( - (Checkbox_extends = - Object.assign || - function(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i]; - for (var key in source) - Object.prototype.hasOwnProperty.call(source, key) && - (target[key] = source[key]); - } - return target; - }), - Checkbox_extends.apply(this, arguments) - ); - } - function Checkbox_objectWithoutProperties(source, excluded) { - if (null == source) return {}; - var key, - i, - target = (function Checkbox_objectWithoutPropertiesLoose( - source, - excluded - ) { - if (null == source) return {}; - var key, - i, - target = {}, - sourceKeys = Object.keys(source); - for (i = 0; i < sourceKeys.length; i++) - (key = sourceKeys[i]), - excluded.indexOf(key) >= 0 || (target[key] = source[key]); - return target; - })(source, excluded); - if (Object.getOwnPropertySymbols) { - var sourceSymbolKeys = Object.getOwnPropertySymbols(source); - for (i = 0; i < sourceSymbolKeys.length; i++) - (key = sourceSymbolKeys[i]), - excluded.indexOf(key) >= 0 || - (Object.prototype.propertyIsEnumerable.call(source, key) && - (target[key] = source[key])); - } - return target; - } - var Checkbox_Checkbox = function Checkbox(props) { - var _useField = useField_useField(props), - render = _useField.render, - userProps = _useField.userProps, - fieldState = _useField.fieldState, - fieldApi = _useField.fieldApi, - setValue = fieldApi.setValue, - setTouched = fieldApi.setTouched, - value = fieldState.value, - error = fieldState.error, - showError = fieldState.showError, - _onBlur = userProps.onBlur, - _onChange = userProps.onChange, - id = userProps.id, - label = userProps.label, - rest = Checkbox_objectWithoutProperties(userProps, Checkbox_excluded); - return render( - react_default.a.createElement( - react_default.a.Fragment, - null, - label - ? react_default.a.createElement('label', { htmlFor: id }, label) - : null, - react_default.a.createElement( - 'input', - Checkbox_extends({}, rest, { - id: id, - checked: !!value, - 'aria-invalid': !!showError, - 'aria-describedby': ''.concat(id, '-error'), - onChange: function onChange(e) { - setValue(e.target.checked), _onChange && _onChange(e); - }, - onBlur: function onBlur(e) { - setTouched(!0), _onBlur && _onBlur(e); - }, - type: 'checkbox' - }) - ), - showError - ? react_default.a.createElement( - 'small', - { role: 'alert', id: ''.concat(id, '-error') }, - error - ) - : null - ) - ); - }; - var Radio_excluded = ['label', 'value', 'onChange', 'onBlur']; - function Radio_extends() { - return ( - (Radio_extends = - Object.assign || - function(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i]; - for (var key in source) - Object.prototype.hasOwnProperty.call(source, key) && - (target[key] = source[key]); - } - return target; - }), - Radio_extends.apply(this, arguments) - ); - } - function Radio_objectWithoutProperties(source, excluded) { - if (null == source) return {}; - var key, - i, - target = (function Radio_objectWithoutPropertiesLoose( - source, - excluded - ) { - if (null == source) return {}; - var key, - i, - target = {}, - sourceKeys = Object.keys(source); - for (i = 0; i < sourceKeys.length; i++) - (key = sourceKeys[i]), - excluded.indexOf(key) >= 0 || (target[key] = source[key]); - return target; - })(source, excluded); - if (Object.getOwnPropertySymbols) { - var sourceSymbolKeys = Object.getOwnPropertySymbols(source); - for (i = 0; i < sourceSymbolKeys.length; i++) - (key = sourceSymbolKeys[i]), - excluded.indexOf(key) >= 0 || - (Object.prototype.propertyIsEnumerable.call(source, key) && - (target[key] = source[key])); - } - return target; - } - var Radio_Radio = function Radio(_ref) { - var label = _ref.label, - value = _ref.value, - _onChange = _ref.onChange, - _onBlur = _ref.onBlur, - props = Radio_objectWithoutProperties(_ref, Radio_excluded), - _useRadioGroup = (function useRadioGroup() { - return Object(react.useContext)(Context.l); - })(), - radioGroupApi = _useRadioGroup.radioGroupApi, - radioGroupState = _useRadioGroup.radioGroupState, - groupOnChange = _useRadioGroup.onChange, - groupOnBlur = _useRadioGroup.onBlur, - setValue = radioGroupApi.setValue, - setTouched = radioGroupApi.setTouched, - groupValue = radioGroupState.value, - showError = radioGroupState.showError; - return react_default.a.createElement( - 'label', - null, - label, - react_default.a.createElement( - 'input', - Radio_extends({}, props, { - 'aria-invalid': !!showError, - value: value, - checked: groupValue === value, - onChange: function onChange(e) { - e.target.checked && - (setValue(value), - _onChange && _onChange(e), - groupOnChange && groupOnChange(e)); - }, - onBlur: function onBlur(e) { - setTouched(!0), - _onBlur && _onBlur(e), - groupOnBlur && groupOnBlur(e); - }, - type: 'radio' - }) - ) - ); - }; - function RadioGroup_ownKeys(object, enumerableOnly) { - var keys = Object.keys(object); - if (Object.getOwnPropertySymbols) { - var symbols = Object.getOwnPropertySymbols(object); - enumerableOnly && - (symbols = symbols.filter(function(sym) { - return Object.getOwnPropertyDescriptor(object, sym).enumerable; - })), - keys.push.apply(keys, symbols); - } - return keys; - } - function RadioGroup_defineProperty(obj, key, value) { - return ( - key in obj - ? Object.defineProperty(obj, key, { - value: value, - enumerable: !0, - configurable: !0, - writable: !0 - }) - : (obj[key] = value), - obj - ); - } - (Radio_Radio.__docgenInfo = { - description: '', - methods: [], - displayName: 'Radio' - }), - 'undefined' != typeof STORYBOOK_REACT_CLASSES && - (STORYBOOK_REACT_CLASSES['src/components/form-fields/Radio.js'] = { - name: 'Radio', - docgenInfo: Radio_Radio.__docgenInfo, - path: 'src/components/form-fields/Radio.js' - }); - var RadioGroup_RadioGroup = function RadioGroup(props) { - var _useField = useField_useField(props), - fieldApi = _useField.fieldApi, - fieldState = _useField.fieldState, - userProps = _useField.userProps, - groupContext = (function RadioGroup_objectSpread(target) { - for (var i = 1; i < arguments.length; i++) { - var source = null != arguments[i] ? arguments[i] : {}; - i % 2 - ? RadioGroup_ownKeys(Object(source), !0).forEach(function(key) { - RadioGroup_defineProperty(target, key, source[key]); - }) - : Object.getOwnPropertyDescriptors - ? Object.defineProperties( - target, - Object.getOwnPropertyDescriptors(source) - ) - : RadioGroup_ownKeys(Object(source)).forEach(function(key) { - Object.defineProperty( - target, - key, - Object.getOwnPropertyDescriptor(source, key) - ); - }); - } - return target; - })({ radioGroupApi: fieldApi, radioGroupState: fieldState }, props), - label = userProps.label, - id = userProps.id, - options = userProps.options, - children = userProps.children, - showError = fieldState.showError, - error = fieldState.error; - return react_default.a.createElement( - Context.l.Provider, - { value: groupContext }, - react_default.a.createElement( - 'fieldset', - { 'aria-describedby': ''.concat(id, '-error') }, - label ? react_default.a.createElement('legend', null, label) : null, - options - ? options.map(function(option) { - return react_default.a.createElement( - 'label', - { key: option.value }, - option.label, - ' ', - react_default.a.createElement(Radio_Radio, { - value: option.value - }) - ); - }) - : children, - showError - ? react_default.a.createElement( - 'small', - { role: 'alert', id: ''.concat(id, '-error') }, - error - ) - : null - ) - ); - }; - function useArrayFieldApi() { - return Object(react.useContext)(Context.a); - } - (RadioGroup_RadioGroup.__docgenInfo = { - description: '', - methods: [], - displayName: 'RadioGroup' - }), - 'undefined' != typeof STORYBOOK_REACT_CLASSES && - (STORYBOOK_REACT_CLASSES[ - 'src/components/form-fields/RadioGroup.js' - ] = { - name: 'RadioGroup', - docgenInfo: RadioGroup_RadioGroup.__docgenInfo, - path: 'src/components/form-fields/RadioGroup.js' - }); - var AddButton_AddButton = function AddButton(_ref) { - var text = _ref.text, - add = useArrayFieldApi().add; - return react_default.a.createElement( - 'button', - { - onClick: function onClick() { - add(); - }, - type: 'button' - }, - text || 'Add' - ); - }; - function useArrayFieldItemApi() { - return Object(react.useContext)(Context.b); - } - (AddButton_AddButton.__docgenInfo = { - description: '', - methods: [], - displayName: 'AddButton' - }), - 'undefined' != typeof STORYBOOK_REACT_CLASSES && - (STORYBOOK_REACT_CLASSES[ - 'src/components/form-fields/AddButton.js' - ] = { - name: 'AddButton', - docgenInfo: AddButton_AddButton.__docgenInfo, - path: 'src/components/form-fields/AddButton.js' - }); - var RemoveButton_RemoveButton = function RemoveButton(_ref) { - var text = _ref.text, - remove = useArrayFieldItemApi().remove; - return react_default.a.createElement( - 'button', - { - onClick: function onClick() { - remove(); - }, - type: 'button' - }, - text || 'Remove' - ); - }; - function FormComponents_extends() { - return ( - (FormComponents_extends = - Object.assign || - function(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i]; - for (var key in source) - Object.prototype.hasOwnProperty.call(source, key) && - (target[key] = source[key]); - } - return target; - }), - FormComponents_extends.apply(this, arguments) - ); - } - (RemoveButton_RemoveButton.__docgenInfo = { - description: '', - methods: [], - displayName: 'RemoveButton' - }), - 'undefined' != typeof STORYBOOK_REACT_CLASSES && - (STORYBOOK_REACT_CLASSES[ - 'src/components/form-fields/RemoveButton.js' - ] = { - name: 'RemoveButton', - docgenInfo: RemoveButton_RemoveButton.__docgenInfo, - path: 'src/components/form-fields/RemoveButton.js' - }); - var FormComponents_FormComponents = function FormComponents(_ref) { - var components = _ref.components, - fieldMap = useFormController().fieldMap; - return components - ? components.map(function(comp, i) { - var componentType = comp['ui:control'], - props = comp['ui:props'], - Component = fieldMap[componentType]; - return react_default.a.createElement( - Component, - FormComponents_extends({ key: 'ui-comp-'.concat(i) }, props) - ); - }) - : null; - }, - FormField_excluded = ['name', 'schema']; - function FormField_extends() { - return ( - (FormField_extends = - Object.assign || - function(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i]; - for (var key in source) - Object.prototype.hasOwnProperty.call(source, key) && - (target[key] = source[key]); - } - return target; - }), - FormField_extends.apply(this, arguments) - ); - } - function FormField_ownKeys(object, enumerableOnly) { - var keys = Object.keys(object); - if (Object.getOwnPropertySymbols) { - var symbols = Object.getOwnPropertySymbols(object); - enumerableOnly && - (symbols = symbols.filter(function(sym) { - return Object.getOwnPropertyDescriptor(object, sym).enumerable; - })), - keys.push.apply(keys, symbols); - } - return keys; - } - function FormField_objectSpread(target) { - for (var i = 1; i < arguments.length; i++) { - var source = null != arguments[i] ? arguments[i] : {}; - i % 2 - ? FormField_ownKeys(Object(source), !0).forEach(function(key) { - FormField_defineProperty(target, key, source[key]); - }) - : Object.getOwnPropertyDescriptors - ? Object.defineProperties( - target, - Object.getOwnPropertyDescriptors(source) - ) - : FormField_ownKeys(Object(source)).forEach(function(key) { - Object.defineProperty( - target, - key, - Object.getOwnPropertyDescriptor(source, key) - ); - }); - } - return target; - } - function FormField_defineProperty(obj, key, value) { - return ( - key in obj - ? Object.defineProperty(obj, key, { - value: value, - enumerable: !0, - configurable: !0, - writable: !0 - }) - : (obj[key] = value), - obj - ); - } - function FormField_slicedToArray(arr, i) { - return ( - (function FormField_arrayWithHoles(arr) { - if (Array.isArray(arr)) return arr; - })(arr) || - (function FormField_iterableToArrayLimit(arr, i) { - var _i = - null == arr - ? null - : ('undefined' != typeof Symbol && arr[Symbol.iterator]) || - arr['@@iterator']; - if (null == _i) return; - var _s, - _e, - _arr = [], - _n = !0, - _d = !1; - try { - for ( - _i = _i.call(arr); - !(_n = (_s = _i.next()).done) && - (_arr.push(_s.value), !i || _arr.length !== i); - _n = !0 - ); - } catch (err) { - (_d = !0), (_e = err); - } finally { - try { - _n || null == _i.return || _i.return(); - } finally { - if (_d) throw _e; - } - } - return _arr; - })(arr, i) || - (function FormField_unsupportedIterableToArray(o, minLen) { - if (!o) return; - if ('string' == typeof o) - return FormField_arrayLikeToArray(o, minLen); - var n = Object.prototype.toString.call(o).slice(8, -1); - 'Object' === n && o.constructor && (n = o.constructor.name); - if ('Map' === n || 'Set' === n) return Array.from(o); - if ( - 'Arguments' === n || - /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) - ) - return FormField_arrayLikeToArray(o, minLen); - })(arr, i) || - (function FormField_nonIterableRest() { - throw new TypeError( - 'Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.' - ); - })() - ); - } - function FormField_arrayLikeToArray(arr, len) { - (null == len || len > arr.length) && (len = arr.length); - for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; - return arr2; - } - function FormField_objectWithoutProperties(source, excluded) { - if (null == source) return {}; - var key, - i, - target = (function FormField_objectWithoutPropertiesLoose( - source, - excluded - ) { - if (null == source) return {}; - var key, - i, - target = {}, - sourceKeys = Object.keys(source); - for (i = 0; i < sourceKeys.length; i++) - (key = sourceKeys[i]), - excluded.indexOf(key) >= 0 || (target[key] = source[key]); - return target; - })(source, excluded); - if (Object.getOwnPropertySymbols) { - var sourceSymbolKeys = Object.getOwnPropertySymbols(source); - for (i = 0; i < sourceSymbolKeys.length; i++) - (key = sourceSymbolKeys[i]), - excluded.indexOf(key) >= 0 || - (Object.prototype.propertyIsEnumerable.call(source, key) && - (target[key] = source[key])); - } - return target; - } - var FormField_logger = Object(src_debug.a)('informed:FormField\t'), - FormField_FormField = function FormField(_ref) { - var _fieldMap$componentTy, - condition, - name = _ref.name, - schema = _ref.schema, - rest = FormField_objectWithoutProperties(_ref, FormField_excluded), - _useFormController = useFormController(), - fieldMap = _useFormController.fieldMap, - getOptions = _useFormController.getOptions, - emitter = _useFormController.emitter, - fullName = useScope(name), - options = getOptions(), - _useState2 = FormField_slicedToArray(Object(react.useState)({}), 2), - condProp = _useState2[0], - setCondProp = _useState2[1], - lookupName = schema ? name : fullName, - lookupSchema = null != schema ? schema : options.schema, - path = getSchemaPathFromJsonPath(lookupName), - property = ObjectMap.get(lookupSchema, path); - if ( - !property && - (lookupSchema.allOf && - lookupSchema.allOf.forEach(function(item) { - item.if && - ((property = ObjectMap.get(item.then, path)), - (condition = item.if)); - }), - !property) - ) - return null; - var schemaField = Object(react.useMemo)( - function() { - return computeFieldFromProperty(name, property); - }, - [name] - ), - schemaProps = schemaField.props, - type = schemaField.type, - properties = schemaField.properties, - items = schemaField.items, - componentType = schemaField.componentType, - uiBefore = schemaField.uiBefore, - uiAfter = schemaField.uiAfter; - Object(react.useEffect)( - function() { - var updater = function updater(target, property) { - target === name && - (FormField_logger('Updating field props for', target), - setCondProp(computeFieldFromProperty(name, property))); - }, - remover = function remover(target) { - target === name && setCondProp({}); - }; - return ( - emitter.on('update-combine', updater), - emitter.on('update-remove', remover), - function() { - emitter.removeListener('update-combine', updater), - emitter.removeListener('update-remove', remover); - } - ); - }, - [name] - ); - var props = Object(react.useMemo)( - function() { - var condProps = condProp.props, - newProps = FormField_objectSpread( - FormField_objectSpread( - FormField_objectSpread({}, schemaProps), - condProps - ), - rest - ); - return ( - FormField_logger('New Props for '.concat(name), condProps), - newProps - ); - }, - [condProp] - ), - Component = - null !== (_fieldMap$componentTy = fieldMap[componentType]) && - void 0 !== _fieldMap$componentTy - ? _fieldMap$componentTy - : options.components - ? options.components[componentType] - : null; - if ( - (schemaProps.options && - fieldMap.withOptions && - !items && - (Component = fieldMap.withOptions[componentType] || Component), - FormField_logger('Rendering Field', name, schemaField), - !Component && 'object' === type && properties) - ) - return react_default.a.createElement( - Context.n.Provider, - { value: name }, - react_default.a.createElement(FormFields_FormFields, { - schema: schemaField - }) - ); - if (Component && 'object' === type && properties) - return react_default.a.createElement( - Context.n.Provider, - { value: name }, - react_default.a.createElement( - Component, - props, - react_default.a.createElement(FormFields_FormFields, { - schema: schemaField - }) - ) - ); - if (!Component && 'array' === type && items) - return react_default.a.createElement( - ArrayField, - FormField_extends( - { - name: name, - items: items, - uiBefore: uiBefore, - uiAfter: uiAfter - }, - props - ) - ); - if ( - Component && - 'array' === componentType && - items && - 'array' === type - ) - return react_default.a.createElement( - Component, - FormField_extends( - { - name: name, - items: items, - uiBefore: uiBefore, - uiAfter: uiAfter - }, - props - ) - ); - if (!Component) return null; - if (condition) { - var conditions = condition.properties, - when = function when(_ref2) { - var formApi = _ref2.formApi, - scope = _ref2.scope; - return Object.entries(conditions).every(function(_ref3) { - var _ref4 = FormField_slicedToArray(_ref3, 2), - propertyName = _ref4[0]; - return checkCondition( - _ref4[1], - formApi.getValue( - scope - ? ''.concat(scope, '.').concat(propertyName) - : propertyName - ) - ); - }); - }, - Comp = function Comp() { - return react_default.a.createElement( - Relevant_Relevant, - { when: when }, - react_default.a.createElement( - Component, - FormField_extends({ name: name }, props) - ) - ); - }; - return react_default.a.createElement(Comp, null); - } - return react_default.a.createElement( - Component, - FormField_extends({ name: name }, props) - ); - }; - function UpdateFields_slicedToArray(arr, i) { - return ( - (function UpdateFields_arrayWithHoles(arr) { - if (Array.isArray(arr)) return arr; - })(arr) || - (function UpdateFields_iterableToArrayLimit(arr, i) { - var _i = - null == arr - ? null - : ('undefined' != typeof Symbol && arr[Symbol.iterator]) || - arr['@@iterator']; - if (null == _i) return; - var _s, - _e, - _arr = [], - _n = !0, - _d = !1; - try { - for ( - _i = _i.call(arr); - !(_n = (_s = _i.next()).done) && - (_arr.push(_s.value), !i || _arr.length !== i); - _n = !0 - ); - } catch (err) { - (_d = !0), (_e = err); - } finally { - try { - _n || null == _i.return || _i.return(); - } finally { - if (_d) throw _e; - } - } - return _arr; - })(arr, i) || - (function UpdateFields_unsupportedIterableToArray(o, minLen) { - if (!o) return; - if ('string' == typeof o) - return UpdateFields_arrayLikeToArray(o, minLen); - var n = Object.prototype.toString.call(o).slice(8, -1); - 'Object' === n && o.constructor && (n = o.constructor.name); - if ('Map' === n || 'Set' === n) return Array.from(o); - if ( - 'Arguments' === n || - /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) - ) - return UpdateFields_arrayLikeToArray(o, minLen); - })(arr, i) || - (function UpdateFields_nonIterableRest() { - throw new TypeError( - 'Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.' - ); - })() - ); - } - function UpdateFields_arrayLikeToArray(arr, len) { - (null == len || len > arr.length) && (len = arr.length); - for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; - return arr2; - } - (FormField_FormField.__docgenInfo = { - description: '', - methods: [], - displayName: 'FormField' - }), - 'undefined' != typeof STORYBOOK_REACT_CLASSES && - (STORYBOOK_REACT_CLASSES['src/components/FormField.js'] = { - name: 'FormField', - docgenInfo: FormField_FormField.__docgenInfo, - path: 'src/components/FormField.js' - }); - var UpdateFields_logger = Object(src_debug.a)('informed:FormField\t'), - UpdateFields_UpdateFields = function UpdateFields(_ref) { - var schema = _ref.schema, - formController = useFormController(); - return ( - Object(react.useEffect)(function() { - return ( - Object.entries(schema).forEach(function(_ref2) { - var _ref3 = UpdateFields_slicedToArray(_ref2, 2), - key = _ref3[0], - value = _ref3[1]; - UpdateFields_logger('update-combine '.concat(key), value), - formController.emitter.emit('update-combine', key, value); - }), - function() { - Object.entries(schema).forEach(function(_ref4) { - var key = UpdateFields_slicedToArray(_ref4, 1)[0]; - UpdateFields_logger('update-remove '.concat(key)), - formController.emitter.emit('update-remove', key); - }); - } - ); - }, []), - null - ); - }; - function FormFields_slicedToArray(arr, i) { - return ( - (function FormFields_arrayWithHoles(arr) { - if (Array.isArray(arr)) return arr; - })(arr) || - (function FormFields_iterableToArrayLimit(arr, i) { - var _i = - null == arr - ? null - : ('undefined' != typeof Symbol && arr[Symbol.iterator]) || - arr['@@iterator']; - if (null == _i) return; - var _s, - _e, - _arr = [], - _n = !0, - _d = !1; - try { - for ( - _i = _i.call(arr); - !(_n = (_s = _i.next()).done) && - (_arr.push(_s.value), !i || _arr.length !== i); - _n = !0 - ); - } catch (err) { - (_d = !0), (_e = err); - } finally { - try { - _n || null == _i.return || _i.return(); - } finally { - if (_d) throw _e; - } - } - return _arr; - })(arr, i) || - (function FormFields_unsupportedIterableToArray(o, minLen) { - if (!o) return; - if ('string' == typeof o) - return FormFields_arrayLikeToArray(o, minLen); - var n = Object.prototype.toString.call(o).slice(8, -1); - 'Object' === n && o.constructor && (n = o.constructor.name); - if ('Map' === n || 'Set' === n) return Array.from(o); - if ( - 'Arguments' === n || - /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) - ) - return FormFields_arrayLikeToArray(o, minLen); - })(arr, i) || - (function FormFields_nonIterableRest() { - throw new TypeError( - 'Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.' - ); - })() - ); - } - function FormFields_arrayLikeToArray(arr, len) { - (null == len || len > arr.length) && (len = arr.length); - for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; - return arr2; - } - var FormFields_FormFields = function FormFields(_ref) { - var schema = _ref.schema, - onlyValidateSchema = _ref.onlyValidateSchema, - componentsMap = (0, useFormController().getOptions)().components; - return Object(react.useMemo)( - function() { - var _computeFieldsFromSch = computeFieldsFromSchema( - schema, - onlyValidateSchema - ), - properties = _computeFieldsFromSch.properties, - conditions = _computeFieldsFromSch.conditions, - components = _computeFieldsFromSch.components, - mappedProperties = properties.map(function(name, i) { - if (name.includes('ui:') && 3 !== name.split(':').length) - return { $id: name.split('ui:')[1] }; - var required = - !(!schema.required || !schema.required.includes(name)) || - void 0; - return { - Component: react_default.a.createElement( - FormField_FormField, - { - name: name, - schema: schema, - key: 'schema-field-'.concat(name, '-').concat(i), - required: required - } - ) - }; - }), - mappedComponents = components.map(function(component) { - if (component['ui:control']) { - var RenderedComponent = - componentsMap[component['ui:control']]; - return { - Component: react_default.a.createElement( - RenderedComponent, - null, - react_default.a.createElement(FormFields, { - schema: component - }) - ), - $id: component.$id - }; - } - }), - mappedConditionals = conditions.map(function(conditional, j) { - var subSchema = conditional.then, - $id = conditional.$id, - thenProps = conditional.thenProps, - conditions = conditional.if.properties; - return { - Component: react_default.a.createElement( - Relevant_Relevant, - { - key: 'Conditional-ScheamField-'.concat(j), - when: function when(_ref2) { - var formApi = _ref2.formApi, - scope = _ref2.scope; - return Object.entries(conditions).every(function( - _ref3 - ) { - var _ref4 = FormFields_slicedToArray(_ref3, 2), - propertyName = _ref4[0]; - return checkCondition( - _ref4[1], - formApi.getValue( - scope - ? ''.concat(scope, '.').concat(propertyName) - : propertyName - ) - ); - }); - } - }, - subSchema - ? react_default.a.createElement(FormFields, { - schema: subSchema - }) - : null, - thenProps - ? react_default.a.createElement( - UpdateFields_UpdateFields, - { schema: thenProps } - ) - : null - ), - $id: $id - }; - }), - mappedFields = []; - return ( - mappedProperties.forEach(function(_ref5) { - var $id = _ref5.$id, - Component = _ref5.Component; - if (Component) mappedFields.push(Component); - else { - if (!$id) - throw new Error( - 'Found property with no ID or component...' - ); - var conditional = mappedConditionals.find(function(c) { - return c.$id === $id; - }), - component = mappedComponents.find(function(c) { - return c.$id === $id; - }); - if (conditional) { - mappedFields.push(conditional.Component); - var index = mappedConditionals.findIndex(function(c) { - return c.$id === $id; - }); - mappedConditionals.splice(index, 1); - } else { - if (!component) - throw (console.log( - 'MappedConditionals', - mappedConditionals - ), - new Error('Unable to find mapping for '.concat($id))); - mappedFields.push(component.Component); - } - } - }), - mappedConditionals.forEach(function(_ref6) { - var Component = _ref6.Component; - mappedFields.push(Component); - }), - mappedFields - ); - }, - [schema] - ); - }, - ArrayField_excluded = ['name', 'items', 'uiBefore', 'uiAfter']; - function ArrayField_extends() { - return ( - (ArrayField_extends = - Object.assign || - function(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i]; - for (var key in source) - Object.prototype.hasOwnProperty.call(source, key) && - (target[key] = source[key]); - } - return target; - }), - ArrayField_extends.apply(this, arguments) - ); - } - function ArrayField_objectWithoutProperties(source, excluded) { - if (null == source) return {}; - var key, - i, - target = (function ArrayField_objectWithoutPropertiesLoose( - source, - excluded - ) { - if (null == source) return {}; - var key, - i, - target = {}, - sourceKeys = Object.keys(source); - for (i = 0; i < sourceKeys.length; i++) - (key = sourceKeys[i]), - excluded.indexOf(key) >= 0 || (target[key] = source[key]); - return target; - })(source, excluded); - if (Object.getOwnPropertySymbols) { - var sourceSymbolKeys = Object.getOwnPropertySymbols(source); - for (i = 0; i < sourceSymbolKeys.length; i++) - (key = sourceSymbolKeys[i]), - excluded.indexOf(key) >= 0 || - (Object.prototype.propertyIsEnumerable.call(source, key) && - (target[key] = source[key])); - } - return target; - } - var form_fields_ArrayField_ArrayField = function ArrayField(_ref) { - var name = _ref.name, - items = _ref.items, - uiBefore = _ref.uiBefore, - uiAfter = _ref.uiAfter, - props = ArrayField_objectWithoutProperties(_ref, ArrayField_excluded); - return react_default.a.createElement( - ArrayField_ArrayField, - ArrayField_extends({ name: name }, props), - react_default.a.createElement(FormComponents_FormComponents, { - components: uiBefore - }), - react_default.a.createElement( - ArrayField_ArrayField.Items, - null, - function() { - return react_default.a.createElement( - react_default.a.Fragment, - null, - react_default.a.createElement(FormFields_FormFields, { - schema: items - }) - ); - } - ), - react_default.a.createElement(FormComponents_FormComponents, { - components: uiAfter - }) - ); - }; - (form_fields_ArrayField_ArrayField.__docgenInfo = { - description: '', - methods: [], - displayName: 'ArrayField' - }), - 'undefined' != typeof STORYBOOK_REACT_CLASSES && - (STORYBOOK_REACT_CLASSES[ - 'src/components/form-fields/ArrayField.js' - ] = { - name: 'ArrayField', - docgenInfo: form_fields_ArrayField_ArrayField.__docgenInfo, - path: 'src/components/form-fields/ArrayField.js' - }); - var FieldMap = { - string: Input, - number: Input, - boolean: Checkbox_Checkbox, - select: Select_Select, - input: Input, - textarea: TextArea, - checkbox: Checkbox_Checkbox, - radio: RadioGroup_RadioGroup, - add: AddButton_AddButton, - remove: RemoveButton_RemoveButton, - array: form_fields_ArrayField_ArrayField, - withOptions: { string: Select_Select } - }; - function FormController_ownKeys(object, enumerableOnly) { - var keys = Object.keys(object); - if (Object.getOwnPropertySymbols) { - var symbols = Object.getOwnPropertySymbols(object); - enumerableOnly && - (symbols = symbols.filter(function(sym) { - return Object.getOwnPropertyDescriptor(object, sym).enumerable; - })), - keys.push.apply(keys, symbols); - } - return keys; - } - function FormController_objectSpread(target) { - for (var i = 1; i < arguments.length; i++) { - var source = null != arguments[i] ? arguments[i] : {}; - i % 2 - ? FormController_ownKeys(Object(source), !0).forEach(function(key) { - FormController_defineProperty(target, key, source[key]); - }) - : Object.getOwnPropertyDescriptors - ? Object.defineProperties( - target, - Object.getOwnPropertyDescriptors(source) - ) - : FormController_ownKeys(Object(source)).forEach(function(key) { - Object.defineProperty( - target, - key, - Object.getOwnPropertyDescriptor(source, key) - ); - }); - } - return target; - } - function FormController_defineProperty(obj, key, value) { - return ( - key in obj - ? Object.defineProperty(obj, key, { - value: value, - enumerable: !0, - configurable: !0, - writable: !0 - }) - : (obj[key] = value), - obj - ); - } - function FormController_defineProperties(target, props) { - for (var i = 0; i < props.length; i++) { - var descriptor = props[i]; - (descriptor.enumerable = descriptor.enumerable || !1), - (descriptor.configurable = !0), - 'value' in descriptor && (descriptor.writable = !0), - Object.defineProperty(target, descriptor.key, descriptor); - } - } - var FormController_debug = Object(src_debug.a)( - 'informed:FormController\t' - ), - FormController_initializeValue = function initializeValue(value, _ref) { - var formatter = _ref.formatter, - parser = _ref.parser, - initialize = _ref.initialize; - if (null != value) - return initialize && !parser - ? initialize(value) - : formatter && !parser - ? informedFormat(value, formatter).value - : value; - }, - FormController_initializeMask = function initializeMask(value, _ref2) { - var formatter = _ref2.formatter, - initialize = _ref2.initialize; - return initialize - ? initialize(value) - : formatter - ? informedFormat(value, formatter).value - : value; - }, - FormController_FormController = (function() { - function FormController(options) { - !(function FormController_classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) - throw new TypeError('Cannot call a class as a function'); - })(this, FormController), - (this.options = options), - (this.subscriptions = new Map()); - var _options$current = options.current, - ajv = _options$current.ajv, - schema = _options$current.schema, - fieldMap = _options$current.fieldMap, - adapter = _options$current.adapter; - (this.ajv = ajv ? new ajv({ allErrors: !0 }) : null), - (this.ajvValidate = ajv ? this.ajv.compile(schema) : null), - (this.fieldMap = adapter || fieldMap || FieldMap), - (this.emitter = this), - (this.fieldsMap = new Map()), - (this.validationRequests = new Map()), - (this.removalLocked = void 0), - (this.state = { - pristine: !0, - dirty: !1, - submitted: !1, - invalid: !1, - valid: !0, - submitting: !1, - validating: 0, - values: {}, - errors: {}, - touched: {}, - maskedValues: {}, - dirt: {}, - focused: {}, - initialValues: this.options.current.initialValues || {} - }), - (this.getValue = this.getValue.bind(this)), - (this.setValue = this.setValue.bind(this)), - (this.setValues = this.setValues.bind(this)), - (this.setTheseValues = this.setTheseValues.bind(this)), - (this.getMaskedValue = this.getMaskedValue.bind(this)), - (this.setMaskedValue = this.setMaskedValue.bind(this)), - (this.getTouched = this.getTouched.bind(this)), - (this.setTouched = this.setTouched.bind(this)), - (this.getFocused = this.getFocused.bind(this)), - (this.setFocused = this.setFocused.bind(this)), - (this.getError = this.getError.bind(this)), - (this.setError = this.setError.bind(this)), - (this.reset = this.reset.bind(this)), - (this.validate = this.validate.bind(this)), - (this.asyncValidate = this.asyncValidate.bind(this)), - (this.getDirty = this.getDirty.bind(this)), - (this.getPristine = this.getPristine.bind(this)), - (this.getFormState = this.getFormState.bind(this)), - (this.getFormApi = this.getFormApi.bind(this)), - (this.getFieldState = this.getFieldState.bind(this)), - (this.getValid = this.getValid.bind(this)), - (this.on = this.on.bind(this)), - (this.emit = this.emit.bind(this)), - (this.removeListener = this.removeListener.bind(this)), - (this.remove = this.remove.bind(this)), - (this.swap = this.swap.bind(this)), - (this.register = this.register.bind(this)), - (this.deregister = this.deregister.bind(this)), - (this.getInitialValue = this.getInitialValue.bind(this)), - (this.initialize = this.initialize.bind(this)), - (this.reformat = this.reformat.bind(this)), - (this.lockRemoval = this.lockRemoval.bind(this)), - (this.unlockRemoval = this.unlockRemoval.bind(this)), - (this.resetField = this.resetField.bind(this)), - (this.getRemovalLocked = this.getRemovalLocked.bind(this)), - (this.isRemovalLocked = this.isRemovalLocked.bind(this)), - (this.submitForm = this.submitForm.bind(this)), - (this.touchAllFields = this.touchAllFields.bind(this)), - (this.keyDown = this.keyDown.bind(this)), - (this.validateAsync = this.validateAsync.bind(this)), - (this.validated = this.validated.bind(this)), - (this.debouncedValidateAsync = debounceByName( - this.validateAsync - )), - (this.getOptions = this.getOptions.bind(this)), - (this.validateField = this.validateField.bind(this)), - (this.getErrorMessage = this.getErrorMessage.bind(this)), - (this.clearValue = this.clearValue.bind(this)); - } - return ( - (function FormController_createClass( - Constructor, - protoProps, - staticProps - ) { - return ( - protoProps && - FormController_defineProperties( - Constructor.prototype, - protoProps - ), - staticProps && - FormController_defineProperties(Constructor, staticProps), - Constructor - ); - })(FormController, [ - { - key: 'getOptions', - value: function getOptions() { - return this.options.current; - } - }, - { - key: 'getValue', - value: function getValue(name) { - return ObjectMap.get(this.state.values, name); - } - }, - { - key: 'getMaskedValue', - value: function getMaskedValue(name) { - return ObjectMap.get(this.state.maskedValues, name); - } - }, - { - key: 'setMaskedValue', - value: function setMaskedValue(name, value) { - return ObjectMap.set(this.state.maskedValues, name, value); - } - }, - { - key: 'setValues', - value: function setValues(values) { - this.fieldsMap.forEach(function(fieldMeta) { - var val = ObjectMap.get(values, fieldMeta.current.name); - fieldMeta.current.fieldApi.setValue(val); - }); - } - }, - { - key: 'setTheseValues', - value: function setTheseValues(values) { - this.fieldsMap.forEach(function(fieldMeta) { - var val = ObjectMap.get(values, fieldMeta.current.name); - null != val && fieldMeta.current.fieldApi.setValue(val); - }); - } - }, - { - key: 'setValue', - value: function setValue(name, value, e, key) { - var _this$fieldsMap$get; - FormController_debug('setValue '.concat(name), value); - var meta = - (null === - (_this$fieldsMap$get = this.fieldsMap.get(name)) || - void 0 === _this$fieldsMap$get - ? void 0 - : _this$fieldsMap$get.current) || {}; - try { - e && - e.target && - e.target.selectionStart && - meta.setCursor(e.target.selectionStart, key); - } catch (e) { - if (!(e instanceof TypeError)) throw e; - } - if ('' === value) - FormController_debug( - 'Setting '.concat(name, "'s value to undefiend") - ), - ObjectMap.set(this.state.values, name, void 0), - ObjectMap.set(this.state.maskedValues, name, void 0); - else if ( - 'number' === (null == meta ? void 0 : meta.type) && - void 0 !== value - ) - FormController_debug( - 'Setting '.concat(name, "'s value to ").concat(+value) - ), - ObjectMap.set(this.state.values, name, +value), - ObjectMap.set(this.state.maskedValues, name, +value); - else { - var val = value, - maskedVal = value; - if (meta.formatter) { - var res = informedFormat( - val, - meta.formatter, - this.getMaskedValue(name) - ); - meta.setCursorOffset(res.offset, key), - (val = maskedVal = res.value); - } - meta.parser && - (val = - null != val ? informedParse(val, meta.parser) : val), - FormController_debug( - 'Setting '.concat(name, "'s value to"), - val - ), - ObjectMap.set(this.state.values, name, val), - FormController_debug( - 'Setting '.concat(name, "'s maskedValue to"), - maskedVal - ), - ObjectMap.set(this.state.maskedValues, name, maskedVal); - } - if (meta.validate && meta.validateOn.includes('change')) { - var _val = ObjectMap.get(this.state.values, name); - FormController_debug( - 'Validating after change '.concat(name, ' ').concat(_val) - ), - ObjectMap.set( - this.state.errors, - name, - meta.validate(_val, this.state.values) - ); - } - if ( - meta.yupSchema && - meta.validateOn.includes('change') && - void 0 === this.getError(name) - ) { - var _val2 = ObjectMap.get(this.state.values, name); - FormController_debug( - 'Validating YUP after change ' - .concat(name, ' ') - .concat(_val2) - ), - ObjectMap.set( - this.state.errors, - name, - validateYupField(meta.yupSchema, _val2) - ); - } - if ( - (meta.asyncValidate && - 'change' === meta.validateOn && - void 0 === this.getError(name) && - this.debouncedValidateAsync(name), - (this.state.pristine = !1), - (this.state.dirty = !this.state.pristine), - ObjectMap.set(this.state.dirt, name, !0), - (this.state.valid = ObjectMap.empty(this.state.errors)), - (this.state.invalid = !this.state.valid), - meta.onChange) - ) { - var fieldState = this.getFieldState(name); - meta.onChange(fieldState, e); - } - this.emit('field', name), - this.emit('field-value', name), - this.emit('field-modified', name); - } - }, - { - key: 'validateField', - value: function validateField(name) { - var _this$fieldsMap$get2, - meta = - null === - (_this$fieldsMap$get2 = this.fieldsMap.get(name)) || - void 0 === _this$fieldsMap$get2 - ? void 0 - : _this$fieldsMap$get2.current; - if (meta.validate) { - var val = ObjectMap.get(this.state.values, name); - FormController_debug( - 'Validating field ' - .concat(name, ' via validateField with value ') - .concat(val) - ), - ObjectMap.set( - this.state.errors, - name, - meta.validate(val, this.state.values) - ); - } - if (meta.yupSchema && void 0 === this.getError(name)) { - var _val3 = ObjectMap.get(this.state.values, name); - FormController_debug( - 'Validating YUP field via validateField ' - .concat(name, ' ') - .concat(_val3) - ), - ObjectMap.set( - this.state.errors, - name, - validateYupField(meta.yupSchema, _val3) - ); - } - (this.state.valid = ObjectMap.empty(this.state.errors)), - (this.state.invalid = !this.state.valid), - this.emit('field', name); - } - }, - { - key: 'getFocused', - value: function getFocused(name) { - return ObjectMap.get(this.state.focused, name); - } - }, - { - key: 'setFocused', - value: function setFocused(name, value, e) { - var _this$fieldsMap$get3; - FormController_debug( - 'Setting '.concat(name, "'s focused to ").concat(value) - ); - var meta = - (null === - (_this$fieldsMap$get3 = this.fieldsMap.get(name)) || - void 0 === _this$fieldsMap$get3 - ? void 0 - : _this$fieldsMap$get3.current) || {}; - if ( - (ObjectMap.set(this.state.focused, name, value), - meta.onFocus) - ) { - var fieldState = this.getFieldState(name); - meta.onFocus(fieldState, e); - } - this.emit('field', name); - } - }, - { - key: 'getTouched', - value: function getTouched(name) { - return ObjectMap.get(this.state.touched, name); - } - }, - { - key: 'setTouched', - value: function setTouched(name, value, e) { - var _this$fieldsMap$get4; - FormController_debug( - 'Setting '.concat(name, "'s touched to ").concat(value) - ); - var meta = - (null === - (_this$fieldsMap$get4 = this.fieldsMap.get(name)) || - void 0 === _this$fieldsMap$get4 - ? void 0 - : _this$fieldsMap$get4.current) || {}; - if ( - (ObjectMap.set(this.state.touched, name, value), - meta.validate && - (meta.validateOn.includes('blur') || - meta.validateOn.includes('change'))) - ) { - var val = ObjectMap.get(this.state.values, name); - FormController_debug( - 'Validating after blur '.concat(name, ' ').concat(val) - ), - ObjectMap.set( - this.state.errors, - name, - meta.validate(val, this.state.values) - ); - } - if ( - (!meta.asyncValidate || - ('blur' !== meta.validateOn && - 'change-blur' !== meta.validateOn && - 'change' !== meta.validateOn) || - (void 0 === this.getError(name) && - this.validateAsync(name)), - (this.state.valid = ObjectMap.empty(this.state.errors)), - (this.state.invalid = !this.state.valid), - meta.onBlur) - ) { - var fieldState = this.getFieldState(name); - meta.onBlur(fieldState, e); - } - this.emit('field', name); - } - }, - { - key: 'getError', - value: function getError(name) { - return ObjectMap.get(this.state.errors, name); - } - }, - { - key: 'setError', - value: function setError(name, value) { - FormController_debug( - 'Setting '.concat(name, "'s error to ").concat(value) - ), - ObjectMap.set(this.state.errors, name, value), - this.emit('field', name); - } - }, - { - key: 'getInitialValue', - value: function getInitialValue(name) { - return ObjectMap.get(this.state.initialValues, name); - } - }, - { - key: 'getDirty', - value: function getDirty(name) { - return !!ObjectMap.get(this.state.dirt, name); - } - }, - { - key: 'getPristine', - value: function getPristine(name) { - return !this.getDirty(name); - } - }, - { - key: 'getValid', - value: function getValid(name) { - return void 0 === ObjectMap.get(this.state.errors, name); - } - }, - { - key: 'getFormState', - value: function getFormState() { - return this.state; - } - }, - { - key: 'clearValue', - value: function clearValue(name) { - this.setValue(name, void 0); - } - }, - { - key: 'getFormApi', - value: function getFormApi() { - return { - getValue: this.getValue, - setValue: this.setValue, - getMaskedValue: this.getMaskedValue, - setMaskedValue: this.setMaskedValue, - getTouched: this.getTouched, - setTouched: this.setTouched, - getError: this.getError, - setError: this.setError, - getFocused: this.getFocused, - setFocused: this.setFocused, - resetField: this.resetField, - reset: this.reset, - getFormState: this.getFormState, - getPristine: this.getPristine, - getDirty: this.getDirty, - validateField: this.validateField, - getFieldState: this.getFieldState, - getInitialValue: this.getInitialValue, - touchAllFields: this.touchAllFields, - validate: this.validate, - asyncValidate: this.asyncValidate, - setValues: this.setValues, - setTheseValues: this.setTheseValues, - submitForm: this.submitForm, - clearValue: this.clearValue - }; - } - }, - { - key: 'getFieldState', - value: function getFieldState(name) { - var _this$fieldsMap$get5, - meta = - (null === - (_this$fieldsMap$get5 = this.fieldsMap.get(name)) || - void 0 === _this$fieldsMap$get5 - ? void 0 - : _this$fieldsMap$get5.current) || {}, - error = this.getError(name), - focused = !!this.getFocused(name), - dirty = this.getDirty(name), - valid = this.getValid(name), - touched = !!this.getTouched(name), - pristine = !dirty, - validating = !!this.validationRequests.get(name), - showError = !1; - return ( - meta && meta.showErrorIfError - ? (showError = void 0 !== error) - : meta && meta.showErrorIfDirty - ? (showError = void 0 !== error && dirty) - : meta && - meta.showErrorIfTouched && - (showError = void 0 !== error && touched), - { - value: this.getValue(name), - maskedValue: this.getMaskedValue(name), - touched: touched, - error: this.getError(name), - pristine: pristine, - dirty: dirty, - valid: valid, - invalid: !valid, - showError: showError, - validating: validating, - focused: focused - } - ); - } - }, - { - key: 'remove', - value: function remove(name) { - FormController_debug('Remove', name), - this.removalLocked - ? FormController_debug( - 'Removal locked so NOT removing', - name - ) - : (FormController_debug('Delete Value', name), - ObjectMap.delete(this.state.values, name), - FormController_debug('Delete Masked', name), - ObjectMap.delete(this.state.maskedValues, name), - FormController_debug('Delete Touched', name), - ObjectMap.delete(this.state.touched, name), - FormController_debug('Delete Errors', name), - ObjectMap.delete(this.state.errors, name), - FormController_debug('Delete Dirt', name), - ObjectMap.delete(this.state.dirt, name), - FormController_debug('Delete Focused', name), - ObjectMap.delete(this.state.focused, name), - (this.state.valid = ObjectMap.empty(this.state.errors)), - (this.state.invalid = !this.state.valid), - this.emit('field', name), - this.emit('field-value', name), - this.emit('field-modified', name)); - } - }, - { - key: 'swap', - value: function swap(name, a, b) { - FormController_debug('Swap', name, a, b), - ObjectMap.swap(this.state.values, name, a, b), - ObjectMap.swap(this.state.maskedValues, name, a, b), - ObjectMap.swap(this.state.touched, name, a, b), - ObjectMap.swap(this.state.errors, name, a, b), - ObjectMap.swap(this.state.dirt, name, a, b), - ObjectMap.swap(this.state.focused, name, a, b), - (this.state.pristine = !1), - (this.state.dirty = !this.state.pristine); - } - }, - { - key: 'pullOut', - value: function pullOut(name) { - FormController_debug('Pull', name), - ObjectMap.delete(this.state.values, name), - ObjectMap.delete(this.state.maskedValues, name), - ObjectMap.delete(this.state.touched, name), - ObjectMap.delete(this.state.errors, name), - ObjectMap.delete(this.state.dirt, name), - ObjectMap.delete(this.state.focused, name), - (this.state.pristine = !1), - (this.state.dirty = !this.state.pristine); - } - }, - { - key: 'register', - value: function register(name, meta) { - FormController_debug('Register', name, meta), - this.fieldsMap.get(name) || - (this.fieldsMap.set(name, meta), - this.emit('field', name)); - } - }, - { - key: 'deregister', - value: function deregister(name) { - FormController_debug('De-Register', name), - this.fieldsMap.get(name) && - (this.fieldsMap.delete(name), this.emit('field', name)); - } - }, - { - key: 'initialize', - value: function initialize(name, meta) { - if ( - (FormController_debug('Initialize', name, this.state), - !this.getValue(name) && - null != meta.current.initialValue && - (!meta.current.initializeValueIfPristine || - this.state.pristine)) - ) { - var _meta$current = meta.current, - formatter = _meta$current.formatter, - parser = _meta$current.parser, - initialize = _meta$current.initialize, - initialValue = FormController_initializeValue( - meta.current.initialValue, - { - formatter: formatter, - parser: parser, - initialize: initialize - } - ), - initialMask = FormController_initializeMask( - meta.current.initialValue, - { formatter: formatter, initialize: initialize } - ); - FormController_debug( - 'Initializing ' - .concat(name, "'s value to ") - .concat(initialValue) - ), - ObjectMap.set(this.state.values, name, initialValue), - FormController_debug( - 'Initializing ' - .concat(name, "'s maskedValue to ") - .concat(initialMask) - ), - ObjectMap.set(this.state.maskedValues, name, initialMask); - } - if (meta.current.validate && meta.current.validateOnMount) { - var val = ObjectMap.get(this.state.values, name); - FormController_debug( - 'Validating on mount '.concat(name, ' ').concat(val), - this.state - ), - ObjectMap.set( - this.state.errors, - name, - meta.current.validate(val, this.state.values) - ); - } - meta.current.asyncValidate && - !0 === meta.current.validateOnMount && - void 0 === this.getError(name) && - this.validateAsync(name), - (this.state.valid = ObjectMap.empty(this.state.errors)), - (this.state.invalid = !this.state.valid), - this.emit('field', name), - this.emit('field-value', name); - } - }, - { - key: 'validated', - value: function validated(name, res) { - if ( - (FormController_debug( - 'Setting ' - .concat(name, "'s error to ") - .concat(res, ' with ') - .concat(this.state.validating, ' validations left') - ), - ObjectMap.set(this.state.errors, name, res), - (this.state.valid = ObjectMap.empty(this.state.errors)), - (this.state.invalid = !this.state.valid), - this.validationRequests.delete(name), - this.state.validating > 0) - ) - return ( - FormController_debug( - 'Still validating '.concat( - this.state.validating, - ' others so just update state.' - ) - ), - void this.emit('field', name) - ); - this.state.submitting && - (this.valid() - ? (FormController_debug('Submit', this.state), - this.emit('field', name), - this.emit('submit')) - : (FormController_debug('Submit', this.state), - this.emit('field', name), - this.emit('failure')), - (this.state.submitting = !1)), - this.done && - (this.valid() && this.done(), (this.done = void 0)), - this.emit('field', name); - } - }, - { - key: 'validateAsync', - value: function validateAsync(name) { - var _this$fieldsMap$get6, - _this = this; - FormController_debug('VALIDATING ASYNC', name); - var meta = - null === - (_this$fieldsMap$get6 = this.fieldsMap.get(name)) || - void 0 === _this$fieldsMap$get6 - ? void 0 - : _this$fieldsMap$get6.current, - value = this.getValue(name); - if (meta && meta.asyncValidate) { - this.state.validating = this.state.validating + 1; - var uuid = uuidv4(); - FormController_debug('REQUEST', uuid), - this.validationRequests.set(name, { - uuid: uuid, - value: value - }), - this.emit('field', name), - meta - .asyncValidate(value, this.state.values) - .then(function(res) { - _this.state.validating = _this.state.validating - 1; - var stale = - _this.validationRequests.get(name).uuid !== uuid, - invalid = - _this.validationRequests.get(name).value !== - _this.getValue(name); - stale || invalid - ? FormController_debug( - ''.concat(stale ? 'STALE' : 'INVALID', ' THEN'), - uuid, - value, - _this.getValue(name) - ) - : (FormController_debug('FINISH', uuid), - _this.validated(name, res)); - }) - .catch(function(err) { - _this.state.validating = _this.state.validating - 1; - var stale = - _this.validationRequests.get(name).uuid !== uuid, - invalid = - _this.validationRequests.get(name).value !== - _this.getValue(name); - stale || invalid - ? FormController_debug( - ''.concat(stale ? 'STALE' : 'INVALID', ' THEN'), - uuid, - value, - _this.getValue(name) - ) - : (FormController_debug('FINISH', uuid), - _this.validated(name, err.message)); - }); - } - } - }, - { - key: 'reset', - value: function reset() { - (this.state = { - pristine: !0, - dirty: !1, - submitted: !1, - invalid: !1, - valid: !0, - submitting: !1, - validating: 0, - values: {}, - errors: {}, - touched: {}, - maskedValues: {}, - dirt: {}, - focused: {}, - initialValues: this.options.current.initialValues || {} - }), - this.fieldsMap.forEach(function(fieldMeta) { - fieldMeta.current.fieldApi.reset(); - }), - this.emit('reset'); - } - }, - { - key: 'resetField', - value: function resetField(name) { - var _this$fieldsMap$get7, - options = - arguments.length > 1 && void 0 !== arguments[1] - ? arguments[1] - : {}; - FormController_debug('Resetting', name); - var meta = - (null === - (_this$fieldsMap$get7 = this.fieldsMap.get(name)) || - void 0 === _this$fieldsMap$get7 - ? void 0 - : _this$fieldsMap$get7.current) || {}, - formatter = meta.formatter, - parser = meta.parser, - initialize = meta.initialize, - value = options.value, - _options$resetError = options.resetError, - resetError = - void 0 === _options$resetError || _options$resetError, - _options$resetTouched = options.resetTouched, - resetTouched = - void 0 === _options$resetTouched || _options$resetTouched, - _options$resetDirt = options.resetDirt, - resetDirt = - void 0 === _options$resetDirt || _options$resetDirt; - if (value) { - var initializedValue = FormController_initializeValue( - value, - { - formatter: formatter, - parser: parser, - initialize: initialize - } - ); - FormController_debug( - 'Resetting ' - .concat(name, "'s value to ") - .concat(initializedValue) - ), - ObjectMap.set(this.state.values, name, initializedValue); - var maskedValue = FormController_initializeMask(value, { - formatter: formatter, - parser: parser - }); - FormController_debug( - 'Resetting ' - .concat(name, "'s maskedValue to ") - .concat(maskedValue) - ), - ObjectMap.set(this.state.maskedValues, name, maskedValue); - } else { - var initialValue = FormController_initializeValue( - meta.getInitialValue && meta.getInitialValue(), - { - formatter: formatter, - parser: parser, - initialize: initialize - } - ), - initialMask = FormController_initializeMask( - meta.getInitialValue && meta.getInitialValue(), - { formatter: formatter, initialize: initialize } - ); - FormController_debug( - 'Resetting ' - .concat(name, "'s value to ") - .concat(initialValue) - ), - ObjectMap.set(this.state.values, name, initialValue), - FormController_debug( - 'Resetting ' - .concat(name, "'s maskedValue to ") - .concat(initialMask) - ), - ObjectMap.set(this.state.maskedValues, name, initialMask); - } - resetError && - (FormController_debug( - 'Resetting '.concat(name, "'s error") - ), - ObjectMap.delete(this.state.errors, name)), - resetTouched && - (FormController_debug( - 'Resetting '.concat(name, "'s touched") - ), - ObjectMap.delete(this.state.touched, name)), - resetDirt && - (FormController_debug( - 'Resetting '.concat(name, "'s dirt") - ), - ObjectMap.delete(this.state.dirt, name)), - (this.state.valid = ObjectMap.empty(this.state.errors)), - (this.state.invalid = !this.state.valid), - this.emit('field', name), - this.emit('field-value', name), - this.emit('field-modified', name); - } - }, - { - key: 'reformat', - value: function reformat(name) { - var _this$fieldsMap$get8; - FormController_debug('Reformatting', name); - var meta = - null === - (_this$fieldsMap$get8 = this.fieldsMap.get(name)) || - void 0 === _this$fieldsMap$get8 - ? void 0 - : _this$fieldsMap$get8.current, - currentValue = ObjectMap.get(this.state.values, name), - formatter = meta.formatter, - parser = meta.parser, - initialize = meta.initialize, - newValue = FormController_initializeValue(currentValue, { - formatter: formatter, - parser: parser, - initialize: initialize - }), - newMaskedValue = FormController_initializeMask( - currentValue, - { formatter: formatter } - ); - FormController_debug( - 'Reformatting ' - .concat(name, "'s value to ") - .concat(newValue) - ), - ObjectMap.set(this.state.values, name, newValue), - FormController_debug( - 'Reformatting ' - .concat(name, "'s maskedValue to ") - .concat(newMaskedValue) - ), - ObjectMap.set( - this.state.maskedValues, - name, - newMaskedValue - ), - this.emit('field', name), - this.emit('field-value', name), - this.emit('field-modified', name); - } - }, - { - key: 'lockRemoval', - value: function lockRemoval(i) { - FormController_debug('LOCKREMOVAL', i), - (this.removalLocked = i); - } - }, - { - key: 'unlockRemoval', - value: function unlockRemoval() { - FormController_debug('UNLOCK REMOVAL'), - (this.removalLocked = void 0); - } - }, - { - key: 'getRemovalLocked', - value: function getRemovalLocked() { - return this.removalLocked; - } - }, - { - key: 'isRemovalLocked', - value: function isRemovalLocked() { - return null != this.removalLocked; - } - }, - { - key: 'valid', - value: function valid() { - var errors = this.state.errors; - return !!ObjectMap.empty(errors); - } - }, - { - key: 'keyDown', - value: function keyDown(e) { - if (13 == e.keyCode && this.options.current.preventEnter) - return e.preventDefault(e), !1; - } - }, - { - key: 'validate', - value: function validate() { - var _this2 = this; - FormController_debug('Validating all fields'); - var values = this.state.values, - errors = {}; - if (this.options.current.yupSchema) { - var yupErrors = validateYupSchema( - this.options.current.yupSchema, - values - ); - errors = FormController_objectSpread( - FormController_objectSpread({}, errors), - yupErrors - ); - } - if (this.options.current.schema && this.options.current.ajv) { - var ajvErrors = utils_validateAjvSchema( - this.ajvValidate, - values - ); - errors = FormController_objectSpread( - FormController_objectSpread({}, errors), - ajvErrors - ); - } - if (this.options.current.validateFields) { - var fieldErrors = this.options.current.validateFields( - values - ); - (errors = FormController_objectSpread( - FormController_objectSpread({}, errors), - fieldErrors - )), - (errors = ObjectMap.purge(errors)); - } - this.fieldsMap.forEach(function(fieldMeta) { - var meta = fieldMeta.current, - value = _this2.getValue(meta.name), - error = meta.validate - ? meta.validate(value, values) - : void 0; - null != error && ObjectMap.set(errors, meta.name, error); - }), - (this.state.errors = errors), - (this.state.valid = ObjectMap.empty(this.state.errors)), - (this.state.invalid = !this.state.valid), - this.emit('field', '_ALL_'); - } - }, - { - key: 'asyncValidate', - value: function asyncValidate(done) { - var _this3 = this; - FormController_debug('Async Validating all fields'), - (this.done = done), - this.fieldsMap.forEach(function(meta) { - var name = meta.current.name; - void 0 === _this3.getError(name) && - _this3.validateAsync(name); - }); - } - }, - { - key: 'getErrorMessage', - value: function getErrorMessage(key, n) { - var _this$fieldsMap$get9; - FormController_debug( - 'Getting ' - .concat(key, ' error message for ') - .concat(n, ' Validating all fields') - ); - var name = n; - if (this.options.current.schema) { - for ( - FormController_debug( - 'We have schema so looking in there for error message' - ); - '' !== name; - - ) { - FormController_debug( - 'Looking for message at '.concat(name) - ); - var path = getSchemaPathFromJsonPath(name), - _property = ObjectMap.get( - this.options.current.schema, - path - ); - if (_property.errorMessage) { - var message = - 'string' == typeof _property.errorMessage - ? _property.errorMessage - : _property.errorMessage[key]; - if (message) return message; - } - FormController_debug( - 'Did not find message in schema for '.concat(path), - _property - ), - (name = name.substring(0, name.lastIndexOf('.'))); - } - var property = this.options.current.schema; - if (property.errorMessage) { - var _message = - 'string' == typeof property.errorMessage - ? property.errorMessage - : property.errorMessage[key]; - if (_message) return _message; - } - } - var meta = - null === - (_this$fieldsMap$get9 = this.fieldsMap.get(name)) || - void 0 === _this$fieldsMap$get9 - ? void 0 - : _this$fieldsMap$get9.current; - if (meta && meta.errorMessage) { - var _message2 = - 'string' == typeof meta.errorMessage - ? meta.errorMessage - : meta.errorMessage[key]; - if (_message2) return _message2; - } - if (this.options.current.errorMessage) { - var _message3 = - 'string' == typeof this.options.current.errorMessage - ? this.options.current.errorMessage - : this.options.current.errorMessage[key]; - if (_message3) return _message3; - } - } - }, - { - key: 'touchAllFields', - value: function touchAllFields() { - var _this4 = this; - this.fieldsMap.forEach(function(meta) { - FormController_debug( - 'Submit - setting '.concat( - meta.current.name, - "'s touched to true" - ) - ), - ObjectMap.set( - _this4.state.touched, - meta.current.name, - !0 - ); - }); - } - }, - { - key: 'submitForm', - value: function submitForm(e) { - var _this5 = this; - (this.state.submitting = !0), - !this.options.current.dontPreventDefault && - e && - e.preventDefault(e), - this.validate(), - this.fieldsMap.forEach(function(meta) { - FormController_debug( - 'Submit - setting '.concat( - meta.current.name, - "'s touched to true" - ) - ), - ObjectMap.set( - _this5.state.touched, - meta.current.name, - !0 - ); - }), - this.emit('field', '_ALL_'), - this.asyncValidate(), - this.valid() && 0 === this.state.validating - ? (FormController_debug('Submit', this.state), - (this.state.submitted = !0), - this.emit('submit')) - : (FormController_debug('Fail', this.state), - this.emit('failure')), - 0 === this.state.validating && (this.state.submitting = !1), - this.emit('field'); - } - }, - { - key: 'emit', - value: function emit(event) { - for ( - var _len = arguments.length, - args = new Array(_len > 1 ? _len - 1 : 0), - _key = 1; - _key < _len; - _key++ - ) - args[_key - 1] = arguments[_key]; - var listeners = this.subscriptions.get(event); - listeners && - listeners.forEach(function(listener) { - return listener.apply(void 0, args); - }); - } - }, - { - key: 'on', - value: function on(event, listener) { - this.subscriptions.get(event) || - this.subscriptions.set(event, new Set()), - this.subscriptions.get(event).add(listener); - } - }, - { - key: 'removeListener', - value: function removeListener(event, listener) { - this.subscriptions.get(event).delete(listener); - } - } - ]), - FormController - ); - })(); - function useInformed() { - return Object(react.useContext)(Context.h); - } - var useForm_excluded = [ - 'onSubmit', - 'onReset', - 'onChange', - 'onSubmitFailure', - 'onValueChange', - 'onValueModified', - 'initialValues', - 'validateFields', - 'autocomplete', - 'showErrorIfError', - 'showErrorIfTouched', - 'showErrorIfDirty', - 'validateOn', - 'validateOnMount', - 'formApiRef', - 'dontPreventDefault', - 'yupSchema', - 'allowEmptyStrings', - 'preventEnter', - 'schema', - 'ajv', - 'ajvErrors', - 'components', - 'errorMessage', - 'fieldMap', - 'adapter', - 'name', - 'keepState', - 'keepStateIfRelevant' - ]; - function useForm_ownKeys(object, enumerableOnly) { - var keys = Object.keys(object); - if (Object.getOwnPropertySymbols) { - var symbols = Object.getOwnPropertySymbols(object); - enumerableOnly && - (symbols = symbols.filter(function(sym) { - return Object.getOwnPropertyDescriptor(object, sym).enumerable; - })), - keys.push.apply(keys, symbols); - } - return keys; - } - function useForm_objectSpread(target) { - for (var i = 1; i < arguments.length; i++) { - var source = null != arguments[i] ? arguments[i] : {}; - i % 2 - ? useForm_ownKeys(Object(source), !0).forEach(function(key) { - useForm_defineProperty(target, key, source[key]); - }) - : Object.getOwnPropertyDescriptors - ? Object.defineProperties( - target, - Object.getOwnPropertyDescriptors(source) - ) - : useForm_ownKeys(Object(source)).forEach(function(key) { - Object.defineProperty( - target, - key, - Object.getOwnPropertyDescriptor(source, key) - ); - }); - } - return target; - } - function useForm_defineProperty(obj, key, value) { - return ( - key in obj - ? Object.defineProperty(obj, key, { - value: value, - enumerable: !0, - configurable: !0, - writable: !0 - }) - : (obj[key] = value), - obj - ); - } - function useForm_slicedToArray(arr, i) { - return ( - (function useForm_arrayWithHoles(arr) { - if (Array.isArray(arr)) return arr; - })(arr) || - (function useForm_iterableToArrayLimit(arr, i) { - var _i = - null == arr - ? null - : ('undefined' != typeof Symbol && arr[Symbol.iterator]) || - arr['@@iterator']; - if (null == _i) return; - var _s, - _e, - _arr = [], - _n = !0, - _d = !1; - try { - for ( - _i = _i.call(arr); - !(_n = (_s = _i.next()).done) && - (_arr.push(_s.value), !i || _arr.length !== i); - _n = !0 - ); - } catch (err) { - (_d = !0), (_e = err); - } finally { - try { - _n || null == _i.return || _i.return(); - } finally { - if (_d) throw _e; - } - } - return _arr; - })(arr, i) || - (function useForm_unsupportedIterableToArray(o, minLen) { - if (!o) return; - if ('string' == typeof o) - return useForm_arrayLikeToArray(o, minLen); - var n = Object.prototype.toString.call(o).slice(8, -1); - 'Object' === n && o.constructor && (n = o.constructor.name); - if ('Map' === n || 'Set' === n) return Array.from(o); - if ( - 'Arguments' === n || - /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) - ) - return useForm_arrayLikeToArray(o, minLen); - })(arr, i) || - (function useForm_nonIterableRest() { - throw new TypeError( - 'Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.' - ); - })() - ); - } - function useForm_arrayLikeToArray(arr, len) { - (null == len || len > arr.length) && (len = arr.length); - for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; - return arr2; - } - function useForm_objectWithoutProperties(source, excluded) { - if (null == source) return {}; - var key, - i, - target = (function useForm_objectWithoutPropertiesLoose( - source, - excluded - ) { - if (null == source) return {}; - var key, - i, - target = {}, - sourceKeys = Object.keys(source); - for (i = 0; i < sourceKeys.length; i++) - (key = sourceKeys[i]), - excluded.indexOf(key) >= 0 || (target[key] = source[key]); - return target; - })(source, excluded); - if (Object.getOwnPropertySymbols) { - var sourceSymbolKeys = Object.getOwnPropertySymbols(source); - for (i = 0; i < sourceSymbolKeys.length; i++) - (key = sourceSymbolKeys[i]), - excluded.indexOf(key) >= 0 || - (Object.prototype.propertyIsEnumerable.call(source, key) && - (target[key] = source[key])); - } - return target; - } - var useForm_logger = Object(src_debug.a)('informed:useForm\t'), - useForm_useForm = function useForm(_ref) { - var onSubmit = _ref.onSubmit, - onReset = _ref.onReset, - onChange = _ref.onChange, - onSubmitFailure = _ref.onSubmitFailure, - onValueChange = _ref.onValueChange, - onValueModified = _ref.onValueModified, - userInitialValues = _ref.initialValues, - validateFields = _ref.validateFields, - autocomplete = _ref.autocomplete, - showErrorIfError = _ref.showErrorIfError, - showErrorIfTouched = _ref.showErrorIfTouched, - showErrorIfDirty = _ref.showErrorIfDirty, - validateOn = _ref.validateOn, - validateOnMount = _ref.validateOnMount, - formApiRef = _ref.formApiRef, - dontPreventDefault = _ref.dontPreventDefault, - yupSchema = _ref.yupSchema, - allowEmptyStrings = _ref.allowEmptyStrings, - preventEnter = _ref.preventEnter, - schema = _ref.schema, - ajv = _ref.ajv, - ajvErrors = _ref.ajvErrors, - components = _ref.components, - errorMessage = _ref.errorMessage, - fieldMap = _ref.fieldMap, - adapter = _ref.adapter, - name = _ref.name, - keepState = _ref.keepState, - keepStateIfRelevant = _ref.keepStateIfRelevant, - userProps = useForm_objectWithoutProperties(_ref, useForm_excluded), - informed = useInformed(), - initialValues = Object(react.useMemo)( - function() { - var _informed$getSavedVal; - return informed && name - ? (useForm_logger( - 'Checking for saved values', - informed.getSavedValues(name) - ), - null !== - (_informed$getSavedVal = informed.getSavedValues(name)) && - void 0 !== _informed$getSavedVal - ? _informed$getSavedVal - : userInitialValues) - : userInitialValues; - }, - [userInitialValues] - ), - formControllerOptions = { - initialValues: initialValues, - validateFields: validateFields, - autocomplete: autocomplete, - showErrorIfError: showErrorIfError, - showErrorIfTouched: - null == showErrorIfTouched || showErrorIfTouched, - showErrorIfDirty: showErrorIfDirty, - validateOn: validateOn, - validateOnMount: validateOnMount, - dontPreventDefault: dontPreventDefault, - yupSchema: yupSchema, - allowEmptyStrings: allowEmptyStrings, - preventEnter: preventEnter, - schema: schema, - ajv: ajv, - ajvErrors: ajvErrors, - components: components, - errorMessage: errorMessage, - fieldMap: fieldMap, - adapter: adapter, - keepState: keepState, - keepStateIfRelevant: keepStateIfRelevant - }, - optionsRef = Object(react.useRef)(); - optionsRef.current = formControllerOptions; - var formController = useForm_slicedToArray( - Object(react.useState)(function() { - return new FormController_FormController(optionsRef); - }), - 1 - )[0]; - Object(react.useEffect)( - function() { - var onChangeHandler = function onChangeHandler() { - return onChange && onChange(formController.getFormState()); - }, - onResetHandler = function onResetHandler() { - return onReset && onReset(formController.getFormState()); - }, - onSubmitHandler = function onSubmitHandler() { - return onSubmit && onSubmit(formController.getFormState()); - }, - onFailureHandler = function onFailureHandler() { - return ( - onSubmitFailure && - onSubmitFailure(formController.getFormState()) - ); - }, - onValueChangeHandler = function onValueChangeHandler() { - return ( - onValueChange && - onValueChange(formController.getFormState()) - ); - }, - onValueModifiedHandler = function onValueModifiedHandler() { - return ( - onValueModified && - onValueModified(formController.getFormState()) - ); - }; - return ( - formController.on('field', onChangeHandler), - formController.on('reset', onResetHandler), - formController.on('submit', onSubmitHandler), - formController.on('failure', onFailureHandler), - formController.on('field-value', onValueChangeHandler), - formController.on('field-modified', onValueModifiedHandler), - function() { - formController.removeListener('field', onChangeHandler), - formController.removeListener('reset', onResetHandler), - formController.removeListener('submit', onSubmitHandler), - formController.removeListener('failure', onFailureHandler), - formController.removeListener( - 'field-value', - onValueChangeHandler - ), - formController.removeListener( - 'field-modified', - onValueModifiedHandler - ); - } - ); - }, - [ - onChange, - onReset, - onSubmit, - onSubmitFailure, - onValueChange, - onValueModified - ] - ); - var _useState4 = useForm_slicedToArray( - Object(react.useState)(function() { - return formController.getFormState(); - }), - 2 - ), - formState = _useState4[0], - setFormState = _useState4[1]; - Object(react.useEffect)(function() { - var listener = function listener(target) { - setFormState( - useForm_objectSpread({}, formController.getFormState()) - ), - informed && informed.inform(name, target); - }; - return ( - formController.emitter.on('field', listener), - setFormState( - useForm_objectSpread({}, formController.getFormState()) - ), - name && informed && informed.register(name, formController), - function() { - formController.emitter.removeListener('field', listener), - name && - informed && - informed.setSavedValues( - name, - formController.getFormState().values - ); - } - ); - }, []); - var formApi = Object(react.useMemo)(function() { - return ( - formApiRef && (formApiRef.current = formController.getFormApi()), - formController.getFormApi() - ); - }, []); - useUpdateEffect_useUpdateEffect( - function() { - formApi.getFormState().pristine && formApi.reset(); - }, - [initialValues] - ), - Object(react.useEffect)(function() { - return ( - useForm_logger('Mount'), - function() { - formController.lockRemoval(!0), useForm_logger('Un-Mount'); - } - ); - }, []); - return { - formApi: formApi, - formState: formState, - formController: formController, - render: function render(children) { - return react_default.a.createElement( - Context.f.Provider, - { value: formController }, - react_default.a.createElement( - Context.e.Provider, - { value: formApi }, - react_default.a.createElement( - Context.g.Provider, - { value: formState }, - children - ) - ) - ); - }, - userProps: userProps - }; - }, - Form_excluded = ['children']; - function Form_extends() { - return ( - (Form_extends = - Object.assign || - function(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i]; - for (var key in source) - Object.prototype.hasOwnProperty.call(source, key) && - (target[key] = source[key]); - } - return target; - }), - Form_extends.apply(this, arguments) - ); - } - function Form_objectWithoutProperties(source, excluded) { - if (null == source) return {}; - var key, - i, - target = (function Form_objectWithoutPropertiesLoose( - source, - excluded - ) { - if (null == source) return {}; - var key, - i, - target = {}, - sourceKeys = Object.keys(source); - for (i = 0; i < sourceKeys.length; i++) - (key = sourceKeys[i]), - excluded.indexOf(key) >= 0 || (target[key] = source[key]); - return target; - })(source, excluded); - if (Object.getOwnPropertySymbols) { - var sourceSymbolKeys = Object.getOwnPropertySymbols(source); - for (i = 0; i < sourceSymbolKeys.length; i++) - (key = sourceSymbolKeys[i]), - excluded.indexOf(key) >= 0 || - (Object.prototype.propertyIsEnumerable.call(source, key) && - (target[key] = source[key])); - } - return target; - } - var Form_debug = Object(src_debug.a)('informed:Form\t\t'), - Form_Form = function Form(_ref) { - var children = _ref.children, - rest = Form_objectWithoutProperties(_ref, Form_excluded); - Form_debug('Render FORM'); - var _useForm = useForm_useForm(rest), - formApi = _useForm.formApi, - formController = _useForm.formController, - formState = _useForm.formState, - render = _useForm.render, - userProps = _useForm.userProps; - return render( - react_default.a.createElement( - 'form', - Form_extends({}, userProps, { - noValidate: !0, - onReset: formController.reset, - onSubmit: formController.submitForm, - onKeyDown: formController.keyDown - }), - (function getContent() { - return 'function' == typeof children - ? children({ formState: formState, formApi: formApi }) - : children; - })() - ) - ); - }, - FormProvider_excluded = ['children']; - function FormProvider_objectWithoutProperties(source, excluded) { - if (null == source) return {}; - var key, - i, - target = (function FormProvider_objectWithoutPropertiesLoose( - source, - excluded - ) { - if (null == source) return {}; - var key, - i, - target = {}, - sourceKeys = Object.keys(source); - for (i = 0; i < sourceKeys.length; i++) - (key = sourceKeys[i]), - excluded.indexOf(key) >= 0 || (target[key] = source[key]); - return target; - })(source, excluded); - if (Object.getOwnPropertySymbols) { - var sourceSymbolKeys = Object.getOwnPropertySymbols(source); - for (i = 0; i < sourceSymbolKeys.length; i++) - (key = sourceSymbolKeys[i]), - excluded.indexOf(key) >= 0 || - (Object.prototype.propertyIsEnumerable.call(source, key) && - (target[key] = source[key])); - } - return target; - } - var FormProvider_debug = Object(src_debug.a)('informed:Form\t\t'), - FormProvider_FormProvider = function FormProvider(_ref) { - var children = _ref.children, - rest = FormProvider_objectWithoutProperties( - _ref, - FormProvider_excluded - ); - FormProvider_debug('Render Form Provider'); - var _useForm = useForm_useForm(rest), - formApi = _useForm.formApi, - formState = _useForm.formState; - return (0, _useForm.render)( - react_default.a.createElement( - react_default.a.Fragment, - null, - (function getContent() { - return 'function' == typeof children - ? children({ formState: formState, formApi: formApi }) - : children; - })() - ) - ); - }, - Option_excluded = ['value', 'forwardedRef', 'children']; - function Option_extends() { - return ( - (Option_extends = - Object.assign || - function(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i]; - for (var key in source) - Object.prototype.hasOwnProperty.call(source, key) && - (target[key] = source[key]); - } - return target; - }), - Option_extends.apply(this, arguments) - ); - } - function Option_objectWithoutProperties(source, excluded) { - if (null == source) return {}; - var key, - i, - target = (function Option_objectWithoutPropertiesLoose( - source, - excluded - ) { - if (null == source) return {}; - var key, - i, - target = {}, - sourceKeys = Object.keys(source); - for (i = 0; i < sourceKeys.length; i++) - (key = sourceKeys[i]), - excluded.indexOf(key) >= 0 || (target[key] = source[key]); - return target; - })(source, excluded); - if (Object.getOwnPropertySymbols) { - var sourceSymbolKeys = Object.getOwnPropertySymbols(source); - for (i = 0; i < sourceSymbolKeys.length; i++) - (key = sourceSymbolKeys[i]), - excluded.indexOf(key) >= 0 || - (Object.prototype.propertyIsEnumerable.call(source, key) && - (target[key] = source[key])); - } - return target; - } - var Option_Option = function Option(_ref) { - var value = _ref.value, - forwardedRef = _ref.forwardedRef, - children = _ref.children, - rest = Option_objectWithoutProperties(_ref, Option_excluded); - return react_default.a.createElement( - 'option', - Option_extends({ ref: forwardedRef, value: value, key: value }, rest), - children - ); - }; - (Option_Option.__docgenInfo = { - description: '', - methods: [], - displayName: 'Option' - }), - 'undefined' != typeof STORYBOOK_REACT_CLASSES && - (STORYBOOK_REACT_CLASSES['src/components/form-fields/Option.js'] = { - name: 'Option', - docgenInfo: Option_Option.__docgenInfo, - path: 'src/components/form-fields/Option.js' - }); - var SchemaFields_SchemaFields = function SchemaFields() { - var schema = (0, useFormController().getOptions)().schema; - return react_default.a.createElement(FormFields_FormFields, { - schema: schema - }); - }; - function useMultistep_ownKeys(object, enumerableOnly) { - var keys = Object.keys(object); - if (Object.getOwnPropertySymbols) { - var symbols = Object.getOwnPropertySymbols(object); - enumerableOnly && - (symbols = symbols.filter(function(sym) { - return Object.getOwnPropertyDescriptor(object, sym).enumerable; - })), - keys.push.apply(keys, symbols); - } - return keys; - } - function useMultistep_objectSpread(target) { - for (var i = 1; i < arguments.length; i++) { - var source = null != arguments[i] ? arguments[i] : {}; - i % 2 - ? useMultistep_ownKeys(Object(source), !0).forEach(function(key) { - useMultistep_defineProperty(target, key, source[key]); - }) - : Object.getOwnPropertyDescriptors - ? Object.defineProperties( - target, - Object.getOwnPropertyDescriptors(source) - ) - : useMultistep_ownKeys(Object(source)).forEach(function(key) { - Object.defineProperty( - target, - key, - Object.getOwnPropertyDescriptor(source, key) - ); - }); - } - return target; - } - function useMultistep_defineProperty(obj, key, value) { - return ( - key in obj - ? Object.defineProperty(obj, key, { - value: value, - enumerable: !0, - configurable: !0, - writable: !0 - }) - : (obj[key] = value), - obj - ); - } - function useMultistep_slicedToArray(arr, i) { - return ( - (function useMultistep_arrayWithHoles(arr) { - if (Array.isArray(arr)) return arr; - })(arr) || - (function useMultistep_iterableToArrayLimit(arr, i) { - var _i = - null == arr - ? null - : ('undefined' != typeof Symbol && arr[Symbol.iterator]) || - arr['@@iterator']; - if (null == _i) return; - var _s, - _e, - _arr = [], - _n = !0, - _d = !1; - try { - for ( - _i = _i.call(arr); - !(_n = (_s = _i.next()).done) && - (_arr.push(_s.value), !i || _arr.length !== i); - _n = !0 - ); - } catch (err) { - (_d = !0), (_e = err); - } finally { - try { - _n || null == _i.return || _i.return(); - } finally { - if (_d) throw _e; - } - } - return _arr; - })(arr, i) || - (function useMultistep_unsupportedIterableToArray(o, minLen) { - if (!o) return; - if ('string' == typeof o) - return useMultistep_arrayLikeToArray(o, minLen); - var n = Object.prototype.toString.call(o).slice(8, -1); - 'Object' === n && o.constructor && (n = o.constructor.name); - if ('Map' === n || 'Set' === n) return Array.from(o); - if ( - 'Arguments' === n || - /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) - ) - return useMultistep_arrayLikeToArray(o, minLen); - })(arr, i) || - (function useMultistep_nonIterableRest() { - throw new TypeError( - 'Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.' - ); - })() - ); - } - function useMultistep_arrayLikeToArray(arr, len) { - (null == len || len > arr.length) && (len = arr.length); - for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; - return arr2; - } - (SchemaFields_SchemaFields.__docgenInfo = { - description: '', - methods: [], - displayName: 'SchemaFields' - }), - 'undefined' != typeof STORYBOOK_REACT_CLASSES && - (STORYBOOK_REACT_CLASSES['src/components/SchemaFields.js'] = { - name: 'SchemaFields', - docgenInfo: SchemaFields_SchemaFields.__docgenInfo, - path: 'src/components/SchemaFields.js' - }); - function useMultistepState() { - return Object(react.useContext)(Context.j); - } - function useMultistepApi() { - return Object(react.useContext)(Context.i); - } - var useMultistepStep_logger = Object(src_debug.a)( - 'informed:useMultistepStep\t' - ), - Multistep_excluded = ['children'], - Multistep_excluded2 = ['render'], - _excluded3 = ['children']; - function Multistep_objectWithoutProperties(source, excluded) { - if (null == source) return {}; - var key, - i, - target = (function Multistep_objectWithoutPropertiesLoose( - source, - excluded - ) { - if (null == source) return {}; - var key, - i, - target = {}, - sourceKeys = Object.keys(source); - for (i = 0; i < sourceKeys.length; i++) - (key = sourceKeys[i]), - excluded.indexOf(key) >= 0 || (target[key] = source[key]); - return target; - })(source, excluded); - if (Object.getOwnPropertySymbols) { - var sourceSymbolKeys = Object.getOwnPropertySymbols(source); - for (i = 0; i < sourceSymbolKeys.length; i++) - (key = sourceSymbolKeys[i]), - excluded.indexOf(key) >= 0 || - (Object.prototype.propertyIsEnumerable.call(source, key) && - (target[key] = source[key])); - } - return target; - } - function Multistep(_ref) { - var children = _ref.children, - _useMultistep = (function useMultistep(_ref) { - var initialStep = _ref.initialStep, - multistepApiRef = _ref.multistepApiRef, - _useFormController = useFormController(), - validate = _useFormController.validate, - asyncValidate = _useFormController.asyncValidate, - getFormState = _useFormController.getFormState, - getFieldState = _useFormController.getFieldState, - emitter = _useFormController.emitter, - formApi = useFormApi(), - scope = Object(react.useContext)(Context.n), - nSteps = Object(react.useRef)(0), - currentStep = Object(react.useRef)(), - steps = useMultistep_slicedToArray( - Object(react.useState)(function() { - return []; - }), - 1 - )[0], - stepsMap = useMultistep_slicedToArray( - Object(react.useState)(function() { - return new Map(); - }), - 1 - )[0], - _useState6 = useMultistep_slicedToArray( - Object(react.useState)({ steps: [], goal: null }), - 2 - ), - multistepState = _useState6[0], - setState = _useState6[1], - multistepApi = Object(react.useMemo)(function() { - var getNextStep = function getNextStep() { - for ( - var nextStep, - i = stepsMap.get(currentStep.current).index + 1; - i < steps.length; - i++ - ) { - nextStep = steps[i]; - var formState = getFormState(); - if ( - !nextStep.relevant || - nextStep.relevant({ - formState: formState, - formApi: formApi, - scope: scope - }) - ) - return nextStep.name; - } - }, - getPreviousStep = function getPreviousStep() { - for ( - var previousStep, - i = stepsMap.get(currentStep.current).index - 1; - i >= 0; - i-- - ) { - previousStep = steps[i]; - var formState = getFormState(); - if ( - !previousStep.relevant || - previousStep.relevant({ - formState: formState, - formApi: formApi, - scope: scope - }) - ) - return previousStep.name; - } - }, - proceed = function proceed(nextStep, cb) { - if (cb && 'function' == typeof cb) { - var fieldState = getFieldState(currentStep.current); - cb( - useMultistep_objectSpread( - useMultistep_objectSpread({}, fieldState), - {}, - { values: fieldState.value, errors: fieldState.error } - ) - ) - .then(function() { - (currentStep.current = nextStep), - setState(function(prev) { - return useMultistep_objectSpread( - useMultistep_objectSpread({}, prev), - {}, - { current: nextStep } - ); - }); - }) - .catch(function() {}); - } else - (currentStep.current = nextStep), - setState(function(prev) { - return useMultistep_objectSpread( - useMultistep_objectSpread({}, prev), - {}, - { current: nextStep } - ); - }); - }, - api = { - register: function register(name, step) { - var stepMeta = useMultistep_objectSpread( - useMultistep_objectSpread({}, step), - {}, - { index: nSteps.current } - ); - steps.push(stepMeta), - stepsMap.set(name, stepMeta), - (nSteps.current = nSteps.current + 1); - var initialGoal = null, - startingStep = null; - initialStep - ? initialStep && - name === initialStep && - ((initialGoal = initialStep), - (startingStep = steps[0].name)) - : (startingStep = steps[0].name), - setState(function(prev) { - return ( - !prev.current && - startingStep && - (currentStep.current = startingStep), - useMultistep_objectSpread( - useMultistep_objectSpread({}, prev), - {}, - { - steps: steps, - goal: prev.goal || initialGoal, - current: prev.current || startingStep - } - ) - ); - }); - }, - next: function next(cb) { - var nextStep = getNextStep(); - nextStep && - (formApi.touchAllFields(), - validate(), - asyncValidate(function() { - return proceed(nextStep, cb); - }), - getFormState().valid && - 0 === getFormState().validating && - proceed(nextStep, cb)); - }, - previous: function previous() { - var previousStep = getPreviousStep(); - previousStep && - ((currentStep.current = previousStep), - setState(function(prev) { - return useMultistep_objectSpread( - useMultistep_objectSpread({}, prev), - {}, - { current: previousStep } - ); - })); - }, - getNextStep: getNextStep, - getPreviousStep: getPreviousStep, - setCurrent: function setCurrent(step) { - stepsMap.get(step).index < - stepsMap.get(currentStep.current).index - ? ((currentStep.current = step), - setState(function(prev) { - return useMultistep_objectSpread( - useMultistep_objectSpread({}, prev), - {}, - { current: step } - ); - })) - : setState(function(prev) { - return useMultistep_objectSpread( - useMultistep_objectSpread({}, prev), - {}, - { goal: step } - ); - }); - }, - metGoal: function metGoal() { - setState(function(prev) { - return useMultistep_objectSpread( - useMultistep_objectSpread({}, prev), - {}, - { goal: null } - ); - }); - }, - getCurrentStep: function getCurrentStep() { - return currentStep.current; - } - }; - return multistepApiRef && (multistepApiRef.current = api), api; - }, []); - return ( - Object(react.useEffect)(function() { - var listener = function listener() { - setState(function(prev) { - return useMultistep_objectSpread( - useMultistep_objectSpread({}, prev), - {}, - { - nextStep: multistepApi.getNextStep(), - previousStep: multistepApi.getPreviousStep() - } - ); - }); - }; - return ( - emitter.on('multistep-relevance', listener), - function() { - emitter.removeListener('multistep-relevance', listener); - } - ); - }, []), - Object(react.useEffect)( - function() { - setState(function(prev) { - return useMultistep_objectSpread( - useMultistep_objectSpread({}, prev), - {}, - { - nextStep: multistepApi.getNextStep(), - previousStep: multistepApi.getPreviousStep() - } - ); - }); - }, - [multistepState.current] - ), - useMultistep_objectSpread( - useMultistep_objectSpread( - useMultistep_objectSpread({}, multistepApi), - multistepState - ), - {}, - { - render: function render(children) { - return react_default.a.createElement( - Context.i.Provider, - { value: multistepApi }, - react_default.a.createElement( - Context.j.Provider, - { value: multistepState }, - children - ) - ); - } - } - ) - ); - })(Multistep_objectWithoutProperties(_ref, Multistep_excluded)), - render = _useMultistep.render, - context = Multistep_objectWithoutProperties( - _useMultistep, - Multistep_excluded2 - ); - return render( - 'function' == typeof children ? children(context) : children - ); - } - function Informed_slicedToArray(arr, i) { - return ( - (function Informed_arrayWithHoles(arr) { - if (Array.isArray(arr)) return arr; - })(arr) || - (function Informed_iterableToArrayLimit(arr, i) { - var _i = - null == arr - ? null - : ('undefined' != typeof Symbol && arr[Symbol.iterator]) || - arr['@@iterator']; - if (null == _i) return; - var _s, - _e, - _arr = [], - _n = !0, - _d = !1; - try { - for ( - _i = _i.call(arr); - !(_n = (_s = _i.next()).done) && - (_arr.push(_s.value), !i || _arr.length !== i); - _n = !0 - ); - } catch (err) { - (_d = !0), (_e = err); - } finally { - try { - _n || null == _i.return || _i.return(); - } finally { - if (_d) throw _e; - } - } - return _arr; - })(arr, i) || - (function Informed_unsupportedIterableToArray(o, minLen) { - if (!o) return; - if ('string' == typeof o) - return Informed_arrayLikeToArray(o, minLen); - var n = Object.prototype.toString.call(o).slice(8, -1); - 'Object' === n && o.constructor && (n = o.constructor.name); - if ('Map' === n || 'Set' === n) return Array.from(o); - if ( - 'Arguments' === n || - /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) - ) - return Informed_arrayLikeToArray(o, minLen); - })(arr, i) || - (function Informed_nonIterableRest() { - throw new TypeError( - 'Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.' - ); - })() - ); - } - function Informed_arrayLikeToArray(arr, len) { - (null == len || len > arr.length) && (len = arr.length); - for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; - return arr2; - } - function Informed_classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) - throw new TypeError('Cannot call a class as a function'); - } - function Informed_defineProperties(target, props) { - for (var i = 0; i < props.length; i++) { - var descriptor = props[i]; - (descriptor.enumerable = descriptor.enumerable || !1), - (descriptor.configurable = !0), - 'value' in descriptor && (descriptor.writable = !0), - Object.defineProperty(target, descriptor.key, descriptor); - } - } - function Informed_createClass(Constructor, protoProps, staticProps) { - return ( - protoProps && - Informed_defineProperties(Constructor.prototype, protoProps), - staticProps && Informed_defineProperties(Constructor, staticProps), - Constructor - ); - } - Multistep.Step = function MultistepStep(_ref2) { - var children = _ref2.children, - _useMultistepStep = (function useMultistepStep(_ref) { - var step = _ref.step, - relevant = _ref.relevant, - keepState = _ref.keepState, - _ref$relevanceWhen = _ref.relevanceWhen, - relevanceWhen = - void 0 === _ref$relevanceWhen ? [] : _ref$relevanceWhen, - _ref$relevanceDeps = _ref.relevanceDeps, - relevanceDeps = - void 0 === _ref$relevanceDeps ? [] : _ref$relevanceDeps, - formController = useFormController(), - _useMultistepState = useMultistepState(), - current = _useMultistepState.current, - goal = _useMultistepState.goal, - _useMultistepApi = useMultistepApi(), - register = _useMultistepApi.register, - next = _useMultistepApi.next, - metGoal = _useMultistepApi.metGoal, - active = step === current; - Object(react.useEffect)(function() { - register(step, { name: step, relevant: relevant }); - }, []); - var isRelevant = useRelevance_useRelevance({ - name: step, - relevant: relevant, - relevanceWhen: relevanceWhen, - relevanceDeps: relevanceDeps - }); - return ( - Object(react.useEffect)( - function() { - isRelevant || - keepState || - (useMultistepStep_logger( - 'MULTISTEP RELEVNAT REMOVING', - step - ), - formController.remove(step)), - formController.emitter.emit('multistep-relevance'); - }, - [isRelevant] - ), - Object(react.useEffect)( - function() { - goal && - active && - goal !== step && - (useMultistepStep_logger('GOAL', goal, 'STEP', step), - useMultistepStep_logger('GOING TO NEXT STEP'), - next()), - goal && active && goal === step && metGoal(); - }, - [goal, active] - ), - { - active: active, - step: step, - render: function render(children) { - return react_default.a.createElement( - Context.k.Provider, - { value: active }, - react_default.a.createElement( - Scope_Scope, - { scope: step }, - active ? children : null - ) - ); - }, - relevant: isRelevant - } - ); - })(Multistep_objectWithoutProperties(_ref2, _excluded3)); - return (0, _useMultistepStep.render)(children); - }; - var Informed_debug = Object(src_debug.a)('informed:Informed\t\t'), - Emitter = (function() { - function Emitter() { - Informed_classCallCheck(this, Emitter), - (this.subscriptions = new Map()), - (this.emitter = this), - (this.on = this.on.bind(this)), - (this.emit = this.emit.bind(this)); - } - return ( - Informed_createClass(Emitter, [ - { - key: 'emit', - value: function emit(event) { - for ( - var _len = arguments.length, - args = new Array(_len > 1 ? _len - 1 : 0), - _key = 1; - _key < _len; - _key++ - ) - args[_key - 1] = arguments[_key]; - var listeners = this.subscriptions.get(event); - listeners && - listeners.forEach(function(listener) { - return listener.apply(void 0, args); - }); - } - }, - { - key: 'on', - value: function on(event, listener) { - this.subscriptions.get(event) || - this.subscriptions.set(event, new Set()), - this.subscriptions.get(event).add(listener); - } - }, - { - key: 'removeListener', - value: function removeListener(event, listener) { - this.subscriptions.get(event).delete(listener); - } - } - ]), - Emitter - ); - })(), - InformedController = (function() { - function InformedController() { - Informed_classCallCheck(this, InformedController), - (this.emitter = new Emitter()), - (this.formMap = new Map()), - (this.savedValues = new Map()), - (this.getController = this.getController.bind(this)), - (this.register = this.register.bind(this)), - (this.deregister = this.deregister.bind(this)); - } - return ( - Informed_createClass(InformedController, [ - { - key: 'register', - value: function register(name, controller) { - Informed_debug('Register', name, controller), - this.formMap.get(name) && this.formMap.delete(name), - this.formMap.set(name, controller), - this.emitter.emit(name, '_ALL_'); - } - }, - { - key: 'deregister', - value: function deregister(name) { - Informed_debug('De-Register', name), - this.formMap.get(name) && - (this.formMap.delete(name), - this.emitter.emit(name, '_ALL_')); - } - }, - { - key: 'getController', - value: function getController(name) { - return this.formMap.get(name); - } - }, - { - key: 'inform', - value: function inform(name, target) { - this.emitter.emit(name, target); - } - }, - { - key: 'getSavedValues', - value: function getSavedValues(name) { - return this.savedValues.get(name); - } - }, - { - key: 'setSavedValues', - value: function setSavedValues(name, values) { - return this.savedValues.set(name, values); - } - } - ]), - InformedController - ); - })(), - Informed_Informed = function Informed(_ref) { - var children = _ref.children; - Informed_debug('Render Informed Provider'); - var informedController = Informed_slicedToArray( - Object(react.useState)(function() { - return new InformedController(); - }), - 1 - )[0]; - return react_default.a.createElement( - Context.h.Provider, - { value: informedController }, - children - ); - }; - (Informed_Informed.__docgenInfo = { - description: '', - methods: [], - displayName: 'Informed' - }), - 'undefined' != typeof STORYBOOK_REACT_CLASSES && - (STORYBOOK_REACT_CLASSES['src/components/Informed.js'] = { - name: 'Informed', - docgenInfo: Informed_Informed.__docgenInfo, - path: 'src/components/Informed.js' - }); - var FormStateAccessor_FormStateAccessor = function FormStateAccessor( - _ref - ) { - return (0, _ref.children)(useFormState()); - }; - function useArrayFieldItemState() { - return Object(react.useContext)(Context.c); - } - var useInformedState_debug = Object(src_debug.a)( - 'informed:useInformedState\t' - ), - useInformedState_useInformedState = function useInformedState(name) { - var _informed$getControll, - informed = useInformed(), - forceUpdate = useForceUpdate_useForceUpdate(); - return ( - Object(react.useEffect)( - function() { - var listener = function listener(n) { - useInformedState_debug('Updating', n), forceUpdate(); - }; - return ( - informed.emitter.on(name, listener), - forceUpdate(), - function() { - informed.emitter.removeListener(name, listener); - } - ); - }, - [name] - ), - null === (_informed$getControll = informed.getController(name)) || - void 0 === _informed$getControll - ? void 0 - : _informed$getControll.getFormState() - ); - }, - useInformedField_debug = Object(src_debug.a)( - 'informed:useInformedField\t' - ), - useInformedField_useInformedField = function useInformedField( - name, - target - ) { - var _informed$getControll, - informed = useInformed(), - forceUpdate = useForceUpdate_useForceUpdate(); - return ( - Object(react.useEffect)( - function() { - var listener = function listener(t) { - ('_ALL_' === t || - t === target || - (t && isChild(target, t))) && - (useInformedField_debug('Updating', t, name, target), - forceUpdate()); - }; - return ( - informed.emitter.on(name, listener), - forceUpdate(), - function() { - informed.emitter.removeListener(name, listener); - } - ); - }, - [name] - ), - null === (_informed$getControll = informed.getController(name)) || - void 0 === _informed$getControll - ? void 0 - : _informed$getControll.getFieldState(target) - ); - }; - }, - './stories sync ^\\.[\\\\/](?:index\\.js)$': function( - module, - exports, - __webpack_require__ - ) { - var map = { './index.js': './stories/index.js' }; - function webpackContext(req) { - var id = webpackContextResolve(req); - return __webpack_require__(id); - } - function webpackContextResolve(req) { - if (!__webpack_require__.o(map, req)) { - var e = new Error("Cannot find module '" + req + "'"); - throw ((e.code = 'MODULE_NOT_FOUND'), e); - } - return map[req]; - } - (webpackContext.keys = function webpackContextKeys() { - return Object.keys(map); - }), - (webpackContext.resolve = webpackContextResolve), - (module.exports = webpackContext), - (webpackContext.id = './stories sync ^\\.[\\\\/](?:index\\.js)$'); - }, - './stories/Arrays/index.js': function( - module, - __webpack_exports__, - __webpack_require__ - ) { - 'use strict'; - __webpack_require__.d(__webpack_exports__, 'e', function() { - return NestedFields; - }), - __webpack_require__.d(__webpack_exports__, 'b', function() { - return ArrayFieldItem; - }), - __webpack_require__.d(__webpack_exports__, 'a', function() { - return AlternateSyntax; - }), - __webpack_require__.d(__webpack_exports__, 'c', function() { - return DependentFields; - }), - __webpack_require__.d(__webpack_exports__, 'd', function() { - return HugeArrayForm; - }); - var react = __webpack_require__('./node_modules/react/index.js'), - react_default = __webpack_require__.n(react), - withDocs = __webpack_require__('./stories/utils/withDocs.js'), - src = (__webpack_require__('./stories/utils/Code.js'), - __webpack_require__('./src/index.js')), - initialValues = (Object(withDocs.a)( - '# Array of fields\n\nFields can also be associated with an array. Here is an example where you can input three friends.\n\n\x3c!-- STORY --\x3e\n\n```jsx\nimport { Form, Text } from \'informed\';\n\nconst Example = () => (\n
\n \n \n \n \n \n \n);\n```\n', - function InputInput() { - return react_default.a.createElement( - src.f, - null, - react_default.a.createElement(src.l, { - name: 'friends[0]', - label: 'Friend1' - }), - react_default.a.createElement(src.l, { - name: 'friends[1]', - label: 'Friend2' - }), - react_default.a.createElement(src.l, { - name: 'friends[2]', - label: 'Friend3' - }), - react_default.a.createElement( - 'button', - { type: 'submit' }, - 'Submit' - ), - react_default.a.createElement(src.c, { values: !0 }) - ); - } - ), - Object(withDocs.a)( - '# Array of scopes\n\nScopes can also be associated with an array. Here is an example where you can input two friends.\nwhere a friend consists of a first and last name.\n\n\x3c!-- STORY --\x3e\n\n```jsx\nimport { Form, Input, Scope, Debug } from \'informed\';\n\nconst ArrayOfScopes = () => (\n
\n
Friend1
\n \n \n \n \n
Friend2
\n \n \n \n \n \n \n \n);\n```\n', - function ArrayOfScopes() { - return react_default.a.createElement( - src.f, - null, - react_default.a.createElement('h5', null, 'Friend1'), - react_default.a.createElement( - src.s, - { scope: 'friends[0]' }, - react_default.a.createElement(src.l, { - name: 'firstName', - label: 'First Name' - }), - react_default.a.createElement(src.l, { - name: 'lastName', - label: 'Last Name' - }) - ), - react_default.a.createElement('h5', null, 'Friend2'), - react_default.a.createElement( - src.s, - { scope: 'friends[1]' }, - react_default.a.createElement(src.l, { - name: 'firstName', - label: 'First Name' - }), - react_default.a.createElement(src.l, { - name: 'lastName', - label: 'Last Name' - }) - ), - react_default.a.createElement( - 'button', - { type: 'submit' }, - 'Submit' - ), - react_default.a.createElement(src.c, null) - ); - } - ), - { friends: [{ name: 'Joe', age: 27 }, { name: 'Jane', age: 22 }] }), - ArrayFieldItem_FieldState = function FieldState() { - var state = Object(src.x)(); - return react_default.a.createElement( - 'pre', - null, - react_default.a.createElement( - 'code', - null, - JSON.stringify(state, null, 2) - ) - ); - }, - ArrayFieldItem = Object(withDocs.a)( - '# Array Field Item\n\n
\n\nInformed gives you access to two components for array fields:\n\n```jsx\n\n\n```\n\n
\n\nThere are many cool features these give you:\n\n## ArrayFieldApi\n\n```jsx\n\n {({ add, reset, swap, addWithInitialValue }) => <>}\n\n```\n\n
\n\n| Function | Example | Description |\n| ------------------- | ------------------------------------- | ------------------------------------- |\n| add | add() | Adds a new item |\n| reset | reset() | Resets the array field |\n| swap | swap(1,2) | Swaps two array fields |\n| addWithInitialValue | addWithInitialValue({ name: \'test\' }) | Adds a new item with an initial value |\n\n## ArrayFieldItemApi\n\n```jsx\n{({ remove, reset, setValue }) => <>}\n```\n\n
\n\n| Function | Example | Description |\n| ---------- | ----------------------- | --------------------------------------------- |\n| remove | remove() | removes this item |\n| reset | reset() | Resets all field within this item |\n| setValue | setValue(\'name\', \'Joe\') | Sets the value for the field within this item |\n| resetField | resetField(\'name\') | Resets the given field within this item |\n\n## ArrayFieldItemInfo\n\n```jsx\n{({ name, index }) => <>}\n```\n\n
\n\n| Name | Example | Description |\n| ----- | ------------ | ---------------------------- |\n| name | "friends[0]" | the field name for this item |\n| index | 0 | the index for this item |\n\n## ArrayFieldItemState\n\n##### Usage\n\n```js\nconst {\n key,\n name,\n index,\n parent,\n values,\n errors,\n touched,\n initialValue\n} = useArrayFieldItemState();\n```\n\n##### Example\n\n```json\n{\n "key": "d9f97dee-7c39-4bce-a348-a404e75417a6",\n "name": "friends[0]",\n "index": 0,\n "parent": "friends",\n "values": {\n "age": 27\n },\n "errors": {\n "name": "This field is required"\n },\n "touched": true,\n "initialValue": {\n "name": "Joe",\n "age": 27\n }\n}\n```\n\n
\n\n| Name | Example | Description |\n| ------------ | -------------------------- | ------------------------------------------------------------- |\n| name | "friends[0]" | the field name for this item |\n| index | 0 | the index for this item |\n| key | "d9f97dee..." | a unique identifier for this field ( used mostly internally ) |\n| parent | "friends" | parent name "friends[0]" parent is "friends" |\n| values | { age: 27 } | the values within this item |\n| errors | { name: "Required Field" } | the errors within this item |\n| touched | true | if a field within this item has been touched |\n| initialValue | { name: "Joe", age: 27} | the initial value for this item |\n\n## Example:\n\nFor each feature a visualization will be shown based on this example array:\n\n```\n[ { a, b }, { a, b }, { a, b } ]\n```\n\n
\n\nAn example state for this array looks like\n\n```js\n[{ a: \'Hello\', b: \'World\' }, { a: \'Hi\', b: \'US\' }, { a: \'Yoo\', b: \'Bro\' }];\n```\n\n
\n\n| Scenario | Visualization | How |\n| ---------------------------------------------------------------- | ------------------------------------ | ----------------------------------------- |\n| I want to reset the **b** field for the second item | [ { a, b }, { a, **b** }, { a, b } ] | `arrayFieldItemApi.resetField(\'b\')` |\n| I want to set the **a** fields value for the second item to "Yo" | [ { a, b }, { **a**, b }, { a, b } ] | `arrayFieldItemApi.setValue(\'a\', \'Yo\')` |\n| I want to remove the the second item | [ { a, b }, **{ a, b }**, { a, b } ] | `arrayFieldItemApi.remove()` |\n| I want to reset the the second item | [ { a, b }, **{ a, b }**, { a, b } ] | `arrayFieldItemApi.reset()` |\n| I want to add a new item | [ { a, b }, { a, b }, **{ a, b }** ] | `arrayFieldApi.add()` |\n| I want to add a new item with the name "Foo" | [ { a, b }, { a, b }, **{ a, b }** ] | `arrayFieldApi.addWithInitialValue({..})` |\n| I want to reset the whole array field | **[ { a, b }, { a, b }, { a, b } ]** | `arrayFieldApi.reset()` |\n\n\x3c!-- STORY --\x3e\n\n```jsx\nimport { Form, Input, ArrayField, useArrayFieldItemState } from \'informed\';\n\nconst initialValues = {\n friends: [\n {\n name: \'Joe\',\n age: \'20\'\n },\n {\n name: \'Jane\',\n age: \'20\'\n }\n ]\n};\n\nconst FieldState = () => {\n const { values } = useArrayFieldItemState();\n return (\n
\n      {JSON.stringify(values, null, 2)}\n    
\n );\n};\n\nconst NestedForm = () => {\n return (\n
\n
\n \n {({ add, reset }) => (\n <>\n {\n reset();\n }}\n type="button">\n Reset\n \n {\n add();\n }}\n type="button">\n Add\n \n\n {\n addWithInitialValue({ name: \'test\' });\n }}>\n Add with initialValue\n \n\n {\n formApi.setValue(\'friends[0].name\', \'Test\');\n }}\n type="button">\n set friends[0].name to test\n \n\n \n {({ remove, name, reset, resetField, setValue }) => (\n <>\n
{name}
\n \n \n \n setValue(\'name\', \'Elon\')}>\n Set Name to "Elon"\n \n \n \n \n \n )}\n
\n \n )}\n
\n \n
\n
\n );\n};\n```\n', - function NestedForm() { - return react_default.a.createElement( - 'div', - null, - react_default.a.createElement( - src.f, - { initialValues: initialValues }, - react_default.a.createElement( - 'div', - { style: { display: 'flex', flexWrap: 'wrap' } }, - react_default.a.createElement( - 'div', - { style: { flex: 1, marginRight: '2rem' } }, - react_default.a.createElement( - src.a, - { name: 'friends' }, - function(_ref) { - var add = _ref.add, - addWithInitialValue = _ref.addWithInitialValue, - reset = _ref.reset; - return react_default.a.createElement( - react_default.a.Fragment, - null, - react_default.a.createElement( - 'button', - { - onClick: function onClick() { - reset(); - }, - type: 'button' - }, - 'Reset' - ), - react_default.a.createElement( - 'button', - { - onClick: function onClick() { - add(); - }, - type: 'button' - }, - 'Add' - ), - react_default.a.createElement( - 'button', - { - onClick: function onClick() { - addWithInitialValue({ name: 'test' }); - } - }, - 'Add with initialValue' - ), - react_default.a.createElement( - src.a.Items, - null, - function(_ref2) { - var remove = _ref2.remove, - name = _ref2.name, - reset = _ref2.reset, - resetField = _ref2.resetField, - setValue = _ref2.setValue; - return react_default.a.createElement( - 'label', - null, - react_default.a.createElement('h5', null, name), - react_default.a.createElement(src.l, { - name: 'name', - label: 'Name', - required: !0 - }), - react_default.a.createElement(src.l, { - name: 'age', - label: 'Age', - type: 'number' - }), - react_default.a.createElement( - 'button', - { type: 'button', onClick: reset }, - 'Reset' - ), - react_default.a.createElement( - 'button', - { - type: 'button', - onClick: function onClick() { - return setValue('name', 'Elon'); - } - }, - 'Set Name to "Elon"' - ), - react_default.a.createElement( - 'button', - { - type: 'button', - onClick: function onClick() { - return resetField('name'); - } - }, - 'Reset Name' - ), - react_default.a.createElement( - 'button', - { type: 'button', onClick: remove }, - 'Remove' - ), - react_default.a.createElement( - ArrayFieldItem_FieldState, - null - ) - ); - } - ) - ); - } - ) - ), - react_default.a.createElement( - 'div', - { - style: { flex: 2, minWidth: '300px', marginLeft: '3rem' } - }, - react_default.a.createElement(src.c, null) - ) - ) - ) - ); - } - ), - AlternateSyntax = Object(withDocs.a)( - '# Flat Arrays\n\nYou can create flat arrays where the value is not an object.\n\n\x3c!-- STORY --\x3e\n\n```jsx\nimport { Form, Input, ArrayField } from \'informed\';\n\nconst DynamicArrays = () => {\n return (\n
\n
You:
\n \n
Siblings:
\n \n {({ add }) => (\n <>\n \n \n {({ remove, name, index }) => (\n <>\n \n \n \n )}\n \n \n )}\n \n \n
\n );\n};\n```\n', - function ArrayFieldExample() { - return react_default.a.createElement( - src.f, - { initialValues: { siblings: ['foo', 'bar', 'baz'] } }, - react_default.a.createElement( - 'div', - { style: { display: 'flex' } }, - react_default.a.createElement( - 'div', - { style: { flex: 1, marginRight: '1rem' } }, - react_default.a.createElement('h5', null, 'You:'), - react_default.a.createElement(src.l, { - name: 'name', - label: 'Your Name:' - }), - react_default.a.createElement('h5', null, 'Siblings:'), - react_default.a.createElement( - src.a, - { name: 'siblings' }, - function(_ref) { - var add = _ref.add; - return react_default.a.createElement( - react_default.a.Fragment, - null, - react_default.a.createElement( - 'button', - { type: 'button', onClick: add }, - 'Add Sibling' - ), - react_default.a.createElement( - src.a.Items, - null, - function(_ref2) { - var remove = _ref2.remove, - name = _ref2.name, - index = _ref2.index; - return react_default.a.createElement( - react_default.a.Fragment, - null, - react_default.a.createElement(src.l, { - name: name, - label: 'Sibling '.concat(index, ':') - }), - react_default.a.createElement( - 'button', - { type: 'button', onClick: remove }, - 'Remove' - ) - ); - } - ) - ); - } - ), - react_default.a.createElement('br', null), - react_default.a.createElement( - 'button', - { type: 'submit' }, - 'Submit' - ) - ), - react_default.a.createElement( - 'div', - { style: { flex: 2, marginLeft: '3rem' } }, - react_default.a.createElement(src.c, { values: !0 }) - ) - ) - ); - } - ), - HugeArrayForm_initialValues = { - friends: Array.from(Array(69)).map(function(e) { - return { name: 'Joe', age: 26, f: 'foo' }; - }) - }, - HugeArrayForm_FieldState = function FieldState(_ref) { - var name = _ref.name, - nameState = Object(src.A)(name); - return react_default.a.createElement( - react_default.a.Fragment, - null, - react_default.a.createElement( - 'h5', - null, - 'Component using nameState: ', - name - ), - 'Render: ', - Math.random(), - react_default.a.createElement( - 'pre', - null, - react_default.a.createElement( - 'code', - null, - JSON.stringify(nameState, null, 2) - ) - ) - ); - }, - HugeArrayForm = Object(withDocs.a)( - '# Huge Array form\n\n```jsx\nimport {\n Form,\n Input,\n ArrayField,\n useFieldState,\n Relevant,\n Debug\n} from \'informed\';\n\nconst friends = Array.from(Array(69)).map(e => {\n return { name: \'Joe\', age: 26, f: \'foo\' };\n});\n\nconst initialValues = {\n friends\n};\n\nconst FieldState = ({ name }) => {\n const nameState = useFieldState(name);\n return (\n <>\n
Component using nameState: {name}
\n Render: {Math.random()}\n
\n        {JSON.stringify(nameState, null, 2)}\n      
\n \n );\n};\n\nconst NestedForm = () => (\n
\n console.log(values)}>\n
\n
\n \n \n {({ add, addWithInitialValue, reset }) => {\n return (\n \n {\n reset();\n }}\n type="button">\n Reset\n \n {\n add();\n }}\n type="button">\n Add\n \n\n {\n addWithInitialValue({ name: \'test\' });\n }}>\n Add with initialValue\n \n\n \n {({ remove, name, reset, initialValue, setValue }) => (\n \n )}\n \n \n );\n }}\n \n
\n
\n \n
\n
\n \n
\n);\n```\n\n\x3c!-- STORY --\x3e\n', - function NestedForm() { - return react_default.a.createElement( - 'div', - null, - react_default.a.createElement( - src.f, - { - initialValues: HugeArrayForm_initialValues, - onSubmit: function onSubmit(_ref2) { - var values = _ref2.values; - return console.log(values); - } - }, - react_default.a.createElement( - 'div', - { style: { display: 'flex', flexWrap: 'wrap' } }, - react_default.a.createElement( - 'div', - { style: { flex: 1, marginRight: '2rem' } }, - react_default.a.createElement( - 'button', - { type: 'submit' }, - 'Submit' - ), - react_default.a.createElement( - src.a, - { name: 'friends' }, - function(_ref3) { - var add = _ref3.add, - addWithInitialValue = _ref3.addWithInitialValue, - reset = _ref3.reset; - return react_default.a.createElement( - react_default.a.Fragment, - null, - react_default.a.createElement( - 'button', - { - onClick: function onClick() { - reset(); - }, - type: 'button' - }, - 'Reset' - ), - react_default.a.createElement( - 'button', - { - onClick: function onClick() { - add(); - }, - type: 'button' - }, - 'Add' - ), - react_default.a.createElement( - 'button', - { - onClick: function onClick() { - addWithInitialValue({ name: 'test' }); - } - }, - 'Add with initialValue' - ), - react_default.a.createElement( - src.a.Items, - null, - function(_ref4) { - var remove = _ref4.remove, - name = _ref4.name, - reset = _ref4.reset, - initialValue = _ref4.initialValue, - setValue = _ref4.setValue; - return react_default.a.createElement( - 'label', - null, - react_default.a.createElement('h5', null, name), - react_default.a.createElement( - HugeArrayForm_FieldState, - { name: name } - ), - react_default.a.createElement(src.l, { - name: 'name', - initialValue: - initialValue && initialValue.name - }), - react_default.a.createElement(src.l, { - name: 'age' - }), - react_default.a.createElement(src.l, { - name: 'a' - }), - react_default.a.createElement(src.l, { - name: 'b' - }), - react_default.a.createElement(src.l, { - name: 'c' - }), - react_default.a.createElement(src.l, { - name: 'd' - }), - react_default.a.createElement(src.l, { - name: 'e' - }), - react_default.a.createElement(src.l, { - name: 'f' - }), - react_default.a.createElement(src.l, { - name: 'g', - relevanceWhen: function relevanceWhen(scope) { - return [''.concat(scope, '.f')]; - }, - relevant: function relevant(_ref5) { - var formApi = _ref5.formApi, - scope = _ref5.scope; - return formApi.getValue( - ''.concat(scope, '.f') - ); - } - }), - react_default.a.createElement(src.l, { - name: 'h', - relevanceWhen: ['f'], - relevant: function relevant(_ref6) { - return _ref6.formApi.getValue( - ''.concat(name, '.f') - ); - } - }), - react_default.a.createElement( - src.q, - { - when: function when(_ref7) { - return _ref7.formApi.getValue( - ''.concat(name, '.f') - ); - } - }, - react_default.a.createElement(src.l, { - name: 'i' - }), - react_default.a.createElement(src.l, { - name: 'j' - }), - react_default.a.createElement(src.l, { - name: 'k' - }), - react_default.a.createElement(src.l, { - name: 'l' - }), - react_default.a.createElement(src.l, { - name: 'm' - }) - ), - react_default.a.createElement( - 'button', - { - type: 'button', - onClick: function onClick() { - reset(); - } - }, - 'Reset' - ), - react_default.a.createElement( - 'button', - { - type: 'button', - onClick: function onClick() { - return setValue('name', 'Elon'); - } - }, - 'Set Name to "Elon"' - ), - react_default.a.createElement( - 'button', - { type: 'button', onClick: remove }, - 'Remove' - ) - ); - } - ) - ); - } - ) - ), - react_default.a.createElement( - 'div', - { - style: { flex: 2, minWidth: '300px', marginLeft: '3rem' } - }, - react_default.a.createElement(src.c, null) - ) - ) - ) - ); - } - ), - NestedFields_initialValues = { - friends: [{ name: 'Joe', age: 27 }, { name: 'Jane', age: 22 }] - }, - NestedFields = Object(withDocs.a)( - '# Array Field\n\nSometimes you need highly dynamic forms where the data is represented by an array.\n\n\x3c!-- STORY --\x3e\n\n```jsx\nimport { Form, Input, ArrayField } from \'informed\';\n\nconst initialValues = {\n friends: [\n {\n name: \'Joe\',\n age: \'20\'\n },\n {\n name: \'Jane\',\n age: \'20\'\n }\n ]\n};\n\nconst NestedForm = () => {\n return (\n
\n
\n \n {({ add }) => {\n return (\n <>\n {\n add();\n }}\n type="button">\n Add\n \n \n {({ remove, name }) => (\n \n )}\n \n \n );\n }}\n \n \n
\n
\n );\n};\n```\n', - function NestedForm() { - return react_default.a.createElement( - 'div', - null, - react_default.a.createElement( - src.f, - { - initialValues: NestedFields_initialValues, - autoComplete: 'off' - }, - react_default.a.createElement( - 'div', - { style: { display: 'flex', flexWrap: 'wrap' } }, - react_default.a.createElement( - 'div', - { style: { flex: 1, marginRight: '2rem' } }, - react_default.a.createElement( - src.a, - { name: 'friends' }, - function(_ref) { - var add = _ref.add; - return react_default.a.createElement( - react_default.a.Fragment, - null, - react_default.a.createElement( - 'button', - { - onClick: function onClick() { - add(); - }, - type: 'button' - }, - 'Add' - ), - react_default.a.createElement( - src.a.Items, - null, - function(_ref2) { - var remove = _ref2.remove, - name = _ref2.name; - return react_default.a.createElement( - 'label', - null, - react_default.a.createElement('h5', null, name), - react_default.a.createElement(src.l, { - name: 'name', - label: 'Name', - required: !0 - }), - react_default.a.createElement(src.l, { - name: 'age', - label: 'Age', - type: 'number' - }), - react_default.a.createElement( - 'button', - { type: 'button', onClick: remove }, - 'Remove' - ) - ); - } - ) - ); - } - ) - ), - react_default.a.createElement( - 'div', - { - style: { flex: 2, minWidth: '300px', marginLeft: '3rem' } - }, - react_default.a.createElement(src.c, { values: !0 }) - ) - ) - ) - ); - } - ), - options = { - car: [ - { value: '', label: '- Select -', disabled: !0 }, - { value: 'modelS', label: 'Model S' }, - { value: 'model3', label: 'Model 3' }, - { value: 'modelX', label: 'Model X' }, - { value: 'modely', label: 'Model Y' } - ], - truck: [ - { value: '', label: '- Select -', disabled: !0 }, - { value: 'semi', label: 'Semi Truck' }, - { value: 'cyber', label: 'Cyber Truck' } - ] - }, - DependentFields_CarOrTruck = function CarOrTruck() { - return react_default.a.createElement( - react_default.a.Fragment, - null, - react_default.a.createElement( - 'label', - null, - 'Would you like a car or truck?' - ), - react_default.a.createElement( - src.p, - { name: 'type' }, - react_default.a.createElement(src.o, { - value: 'car', - label: 'Car' - }), - react_default.a.createElement(src.o, { - value: 'truck', - label: 'Truck' - }) - ) - ); - }, - DependentFields_ProductSelect = function ProductSelect() { - var _useFieldState = Object(src.A)('type'), - value = _useFieldState.value, - dirty = _useFieldState.dirty, - clearValue = Object(src.z)('product').clearValue, - opts = Object(react.useMemo)( - function() { - return options[value] || []; - }, - [value] - ); - return ( - Object(react.useEffect)( - function() { - dirty && clearValue(); - }, - [value] - ), - react_default.a.createElement( - src.t, - { field: 'product', label: 'Product', disabled: !value }, - react_default.a.createElement( - 'option', - { value: '', disabled: !0 }, - '- Select -' - ), - opts.map(function(option) { - return react_default.a.createElement( - 'option', - { key: option.value, value: option.value }, - option.label - ); - }) - ) - ); - }, - DependentFields_initialValues = { - friends: [ - { name: 'Joe', type: 'truck' }, - { name: 'Jane', type: 'car' } - ] - }, - DependentFields = Object(withDocs.a)( - "# Dependent Fields in ArrayField\n\nInformed's hooks are automatically scoped for you!!\n\n\x3c!-- STORY --\x3e\n\n```jsx\nimport { Form, Input, ArrayField } from 'informed';\n\nconst options = {\n car: [\n {\n value: '',\n label: '- Select -',\n disabled: true\n },\n {\n value: 'modelS',\n label: 'Model S'\n },\n {\n value: 'model3',\n label: 'Model 3'\n },\n {\n value: 'modelX',\n label: 'Model X'\n },\n {\n value: 'modely',\n label: 'Model Y'\n }\n ],\n truck: [\n {\n value: '',\n label: '- Select -',\n disabled: true\n },\n {\n value: 'semi',\n label: 'Semi Truck'\n },\n {\n value: 'cyber',\n label: 'Cyber Truck'\n }\n ]\n};\n\nconst CarOrTruck = () => {\n return (\n <>\n \n \n \n \n \n \n );\n};\n\nconst ProductSelect = () => {\n const { value, dirty } = useFieldState('type');\n const { clearValue } = useFieldApi('product');\n\n const opts = useMemo(() => options[value] || [], [value]);\n\n useEffect(\n () => {\n if (dirty) clearValue();\n },\n [value]\n );\n\n return (\n \n );\n};\n\nconst initialValues = {\n friends: [\n {\n name: 'Joe',\n type: 'truck'\n },\n {\n name: 'Jane',\n type: 'car'\n }\n ]\n};\n\nconst DynamicArrays = () => {\n return (\n
\n
You:
\n \n
Friends:
\n \n {({ add }) => (\n <>\n \n \n {({ remove, name, index }) => (\n <>\n
{name}
\n \n \n \n \n \n )}\n
\n \n )}\n
\n \n
\n );\n};\n```\n", - function ArrayFieldExample() { - return react_default.a.createElement( - src.f, - { initialValues: DependentFields_initialValues }, - react_default.a.createElement( - 'div', - { style: { display: 'flex' } }, - react_default.a.createElement( - 'div', - { style: { flex: 1, marginRight: '1rem' } }, - react_default.a.createElement('h5', null, 'You:'), - react_default.a.createElement(src.l, { - name: 'name', - label: 'Your Name:' - }), - react_default.a.createElement('h5', null, 'Friends:'), - react_default.a.createElement( - src.a, - { name: 'friends' }, - function(_ref) { - var add = _ref.add; - return react_default.a.createElement( - react_default.a.Fragment, - null, - react_default.a.createElement( - 'button', - { type: 'button', onClick: add }, - 'Add Sibling' - ), - react_default.a.createElement( - src.a.Items, - null, - function(_ref2) { - var remove = _ref2.remove, - name = _ref2.name; - _ref2.index; - return react_default.a.createElement( - react_default.a.Fragment, - null, - react_default.a.createElement('h5', null, name), - react_default.a.createElement(src.l, { - name: 'name', - label: 'Name', - required: !0 - }), - react_default.a.createElement( - DependentFields_CarOrTruck, - null - ), - react_default.a.createElement( - DependentFields_ProductSelect, - null - ), - react_default.a.createElement( - 'button', - { type: 'button', onClick: remove }, - 'Remove' - ) - ); - } - ) - ); - } - ), - react_default.a.createElement('br', null), - react_default.a.createElement( - 'button', - { type: 'submit' }, - 'Submit' - ) - ), - react_default.a.createElement( - 'div', - { style: { flex: 2, marginLeft: '3rem' } }, - react_default.a.createElement(src.c, { values: !0 }) - ) - ) - ); - } - ); - }, - './stories/CarColor/index.js': function( - module, - __webpack_exports__, - __webpack_require__ - ) { - 'use strict'; - var react = __webpack_require__('./node_modules/react/index.js'), - react_default = __webpack_require__.n(react), - withDocs = __webpack_require__('./stories/utils/withDocs.js'), - src = __webpack_require__('./src/index.js'), - CarColor_SVG = function SVG() { - var value = Object(src.A)('color').value; - return react_default.a.createElement( - 'div', - { className: 'car-color-'.concat(value) }, - react_default.a.createElement( - 'svg', - { - xmlns: 'http://www.w3.org/2000/svg', - width: '554.349', - height: '231.889', - viewBox: '0 0 554.349 231.889' - }, - react_default.a.createElement( - 'g', - { - id: 'Group_2', - 'data-name': 'Group 2', - transform: 'translate(-205.632 -671.078)' - }, - react_default.a.createElement( - 'g', - { - id: 'Group_5', - 'data-name': 'Group 5', - transform: 'translate(206.591 672.034)' - }, - react_default.a.createElement( - 'g', - { - id: 'Group_2-2', - 'data-name': 'Group 2', - transform: 'translate(215.224 0.047)' - }, - react_default.a.createElement('path', { - id: 'Fill-1', - class: 'cls-1', - d: - 'M27.812,43.49l50.737,4.193,11.512.455L83.646,57.2l-53.9,3.6S4.7,57.4,9.233,44.982c0,0,3-7.147,18.58-1.492' - }), - react_default.a.createElement('path', { - id: 'Fill-3', - class: 'cls-2', - d: - 'M26.418,50.459l50.737,4.193,11.512.455-6.415,9.057-53.9,3.608s-25.044-3.4-20.513-15.82c0,0,3-7.147,18.58-1.492' - }), - react_default.a.createElement('path', { - id: 'Fill-5', - class: 'cls-1', - d: - 'M41.38,16.641A20.477,20.477,0,1,1,31.839,3.393,20.477,20.477,0,0,1,41.38,16.641' - }), - react_default.a.createElement('path', { - id: 'Fill-7', - class: 'cls-2', - d: - 'M30.368,31.519A20.475,20.475,0,0,1,5.916,7.624,20.466,20.466,0,1,0,41.661,24.691a20.359,20.359,0,0,1-11.293,6.828' - }), - react_default.a.createElement('path', { - id: 'Stroke-9', - class: 'cls-3', - d: - 'M41.38,16.641A20.477,20.477,0,1,1,31.839,3.393,20.477,20.477,0,0,1,41.38,16.641Z' - }), - react_default.a.createElement('path', { - id: 'Stroke-11', - class: 'cls-3', - d: - 'M26.418,43.49l50.737,4.193,11.512.455L82.252,57.2l-53.9,3.6S3.308,57.4,7.839,44.982C7.839,44.982,10.839,37.835,26.418,43.49Z' - }), - react_default.a.createElement('path', { - id: 'Fill-13', - class: 'cls-1', - d: 'M97.961,57.447a11.3,11.3,0,1,0-22.606.418Z' - }), - react_default.a.createElement('path', { - id: 'Stroke-15', - class: 'cls-3', - d: 'M97.961,57.447a11.3,11.3,0,1,0-22.606.418Z' - }), - react_default.a.createElement('path', { - id: 'Fill-17', - class: 'cls-4', - d: - 'M35.847,6.319,15.959,15.612s-.855,3.486.558,3.16c2.417-.558,20.667,11.986,20.63,14.868,0,0,11.338-14.311-1.3-27.321' - }), - react_default.a.createElement('path', { - id: 'Stroke-19', - class: 'cls-3', - d: 'M5.763,32.671l10.545-2.555L34.34,35.928' - }), - react_default.a.createElement('path', { - id: 'Stroke-21', - class: 'cls-5', - d: 'M1.438,24.66l10.07-2.189' - }), - react_default.a.createElement('path', { - id: 'Fill-23', - class: 'cls-4', - d: - 'M30.456,45.442s-1.7,5.042-.836,6.412c1.38,2.206,8.056,2.684,10.315,1.394C41.645,52.274,43,46,43,46Z' - }), - react_default.a.createElement('path', { - id: 'Fill-25', - class: 'cls-4', - d: - 'M60.565,47.673l2.788,3.067,12.545.836-.836,3.067L61.68,53.806l-5.3-6.133Z' - }) - ), - react_default.a.createElement( - 'g', - { - id: 'Group_3', - 'data-name': 'Group 3', - transform: 'translate(0 10.083)' - }, - react_default.a.createElement('path', { - id: 'Fill-28', - class: 'cls-6', - d: - 'M344.371,48.509s-27.879-26.764-35.127-33.455,0-14.5,0-14.5L406.262,44.6l-61.891,3.717' - }), - react_default.a.createElement('path', { - id: 'Fill-30', - class: 'cls-7', - d: - 'M361.891,32.711S338.287,21,328.437,15.24C319.922,10.26,307.758.929,307.758.929l97.018,44.048-35.264-9.665Z' - }), - react_default.a.createElement('path', { - id: 'Fill-32', - class: 'cls-8', - d: - 'M77.665,30.481,19.3,28.994S2.02,30.11,13.171,42.934c0,0-11.152,1.673-6.691,17.285,0,0-17.236,1.858,4.51,63.191,0,0,1.879,2.81,3.211,3.145,5.377,1.354,19.24,4.786,22.389,5.034,7.111.558,106.5,5.576,106.5,5.576l244.776-3.345,107.1-.558s32.86-.177,40.1-5.576c7.547-5.63,16.17-34.012,16.17-34.012s5.576-26.764-85.309-45.164c0,0-51.855-8.921-78.061-11.709l16.727,7.806L347.141,48.23l-4.443.28H247.911s-25.648-1.673-45.164-40.145L41.236,36.986' - }), - react_default.a.createElement('path', { - id: 'Fill-34', - class: 'cls-9', - d: 'M144.045,137.043a56.91,56.91,0,1,0-111.33-6.99Z' - }), - react_default.a.createElement('path', { - id: 'Fill-36', - class: 'cls-9', - d: 'M508.571,132.267a56.894,56.894,0,1,0-110.681,2.078Z' - }), - react_default.a.createElement('path', { - id: 'Fill-38', - class: 'cls-10', - d: - 'M69.292,42.664,197.055,20.073c19.932,39.3,46.13,41.005,46.13,41.005H340l4.539-.287,58.678-3.7s46-.278,63.123,2.012c55.016,7.352,78.629,27.308,84.537,36.807.226-.713.352-1.122.352-1.122S556.8,68.024,465.92,49.624c0,0-51.855-8.921-78.061-11.709l16.727,7.806-57.449,3.623-4.442.28H247.912s-25.648-1.673-45.164-40.145L41.237,38.1l36.429-6.5-58.36-1.491s-12.77-.084-6.457,10.036Z' - }), - react_default.a.createElement('path', { - id: 'Stroke-40', - class: 'cls-3', - d: - 'M78.223,30.481,19.863,29S2.577,30.11,13.729,42.934c0,0-11.152,1.673-6.691,17.285,0,0-17.236,1.858,4.51,63.191,0,0,1.879,2.81,3.211,3.145,5.377,1.354,19.24,4.786,22.389,5.034,7.111.558,106.5,5.576,106.5,5.576l244.776-3.345,107.1-.558s32.86-.177,40.1-5.576c7.547-5.63,16.17-34.012,16.17-34.012S557.365,66.91,466.48,48.51c0,0-51.855-8.921-78.061-11.709l16.727,7.806L347.7,48.23l-4.443.28H248.468S222.82,46.837,203.3,8.364L41.794,36.986' - }), - react_default.a.createElement('path', { - id: 'Stroke-42', - class: 'cls-3', - d: - 'M343.256,48.509s-27.879-26.764-35.127-33.455,0-14.5,0-14.5L405.147,44.6l-61.891,3.717' - }), - react_default.a.createElement('path', { - id: 'Fill-44', - class: 'cls-4', - d: - 'M308.129.558,309.8,9.9l43.909,37.636-10.455.79L308.129,15.055s-6.318-5.947,0-14.5' - }), - react_default.a.createElement('path', { - id: 'Fill-46', - class: 'cls-8', - d: - 'M320.3,33.594s-2.927,12.267,5.855,17.145,13.8-8.921,13.8-8.921-.418-8.5-19.655-8.224' - }), - react_default.a.createElement('path', { - id: 'Fill-48', - class: 'cls-9', - d: - 'M319.655,35.731s3.8-2.6,9.432,5.715c6.226,9.2,11.43,2.88,11.43,2.88s-1.952-14.4-20.862-8.6' - }), - react_default.a.createElement('path', { - id: 'Stroke-50', - class: 'cls-11', - d: - 'M320.953,33.733S318.026,46,326.808,50.879s13.8-8.921,13.8-8.921S340.19,33.455,320.953,33.733Z' - }), - react_default.a.createElement( - 'g', - { - id: 'Group-55', - transform: 'translate(133.818 113.745)' - }, - react_default.a.createElement('path', { - id: 'Fill-52', - class: 'cls-1', - d: 'M274.953,1.673.162.558' - }), - react_default.a.createElement('path', { - id: 'Stroke-54', - class: 'cls-3', - d: 'M274.953,1.673.162.558' - }) - ), - react_default.a.createElement('path', { - id: 'Stroke-56', - class: 'cls-5', - d: 'M361.656,47.394s17.842,26.224-5.018,67.838' - }), - react_default.a.createElement('path', { - id: 'Stroke-58', - class: 'cls-12', - d: 'M27.668,55.758s35.87,25.277,43.863,25.277' - }), - react_default.a.createElement('path', { - id: 'Stroke-60', - class: 'cls-5', - d: - 'M157.584,15.612,147.171,38.2l-19.089-.664s-26.609,27.9-24.873,40.525' - }), - react_default.a.createElement('path', { - id: 'Fill-62', - class: 'cls-4', - d: - 'M7.038,60.218l3.9,4.461L27.111,55.2s1.673-7.806-13.382-12.267c0,0-11.337,3.159-6.691,17.285' - }), - react_default.a.createElement('path', { - id: 'Stroke-64', - class: 'cls-3', - d: - 'M7.038,60.218l3.9,4.461L27.111,55.2s1.673-7.806-13.382-12.267C13.729,42.933,2.392,46.093,7.038,60.218Z' - }), - react_default.a.createElement('path', { - id: 'Stroke-66', - class: 'cls-5', - d: - 'M188.25,11.709s9.479,34.012,2.23,36.8,26.764,66.352,26.764,66.352' - }), - react_default.a.createElement('path', { - id: 'Stroke-68', - class: 'cls-5', - d: 'M482.65,88.1l34.942-23.79' - }), - react_default.a.createElement('path', { - id: 'Stroke-70', - class: 'cls-5', - d: - 'M179.318,34.75a7.429,7.429,0,1,1-7.429-7.429,7.429,7.429,0,0,1,7.429,7.429Z' - }) - ), - react_default.a.createElement( - 'g', - { transform: 'translate(39.03 80.338)' }, - react_default.a.createElement( - 'g', - { transform: 'translate(50.00 54.0)' }, - react_default.a.createElement( - 'g', - { id: 'Circleelement' }, - react_default.a.createElement( - 'g', - { transform: 'translate(-50.00 -54.0)' }, - react_default.a.createElement('path', { - id: 'Fill-73', - class: 'cls-13', - d: - 'M93.775,54.234A44.065,44.065,0,1,1,49.71,10.168,44.065,44.065,0,0,1,93.775,54.234' - }), - react_default.a.createElement('path', { - id: 'Fill-75', - class: 'cls-4', - d: - 'M50.469,89.714H49.414a34.789,34.789,0,0,1-10.033-1.4,2.454,2.454,0,0,1-1.915-3.484c.761-2.6,1.693-5.373,2.944-8.685a53.247,53.247,0,0,1,3.116-6.918,13.824,13.824,0,0,1,1.717-2.453,2.919,2.919,0,0,1,2.674-.981,11.237,11.237,0,0,0,2.208,0,2.77,2.77,0,0,1,2.7,1.374,11.554,11.554,0,0,1,1.473,3.9,57.514,57.514,0,0,1,.98,6.451c.245,2.209.418,4.613.589,7.361V85.2a15.139,15.139,0,0,1,0,2.11A2.231,2.231,0,0,1,54,89.346a19.957,19.957,0,0,1-2.6.27Z' - }), - react_default.a.createElement('path', { - id: 'Fill-77', - class: 'cls-4', - d: - 'M62.957,86.869a2.136,2.136,0,0,1-2.012-1.449c-.393-.956-.711-1.937-1.032-2.943l-.318-.932c-.957-2.895-1.963-5.742-2.969-8.588l-1.2-3.386c-.343-1-.613-1.937-.834-2.845a2.563,2.563,0,0,1,4-2.454,12.045,12.045,0,0,1,1.693,1.619c1.865,2.037,3.533,4.221,5.152,6.33,2.11,2.748,3.7,4.908,5.177,6.993a5.7,5.7,0,0,1,.515.808,2.515,2.515,0,0,1,.368.492l.123.49a2.256,2.256,0,0,1-.883,1.938A20.153,20.153,0,0,1,68.6,84.39a31.353,31.353,0,0,1-3.95,2.11,4.253,4.253,0,0,1-.662.245,2.63,2.63,0,0,1-1.007.123Z' - }), - react_default.a.createElement('path', { - id: 'Fill-79', - class: 'cls-4', - d: - 'M29.321,83.115a3.164,3.164,0,0,1-1.815-.762A33.386,33.386,0,0,1,22.6,77.914a2.7,2.7,0,0,1-.908-2.111,2.623,2.623,0,0,1,1.3-1.912c1.129-.859,2.257-1.718,3.41-2.454,2.012-1.471,3.8-2.845,5.618-4.219l3.827-2.9A22.483,22.483,0,0,1,38.5,62.555a2.862,2.862,0,0,1,1.1-.44,2.626,2.626,0,0,1,2.183,1.153,2.452,2.452,0,0,1,.27,2.527,22.325,22.325,0,0,1-1.84,3.337c-2.085,3.287-4.244,6.33-6.845,9.985l-.221.294q-.907,1.325-1.914,2.575a2.648,2.648,0,0,1-1.914,1.13' - }), - react_default.a.createElement('path', { - id: 'Fill-81', - class: 'cls-4', - d: - 'M77.431,75.215a3.113,3.113,0,0,1-1.693-.638c-2.453-1.668-4.907-3.484-6.82-5.054a65.292,65.292,0,0,1-5.592-4.907A16.409,16.409,0,0,1,60.871,61.6a2.87,2.87,0,0,1-.146-2.87,13.888,13.888,0,0,0,.785-2.16,2.747,2.747,0,0,1,2.06-2.06,9.842,9.842,0,0,1,3.018-.222,37.675,37.675,0,0,1,5.765.737c3.386.661,6.895,1.472,10.4,2.453a5.314,5.314,0,0,1,.81.293,2.259,2.259,0,0,1,1.547,2.773c-.2,1.006-.443,1.987-.713,2.943a36.357,36.357,0,0,1-4.906,10.354,2.456,2.456,0,0,1-2.062,1.374' - }), - react_default.a.createElement('path', { - id: 'Fill-83', - class: 'cls-14', - d: 'M83.221,60.2l-1.791-.417,1.791.368-1.791-.368Z' - }), - react_default.a.createElement('path', { - id: 'Fill-85', - class: 'cls-4', - d: - 'M18.576,70.014a2.134,2.134,0,0,1-1.987-1.251c-.417-.811-.736-1.644-1.079-2.453a37.066,37.066,0,0,1-1.938-7.36,34.345,34.345,0,0,1-.393-4.662,2.257,2.257,0,0,1,2.052-2.444c.051,0,.1-.008.156-.008a33.14,33.14,0,0,1,3.459,0H21.03c2.035,0,4.342.123,6.6.318a32.538,32.538,0,0,1,5.985.86,11.907,11.907,0,0,1,1.915.687,2.845,2.845,0,0,1,1.717,2.11,12.388,12.388,0,0,0,.686,2.453,2.67,2.67,0,0,1-.514,2.624A10.723,10.723,0,0,1,34.7,63.342a58.8,58.8,0,0,1-6.452,3.238c-3.362,1.349-5.814,2.38-8.268,3.263l-.492.147a3.229,3.229,0,0,1-.883.123Z' - }), - react_default.a.createElement('path', { - id: 'Fill-87', - class: 'cls-14', - d: 'M18.576,66.358,19.337,68l-.59-1.645Z' - }), - react_default.a.createElement('path', { - id: 'Fill-89', - class: 'cls-14', - d: 'M19.95,67.094Z' - }), - react_default.a.createElement('path', { - id: 'Fill-91', - class: 'cls-4', - d: - 'M65.336,52.791H63.668a2.453,2.453,0,0,1-1.178-4.71,20.867,20.867,0,0,1,3.337-1.644c4.146-1.667,8.637-3.238,14.72-5.1a7.143,7.143,0,0,1,.785-.222,2.26,2.26,0,0,1,2.8,1.5c.318.981.588,1.963.808,2.969a35.016,35.016,0,0,1,.687,4.146,2.282,2.282,0,0,1-2.428,2.8h-6.65l-10.525.27Z' - }), - react_default.a.createElement('path', { - id: 'Fill-93', - class: 'cls-4', - d: - 'M35.823,50.387a18.963,18.963,0,0,1-3.067-.588c-5.446-1.375-10.8-3.067-15.407-4.589a8.25,8.25,0,0,1-.981-.391,2.111,2.111,0,0,1-1.338-2.667.952.952,0,0,1,.038-.1A22.1,22.1,0,0,1,16,39.592,39.216,39.216,0,0,1,18.11,35.4a2.233,2.233,0,0,1,3.389-.86c.859.54,1.668,1.13,2.453,1.717l.736.54c2.012,1.424,4.023,2.846,6.06,4.244l4.465,3.092a19.58,19.58,0,0,1,2.453,1.962,2.575,2.575,0,0,1-1.84,4.367Z' - }), - react_default.a.createElement('path', { - id: 'Fill-95', - class: 'cls-14', - d: 'M16.81,42.61l1.742.589Z' - }), - react_default.a.createElement('path', { - id: 'Fill-97', - class: 'cls-4', - d: - 'M59.841,45.383a2.6,2.6,0,0,1-1.791-.736A13.717,13.717,0,0,0,56.063,43.1a2.823,2.823,0,0,1-1.251-2.6,12.234,12.234,0,0,1,.981-3.754A58.68,58.68,0,0,1,59.4,29.828c1.4-2.453,2.7-4.491,4.023-6.452a8.079,8.079,0,0,1,.54-.761,2.281,2.281,0,0,1,3.067-.762,38.019,38.019,0,0,1,5.4,3.657,36.428,36.428,0,0,1,5.913,6.084,2.182,2.182,0,0,1-.188,3.081,1.653,1.653,0,0,1-.13.108,22.453,22.453,0,0,1-2.282,1.742l-.417.319A110.811,110.811,0,0,1,65.7,43.125a22.811,22.811,0,0,1-4.391,2.011l-.761.173h-.515Z' - }), - react_default.a.createElement('path', { - id: 'Fill-99', - class: 'cls-4', - d: - 'M39.847,44.67a3.244,3.244,0,0,1-1.179-.245,11.676,11.676,0,0,1-2.453-1.57,42.669,42.669,0,0,1-3.973-3.631c-2.331-2.453-4.686-5.175-7.213-8.317a5.8,5.8,0,0,1-.466-.638l-.172-.245a2.181,2.181,0,0,1,.49-2.992,36.746,36.746,0,0,1,8.071-5.667,37.562,37.562,0,0,1,4.761-2.037,2.159,2.159,0,0,1,2.821,1.166l.025.06a16.047,16.047,0,0,1,.785,2.134,111.417,111.417,0,0,1,3.165,11.581,24,24,0,0,1,.638,4.906v1.277a2.724,2.724,0,0,1-1.423,2.109,15.33,15.33,0,0,0-2.11,1.447,2.721,2.721,0,0,1-1.766.662' - }), - react_default.a.createElement('path', { - id: 'Fill-101', - class: 'cls-4', - d: - 'M50.714,41.384h-.269a2.452,2.452,0,0,1-2.282-1.889,22.659,22.659,0,0,1-.467-3.509c-.2-2.65-.269-5.274-.318-8.07v-7.8a5.882,5.882,0,0,1,0-.687,2.11,2.11,0,0,1,2.158-2.037,34.888,34.888,0,0,1,3.95.246,35.9,35.9,0,0,1,3.608.588,2.451,2.451,0,0,1,1.643.958,2.258,2.258,0,0,1,.222,1.79c-.2.811-.466,1.619-.711,2.454l-.2.563c-1.129,3.509-2.183,7.042-3.237,10.6L54.149,36.8a27.178,27.178,0,0,1-1.1,3.165,2.454,2.454,0,0,1-2.258,1.423Z' - }), - react_default.a.createElement('path', { - id: 'Fill-103', - class: 'cls-15', - d: - 'M49.414,86.034h2.8v-.86c-.148-2.673-.345-4.906-.564-7.163a57.925,57.925,0,0,0-.909-6.035,11.049,11.049,0,0,0-.785-2.454,15.835,15.835,0,0,1-2.158,0,8.592,8.592,0,0,0-1.007,1.522,47.992,47.992,0,0,0-2.845,6.427c-1.105,2.872-1.939,5.3-2.626,7.581a30.368,30.368,0,0,0,8.1.982' - }), - react_default.a.createElement('path', { - id: 'Fill-105', - class: 'cls-15', - d: - 'M59.767,70.7l.319.907c1.03,2.895,2.036,5.765,3.018,8.661l.319.981c.147.49.294.956.466,1.447.859-.443,1.766-.932,2.7-1.521l.761-.466c-1.374-1.914-2.869-3.925-4.907-6.477-.761-1.081-1.717-2.332-2.674-3.533' - }), - react_default.a.createElement('path', { - id: 'Fill-107', - class: 'cls-15', - d: - 'M26.083,76.2A33.615,33.615,0,0,0,29,78.869l1.251-1.717.221-.318c2.159-2.993,4-5.594,5.716-8.219L34.3,70.038c-1.815,1.4-3.654,2.772-5.5,4.146Z' - }), - react_default.a.createElement('path', { - id: 'Fill-109', - class: 'cls-15', - d: - 'M64.134,60.053a12.148,12.148,0,0,0,1.742,2.036,63.623,63.623,0,0,0,5.275,4.539c1.815,1.424,3.754,2.921,5.814,4.342a32.223,32.223,0,0,0,3.8-8.487,15.062,15.062,0,0,0,.417-1.6C77.945,60,74.73,59.239,71.589,58.65a35.667,35.667,0,0,0-5.2-.686,5.885,5.885,0,0,0-1.521,0,18.336,18.336,0,0,1-.736,2.084' - }), - react_default.a.createElement('path', { - id: 'Fill-111', - class: 'cls-15', - d: - 'M16.932,55.466a25.5,25.5,0,0,0,.319,2.969,33.543,33.543,0,0,0,1.717,6.6l.443,1.054c2.134-.808,4.439-1.741,7.359-2.992a55.023,55.023,0,0,0,6.011-3.018,9.871,9.871,0,0,0,1.6-1.178,16.161,16.161,0,0,1-.59-2.062l-1.03-.342a32.165,32.165,0,0,0-5.422-.736c-2.183-.173-4.416-.245-6.353-.294Z' - }), - react_default.a.createElement('path', { - id: 'Fill-113', - class: 'cls-15', - d: - 'M80.915,44.989c-4.636,1.472-8.366,2.748-11.751,4.048l7.237-.2h5.348c-.147-.858-.294-1.668-.466-2.453s-.245-.957-.368-1.4' - }), - react_default.a.createElement('path', { - id: 'Fill-115', - class: 'cls-15', - d: - 'M19.017,41.923c3.631,1.179,7.729,2.453,11.923,3.631l-2.257-1.569c-2.061-1.424-4.1-2.822-6.133-4.269l-.761-.564-1.127-.811a25.38,25.38,0,0,0-1.251,2.626c-.147.293-.271.637-.394.956' - }), - react_default.a.createElement('path', { - id: 'Fill-117', - class: 'cls-15', - d: - 'M58.541,40.328a14.1,14.1,0,0,1,1.644,1.3,18.1,18.1,0,0,0,3.63-1.668,108.514,108.514,0,0,0,9.373-6.06l.417-.319,1.006-.711A33.888,33.888,0,0,0,70.1,28.405a34.279,34.279,0,0,0-3.8-2.674c-1.2,1.84-2.453,3.8-3.73,6.011a53.391,53.391,0,0,0-3.335,6.427,8.338,8.338,0,0,0-.687,2.16' - }), - react_default.a.createElement('path', { - id: 'Fill-119', - class: 'cls-15', - d: - 'M28.168,28.994c2.453,2.919,4.588,5.471,6.771,7.777A41.162,41.162,0,0,0,38.4,40.058a9.817,9.817,0,0,0,1.276.859,19.779,19.779,0,0,1,1.742-1.178.912.912,0,0,1,0-.27,19.346,19.346,0,0,0-.564-4.367,103.606,103.606,0,0,0-3.067-11.015,5.18,5.18,0,0,0-.245-.736A30.145,30.145,0,0,0,34.5,24.725a32.244,32.244,0,0,0-6.33,4.269' - }), - react_default.a.createElement('path', { - id: 'Fill-121', - class: 'cls-15', - d: - 'M51.009,21.069v6.673c0,1.963,0,3.827.171,5.644,1.056-3.558,2.111-7.116,3.264-10.649l.171-.588a2.861,2.861,0,0,1,.246-.736l-1.791-.245a19.769,19.769,0,0,0-1.988-.1Z' - }), - react_default.a.createElement('path', { - id: 'Fill-123', - class: 'cls-4', - d: - 'M49.414,4.461A49.067,49.067,0,1,0,98.48,53.527,49.067,49.067,0,0,0,49.414,4.461m0,7.36A41.707,41.707,0,1,1,7.708,53.527,41.707,41.707,0,0,1,49.414,11.821' - }), - react_default.a.createElement('path', { - id: 'Fill-125', - class: 'cls-14', - d: - 'M49.414,49.847a3.68,3.68,0,1,1-3.68,3.68,3.68,3.68,0,0,1,3.68-3.68' - }) - ) - ) - ) - ), - react_default.a.createElement( - 'g', - { transform: 'translate(404.03 80.338)' }, - react_default.a.createElement( - 'g', - { transform: 'translate(50.00 54.0)' }, - react_default.a.createElement( - 'g', - { id: 'Circleelement' }, - react_default.a.createElement( - 'g', - { transform: 'translate(-50.00 -54.0)' }, - react_default.a.createElement('path', { - id: 'Fill-73', - class: 'cls-13', - d: - 'M93.775,54.234A44.065,44.065,0,1,1,49.71,10.168,44.065,44.065,0,0,1,93.775,54.234' - }), - react_default.a.createElement('path', { - id: 'Fill-75', - class: 'cls-4', - d: - 'M50.469,89.714H49.414a34.789,34.789,0,0,1-10.033-1.4,2.454,2.454,0,0,1-1.915-3.484c.761-2.6,1.693-5.373,2.944-8.685a53.247,53.247,0,0,1,3.116-6.918,13.824,13.824,0,0,1,1.717-2.453,2.919,2.919,0,0,1,2.674-.981,11.237,11.237,0,0,0,2.208,0,2.77,2.77,0,0,1,2.7,1.374,11.554,11.554,0,0,1,1.473,3.9,57.514,57.514,0,0,1,.98,6.451c.245,2.209.418,4.613.589,7.361V85.2a15.139,15.139,0,0,1,0,2.11A2.231,2.231,0,0,1,54,89.346a19.957,19.957,0,0,1-2.6.27Z' - }), - react_default.a.createElement('path', { - id: 'Fill-77', - class: 'cls-4', - d: - 'M62.957,86.869a2.136,2.136,0,0,1-2.012-1.449c-.393-.956-.711-1.937-1.032-2.943l-.318-.932c-.957-2.895-1.963-5.742-2.969-8.588l-1.2-3.386c-.343-1-.613-1.937-.834-2.845a2.563,2.563,0,0,1,4-2.454,12.045,12.045,0,0,1,1.693,1.619c1.865,2.037,3.533,4.221,5.152,6.33,2.11,2.748,3.7,4.908,5.177,6.993a5.7,5.7,0,0,1,.515.808,2.515,2.515,0,0,1,.368.492l.123.49a2.256,2.256,0,0,1-.883,1.938A20.153,20.153,0,0,1,68.6,84.39a31.353,31.353,0,0,1-3.95,2.11,4.253,4.253,0,0,1-.662.245,2.63,2.63,0,0,1-1.007.123Z' - }), - react_default.a.createElement('path', { - id: 'Fill-79', - class: 'cls-4', - d: - 'M29.321,83.115a3.164,3.164,0,0,1-1.815-.762A33.386,33.386,0,0,1,22.6,77.914a2.7,2.7,0,0,1-.908-2.111,2.623,2.623,0,0,1,1.3-1.912c1.129-.859,2.257-1.718,3.41-2.454,2.012-1.471,3.8-2.845,5.618-4.219l3.827-2.9A22.483,22.483,0,0,1,38.5,62.555a2.862,2.862,0,0,1,1.1-.44,2.626,2.626,0,0,1,2.183,1.153,2.452,2.452,0,0,1,.27,2.527,22.325,22.325,0,0,1-1.84,3.337c-2.085,3.287-4.244,6.33-6.845,9.985l-.221.294q-.907,1.325-1.914,2.575a2.648,2.648,0,0,1-1.914,1.13' - }), - react_default.a.createElement('path', { - id: 'Fill-81', - class: 'cls-4', - d: - 'M77.431,75.215a3.113,3.113,0,0,1-1.693-.638c-2.453-1.668-4.907-3.484-6.82-5.054a65.292,65.292,0,0,1-5.592-4.907A16.409,16.409,0,0,1,60.871,61.6a2.87,2.87,0,0,1-.146-2.87,13.888,13.888,0,0,0,.785-2.16,2.747,2.747,0,0,1,2.06-2.06,9.842,9.842,0,0,1,3.018-.222,37.675,37.675,0,0,1,5.765.737c3.386.661,6.895,1.472,10.4,2.453a5.314,5.314,0,0,1,.81.293,2.259,2.259,0,0,1,1.547,2.773c-.2,1.006-.443,1.987-.713,2.943a36.357,36.357,0,0,1-4.906,10.354,2.456,2.456,0,0,1-2.062,1.374' - }), - react_default.a.createElement('path', { - id: 'Fill-83', - class: 'cls-14', - d: 'M83.221,60.2l-1.791-.417,1.791.368-1.791-.368Z' - }), - react_default.a.createElement('path', { - id: 'Fill-85', - class: 'cls-4', - d: - 'M18.576,70.014a2.134,2.134,0,0,1-1.987-1.251c-.417-.811-.736-1.644-1.079-2.453a37.066,37.066,0,0,1-1.938-7.36,34.345,34.345,0,0,1-.393-4.662,2.257,2.257,0,0,1,2.052-2.444c.051,0,.1-.008.156-.008a33.14,33.14,0,0,1,3.459,0H21.03c2.035,0,4.342.123,6.6.318a32.538,32.538,0,0,1,5.985.86,11.907,11.907,0,0,1,1.915.687,2.845,2.845,0,0,1,1.717,2.11,12.388,12.388,0,0,0,.686,2.453,2.67,2.67,0,0,1-.514,2.624A10.723,10.723,0,0,1,34.7,63.342a58.8,58.8,0,0,1-6.452,3.238c-3.362,1.349-5.814,2.38-8.268,3.263l-.492.147a3.229,3.229,0,0,1-.883.123Z' - }), - react_default.a.createElement('path', { - id: 'Fill-87', - class: 'cls-14', - d: 'M18.576,66.358,19.337,68l-.59-1.645Z' - }), - react_default.a.createElement('path', { - id: 'Fill-89', - class: 'cls-14', - d: 'M19.95,67.094Z' - }), - react_default.a.createElement('path', { - id: 'Fill-91', - class: 'cls-4', - d: - 'M65.336,52.791H63.668a2.453,2.453,0,0,1-1.178-4.71,20.867,20.867,0,0,1,3.337-1.644c4.146-1.667,8.637-3.238,14.72-5.1a7.143,7.143,0,0,1,.785-.222,2.26,2.26,0,0,1,2.8,1.5c.318.981.588,1.963.808,2.969a35.016,35.016,0,0,1,.687,4.146,2.282,2.282,0,0,1-2.428,2.8h-6.65l-10.525.27Z' - }), - react_default.a.createElement('path', { - id: 'Fill-93', - class: 'cls-4', - d: - 'M35.823,50.387a18.963,18.963,0,0,1-3.067-.588c-5.446-1.375-10.8-3.067-15.407-4.589a8.25,8.25,0,0,1-.981-.391,2.111,2.111,0,0,1-1.338-2.667.952.952,0,0,1,.038-.1A22.1,22.1,0,0,1,16,39.592,39.216,39.216,0,0,1,18.11,35.4a2.233,2.233,0,0,1,3.389-.86c.859.54,1.668,1.13,2.453,1.717l.736.54c2.012,1.424,4.023,2.846,6.06,4.244l4.465,3.092a19.58,19.58,0,0,1,2.453,1.962,2.575,2.575,0,0,1-1.84,4.367Z' - }), - react_default.a.createElement('path', { - id: 'Fill-95', - class: 'cls-14', - d: 'M16.81,42.61l1.742.589Z' - }), - react_default.a.createElement('path', { - id: 'Fill-97', - class: 'cls-4', - d: - 'M59.841,45.383a2.6,2.6,0,0,1-1.791-.736A13.717,13.717,0,0,0,56.063,43.1a2.823,2.823,0,0,1-1.251-2.6,12.234,12.234,0,0,1,.981-3.754A58.68,58.68,0,0,1,59.4,29.828c1.4-2.453,2.7-4.491,4.023-6.452a8.079,8.079,0,0,1,.54-.761,2.281,2.281,0,0,1,3.067-.762,38.019,38.019,0,0,1,5.4,3.657,36.428,36.428,0,0,1,5.913,6.084,2.182,2.182,0,0,1-.188,3.081,1.653,1.653,0,0,1-.13.108,22.453,22.453,0,0,1-2.282,1.742l-.417.319A110.811,110.811,0,0,1,65.7,43.125a22.811,22.811,0,0,1-4.391,2.011l-.761.173h-.515Z' - }), - react_default.a.createElement('path', { - id: 'Fill-99', - class: 'cls-4', - d: - 'M39.847,44.67a3.244,3.244,0,0,1-1.179-.245,11.676,11.676,0,0,1-2.453-1.57,42.669,42.669,0,0,1-3.973-3.631c-2.331-2.453-4.686-5.175-7.213-8.317a5.8,5.8,0,0,1-.466-.638l-.172-.245a2.181,2.181,0,0,1,.49-2.992,36.746,36.746,0,0,1,8.071-5.667,37.562,37.562,0,0,1,4.761-2.037,2.159,2.159,0,0,1,2.821,1.166l.025.06a16.047,16.047,0,0,1,.785,2.134,111.417,111.417,0,0,1,3.165,11.581,24,24,0,0,1,.638,4.906v1.277a2.724,2.724,0,0,1-1.423,2.109,15.33,15.33,0,0,0-2.11,1.447,2.721,2.721,0,0,1-1.766.662' - }), - react_default.a.createElement('path', { - id: 'Fill-101', - class: 'cls-4', - d: - 'M50.714,41.384h-.269a2.452,2.452,0,0,1-2.282-1.889,22.659,22.659,0,0,1-.467-3.509c-.2-2.65-.269-5.274-.318-8.07v-7.8a5.882,5.882,0,0,1,0-.687,2.11,2.11,0,0,1,2.158-2.037,34.888,34.888,0,0,1,3.95.246,35.9,35.9,0,0,1,3.608.588,2.451,2.451,0,0,1,1.643.958,2.258,2.258,0,0,1,.222,1.79c-.2.811-.466,1.619-.711,2.454l-.2.563c-1.129,3.509-2.183,7.042-3.237,10.6L54.149,36.8a27.178,27.178,0,0,1-1.1,3.165,2.454,2.454,0,0,1-2.258,1.423Z' - }), - react_default.a.createElement('path', { - id: 'Fill-103', - class: 'cls-15', - d: - 'M49.414,86.034h2.8v-.86c-.148-2.673-.345-4.906-.564-7.163a57.925,57.925,0,0,0-.909-6.035,11.049,11.049,0,0,0-.785-2.454,15.835,15.835,0,0,1-2.158,0,8.592,8.592,0,0,0-1.007,1.522,47.992,47.992,0,0,0-2.845,6.427c-1.105,2.872-1.939,5.3-2.626,7.581a30.368,30.368,0,0,0,8.1.982' - }), - react_default.a.createElement('path', { - id: 'Fill-105', - class: 'cls-15', - d: - 'M59.767,70.7l.319.907c1.03,2.895,2.036,5.765,3.018,8.661l.319.981c.147.49.294.956.466,1.447.859-.443,1.766-.932,2.7-1.521l.761-.466c-1.374-1.914-2.869-3.925-4.907-6.477-.761-1.081-1.717-2.332-2.674-3.533' - }), - react_default.a.createElement('path', { - id: 'Fill-107', - class: 'cls-15', - d: - 'M26.083,76.2A33.615,33.615,0,0,0,29,78.869l1.251-1.717.221-.318c2.159-2.993,4-5.594,5.716-8.219L34.3,70.038c-1.815,1.4-3.654,2.772-5.5,4.146Z' - }), - react_default.a.createElement('path', { - id: 'Fill-109', - class: 'cls-15', - d: - 'M64.134,60.053a12.148,12.148,0,0,0,1.742,2.036,63.623,63.623,0,0,0,5.275,4.539c1.815,1.424,3.754,2.921,5.814,4.342a32.223,32.223,0,0,0,3.8-8.487,15.062,15.062,0,0,0,.417-1.6C77.945,60,74.73,59.239,71.589,58.65a35.667,35.667,0,0,0-5.2-.686,5.885,5.885,0,0,0-1.521,0,18.336,18.336,0,0,1-.736,2.084' - }), - react_default.a.createElement('path', { - id: 'Fill-111', - class: 'cls-15', - d: - 'M16.932,55.466a25.5,25.5,0,0,0,.319,2.969,33.543,33.543,0,0,0,1.717,6.6l.443,1.054c2.134-.808,4.439-1.741,7.359-2.992a55.023,55.023,0,0,0,6.011-3.018,9.871,9.871,0,0,0,1.6-1.178,16.161,16.161,0,0,1-.59-2.062l-1.03-.342a32.165,32.165,0,0,0-5.422-.736c-2.183-.173-4.416-.245-6.353-.294Z' - }), - react_default.a.createElement('path', { - id: 'Fill-113', - class: 'cls-15', - d: - 'M80.915,44.989c-4.636,1.472-8.366,2.748-11.751,4.048l7.237-.2h5.348c-.147-.858-.294-1.668-.466-2.453s-.245-.957-.368-1.4' - }), - react_default.a.createElement('path', { - id: 'Fill-115', - class: 'cls-15', - d: - 'M19.017,41.923c3.631,1.179,7.729,2.453,11.923,3.631l-2.257-1.569c-2.061-1.424-4.1-2.822-6.133-4.269l-.761-.564-1.127-.811a25.38,25.38,0,0,0-1.251,2.626c-.147.293-.271.637-.394.956' - }), - react_default.a.createElement('path', { - id: 'Fill-117', - class: 'cls-15', - d: - 'M58.541,40.328a14.1,14.1,0,0,1,1.644,1.3,18.1,18.1,0,0,0,3.63-1.668,108.514,108.514,0,0,0,9.373-6.06l.417-.319,1.006-.711A33.888,33.888,0,0,0,70.1,28.405a34.279,34.279,0,0,0-3.8-2.674c-1.2,1.84-2.453,3.8-3.73,6.011a53.391,53.391,0,0,0-3.335,6.427,8.338,8.338,0,0,0-.687,2.16' - }), - react_default.a.createElement('path', { - id: 'Fill-119', - class: 'cls-15', - d: - 'M28.168,28.994c2.453,2.919,4.588,5.471,6.771,7.777A41.162,41.162,0,0,0,38.4,40.058a9.817,9.817,0,0,0,1.276.859,19.779,19.779,0,0,1,1.742-1.178.912.912,0,0,1,0-.27,19.346,19.346,0,0,0-.564-4.367,103.606,103.606,0,0,0-3.067-11.015,5.18,5.18,0,0,0-.245-.736A30.145,30.145,0,0,0,34.5,24.725a32.244,32.244,0,0,0-6.33,4.269' - }), - react_default.a.createElement('path', { - id: 'Fill-121', - class: 'cls-15', - d: - 'M51.009,21.069v6.673c0,1.963,0,3.827.171,5.644,1.056-3.558,2.111-7.116,3.264-10.649l.171-.588a2.861,2.861,0,0,1,.246-.736l-1.791-.245a19.769,19.769,0,0,0-1.988-.1Z' - }), - react_default.a.createElement('path', { - id: 'Fill-123', - class: 'cls-4', - d: - 'M49.414,4.461A49.067,49.067,0,1,0,98.48,53.527,49.067,49.067,0,0,0,49.414,4.461m0,7.36A41.707,41.707,0,1,1,7.708,53.527,41.707,41.707,0,0,1,49.414,11.821' - }), - react_default.a.createElement('path', { - id: 'Fill-125', - class: 'cls-14', - d: - 'M49.414,49.847a3.68,3.68,0,1,1-3.68,3.68,3.68,3.68,0,0,1,3.68-3.68' - }) - ) - ) - ) - ) - ) - ) - ) - ); - }; - __webpack_exports__.a = Object(withDocs.a)( - '# Car Color\n\nGo ahead and change the color of the Tesla!\n\n\x3c!-- STORY --\x3e\n\n```jsx\nimport { Form, Select, Debug } from \'informed\';\n\nconst Car = () => {\n const { value } = useFieldState(\'color\');\n\n return
{\'...SVG...\'}
;\n};\n\nconst CarColor = () => (\n
\n \n \n \n
\n \n \n);\n```\n', - function Basic() { - return react_default.a.createElement( - src.f, - { autocomplete: 'off' }, - react_default.a.createElement( - src.t, - { name: 'color', label: 'Color', initialValue: 'blue' }, - react_default.a.createElement('option', { value: 'red' }, 'Red'), - react_default.a.createElement( - 'option', - { value: 'green' }, - 'Green' - ), - react_default.a.createElement( - 'option', - { value: 'blue' }, - 'Blue' - ), - react_default.a.createElement('option', { value: 'pink' }, 'Pink') - ), - react_default.a.createElement( - 'button', - { type: 'submit' }, - 'Submit' - ), - react_default.a.createElement(src.c, { values: !0 }), - react_default.a.createElement('br', null), - react_default.a.createElement(CarColor_SVG, null) - ); - } - ); - }, - './stories/CustomInputs/FormattedObjectInput/index.js': function( - module, - __webpack_exports__, - __webpack_require__ - ) { - 'use strict'; - var react = __webpack_require__('./node_modules/react/index.js'), - react_default = __webpack_require__.n(react), - Code = __webpack_require__('./stories/utils/Code.js'), - withDocs = __webpack_require__('./stories/utils/withDocs.js'), - src = __webpack_require__('./src/index.js'), - _excluded = ['onChange', 'onBlur']; - function _extends() { - return ( - (_extends = - Object.assign || - function(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i]; - for (var key in source) - Object.prototype.hasOwnProperty.call(source, key) && - (target[key] = source[key]); - } - return target; - }), - _extends.apply(this, arguments) - ); - } - function _objectWithoutProperties(source, excluded) { - if (null == source) return {}; - var key, - i, - target = (function _objectWithoutPropertiesLoose(source, excluded) { - if (null == source) return {}; - var key, - i, - target = {}, - sourceKeys = Object.keys(source); - for (i = 0; i < sourceKeys.length; i++) - (key = sourceKeys[i]), - excluded.indexOf(key) >= 0 || (target[key] = source[key]); - return target; - })(source, excluded); - if (Object.getOwnPropertySymbols) { - var sourceSymbolKeys = Object.getOwnPropertySymbols(source); - for (i = 0; i < sourceSymbolKeys.length; i++) - (key = sourceSymbolKeys[i]), - excluded.indexOf(key) >= 0 || - (Object.prototype.propertyIsEnumerable.call(source, key) && - (target[key] = source[key])); - } - return target; - } - function ownKeys(object, enumerableOnly) { - var keys = Object.keys(object); - if (Object.getOwnPropertySymbols) { - var symbols = Object.getOwnPropertySymbols(object); - enumerableOnly && - (symbols = symbols.filter(function(sym) { - return Object.getOwnPropertyDescriptor(object, sym).enumerable; - })), - keys.push.apply(keys, symbols); - } - return keys; - } - function _objectSpread(target) { - for (var i = 1; i < arguments.length; i++) { - var source = null != arguments[i] ? arguments[i] : {}; - i % 2 - ? ownKeys(Object(source), !0).forEach(function(key) { - _defineProperty(target, key, source[key]); - }) - : Object.getOwnPropertyDescriptors - ? Object.defineProperties( - target, - Object.getOwnPropertyDescriptors(source) - ) - : ownKeys(Object(source)).forEach(function(key) { - Object.defineProperty( - target, - key, - Object.getOwnPropertyDescriptor(source, key) - ); - }); - } - return target; - } - function _defineProperty(obj, key, value) { - return ( - key in obj - ? Object.defineProperty(obj, key, { - value: value, - enumerable: !0, - configurable: !0, - writable: !0 - }) - : (obj[key] = value), - obj - ); - } - src.I.informedFormat; - var formatter = [ - '+', - '1', - ' ', - /\d/, - /\d/, - /\d/, - '-', - /\d/, - /\d/, - /\d/, - '-', - /\d/, - /\d/, - /\d/, - /\d/ - ], - parser = function parser(value) { - return value.replace('+1 ', '').replace(/-/g, ''); - }, - FormattedObjectInput_FormattedObjectInput = function FormattedObjectInput( - props - ) { - var refA = Object(react.useRef)(), - refB = Object(react.useRef)(), - _useField = Object(src.y)( - _objectSpread( - _objectSpread({}, props), - {}, - { - inputRefs: { a: refA, b: refB }, - formatter: { a: formatter, b: formatter }, - parser: { a: parser, b: parser } - } - ) - ), - fieldState = _useField.fieldState, - fieldApi = _useField.fieldApi, - render = _useField.render, - userProps = _useField.userProps, - maskedValue = fieldState.maskedValue, - setValue = fieldApi.setValue, - setTouched = fieldApi.setTouched, - rest = (userProps.onChange, - userProps.onBlur, - _objectWithoutProperties(userProps, _excluded)), - v = maskedValue || {}, - a = v.a, - b = v.b; - return render( - react_default.a.createElement( - react_default.a.Fragment, - null, - react_default.a.createElement( - 'input', - _extends({}, rest, { - ref: refA, - value: a || '', - onChange: function aChange(e) { - var newVal = _objectSpread({}, v), - val = e.target.value; - (newVal.a = val), setValue(newVal, e, 'a'); - }, - onBlur: function onBlur() { - return setTouched; - } - }) - ), - react_default.a.createElement( - 'input', - _extends({}, rest, { - ref: refB, - value: b || '', - onChange: function bChange(e) { - var newVal = _objectSpread({}, v), - val = e.target.value; - (newVal.b = val), setValue(newVal, e, 'b'); - }, - onBlur: function onBlur() { - return setTouched(); - } - }) - ) - ) - ); - }; - __webpack_exports__.a = Object(withDocs.a)( - "## Formatted Object Input\n\nSometimes you need to make object inputs that also format per field.\n\n\x3c!-- STORY --\x3e\n\n\x3c!-- IDFK Strange issue where i need this commnet or code formatting is messed up --\x3e\n\n```jsx\nimport React, { useRef } from 'react';\nimport { Form, useField, useCursorPosition, utils } from 'informed';\nconst { informedFormat } = utils;\n\nconst formatter = [\n '+',\n '1',\n ' ',\n /\\d/,\n /\\d/,\n /\\d/,\n '-',\n /\\d/,\n /\\d/,\n /\\d/,\n '-',\n /\\d/,\n /\\d/,\n /\\d/,\n /\\d/\n];\n\nconst initialize = ({ a, b }) => {\n return {\n a: informedFormat(a, formatter).value,\n b: informedFormat(b, formatter).value\n };\n};\n\nconst FormattedObjectInput = props => {\n const refA = useRef();\n const refB = useRef();\n\n const { fieldState, fieldApi, render, userProps } = useField({\n ...props,\n inputRefs: {\n a: refA,\n b: refB\n },\n formatter: {\n a: formatter,\n b: formatter\n },\n parser: {\n a: parser,\n b: parser\n }\n });\n\n const { maskedValue } = fieldState;\n const { setValue, setTouched } = fieldApi;\n const { onChange, onBlur, ...rest } = userProps;\n\n const aChange = e => {\n const newVal = { ...v };\n\n const val = e.target.value;\n\n // update the \"a\" value\n newVal.a = val;\n\n setValue(newVal, e, 'a');\n };\n\n const bChange = e => {\n const newVal = { ...v };\n\n const val = e.target.value;\n\n // update the \"a\" value\n newVal.b = val;\n\n setValue(newVal, e, 'b');\n };\n\n const v = maskedValue || {};\n\n const { a, b } = v;\n\n return render(\n \n setTouched}\n />\n setTouched()}\n />\n \n );\n};\n\n
\n \n \n \n \n formApi.setValue('doublePhone', {\n a: '4324324321',\n b: '1231231234'\n })\n }>\n Set Value\n \n;\n```\n", - function Example() { - return react_default.a.createElement( - 'div', - null, - react_default.a.createElement(src.f, null, function(_ref) { - var formApi = _ref.formApi, - formState = _ref.formState; - return react_default.a.createElement( - react_default.a.Fragment, - null, - react_default.a.createElement( - 'label', - null, - 'Double Phone', - react_default.a.createElement( - FormattedObjectInput_FormattedObjectInput, - { - field: 'doublePhone', - initialValue: { a: '1231231234', b: '4324324321' } - } - ) - ), - react_default.a.createElement( - 'button', - { type: 'submit' }, - 'Submit' - ), - react_default.a.createElement( - 'button', - { - type: 'button', - onClick: function onClick() { - return formApi.reset(); - } - }, - 'Reset' - ), - react_default.a.createElement( - 'button', - { - type: 'button', - onClick: function onClick() { - return formApi.setValue('doublePhone', { - a: '4324324321', - b: '1231231234' - }); - } - }, - 'Set Value' - ), - react_default.a.createElement('label', null, 'Values:'), - react_default.a.createElement( - Code.a, - { language: 'language-js' }, - JSON.stringify(formState.values, null, 2) - ) - ); - }) - ); - } - ); - }, - './stories/CustomInputs/ObjectInput/index.js': function( - module, - __webpack_exports__, - __webpack_require__ - ) { - 'use strict'; - var react = __webpack_require__('./node_modules/react/index.js'), - react_default = __webpack_require__.n(react), - Code = __webpack_require__('./stories/utils/Code.js'), - withDocs = __webpack_require__('./stories/utils/withDocs.js'), - src = __webpack_require__('./src/index.js'), - _excluded = ['onChange', 'onBlur']; - function _extends() { - return ( - (_extends = - Object.assign || - function(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i]; - for (var key in source) - Object.prototype.hasOwnProperty.call(source, key) && - (target[key] = source[key]); - } - return target; - }), - _extends.apply(this, arguments) - ); - } - function ownKeys(object, enumerableOnly) { - var keys = Object.keys(object); - if (Object.getOwnPropertySymbols) { - var symbols = Object.getOwnPropertySymbols(object); - enumerableOnly && - (symbols = symbols.filter(function(sym) { - return Object.getOwnPropertyDescriptor(object, sym).enumerable; - })), - keys.push.apply(keys, symbols); - } - return keys; - } - function _objectSpread(target) { - for (var i = 1; i < arguments.length; i++) { - var source = null != arguments[i] ? arguments[i] : {}; - i % 2 - ? ownKeys(Object(source), !0).forEach(function(key) { - _defineProperty(target, key, source[key]); - }) - : Object.getOwnPropertyDescriptors - ? Object.defineProperties( - target, - Object.getOwnPropertyDescriptors(source) - ) - : ownKeys(Object(source)).forEach(function(key) { - Object.defineProperty( - target, - key, - Object.getOwnPropertyDescriptor(source, key) - ); - }); - } - return target; - } - function _defineProperty(obj, key, value) { - return ( - key in obj - ? Object.defineProperty(obj, key, { - value: value, - enumerable: !0, - configurable: !0, - writable: !0 - }) - : (obj[key] = value), - obj - ); - } - function _objectWithoutProperties(source, excluded) { - if (null == source) return {}; - var key, - i, - target = (function _objectWithoutPropertiesLoose(source, excluded) { - if (null == source) return {}; - var key, - i, - target = {}, - sourceKeys = Object.keys(source); - for (i = 0; i < sourceKeys.length; i++) - (key = sourceKeys[i]), - excluded.indexOf(key) >= 0 || (target[key] = source[key]); - return target; - })(source, excluded); - if (Object.getOwnPropertySymbols) { - var sourceSymbolKeys = Object.getOwnPropertySymbols(source); - for (i = 0; i < sourceSymbolKeys.length; i++) - (key = sourceSymbolKeys[i]), - excluded.indexOf(key) >= 0 || - (Object.prototype.propertyIsEnumerable.call(source, key) && - (target[key] = source[key])); - } - return target; - } - var ObjectInput_ObjectInput = function ObjectInput(props) { - var _useField = Object(src.y)(props), - fieldState = _useField.fieldState, - fieldApi = _useField.fieldApi, - render = _useField.render, - userProps = _useField.userProps, - value = fieldState.value, - setValue = fieldApi.setValue, - setTouched = fieldApi.setTouched, - rest = (userProps.onChange, - userProps.onBlur, - _objectWithoutProperties(userProps, _excluded)), - v = value || {}, - a = v.a, - b = v.b; - return render( - react_default.a.createElement( - react_default.a.Fragment, - null, - react_default.a.createElement( - 'input', - _extends({}, rest, { - value: a || '', - onChange: function aChange(e) { - var newVal = _objectSpread({}, v); - (newVal.a = e.target.value), setValue(newVal); - }, - onBlur: function onBlur() { - return setTouched; - } - }) - ), - react_default.a.createElement( - 'input', - _extends({}, rest, { - value: b || '', - onChange: function bChange(e) { - var newVal = _objectSpread({}, v); - (newVal.b = e.target.value), setValue(newVal); - }, - onBlur: function onBlur() { - return setTouched(); - } - }) - ) - ) - ); - }; - __webpack_exports__.a = Object(withDocs.a)( - "## Object Input\n\nSometimes you need to make object input. An input whos value is an object and made up of more than one phisical input element.\n\n\x3c!-- STORY --\x3e\n\n\x3c!-- IDFK Strange issue where i need this commnet or code formatting is messed up --\x3e\n\n```jsx\nimport React from 'react';\nimport { Form, useField } from 'informed';\n\nconst ObjectInput = props => {\n const { fieldState, fieldApi, render, userProps } = useField(props);\n\n const { value } = fieldState;\n const { setValue, setTouched } = fieldApi;\n const { onChange, onBlur, ...rest } = userProps;\n\n const v = value || {};\n\n const aChange = e => {\n const newVal = { ...v };\n\n newVal.a = e.target.value;\n\n setValue(newVal);\n };\n\n const bChange = e => {\n const newVal = { ...v };\n\n newVal.b = e.target.value;\n\n setValue(newVal);\n };\n\n const { a, b } = v;\n\n return render(\n \n setTouched}\n />\n setTouched()}\n />\n \n );\n};\n\n
\n \n \n
;\n```\n", - function Example() { - return react_default.a.createElement( - 'div', - null, - react_default.a.createElement(src.f, null, function(_ref) { - _ref.formApi; - var formState = _ref.formState; - return react_default.a.createElement( - react_default.a.Fragment, - null, - react_default.a.createElement( - 'label', - null, - 'Double Input', - react_default.a.createElement(ObjectInput_ObjectInput, { - field: 'doubleInput' - }) - ), - react_default.a.createElement( - 'button', - { type: 'submit' }, - 'Submit' - ), - react_default.a.createElement('label', null, 'Values:'), - react_default.a.createElement( - Code.a, - { language: 'language-js' }, - JSON.stringify(formState.values, null, 2) - ) - ); - }) - ); - } - ); - }, - './stories/CustomInputs/index.js': function( - module, - __webpack_exports__, - __webpack_require__ - ) { - 'use strict'; - var react = __webpack_require__('./node_modules/react/index.js'), - react_default = __webpack_require__.n(react), - withDocs = __webpack_require__('./stories/utils/withDocs.js'), - src = __webpack_require__('./src/index.js'), - _excluded = ['label']; - function _extends() { - return ( - (_extends = - Object.assign || - function(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i]; - for (var key in source) - Object.prototype.hasOwnProperty.call(source, key) && - (target[key] = source[key]); - } - return target; - }), - _extends.apply(this, arguments) - ); - } - function ownKeys(object, enumerableOnly) { - var keys = Object.keys(object); - if (Object.getOwnPropertySymbols) { - var symbols = Object.getOwnPropertySymbols(object); - enumerableOnly && - (symbols = symbols.filter(function(sym) { - return Object.getOwnPropertyDescriptor(object, sym).enumerable; - })), - keys.push.apply(keys, symbols); - } - return keys; - } - function _defineProperty(obj, key, value) { - return ( - key in obj - ? Object.defineProperty(obj, key, { - value: value, - enumerable: !0, - configurable: !0, - writable: !0 - }) - : (obj[key] = value), - obj - ); - } - function _objectWithoutProperties(source, excluded) { - if (null == source) return {}; - var key, - i, - target = (function _objectWithoutPropertiesLoose(source, excluded) { - if (null == source) return {}; - var key, - i, - target = {}, - sourceKeys = Object.keys(source); - for (i = 0; i < sourceKeys.length; i++) - (key = sourceKeys[i]), - excluded.indexOf(key) >= 0 || (target[key] = source[key]); - return target; - })(source, excluded); - if (Object.getOwnPropertySymbols) { - var sourceSymbolKeys = Object.getOwnPropertySymbols(source); - for (i = 0; i < sourceSymbolKeys.length; i++) - (key = sourceSymbolKeys[i]), - excluded.indexOf(key) >= 0 || - (Object.prototype.propertyIsEnumerable.call(source, key) && - (target[key] = source[key])); - } - return target; - } - var validate = function validate(value) { - return !value || value.length < 5 - ? 'Field must be at least five characters' - : void 0; - }, - ErrorTextField = react_default.a.memo(function(_ref) { - var label = _ref.label, - props = _objectWithoutProperties(_ref, _excluded), - _useField = Object(src.y)( - (function _objectSpread(target) { - for (var i = 1; i < arguments.length; i++) { - var source = null != arguments[i] ? arguments[i] : {}; - i % 2 - ? ownKeys(Object(source), !0).forEach(function(key) { - _defineProperty(target, key, source[key]); - }) - : Object.getOwnPropertyDescriptors - ? Object.defineProperties( - target, - Object.getOwnPropertyDescriptors(source) - ) - : ownKeys(Object(source)).forEach(function(key) { - Object.defineProperty( - target, - key, - Object.getOwnPropertyDescriptor(source, key) - ); - }); - } - return target; - })({ type: 'text' }, props) - ), - render = _useField.render, - informed = _useField.informed, - fieldState = _useField.fieldState, - ref = _useField.ref, - showError = fieldState.showError; - return render( - react_default.a.createElement( - 'label', - null, - label, - react_default.a.createElement( - 'input', - _extends({}, informed, { - ref: ref, - style: showError ? { border: 'solid 1px red' } : null - }) - ), - showError - ? react_default.a.createElement( - 'small', - { style: { color: 'red' } }, - fieldState.error - ) - : null - ) - ); - }), - Code = (Object(withDocs.a)( - "# Custom Inputs\n\nSometimes the inputs `informed` provides are not good enough. So we decided to\nhelp you out with that! Informed also gives you access to a useField hook.\n\n## Custom Text Input\n\nLets say you like `informed`'s text input but you want to show an error and turn\nit red when there is an error. You could achieve this with the following code.\n\n\x3c!-- IDFK Strange issue where i need this commnet or code formatting is messed up --\x3e\n\n```jsx\nimport { Form, BasicText, useField } from 'informed';\n\nconst validate = value => {\n return !value || value.length < 5\n ? 'Field must be at least five characters'\n : undefined;\n};\n\nexport const ErrorTextField = React.memo(({ label, ...props }) => {\n const { render, informed, ref, fieldState } = useField({\n type: 'text',\n ...props\n });\n const { showError } = fieldState;\n return render(\n \n );\n});\n\nconst Intro = () => (\n
\n
\n \n \n \n \n
\n);\n```\n\n\x3c!-- STORY --\x3e\n\n## I need an explanation!\n\nOk so what did we just do? We took advantage of two parts of `informed`.\n\n1. The `asField` HOC that turns a Component into an InformedField.\n2. The internal `BasicText` Component.\n\n`asField` is a HOC that will turn your Component into an `informed` Field Component by\ngiving your component access to the fieldApi and fieldState, and wrapping it in some magic!\nIf you wanted to you could hook up all the functions yourself, but for convenience we\nexpose our internal input definitions for you!\n", - function Intro() { - return react_default.a.createElement( - 'div', - null, - react_default.a.createElement( - src.f, - null, - react_default.a.createElement(ErrorTextField, { - field: 'name', - label: 'First name:', - validate: validate, - validateOnChange: !0, - validateOnBlur: !0 - }), - react_default.a.createElement( - 'button', - { type: 'submit' }, - 'Submit' - ), - react_default.a.createElement(Debug, { values: !0, errors: !0 }) - ) - ); - } - ), - __webpack_require__('./stories/utils/Code.js')), - FromScratch_excluded = ['label'], - _excluded2 = ['onChange', 'onBlur', 'initialValue', 'forwardedRef']; - function FromScratch_extends() { - return ( - (FromScratch_extends = - Object.assign || - function(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i]; - for (var key in source) - Object.prototype.hasOwnProperty.call(source, key) && - (target[key] = source[key]); - } - return target; - }), - FromScratch_extends.apply(this, arguments) - ); - } - function FromScratch_ownKeys(object, enumerableOnly) { - var keys = Object.keys(object); - if (Object.getOwnPropertySymbols) { - var symbols = Object.getOwnPropertySymbols(object); - enumerableOnly && - (symbols = symbols.filter(function(sym) { - return Object.getOwnPropertyDescriptor(object, sym).enumerable; - })), - keys.push.apply(keys, symbols); - } - return keys; - } - function FromScratch_defineProperty(obj, key, value) { - return ( - key in obj - ? Object.defineProperty(obj, key, { - value: value, - enumerable: !0, - configurable: !0, - writable: !0 - }) - : (obj[key] = value), - obj - ); - } - function FromScratch_objectWithoutProperties(source, excluded) { - if (null == source) return {}; - var key, - i, - target = (function FromScratch_objectWithoutPropertiesLoose( - source, - excluded - ) { - if (null == source) return {}; - var key, - i, - target = {}, - sourceKeys = Object.keys(source); - for (i = 0; i < sourceKeys.length; i++) - (key = sourceKeys[i]), - excluded.indexOf(key) >= 0 || (target[key] = source[key]); - return target; - })(source, excluded); - if (Object.getOwnPropertySymbols) { - var sourceSymbolKeys = Object.getOwnPropertySymbols(source); - for (i = 0; i < sourceSymbolKeys.length; i++) - (key = sourceSymbolKeys[i]), - excluded.indexOf(key) >= 0 || - (Object.prototype.propertyIsEnumerable.call(source, key) && - (target[key] = source[key])); - } - return target; - } - var FromScratch_validate = function validate(value) { - return !value || value.length < 5 - ? 'Field must be at least five characters' - : void 0; - }, - ErrorText = react_default.a.memo(function(_ref) { - _ref.label; - var props = FromScratch_objectWithoutProperties( - _ref, - FromScratch_excluded - ), - _useField = Object(src.y)( - (function FromScratch_objectSpread(target) { - for (var i = 1; i < arguments.length; i++) { - var source = null != arguments[i] ? arguments[i] : {}; - i % 2 - ? FromScratch_ownKeys(Object(source), !0).forEach(function( - key - ) { - FromScratch_defineProperty(target, key, source[key]); - }) - : Object.getOwnPropertyDescriptors - ? Object.defineProperties( - target, - Object.getOwnPropertyDescriptors(source) - ) - : FromScratch_ownKeys(Object(source)).forEach(function( - key - ) { - Object.defineProperty( - target, - key, - Object.getOwnPropertyDescriptor(source, key) - ); - }); - } - return target; - })({ type: 'text' }, props) - ), - render = _useField.render, - fieldState = _useField.fieldState, - fieldApi = _useField.fieldApi, - value = fieldState.value, - error = fieldState.error, - showError = fieldState.showError, - setValue = fieldApi.setValue, - setTouched = fieldApi.setTouched, - _onChange = props.onChange, - _onBlur = props.onBlur, - forwardedRef = (props.initialValue, props.forwardedRef), - rest = FromScratch_objectWithoutProperties(props, _excluded2); - return render( - react_default.a.createElement( - react_default.a.Fragment, - null, - react_default.a.createElement( - 'input', - FromScratch_extends({}, rest, { - ref: forwardedRef, - value: value || 0 === value ? value : '', - onChange: function onChange(e) { - setValue(e.target.value), _onChange && _onChange(e); - }, - onBlur: function onBlur(e) { - setTouched(!0), _onBlur && _onBlur(e); - }, - style: showError ? { border: 'solid 1px red' } : null - }) - ), - showError - ? react_default.a.createElement( - 'small', - { style: { color: 'red' } }, - error - ) - : null - ) - ); - }), - UseField_excluded = (Object(withDocs.a)( - "## So what if i do want to hook it all up myself?\n\n**Dont Fret!** Check out the example below:\n\n\x3c!-- STORY --\x3e\n\n\x3c!-- IDFK Strange issue where i need this commnet or code formatting is messed up --\x3e\n\n```jsx\nimport { Form, asField } from 'informed';\n\nconst validate = value => {\n return !value || value.length < 5\n ? 'Field must be at least five characters'\n : undefined;\n};\n\nconst ErrorText = asField(({ fieldState, fieldApi, ...props }) => {\n const { value, error, showError } = fieldState;\n const { setValue, setTouched } = fieldApi;\n const { onChange, onBlur, initialValue, forwardedRef, ...rest } = props;\n return (\n \n {\n setValue(e.target.value);\n if (onChange) {\n onChange(e);\n }\n }}\n onBlur={e => {\n setTouched(true);\n if (onBlur) {\n onBlur(e);\n }\n }}\n style={showError ? { border: 'solid 1px red' } : null}\n />\n {showError ? (\n {fieldState.error}\n ) : null}\n \n );\n});\n\n
\n \n \n
;\n```\n", - function FromScratch() { - return react_default.a.createElement( - 'div', - null, - react_default.a.createElement( - src.f, - { id: 'custom-form-2' }, - function(_ref2) { - _ref2.formApi; - var formState = _ref2.formState; - return react_default.a.createElement( - react_default.a.Fragment, - null, - react_default.a.createElement( - 'label', - null, - 'First name:', - react_default.a.createElement(ErrorText, { - field: 'name', - validate: FromScratch_validate, - validateOnChange: !0, - validateOnBlur: !0 - }) - ), - react_default.a.createElement( - 'button', - { type: 'submit' }, - 'Submit' - ), - react_default.a.createElement('label', null, 'Values:'), - react_default.a.createElement( - Code.a, - { language: 'language-js' }, - JSON.stringify(formState.values, null, 2) - ), - react_default.a.createElement('label', null, 'Errors:'), - react_default.a.createElement( - Code.a, - { language: 'language-js' }, - JSON.stringify(formState.errors, null, 2) - ) - ); - } - ) - ); - } - ), - ['label', 'id']); - function UseField_extends() { - return ( - (UseField_extends = - Object.assign || - function(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i]; - for (var key in source) - Object.prototype.hasOwnProperty.call(source, key) && - (target[key] = source[key]); - } - return target; - }), - UseField_extends.apply(this, arguments) - ); - } - function UseField_objectWithoutProperties(source, excluded) { - if (null == source) return {}; - var key, - i, - target = (function UseField_objectWithoutPropertiesLoose( - source, - excluded - ) { - if (null == source) return {}; - var key, - i, - target = {}, - sourceKeys = Object.keys(source); - for (i = 0; i < sourceKeys.length; i++) - (key = sourceKeys[i]), - excluded.indexOf(key) >= 0 || (target[key] = source[key]); - return target; - })(source, excluded); - if (Object.getOwnPropertySymbols) { - var sourceSymbolKeys = Object.getOwnPropertySymbols(source); - for (i = 0; i < sourceSymbolKeys.length; i++) - (key = sourceSymbolKeys[i]), - excluded.indexOf(key) >= 0 || - (Object.prototype.propertyIsEnumerable.call(source, key) && - (target[key] = source[key])); - } - return target; - } - var UseField_CustomInput = function CustomInput(props) { - var _useField = Object(src.y)(props), - fieldState = _useField.fieldState, - fieldApi = _useField.fieldApi, - render = _useField.render, - ref = _useField.ref, - userProps = _useField.userProps, - value = fieldState.value, - error = fieldState.error, - showError = fieldState.showError, - setValue = fieldApi.setValue, - setTouched = fieldApi.setTouched, - label = userProps.label, - id = userProps.id, - rest = UseField_objectWithoutProperties( - userProps, - UseField_excluded - ); - return render( - react_default.a.createElement( - react_default.a.Fragment, - null, - label - ? react_default.a.createElement('label', { htmlFor: id }, label) - : null, - react_default.a.createElement( - 'input', - UseField_extends({}, rest, { - id: id, - ref: ref, - value: value || 0 === value ? value : '', - onChange: function onChange(e) { - setValue(e.target.value, e); - }, - onBlur: function onBlur(e) { - setTouched(!0, e); - }, - style: showError ? { border: 'solid 1px red' } : null - }) - ), - showError - ? react_default.a.createElement( - 'small', - { style: { color: 'red' } }, - error - ) - : null - ) - ); - }, - UseField = Object(withDocs.a)( - "# Custom Inputs\n\nSometimes the inputs `informed` provides are not good enough. So we decided to\nhelp you out with that! Informed also gives you access to an useField Hook.\n\n## Custom Text Input\n\nLets say you like `informed`'s text input but you want to show an error and turn\nit red when there is an error. You could achieve this with the following code.\n\n\x3c!-- STORY --\x3e\n\n\x3c!-- IDFK Strange issue where i need this commnet or code formatting is messed up --\x3e\n\n```jsx\nimport { Form, useField } from 'informed';\n\nconst CustomInput = props => {\n const { fieldState, fieldApi, render, ref, userProps } = useField(props);\n\n // The field state\n const { value, error, showError } = fieldState;\n\n // The field control\n const { setValue, setTouched } = fieldApi;\n\n // Everything else\n const { label, id, ...rest } = userProps;\n\n return render(\n <>\n {label ? : null}\n {\n setValue(e.target.value, e);\n }}\n onBlur={e => {\n setTouched(true, e);\n }}\n style={showError ? { border: 'solid 1px red' } : null}\n />\n {showError ? {error} : null}\n \n );\n};\n\nconst Example = () => (\n
\n \n \n \n \n);\n```\n", - function Example() { - return react_default.a.createElement( - src.f, - { autocomplete: 'off' }, - react_default.a.createElement(UseField_CustomInput, { - field: 'name', - label: 'First name:', - validateOn: 'change', - required: !0, - minLength: 5 - }), - react_default.a.createElement( - 'button', - { type: 'submit' }, - 'Submit' - ), - react_default.a.createElement(src.c, null) - ); - } - ), - Slider_excluded = ['min', 'max', 'step']; - function Slider_extends() { - return ( - (Slider_extends = - Object.assign || - function(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i]; - for (var key in source) - Object.prototype.hasOwnProperty.call(source, key) && - (target[key] = source[key]); - } - return target; - }), - Slider_extends.apply(this, arguments) - ); - } - function Slider_ownKeys(object, enumerableOnly) { - var keys = Object.keys(object); - if (Object.getOwnPropertySymbols) { - var symbols = Object.getOwnPropertySymbols(object); - enumerableOnly && - (symbols = symbols.filter(function(sym) { - return Object.getOwnPropertyDescriptor(object, sym).enumerable; - })), - keys.push.apply(keys, symbols); - } - return keys; - } - function Slider_defineProperty(obj, key, value) { - return ( - key in obj - ? Object.defineProperty(obj, key, { - value: value, - enumerable: !0, - configurable: !0, - writable: !0 - }) - : (obj[key] = value), - obj - ); - } - function Slider_objectWithoutProperties(source, excluded) { - if (null == source) return {}; - var key, - i, - target = (function Slider_objectWithoutPropertiesLoose( - source, - excluded - ) { - if (null == source) return {}; - var key, - i, - target = {}, - sourceKeys = Object.keys(source); - for (i = 0; i < sourceKeys.length; i++) - (key = sourceKeys[i]), - excluded.indexOf(key) >= 0 || (target[key] = source[key]); - return target; - })(source, excluded); - if (Object.getOwnPropertySymbols) { - var sourceSymbolKeys = Object.getOwnPropertySymbols(source); - for (i = 0; i < sourceSymbolKeys.length; i++) - (key = sourceSymbolKeys[i]), - excluded.indexOf(key) >= 0 || - (Object.prototype.propertyIsEnumerable.call(source, key) && - (target[key] = source[key])); - } - return target; - } - var Slider_Slider = function Slider(_ref) { - var min = _ref.min, - max = _ref.max, - step = _ref.step, - props = Slider_objectWithoutProperties(_ref, Slider_excluded), - _useField = Object(src.y)( - (function Slider_objectSpread(target) { - for (var i = 1; i < arguments.length; i++) { - var source = null != arguments[i] ? arguments[i] : {}; - i % 2 - ? Slider_ownKeys(Object(source), !0).forEach(function(key) { - Slider_defineProperty(target, key, source[key]); - }) - : Object.getOwnPropertyDescriptors - ? Object.defineProperties( - target, - Object.getOwnPropertyDescriptors(source) - ) - : Slider_ownKeys(Object(source)).forEach(function(key) { - Object.defineProperty( - target, - key, - Object.getOwnPropertyDescriptor(source, key) - ); - }); - } - return target; - })({}, props) - ), - render = _useField.render, - fieldState = _useField.fieldState, - fieldApi = _useField.fieldApi, - ref = _useField.ref, - userProps = _useField.userProps, - value = fieldState.value, - setValue = fieldApi.setValue, - setTouched = fieldApi.setTouched; - return render( - react_default.a.createElement( - react_default.a.Fragment, - null, - react_default.a.createElement( - 'label', - { htmlFor: userProps.id }, - 'Range:' - ), - react_default.a.createElement( - 'input', - Slider_extends({}, userProps, { - type: 'range', - min: min, - max: max, - step: step, - ref: ref, - value: value || '0', - onChange: function onChange(e) { - setValue(e.target.value, e); - }, - onBlur: function onBlur(e) { - setTouched(!0, e); - } - }) - ) - ) - ); - }, - CustomInputs_Slider = Object(withDocs.a)( - '## Endless Possibilities\n\nBecause of this design, you can add your very own custom inputs! Below is an example of a slider!\n\n\x3c!-- STORY --\x3e\n\n```jsx\nimport { Form, useField, Debug } from \'informed\';\n\nconst Slider = ({ min, max, step, ...props }) => {\n const { render, fieldState, fieldApi, ref, userProps } = useField({\n ...props\n });\n const { value } = fieldState;\n const { setValue, setTouched } = fieldApi;\n return render(\n <>\n \n {\n setValue(e.target.value, e);\n }}\n onBlur={e => {\n setTouched(true, e);\n }}\n />\n \n );\n};\n\nconst SliderExample = () => (\n
\n \n \n \n \n \n
\n);\n```\n', - function SliderExample() { - return react_default.a.createElement( - src.f, - null, - react_default.a.createElement( - react_default.a.Fragment, - null, - react_default.a.createElement(Slider_Slider, { - field: 'range', - initialValue: '69', - min: '0', - max: '100' - }), - react_default.a.createElement( - 'button', - { type: 'submit' }, - 'Submit' - ), - react_default.a.createElement(src.c, { values: !0 }) - ) - ); - } - ), - UseFieldHooked_excluded = ['id', 'label']; - function UseFieldHooked_extends() { - return ( - (UseFieldHooked_extends = - Object.assign || - function(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i]; - for (var key in source) - Object.prototype.hasOwnProperty.call(source, key) && - (target[key] = source[key]); - } - return target; - }), - UseFieldHooked_extends.apply(this, arguments) - ); - } - function UseFieldHooked_objectWithoutProperties(source, excluded) { - if (null == source) return {}; - var key, - i, - target = (function UseFieldHooked_objectWithoutPropertiesLoose( - source, - excluded - ) { - if (null == source) return {}; - var key, - i, - target = {}, - sourceKeys = Object.keys(source); - for (i = 0; i < sourceKeys.length; i++) - (key = sourceKeys[i]), - excluded.indexOf(key) >= 0 || (target[key] = source[key]); - return target; - })(source, excluded); - if (Object.getOwnPropertySymbols) { - var sourceSymbolKeys = Object.getOwnPropertySymbols(source); - for (i = 0; i < sourceSymbolKeys.length; i++) - (key = sourceSymbolKeys[i]), - excluded.indexOf(key) >= 0 || - (Object.prototype.propertyIsEnumerable.call(source, key) && - (target[key] = source[key])); - } - return target; - } - function UseFieldHooked_ownKeys(object, enumerableOnly) { - var keys = Object.keys(object); - if (Object.getOwnPropertySymbols) { - var symbols = Object.getOwnPropertySymbols(object); - enumerableOnly && - (symbols = symbols.filter(function(sym) { - return Object.getOwnPropertyDescriptor(object, sym).enumerable; - })), - keys.push.apply(keys, symbols); - } - return keys; - } - function UseFieldHooked_defineProperty(obj, key, value) { - return ( - key in obj - ? Object.defineProperty(obj, key, { - value: value, - enumerable: !0, - configurable: !0, - writable: !0 - }) - : (obj[key] = value), - obj - ); - } - var UseFieldHooked_CustomInput = function CustomInput(props) { - var _useField = Object(src.y)( - (function UseFieldHooked_objectSpread(target) { - for (var i = 1; i < arguments.length; i++) { - var source = null != arguments[i] ? arguments[i] : {}; - i % 2 - ? UseFieldHooked_ownKeys(Object(source), !0).forEach( - function(key) { - UseFieldHooked_defineProperty( - target, - key, - source[key] - ); - } - ) - : Object.getOwnPropertyDescriptors - ? Object.defineProperties( - target, - Object.getOwnPropertyDescriptors(source) - ) - : UseFieldHooked_ownKeys(Object(source)).forEach(function( - key - ) { - Object.defineProperty( - target, - key, - Object.getOwnPropertyDescriptor(source, key) - ); - }); - } - return target; - })({ type: 'text' }, props) - ), - render = _useField.render, - informed = _useField.informed, - fieldState = _useField.fieldState, - userProps = _useField.userProps, - ref = _useField.ref, - id = userProps.id, - label = userProps.label, - rest = UseFieldHooked_objectWithoutProperties( - userProps, - UseFieldHooked_excluded - ), - error = fieldState.error, - showError = fieldState.showError; - return render( - react_default.a.createElement( - react_default.a.Fragment, - null, - react_default.a.createElement('label', { htmlFor: id }, label), - react_default.a.createElement( - 'input', - UseFieldHooked_extends({}, rest, informed, { - ref: ref, - style: showError ? { border: 'solid 1px red' } : null - }) - ), - showError && - react_default.a.createElement( - 'small', - { style: { color: 'red' } }, - error - ) - ) - ); - }, - UseFieldHooked = Object(withDocs.a)( - '## But it gets easier!\n\nHere we use the hook `useField`, BUT, instead of hooking it all up ourselves,\nwe just spread the informed object onto the input. Its important to note the use of fieldType,\nwhen you want to use the informed object, you need to tell the hook what type of input\nyour dealing with so it knows how to handle the dom or native event.\n\n\x3c!-- STORY --\x3e\n\n\x3c!-- IDFK Strange issue where i need this commnet or code formatting is messed up --\x3e\n\n```jsx\nimport { Form, useField } from \'informed\';\n\nconst CustomInput = props => {\n const { render, informed, fieldState, userProps, ref } = useField({\n type: \'text\',\n ...props\n });\n\n const { id, label, ...rest } = userProps;\n const { error, showError } = fieldState;\n\n return render(\n <>\n \n \n {showError && {error}}\n \n );\n};\n\nconst Example = () => (\n
\n \n \n \n \n);\n```\n', - function Example() { - return react_default.a.createElement( - src.f, - null, - react_default.a.createElement(UseFieldHooked_CustomInput, { - field: 'name', - label: 'First name:', - validateOn: 'change', - required: !0, - minLength: 5 - }), - react_default.a.createElement( - 'button', - { type: 'submit' }, - 'Submit' - ), - react_default.a.createElement(src.c, { values: !0, errors: !0 }) - ); - } - ), - CustomInputs_CreatingCustomInputs = function CreatingCustomInputs() { - return react_default.a.createElement( - 'div', - null, - react_default.a.createElement(UseField, null), - react_default.a.createElement('br', null), - react_default.a.createElement(UseFieldHooked, null), - react_default.a.createElement('br', null), - react_default.a.createElement(CustomInputs_Slider, null) - ); - }; - CustomInputs_CreatingCustomInputs.__docgenInfo = { - description: '', - methods: [], - displayName: 'CreatingCustomInputs' - }; - __webpack_exports__.a = CustomInputs_CreatingCustomInputs; - 'undefined' != typeof STORYBOOK_REACT_CLASSES && - (STORYBOOK_REACT_CLASSES['stories/CustomInputs/index.js'] = { - name: 'CreatingCustomInputs', - docgenInfo: CustomInputs_CreatingCustomInputs.__docgenInfo, - path: 'stories/CustomInputs/index.js' - }); - }, - './stories/Debugging/Debug/index.js': function( - module, - __webpack_exports__, - __webpack_require__ - ) { - 'use strict'; - var react = __webpack_require__('./node_modules/react/index.js'), - react_default = __webpack_require__.n(react), - withDocs = __webpack_require__('./stories/utils/withDocs.js'), - src = __webpack_require__('./src/index.js'); - __webpack_exports__.a = Object(withDocs.a)( - '# Debug Components\n\nSometimes you just want to see whats going on with the form state.\nThis can easily be achieved by rendering Debug components.\n\n\x3c!-- STORY --\x3e\n\n```jsx\nimport { Form, Input, Debug, DebugField } from \'informed\';\n\n
\n \n \n \n \n;\n```\n\n## Debugging Logs\n\nIn addition to the exported helpers, informed also comes with internal logging that can be enabled in following ways:\n\n#### When running in a browser ( development )\n\n```js\nlocalStorage.debug = \'informed:.*\';\n```\n\n#### When running in React Native ( development )\n\n```js\n// only enable this in __DEV__ environment\nif (__DEV__) {\n global.DEBUG_INFORMED = \'informed:.*\';\n}\n```\n\n#### When running in node ( unit tests )\n\n```js\nDEBUG = \'informed:.*\';\n```\n\nTo reset debugging just set the flag back to an empty string.\n', - function DebugExample() { - return react_default.a.createElement( - src.f, - null, - react_default.a.createElement( - 'div', - { style: { display: 'flex' } }, - react_default.a.createElement( - 'div', - { style: { flex: 2, marginRight: '2rem' } }, - react_default.a.createElement(src.l, { - name: 'name', - label: 'Name:' - }), - react_default.a.createElement( - 'button', - { type: 'submit' }, - 'Submit' - ) - ), - react_default.a.createElement( - 'div', - { style: { flex: 2, marginLeft: '2rem' } }, - react_default.a.createElement(src.c, null) - ), - react_default.a.createElement( - 'div', - { style: { flex: 2, marginLeft: '2rem' } }, - react_default.a.createElement(src.d, { name: 'name' }) - ) - ) - ); - } - ); - }, - './stories/Dynamic/DynamicFields/index.js': function( - module, - __webpack_exports__, - __webpack_require__ - ) { - 'use strict'; - var react = __webpack_require__('./node_modules/react/index.js'), - react_default = __webpack_require__.n(react), - withDocs = __webpack_require__('./stories/utils/withDocs.js'), - src = __webpack_require__('./src/index.js'); - __webpack_exports__.a = Object(withDocs.a)( - '# Dynamic Fields\n\nSometimes you need to conditionally render fields. Below is a simple\nexample the shows or hides a spouce depending on the radio selected!\n\n\x3c!-- STORY --\x3e\n\n```jsx\nimport { Form, Input, RadioGroup, Radio, Relevant } from \'informed\';\n\n
\n \n \n \n \n \n \n formState.values?.married === \'yes\'}>\n \n \n \n
;\n```\n', - function DynamicFields() { - return react_default.a.createElement( - 'div', - null, - react_default.a.createElement( - src.f, - null, - react_default.a.createElement( - 'div', - { style: { display: 'flex', flexWrap: 'wrap' } }, - react_default.a.createElement( - 'div', - { style: { flex: 1, marginRight: '2rem' } }, - react_default.a.createElement(src.l, { - name: 'name', - label: 'First name:' - }), - react_default.a.createElement( - 'label', - null, - 'Are you married?' - ), - react_default.a.createElement( - src.p, - { name: 'married' }, - react_default.a.createElement( - 'label', - null, - 'Yes ', - react_default.a.createElement(src.o, { value: 'yes' }) - ), - react_default.a.createElement( - 'label', - null, - 'No ', - react_default.a.createElement(src.o, { value: 'no' }) - ) - ), - react_default.a.createElement( - src.q, - { - when: function when(_ref) { - var _formState$values; - return ( - 'yes' === - (null === - (_formState$values = _ref.formState.values) || - void 0 === _formState$values - ? void 0 - : _formState$values.married) - ); - } - }, - react_default.a.createElement(src.l, { - name: 'spouse', - label: 'Spouse name:' - }) - ), - react_default.a.createElement( - 'button', - { type: 'submit' }, - 'Submit' - ) - ), - react_default.a.createElement( - 'div', - { style: { flex: 2, minWidth: '300px', marginLeft: '3rem' } }, - react_default.a.createElement(src.c, null) - ) - ) - ) - ); - } - ); - }, - './stories/Form/Api/index.js': function( - module, - __webpack_exports__, - __webpack_require__ - ) { - 'use strict'; - var react = __webpack_require__('./node_modules/react/index.js'), - react_default = __webpack_require__.n(react), - withDocs = __webpack_require__('./stories/utils/withDocs.js'), - src = __webpack_require__('./src/index.js'), - Intro = Object(withDocs.a)( - "# Form Api\n\n**`Informed` gives you access to a `formApi`!**\n\nThis api allows you to grab and manipulate values using getters and setters. Below is a table that describes each function available within the formApi.\n\n| Function | Example | Description |\n| -------------- | --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| submitForm | `submitForm()` | This function will submit the form and trigger some lifecycle events. 1. It will set all the fields to touched. 2. It will call all validators. 3. It will call onSubmit if the form is valid. This function can be called manually however it is also called if you have a `\n \n \n \n \n \n )}\n;\n```\n\n
\n", - function FormApi() { - return react_default.a.createElement( - src.f, - { id: 'form-api-form' }, - function(_ref) { - var formApi = _ref.formApi; - return react_default.a.createElement( - 'div', - null, - react_default.a.createElement(src.l, { - name: 'name', - label: 'First name:' - }), - react_default.a.createElement( - 'button', - { - type: 'button', - onClick: function onClick() { - return formApi.setValue('name', 'Joe'); - } - }, - 'Set Name to "Joe"' - ), - react_default.a.createElement( - 'button', - { - type: 'button', - onClick: function onClick() { - return formApi.setValue('name', 'Kevin'); - } - }, - 'Set Name to "Kevin"' - ), - react_default.a.createElement( - 'button', - { - type: 'button', - onClick: function onClick() { - return formApi.reset(); - } - }, - 'Reset' - ), - react_default.a.createElement( - 'button', - { - type: 'button', - onClick: function onClick() { - return formApi.setValue('foo', 'Bar'); - } - }, - 'Set Foo to "Bar"' - ), - react_default.a.createElement( - 'button', - { type: 'submit' }, - 'Submit' - ), - react_default.a.createElement(src.c, null) - ); - } - ); - } - ), - RenderProp = __webpack_require__( - './stories/Intro/FormApi/RenderProp/index.js' - ), - UseFormApi_RandomSetterButton = function RandomSetterButton() { - var formApi = Object(src.C)(); - return react_default.a.createElement( - 'button', - { - type: 'button', - onClick: function onClick() { - return formApi.setValue( - 'name', - Math.floor( - Math.random() * Math.floor(Number.MAX_SAFE_INTEGER) - ) - ); - } - }, - 'Random' - ); - }, - UseFormApi_SetValuesButton = function SetValuesButton() { - var formApi = Object(src.C)(); - return react_default.a.createElement( - 'button', - { - type: 'button', - onClick: function onClick() { - return formApi.setValues({ age: 26, color: 'Green' }); - } - }, - 'All' - ); - }, - UseFormApi_SetTheseValuesButton = function SetTheseValuesButton() { - var formApi = Object(src.C)(); - return react_default.a.createElement( - 'button', - { - type: 'button', - onClick: function onClick() { - return formApi.setTheseValues({ age: 26, color: 'Green' }); - } - }, - 'Age & Color' - ); - }, - UseFormApi = Object(withDocs.a)( - 'You can also get access to `Informed`s form api via `useFormApi`\n\n\x3c!-- STORY --\x3e\n\n```jsx\nimport { Form, Input, useFormApi } from \'informed\';\n\nconst RandomSetterButton = () => {\n const formApi = useFormApi();\n return (\n \n formApi.setValue(\n \'name\',\n Math.floor(Math.random() * Math.floor(Number.MAX_SAFE_INTEGER))\n )\n }>\n Random\n \n );\n};\n\nconst SetValuesButton = () => {\n const formApi = useFormApi();\n return (\n formApi.setValues({ age: 26, color: \'Green\' })}>\n All\n \n );\n};\n\nconst SetTheseValuesButton = () => {\n const formApi = useFormApi();\n return (\n formApi.setTheseValues({ age: 26, color: \'Green\' })}>\n Age & Color\n \n );\n};\n\nconst FormApi = () => (\n
\n \n \n \n \n \n \n \n \n);\n```\n\n
\n', - function FormApi() { - return react_default.a.createElement( - src.f, - { validateOn: 'change', showErrorIfError: !0 }, - react_default.a.createElement(src.l, { - name: 'name', - label: 'First Name:', - initialValue: 'Joe', - required: !0 - }), - react_default.a.createElement(src.l, { - name: 'age', - label: 'First Name:', - type: 'number', - initialValue: '27' - }), - react_default.a.createElement(src.l, { - name: 'color', - label: 'Favorite Color:', - formatter: '*-*-***' - }), - react_default.a.createElement( - UseFormApi_RandomSetterButton, - null - ), - react_default.a.createElement(UseFormApi_SetValuesButton, null), - react_default.a.createElement( - UseFormApi_SetTheseValuesButton, - null - ), - react_default.a.createElement( - 'button', - { type: 'submit' }, - 'Submit' - ) - ); - } - ), - Api_ApiStuff = function ApiStuff() { - return react_default.a.createElement( - 'div', - null, - react_default.a.createElement(Intro, null), - react_default.a.createElement(RenderProp.a, null), - react_default.a.createElement(UseFormApi, null) - ); - }; - Api_ApiStuff.__docgenInfo = { - description: '', - methods: [], - displayName: 'ApiStuff' - }; - __webpack_exports__.a = Api_ApiStuff; - 'undefined' != typeof STORYBOOK_REACT_CLASSES && - (STORYBOOK_REACT_CLASSES['stories/Form/Api/index.js'] = { - name: 'ApiStuff', - docgenInfo: Api_ApiStuff.__docgenInfo, - path: 'stories/Form/Api/index.js' - }); - }, - './stories/Form/Basic/index.js': function( - module, - __webpack_exports__, - __webpack_require__ - ) { - 'use strict'; - var react = __webpack_require__('./node_modules/react/index.js'), - react_default = __webpack_require__.n(react), - withDocs = __webpack_require__('./stories/utils/withDocs.js'), - src = __webpack_require__('./src/index.js'), - onSubmit = function onSubmit(_ref) { - var values = _ref.values; - window.alert(JSON.stringify(values, null, 2)); - }; - __webpack_exports__.a = Object(withDocs.a)( - '# Basic Form\n\n\x3c!-- STORY --\x3e\n\n```jsx\nimport { Form, Input, Debug } from \'informed\';\n\nconst onSubmit = ({ values }) => {\n window.alert(JSON.stringify(values, null, 2));\n};\n\nconst Basic = () => (\n
\n \n \n \n \n);\n```\n', - function Basic() { - return react_default.a.createElement( - src.f, - { onSubmit: onSubmit, autocomplete: 'off' }, - react_default.a.createElement(src.l, { - name: 'name', - label: 'First name:' - }), - react_default.a.createElement( - 'button', - { type: 'submit' }, - 'Submit' - ), - react_default.a.createElement(src.c, { values: !0 }) - ); - } - ); - }, - './stories/Form/Big/index.js': function( - module, - __webpack_exports__, - __webpack_require__ - ) { - 'use strict'; - var react = __webpack_require__('./node_modules/react/index.js'), - react_default = __webpack_require__.n(react), - withDocs = __webpack_require__('./stories/utils/withDocs.js'), - src = __webpack_require__('./src/index.js'), - Big_MyButton = function MyButton() { - var formApi = Object(src.C)(); - return react_default.a.createElement( - 'button', - { type: 'button', onClick: formApi.reset }, - 'Reset' - ); - }; - __webpack_exports__.a = Object(withDocs.a)( - "# Complex Form\n\n\x3c!-- STORY --\x3e\n\n```jsx\nimport { Form, Input, useFormApi } from 'informed';\n```\n", - function Big() { - return react_default.a.createElement( - src.f, - null, - react_default.a.createElement( - 'div', - { style: { display: 'flex' } }, - react_default.a.createElement( - 'div', - { style: { flex: '1' } }, - react_default.a.createElement(Big_MyButton, null), - Array.from(Array(250)).map(function(_, i) { - return react_default.a.createElement( - react_default.a.Fragment, - null, - react_default.a.createElement( - 'label', - { key: 'big-'.concat(i) }, - 'First name:', - react_default.a.createElement(src.l, { - name: 'field-'.concat(i) - }) - ) - ); - }), - react_default.a.createElement( - 'button', - { type: 'submit' }, - 'Submit' - ) - ), - react_default.a.createElement( - 'div', - { style: { flex: '1' } }, - react_default.a.createElement(src.c, null) - ) - ) - ); - } - ); - }, - './stories/Form/Complex/index.js': function( - module, - __webpack_exports__, - __webpack_require__ - ) { - 'use strict'; - var react = __webpack_require__('./node_modules/react/index.js'), - react_default = __webpack_require__.n(react), - withDocs = __webpack_require__('./stories/utils/withDocs.js'), - src = __webpack_require__('./src/index.js'); - __webpack_exports__.a = Object(withDocs.a)( - '# Complex Form\n\n\x3c!-- STORY --\x3e\n\n```jsx\nimport {\n Form,\n Text,\n TextArea,\n RadioGroup,\n Radio,\n Checkbox,\n Select,\n Option,\n Scope\n} from \'informed\';\n\n
\n \n \n \n \n \n \n \n \n \n