You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
23 KiB
2 lines
23 KiB
(window.webpackJsonp=window.webpackJsonp||[]).push([[142],{X0ci:function(_e,X,h){},iIVh:function(_e,X,h){},nojB:function(_e,X,h){"use strict";h.r(X);var je=h("T2oS"),ee=h("W9HT"),te=h("9og8"),se=h("tJVT"),k=h("k1fw"),J=h("q1tI"),s=h.n(J),Pe=h("X0ci"),Ue=h("iIVh"),F=h("Ty5D"),j=h("55Ip"),ue=h("+L6B"),V=h("2/Rp"),I=h("5NDa"),re=h("5rEg"),le=h("2qtc"),Fe=h("kLXV"),pe=h("miYZ"),G=h("tsqr"),ve=h("PpiC"),ye=h("y8nQ"),C=h("Vl3Y"),xe=h("DZo9"),ce=h("8z0m"),de=h("sRBo"),N=h("kaz8"),fe=h("LtfV"),H=h("m3rI"),$=h("Ot1p"),he=N.a.Group,me=ce.a.Dragger;function ie(m,p){var n=new FileReader;n.addEventListener("load",function(){return p(n.result)}),n.readAsDataURL(m)}var K=function(m){var p=m.callback,n=m.tags,e=n===void 0?[]:n,r=m.initialValues,u=r===void 0?{}:r,i=m.removeAttachment,l=Object(J.useState)(""),y=Object(se.a)(l,2),v=y[0],b=y[1],U=C.a.useForm(),T=Object(se.a)(U,1),L=T[0];function M(g){var O=g.cover_id,E=g.attachment_ids,Y=Object(ve.a)(g,["cover_id","attachment_ids"]);p(Object(k.a)(Object(k.a)({},Y),{},{cover_id:O==null?void 0:O.map(function(x){return x.response?x.response.id:x.uid})[(O==null?void 0:O.length)-1],attachment_ids:E?E==null?void 0:E.map(function(x){return x.response?x.response.id:x.uid}):[]}))}function w(g){return Array.isArray(g)?g:g&&g.fileList}var A={multiple:!0,beforeUpload:function(O){var E=O.size/1024/1024<100;if(!E)return G.b.error("\u8BE5\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u6587\u4EF6\u5927\u5C0F\u9650\u5236(100MB),\u5EFA\u8BAE\u4E0A\u4F20\u5230\u767E\u5EA6\u4E91\u7B49\u5176\u5B83\u5171\u4EAB\u5DE5\u5177\u91CC\uFF0C\u7136\u540E\u518Dtxt\u6587\u6863\u91CC\u7ED9\u51FA\u94FE\u63A5\u4EE5\u53CA\u5171\u4EAB\u5BC6\u7801\u5E76\u4E0A\u4F20"),E},action:"".concat(H.a.API_SERVER,"/api/attachments.json"),onRemove:function(O){Fe.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:"\u662F\u5426\u786E\u8BA4\u5220\u9664?",onOk:function(){return i(O.response?O.response.id:O.uid)},onCancel:function(){return!1}})}};function P(g){g.file.status==="done"&&ie(g.file.originFileObj,function(O){return b(O)})}var _={showUploadList:!1,withCredentials:!0,action:"".concat(H.a.API_SERVER,"/api/attachments.json"),onChange:P};return Object(J.useEffect)(function(){u.title&&(L.setFieldsValue(u),u.cover_id.length>0&&b(H.a.IMG_SERVER+u.cover_id[0].url))},[u]),s.a.createElement(C.a,{form:L,initialValues:u,className:"moop-panel",onFinish:M},s.a.createElement(C.a.Item,{label:"\u6807\u9898",name:"title",extra:s.a.createElement("p",{className:"tip"},"\u7B80\u660E\u627C\u8981\u4ECB\u7ECD\u6587\u6863/\u89C6\u9891\u6240\u5305\u542B\u7684\u4E3B\u8981\u7684\u5185\u5BB9"),rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6807\u9898"}]},s.a.createElement(re.a,{placeholder:"\u4F8B\u5982\uFF1A\u8F6F\u4EF6\u5DE5\u7A0B\u6559\u5B66\u6848\u4F8B"})),s.a.createElement("div",{className:"flex-container"},s.a.createElement(C.a.Item,{label:"\u4F5C\u8005",name:"author_name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4F5C\u8005\u540D\u79F0"}]},s.a.createElement(re.a,{placeholder:"\u8BF7\u8F93\u5165\u59D3\u540D",style:{marginRight:20,width:200}})),s.a.createElement(C.a.Item,{name:"author_school_name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4F5C\u8005\u5355\u4F4D\u540D\u79F0"}]},s.a.createElement(re.a,{placeholder:"\u8BF7\u8F93\u5165\u4F5C\u8005\u5355\u4F4D\u540D\u79F0",style:{width:200}}))),s.a.createElement(C.a.Item,{name:"tag_ids",label:"\u6807\u7B7E",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u4E00\u4E2A\u6807\u7B7E"}]},s.a.createElement(he,null,e.map(function(g){return s.a.createElement(N.a,{key:g.id,value:g.id}," ",g.name," ")}))),s.a.createElement(C.a.Item,{name:"publish",valuePropName:"checked"},s.a.createElement(N.a,null,"\u662F\u5426\u7533\u8BF7\u53D1\u5E03")),s.a.createElement(C.a.Item,{name:"content",label:"\u63CF\u8FF0",valuePropName:"defaultValue",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u63CF\u8FF0\u5185\u5BB9"}]},s.a.createElement($.a,{id:"moop_cases_content",height:400})),s.a.createElement(C.a.Item,{name:"attachment_ids",valuePropName:"fileList",getValueFromEvent:w},s.a.createElement(me,A,s.a.createElement("p",{className:"c-blue",style:{marginBottom:10,fontSize:18}},"\u4E0A\u4F20\u9644\u4EF6"),s.a.createElement("p",{className:"c-grey-c"},"\u4ECE\u6211\u7684\u7535\u8111\u9009\u62E9\u8981\u4E0A\u4F20\u7684\u6587\u6863\uFF1A\u6309\u4F4FCTRL\u53EF\u4EE5\u4E0A\u4F20\u591A\u4EFD\u6587\u6863\u3002\u5355\u4E2A\u6587\u4EF6\u6700\u5927\u9650\u5236\uFF1A100MB"))),s.a.createElement(C.a.Item,{name:"cover_id",label:"\u5C01\u9762\u56FE",extra:"\u4E0A\u4F20\u5C3A\u5BF8\uFF1A120*90 px",getValueFromEvent:w,valuePropName:"fileList",rules:[{required:!0,message:"\u8BF7\u4E0A\u4F20\u5C01\u9762\u56FE"}]},s.a.createElement(ce.a,_,v?s.a.createElement("img",{src:v,width:120}):s.a.createElement("a",{title:"\u4E0A\u4F20\u5C01\u9762\u56FE",className:"upload-cover"}," ",s.a.createElement(fe.a,null)," "))),s.a.createElement("div",{className:"desc"},s.a.createElement("h3",null,"\u5BA1\u6838\u8BF4\u660E"),s.a.createElement("p",null," \u5E73\u53F0\u7BA1\u7406\u5458\u5C06\u5BF9\u6BCF\u5929\u65B0\u4E0A\u4F20\u7684\u6587\u6863\u8FDB\u884C\u5BA1\u6838\uFF0C\u5BA1\u6838\u901A\u8FC7\u7684\u6587\u6863\u5C06\u516C\u5F00\u663E\u793A\uFF0C\u5426\u5219\u5C06\u79C1\u6709\u5316\u6216\u79FB\u9664 ")),s.a.createElement("div",{className:"desc"},s.a.createElement("h3",null,"\u6E29\u99A8\u63D0\u793A"),s.a.createElement("ul",{style:{padding:0}},s.a.createElement("li",null,"1.\u8BF7\u52FF\u4E0A\u4F20\u5DF2\u8BBE\u7F6E\u52A0\u5BC6\u53E3\u4EE4\u7684\u6587\u6863\u8D44\u6E90\uFF1B"),s.a.createElement("li",null,"2.\u53EF\u4EE5\u4E0A\u4F20\u7B26\u5408\u6559\u5B66\u6848\u4F8B\u6807\u51C6\u7684\u6587\u6863\u8D44\u6599\uFF0C\u5982",s.a.createElement("a",{href:"https://www.educoder.net/courses/1309/boards/5909/messages/34799",target:"_blank"}," \u6848\u4F8B\u5165\u5E93\u6807\u51C6 ")," \u3001",s.a.createElement("a",{href:"https://www.educoder.net/courses/1309/boards/5909/messages/34798",target:"_blank"},"\u6848\u4F8B\u4F7F\u7528\u8BF4\u660E\u4E66"),"\u4EE5\u53CA\u5176\u4ED6\u8D44\u6599\u7B49\uFF0C\u4E0A\u4F20\u652F\u6301\u7684\u6587\u4EF6\u6700\u5927\u5BB9\u91CF\uFF1A100MB\uFF1B"),s.a.createElement("li",null,"3.\u8BF7\u786E\u4FDD\u4E0A\u4F20\u5185\u5BB9\u65E0\u4FB5\u6743\u6216\u8FDD\u53CD\u56FD\u5BB6\u5173\u4E8E\u4E92\u8054\u7F51\u653F\u7B56\u7684\u4E0D\u826F\u884C\u4E3A\uFF1B"),s.a.createElement("li",null,"4.\u8BF7\u4F7F\u7528Chrome\uFF0CFirefox\uFF0CSafari\uFF0CIE11\uFF08\u53CA\u4EE5\u4E0A\u7248\u672C\uFF09\u6D4F\u89C8\u5668\uFF1B"))),s.a.createElement(C.a.Item,{style:{marginTop:10}},s.a.createElement(V.a,{type:"primary",htmlType:"submit"},"\u63D0\u4EA4")))},Z=h("wzkS");function S(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */S=function(){return p};var m,p={},n=Object.prototype,e=n.hasOwnProperty,r=Object.defineProperty||function(o,t,a){o[t]=a.value},u=typeof Symbol=="function"?Symbol:{},i=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",y=u.toStringTag||"@@toStringTag";function v(o,t,a){return Object.defineProperty(o,t,{value:a,enumerable:!0,configurable:!0,writable:!0}),o[t]}try{v({},"")}catch(o){v=function(a,c,f){return a[c]=f}}function b(o,t,a,c){var f=t&&t.prototype instanceof P?t:P,d=Object.create(f.prototype),R=new Oe(c||[]);return r(d,"_invoke",{value:we(o,a,R)}),d}function U(o,t,a){try{return{type:"normal",arg:o.call(t,a)}}catch(c){return{type:"throw",arg:c}}}p.wrap=b;var T="suspendedStart",L="suspendedYield",M="executing",w="completed",A={};function P(){}function _(){}function g(){}var O={};v(O,i,function(){return this});var E=Object.getPrototypeOf,Y=E&&E(E(Re([])));Y&&Y!==n&&e.call(Y,i)&&(O=Y);var x=g.prototype=P.prototype=Object.create(O);function Ee(o){["next","throw","return"].forEach(function(t){v(o,t,function(a){return this._invoke(t,a)})})}function ne(o,t){function a(f,d,R,D){var B=U(o[f],o,d);if(B.type!=="throw"){var ae=B.arg,q=ae.value;return q&&typeof q=="object"&&e.call(q,"__await")?t.resolve(q.__await).then(function(oe){a("next",oe,R,D)},function(oe){a("throw",oe,R,D)}):t.resolve(q).then(function(oe){ae.value=oe,R(ae)},function(oe){return a("throw",oe,R,D)})}D(B.arg)}var c;r(this,"_invoke",{value:function(d,R){function D(){return new t(function(B,ae){a(d,R,B,ae)})}return c=c?c.then(D,D):D()}})}function we(o,t,a){var c=T;return function(f,d){if(c===M)throw new Error("Generator is already running");if(c===w){if(f==="throw")throw d;return{value:m,done:!0}}for(a.method=f,a.arg=d;;){var R=a.delegate;if(R){var D=Q(R,a);if(D){if(D===A)continue;return D}}if(a.method==="next")a.sent=a._sent=a.arg;else if(a.method==="throw"){if(c===T)throw c=w,a.arg;a.dispatchException(a.arg)}else a.method==="return"&&a.abrupt("return",a.arg);c=M;var B=U(o,t,a);if(B.type==="normal"){if(c=a.done?w:L,B.arg===A)continue;return{value:B.arg,done:a.done}}B.type==="throw"&&(c=w,a.method="throw",a.arg=B.arg)}}}function Q(o,t){var a=t.method,c=o.iterator[a];if(c===m)return t.delegate=null,a==="throw"&&o.iterator.return&&(t.method="return",t.arg=m,Q(o,t),t.method==="throw")||a!=="return"&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+a+"' method")),A;var f=U(c,o.iterator,t.arg);if(f.type==="throw")return t.method="throw",t.arg=f.arg,t.delegate=null,A;var d=f.arg;return d?d.done?(t[o.resultName]=d.value,t.next=o.nextLoc,t.method!=="return"&&(t.method="next",t.arg=m),t.delegate=null,A):d:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,A)}function W(o){var t={tryLoc:o[0]};1 in o&&(t.catchLoc=o[1]),2 in o&&(t.finallyLoc=o[2],t.afterLoc=o[3]),this.tryEntries.push(t)}function Ae(o){var t=o.completion||{};t.type="normal",delete t.arg,o.completion=t}function Oe(o){this.tryEntries=[{tryLoc:"root"}],o.forEach(W,this),this.reset(!0)}function Re(o){if(o||o===""){var t=o[i];if(t)return t.call(o);if(typeof o.next=="function")return o;if(!isNaN(o.length)){var a=-1,c=function f(){for(;++a<o.length;)if(e.call(o,a))return f.value=o[a],f.done=!1,f;return f.value=m,f.done=!0,f};return c.next=c}}throw new TypeError(typeof o+" is not iterable")}return _.prototype=g,r(x,"constructor",{value:g,configurable:!0}),r(g,"constructor",{value:_,configurable:!0}),_.displayName=v(g,y,"GeneratorFunction"),p.isGeneratorFunction=function(o){var t=typeof o=="function"&&o.constructor;return!!t&&(t===_||(t.displayName||t.name)==="GeneratorFunction")},p.mark=function(o){return Object.setPrototypeOf?Object.setPrototypeOf(o,g):(o.__proto__=g,v(o,y,"GeneratorFunction")),o.prototype=Object.create(x),o},p.awrap=function(o){return{__await:o}},Ee(ne.prototype),v(ne.prototype,l,function(){return this}),p.AsyncIterator=ne,p.async=function(o,t,a,c,f){f===void 0&&(f=Promise);var d=new ne(b(o,t,a,c),f);return p.isGeneratorFunction(t)?d:d.next().then(function(R){return R.done?R.value:d.next()})},Ee(x),v(x,y,"Generator"),v(x,i,function(){return this}),v(x,"toString",function(){return"[object Generator]"}),p.keys=function(o){var t=Object(o),a=[];for(var c in t)a.push(c);return a.reverse(),function f(){for(;a.length;){var d=a.pop();if(d in t)return f.value=d,f.done=!1,f}return f.done=!0,f}},p.values=Re,Oe.prototype={constructor:Oe,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=m,this.done=!1,this.delegate=null,this.method="next",this.arg=m,this.tryEntries.forEach(Ae),!t)for(var a in this)a.charAt(0)==="t"&&e.call(this,a)&&!isNaN(+a.slice(1))&&(this[a]=m)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if(t.type==="throw")throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var a=this;function c(ae,q){return R.type="throw",R.arg=t,a.next=ae,q&&(a.method="next",a.arg=m),!!q}for(var f=this.tryEntries.length-1;f>=0;--f){var d=this.tryEntries[f],R=d.completion;if(d.tryLoc==="root")return c("end");if(d.tryLoc<=this.prev){var D=e.call(d,"catchLoc"),B=e.call(d,"finallyLoc");if(D&&B){if(this.prev<d.catchLoc)return c(d.catchLoc,!0);if(this.prev<d.finallyLoc)return c(d.finallyLoc)}else if(D){if(this.prev<d.catchLoc)return c(d.catchLoc,!0)}else{if(!B)throw new Error("try statement without catch or finally");if(this.prev<d.finallyLoc)return c(d.finallyLoc)}}}},abrupt:function(t,a){for(var c=this.tryEntries.length-1;c>=0;--c){var f=this.tryEntries[c];if(f.tryLoc<=this.prev&&e.call(f,"finallyLoc")&&this.prev<f.finallyLoc){var d=f;break}}d&&(t==="break"||t==="continue")&&d.tryLoc<=a&&a<=d.finallyLoc&&(d=null);var R=d?d.completion:{};return R.type=t,R.arg=a,d?(this.method="next",this.next=d.finallyLoc,A):this.complete(R)},complete:function(t,a){if(t.type==="throw")throw t.arg;return t.type==="break"||t.type==="continue"?this.next=t.arg:t.type==="return"?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):t.type==="normal"&&a&&(this.next=a),A},finish:function(t){for(var a=this.tryEntries.length-1;a>=0;--a){var c=this.tryEntries[a];if(c.finallyLoc===t)return this.complete(c.completion,c.afterLoc),Ae(c),A}},catch:function(t){for(var a=this.tryEntries.length-1;a>=0;--a){var c=this.tryEntries[a];if(c.tryLoc===t){var f=c.completion;if(f.type==="throw"){var d=f.arg;Ae(c)}return d}}throw new Error("illegal catch attempt")},delegateYield:function(t,a,c){return this.delegate={iterator:Re(t),resultName:a,nextLoc:c},this.method==="next"&&(this.arg=m),A}},p}var be={loading:!1,data:{},tags:[]},z=function(m){return m[m.GET_DATA=0]="GET_DATA",m[m.SET_LOADING=1]="SET_LOADING",m[m.GET_TAGS=2]="GET_TAGS",m}(z||{});function Le(m,p){switch(p.type){case z.GET_DATA:return Object(k.a)(Object(k.a)({},m),p.payload);case z.GET_TAGS:return Object(k.a)(Object(k.a)({},m),{},{tags:p.payload});case z.SET_LOADING:return Object(k.a)(Object(k.a)({},m),{},{loading:p.payload});default:throw new Error}}var ge=X.default=function(){var m=Object(F.m)(),p=m.caseId,n=Object(F.k)(),e=Object(J.useReducer)(Le,be),r=Object(se.a)(e,2),u=r[0],i=r[1],l=u.loading,y=u.tags,v=u.data;Object(J.useEffect)(function(){function L(){return M.apply(this,arguments)}function M(){return M=Object(te.a)(S().mark(function w(){var A;return S().wrap(function(_){for(;;)switch(_.prev=_.next){case 0:return _.next=2,Object(Z.b)();case 2:A=_.sent,i({type:z.GET_TAGS,payload:A.library_tags});case 4:case"end":return _.stop()}},w)})),M.apply(this,arguments)}L()},[]),Object(J.useEffect)(function(){var L=!1;function M(){return w.apply(this,arguments)}function w(){return w=Object(te.a)(S().mark(function A(){var P,_,g,O,E,Y,x,Ee,ne;return S().wrap(function(Q){for(;;)switch(Q.prev=Q.next){case 0:return i({type:z.SET_LOADING,payload:!1}),Q.next=3,Object(Z.c)(p);case 3:P=Q.sent,_=P.author_name,g=P.author_school_name,O=P.content,E=P.cover,Y=P.attachments,x=P.status,Ee=P.title,ne=P.tags,L||(P.status===404?n.push("/moop_cases"):i({type:z.GET_DATA,payload:{data:{title:Ee,author_name:_,author_school_name:g,content:O,tag_ids:ne.map(function(W){return W.id}),publish:x==="published",attachment_ids:Y.map(function(W){return{uid:W.id,id:W.id,name:W.title,url:W.url,filesize:W.filesize,status:"done"}}),cover_id:(E==null?void 0:E.id)?[{uid:E==null?void 0:E.id,id:E==null?void 0:E.id,name:E==null?void 0:E.title,url:E==null?void 0:E.url,filesize:E==null?void 0:E.filesize,status:"done"}]:[]},loading:!1}}));case 6:case"end":return Q.stop()}},A)})),w.apply(this,arguments)}return!L&&p&&M(),function(){L=!0}},[p]);function b(L){return U.apply(this,arguments)}function U(){return U=Object(te.a)(S().mark(function L(M){var w,A;return S().wrap(function(_){for(;;)switch(_.prev=_.next){case 0:if(!p){_.next=6;break}return _.next=3,Object(Z.e)(p,M);case 3:n.push("/moop_cases/".concat(p,"/publish-success")),_.next=11;break;case 6:return _.next=8,Object(Z.a)(M);case 8:w=_.sent,A=w.id,A&&n.push("/moop_cases/".concat(A,"/publish-success"));case 11:case"end":return _.stop()}},L)})),U.apply(this,arguments)}var T={initialValues:v,tags:y,removeAttachment:Z.d,callback:b};return s.a.createElement(ee.a,{spinning:l,delay:500},s.a.createElement("div",{className:"moop-info"},s.a.createElement("div",{className:"crumb"},s.a.createElement(j.Link,{to:"/moop_cases"},"\u6559\u5B66\u6848\u4F8B > "),s.a.createElement("span",null,"\u65B0\u5EFA")),s.a.createElement("div",{className:"title"},s.a.createElement("h2",null,"\u4E0A\u4F20\u6559\u5B66\u6848\u4F8B"),s.a.createElement(j.Link,{to:"/moop_cases"},"\u8FD4\u56DE")),s.a.createElement(K,T)))}},wzkS:function(_e,X,h){"use strict";h.d(X,"c",function(){return se}),h.d(X,"b",function(){return k}),h.d(X,"d",function(){return J}),h.d(X,"a",function(){return Pe}),h.d(X,"e",function(){return Ue});var je=h("9og8"),ee=h("ErOA");function te(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */te=function(){return j};var F,j={},ue=Object.prototype,V=ue.hasOwnProperty,I=Object.defineProperty||function(n,e,r){n[e]=r.value},re=typeof Symbol=="function"?Symbol:{},le=re.iterator||"@@iterator",Fe=re.asyncIterator||"@@asyncIterator",pe=re.toStringTag||"@@toStringTag";function G(n,e,r){return Object.defineProperty(n,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),n[e]}try{G({},"")}catch(n){G=function(r,u,i){return r[u]=i}}function ve(n,e,r,u){var i=e&&e.prototype instanceof fe?e:fe,l=Object.create(i.prototype),y=new m(u||[]);return I(l,"_invoke",{value:be(n,r,y)}),l}function ye(n,e,r){try{return{type:"normal",arg:n.call(e,r)}}catch(u){return{type:"throw",arg:u}}}j.wrap=ve;var C="suspendedStart",xe="suspendedYield",ce="executing",de="completed",N={};function fe(){}function H(){}function $(){}var he={};G(he,le,function(){return this});var me=Object.getPrototypeOf,ie=me&&me(me(p([])));ie&&ie!==ue&&V.call(ie,le)&&(he=ie);var K=$.prototype=fe.prototype=Object.create(he);function Z(n){["next","throw","return"].forEach(function(e){G(n,e,function(r){return this._invoke(e,r)})})}function S(n,e){function r(i,l,y,v){var b=ye(n[i],n,l);if(b.type!=="throw"){var U=b.arg,T=U.value;return T&&typeof T=="object"&&V.call(T,"__await")?e.resolve(T.__await).then(function(L){r("next",L,y,v)},function(L){r("throw",L,y,v)}):e.resolve(T).then(function(L){U.value=L,y(U)},function(L){return r("throw",L,y,v)})}v(b.arg)}var u;I(this,"_invoke",{value:function(l,y){function v(){return new e(function(b,U){r(l,y,b,U)})}return u=u?u.then(v,v):v()}})}function be(n,e,r){var u=C;return function(i,l){if(u===ce)throw new Error("Generator is already running");if(u===de){if(i==="throw")throw l;return{value:F,done:!0}}for(r.method=i,r.arg=l;;){var y=r.delegate;if(y){var v=z(y,r);if(v){if(v===N)continue;return v}}if(r.method==="next")r.sent=r._sent=r.arg;else if(r.method==="throw"){if(u===C)throw u=de,r.arg;r.dispatchException(r.arg)}else r.method==="return"&&r.abrupt("return",r.arg);u=ce;var b=ye(n,e,r);if(b.type==="normal"){if(u=r.done?de:xe,b.arg===N)continue;return{value:b.arg,done:r.done}}b.type==="throw"&&(u=de,r.method="throw",r.arg=b.arg)}}}function z(n,e){var r=e.method,u=n.iterator[r];if(u===F)return e.delegate=null,r==="throw"&&n.iterator.return&&(e.method="return",e.arg=F,z(n,e),e.method==="throw")||r!=="return"&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),N;var i=ye(u,n.iterator,e.arg);if(i.type==="throw")return e.method="throw",e.arg=i.arg,e.delegate=null,N;var l=i.arg;return l?l.done?(e[n.resultName]=l.value,e.next=n.nextLoc,e.method!=="return"&&(e.method="next",e.arg=F),e.delegate=null,N):l:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,N)}function Le(n){var e={tryLoc:n[0]};1 in n&&(e.catchLoc=n[1]),2 in n&&(e.finallyLoc=n[2],e.afterLoc=n[3]),this.tryEntries.push(e)}function ge(n){var e=n.completion||{};e.type="normal",delete e.arg,n.completion=e}function m(n){this.tryEntries=[{tryLoc:"root"}],n.forEach(Le,this),this.reset(!0)}function p(n){if(n||n===""){var e=n[le];if(e)return e.call(n);if(typeof n.next=="function")return n;if(!isNaN(n.length)){var r=-1,u=function i(){for(;++r<n.length;)if(V.call(n,r))return i.value=n[r],i.done=!1,i;return i.value=F,i.done=!0,i};return u.next=u}}throw new TypeError(typeof n+" is not iterable")}return H.prototype=$,I(K,"constructor",{value:$,configurable:!0}),I($,"constructor",{value:H,configurable:!0}),H.displayName=G($,pe,"GeneratorFunction"),j.isGeneratorFunction=function(n){var e=typeof n=="function"&&n.constructor;return!!e&&(e===H||(e.displayName||e.name)==="GeneratorFunction")},j.mark=function(n){return Object.setPrototypeOf?Object.setPrototypeOf(n,$):(n.__proto__=$,G(n,pe,"GeneratorFunction")),n.prototype=Object.create(K),n},j.awrap=function(n){return{__await:n}},Z(S.prototype),G(S.prototype,Fe,function(){return this}),j.AsyncIterator=S,j.async=function(n,e,r,u,i){i===void 0&&(i=Promise);var l=new S(ve(n,e,r,u),i);return j.isGeneratorFunction(e)?l:l.next().then(function(y){return y.done?y.value:l.next()})},Z(K),G(K,pe,"Generator"),G(K,le,function(){return this}),G(K,"toString",function(){return"[object Generator]"}),j.keys=function(n){var e=Object(n),r=[];for(var u in e)r.push(u);return r.reverse(),function i(){for(;r.length;){var l=r.pop();if(l in e)return i.value=l,i.done=!1,i}return i.done=!0,i}},j.values=p,m.prototype={constructor:m,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=F,this.done=!1,this.delegate=null,this.method="next",this.arg=F,this.tryEntries.forEach(ge),!e)for(var r in this)r.charAt(0)==="t"&&V.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=F)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if(e.type==="throw")throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function u(U,T){return y.type="throw",y.arg=e,r.next=U,T&&(r.method="next",r.arg=F),!!T}for(var i=this.tryEntries.length-1;i>=0;--i){var l=this.tryEntries[i],y=l.completion;if(l.tryLoc==="root")return u("end");if(l.tryLoc<=this.prev){var v=V.call(l,"catchLoc"),b=V.call(l,"finallyLoc");if(v&&b){if(this.prev<l.catchLoc)return u(l.catchLoc,!0);if(this.prev<l.finallyLoc)return u(l.finallyLoc)}else if(v){if(this.prev<l.catchLoc)return u(l.catchLoc,!0)}else{if(!b)throw new Error("try statement without catch or finally");if(this.prev<l.finallyLoc)return u(l.finallyLoc)}}}},abrupt:function(e,r){for(var u=this.tryEntries.length-1;u>=0;--u){var i=this.tryEntries[u];if(i.tryLoc<=this.prev&&V.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var l=i;break}}l&&(e==="break"||e==="continue")&&l.tryLoc<=r&&r<=l.finallyLoc&&(l=null);var y=l?l.completion:{};return y.type=e,y.arg=r,l?(this.method="next",this.next=l.finallyLoc,N):this.complete(y)},complete:function(e,r){if(e.type==="throw")throw e.arg;return e.type==="break"||e.type==="continue"?this.next=e.arg:e.type==="return"?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):e.type==="normal"&&r&&(this.next=r),N},finish:function(e){for(var r=this.tryEntries.length-1;r>=0;--r){var u=this.tryEntries[r];if(u.finallyLoc===e)return this.complete(u.completion,u.afterLoc),ge(u),N}},catch:function(e){for(var r=this.tryEntries.length-1;r>=0;--r){var u=this.tryEntries[r];if(u.tryLoc===e){var i=u.completion;if(i.type==="throw"){var l=i.arg;ge(u)}return l}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,u){return this.delegate={iterator:p(e),resultName:r,nextLoc:u},this.method==="next"&&(this.arg=F),N}},j}function se(F){return Object(ee.c)("libraries/".concat(F,".json"))}function k(){return Object(ee.c)("library_tags.json")}function J(F){return s.apply(this,arguments)}function s(){return s=Object(je.a)(te().mark(function F(j){var ue;return te().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return I.next=2,Object(ee.b)("attachments/".concat(j,".json"));case 2:return ue=I.sent,I.abrupt("return",ue.status===0);case 4:case"end":return I.stop()}},F)})),s.apply(this,arguments)}function Pe(F){return Object(ee.f)("libraries.json",F)}function Ue(F,j){return Object(ee.g)("libraries/".concat(F,".json"),j)}}}]);
|