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.
NewEduCoderBuild/p__MoopCases__FormPanel.bd5...

2 lines
24 KiB

(window.webpackJsonp=window.webpackJsonp||[]).push([[142],{X0ci:function(Le,x,h){},iIVh:function(Le,x,h){},nojB:function(Le,x,h){"use strict";h.r(x);var Oe=h("T2oS"),q=h("W9HT"),ee=h("9og8"),de=h("tJVT"),k=h("k1fw"),J=h("q1tI"),l=h.n(J),Ae=h("X0ci"),Re=h("iIVh"),y=h("Ty5D"),Y=h("55Ip"),M=h("+L6B"),te=h("2/Rp"),S=h("5NDa"),H=h("5rEg"),Pe=h("2qtc"),fe=h("kLXV"),I=h("miYZ"),Ee=h("tsqr"),he=h("PpiC"),G=h("y8nQ"),U=h("Vl3Y"),me=h("DZo9"),V=h("8z0m"),ve=h("sRBo"),re=h("kaz8"),ie=h("LtfV"),$=h("m3rI"),ge=h("Ot1p"),se=re.a.Group,Fe=V.a.Dragger;function ye(e,u){var i=new FileReader;i.addEventListener("load",function(){return u(i.result)}),i.readAsDataURL(e)}var be=function(e){var u=e.callback,i=e.tags,s=i===void 0?[]:i,m=e.initialValues,p=m===void 0?{}:m,L=e.removeAttachment,j=Object(J.useState)(""),g=Object(de.a)(j,2),w=g[0],K=g[1],R=U.a.useForm(),ne=Object(de.a)(R,1),P=ne[0];function A(_){var F=_.cover_id,E=_.attachment_ids,ae=Object(he.a)(_,["cover_id","attachment_ids"]);u(Object(k.a)(Object(k.a)({},ae),{},{cover_id:F==null?void 0:F.map(function(B){return B.response?B.response.id:B.uid})[(F==null?void 0:F.length)-1],attachment_ids:E?E==null?void 0:E.map(function(B){return B.response?B.response.id:B.uid}):[]}))}function T(_){return Array.isArray(_)?_:_&&_.fileList}var C={multiple:!0,beforeUpload:function(F){var E=F.size/1024/1024<100;if(!E)return Ee.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($.a.API_SERVER,"/api/attachments.json"),onRemove:function(F){fe.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:"\u662F\u5426\u786E\u8BA4\u5220\u9664?",onOk:function(){return L(F.response?F.response.id:F.uid)},onCancel:function(){return!1}})}};function O(_){_.file.status==="done"&&ye(_.file.originFileObj,function(F){return K(F)})}var v={showUploadList:!1,withCredentials:!0,action:"".concat($.a.API_SERVER,"/api/attachments.json"),onChange:O};return Object(J.useEffect)(function(){p.title&&(P.setFieldsValue(p),p.cover_id.length>0&&K($.a.IMG_SERVER+p.cover_id[0].url))},[p]),l.a.createElement(U.a,{form:P,initialValues:p,className:"moop-panel",onFinish:A},l.a.createElement(U.a.Item,{label:"\u6807\u9898",name:"title",extra:l.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"}]},l.a.createElement(H.a,{placeholder:"\u4F8B\u5982\uFF1A\u8F6F\u4EF6\u5DE5\u7A0B\u6559\u5B66\u6848\u4F8B"})),l.a.createElement("div",{className:"flex-container"},l.a.createElement(U.a.Item,{label:"\u4F5C\u8005",name:"author_name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4F5C\u8005\u540D\u79F0"}]},l.a.createElement(H.a,{placeholder:"\u8BF7\u8F93\u5165\u59D3\u540D",style:{marginRight:20,width:200}})),l.a.createElement(U.a.Item,{name:"author_school_name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4F5C\u8005\u5355\u4F4D\u540D\u79F0"}]},l.a.createElement(H.a,{placeholder:"\u8BF7\u8F93\u5165\u4F5C\u8005\u5355\u4F4D\u540D\u79F0",style:{width:200}}))),l.a.createElement(U.a.Item,{name:"tag_ids",label:"\u6807\u7B7E",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u4E00\u4E2A\u6807\u7B7E"}]},l.a.createElement(se,null,s.map(function(_){return l.a.createElement(re.a,{key:_.id,value:_.id}," ",_.name," ")}))),l.a.createElement(U.a.Item,{name:"publish",valuePropName:"checked"},l.a.createElement(re.a,null,"\u662F\u5426\u7533\u8BF7\u53D1\u5E03")),l.a.createElement(U.a.Item,{name:"content",label:"\u63CF\u8FF0",valuePropName:"defaultValue",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u63CF\u8FF0\u5185\u5BB9"}]},l.a.createElement(ge.a,{id:"moop_cases_content",height:400})),l.a.createElement(U.a.Item,{name:"attachment_ids",valuePropName:"fileList",getValueFromEvent:T},l.a.createElement(Fe,C,l.a.createElement("p",{className:"c-blue",style:{marginBottom:10,fontSize:18}},"\u4E0A\u4F20\u9644\u4EF6"),l.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"))),l.a.createElement(U.a.Item,{name:"cover_id",label:"\u5C01\u9762\u56FE",extra:"\u4E0A\u4F20\u5C3A\u5BF8\uFF1A120*90 px",getValueFromEvent:T,valuePropName:"fileList",rules:[{required:!0,message:"\u8BF7\u4E0A\u4F20\u5C01\u9762\u56FE"}]},l.a.createElement(V.a,v,w?l.a.createElement("img",{src:w,width:120}):l.a.createElement("a",{title:"\u4E0A\u4F20\u5C01\u9762\u56FE",className:"upload-cover"}," ",l.a.createElement(ie.a,null)," "))),l.a.createElement("div",{className:"desc"},l.a.createElement("h3",null,"\u5BA1\u6838\u8BF4\u660E"),l.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 ")),l.a.createElement("div",{className:"desc"},l.a.createElement("h3",null,"\u6E29\u99A8\u63D0\u793A"),l.a.createElement("ul",{style:{padding:0}},l.a.createElement("li",null,"1.\u8BF7\u52FF\u4E0A\u4F20\u5DF2\u8BBE\u7F6E\u52A0\u5BC6\u53E3\u4EE4\u7684\u6587\u6863\u8D44\u6E90\uFF1B"),l.a.createElement("li",null,"2.\u53EF\u4EE5\u4E0A\u4F20\u7B26\u5408\u6559\u5B66\u6848\u4F8B\u6807\u51C6\u7684\u6587\u6863\u8D44\u6599\uFF0C\u5982",l.a.createElement("a",{href:"https://www.educoder.net/courses/1309/boards/5909/messages/34799",target:"_blank"}," \u6848\u4F8B\u5165\u5E93\u6807\u51C6 ")," \u3001",l.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"),l.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"),l.a.createElement("li",null,"4.\u8BF7\u4F7F\u7528Chrome\uFF0CFirefox\uFF0CSafari\uFF0CIE11\uFF08\u53CA\u4EE5\u4E0A\u7248\u672C\uFF09\u6D4F\u89C8\u5668\uFF1B"))),l.a.createElement(U.a.Item,{style:{marginTop:10}},l.a.createElement(te.a,{type:"primary",htmlType:"submit"},"\u63D0\u4EA4")))},W=h("wzkS");function X(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */X=function(){return e};var e={},u=Object.prototype,i=u.hasOwnProperty,s=Object.defineProperty||function(a,r,n){a[r]=n.value},m=typeof Symbol=="function"?Symbol:{},p=m.iterator||"@@iterator",L=m.asyncIterator||"@@asyncIterator",j=m.toStringTag||"@@toStringTag";function g(a,r,n){return Object.defineProperty(a,r,{value:n,enumerable:!0,configurable:!0,writable:!0}),a[r]}try{g({},"")}catch(a){g=function(n,c,f){return n[c]=f}}function w(a,r,n,c){var f=r&&r.prototype instanceof ne?r:ne,d=Object.create(f.prototype),b=new ce(c||[]);return s(d,"_invoke",{value:E(a,n,b)}),d}function K(a,r,n){try{return{type:"normal",arg:a.call(r,n)}}catch(c){return{type:"throw",arg:c}}}e.wrap=w;var R={};function ne(){}function P(){}function A(){}var T={};g(T,p,function(){return this});var C=Object.getPrototypeOf,O=C&&C(C(_e([])));O&&O!==u&&i.call(O,p)&&(T=O);var v=A.prototype=ne.prototype=Object.create(T);function _(a){["next","throw","return"].forEach(function(r){g(a,r,function(n){return this._invoke(r,n)})})}function F(a,r){function n(f,d,b,D){var N=K(a[f],a,d);if(N.type!=="throw"){var oe=N.arg,Q=oe.value;return Q&&typeof Q=="object"&&i.call(Q,"__await")?r.resolve(Q.__await).then(function(ue){n("next",ue,b,D)},function(ue){n("throw",ue,b,D)}):r.resolve(Q).then(function(ue){oe.value=ue,b(oe)},function(ue){return n("throw",ue,b,D)})}D(N.arg)}var c;s(this,"_invoke",{value:function(d,b){function D(){return new r(function(N,oe){n(d,b,N,oe)})}return c=c?c.then(D,D):D()}})}function E(a,r,n){var c="suspendedStart";return function(f,d){if(c==="executing")throw new Error("Generator is already running");if(c==="completed"){if(f==="throw")throw d;return Z()}for(n.method=f,n.arg=d;;){var b=n.delegate;if(b){var D=ae(b,n);if(D){if(D===R)continue;return D}}if(n.method==="next")n.sent=n._sent=n.arg;else if(n.method==="throw"){if(c==="suspendedStart")throw c="completed",n.arg;n.dispatchException(n.arg)}else n.method==="return"&&n.abrupt("return",n.arg);c="executing";var N=K(a,r,n);if(N.type==="normal"){if(c=n.done?"completed":"suspendedYield",N.arg===R)continue;return{value:N.arg,done:n.done}}N.type==="throw"&&(c="completed",n.method="throw",n.arg=N.arg)}}}function ae(a,r){var n=r.method,c=a.iterator[n];if(c===void 0)return r.delegate=null,n==="throw"&&a.iterator.return&&(r.method="return",r.arg=void 0,ae(a,r),r.method==="throw")||n!=="return"&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),R;var f=K(c,a.iterator,r.arg);if(f.type==="throw")return r.method="throw",r.arg=f.arg,r.delegate=null,R;var d=f.arg;return d?d.done?(r[a.resultName]=d.value,r.next=a.nextLoc,r.method!=="return"&&(r.method="next",r.arg=void 0),r.delegate=null,R):d:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,R)}function B(a){var r={tryLoc:a[0]};1 in a&&(r.catchLoc=a[1]),2 in a&&(r.finallyLoc=a[2],r.afterLoc=a[3]),this.tryEntries.push(r)}function le(a){var r=a.completion||{};r.type="normal",delete r.arg,a.completion=r}function ce(a){this.tryEntries=[{tryLoc:"root"}],a.forEach(B,this),this.reset(!0)}function _e(a){if(a){var r=a[p];if(r)return r.call(a);if(typeof a.next=="function")return a;if(!isNaN(a.length)){var n=-1,c=function f(){for(;++n<a.length;)if(i.call(a,n))return f.value=a[n],f.done=!1,f;return f.value=void 0,f.done=!0,f};return c.next=c}}return{next:Z}}function Z(){return{value:void 0,done:!0}}return P.prototype=A,s(v,"constructor",{value:A,configurable:!0}),s(A,"constructor",{value:P,configurable:!0}),P.displayName=g(A,j,"GeneratorFunction"),e.isGeneratorFunction=function(a){var r=typeof a=="function"&&a.constructor;return!!r&&(r===P||(r.displayName||r.name)==="GeneratorFunction")},e.mark=function(a){return Object.setPrototypeOf?Object.setPrototypeOf(a,A):(a.__proto__=A,g(a,j,"GeneratorFunction")),a.prototype=Object.create(v),a},e.awrap=function(a){return{__await:a}},_(F.prototype),g(F.prototype,L,function(){return this}),e.AsyncIterator=F,e.async=function(a,r,n,c,f){f===void 0&&(f=Promise);var d=new F(w(a,r,n,c),f);return e.isGeneratorFunction(r)?d:d.next().then(function(b){return b.done?b.value:d.next()})},_(v),g(v,j,"Generator"),g(v,p,function(){return this}),g(v,"toString",function(){return"[object Generator]"}),e.keys=function(a){var r=Object(a),n=[];for(var c in r)n.push(c);return n.reverse(),function f(){for(;n.length;){var d=n.pop();if(d in r)return f.value=d,f.done=!1,f}return f.done=!0,f}},e.values=_e,ce.prototype={constructor:ce,reset:function(r){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(le),!r)for(var n in this)n.charAt(0)==="t"&&i.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=void 0)},stop:function(){this.done=!0;var r=this.tryEntries[0].completion;if(r.type==="throw")throw r.arg;return this.rval},dispatchException:function(r){if(this.done)throw r;var n=this;function c(oe,Q){return b.type="throw",b.arg=r,n.next=oe,Q&&(n.method="next",n.arg=void 0),!!Q}for(var f=this.tryEntries.length-1;f>=0;--f){var d=this.tryEntries[f],b=d.completion;if(d.tryLoc==="root")return c("end");if(d.tryLoc<=this.prev){var D=i.call(d,"catchLoc"),N=i.call(d,"finallyLoc");if(D&&N){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(!N)throw new Error("try statement without catch or finally");if(this.prev<d.finallyLoc)return c(d.finallyLoc)}}}},abrupt:function(r,n){for(var c=this.tryEntries.length-1;c>=0;--c){var f=this.tryEntries[c];if(f.tryLoc<=this.prev&&i.call(f,"finallyLoc")&&this.prev<f.finallyLoc){var d=f;break}}d&&(r==="break"||r==="continue")&&d.tryLoc<=n&&n<=d.finallyLoc&&(d=null);var b=d?d.completion:{};return b.type=r,b.arg=n,d?(this.method="next",this.next=d.finallyLoc,R):this.complete(b)},complete:function(r,n){if(r.type==="throw")throw r.arg;return r.type==="break"||r.type==="continue"?this.next=r.arg:r.type==="return"?(this.rval=this.arg=r.arg,this.method="return",this.next="end"):r.type==="normal"&&n&&(this.next=n),R},finish:function(r){for(var n=this.tryEntries.length-1;n>=0;--n){var c=this.tryEntries[n];if(c.finallyLoc===r)return this.complete(c.completion,c.afterLoc),le(c),R}},catch:function(r){for(var n=this.tryEntries.length-1;n>=0;--n){var c=this.tryEntries[n];if(c.tryLoc===r){var f=c.completion;if(f.type==="throw"){var d=f.arg;le(c)}return d}}throw new Error("illegal catch attempt")},delegateYield:function(r,n,c){return this.delegate={iterator:_e(r),resultName:n,nextLoc:c},this.method==="next"&&(this.arg=void 0),R}},e}var pe={loading:!1,data:{},tags:[]},z=function(e){return e[e.GET_DATA=0]="GET_DATA",e[e.SET_LOADING=1]="SET_LOADING",e[e.GET_TAGS=2]="GET_TAGS",e}(z||{});function o(e,u){switch(u.type){case z.GET_DATA:return Object(k.a)(Object(k.a)({},e),u.payload);case z.GET_TAGS:return Object(k.a)(Object(k.a)({},e),{},{tags:u.payload});case z.SET_LOADING:return Object(k.a)(Object(k.a)({},e),{},{loading:u.payload});default:throw new Error}}var t=x.default=function(){var e=Object(y.m)(),u=e.caseId,i=Object(y.k)(),s=Object(J.useReducer)(o,pe),m=Object(de.a)(s,2),p=m[0],L=m[1],j=p.loading,g=p.tags,w=p.data;Object(J.useEffect)(function(){function P(){return A.apply(this,arguments)}function A(){return A=Object(ee.a)(X().mark(function T(){var C;return X().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return v.next=2,Object(W.b)();case 2:C=v.sent,L({type:z.GET_TAGS,payload:C.library_tags});case 4:case"end":return v.stop()}},T)})),A.apply(this,arguments)}P()},[]),Object(J.useEffect)(function(){var P=!1;function A(){return T.apply(this,arguments)}function T(){return T=Object(ee.a)(X().mark(function C(){var O,v,_,F,E,ae,B,le,ce;return X().wrap(function(Z){for(;;)switch(Z.prev=Z.next){case 0:return L({type:z.SET_LOADING,payload:!1}),Z.next=3,Object(W.c)(u);case 3:O=Z.sent,v=O.author_name,_=O.author_school_name,F=O.content,E=O.cover,ae=O.attachments,B=O.status,le=O.title,ce=O.tags,P||(O.status===404?i.push("/moop_cases"):L({type:z.GET_DATA,payload:{data:{title:le,author_name:v,author_school_name:_,content:F,tag_ids:ce.map(function(a){return a.id}),publish:B==="published",attachment_ids:ae.map(function(a){return{uid:a.id,id:a.id,name:a.title,url:a.url,filesize:a.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 Z.stop()}},C)})),T.apply(this,arguments)}return!P&&u&&A(),function(){P=!0}},[u]);function K(P){return R.apply(this,arguments)}function R(){return R=Object(ee.a)(X().mark(function P(A){var T,C;return X().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:if(!u){v.next=6;break}return v.next=3,Object(W.e)(u,A);case 3:i.push("/moop_cases/".concat(u,"/publish-success")),v.next=11;break;case 6:return v.next=8,Object(W.a)(A);case 8:T=v.sent,C=T.id,C&&i.push("/moop_cases/".concat(C,"/publish-success"));case 11:case"end":return v.stop()}},P)})),R.apply(this,arguments)}var ne={initialValues:w,tags:g,removeAttachment:W.d,callback:K};return l.a.createElement(q.a,{spinning:j,delay:500},l.a.createElement("div",{className:"moop-info"},l.a.createElement("div",{className:"crumb"},l.a.createElement(Y.Link,{to:"/moop_cases"},"\u6559\u5B66\u6848\u4F8B > "),l.a.createElement("span",null,"\u65B0\u5EFA")),l.a.createElement("div",{className:"title"},l.a.createElement("h2",null,"\u4E0A\u4F20\u6559\u5B66\u6848\u4F8B"),l.a.createElement(Y.Link,{to:"/moop_cases"},"\u8FD4\u56DE")),l.a.createElement(be,ne)))}},wzkS:function(Le,x,h){"use strict";h.d(x,"c",function(){return de}),h.d(x,"b",function(){return k}),h.d(x,"d",function(){return J}),h.d(x,"a",function(){return Ae}),h.d(x,"e",function(){return Re});var Oe=h("9og8"),q=h("ErOA");function ee(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ee=function(){return y};var y={},Y=Object.prototype,M=Y.hasOwnProperty,te=Object.defineProperty||function(o,t,e){o[t]=e.value},S=typeof Symbol=="function"?Symbol:{},H=S.iterator||"@@iterator",Pe=S.asyncIterator||"@@asyncIterator",fe=S.toStringTag||"@@toStringTag";function I(o,t,e){return Object.defineProperty(o,t,{value:e,enumerable:!0,configurable:!0,writable:!0}),o[t]}try{I({},"")}catch(o){I=function(e,u,i){return e[u]=i}}function Ee(o,t,e,u){var i=t&&t.prototype instanceof U?t:U,s=Object.create(i.prototype),m=new X(u||[]);return te(s,"_invoke",{value:Fe(o,e,m)}),s}function he(o,t,e){try{return{type:"normal",arg:o.call(t,e)}}catch(u){return{type:"throw",arg:u}}}y.wrap=Ee;var G={};function U(){}function me(){}function V(){}var ve={};I(ve,H,function(){return this});var re=Object.getPrototypeOf,ie=re&&re(re(pe([])));ie&&ie!==Y&&M.call(ie,H)&&(ve=ie);var $=V.prototype=U.prototype=Object.create(ve);function ge(o){["next","throw","return"].forEach(function(t){I(o,t,function(e){return this._invoke(t,e)})})}function se(o,t){function e(i,s,m,p){var L=he(o[i],o,s);if(L.type!=="throw"){var j=L.arg,g=j.value;return g&&typeof g=="object"&&M.call(g,"__await")?t.resolve(g.__await).then(function(w){e("next",w,m,p)},function(w){e("throw",w,m,p)}):t.resolve(g).then(function(w){j.value=w,m(j)},function(w){return e("throw",w,m,p)})}p(L.arg)}var u;te(this,"_invoke",{value:function(s,m){function p(){return new t(function(L,j){e(s,m,L,j)})}return u=u?u.then(p,p):p()}})}function Fe(o,t,e){var u="suspendedStart";return function(i,s){if(u==="executing")throw new Error("Generator is already running");if(u==="completed"){if(i==="throw")throw s;return z()}for(e.method=i,e.arg=s;;){var m=e.delegate;if(m){var p=ye(m,e);if(p){if(p===G)continue;return p}}if(e.method==="next")e.sent=e._sent=e.arg;else if(e.method==="throw"){if(u==="suspendedStart")throw u="completed",e.arg;e.dispatchException(e.arg)}else e.method==="return"&&e.abrupt("return",e.arg);u="executing";var L=he(o,t,e);if(L.type==="normal"){if(u=e.done?"completed":"suspendedYield",L.arg===G)continue;return{value:L.arg,done:e.done}}L.type==="throw"&&(u="completed",e.method="throw",e.arg=L.arg)}}}function ye(o,t){var e=t.method,u=o.iterator[e];if(u===void 0)return t.delegate=null,e==="throw"&&o.iterator.return&&(t.method="return",t.arg=void 0,ye(o,t),t.method==="throw")||e!=="return"&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+e+"' method")),G;var i=he(u,o.iterator,t.arg);if(i.type==="throw")return t.method="throw",t.arg=i.arg,t.delegate=null,G;var s=i.arg;return s?s.done?(t[o.resultName]=s.value,t.next=o.nextLoc,t.method!=="return"&&(t.method="next",t.arg=void 0),t.delegate=null,G):s:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,G)}function be(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 W(o){var t=o.completion||{};t.type="normal",delete t.arg,o.completion=t}function X(o){this.tryEntries=[{tryLoc:"root"}],o.forEach(be,this),this.reset(!0)}function pe(o){if(o){var t=o[H];if(t)return t.call(o);if(typeof o.next=="function")return o;if(!isNaN(o.length)){var e=-1,u=function i(){for(;++e<o.length;)if(M.call(o,e))return i.value=o[e],i.done=!1,i;return i.value=void 0,i.done=!0,i};return u.next=u}}return{next:z}}function z(){return{value:void 0,done:!0}}return me.prototype=V,te($,"constructor",{value:V,configurable:!0}),te(V,"constructor",{value:me,configurable:!0}),me.displayName=I(V,fe,"GeneratorFunction"),y.isGeneratorFunction=function(o){var t=typeof o=="function"&&o.constructor;return!!t&&(t===me||(t.displayName||t.name)==="GeneratorFunction")},y.mark=function(o){return Object.setPrototypeOf?Object.setPrototypeOf(o,V):(o.__proto__=V,I(o,fe,"GeneratorFunction")),o.prototype=Object.create($),o},y.awrap=function(o){return{__await:o}},ge(se.prototype),I(se.prototype,Pe,function(){return this}),y.AsyncIterator=se,y.async=function(o,t,e,u,i){i===void 0&&(i=Promise);var s=new se(Ee(o,t,e,u),i);return y.isGeneratorFunction(t)?s:s.next().then(function(m){return m.done?m.value:s.next()})},ge($),I($,fe,"Generator"),I($,H,function(){return this}),I($,"toString",function(){return"[object Generator]"}),y.keys=function(o){var t=Object(o),e=[];for(var u in t)e.push(u);return e.reverse(),function i(){for(;e.length;){var s=e.pop();if(s in t)return i.value=s,i.done=!1,i}return i.done=!0,i}},y.values=pe,X.prototype={constructor:X,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(W),!t)for(var e in this)e.charAt(0)==="t"&&M.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},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 e=this;function u(j,g){return m.type="throw",m.arg=t,e.next=j,g&&(e.method="next",e.arg=void 0),!!g}for(var i=this.tryEntries.length-1;i>=0;--i){var s=this.tryEntries[i],m=s.completion;if(s.tryLoc==="root")return u("end");if(s.tryLoc<=this.prev){var p=M.call(s,"catchLoc"),L=M.call(s,"finallyLoc");if(p&&L){if(this.prev<s.catchLoc)return u(s.catchLoc,!0);if(this.prev<s.finallyLoc)return u(s.finallyLoc)}else if(p){if(this.prev<s.catchLoc)return u(s.catchLoc,!0)}else{if(!L)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return u(s.finallyLoc)}}}},abrupt:function(t,e){for(var u=this.tryEntries.length-1;u>=0;--u){var i=this.tryEntries[u];if(i.tryLoc<=this.prev&&M.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var s=i;break}}s&&(t==="break"||t==="continue")&&s.tryLoc<=e&&e<=s.finallyLoc&&(s=null);var m=s?s.completion:{};return m.type=t,m.arg=e,s?(this.method="next",this.next=s.finallyLoc,G):this.complete(m)},complete:function(t,e){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"&&e&&(this.next=e),G},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var u=this.tryEntries[e];if(u.finallyLoc===t)return this.complete(u.completion,u.afterLoc),W(u),G}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var u=this.tryEntries[e];if(u.tryLoc===t){var i=u.completion;if(i.type==="throw"){var s=i.arg;W(u)}return s}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,u){return this.delegate={iterator:pe(t),resultName:e,nextLoc:u},this.method==="next"&&(this.arg=void 0),G}},y}function de(y){return Object(q.c)("libraries/".concat(y,".json"))}function k(){return Object(q.c)("library_tags.json")}function J(y){return l.apply(this,arguments)}function l(){return l=Object(Oe.a)(ee().mark(function y(Y){var M;return ee().wrap(function(S){for(;;)switch(S.prev=S.next){case 0:return S.next=2,Object(q.b)("attachments/".concat(Y,".json"));case 2:return M=S.sent,S.abrupt("return",M.status===0);case 4:case"end":return S.stop()}},y)})),l.apply(this,arguments)}function Ae(y){return Object(q.f)("libraries.json",y)}function Re(y,Y){return Object(q.g)("libraries/".concat(y,".json"),Y)}}}]);