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