meraproject/content/modulebz/js/modules.js

14 lines
76 KiB
JavaScript
Raw Permalink Normal View History

!function(e){var t={};function a(n){if(t[n])return t[n].exports;var s=t[n]={i:n,l:!1,exports:{}};return e[n].call(s.exports,s,s.exports,a),s.l=!0,s.exports}a.m=e,a.c=t,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var s in e)a.d(n,s,function(t){return e[t]}.bind(null,s));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a(a.s=8)}([function(e,t,a){e.exports=a(4)},function(e,t,a){"use strict";e.exports=a(5)},function(e,t,a){"use strict";var n;window.Select=class extends React.Component{constructor(e){var t,a,n,s,r,l,i,c,o;if(super(e),o=null,null!=(t=this.prepareData(e.data))&&null!=e.id)for(n=0,s=t.length;n<s;n++)if(a=t[n],parseInt(a.id)===parseInt(e.id)){o=a;break}this.state={open:null!=e.open?e.open:e.open=!1,data:null!=t?t:[],selected:null!=o?o:null!=(r=t[0])?r:null,ajax:null!=(l=e.ajax)&&l,controller:null!=(i=e.controller)?i:"",placeholder:null!=(c=e.placeholder)?c:"",search:"",statuses:!0===e.statuses},this.input=null,this.inputSearch=null,this.roller=null,this.toggle=this.toggle.bind(this),this.prepareData=this.prepareData.bind(this),this.preventClose=this.preventClose.bind(this)}preventClose(e){return null!=e&&e.stopPropagation(),null!=e?e.preventDefault():void 0}prepareData(e){var t,a,n,s;if(a=[],Array.isArray(e)){if("string"==typeof e[0])for(t in e)s=e[t],a.push({id:parseInt(t),title:s})}else for(t in e)s=e[t],a.push({id:parseInt(t),title:s});if(0===a.length&&(a=e),!0===this.props.statuses)for(t in a){if("string"==typeof(s=a[t]).title)switch(parseInt(s.type)){case OrderStatusType.NEW:n=React.createElement("div",{class:"status st-new"},React.createElement("div",{class:"st-round"}),React.createElement("div",{class:"st-txt ch-black"},s.title));break;case OrderStatusType.WORK:n=React.createElement("div",{class:"status st-work"},React.createElement("div",{class:"st-round"}),React.createElement("div",{class:"st-txt ch-black"},s.title));break;case OrderStatusType.WAIT:n=React.createElement("div",{class:"status st-need-pay"},React.createElement("div",{class:"st-round"}),React.createElement("div",{class:"st-txt ch-black"},s.title));break;case OrderStatusType.PART:n=React.createElement("div",{class:"status st-half-pay"},React.createElement("div",{class:"st-round"}),React.createElement("div",{class:"st-txt ch-black"},s.title));break;case OrderStatusType.FINISH:n=React.createElement("div",{class:"status st-end"},React.createElement("div",{class:"st-round"}),React.createElement("div",{class:"st-txt ch-black"},s.title));break;case OrderStatusType.CANCEL:n=React.createElement("div",{class:"status st-new"},React.createElement("div",{class:"st-round"}),React.createElement("div",{class:"st-txt ch-black"},s.title))}else n=s.title;a[t].title=n}return a}getValue(){return null!=this.state.selected?this.state.selected.id:0}close(){return this.setState({open:!1})}open(){return this.setState({open:!0},this.afterOpen)}afterOpen(){return $(this.roller).perfectScrollbar("update")}toggle(){return this.state.open?this.close():this.open()}componentDidMount(){return $(this.roller).perfectScrollbar(),document.addEventListener("click",this.handleOuterClick.bind(this))}componentWillUnmount(){return document.removeEventListener("click",this.handleOuterClick.bind(this))}handleOuterClick(e){if(0===this.$wrap.has(e.target).length)return this.close()}aOnSelect(){var e;return this.close(),"function"==typeof(e=this.props).onSelect?e.onSelect(this.state.selected):void 0}onSelect(e,t){return null!=e&&e.stopPropagation(),null!=e&&e.preventDefault(),this,this.setState({selected:t},this.aOnS
/** @license React v16.9.0
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var n=a(6),s="function"==typeof Symbol&&Symbol.for,r=s?Symbol.for("react.element"):60103,l=s?Symbol.for("react.portal"):60106,i=s?Symbol.for("react.fragment"):60107,c=s?Symbol.for("react.strict_mode"):60108,o=s?Symbol.for("react.profiler"):60114,u=s?Symbol.for("react.provider"):60109,d=s?Symbol.for("react.context"):60110,h=s?Symbol.for("react.forward_ref"):60112,p=s?Symbol.for("react.suspense"):60113,m=s?Symbol.for("react.suspense_list"):60120,v=s?Symbol.for("react.memo"):60115,f=s?Symbol.for("react.lazy"):60116;s&&Symbol.for("react.fundamental"),s&&Symbol.for("react.responder");var E="function"==typeof Symbol&&Symbol.iterator;function R(e){for(var t=e.message,a="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n<arguments.length;n++)a+="&args[]="+encodeURIComponent(arguments[n]);return e.message="Minified React error #"+t+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",e}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},y={};function S(e,t,a){this.props=e,this.context=t,this.refs=y,this.updater=a||b}function g(){}function _(e,t,a){this.props=e,this.context=t,this.refs=y,this.updater=a||b}S.prototype.isReactComponent={},S.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw R(Error(85));this.updater.enqueueSetState(this,e,t,"setState")},S.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},g.prototype=S.prototype;var C=_.prototype=new g;C.constructor=_,n(C,S.prototype),C.isPureReactComponent=!0;var w={current:null},k={suspense:null},N={current:null},x=Object.prototype.hasOwnProperty,T={key:!0,ref:!0,__self:!0,__source:!0};function A(e,t,a){var n=void 0,s={},l=null,i=null;if(null!=t)for(n in void 0!==t.ref&&(i=t.ref),void 0!==t.key&&(l=""+t.key),t)x.call(t,n)&&!T.hasOwnProperty(n)&&(s[n]=t[n]);var c=arguments.length-2;if(1===c)s.children=a;else if(1<c){for(var o=Array(c),u=0;u<c;u++)o[u]=arguments[u+2];s.children=o}if(e&&e.defaultProps)for(n in c=e.defaultProps)void 0===s[n]&&(s[n]=c[n]);return{$$typeof:r,type:e,key:l,ref:i,props:s,_owner:N.current}}function O(e){return"object"==typeof e&&null!==e&&e.$$typeof===r}var I=/\/+/g,L=[];function D(e,t,a,n){if(L.length){var s=L.pop();return s.result=e,s.keyPrefix=t,s.func=a,s.context=n,s.count=0,s}return{result:e,keyPrefix:t,func:a,context:n,count:0}}function P(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>L.length&&L.push(e)}function M(e,t,a){return null==e?0:function e(t,a,n,s){var i=typeof t;"undefined"!==i&&"boolean"!==i||(t=null);var c=!1;if(null===t)c=!0;else switch(i){case"string":case"number":c=!0;break;case"object":switch(t.$$typeof){case r:case l:c=!0}}if(c)return n(s,t,""===a?"."+U(t,0):a),1;if(c=0,a=""===a?".":a+":",Array.isArray(t))for(var o=0;o<t.length;o++){var u=a+U(i=t[o],o);c+=e(i,u,n,s)}else if(u=null===t||"object"!=typeof t?null:"function"==typeof(u=E&&t[E]||t["@@iterator"])?u:null,"function"==typeof u)for(t=u.call(t),o=0;!(i=t.next()).done;)c+=e(i=i.value,u=a+U(i,o++),n,s);else if("object"===i)throw n=""+t,R(Error(31),"[object Object]"===n?"object with keys {"+Object.keys(t).join(", ")+"}":n,"");return c}(e,"",t,a)}function U(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,function(e){return t[e]})}(e.key):t.toString(36)}function F(e,t){e.func.call(e.context,t,e.count++)}function j(e,t,a){var n=e.result,s=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?V(e,n,a,function(e){return e}):null!=e&&(O(e)&&(e=function(e,t){return{$$typeof:r,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(e,s+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(I,"$&/")+"/")+a)),n.push(e))}function V(e,t,a,n,s){var r="";null!=a&&(r=(""+a).replace(I,"$&/")+"/"),M(e,j,t=D(t,r,n,s)),P(t)}function K(){var e=w.current;if(null===e)throw R(Error(321));return e}var W={Children:{map:function(e,t,a){if(null==e)return
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/var n=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},a=0;a<10;a++)t["_"+String.fromCharCode(a)]=a;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(e){n[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var a,l,i=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),c=1;c<arguments.length;c++){for(var o in a=Object(arguments[c]))s.call(a,o)&&(i[o]=a[o]);if(n){l=n(a);for(var u=0;u<l.length;u++)r.call(a,l[u])&&(i[l[u]]=a[l[u]])}}return i}},function(e,t){var a;window.initReact=function(e,t={}){var n,s,r,l,i,c,o,u,d,h,p,m,v,f,E,R;for(s in null==t&&(t={}),R=(new Date).getTime(),r=function(e,a="data"){t=e.getAttribute("data-"+a);try{t=JSON.parse(t)}catch(e){e,t={}}return e.removeAttribute("data-"+a),t},(f=function(t,a){var n,s,r,l,i;for(i=[],s=0,r=(l=e[0].querySelectorAll(t)).length;s<r;s++)n=l[s],i.push(ReactDOM.render(a,n));return i})(".r_portfolio_list",React.createElement(PortfolioList,{data:t.portfolio_list})),f(".r_news_list",React.createElement(NewsAnnotationList,{data:t.news_annotation})),f(".r_service_list",React.createElement(ServiceList,{data:t.service_list})),f(".r_service_icons",React.createElement(ServiceIconsList,{data:t.service_icons})),f(".r_updates_list",React.createElement(UpdatesAnnotationList,{data:t.updates_annotation})),f(".r_announcement_list",React.createElement(AnnouncementAnnotationList,{data:t.announcement_annotation})),f(".r_turnkey_list",React.createElement(TurnkeyAnnotationList,{data:t.turnkey_annotation})),f(".r_money_dash.new",React.createElement(MoneyDash,{type:"new"})),t.money_data)null!=(n=t.money_data[s]).minus&&f('.r_money_minus[data-date="'+s+'"]',React.createElement(MoneyList,{type:"minus",data:n.minus})),null!=n.plus&&f('.r_money_plus[data-date="'+s+'"]',React.createElement(MoneyList,{type:"plus",data:n.plus})),null!=n.transfer&&f('.r_money_transfer[data-date="'+s+'"]',React.createElement(MoneyList,{type:"transfer",data:n.transfer}));for(i=0,u=(n=e[0].querySelectorAll(".r_table")).length;i<u;i++)l=n[i],ReactDOM.render(React.createElement(Table,{data:r(l)}),l);for(c=0,d=(n=e[0].querySelectorAll(".r_card")).length;c<d;c++)l=n[c],ReactDOM.render(React.createElement(Card,{data:r(l)}),l);for(p=0,h=(n=e[0].querySelectorAll("#form_auth")).length;p<h;p++)l=n[p],(m={})[Input.PLACEHOLDER]="Логин",m[Input.TYPE]=INPUT_TYPE.TEXT,(o={})[Form.INPUT_OPT]=m,o[Form.KEY_VALUE]="login",(m={})[Input.PLACEHOLDER]="Пароль",m[Input.TYPE]=INPUT_TYPE.PASSWORD,(v={})[Form.INPUT_OPT]=m,v[Form.KEY_VALUE]="pass",(m={})[Input.TYPE]=INPUT_TYPE.SUBMIT,m[Input.LABEL]="Авторизоваться",m[Input.CSS_CLASS]="blue",(E={})[Form.INPUT_OPT]=m,ReactDOM.render(React.createElement(Form,{inputs:[o,v,E],onSubmit:a}),l);return console.log("React Render",(new Date).getTime()-R)},window.firstInitReact=function(e,t={}){},a=function(e){var t;return(t=e.values).dataType="JSON",API("core.user.account/login",t,function(e){return 1===e.e?console.log(e):window.location.reload()})}},function(e,t,a){"use strict";a.r(t);var n,s,r=a(0),l=a.n(r),i=a(1),c=a.n(i),o=class extends c.a.Component{constructor(e){var t;super(e),this.state={checked:null!=e.checked?e.checked:e.checked=!1,disabled:null!=(t=e.disabled)&&t},l()(this)}componentWillReceiveProps(e){return this.setState({checked:e.checked})}shouldComponentUpdate(e,t){return t.checked!==this.state.checked}setValue(e){return this.setState({checked:e})}aToggle(e){var t;return"function"==typeof(t=this.props).onChange?t.onChange(e):void 0}toggle(e=null){var t,a;if(({disabled:a}=this.state),null!=e&&e.stopPropagation(),!a)return t=!this.state.checked,this.setState({checked:t},this.aToggle.bind(this,t))}render(){var e,t;retu