beancount-gs/public/static/js/1.903b0a6c.chunk.js

1 line
15 KiB
JavaScript

(this["webpackJsonpbeancount-web"]=this["webpackJsonpbeancount-web"]||[]).push([[1],{120:function(t,e,n){"use strict";var i=n(43),r=n(45),o=n(46),s=n(47),a=n(48),c=n(0),u=n(223),h=n(89),f=n(68),d=n(67),l=n(291),v=function(t){Object(s.a)(n,t);var e=Object(a.a)(n);function n(){var t;return Object(r.a)(this,n),(t=e.apply(this,arguments)).resizeObserver=null,t.childNode=null,t.currentElement=null,t.state={width:0,height:0,offsetHeight:0,offsetWidth:0},t.onResize=function(e){var n=t.props.onResize,r=e[0].target,o=r.getBoundingClientRect(),s=o.width,a=o.height,c=r.offsetWidth,u=r.offsetHeight,h=Math.floor(s),f=Math.floor(a);if(t.state.width!==h||t.state.height!==f||t.state.offsetWidth!==c||t.state.offsetHeight!==u){var d={width:h,height:f,offsetWidth:c,offsetHeight:u};t.setState(d),n&&Promise.resolve().then((function(){n(Object(i.a)(Object(i.a)({},d),{},{offsetWidth:c,offsetHeight:u}),r)}))}},t.setChildNode=function(e){t.childNode=e},t}return Object(o.a)(n,[{key:"componentDidMount",value:function(){this.onComponentUpdated()}},{key:"componentDidUpdate",value:function(){this.onComponentUpdated()}},{key:"componentWillUnmount",value:function(){this.destroyObserver()}},{key:"onComponentUpdated",value:function(){if(this.props.disabled)this.destroyObserver();else{var t=Object(u.a)(this.childNode||this);t!==this.currentElement&&(this.destroyObserver(),this.currentElement=t),!this.resizeObserver&&t&&(this.resizeObserver=new l.a(this.onResize),this.resizeObserver.observe(t))}}},{key:"destroyObserver",value:function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}},{key:"render",value:function(){var t=this.props.children,e=Object(h.a)(t);if(e.length>1)Object(f.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(0===e.length)return Object(f.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var n=e[0];if(c.isValidElement(n)&&Object(d.c)(n)){var i=n.ref;e[0]=c.cloneElement(n,{ref:Object(d.a)(i,this.setChildNode)})}return 1===e.length?e[0]:e.map((function(t,e){return!c.isValidElement(t)||"key"in t&&null!==t.key?t:c.cloneElement(t,{key:"".concat("rc-observer-key","-").concat(e)})}))}}]),n}(c.Component);v.displayName="ResizeObserver",e.a=v},130:function(t,e,n){"use strict";n.d(e,"a",(function(){return g}));var i=n(45),r=n(46),o=n(131),s=n(47),a=n(48),c=n(0),u=n(287),h=n(67),f=n(66),d=0,l={};function v(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=d++,i=e;function r(){(i-=1)<=0?(t(),delete l[n]):l[n]=Object(f.a)(r)}return l[n]=Object(f.a)(r),n}v.cancel=function(t){void 0!==t&&(f.a.cancel(l[t]),delete l[t])},v.ids=l;var p,b=n(220),m=n(56);function y(t){return!t||null===t.offsetParent||t.hidden}function _(t){var e=(t||"").match(/rgba?\((\d*), (\d*), (\d*)(, [\d.]*)?\)/);return!(e&&e[1]&&e[2]&&e[3])||!(e[1]===e[2]&&e[2]===e[3])}var g=function(t){Object(s.a)(n,t);var e=Object(a.a)(n);function n(){var t;return Object(i.a)(this,n),(t=e.apply(this,arguments)).containerRef=c.createRef(),t.animationStart=!1,t.destroyed=!1,t.onClick=function(e,n){var i,r;if(!(!e||y(e)||e.className.indexOf("-leave")>=0)){var s=t.props.insertExtraNode;t.extraNode=document.createElement("div");var a=Object(o.a)(t).extraNode,c=t.context.getPrefixCls;a.className="".concat(c(""),"-click-animating-node");var h=t.getAttributeName();if(e.setAttribute(h,"true"),n&&"#ffffff"!==n&&"rgb(255, 255, 255)"!==n&&_(n)&&!/rgba\((?:\d*, ){3}0\)/.test(n)&&"transparent"!==n){a.style.borderColor=n;var f=(null===(i=e.getRootNode)||void 0===i?void 0:i.call(e))||e.ownerDocument,d=f instanceof Document?f.body:null!==(r=f.firstChild)&&void 0!==r?r:f;p=Object(u.a)("\n [".concat(c(""),"-click-animating-without-extra-node='true']::after, .").concat(c(""),"-click-animating-node {\n --antd-wave-shadow-color: ").concat(n,";\n }"),"antd-wave",{csp:t.csp,attachTo:d})}s&&e.appendChild(a),["transition","animation"].forEach((function(n){e.addEventListener("".concat(n,"start"),t.onTransitionStart),e.addEventListener("".concat(n,"end"),t.onTransitionEnd)}))}},t.onTransitionStart=function(e){if(!t.destroyed){var n=t.containerRef.current;e&&e.target===n&&!t.animationStart&&t.resetEffect(n)}},t.onTransitionEnd=function(e){e&&"fadeEffect"===e.animationName&&t.resetEffect(e.target)},t.bindAnimationEvent=function(e){if(e&&e.getAttribute&&!e.getAttribute("disabled")&&!(e.className.indexOf("disabled")>=0)){var n=function(n){if("INPUT"!==n.target.tagName&&!y(n.target)){t.resetEffect(e);var i=getComputedStyle(e).getPropertyValue("border-top-color")||getComputedStyle(e).getPropertyValue("border-color")||getComputedStyle(e).getPropertyValue("background-color");t.clickWaveTimeoutId=window.setTimeout((function(){return t.onClick(e,i)}),0),v.cancel(t.animationStartId),t.animationStart=!0,t.animationStartId=v((function(){t.animationStart=!1}),10)}};return e.addEventListener("click",n,!0),{cancel:function(){e.removeEventListener("click",n,!0)}}}},t.renderWave=function(e){var n=e.csp,i=t.props.children;if(t.csp=n,!c.isValidElement(i))return i;var r=t.containerRef;return Object(h.c)(i)&&(r=Object(h.a)(i.ref,t.containerRef)),Object(m.a)(i,{ref:r})},t}return Object(r.a)(n,[{key:"componentDidMount",value:function(){var t=this.containerRef.current;t&&1===t.nodeType&&(this.instance=this.bindAnimationEvent(t))}},{key:"componentWillUnmount",value:function(){this.instance&&this.instance.cancel(),this.clickWaveTimeoutId&&clearTimeout(this.clickWaveTimeoutId),this.destroyed=!0}},{key:"getAttributeName",value:function(){var t=this.context.getPrefixCls,e=this.props.insertExtraNode;return"".concat(t(""),e?"-click-animating":"-click-animating-without-extra-node")}},{key:"resetEffect",value:function(t){var e=this;if(t&&t!==this.extraNode&&t instanceof Element){var n=this.props.insertExtraNode,i=this.getAttributeName();t.setAttribute(i,"false"),p&&(p.innerHTML=""),n&&this.extraNode&&t.contains(this.extraNode)&&t.removeChild(this.extraNode),["transition","animation"].forEach((function(n){t.removeEventListener("".concat(n,"start"),e.onTransitionStart),t.removeEventListener("".concat(n,"end"),e.onTransitionEnd)}))}}},{key:"render",value:function(){return c.createElement(b.a,null,this.renderWave)}}]),n}(c.Component);g.contextType=b.b},238:function(t,e,n){"use strict";var i=n(0),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"},o=n(51),s=function(t,e){return i.createElement(o.a,Object.assign({},t,{ref:e,icon:r}))};s.displayName="SearchOutlined";e.a=i.forwardRef(s)},291:function(t,e,n){"use strict";(function(t){var n=function(){if("undefined"!==typeof Map)return Map;function t(t,e){var n=-1;return t.some((function(t,i){return t[0]===e&&(n=i,!0)})),n}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(e){var n=t(this.__entries__,e),i=this.__entries__[n];return i&&i[1]},e.prototype.set=function(e,n){var i=t(this.__entries__,e);~i?this.__entries__[i][1]=n:this.__entries__.push([e,n])},e.prototype.delete=function(e){var n=this.__entries__,i=t(n,e);~i&&n.splice(i,1)},e.prototype.has=function(e){return!!~t(this.__entries__,e)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,e){void 0===e&&(e=null);for(var n=0,i=this.__entries__;n<i.length;n++){var r=i[n];t.call(e,r[1],r[0])}},e}()}(),i="undefined"!==typeof window&&"undefined"!==typeof document&&window.document===document,r="undefined"!==typeof t&&t.Math===Math?t:"undefined"!==typeof self&&self.Math===Math?self:"undefined"!==typeof window&&window.Math===Math?window:Function("return this")(),o="function"===typeof requestAnimationFrame?requestAnimationFrame.bind(r):function(t){return setTimeout((function(){return t(Date.now())}),1e3/60)};var s=["top","right","bottom","left","width","height","size","weight"],a="undefined"!==typeof MutationObserver,c=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(t,e){var n=!1,i=!1,r=0;function s(){n&&(n=!1,t()),i&&c()}function a(){o(s)}function c(){var t=Date.now();if(n){if(t-r<2)return;i=!0}else n=!0,i=!1,setTimeout(a,e);r=t}return c}(this.refresh.bind(this),20)}return t.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},t.prototype.removeObserver=function(t){var e=this.observers_,n=e.indexOf(t);~n&&e.splice(n,1),!e.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},t.prototype.updateObservers_=function(){var t=this.observers_.filter((function(t){return t.gatherActive(),t.hasActive()}));return t.forEach((function(t){return t.broadcastActive()})),t.length>0},t.prototype.connect_=function(){i&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),a?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){i&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(t){var e=t.propertyName,n=void 0===e?"":e;s.some((function(t){return!!~n.indexOf(t)}))&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),u=function(t,e){for(var n=0,i=Object.keys(e);n<i.length;n++){var r=i[n];Object.defineProperty(t,r,{value:e[r],enumerable:!1,writable:!1,configurable:!0})}return t},h=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||r},f=m(0,0,0,0);function d(t){return parseFloat(t)||0}function l(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return e.reduce((function(e,n){return e+d(t["border-"+n+"-width"])}),0)}function v(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return f;var i=h(t).getComputedStyle(t),r=function(t){for(var e={},n=0,i=["top","right","bottom","left"];n<i.length;n++){var r=i[n],o=t["padding-"+r];e[r]=d(o)}return e}(i),o=r.left+r.right,s=r.top+r.bottom,a=d(i.width),c=d(i.height);if("border-box"===i.boxSizing&&(Math.round(a+o)!==e&&(a-=l(i,"left","right")+o),Math.round(c+s)!==n&&(c-=l(i,"top","bottom")+s)),!function(t){return t===h(t).document.documentElement}(t)){var u=Math.round(a+o)-e,v=Math.round(c+s)-n;1!==Math.abs(u)&&(a-=u),1!==Math.abs(v)&&(c-=v)}return m(r.left,r.top,a,c)}var p="undefined"!==typeof SVGGraphicsElement?function(t){return t instanceof h(t).SVGGraphicsElement}:function(t){return t instanceof h(t).SVGElement&&"function"===typeof t.getBBox};function b(t){return i?p(t)?function(t){var e=t.getBBox();return m(0,0,e.width,e.height)}(t):v(t):f}function m(t,e,n,i){return{x:t,y:e,width:n,height:i}}var y=function(){function t(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=m(0,0,0,0),this.target=t}return t.prototype.isActive=function(){var t=b(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},t}(),_=function(t,e){var n=function(t){var e=t.x,n=t.y,i=t.width,r=t.height,o="undefined"!==typeof DOMRectReadOnly?DOMRectReadOnly:Object,s=Object.create(o.prototype);return u(s,{x:e,y:n,width:i,height:r,top:n,right:e+i,bottom:r+n,left:e}),s}(e);u(this,{target:t,contentRect:n})},g=function(){function t(t,e,i){if(this.activeObservations_=[],this.observations_=new n,"function"!==typeof t)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=e,this.callbackCtx_=i}return t.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!==typeof Element&&Element instanceof Object){if(!(t instanceof h(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new y(t)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!==typeof Element&&Element instanceof Object){if(!(t instanceof h(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)&&(e.delete(t),e.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach((function(e){e.isActive()&&t.activeObservations_.push(e)}))},t.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map((function(t){return new _(t.target,t.broadcastRect())}));this.callback_.call(t,e,t),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),O="undefined"!==typeof WeakMap?new WeakMap:new n,w=function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=c.getInstance(),i=new g(e,n,this);O.set(this,i)};["observe","unobserve","disconnect"].forEach((function(t){w.prototype[t]=function(){var e;return(e=O.get(this))[t].apply(e,arguments)}}));var E="undefined"!==typeof r.ResizeObserver?r.ResizeObserver:w;e.a=E}).call(this,n(24))},90:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(41),r=n(0);function o(t,e){var n=e||{},o=n.defaultValue,s=n.value,a=n.onChange,c=n.postState,u=r.useState((function(){return void 0!==s?s:void 0!==o?"function"===typeof o?o():o:"function"===typeof t?t():t})),h=Object(i.a)(u,2),f=h[0],d=h[1],l=void 0!==s?s:f;c&&(l=c(l));var v=r.useRef(!0);return r.useEffect((function(){v.current?v.current=!1:void 0===s&&d(s)}),[s]),[l,function(t){d(t),l!==t&&a&&a(t,l)}]}}}]);