(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[16],{EPuv:function(e,t,a){"use strict";var n=a("g09b");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(a("p0pE")),u=n(a("d6i3")),d=a("VDIJ"),i={namespace:"adminConfig",state:{data:{list:[],pagination:{}}},effects:{fetch:u.default.mark(function e(t,a){var n,r,i,c;return u.default.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return n=t.payload,r=a.call,i=a.put,e.next=4,r(d.queryRule,n);case 4:return c=e.sent,e.next=7,i({type:"save",payload:c});case 7:case"end":return e.stop()}},e)}),update:u.default.mark(function e(t,a){var n,r,i,c,s;return u.default.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return n=t.payload,r=t.callback,i=a.call,c=a.put,e.next=4,i(d.updateRule,n);case 4:return s=e.sent,e.next=7,c({type:"edit",payload:s});case 7:r&&r();case 8:case"end":return e.stop()}},e)})},reducers:{save:function(e,t){return(0,r.default)({},e,{data:t.payload})},edit:function(e,t){return void 0!==e&&e.data.list.forEach(function(a,n){a.id===t.payload.data.id&&(e.data.list[n]=t.payload.data)}),(0,r.default)({data:t.payload},e)}}},c=i;t.default=c},VDIJ:function(e,t,a){"use strict";var n=a("g09b");Object.defineProperty(t,"__esModule",{value:!0}),t.queryRule=i,t.updateRule=s;var r=n(a("d6i3")),u=n(a("1l/V")),d=n(a("sy1d"));function i(e){return c.apply(this,arguments)}function c(){return c=(0,u.default)(r.default.mark(function e(t){var a,n;return r.default.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,(0,d.default)("/api/configs",{params:t});case 2:return a=e.sent,n=[],a.list.forEach(function(e){n[e.id]=e}),a.list=n,e.abrupt("return",a);case 7:case"end":return e.stop()}},e)})),c.apply(this,arguments)}function s(e){return l.apply(this,arguments)}function l(){return l=(0,u.default)(r.default.mark(function e(t){return r.default.wrap(function(e){while(1)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,d.default)("/api/configs/".concat(t.id),{method:"PUT",data:t}));case 1:case"end":return e.stop()}},e)})),l.apply(this,arguments)}}}]);