(self.webpackChunk=self.webpackChunk||[]).push([[6913],{89489:function(on,Lt,Ce){"use strict";Ce.d(Lt,{Z:function(){return ie}});var le=Ce(60499),yt=Ce(59301),a={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"outlined"},Te=a,ge=Ce(7657),x=function(ee,ue){return yt.createElement(ge.Z,(0,le.Z)({},ee,{ref:ue,icon:Te}))},z=yt.forwardRef(x),ie=z},59477:function(on,Lt,Ce){"use strict";Ce.d(Lt,{Z:function(){return ie}});var le=Ce(60499),yt=Ce(59301),a={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z"}}]},name:"caret-up",theme:"outlined"},Te=a,ge=Ce(7657),x=function(ee,ue){return yt.createElement(ge.Z,(0,le.Z)({},ee,{ref:ue,icon:Te}))},z=yt.forwardRef(x),ie=z},40001:function(on,Lt,Ce){"use strict";Ce.d(Lt,{Z:function(){return ie}});var le=Ce(60499),yt=Ce(59301),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"},Te=a,ge=Ce(7657),x=function(ee,ue){return yt.createElement(ge.Z,(0,le.Z)({},ee,{ref:ue,icon:Te}))},z=yt.forwardRef(x),ie=z},65363:function(on,Lt,Ce){"use strict";Ce.d(Lt,{Z:function(){return ie}});var le=Ce(60499),yt=Ce(59301),a={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm0 76c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm128.01 198.83c.03 0 .05.01.09.06l45.02 45.01a.2.2 0 01.05.09.12.12 0 010 .07c0 .02-.01.04-.05.08L557.25 512l127.87 127.86a.27.27 0 01.05.06v.02a.12.12 0 010 .07c0 .03-.01.05-.05.09l-45.02 45.02a.2.2 0 01-.09.05.12.12 0 01-.07 0c-.02 0-.04-.01-.08-.05L512 557.25 384.14 685.12c-.04.04-.06.05-.08.05a.12.12 0 01-.07 0c-.03 0-.05-.01-.09-.05l-45.02-45.02a.2.2 0 01-.05-.09.12.12 0 010-.07c0-.02.01-.04.06-.08L466.75 512 338.88 384.14a.27.27 0 01-.05-.06l-.01-.02a.12.12 0 010-.07c0-.03.01-.05.05-.09l45.02-45.02a.2.2 0 01.09-.05.12.12 0 01.07 0c.02 0 .04.01.08.06L512 466.75l127.86-127.86c.04-.05.06-.06.08-.06a.12.12 0 01.07 0z"}}]},name:"close-circle",theme:"outlined"},Te=a,ge=Ce(7657),x=function(ee,ue){return yt.createElement(ge.Z,(0,le.Z)({},ee,{ref:ue,icon:Te}))},z=yt.forwardRef(x),ie=z},26227:function(on,Lt,Ce){"use strict";Ce.d(Lt,{Z:function(){return ie}});var le=Ce(60499),yt=Ce(59301),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"},Te=a,ge=Ce(7657),x=function(ee,ue){return yt.createElement(ge.Z,(0,le.Z)({},ee,{ref:ue,icon:Te}))},z=yt.forwardRef(x),ie=z},49198:function(on,Lt,Ce){"use strict";Ce.d(Lt,{Z:function(){return ie}});var le=Ce(60499),yt=Ce(59301),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z"}}]},name:"double-right",theme:"outlined"},Te=a,ge=Ce(7657),x=function(ee,ue){return yt.createElement(ge.Z,(0,le.Z)({},ee,{ref:ue,icon:Te}))},z=yt.forwardRef(x),ie=z},41464:function(on,Lt,Ce){"use strict";Ce.d(Lt,{Z:function(){return ie}});var le=Ce(60499),yt=Ce(59301),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"},Te=a,ge=Ce(7657),x=function(ee,ue){return yt.createElement(ge.Z,(0,le.Z)({},ee,{ref:ue,icon:Te}))},z=yt.forwardRef(x),ie=z},73331:function(on,Lt,Ce){"use strict";Ce.d(Lt,{Z:function(){return ie}});var le=Ce(60499),yt=Ce(59301),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}},{tag:"path",attrs:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"}}]},name:"eye-invisible",theme:"outlined"},Te=a,ge=Ce(7657),x=function(ee,ue){return yt.createElement(ge.Z,(0,le.Z)({},ee,{ref:ue,icon:Te}))},z=yt.forwardRef(x),ie=z},15277:function(on,Lt,Ce){"use strict";Ce.d(Lt,{Z:function(){return ie}});var le=Ce(60499),yt=Ce(59301),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"},Te=a,ge=Ce(7657),x=function(ee,ue){return yt.createElement(ge.Z,(0,le.Z)({},ee,{ref:ue,icon:Te}))},z=yt.forwardRef(x),ie=z},52671:function(on,Lt,Ce){"use strict";Ce.d(Lt,{Z:function(){return ie}});var le=Ce(60499),yt=Ce(59301),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file",theme:"outlined"},Te=a,ge=Ce(7657),x=function(ee,ue){return yt.createElement(ge.Z,(0,le.Z)({},ee,{ref:ue,icon:Te}))},z=yt.forwardRef(x),ie=z},8657:function(on,Lt,Ce){"use strict";Ce.d(Lt,{Z:function(){return ie}});var le=Ce(60499),yt=Ce(59301),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 444H820V330.4c0-17.7-14.3-32-32-32H473L355.7 186.2a8.15 8.15 0 00-5.5-2.2H96c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h698c13 0 24.8-7.9 29.7-20l134-332c1.5-3.8 2.3-7.9 2.3-12 0-17.7-14.3-32-32-32zM136 256h188.5l119.6 114.4H748V444H238c-13 0-24.8 7.9-29.7 20L136 643.2V256zm635.3 512H159l103.3-256h612.4L771.3 768z"}}]},name:"folder-open",theme:"outlined"},Te=a,ge=Ce(7657),x=function(ee,ue){return yt.createElement(ge.Z,(0,le.Z)({},ee,{ref:ue,icon:Te}))},z=yt.forwardRef(x),ie=z},56082:function(on,Lt,Ce){"use strict";Ce.d(Lt,{Z:function(){return ie}});var le=Ce(60499),yt=Ce(59301),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M300 276.5a56 56 0 1056-97 56 56 0 00-56 97zm0 284a56 56 0 1056-97 56 56 0 00-56 97zM640 228a56 56 0 10112 0 56 56 0 00-112 0zm0 284a56 56 0 10112 0 56 56 0 00-112 0zM300 844.5a56 56 0 1056-97 56 56 0 00-56 97zM640 796a56 56 0 10112 0 56 56 0 00-112 0z"}}]},name:"holder",theme:"outlined"},Te=a,ge=Ce(7657),x=function(ee,ue){return yt.createElement(ge.Z,(0,le.Z)({},ee,{ref:ue,icon:Te}))},z=yt.forwardRef(x),ie=z},33853:function(on,Lt,Ce){"use strict";Ce.d(Lt,{Z:function(){return ie}});var le=Ce(60499),yt=Ce(59301),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"},Te=a,ge=Ce(7657),x=function(ee,ue){return yt.createElement(ge.Z,(0,le.Z)({},ee,{ref:ue,icon:Te}))},z=yt.forwardRef(x),ie=z},15075:function(on,Lt,Ce){"use strict";Ce.d(Lt,{Z:function(){return ie}});var le=Ce(60499),yt=Ce(59301),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"minus-square",theme:"outlined"},Te=a,ge=Ce(7657),x=function(ee,ue){return yt.createElement(ge.Z,(0,le.Z)({},ee,{ref:ue,icon:Te}))},z=yt.forwardRef(x),ie=z},43531:function(on,Lt,Ce){"use strict";Ce.d(Lt,{Z:function(){return ie}});var le=Ce(60499),yt=Ce(59301),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"plus-square",theme:"outlined"},Te=a,ge=Ce(7657),x=function(ee,ue){return yt.createElement(ge.Z,(0,le.Z)({},ee,{ref:ue,icon:Te}))},z=yt.forwardRef(x),ie=z},76618:function(on,Lt,Ce){"use strict";Ce.d(Lt,{Z:function(){return ie}});var le=Ce(60499),yt=Ce(59301),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M705.6 124.9a8 8 0 00-11.6 7.2v64.2c0 5.5 2.9 10.6 7.5 13.6a352.2 352.2 0 0162.2 49.8c32.7 32.8 58.4 70.9 76.3 113.3a355 355 0 0127.9 138.7c0 48.1-9.4 94.8-27.9 138.7a355.92 355.92 0 01-76.3 113.3 353.06 353.06 0 01-113.2 76.4c-43.8 18.6-90.5 28-138.5 28s-94.7-9.4-138.5-28a353.06 353.06 0 01-113.2-76.4A355.92 355.92 0 01184 650.4a355 355 0 01-27.9-138.7c0-48.1 9.4-94.8 27.9-138.7 17.9-42.4 43.6-80.5 76.3-113.3 19-19 39.8-35.6 62.2-49.8 4.7-2.9 7.5-8.1 7.5-13.6V132c0-6-6.3-9.8-11.6-7.2C178.5 195.2 82 339.3 80 506.3 77.2 745.1 272.5 943.5 511.2 944c239 .5 432.8-193.3 432.8-432.4 0-169.2-97-315.7-238.4-386.7zM480 560h64c4.4 0 8-3.6 8-8V88c0-4.4-3.6-8-8-8h-64c-4.4 0-8 3.6-8 8v464c0 4.4 3.6 8 8 8z"}}]},name:"poweroff",theme:"outlined"},Te=a,ge=Ce(7657),x=function(ee,ue){return yt.createElement(ge.Z,(0,le.Z)({},ee,{ref:ue,icon:Te}))},z=yt.forwardRef(x),ie=z},61485:function(on,Lt,Ce){"use strict";Ce.d(Lt,{Z:function(){return ie}});var le=Ce(60499),yt=Ce(59301),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"question-circle",theme:"outlined"},Te=a,ge=Ce(7657),x=function(ee,ue){return yt.createElement(ge.Z,(0,le.Z)({},ee,{ref:ue,icon:Te}))},z=yt.forwardRef(x),ie=z},47472:function(on,Lt,Ce){"use strict";Ce.d(Lt,{Z:function(){return ie}});var le=Ce(60499),yt=Ce(59301),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"},Te=a,ge=Ce(7657),x=function(ee,ue){return yt.createElement(ge.Z,(0,le.Z)({},ee,{ref:ue,icon:Te}))},z=yt.forwardRef(x),ie=z},87395:function(on,Lt,Ce){"use strict";Ce.d(Lt,{Z:function(){return ie}});var le=Ce(60499),yt=Ce(59301),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"}}]},name:"up",theme:"outlined"},Te=a,ge=Ce(7657),x=function(ee,ue){return yt.createElement(ge.Z,(0,le.Z)({},ee,{ref:ue,icon:Te}))},z=yt.forwardRef(x),ie=z},88319:function(){"use strict"},94896:function(){"use strict"},74501:function(on,Lt){"use strict";Lt.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},21385:function(){"use strict"},84915:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;(function(){if(typeof window.GGBApplet=="function"){console.warn("deployggb.js was loaded twice");return}var isRenderGGBElementEnabled=!1,scriptLoadStarted=!1,html5AppletsToProcess=null,ggbHTML5LoadedCodebaseIsWebSimple=!1,ggbHTML5LoadedCodebaseVersion=null,ggbHTML5LoadedScript=null,GGBApplet=function(){"use strict";for(var on={},Lt="5.0",Ce={},le=null,yt=!1,a=!1,Te=null,ge=!1,x=null,z=null,ie=0;ie4?parseFloat(Ve):5};on.setHTML5Codebase=function(Ve,Ye){z=Ve,nt(Ve,Ye)},on.setJavaCodebase=on.setJavaCodebaseVersion=on.isCompiledInstalled=on.setPreCompiledScriptPath=on.setPreCompiledResourcePath=function(){},on.setHTML5CodebaseVersion=function(Ve,Ye){var Ge=parseFloat(Ve);if(Ge!==NaN&&Ge<5){console.log("The GeoGebra HTML5 codebase version "+Ge+" is deprecated. Using version latest instead.");return}x=Ve,Ke(Ve,Ye)},on.getHTML5CodebaseVersion=function(){return te},on.getParameters=function(){return Ce},on.setFontsCSSURL=function(Ve){pe=Ve},on.setGiacJSURL=function(Ve){},on.setJNLPFile=function(Ve){ee=Ve},on.setJNLPBaseDir=function(Ve){},on.inject=function(){function Ve(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var Ye="auto",Ge=Ce.id,it,qe=!1,vt=0;vt=5)return!0;var Ve=on.getAppletObject();return Ve&&typeof Ve.recalculateEnvironments=="function"?(Ve.recalculateEnvironments(),!0):!1},on.startAnimation=function(){var Ve=on.getAppletObject();return Ve&&typeof Ve.startAnimation=="function"?(Ve.startAnimation(),!0):!1},on.stopAnimation=function(){var Ve=on.getAppletObject();return Ve&&typeof Ve.stopAnimation=="function"?(Ve.stopAnimation(),!0):!1},on.getAppletObject=function(){var Ve=Ce.id!==void 0?Ce.id:"ggbApplet";return window[Ve]},on.resize=function(){};var Ie=function(Ve,Ye,Ge){var it=document.createElement("param");it.setAttribute("name",Ye),it.setAttribute("value",Ge),Ve.appendChild(it)},Me=function(Ve){return Ve&&Ve!=="false"},Le=function(Ve,Ye,Ge){je(te)<=4.2&&(Ge=!0);var it=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==te||ggbHTML5LoadedCodebaseIsWebSimple&&!ae)&&(it=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var qe=document.createElement("div");qe.classList.add("appletParameters","notranslate");var vt=Ye.width,ot=Ye.height;if(Ye.disableAutoScale=Ye.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():Ye.disableAutoScale,Ye.width!==void 0)if(je(te)<=4.4)Me(Ye.showToolBar)&&(Ye.height-=7),Me(Ye.showAlgebraInput)&&(Ye.height-=37),Ye.width<605&&Me(Ye.showToolBar)&&(Ye.width=605,vt=605);else{var Qe=100;(Me(Ye.showToolBar)||Me(Ye.showMenuBar))&&(Ye.hasOwnProperty("customToolBar")&&(Ye.customToolbar=Ye.customToolBar),Qe=Me(Ye.showMenuBar)?245:155),vt=5?(Ye.appletOnLoad=function(lt){var mt=Ve.querySelector(".ggb_preview");mt&&mt.parentNode.removeChild(mt),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(ne),window.GGBT_wsf_view&&$(window).trigger("resize"),Re(lt)},fe||ne.appendChild(Ne)):qe.appendChild(Ne),ne.appendChild(qe),fe||Ve.appendChild(ne),setTimeout(function(){on.resize()},1)}else{var We=document.createElement("div");We.className="applet_scaler",We.style.position="relative",We.style.display="block",We.appendChild(qe),Ve.appendChild(We),Ye.appletOnLoad=function(lt){on.resize(),Re(lt)}}function we(lt,mt){mt&&typeof mt.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(lt,mt.appletOnLoad):renderGGBElement(lt),rt("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",mt)}function ye(lt,mt){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:lt,params:mt}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(ut){we(ut.article,ut.params)}),html5AppletsToProcess=null)},je(te)<5&&(lt.className+=" geogebraweb")):we(lt,mt)}if(it){scriptLoadStarted=!0;for(var Oe=0;Oe0?(Fe.remove(),ne.attr("id","fullscreencontent").show(),jQuery(Re).append(ne),window.dispatchEvent(new Event("resize"))):Le(Fe,Ye,!1),window.GGBT_wsf_view.launchFullScreen(Re)}else re=it,Le(Ve,Ye,!1);if(!window.GGBT_wsf_view)for(ot=0;otVe/4*3&&(Fe=Ve/4*3),Re=Fe/5.8,Qe.setAttribute("src",me),Qe.setAttribute("width",Fe),Qe.setAttribute("height",Re);var ne=(Ve-Fe)/2,fe=(Ye-Re)/2;Qe.style.left=ne+"px",Qe.style.top=fe+"px",qe.appendChild(Qe)}}return qe.appendChild(ot),qe},st=function(Ve){return Ve=Ve.toLowerCase(),Ve==="html5"||Ve==="screenshot"?Ve:"html5"},_e=["web","webSimple","web3d","tablet","tablet3d","phone"],Ke=function(Ve,Ye){if(te=Ve,Ye){nt(te,!0);return}var Ge=!yt;if(Ge){var it=je(te);!isNaN(it)&&it<4.4&&(Ge=!1)}var qe,vt;window.location.protocol.substr(0,4)==="http"?qe=window.location.protocol:qe="http:";var ot=te.indexOf("//");ot>0?vt=te:ot===0?vt=qe+te:vt="https://www.geogebra.org/apps/5.2.814.0/";for(var Qe in _e)if(te.slice(_e[Qe].length*-1)===_e[Qe]||te.slice((_e[Qe].length+1)*-1)===_e[Qe]+"/"){nt(vt,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&Ge&&!le.is3D&&!le.AV&&!le.SV&&!le.CV&&!le.EV2&&!le.CP&&!le.PC&&!le.DA&&!le.FI&&!le.PV&&!Me(Ce.showToolBar)&&!Me(Ce.showMenuBar)&&!Me(Ce.showAlgebraInput)&&!Me(Ce.enableRightClick)&&(!Ce.appName||Ce.appName=="classic")?vt+="webSimple/":vt+="web3d/",nt(vt,!1)},nt=function(Ve,Ye){if(Ve.requirejs){ue=Ve;return}Ve.slice(-1)!=="/"&&(Ve+="/"),ue=Ve,Ye===null&&(Ye=Ve.indexOf("http")===-1),E=Ye,se="web.nocache.js",ae=!1;var Ge=ue.split("/");Ge.length>1&&(!Ye&&Ge[Ge.length-2]==="webSimple"?(se="webSimple.nocache.js",ae=!0):_e.indexOf(Ge[Ge.length-2])>=0&&(se=Ge[Ge.length-2]+".nocache.js")),Ge=Ve.split("/"),te=Ge[Ge.length-3],te.substr(0,4)==="test"?te=te.substr(4,1)+"."+te.substr(5,1):(te.substr(0,3)==="war"||te.substr(0,4)==="beta")&&(te="5.0");var it=parseFloat(te);it!==NaN&&it<5&&Ve.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+it+" is deprecated. Using version latest instead."),Ke("5.0",Ye))},rt=function(Ve,Ye){window.console&&window.console.log&&(!Ye||typeof Ye.showLogging=="undefined"||Ye.showLogging&&Ye.showLogging!=="false")&&console.log(Ve)};Ce.material_id!==void 0?De(et):et();function et(){var Ve=Lt;x!==null?Ve=x:parseFloat(Ve)<5&&(Ve="5.0"),Ke(Ve,!1),z!==null&&nt(z,E),ge=!0}return on},GGBAppletUtils=function(){"use strict";function on(){return window.GGBT_wsf_edit!==void 0}function Lt(ge,x){x!=1?(ge.style.transformOrigin="0% 0% 0px",ge.style.webkitTransformOrigin="0% 0% 0px",ge.style.transform="scale("+x+","+x+")",ge.style.webkitTransform="scale("+x+","+x+")",ge.style.maxWidth="initial",ge.querySelector(".ggb_preview")!==null&&(ge.querySelector(".ggb_preview").style.maxWidth="initial"),ge.querySelectorAll(".ggb_preview img")[0]!==void 0&&(ge.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),ge.querySelectorAll(".ggb_preview img")[1]!==void 0&&(ge.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(ge.style.transform="none",ge.style.webkitTransform="none")}function Ce(ge,x,z,ie,oe,ee){var ue=null;if(ee!=null&&ee!="")for(var E=ge.parentNode;E!=null;)if((" "+E.className+" ").indexOf(" "+ee+" ")>-1){ue=E;break}else E=E.parentNode;var re=0,te=0,se=0,ae=0,he=0,me=0,ve=0;if(ue)re=ue.offsetWidth,te=Math.max(ie?ue.offsetWidth:0,ue.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(re=Math.min(window.innerWidth,document.documentElement.clientWidth),te=Math.min(window.innerHeight,document.documentElement.clientHeight),se=re):(re=window.innerWidth,te=window.innerHeight,se=window.innerWidth),ge){var pe=ge.getBoundingClientRect();pe.left>0&&pe.left<=re&&(oe===void 0||!oe)&&(document.dir==="rtl"?(he=re-pe.width-pe.left,me=se<=480?10:30):(me=pe.left,he=se<=480?10:30),ae=me+he)}if(ge&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var be=ge.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(ae=40,ve=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(ae=0,ve=40)}}return ge&&((z===void 0||!z)&&x>0&&x+ae1&&(ee=!0)),x&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(ee=!0),!(ge.hasOwnProperty("disableAutoScale")&&ge.disableAutoScale))oe=le(ge,x,ee,z,ge.scaleContainerClass);else return ie;return ee&&(!ge.hasOwnProperty("scale")||ie===1)?oe:Math.min(ie,oe)}function a(ge){var x=Math.min(window.innerWidth,document.documentElement.clientWidth),z=Math.min(window.innerHeight,document.documentElement.clientHeight),ie=ge.getBoundingClientRect(),oe=(x-ie.width)/2,ee=(z-ie.height)/2;ee<0&&(ee=0),ge.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(oe<40?ge.style.left="40px":ge.style.left=oe+"px",ge.style.top=ee+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(ee<40?ge.style.top="40px":ge.style.top=ee+"px",ge.style.left=oe+"px")}function Te(ge,x){var z=ge.querySelector(".appletParameters");if(z){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(x.id!==z.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(ge)}if(z.parentElement&&/fullscreen/.test(z.parentElement.className))return;var ie=yt(x,ge);on()&&z.setAttribute("data-param-scale",ie);for(var oe=null,ee=0;ee=O)continue;if(j==jb){if(k=i.getAttribute(kb),k){var l,m=k.indexOf(lb);m>=O?(j=k.substring(O,m),l=k.substring(m+P)):(j=k,l=W),c[j]=l}}else if(j==mb){if(k=i.getAttribute(kb),k)try{d=eval(k)}catch(on){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(on){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(on){var Lt=c[on];return Lt==null?null:Lt},r=d,webModule.__errFn=e}function B(){function on(ge){var x=ge.lastIndexOf(rb);x==-1&&(x=ge.length);var z=ge.indexOf(sb);z==-1&&(z=ge.length);var ie=ge.lastIndexOf(tb,Math.min(z,x));return ie>=O?ge.substring(O,ie+P):W}function Lt(ge){if(!ge.match(/^\w+:\/\//)){var x=o.createElement(ub);x.src=ge+vb,ge=on(x.src)}return ge}function Ce(){var ge=__gwt_getMetaProperty(wb);return ge!=null?ge:W}function le(){for(var ge=o.getElementsByTagName(_),x=O;xO?ge[ge.length-P].href:W}function a(){var ge=o.location;return ge.href==ge.protocol+zb+ge.host+ge.pathname+ge.search+ge.hash}var Te=Ce();return Te==W&&(Te=le()),Te==W&&(Te=yt()),Te==W&&a()&&(Te=on(o.location.href)),Te=Lt(Te),Te}function C(on){return on.match(/^\//)||on.match(/^[a-zA-Z]+:\/\//)?on:webModule.__moduleBase+on}function D(){var on=[],Lt=O,Ce=[],le=[];function yt(ge){var x=le[ge](),z=Ce[ge];if(x in z)return x;var ie=[];for(var oe in z)ie[z[oe]]=oe;throw r&&r(ge,ie,x),null}if(__gwt_isKnownPropertyValue=function(ge,x){return x in Ce[ge]},webModule.__getPropMap=function(){var ge={};for(var x in Ce)Ce.hasOwnProperty(x)&&(ge[x]=yt(x));return ge},webModule.__computePropValue=yt,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var a;try{a=Cb;var Te=a.indexOf(Db);Te!=-1&&(Lt=parseInt(a.substring(Te+P),$),a=a.substring(O,Te))}catch(ge){}return webModule.__softPermutationId=Lt,C(a+Eb)}function F(){n.__gwt_stylesLoaded||(n.__gwt_stylesLoaded={})}A(),webModule.__moduleBase="/js/mathematicalGraphics/"+name+"/",s[L].moduleBase=webModule.__moduleBase;var G=D();return F(),w(G),!0}return webModule},typeof window.web3d!="function"&&(window.web3d=GGBAppletUtils.makeModule("web3d","A18F540516513B1292CA7CEF2F6AFC7E")),typeof window.webSimple!="function"&&(window.webSimple=GGBAppletUtils.makeModule("webSimple","96B09BF1B436BF53F0DF54116700F16A")),window.GGBApplet=GGBApplet})()},23216:function(on,Lt,Ce){"use strict";Ce.d(Lt,{Ax:function(){return Te},Ds:function(){return ge},KI:function(){return z},SI:function(){return a},f1:function(){return yt}});var le=Ce(14185);function yt(ie){let oe=!0;if(ie.length>0){for(let ee=0;eenew Promise((se,ae)=>{var he=pe=>{try{ve(te.next(pe))}catch(be){ae(be)}},me=pe=>{try{ve(te.throw(pe))}catch(be){ae(be)}},ve=pe=>pe.done?se(pe.value):Promise.resolve(pe.value).then(he,me);ve((te=te.apply(E,re)).next())}),ue=({data:E,className:re,fullWidth:te,style:se={},onClose:ae,onOk:he,showFullTools:me,noAssociationId:ve})=>{const pe=(0,le.useRef)(null),be=(0,le.useRef)(null),je=(0,le.useRef)(null),ke=(0,le.useRef)(null),[Be,De]=(0,le.useState)(!1),[Se,Ee]=(0,le.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,le.useEffect)(()=>(je.current||(je.current=document.createElement("style"),document.head.appendChild(je.current)),E!=null&&E.visible?(document.body.setAttribute("data-custom","y-hidden"),je.current.innerHTML=" html { overflow-y: hidden; }",E!=null&&E.src&&Ie()):(document.body.removeAttribute("data-custom"),je.current&&(document.head.removeChild(je.current),je.current=null)),()=>{document.body.removeAttribute("data-custom"),je.current&&(document.head.removeChild(je.current),je.current=null)}),[E==null?void 0:E.visible]);const Ie=()=>oe(void 0,null,function*(){De(!0),Ee("\u6B63\u5728\u52A0\u8F7D\u4E2D");const Pe=yield(0,ie.ZJ)(E==null?void 0:E.src);pe.current.src="",pe.current.src=Pe,pe.current.onload=function(){Ae()},De(!1),Ee("")}),Me=Pe=>oe(void 0,null,function*(){De(!0),Ee("\u6B63\u5728\u4FDD\u5B58\u4E2D");const Ue=yield(0,z.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:E.title,file:Pe.dataUrl}});Ue!=null&&Ue.id&&!ve?(yield(0,z.ZP)(`/api/attachments/${E.id}/add_subitem.json`,{method:"post",body:{subitem_id:Ue==null?void 0:Ue.id,settings:JSON.stringify(Pe.state)}})).status===0&&he():Ue!=null&&Ue.id&&he(Ue),De(!1),Ee("")}),Le=()=>{const Pe=document.querySelector('a[href="https://markerjs.com/"]');Pe&&Pe.parentNode&&(Pe.parentNode.style.display="none"),[{name:'[data-action="select"]',title:"\u9009\u62E9"},{name:'[data-action="delete"]',title:"\u5220\u9664\u5143\u7D20"},{name:'[data-action="undo"]',title:"\u64A4\u9500"},{name:'[data-type-name="FrameMarker"]',title:"\u77E9\u5F62"},{name:'[data-type-name="FreehandMarker"]',title:"\u753B\u7EBF"},{name:'[data-type-name="ArrowMarker"]',title:"\u7BAD\u5934"},{name:'[data-type-name="TextMarker"]',title:"\u6587\u672C"},{name:'[data-type-name="EllipseMarker"]',title:"\u692D\u5706"},{name:'[data-type-name="HighlightMarker"]',title:"\u65B9\u5757"},{name:'[data-type-name="CalloutMarker"]',title:"\u6CE8\u91CA"},{name:'[data-action="render"]',title:"\u4FDD\u5B58"},{name:'[data-action="close"]',title:"\u9000\u51FA"}].forEach(He=>{const Je=document.querySelector(He.name);Je&&Je.setAttribute("title",He.title)})},Ae=()=>{be.current=new x.hP(pe.current),be.current.targetRoot=ke.current,be.current.addEventListener("render",Me),be.current.addEventListener("beforeclose",ae),me&&(be.current.availableMarkerTypes=be.current.ALL_MARKER_TYPES,be.current.uiStyleSettings.redoButtonVisible=!0,be.current.uiStyleSettings.notesButtonVisible=!0,be.current.uiStyleSettings.zoomButtonVisible=!0,be.current.uiStyleSettings.zoomOutButtonVisible=!0,be.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=be.current.uiStyleSettings,be.current.show(),E!=null&&E.snapshotData&&be.current.restoreState(E.snapshotData),setTimeout(()=>{window.scrollTo(0,0),Le()},300)};return le.createElement(le.Fragment,null,(E==null?void 0:E.visible)&&le.createElement(ge.Z,{spinning:Be,tip:Se,style:{position:"absolute",width:"100vw"}},le.createElement("div",{ref:ke,className:Te()(yt.imageDimensions,re,te?yt.fullWidth:""),style:se},le.createElement("img",{className:yt.img,ref:pe}))))}},9057:function(on,Lt,Ce){"use strict";var le=Ce(59301),yt=Ce(77019),a=Ce(5269),Te=Ce(31691),ge=Ce(7939),x=Ce(35883),z=Ce(74501),ie=Ce(48136),oe=Ce(59301);const ee=(0,le.forwardRef)(({callback:ue,showSaveButton:E,value:re=""},te)=>{const se=(0,le.useRef)(),ae=[{name:"\u5206\u6570\u5F97\u5206",value:"\\frac{x}{y}",children:[{name:"\u5206\u6570 Fractions",data:[{value:"\\frac{a}{b}"},{value:"x\\tfrac{x}{a} "},{value:"\\mathrm{d}t"},{value:"\\partial t"},{value:"\\frac{\\partial y}{\\partial x}"},{value:"\\nabla\\psi"},{value:"\\frac{\\partial^2}{\\partial x_1\\partial x_2}y"},{value:"\\cfrac{1}{a + \\cfrac{7}{b + \\cfrac{2}{9}}} = c"}]},{name:"\u5BFC\u6570 Derivative",data:[{value:"\\dot{a} "},{value:"\\ddot{a}"},{value:"{f}^{\\prime}"},{value:"{f}^{\\prime\\prime}"},{value:"{f}^{(n)}"}]},{name:"\u6A21\u7B97\u672F Modular arithmetic",data:[{value:"a \\bmod b"},{value:"a \\equiv b \\pmod{m} "},{value:"\\gcd(m, n) "},{value:"\\operatorname{lcm}(m, n) "}]}]},{name:"\u6839\u5F0F\u89D2\u6807",value:"\\sqrt{x}",children:[{name:"\u6839\u5F0F Radicals",data:[{value:"\\sqrt{x}"},{value:"\\sqrt[y]{x}"}]},{name:"\u4E0A\u4E0B\u6807 Sub&Super",data:[{value:"x^{a}"},{value:"x_{a}"},{value:"x_{a}^{b} "},{value:"_{a}^{b} x"},{value:"x_{a}^{b} "}]},{name:"\u91CD\u97F3\u7B26\u53CA\u5176\u4ED6 Accents and Others",data:[{value:"\\hat{a} "},{value:"\\sqrt[y]{x}"},{value:"\\check{} "},{value:"\\grave{a} "},{value:"\\acute{a}"},{value:"\\tilde{a}"},{value:"\\breve{a}"},{value:"\\bar{a}"},{value:"\\vec{a}"},{value:"\\not{a}"},{value:"\\widetilde{abc}"},{value:"\\widehat{abc}"},{value:"\\overleftarrow{abc} "},{value:"\\overrightarrow{abc}"},{value:"\\overline{abc}"},{value:"\\underline{abc}"},{value:"\\overbrace{abc}"},{value:"\\underbrace{abc}"},{value:"\\overset{a}{abc}"},{value:"\\underset{a}{abc} \\stackrel\\frown{ab}"},{value:"\\overline{ab} "},{value:"\\overleftrightarrow{ab}"},{value:"\\overset{a}{\\leftarrow}"},{value:"\\overset{a}{\\rightarrow}"},{value:"\\xleftarrow[abc]{a}"},{value:"\\xrightarrow[abc]{a} "}]}]},{name:"\u6781\u9650\u5BF9\u6570",value:"\\lim_{x \\to 0}",children:[{name:"\u6781\u9650 Limits",data:[{value:"\\lim a"},{value:"\\lim_{x \\to 0}"},{value:"\\lim_{x \\to \\infty}"},{value:"\\max_b{a}"},{value:"\\min_a{b}"}]},{name:"\u5BF9\u6570\u6307\u6570 Logarithms and exponentials",data:[{value:"\\log_{a}{b}"},{value:"\\lg_{a}{b}"},{value:"\\ln_{a}{b}"},{value:"\\exp a"}]},{name:"\u754C\u9650 Bounds",data:[{value:"\\min x"},{value:"\\sup t"},{value:"\\inf s"},{value:"\\lim u"},{value:"\\limsup w"},{value:"\\dim p"},{value:"\\ker\\phi "}]}]},{name:"\u4E09\u89D2\u51FD\u6570",value:"\\sin a",children:[{name:"\u4E09\u89D2\u51FD\u6570 Trigonometric functions",data:[{value:"\\sin a"},{value:"\\cos a"},{value:"\\tan a"},{value:"\\cot a "},{value:"\\sec a "},{value:"\\csc a "}]},{name:"\u53CD\u4E09\u89D2\u51FD\u6570 Inverse trigonometric functions",data:[{value:"\\sin^{-1}"},{value:"\\cos^{-1}"},{value:"\\tan^{-1}"},{value:"\\cot^{-1}"},{value:"\\sec^{-1}"},{value:"\\csc^{-1}"},{value:"\\arcsin a"},{value:"\\arccos a"},{value:"\\arctan a"},{value:"\\operatorname{arccot} a"},{value:"\\operatorname{arcsec} a"},{value:"\\operatorname{arccsc} a"}]},{name:"\u53CC\u66F2\u51FD\u6570 Hyperblic functions",data:[{value:"\\sinh a"},{value:"\\cosh a"},{value:"\\tanh a"},{value:"\\coth a"},{value:"\\operatorname{sech} a"},{value:"\\operatorname{csch} a"}]},{name:"\u53CD\u53CC\u66F2\u51FD\u6570 Inverse hyperbolic functions",data:[{value:"\\sinh^{-1}"},{value:"a\\cosh^{-1} a"},{value:"\\tanh^{-1} a"},{value:"\\coth^{-1} a"},{value:"\\operatorname{sech}^{-1} a"},{value:"\\operatorname{csch}^{-1} a"}]}]},{name:"\u79EF\u5206\u8FD0\u7B97",value:"\\int_{a}^{b}",children:[{name:"\u79EF\u5206 Integral",data:[{value:"\\int"},{value:"\\int_{a}^{b}"},{value:"\\int\\limits_{a}^{b}"}]},{name:"\u53CC\u91CD\u79EF\u5206 Double integral",data:[{value:"\\iint"},{value:"\\iint_{a}^{b} "},{value:"\\iint\\limits_{a}^{b} "}]},{name:"\u4E09\u91CD\u79EF\u5206 Triple integral",data:[{value:"\\iiint"},{value:"\\iiint_{a}^{b}"},{value:"\\iiint\\limits_{a}^{b} "}]},{name:"\u66F2\u7EBF\u79EF\u5206 Closed line or path integral",data:[{value:"\\oint"},{value:"\\oint_{a}^{b} "}]}]},{name:"\u5927\u578B\u8FD0\u7B97",value:"\\sum_{a}^{b}",children:[{name:"\u6C42\u548C Summation",data:[{value:"\\sum"},{value:"\\sum_{a}^{b}"},{value:"{\\textstyle \\sum_{a}^{b}} "}]},{name:"\u4E58\u79EF\u4F59\u79EF Product and coproduct",data:[{value:"\\prod"},{value:"\\prod_{a}^{b}"},{value:"{\\textstyle \\prod_{a}^{b}}"},{value:"\\coprod"},{value:"\\coprod_{a}^{b}"},{value:"{\\textstyle \\coprod_{a}^{b}} "}]},{name:"\u5E76\u96C6\u4EA4\u96C6 Union and intersection",data:[{value:"\\bigcup"},{value:"\\bigcup_{a}^{b}"},{value:"{\\textstyle \\bigcup_{a}^{b}}"},{value:"\\bigcap"},{value:"\\bigcap_{a}^{b}"}]},{name:"\u6790\u53D6\u5408\u53D6 Disjunction and conjunction",data:[{value:"\\bigvee"},{value:"\\bigvee_{a}^{b}"},{value:"\\bigwedge"},{value:"\\bigwedge_{a}^{b}"}]}]},{name:"\u62EC\u53F7\u53D6\u6574",value:"\\left [ \\left ( \\right ) \\right ] ",children:[{name:"\u62EC\u53F7 Brackets",data:[{value:"\\left ( \\right )"},{value:"\\left [ \\right ]"},{value:"\\left \\langle \\right \\rangle "},{value:"\\left | \\right | "},{value:"\\left \\lfloor \\right \\rfloor "},{value:"\\left \\lceil \\right \\rceil "}]}]}],he=[{name:"\u4EE3\u6570",value:"\\sqrt{a^2+b^2}",children:[{data:[{value:"\\left(x-1\\right)\\left(x+3\\right) "},{value:"\\sqrt{a^2+b^2}"},{value:"\\left ( \\frac{a}{b}\\right )^{n}= \\frac{a^{n}}{b^{n}}"},{value:"\\frac{a}{b}\\pm \\frac{c}{d}= \\frac{ad \\pm bc}{bd} "},{value:"\\frac{x^{2}}{a^{2}}-\\frac{y^{2}}{b^{2}}=1 "},{value:"\\frac{1}{\\sqrt{a}}=\\frac{\\sqrt{a}}{a},a\\ge 0\\frac{1}{\\sqrt{a}}=\\frac{\\sqrt{a}}{a},a\\ge 0 "},{value:"\\sqrt[n]{a^{n}}=\\left ( \\sqrt[n]{a}\\right )^{n} "},{value:"x ={-b \\pm \\sqrt{b^2-4ac}\\over 2a} "},{value:"y-y_{1}=k \\left( x-x_{1}\\right) "},{value:`\\left\\{\\begin{matrix} \r x=a + r\\text{cos}\\theta \\ \r y=b + r\\text{sin}\\theta \r \\end{matrix}\\right. `},{value:`\\begin{array}{l} \r \\text{\u5BF9\u4E8E\u65B9\u7A0B\u5F62\u5982\uFF1A}x^{3}-1=0 \\ \r \\text{\u8BBE}\\text{:}\\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r x_{1}=1,x_{2}= \\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r x_{3}= \\omega ^{2}=\\frac{-1-\\sqrt{3}i}{2} \r \\end{array} `},{value:`\\begin{array}{l} \r a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r \\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r \\left\\{\\begin{matrix} \r \\Delta \\gt 0\\text{\u65B9\u7A0B\u6709\u4E24\u4E2A\u4E0D\u76F8\u7B49\u7684\u5B9E\u6839} \\ \r \\Delta = 0\\text{\u65B9\u7A0B\u6709\u4E24\u4E2A\u76F8\u7B49\u7684\u5B9E\u6839} \\ \r \\Delta \\lt 0\\text{\u65B9\u7A0B\u65E0\u5B9E\u6839} \r \\end{matrix}\\right. \r \\end{array} `},{value:`\\begin{array}{l} \r a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r \\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r \\mathop{{x}}\\nolimits_{{1,2}}=\\frac{{-b \\pm \r \\sqrt{{\\mathop{{b}}\\nolimits^{{2}}-4ac}}}}{{2a}} \\ \r \\mathop{{x}}\\nolimits_{{1}}+\\mathop{{x}}\\nolimits_{{2}}=-\\frac{{b}}{{a}} \\ \r \\mathop{{x}}\\nolimits_{{1}}\\mathop{{x}}\\nolimits_{{2}}=\\frac{{c}}{{a}} \r \\end{array} `}]}]},{name:"\u51E0\u4F55",value:"\\Delta A B C ",children:[{data:[{value:"\\Delta A B C "},{value:"a \\parallel c,b \\parallel c \\Rightarrow a \\parallel b "},{value:"l \\perp \\beta ,l \\subset \\alpha \\Rightarrow \\alpha \\perp \\beta"},{value:`\\left.\\begin{matrix} \r a \\perp \\alpha \\ \r b \\perp \\alpha \r \\end{matrix}\\right\\}\\Rightarrow a \\parallel b`},{value:"P \\in \\alpha ,P \\in \\beta , \\alpha \\cap \\beta =l \\Rightarrow P \\in l "},{value:`\\alpha \\perp \\beta , \\alpha \\cap \\beta =l,a \\subset \\alpha ,a \\perp l \r \\Rightarrow a \\perp \\beta `},{value:`\\left.\\begin{matrix} \r a \\subset \\beta ,b \\subset \\beta ,a \\cap b=P \\ \r a \\parallel \\partial ,b \\parallel \\partial \r \\end{matrix}\\right\\}\\Rightarrow \\beta \\parallel \\alpha `},{value:"\\alpha \\parallel \\beta , \\gamma \\cap \\alpha =a, \\gamma \\cap \\beta =b \\Rightarrow a \\parallel b "},{value:"A \\in l,B \\in l,A \\in \\alpha ,B \\in \\alpha \\Rightarrow l \\subset \\alpha "},{value:`\\left.\\begin{matrix} \r m \\subset \\alpha ,n \\subset \\alpha ,m \\cap n=P \\ \r a \\perp m,a \\perp n \r \\end{matrix}\\right\\}\\Rightarrow a \\perp \\alpha `},{value:`\\begin{array}{c} \r \\text{\u76F4\u89D2\u4E09\u89D2\u5F62\u4E2D,\u76F4\u89D2\u8FB9\u957Fa,b,\u659C\u8FB9\u8FB9\u957Fc} \\ \r a^{2}+b^{2}=c^{2} \r \\end{array}`}]}]},{name:"\u4E0D\u7B49\u5F0F",value:"a > b",children:[{data:[{value:"a > b,b > c \\Rightarrow a > c "},{value:"a > b,c > d \\Rightarrow a+c > b+d "},{value:"a > b > 0,c > d > 0 \\Rightarrow ac bd "},{value:`\\begin{array}{c} \r a \\gt b,c \\gt 0 \\Rightarrow ac \\gt bc \\ \r a \\gt b,c \\lt 0 \\Rightarrow ac \\lt bc \r \\end{array}`},{value:"\\left | a-b \\right | \\geqslant \\left | a \\right | -\\left | b \\right | "},{value:"-\\left | a \\right |\\leq a\\leqslant \\left | a \\right | "},{value:"\\left | a \\right |\\leqslant b \\Rightarrow -b \\leqslant a \\leqslant \\left | b \\right | "},{value:"\\left | a+b \\right | \\leqslant \\left | a \\right | + \\left | b \\right | "},{value:`\\begin{array}{c} \r a \\gt b \\gt 0,n \\in N^{\\ast},n \\gt 1 \\ \r \\Rightarrow a^{n}\\gt b^{n}, \\sqrt[n]{a}\\gt \\sqrt[n]{b} \r \\end{array}`},{value:`\\left( \\sum_{k=1}^n a_k b_k \\right)^{\\!\\!2}\\leq \r \\left( \\sum_{k=1}^n a_k^2 \\right) \\left( \\sum_{k=1}^n b_k^2 \\right) `},{value:`\\begin{array}{c} \r a,b \\in R^{+} \\ \r \\Rightarrow \\frac{a+b}{{2}}\\ge \\sqrt{ab} \\ \r \\left( \\text{\u5F53\u4E14\u4EC5\u5F53}a=b\\text{\u65F6\u53D6\u201C}=\\text{\u201D\u53F7}\\right) \r \\end{array}`},{value:`\\begin{array}{c} \r a,b \\in R \\ \r \\Rightarrow a^{2}+b^{2}\\gt 2ab \\ \r \\left( \\text{\u5F53\u4E14\u4EC5\u5F53}a=b\\text{\u65F6\u53D6\u201C}=\\text{\u201D\u53F7}\\right) \r \\end{array}`},{value:`\\begin{array}{c} \r H_{n}=\\frac{n}{\\sum \\limits_{i=1}^{n}\\frac{1}{x_{i}}}= \\frac{n}{\\frac{1}{x_{1}}+ \\frac{1}{x_{2}}+ \\cdots + \\frac{1}{x_{n}}} \\ G_{n}=\\sqrt[n]{\\prod \\limits_{i=1}^{n}x_{i}}= \\sqrt[n]{x_{1}x_{2}\\cdots x_{n}} \\ A_{n}=\\frac{1}{n}\\sum \\limits_{i=1}^{n}x_{i}=\\frac{x_{1}+ x_{2}+ \\cdots + x_{n}}{n} \\ Q_{n}=\\sqrt{\\sum \\limits_{i=1}^{n}x_{i}^{2}}= \\sqrt{\\frac{x_{1}^{2}+ x_{2}^{2}+ \\cdots + x_{n}^{2}}{n}} \\ H_{n}\\leq G_{n}\\leq A_{n}\\leq Q_{n} \r \\end{array}`}]}]},{name:"\u79EF\u5206",value:"\\frac{\\mathrm{d}\\partial}{\\partial x}",children:[{data:[{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}x^n=nx^{n-1} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}e^{ax}=a\\,e^{ax} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\ln(x)=\\frac{1}{x} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\sin x=\\cos x "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\cos x=-\\sin x "},{value:"\\int k\\mathrm{d}x = kx+C "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\tan x=\\sec^2 x "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\cot x=-\\csc^2 x "},{value:"\\int \\frac{1}{x}\\mathrm{d}x= \\ln \\left| x \\right| +C "},{value:"\\int \\frac{1}{\\sqrt{1-x^{2}}}\\mathrm{d}x= \\arcsin x +C "},{value:"\\int \\frac{1}{1+x^{2}}\\mathrm{d}x= \\arctan x +C "},{value:"\\int u \\frac{\\mathrm{d}v}{\\mathrm{d}x}\\,\\mathrm{d}x=uv-\\int \\frac{\\mathrm{d}u}{\\mathrm{d}x}v\\,\\mathrm{d}x "},{value:"f(x) = \\int_{-\\infty}^\\infty \\hat f(x)\\xi\\,e^{2 \\pi i \\xi x} \\,\\mathrm{d}\\xi "},{value:"\\int x^{\\mu}\\mathrm{d}x=\\frac{x^{\\mu +1}}{\\mu +1}+C, \\left({\\mu \\neq -1}\\right) "}]}]},{name:"\u4E09\u89D2",value:"e^{i \\theta}",children:[{name:"\u6C42\u548C Summation",data:[{value:"e^{i \\theta} "},{value:"\\left(\\frac{\\pi}{2}-\\theta \\right ) "},{value:"\\text{sin}^{2}\\frac{\\alpha}{2}=\\frac{1- \\text{cos}\\alpha}{2} "},{value:"\\text{cos}^{2}\\frac{\\alpha}{2}=\\frac{1+ \\text{cos}\\alpha}{2} "},{value:"\\text{tan}\\frac{\\alpha}{2}=\\frac{\\text{sin}\\alpha}{1+ \\text{cos}\\alpha} "},{value:"\\sin \\alpha + \\sin \\beta =2 \\sin \\frac{\\alpha + \\beta}{2}\\cos \\frac{\\alpha - \\beta}{2} "},{value:"\\sin \\alpha - \\sin \\beta =2 \\cos \\frac{\\alpha + \\beta}{2}\\sin \\frac{\\alpha - \\beta}{2} "},{value:"\\cos \\alpha + \\cos \\beta =2 \\cos \\frac{\\alpha + \\beta}{2}\\cos \\frac{\\alpha - \\beta}{2} "},{value:"\\cos \\alpha - \\cos \\beta =-2\\sin \\frac{\\alpha + \\beta}{2}\\sin \\frac{\\alpha - \\beta}{2} "},{value:"a^{2}=b^{2}+c^{2}-2bc\\cos A "},{value:"\\frac{\\sin A}{a}=\\frac{\\sin B}{b}=\\frac{\\sin C}{c}=\\frac{1}{2R} "},{value:"\\sin \\left ( \\frac{\\pi}{2}-\\alpha \\right ) = \\cos \\alpha "},{value:"\\sin \\left ( \\frac{\\pi}{2}+\\alpha \\right ) = \\cos \\alpha "}]}]},{name:"\u7EDF\u8BA1",value:"C_{r}^{n}",children:[{data:[{value:"C_{r}^{n} "},{value:"\\frac{n!}{r!(n-r)!} "},{value:"\\sum_{i=1}^{n}{X_i} "},{value:"\\sum_{i=1}^{n}{X_i^2} "},{value:"X_1, \\cdots,X_n "},{value:"\\frac{x-\\mu}{\\sigma} "},{value:"\\sum_{i=1}^{n}{(X_i - \\overline{X})^2} "},{value:`\\begin{array}{c} \r \\text{\u82E5}P \\left( AB \\right) =P \\left( A \\right) P \\left( B \\right) \\\\ \r \\text{\u5219}P \\left( A \\left| B\\right. \\right) =P \\left({B}\\right) \r \\end{array}`},{value:"P(E) ={n \\choose k}p^k (1-p)^{n-k} "},{value:"P \\left( A \\right) = \\lim \\limits_{n \\to \\infty}f_{n}\\left ( A \\right ) "},{value:"P \\left( \\bigcup \\limits_{i=1}^{+ \\infty}A_{i}\\right) = \\prod \\limits_{i=1}^{+ \\infty}P{\\left( A_{i}\\right)} "},{value:`\\begin{array}{c} \r P \\left( \\emptyset \\right) =0 \\\\ \r P \\left( S \\right) =1 \r \\end{array}`},{value:`\\begin{array}{c} \r \\forall A \\in S \\\\ \r P \\left( A \\right) \\ge 0 \r \\end{array}`},{value:"P \\left( \\bigcup \\limits_{i=1}^{n}A_{i}\\right) = \\prod \\limits_{i=1}^{n}P \\left( A_{i}\\right) "},{value:`\\begin{array}{c} \r S= \\binom{N}{n},A_{k}=\\binom{M}{k}\\cdot \\binom{N-M}{n-k} \\\\ \r P\\left ( A_{k}\\right ) = \\frac{\\binom{M}{k}\\cdot \\binom{N-M}{n-k}}{\\binom{N}{n}} \r \\end{array}`},{value:`\\begin{array}{c} \r P_{n}=n! \\\\ \r A_{n}^{k}=\\frac{n!}{\\left( n-k \\left) !\\right. \\right.} \r \\end{array}`}]}]}],me=be=>{se.current.setValue(se.current.getValue()+" "+be.value+" ")},ve=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:oe.createElement(yt.Z,{className:z.Z.lists,gutter:[10,10]},ae.map((be,je)=>oe.createElement(a.Z,{flex:"110px",className:z.Z.item},oe.createElement("div",null,oe.createElement(x.Z,{value:`$$${be.value}$$`}),be.name),oe.createElement("div",{className:z.Z.children},be.children.map((ke,Be)=>oe.createElement("div",{key:Be},oe.createElement("h1",null,ke.name),oe.createElement(yt.Z,{gutter:[10,10]},ke.data.map((De,Se)=>oe.createElement(a.Z,{key:Se,onClick:()=>me(De),className:z.Z.diamond},oe.createElement(x.Z,{value:"`$$"+De.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:oe.createElement(yt.Z,{className:z.Z.lists,gutter:[10,10]},he.map((be,je)=>oe.createElement(a.Z,{flex:"110px",className:z.Z.item},oe.createElement("div",null,oe.createElement(x.Z,{value:"`$$"+be.value+"$$`"}),be.name),oe.createElement("div",{className:z.Z.children},be.children.map((ke,Be)=>oe.createElement("div",{key:Be},ke.name&&oe.createElement("h1",null,ke.name),oe.createElement(yt.Z,{gutter:[10,10]},ke.data.map((De,Se)=>oe.createElement(a.Z,{key:Se,onClick:()=>me(De),className:z.Z.diamond},oe.createElement(x.Z,{value:"`$$"+De.value+"$$`"}))))))))))}],pe=()=>{var be=document.createElement("div");be.innerHTML=se.current.getValue();var je=be.innerText;return ue&&ue(je),je};return(0,le.useImperativeHandle)(te,()=>({getData:pe})),oe.createElement("div",{className:z.Z.mathWrap},oe.createElement(Te.default,{defaultActiveKey:"1",items:ve}),oe.createElement("math-field",{locale:"zh_cn",className:z.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:se,style:{width:800,marginTop:30,fontSize:18}},re||""),E&&oe.createElement("div",{className:z.Z.button},oe.createElement(ge.ZP,{size:"large",onClick:pe,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});Lt.Z=ee},90736:function(on,Lt,Ce){"use strict";var le=Ce(59301),yt=Ce(4977),a=Ce(7939),Te=Object.defineProperty,ge=Object.defineProperties,x=Object.getOwnPropertyDescriptors,z=Object.getOwnPropertySymbols,ie=Object.prototype.hasOwnProperty,oe=Object.prototype.propertyIsEnumerable,ee=(te,se,ae)=>se in te?Te(te,se,{enumerable:!0,configurable:!0,writable:!0,value:ae}):te[se]=ae,ue=(te,se)=>{for(var ae in se||(se={}))ie.call(se,ae)&&ee(te,ae,se[ae]);if(z)for(var ae of z(se))oe.call(se,ae)&&ee(te,ae,se[ae]);return te},E=(te,se)=>ge(te,x(se));const re=({img:te,buttonProps:se={},styles:ae={},customText:he,ButtonText:me,ButtonClick:ve,Buttonclass:pe,ButtonTwo:be,imgStyles:je,loading:ke=!1,className:Be=""})=>le.createElement("section",{className:`tc animated fadeIn ${Be}`,style:ue({color:"#999",margin:"100px auto",visibility:ke?"hidden":"visible"},ae)},le.createElement("img",{src:te||yt,style:E(ue({},je),{pointerEvents:"none",userSelect:"none"})}),le.createElement("p",{className:"mt20 font14"},he||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),me&&le.createElement(a.ZP,ue({className:pe,onClick:ve},se),me),be&&be);Lt.Z=re},86974:function(on,Lt,Ce){"use strict";Ce.d(Lt,{Z:function(){return pe}});var le=Ce(59301),yt={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",showClose:"showClose___edZQA",embed:"embed___hvpEJ"},a=Ce(7939),Te=Ce(70557),ge=Ce(34728),x=Ce(25399),z=Ce(76406),ie=Ce(84849),oe=Ce(90736),ee=Ce(14185),ue=Ce(52078),E=Ce(59301),re=Object.defineProperty,te=Object.getOwnPropertySymbols,se=Object.prototype.hasOwnProperty,ae=Object.prototype.propertyIsEnumerable,he=(be,je,ke)=>je in be?re(be,je,{enumerable:!0,configurable:!0,writable:!0,value:ke}):be[je]=ke,me=(be,je)=>{for(var ke in je||(je={}))se.call(je,ke)&&he(be,ke,je[ke]);if(te)for(var ke of te(je))ae.call(je,ke)&&he(be,ke,je[ke]);return be},ve=(be,je,ke)=>new Promise((Be,De)=>{var Se=Me=>{try{Ie(ke.next(Me))}catch(Le){De(Le)}},Ee=Me=>{try{Ie(ke.throw(Me))}catch(Le){De(Le)}},Ie=Me=>Me.done?Be(Me.value):Promise.resolve(Me.value).then(Se,Ee);Ie((ke=ke.apply(be,je)).next())}),pe=({editOffice:be="view",data:je,issaver:ke,onSaver:Be,theme:De,type:Se,filename:Ee,monacoEditor:Ie,className:Me,style:Le,close:Ae,onClose:Pe,hasMask:Ue,disabledDownload:He,onImgDimensions:Je,showNodata:st,recordInfo:_e})=>{const[Ke,nt]=(0,le.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[rt,et]=(0,le.useState)(""),[Ve,Ye]=(0,le.useState)(),Ge=window.ENV==="build"?"/react/build":"",it=location.host.startsWith("localhost")?ee.Z.PROXY_SERVER:ee.Z.API_SERVER,vt=10*(1024*1024),ot=(0,le.useRef)();je!=null&&je.startsWith("/api")&&Se!=="txt"&&(je=ee.Z.API_SERVER+je);const Qe=We=>We.substring(We.lastIndexOf("/")+1).split(".").pop();Ee&&Ie&&(Ie.filename=Ee),(0,le.useEffect)(()=>{var We,we;const ye=(we=(We=document.cookie)==null?void 0:We.replace(/\s/g,""))==null?void 0:we.split(";");ye==null||ye.map(Oe=>{let $e=Oe.split("=");$e[0]==="_educoder_session"&&et($e[1])})},[]),(0,le.useEffect)(()=>{Se==="office"&&(je.indexOf("bigfilescdn.")>-1||je.indexOf("bigfiles1")>-1?Ye({url:je,fileType:Qe(je),model:je.indexOf("model=edit")?"edit":"view"}):je.indexOf("coze")>-1?Ye({url:je,fileType:"doc",model:"view"}):Re())},[Se,je]);function Fe(We){return ve(this,null,function*(){We.data.type==="pdfdata"&&(Be(We.data.data),window.removeEventListener("message",Fe,!1)),console.log("mess---:",We.data)})}const Re=()=>ve(void 0,null,function*(){console.log("data:",je);let We=je;je.startsWith("http")||(We=location.origin+We);let we=new URL(We).pathname.split("/").pop();const ye=yield(0,ie.gJ)({attachment_id:we});ye.url=it+ye.url,Ye(ye)}),ne=()=>{if(je.startsWith("http")||je.startsWith("blob:")){fe();return}(0,z.Sv)(Ee||"educoder",je,Ee)},fe=()=>{_e&&(0,ue.fc)({id:_e==null?void 0:_e.id,watch_type:1,course_id:_e==null?void 0:_e.course_id}),(0,z.Nd)(Ee||"educoder",decodeURIComponent(je))};(0,le.useEffect)(()=>(window.addEventListener("message",Ne),()=>{window.removeEventListener("message",Ne)}),[]);const Ne=We=>{var we;((we=We==null?void 0:We.data)==null?void 0:we.type)==="closePop"&&Pe()};return E.createElement("div",{style:me({},Le||{}),className:`${Ue&&yt.bgBlack} ${Se?yt.wrp:"hide"}`},!!Se&&Ae&&E.createElement("div",{id:"closePop",className:yt.close,ref:ot},!!Je&&E.createElement(x.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>ot.current},E.createElement("span",{onClick:()=>{Pe(),Je()}},E.createElement("i",{className:"icon-yulanpizhu"}))),!He&&window.parent===window&&E.createElement(x.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>ot.current},E.createElement("span",{onClick:fe},E.createElement("i",{className:"icon-quxiaozhiding"}))),ke&&E.createElement(x.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>ot.current},E.createElement("span",{className:"",onClick:()=>{const We=document.getElementById("pdfiframe");window.addEventListener("message",Fe,!1),setTimeout(()=>{We.contentWindow.postMessage("getData","*")},300)}},E.createElement("i",{className:"icon-baocun"}))),E.createElement(x.Z,{title:"\u5173\u95ED",getPopupContainer:()=>ot.current},E.createElement("span",{className:"",onClick:()=>{Pe()}},E.createElement("i",{className:"icon-guanbi1"})))),E.createElement("div",{className:`${yt[Me]} ${Me} ${yt.monaco} ${Se==="txt"?"show":"hide"}`},Se==="txt"&&E.createElement(E.Fragment,null,E.createElement(ge.ZP,me({},Ie)))),Se==="audio"&&E.createElement("audio",{controls:!0,src:`${(je==null?void 0:je.indexOf("http://"))>-1||(je==null?void 0:je.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${je}`,autoPlay:!0}),Se==="video"&&E.createElement(E.Fragment,null,(je==null?void 0:je.indexOf("http"))>-1?E.createElement("video",{controls:!0,src:`${je}`,autoPlay:!0}):E.createElement("video",{controls:!0,src:`data:video/mp4;base64,${je}`,autoPlay:!0})),Se==="office"&&Ve&&E.createElement("iframe",{src:`${Ge}/office.html?key=${Ve.key}&url=${btoa(Ve.url)}&callbackUrl=${it+(Ve.callbackUrl||"")}&fileType=${Ve.fileType}&title=${Ve.title||""}&model=${be}&officeServer=${ee.Z.ONLYOFFICE}&disabledDownload=${!!He}`}),Se==="html"&&E.createElement("iframe",{src:je+"&disposition=inline"}),Se==="pdf"&&E.createElement("iframe",{id:"pdfiframe",src:`${Ge}/js/pdf/index.html?filename=${Ee||"educoder.pdf"}&url=${encodeURIComponent(je)}&disabledDownload=${!!He}&model=${be}`}),Se==="image"&&E.createElement("img",{src:`${(je==null?void 0:je.indexOf("http://"))>-1||(je==null?void 0:je.indexOf("https://"))>-1?"":"data:image/png;base64,"}${je}`}),(Se==="other"||Se==="download")&&E.createElement(E.Fragment,null,st?E.createElement(oe.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:E.createElement(a.ZP,{icon:E.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:ne,disabled:He},"\u4E0B\u8F7D")}):E.createElement(a.ZP,{type:"primary",size:"middle",onClick:ne,disabled:He},E.createElement(Te.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")),Se==="flowChart"&&E.createElement("div",{className:"embed"},E.createElement("iframe",{src:`/drawio/src/main/webapp/viewer.html?id=${je||""}&gapi=0&od=0&db=0&gh=0&gl=0`,width:"100%",height:"100%",frameBorder:"0"})))}},35883:function(on,Lt,Ce){"use strict";Ce.d(Lt,{z:function(){return Ie},Z:function(){return Me}});var le=Ce(59301),yt=Ce(46214),a=Ce(20047),Te=Ce(64018),ge=Ce(16471),x=Ce(14185),z=Ce(76406),ie=Ce(15342),oe=Ce(44104),ee=Ce(7939),ue=Ce(1012),E=Ce(86974),re=Ce(59301),se=({html:Le})=>{const Ae=(0,le.useRef)(null),Pe=(0,le.useRef)(null),Ue=`.markdown-body p { margin: 0 0 16px 0 !important; line-height: 28px; white-space: pre-wrap; } ol, ul, li { list-style-type: none } ol, ul, dl { margin-bottom: 0px; } .markdown-body { -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; color: #333; overflow: hidden; font-family: "Microsoft YaHei", Helvetica, "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", "Monaco", monospace, Tahoma, STXihei, "\u534E\u6587\u7EC6\u9ED1", STHeiti, "Helvetica Neue", "Droid Sans", "wenquanyi micro hei", FreeSans, Arimo, Arial, SimSun, "\u5B8B\u4F53", Heiti, "\u9ED1\u4F53", sans-serif; word-break: break-word; font-size: 16px; line-height: 1.6; white-space: normal; word-wrap: break-word; position: relative; } .markdown-body ul>li { list-style-type: disc; } .markdown-body ol>li { list-style-type: decimal; } .markdown-body a { background: transparent; } .markdown-body a:active, .markdown-body a:hover { outline: 0; } .markdown-body strong { font-weight: bold; } .markdown-body h1 { font-size: 2em; margin: 0.67em 0; } .markdown-body img { border: 0; } .markdown-body hr { -moz-box-sizing: content-box; box-sizing: content-box; height: 0; } .markdown-body pre { overflow: auto; } .markdown-body code, .markdown-body kbd, .markdown-body pre { font-family: "Meiryo UI", "YaHei Consolas Hybrid", Consolas, "Malgun Gothic", "Segoe UI", "Trebuchet MS", Helvetica, monospace, monospace; font-size: 1em; } .markdown-body input { color: inherit; font: inherit; margin: 0; } .markdown-body html input[disabled] { cursor: default; } .markdown-body input { line-height: normal; } .markdown-body input[type="checkbox"] { -moz-box-sizing: border-box; box-sizing: border-box; padding: 0; } .markdown-body table { border-collapse: collapse; border-spacing: 0; } .markdown-body td, .markdown-body th { padding: 0; } .markdown-body * { -moz-box-sizing: border-box; box-sizing: border-box; } .markdown-body input { font: 13px/1.4 Helvetica, arial, freesans, clean, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol"; } .markdown-body a { color: #4183c4; text-decoration: none; } .markdown-body a:hover, .markdown-body a:active { text-decoration: underline; } .markdown-body hr { height: 0; margin: 15px 0; overflow: hidden; background: transparent; border: 0; border-bottom: 1px solid #ddd; } .markdown-body hr:before { display: table; content: ""; } .markdown-body hr:after { display: table; clear: both; content: ""; } .markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4, .markdown-body h5, .markdown-body h6 { margin-top: 15px; margin-bottom: 15px; line-height: 1.1; } .markdown-body h1 { font-size: 30px; } .markdown-body h2 { font-size: 21px; } .markdown-body h3 { font-size: 16px; } .markdown-body h4 { font-size: 14px; } .markdown-body h5 { font-size: 12px; } .markdown-body h6 { font-size: 11px; } .markdown-body blockquote { margin: 0; } .markdown-body ul, .markdown-body ol { padding: 0; margin-top: 0; margin-bottom: 0; } ul.linenums, ol.linenums { padding: 16px 0 0 56px !important; } .markdown-body ul, .markdown-body ol { padding-left: 2em; } .markdown-body ol ol, .markdown-body ul ol { list-style-type: lower-roman; } .markdown-body ul ul ol, .markdown-body ul ol ol, .markdown-body ol ul ol, .markdown-body ol ol ol { list-style-type: lower-alpha; } .markdown-body dd { margin-left: 0; } .markdown-body code { font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 12px; } .markdown-body pre { margin-top: 0; margin-bottom: 0; font: 12px Consolas, "Liberation Mono", Menlo, Courier, monospace; } .markdown-body .octicon { font: normal normal 16px octicons-anchor; line-height: 1; display: inline-block; text-decoration: none; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } .markdown-body .octicon-link:before { content: '\f05c'; } .markdown-body>*:first-child { margin-top: 0 !important; } .markdown-body>*:last-child { margin-bottom: 0 !important; } .markdown-body .anchor { position: absolute; top: 0; left: 0; display: block; padding-right: 6px; padding-left: 30px; margin-left: -30px; } .markdown-body .anchor:focus { outline: none; } .markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4, .markdown-body h5, .markdown-body h6 { position: relative; margin-top: 1em; margin-bottom: 16px; font-weight: bold; line-height: 1.4; } .markdown-body h1 .octicon-link, .markdown-body h2 .octicon-link, .markdown-body h3 .octicon-link, .markdown-body h4 .octicon-link, .markdown-body h5 .octicon-link, .markdown-body h6 .octicon-link { display: none; color: #000; vertical-align: middle; } .markdown-body h1:hover .anchor, .markdown-body h2:hover .anchor, .markdown-body h3:hover .anchor, .markdown-body h4:hover .anchor, .markdown-body h5:hover .anchor, .markdown-body h6:hover .anchor { padding-left: 8px; margin-left: -30px; text-decoration: none; } .markdown-body h1:hover .anchor .octicon-link, .markdown-body h2:hover .anchor .octicon-link, .markdown-body h3:hover .anchor .octicon-link, .markdown-body h4:hover .anchor .octicon-link, .markdown-body h5:hover .anchor .octicon-link, .markdown-body h6:hover .anchor .octicon-link { display: inline-block; } .markdown-body h1 { padding-bottom: 0.3em; font-size: 2.25em; line-height: 1.2; border-bottom: 1px solid #eee; } .markdown-body h1 .anchor { line-height: 1; } .markdown-body h2 { padding-bottom: 0.3em; font-size: 1.75em; line-height: 1.225; border-bottom: 1px solid #eee; } .markdown-body h2 .anchor { line-height: 1; } .markdown-body h3 { font-size: 1.5em; line-height: 1.43; } .markdown-body h3 .anchor { line-height: 1.2; } .markdown-body h4 { font-size: 1.25em; } .markdown-body h4 .anchor { line-height: 1.2; } .markdown-body h5 { font-size: 1em; } .markdown-body h5 .anchor { line-height: 1.1; } .markdown-body h6 { font-size: 1em; color: #777; } .markdown-body h6 .anchor { line-height: 1.1; } .markdown-body p, .markdown-body blockquote, .markdown-body ul, .markdown-body ol, .markdown-body dl, .markdown-body table, .markdown-body pre { margin-top: 0; margin-bottom: 16px; } .markdown-body ul ul, .markdown-body ul ol, .markdown-body ol ol, .markdown-body ol ul { margin-top: 0; margin-bottom: 0; } .markdown-body li>p { margin-top: 16px; } .markdown-body dl { padding: 0; } .markdown-body dl dt { padding: 0; margin-top: 16px; font-size: 1em; font-style: italic; font-weight: bold; } .markdown-body dl dd { padding: 0 16px; margin-bottom: 16px; } .markdown-body blockquote { padding: 0 15px; color: #777; border-left: 4px solid #ddd; } .markdown-body blockquote> :first-child { margin-top: 0; } .markdown-body blockquote> :last-child { margin-bottom: 0; } .markdown-body table { display: block; width: 100%; overflow: auto; word-break: normal; word-break: keep-all; } .markdown-body table th { font-weight: bold; text-align: revert; } .markdown-body table th, .markdown-body table td { padding: 6px 13px; border: 1px solid #ddd; } .markdown-body table tr { background-color: #fff; border-top: 1px solid #ccc; } .markdown-body table tr:nth-child(2n) { background-color: #f8f8f8; } .markdown-body img { max-width: 100%; -moz-box-sizing: border-box; box-sizing: border-box; } .markdown-body code { padding: 0; padding-top: 0.2em; padding-bottom: 0.2em; margin: 0; font-size: 85%; background-color: rgba(0, 0, 0, 0.04); border-radius: 3px; } .markdown-body code:has(.katex) { background-color: transparent; } .markdown-body code:before, .markdown-body code:after { letter-spacing: -0.2em; content: "\\00a0"; } .markdown-body pre>code { padding: 0; margin: 0; font-size: 100%; word-break: normal; white-space: pre; background: transparent; border: 0; } .markdown-body .highlight { margin-bottom: 16px; } .markdown-body .highlight pre, .markdown-body pre { padding: 16px; overflow: auto; font-size: 85%; line-height: 1.45; background-color: #f7f7f7; border-radius: 3px; } .markdown-body .highlight pre { margin-bottom: 0; word-break: normal; } .markdown-body pre { word-wrap: normal; } .markdown-body pre code { display: inline; max-width: initial; padding: 0; margin: 0; overflow: initial; line-height: inherit; word-wrap: normal; background-color: transparent; border: 0; } .markdown-body pre code:before, .markdown-body pre code:after { content: normal; } .markdown-body kbd { display: inline-block; padding: 3px 5px; font-size: 11px; line-height: 10px; color: #555; vertical-align: middle; background-color: #fcfcfc; border: solid 1px #ccc; border-bottom-color: #bbb; border-radius: 3px; box-shadow: inset 0 -1px 0 #bbb; } .markdown-body .pl-c { color: #969896; } .markdown-body .pl-c1, .markdown-body .pl-mdh, .markdown-body .pl-mm, .markdown-body .pl-mp, .markdown-body .pl-mr, .markdown-body .pl-s1 .pl-v, .markdown-body .pl-s3, .markdown-body .pl-sc, .markdown-body .pl-sv { color: #0086b3; } .markdown-body .pl-e, .markdown-body .pl-en { color: #795da3; } .markdown-body .pl-s1 .pl-s2, .markdown-body .pl-smi, .markdown-body .pl-smp, .markdown-body .pl-stj, .markdown-body .pl-vo, .markdown-body .pl-vpf { color: #333; } .markdown-body .pl-ent { color: #63a35c; } .markdown-body .pl-k, .markdown-body .pl-s, .markdown-body .pl-st { color: #a71d5d; } .markdown-body .pl-pds, .markdown-body .pl-s1, .markdown-body .pl-s1 .pl-pse .pl-s2, .markdown-body .pl-sr, .markdown-body .pl-sr .pl-cce, .markdown-body .pl-sr .pl-sra, .markdown-body .pl-sr .pl-sre, .markdown-body .pl-src { color: #df5000; } .markdown-body .pl-mo, .markdown-body .pl-v { color: #1d3e81; } .markdown-body .pl-id { color: #b52a1d; } .markdown-body .pl-ii { background-color: #b52a1d; color: #f8f8f8; } .markdown-body .pl-sr .pl-cce { color: #63a35c; font-weight: bold; } .markdown-body .pl-ml { color: #693a17; } .markdown-body .pl-mh, .markdown-body .pl-mh .pl-en, .markdown-body .pl-ms { color: #1d3e81; font-weight: bold; } .markdown-body .pl-mq { color: #008080; } .markdown-body .pl-mi { color: #333; font-style: italic; } .markdown-body .pl-mb { color: #333; font-weight: bold; } .markdown-body .pl-md, .markdown-body .pl-mdhf { background-color: #ffecec; color: #bd2c00; } .markdown-body .pl-mdht, .markdown-body .pl-mi1 { background-color: #eaffea; color: #55a532; } .markdown-body .pl-mdr { color: #795da3; font-weight: bold; } .markdown-body kbd { display: inline-block; padding: 3px 5px; font: 11px Consolas, "Liberation Mono", Menlo, Courier, monospace; line-height: 10px; color: #555; vertical-align: middle; background-color: #fcfcfc; border: solid 1px #ccc; border-bottom-color: #bbb; border-radius: 3px; box-shadow: inset 0 -1px 0 #bbb; } .markdown-body .task-list-item { list-style-type: none; } .markdown-body .task-list-item+.task-list-item { margin-top: 3px; } .markdown-body .task-list-item input { float: left; margin: 0.3em 0 0.25em -1.6em; vertical-align: middle; } .markdown-body :checked+.radio-label { z-index: 1; position: relative; border-color: #4183c4; } /*! Pretty printing styles. Used with prettify.js. */ /* SPAN elements with the classes below are added by prettyprint. */ .pln { color: #000 } /* plain text */ @media screen { .str { color: #080 } /* string content */ .kwd { color: #008 } /* a keyword */ .com { color: #800 } /* a comment */ .typ { color: #606 } /* a type name */ .lit { color: #066 } /* a literal value */ /* punctuation, lisp open bracket, lisp close bracket */ .pun, .opn, .clo { color: #660 } .tag { color: #008 } /* a markup tag name */ .atn { color: #606 } /* a markup attribute name */ .atv { color: #080 } /* a markup attribute value */ .dec, .var { color: #606 } /* a declaration; a variable name */ .fun { color: red } /* a function name */ } /* Use higher contrast and text-weight for printable form. */ @media print, projection { .str { color: #060 } .kwd { color: #006; font-weight: bold } .com { color: #600; font-style: italic } .typ { color: #404; font-weight: bold } .lit { color: #044 } .pun, .opn, .clo { color: #440 } .tag { color: #006; font-weight: bold } .atn { color: #404 } .atv { color: #060 } } /* Put a border around prettyprinted code snippets. */ pre.prettyprint { padding: 2px; /* border: 1px solid #888 */ } /* Specify class=linenums on a pre to get line numbering */ ol.linenums { margin-top: 0; margin-bottom: 0 } /* IE indents via margin-left */ li.L0, li.L1, li.L2, li.L3, li.L5, li.L6, li.L7, li.L8 { list-style-type: none } /* Alternate shading for lines */ li.L1, li.L3, li.L5, li.L7, li.L9 { background: #eee } .markdown-body p, .markdown-body blockquote, .markdown-body ul, .markdown-body ol, .markdown-body dl, .markdown-body table, .markdown-body pre { margin-top: 0; margin-bottom: 16px; }`;return(0,le.useEffect)(()=>{const He=Ae.current.attachShadow({mode:"open"});Pe.current=document.createElement("div"),Pe.current.className="markdown-body",Pe.current.innerHTML=Le,He.appendChild(Pe.current);const Je=document.createElement("style");return Je.textContent=Ue,He.appendChild(Je),()=>{He.innerHTML=""}},[]),(0,le.useEffect)(()=>{Pe.current&&(Pe.current.innerHTML=Le)},[Le]),re.createElement("div",{ref:Ae})};function ae(Le){const Ae=["onabort","onanimationend","onanimationiteration","onanimationstart","onauxclick","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncopy","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","ongotpointercapture","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onlostpointercapture","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onpaste","onpause","onplay","onplaying","onpointercancel","onpointerdown","onpointerenter","onpointerleave","onpointermove","onpointerout","onpointerover","onpointerup","onprogress","onratechange","onreset","onresize","onscroll","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onsubmit","onsuspend","ontimeupdate","ontoggle","ontouchcancel","ontouchend","ontouchmove","ontouchstart","ontransitionend","onvolumechange","onwaiting","onwheel"],Pe=new RegExp(`\\b(${Ae.join("|")})\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s>]*)`,"gi"),Ue=/]*>/gi;return Le.replace(Pe,"").replace(Ue,"").trim()}var he={mdBody:"mdBody___raKXb",button:"button___Ch5Pc",previewFlowChart:"previewFlowChart___vY1dq"},me=Object.defineProperty,ve=Object.getOwnPropertySymbols,pe=Object.prototype.hasOwnProperty,be=Object.prototype.propertyIsEnumerable,je=(Le,Ae,Pe)=>Ae in Le?me(Le,Ae,{enumerable:!0,configurable:!0,writable:!0,value:Pe}):Le[Ae]=Pe,ke=(Le,Ae)=>{for(var Pe in Ae||(Ae={}))pe.call(Ae,Pe)&&je(Le,Pe,Ae[Pe]);if(ve)for(var Pe of ve(Ae))be.call(Ae,Pe)&&je(Le,Pe,Ae[Pe]);return Le};const Be="@\u2581\u2581@",De="@\u2581@",Se=/]*>/g;function Ee(Le){let Ae=document.createElement("div");return Ae.innerHTML=Le,Ae.childNodes.length===0?"":Ae.childNodes[0].nodeValue}const Ie=(Le,Ae)=>{Le=Le||"";const Pe=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Ue=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,He=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Je=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return Ae?Le.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(Pe,(st,_e,Ke,nt,rt,et,Ve)=>{const Ye=_e||nt||et,Ge=Ke||rt||Ve||"?";return x.Z.API_SERVER+"/api/attachments/"+Ye+Ge+"&t="+(0,z.Jn)(Ye,Date.now())+(st.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(Le=Le.replace(Je,(st,_e,Ke,nt,rt,et,Ve)=>{const Ye=_e||nt||et,Ge=Ke||rt||Ve||"?";return x.Z.API_SERVER+"/attachments/download/"+Ye+Ge+"&t="+(0,z.Jn)(Ye,Date.now())+(st.indexOf(")")>-1?")":"&")}).replace(Pe,(st,_e,Ke,nt,rt,et,Ve)=>{const Ye=_e||nt||et,Ge=Ke||rt||Ve||"?";return x.Z.API_SERVER+"/api/attachments/"+Ye+Ge+"&t="+(0,z.Jn)(Ye,Date.now())+(st.indexOf(")")>-1?")":"&")}).replace(Ue,(st,_e,Ke,nt,rt)=>{const et=_e||nt,Ve=Ke||rt||"";return'"'+x.Z.API_SERVER+"/api/attachments/"+et+Ve+et+Ve+"&t="+(0,z.Jn)(et,Date.now())}).replace(He,(st,_e,Ke,nt,rt)=>{const et=_e||nt,Ve=Ke||rt||"";return"("+x.Z.API_SERVER+"/files/uploads/"+et+Ve+et+Ve+"&t="+(0,z.Jn)(et,Date.now())}).replaceAll('src="(','src="').replaceAll("src='(",'src="').replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,` `),Le)};var Me=({value:Le="",edit:Ae=!1,className:Pe,showTextOnly:Ue,showLines:He,style:Je={},stylesPrev:st={},highlightKeywords:_e,showProgramFill:Ke,isProgramFill:nt,disabledFill:rt=!1,programFillValue:et,openEditor:Ve=()=>{},onFillChange:Ye=qe=>{},onFillBlur:Ge=()=>{},onFillFocus:it=()=>{}})=>{let qe=ae(String(Le||""));const vt=(0,le.useRef)(),ot=(0,le.useRef)(),[Qe,Fe]=(0,le.useState)(""),[Re,ne]=(0,le.useState)("office"),[fe,Ne]=(0,le.useState)([]),We=(0,le.useRef)("a"+(0,ue.Z)()),we={},ye=pt=>//i.test(pt||""),Oe=(pt,Mt,kt)=>{const xt=document.createElement(pt===De?"input":"textarea");xt.style.width="100%",xt.style.height=pt===De?"40px":"151px",xt.rows=5,xt.spellcheck=!1,xt.name="edu-program-fill",xt.placeholder="\u8BF7\u8F93\u5165",xt.dataset.id=Mt;const It=Object.keys(we).length;return we[It]=xt,`${xt.outerHTML}`};function $e(pt){return pt=pt.replace(/!\[.*?\]\(.*?\)/g,""),pt=pt.replace(/\[.*?\]\(.*?\)/g,""),pt=pt.replace(new RegExp("","gs"),""),pt=pt.replace(//g,""),pt=pt.replace(//g,""),pt=pt.replace(new RegExp(".*?<\\/video>","gs"),""),pt=pt.replace(new RegExp(".*?<\\/audio>","gs"),""),pt=pt.replace(new RegExp(".*?<\\/style>","gs"),""),pt=pt.replace(new RegExp(".*?<\\/script>","gs"),""),pt}const Ze=pt=>!Ue&&ye(qe)?pt:pt.replace(/([\s\S]+?)<\/style>/gim,function(Mt,kt){let xt=kt.replace(/(\n|\r)/g,"").split("}"),It=[];return xt.map(Ut=>{Ut!=""&&It.push(`.${We.current} ${Ut}`)}),``}),Xe=(0,le.useMemo)(()=>{(0,a.Iy)();try{const xt=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,It=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Ut=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,en=/\(\/attachments\/download\//g;qe=qe.replace(en,"("+x.Z.API_SERVER+"/attachments/download/").replace(xt,"("+x.Z.API_SERVER+"/api/attachments/").replace(It,'"'+x.Z.API_SERVER+"/api/attachments/").replace(Ut,'"'+x.Z.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,` `),vt.current.style.display="none"}catch(xt){}if(Ke){let xt=-1;return qe=qe.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,function(It,Ut,en){var St;return++xt,Oe(It,xt,(St=et==null?void 0:et[xt])==null?void 0:St.value.replaceAll("<","<").replaceAll(">",">"))}),`
${Ze(qe||"")}
`}let pt=Ze(qe);pt=(0,a.ZP)(pt);const Mt=(0,a.ez)();qe.match(/\[TOC\]/)&&(pt=pt.replace("

[TOC]

",(0,a.Qv)()),(0,a.Iy)()),pt=pt.replace(/(__special_katext_id_\d+__)/g,(xt,It)=>{const{type:Ut,expression:en}=Mt[It];return(0,ie.renderToString)(Ee(en)||"",{displayMode:Ut==="block",throwOnError:!1,output:"html"})}),pt=pt.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,a.AL)();const kt=document.createElement("div");if(kt.innerHTML=pt,Ue)return kt.innerText;if(_e){const xt=_e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return ut(kt,xt),kt.innerHTML}return setTimeout(()=>wt(),500),kt.innerHTML},[qe,_e]);(0,le.useEffect)(()=>{ct.current&&ct.current.querySelectorAll(["input","textarea"]).forEach(Mt=>{Mt.oninput=at,Mt.onblur=lt,Mt.onfocus=mt})},[fe]),(0,le.useEffect)(()=>{var pt,Mt,kt,xt,It;if(et!=null&&et.length)try{const Ut=ct.current.querySelectorAll(".edu-program-fill-score"),en=ct.current.querySelectorAll('[name="edu-program-fill"]');for(const[St,jt]of en.entries())jt.value=((pt=et==null?void 0:et[St])==null?void 0:pt.value)||"",((Mt=et==null?void 0:et[St])==null?void 0:Mt.type)==="warning"?jt.className="program-fill-warning":((kt=et==null?void 0:et[St])==null?void 0:kt.type)==="success"?jt.className="program-fill-success":jt.className="";for(const[St,jt]of Ut.entries())jt.innerHTML=(xt=et==null?void 0:et[St])!=null&&xt.score?`${(It=et==null?void 0:et[St])==null?void 0:It.score}\u5206`:"";Ne(et)}catch(Ut){console.log(Ut,"error")}},[et]);const at=pt=>{fe[pt.target.dataset.id]=fe[pt.target.dataset.id]||{},fe[pt.target.dataset.id].value=pt.target.value,Ne([...fe]),Ye(fe,pt.target.dataset.id)},lt=pt=>{fe[pt.target.dataset.id]=fe[pt.target.dataset.id]||{},fe[pt.target.dataset.id].value=pt.target.value,Ne([...fe]),Ge(fe,pt.target.dataset.id)},mt=pt=>{fe[pt.target.dataset.id]=fe[pt.target.dataset.id]||{},fe[pt.target.dataset.id].value=pt.target.value,Ne([...fe]),it(fe,pt.target.dataset.id)};function ut(pt,Mt){return pt.childNodes.forEach(kt=>{var xt;if(kt.childNodes.length>0)ut(kt,Mt);else if(kt.nodeName!=="IMG")if(kt.innerHTML)kt.innerHTML=(xt=kt.innerHTML)==null?void 0:xt.replace(new RegExp(Mt,"gi"),'$&');else{const It=document.createElement("span");It.innerHTML=kt.textContent.replace(new RegExp(Mt,"gi"),'$&'),kt.replaceWith(It)}})}const ct=(0,le.useRef)();a.jb.WebkitLineClamp=He,He&&(Je=ke(ke({},Je),a.jb));function Pt(pt){let Mt=pt.target;if(Mt.tagName.toUpperCase()==="A"){let kt=Mt.getAttribute("href");if(kt.indexOf("office")>-1)pt.preventDefault(),Fe(kt),ne("office");else if(kt.indexOf("application/pdf")>-1)pt.preventDefault(),Fe(kt),ne("pdf");else if(kt.indexOf("text/html")>-1)pt.preventDefault(),Fe(kt),ne("html");else if(kt.startsWith("#")){pt.preventDefault();let xt=document.getElementById(kt.replace("#",""));xt&&xt.scrollIntoView(!0)}}}const wt=()=>{var pt;const Mt=(pt=ct.current)==null?void 0:pt.querySelectorAll("video");Mt==null||Mt.forEach(kt=>{if(kt.oncontextmenu=()=>!1,kt.src.indexOf(".m3u8")>-1&&!kt.canPlayType("application/vnd.apple.mpegurl")){if(ge.ZP.isSupported()){var xt=new ge.ZP;xt.loadSource(kt.src),xt.attachMedia(kt)}}})};(0,le.useEffect)(()=>{if(ct.current&&Xe&&Xe.match(Se)&&window.PR.prettyPrint(),ct.current)return ct.current.addEventListener("click",Pt),()=>{var pt;(pt=ct.current)==null||pt.removeEventListener("click",Pt),(0,a.AL)(),(0,a.Iy)()}},[Xe,ct.current,Pt]);const Bt=pt=>{pt.target.nodeName==="IMG"&&pt.target.className.indexOf("draw-flowchart")>-1?(vt.current.style.zIndex=1,vt.current.style.display="flex",vt.current.style.width=pt.target.clientWidth+"px",vt.current.style.height=pt.target.clientHeight+"px",vt.current.style.top=pt.target.offsetTop+"px",vt.current.style.left=pt.target.offsetLeft+"px",pt.target.id&&(ot.current=pt.target.id)):vt.current.style.display="none"},At=()=>{vt.current.style.display="none"};return(0,le.useEffect)(()=>{var pt;const Mt=kt=>{kt.preventDefault(),kt.clipboardData.setData("text",window.getSelection().toString())};return(pt=ct.current)==null||pt.addEventListener("copy",Mt),()=>{var kt;(kt=ct.current)==null||kt.removeEventListener("copy",Mt)}},[ct.current]),le.createElement("div",{style:{position:"relative"},onMouseLeave:At},Ue&&le.createElement("div",{ref:ct,className:`${he.mdBody} `},Xe),!Ue&&!ye(Xe)&&le.createElement("div",{ref:ct,style:ke({},Je),onMouseOver:Bt,className:`${Pe||""} ${rt?"disabled-fill":""} markdown-body ${he.mdBody} ${We.current}`,dangerouslySetInnerHTML:{__html:Xe}}),!Ue&&ye(Xe)&&le.createElement(se,{html:Xe}),le.createElement("div",{ref:vt,className:`${he.button} ${Ae?"":he.previewFlowChart}`},le.createElement(oe.Z,null,le.createElement(ee.ZP,{onClick:()=>{Ae?Ve(ot.current):(Fe(ot.current),ne("flowChart"))}},Ae?"\u7F16\u8F91":"\u9884\u89C8"))),le.createElement(E.Z,{close:!0,data:Qe,type:Qe!=null&&Qe.length?Re:"",style:ke({},st),onClose:()=>Fe("")}))}},22914:function(on,Lt,Ce){"use strict";Ce.d(Lt,{Z:function(){return Te}});var le=Ce(59301),yt=Ce(33156),a=Ce(59301),Te=({defaultX:ge="40%",leftChild:x,rightChild:z,className:ie,hideResize:oe=!1})=>{const[ee,ue]=(0,le.useState)(ge),E=(0,le.useRef)();function re(){E.current=!0}(0,le.useEffect)(()=>{function ae(me){E.current&&(yt.Z.publish("resize-move-bar",me),ue(me.pageX))}function he(){E.current=!1}return window.addEventListener("mousemove",ae),window.addEventListener("mouseup",he),()=>{window.removeEventListener("mousemove",ae),window.removeEventListener("mouseup",he)}},[]);const te=typeof ee=="number"&&ee!==.01?`${ee}px`:ge,se=`calc(100% - ${oe?"0px":"4px"} - ${te})`;return a.createElement("div",{className:`split-panel-container ${ie}`},a.createElement("section",{style:{width:te,display:ee===.01?"none":""}},x),a.createElement("section",{className:"resize-x-bar",onMouseDown:re},a.createElement("a",{className:"btn-resize"},a.createElement("svg",{width:"16",height:"13",viewBox:"0 0 16 13"},a.createElement("path",{d:"M12.245 7.53H5.647v1.882h6.598v2.823L16 8.471l-3.755-3.765V7.53zM10.353 4.706H3.755v2.823L0 3.765 3.755 0v2.824h6.598v1.882z"})))),a.createElement("section",{style:{width:se}},z))}},25173:function(on,Lt,Ce){"use strict";Ce.d(Lt,{cT:function(){return Se},pe:function(){return ke}});var le=Ce(59301),yt=Ce(94968),a=Ce(6767),Te=Ce(49317),ge=Ce(28209),x=Ce.n(ge),z=Ce(1012),ie=Ce(44283),oe=Ce(47257),ee=Ce.n(oe),ue=Object.defineProperty,E=Object.defineProperties,re=Object.getOwnPropertyDescriptors,te=Object.getOwnPropertySymbols,se=Object.prototype.hasOwnProperty,ae=Object.prototype.propertyIsEnumerable,he=(Ie,Me,Le)=>Me in Ie?ue(Ie,Me,{enumerable:!0,configurable:!0,writable:!0,value:Le}):Ie[Me]=Le,me=(Ie,Me)=>{for(var Le in Me||(Me={}))se.call(Me,Le)&&he(Ie,Le,Me[Le]);if(te)for(var Le of te(Me))ae.call(Me,Le)&&he(Ie,Le,Me[Le]);return Ie},ve=(Ie,Me)=>E(Ie,re(Me)),pe=(Ie,Me)=>{var Le={};for(var Ae in Ie)se.call(Ie,Ae)&&Me.indexOf(Ae)<0&&(Le[Ae]=Ie[Ae]);if(Ie!=null&&te)for(var Ae of te(Ie))Me.indexOf(Ae)<0&&ae.call(Ie,Ae)&&(Le[Ae]=Ie[Ae]);return Le},be=(Ie,Me,Le)=>new Promise((Ae,Pe)=>{var Ue=st=>{try{Je(Le.next(st))}catch(_e){Pe(_e)}},He=st=>{try{Je(Le.throw(st))}catch(_e){Pe(_e)}},Je=st=>st.done?Ae(st.value):Promise.resolve(st.value).then(Ue,He);Je((Le=Le.apply(Ie,Me)).next())});const{Dragger:je}=yt.default,ke=Ie=>{const Me="bf3c199c2470cb477d907b1e0917c17b",Le="5183666c72eec9e4";var Ae=x().enc.Utf8.parse(Me);let Pe=x().enc.Utf8.parse(Le);var Ue=x().AES.decrypt(Ie,Ae,{iv:Pe,mode:x().mode.CBC});return Ue.toString(x().enc.Utf8)};let Be;const De=Ie=>be(void 0,[Ie],function*({identifier:Me,oldFilename:Le,newFilename:Ae}){var Pe,Ue,He,Je,st,_e;const Ke=yield Fetch("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});Ke.data=JSON.parse(ke(Ke.data));const nt=new OSS({endpoint:(Pe=Ke==null?void 0:Ke.data)==null?void 0:Pe.end_point,region:(Ue=Ke==null?void 0:Ke.data)==null?void 0:Ue.region,accessKeyId:(He=Ke==null?void 0:Ke.data)==null?void 0:He.access_key_id,accessKeySecret:(Je=Ke==null?void 0:Ke.data)==null?void 0:Je.access_key_secret,bucket:(st=Ke==null?void 0:Ke.data)==null?void 0:st.bucket,stsToken:(_e=Ke==null?void 0:Ke.data)==null?void 0:_e.security_token});return new Promise((rt,et)=>{console.log(11111,`${Me}/${Le}`,`${Me}/${Ae}`,Ke.data),nt.copy(`/${Me}/${Le}`,`/${Me}/${Ae}`).then(Ve=>{console.log("\u62F7\u8D1D\u6210\u529F",Ve)}).catch(Ve=>{console.log(Ve)})})}),Se=(Ie,Me,Le)=>be(void 0,null,function*(){var Ae,Pe,Ue,He,Je,st;Me.file_name=Ie.name;const _e=yield(0,Te.ZP)("/api/buckets/get_upload_token.json",{method:"get"});console.log("decrypt(res.data):",ke(_e.data)),_e.data=JSON.parse(ke(_e.data));const Ke=Ie.name.split(".");Ke.pop();const nt=Me.realFileName?Ke.join(""):(0,z.Z)(),rt=new(ee())({endpoint:(Ae=_e==null?void 0:_e.data)==null?void 0:Ae.end_point,region:(Pe=_e==null?void 0:_e.data)==null?void 0:Pe.region,accessKeyId:(Ue=_e==null?void 0:_e.data)==null?void 0:Ue.access_key_id,accessKeySecret:(He=_e==null?void 0:_e.data)==null?void 0:He.access_key_secret,bucket:(Je=_e==null?void 0:_e.data)==null?void 0:Je.bucket,stsToken:(st=_e==null?void 0:_e.data)==null?void 0:st.security_token});return new Promise((et,Ve)=>{var Ye;rt.multipartUpload(`${nt}`,new Blob([Ie],{type:Ie.type}),ve(me({timeout:200*1e3,partSize:102400},Le),{callback:{url:(Ye=_e==null?void 0:_e.data)==null?void 0:Ye.callback_url,host:_e==null?void 0:_e.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+(0,Te.rz)(Me)}})).then(function(Ge){var it;Ie.response=(it=Ge.data)==null?void 0:it.data,et(Ge==null?void 0:Ge.data)}).catch(function(Ge){Ve(Ge),console.log("err:",Ge)})})}),Ee=Ie=>{var Me=Ie,{user:Le,cancelUpload:Ae}=Me,Pe=pe(Me,["user","cancelUpload"]);const[Ue,He]=(0,le.useState)([]);let[Je,st]=(0,le.useState)();const _e={onRemove:nt=>{He([...Ue.filter(rt=>rt.name!==nt.name)]),Pe.onChange(Ue.filter(rt=>rt.name!==nt.name))},disabled:Pe.disabled,multiple:!0,fileList:Ue==null?void 0:Ue.map(nt=>nt.file),customRequest:()=>{},beforeUpload:nt=>be(void 0,null,function*(){let rt=Pe.maxSize||1073741824;if(Ue.filter(et=>et.name===nt.name).length){a.ZP.info(`${nt.name}\u5DF2\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9`);return}return(nt==null?void 0:nt.size)>rt?(a.ZP.info(`\u6587\u4EF6\u8D85\u8FC7${rt/1024/1024/1024}GB\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42`),!1):(Ue.push({name:nt.name,file:nt}),He([...Ue]),Pe.onChange(Ue),!1)})},Ke=(nt,rt)=>be(void 0,null,function*(){var et,Ve,Ye,Ge,it,qe;rt.file_name=nt.name;const vt=nt.name,ot=yield(0,Te.ZP)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});if(ot.data=JSON.parse(ke(ot.data)),(ot==null?void 0:ot.status)!==0){Ue[Ue.findIndex(Re=>Re.name===vt)].status="error",Ue[Ue.findIndex(Re=>Re.name===vt)].file.status="error",Pe.onChange(Ue),a.ZP.warning("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5");return}Je=new(ee())({endpoint:(et=ot==null?void 0:ot.data)==null?void 0:et.end_point,region:(Ve=ot==null?void 0:ot.data)==null?void 0:Ve.region,accessKeyId:(Ye=ot==null?void 0:ot.data)==null?void 0:Ye.access_key_id,accessKeySecret:(Ge=ot==null?void 0:ot.data)==null?void 0:Ge.access_key_secret,bucket:(it=ot==null?void 0:ot.data)==null?void 0:it.bucket,stsToken:(qe=ot==null?void 0:ot.data)==null?void 0:qe.security_token}),console.log(nt,"file"),st(Je);const Qe=nt.name.split(".");Qe.pop();const Fe=vt.indexOf(".")>-1?rt.realFileName?Qe.join("."):(0,z.Z)():vt;return new Promise((Re,ne)=>{var fe;try{Je.multipartUpload(`${Pe.identifier}/${Fe}${vt.indexOf(".")>-1?"."+vt.split(".").pop():""}`,new Blob([nt.file],{type:nt.file.type}),{timeout:3600*1e3,partSize:1002400,progress:(Ne,We,we)=>{try{console.log("\u8FDB\u5EA6",Ne,We,we);const ye=Ue.findIndex(Oe=>Oe.name===vt);Ue[ye].file.percent=Ne*100,Ue[ye].tempCheckpoint=We,He([...Ue])}catch(ye){}},checkpoint:Ue[Ue.findIndex(Ne=>Ne.name===vt)].tempCheckpoint,callback:{customValue:{id:vt+""},url:(fe=ot==null?void 0:ot.data)==null?void 0:fe.callback_url,host:ot==null?void 0:ot.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+(0,Te.rz)(rt)}}).then(function(Ne){var We,we,ye;const Oe=Ue.findIndex(Ze=>Ze.name===vt);let $e="done";if(((We=Ne.data)==null?void 0:We.status)===0){nt.response=(we=Ne.data)==null?void 0:we.data;const Ze=Ue.findIndex(Xe=>Xe.name===vt);Ue[Ze].status="done",Ue[Ze].file.status="done"}else a.ZP.warning((ye=Ne.data)==null?void 0:ye.message),$e="error";Ue[Oe].status=$e,Ue[Oe].file.status=$e,Pe.onChange(Ue),Re(Ne==null?void 0:Ne.data)}).catch(function(Ne){Ue[Ue.findIndex(We=>We.name===vt)].status="error",Ue[Ue.findIndex(We=>We.name===vt)].file.status="error",a.ZP.warning("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),He([...Ue]),Pe.onChange(Ue),ne(Ne),console.log("err:",Ne)})}catch(Ne){}})});return(0,le.useEffect)(()=>{Ue.every(nt=>nt==="done"||nt==="error")&&Pe.onComplete(Ue)},[Ue]),(0,le.useEffect)(()=>{Ae&&(Je==null||Je.cancel())},[Ae]),(0,le.useEffect)(()=>{Pe.uploading&&Ue.map(nt=>be(void 0,null,function*(){var rt;if((!nt.status||nt.status==="error")&&!Ae){nt.status="uploading",nt.file.status="uploading";const et=yield Ke(nt,{login:(rt=Le==null?void 0:Le.userInfo)==null?void 0:rt.login,container_type:Pe.container_type,container_id:Pe.container_id,description:Pe.description,realFileName:Pe.realFileName})}}))},[Pe.uploading]),le.createElement(je,ve(me({},_e),{height:Pe.height,className:Pe.className}),le.createElement("p",{className:"ant-upload-hint"},Pe.text||"\u62D6\u62FD\u6587\u4EF6\u6216\u8005\u70B9\u51FB\u4E0A\u4F20"))};Lt.ZP=(0,ie.connect)(({loading:Ie,globalSetting:Me,user:Le})=>({globalSetting:Me,loading:Ie.models.competitions,user:Le}))(Ee)},28267:function(on,Lt,Ce){"use strict";Ce.d(Lt,{h:function(){return be}});var le=Ce(59301),yt=Ce(82326),a=Ce(28284),Te=Ce(7939),ge=Ce(89780),x=Ce.n(ge),z=Ce(88319),ie=Ce(94896),oe=Object.defineProperty,ee=Object.defineProperties,ue=Object.getOwnPropertyDescriptors,E=Object.getOwnPropertySymbols,re=Object.prototype.hasOwnProperty,te=Object.prototype.propertyIsEnumerable,se=(je,ke,Be)=>ke in je?oe(je,ke,{enumerable:!0,configurable:!0,writable:!0,value:Be}):je[ke]=Be,ae=(je,ke)=>{for(var Be in ke||(ke={}))re.call(ke,Be)&&se(je,Be,ke[Be]);if(E)for(var Be of E(ke))te.call(ke,Be)&&se(je,Be,ke[Be]);return je},he=(je,ke)=>ee(je,ue(ke));const me=yt.default.Option,ve={labelCol:{span:4},wrapperCol:{span:20}},pe={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};Lt.Z=({callback:je,onCancel:ke})=>{const[Be,De]=(0,le.useState)("python");function Se(Ie){De(pe[Ie][1])}function Ee(Ie){je(Ie)}return le.createElement(a.default,he(ae({},ve),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:Ee,style:{width:500}}),le.createElement(a.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},le.createElement(yt.default,{getPopupContainer:Ie=>Ie.parentNode,onChange:Se},Object.keys(pe).map(Ie=>le.createElement(me,{key:Ie,value:Ie},pe[Ie][0])))),le.createElement(a.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},le.createElement(be,{mode:Be})),le.createElement("div",{className:"flex-container flex-end"},le.createElement(Te.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),le.createElement(Te.ZP,{type:"ghost",onClick:ke},"\u53D6\u6D88")))};function be({value:je,onChange:ke,mode:Be,options:De={}}){const Se=(0,le.useRef)(),[Ee,Ie]=(0,le.useState)();return(0,le.useEffect)(()=>{if(Ee){let Me=function(Le){const Ae=Le.getValue();ke&&ke(Ae)};return Ee.on("change",Me),()=>{Ee.off("change",Me)}}},[Ee,ke]),(0,le.useEffect)(()=>{Ee&&Ee.setOption("mode",Be)},[Ee,Be]),(0,le.useEffect)(()=>{Ee&&(je!==Ee.getValue()||je==="")&&setTimeout(()=>{Ee.setValue(je||"")},300)},[Ee,je]),(0,le.useEffect)(()=>{if(Se.current&&!Ee){const Me=x().fromTextArea(Se.current,ae({mode:Be,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},De));Ie(Me)}},[Se.current,Ee]),le.createElement("div",{className:"my-codemirror-container"},le.createElement("textarea",{ref:Se}))}},39116:function(on,Lt,Ce){"use strict";Ce.d(Lt,{Z:function(){return nn}});var le=Ce(59301),yt=Ce(44283),a=Ce(89780),Te=Ce.n(a),ge=Ce(76374),x=Ce(88319),z=Ce(6313),ie=Ce(25717),oe=Ce(99498),ee=Ce(25419),ue=Ce(67549),E=Ce(35883),re=({value:tn="",className:dn,showTextOnly:Cn,showLines:Pn,style:Hn={}})=>{const Gn=(0,le.useMemo)(()=>"",[tn]);return le.createElement(le.Fragment,null,le.createElement("div",{dangerouslySetInnerHTML:{__html:Gn}}))},te=Object.defineProperty,se=Object.defineProperties,ae=Object.getOwnPropertyDescriptors,he=Object.getOwnPropertySymbols,me=Object.prototype.hasOwnProperty,ve=Object.prototype.propertyIsEnumerable,pe=(tn,dn,Cn)=>dn in tn?te(tn,dn,{enumerable:!0,configurable:!0,writable:!0,value:Cn}):tn[dn]=Cn,be=(tn,dn)=>{for(var Cn in dn||(dn={}))me.call(dn,Cn)&&pe(tn,Cn,dn[Cn]);if(he)for(var Cn of he(dn))ve.call(dn,Cn)&&pe(tn,Cn,dn[Cn]);return tn},je=(tn,dn)=>se(tn,ae(dn));let ke=[{title:"\u7C97\u4F53",icon:"md-iconfont icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"md-iconfont icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"md-iconfont icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"md-iconfont icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"md-iconfont icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"md-iconfont icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"md-iconfont icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"md-iconfont icon-sum",actionName:"inline-latex"},{title:"\u6570\u5B66\u516C\u5F0F",icon:"iconfont icon-shuxuetuxiang2",actionName:"maths-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"md-iconfont icon-formula",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"md-iconfont icon-picture",actionName:"upload-image"},{title:"\u63D2\u5165\u753B\u56FE",icon:"iconfont icon-sheji",actionName:"draw-image"},{title:"\u63D2\u5165\u6D41\u7A0B\u56FE",icon:"iconfont icon-liucheng",actionName:"add-flowchart"},{title:"\u8868\u683C",icon:"md-iconfont icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"md-iconfont icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"md-iconfont icon-eraser",actionName:"eraser"}];function Be({onActionCallback:tn,title:dn,icon:Cn,actionName:Pn,className:Hn="",children:Gn}){function _n(){tn(Pn)}return le.createElement("a",{title:dn,className:Hn,onClick:_n},le.createElement("i",{className:`${Cn}`}),Gn)}var De=({watch:tn,showNullButton:dn,showNullProgramButton:Cn,onActionCallback:Pn,fullScreen:Hn,insertTemp:Gn,hidetoolBar:_n,extraUse:Yn})=>{const Wn=[...ke,{title:`${tn?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${tn?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return le.createElement("ul",{className:"markdown-toolbar-container"},!_n&&Wn.map((yr,cr)=>le.createElement("li",{key:cr},yr.actionName?le.createElement(Be,je(be({},yr),{onActionCallback:Pn})):le.createElement("span",{className:"v-line"}))),dn?le.createElement("li",null,le.createElement(Be,{icon:"iconfont icon-tianjia5 insert-blank",className:"btn-null ml5",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Pn},le.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u65B0\u589E\u586B\u7A7A\u9879"))):null,Cn?le.createElement(le.Fragment,null,le.createElement("li",null,le.createElement(Be,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:Pn},le.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u5355\u884C\u586B\u7A7A\u9879"))),le.createElement("li",null,le.createElement(Be,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:Pn},le.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u591A\u884C\u586B\u7A7A\u9879")))):null,Gn&&le.createElement("li",null,le.createElement(Be,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${Gn}`,onActionCallback:Pn},le.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),Yn&&le.createElement("li",null,Yn),le.createElement("li",{className:"btn-full-screen"},le.createElement(Be,{icon:`${Hn?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:Hn?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Pn})))},Se=Ce(88487),Ee=Ce(28284),Ie=Ce(37568),Me=Ce(7939),Le=Object.defineProperty,Ae=Object.defineProperties,Pe=Object.getOwnPropertyDescriptors,Ue=Object.getOwnPropertySymbols,He=Object.prototype.hasOwnProperty,Je=Object.prototype.propertyIsEnumerable,st=(tn,dn,Cn)=>dn in tn?Le(tn,dn,{enumerable:!0,configurable:!0,writable:!0,value:Cn}):tn[dn]=Cn,_e=(tn,dn)=>{for(var Cn in dn||(dn={}))He.call(dn,Cn)&&st(tn,Cn,dn[Cn]);if(Ue)for(var Cn of Ue(dn))Je.call(dn,Cn)&&st(tn,Cn,dn[Cn]);return tn},Ke=(tn,dn)=>Ae(tn,Pe(dn));const nt={labelCol:{span:4},wrapperCol:{span:20}};var rt=({callback:tn,onCancel:dn})=>{function Cn(Pn){tn(Pn)}return le.createElement(Ee.default,Ke(_e({},nt),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Cn,style:{width:500}}),le.createElement(Ee.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},le.createElement(Ie.default,null)),le.createElement(Ee.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},le.createElement(Ie.default,null)),le.createElement("div",{className:"flex-container flex-end"},le.createElement(Me.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),le.createElement(Me.ZP,{type:"ghost",onClick:dn},"\u53D6\u6D88")))},et=Ce(28267),Ve=Ce(53332),Ye=Ce(62957),Ge=Ce(77019),it=Ce(40254),qe=Ce(59301),vt=({callback:tn,onCancel:dn})=>{const Cn=document.createElement("canvas"),Pn=Cn.getContext("2d");Cn.width=1e3,Cn.height=800,Pn.fillStyle="#ffffff",Pn.fillRect(0,0,Cn.width,Cn.height);const Hn=Cn.toDataURL("image/png");return qe.createElement(Ye.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},qe.createElement(Ge.Z,{style:{height:"100vh"}},qe.createElement(it.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:Hn,visible:!0,title:String(Date.now())},onOk:Gn=>{tn({src:Gn.url})},onClose:dn})))},ot=Ce(36207),Qe=Ce(5269),Fe=Ce(6767),Re={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re",drawerWrap:"drawerWrap___MfDw8"},ne=Ce(59301),Ne=(0,le.forwardRef)(({onCancel:tn,editImgId:dn,callback:Cn},Pn)=>{let Hn=(0,le.useRef)(),Gn=(0,le.useRef)(),_n=(0,le.useRef)(),Yn=(0,le.useRef)(!1);const Wn=(0,le.useRef)(!1);console.log("ref:",Pn);const[yr,cr]=(0,le.useState)(0),[cn,An]=(0,le.useState)("100vh");return(0,le.useEffect)(()=>{cr(1)},[]),(0,le.useImperativeHandle)(Pn,()=>({setHeight:An})),ne.createElement("div",{ref:Wn,className:"body-overflow-initial"},ne.createElement(ot.Z,{width:"100vw",height:cn,footer:null,closable:!0,placement:"bottom",open:!!yr,destroyOnClose:!0,maskClosable:!1,mask:!1,rootClassName:`zIndex-9999 ${Re.drawerWrap}`,onClose:()=>{window.saveDrawData(qn=>{Cn({src:`/api/attachments/${qn}`,id:qn})})},title:ne.createElement(Ge.Z,{align:"middle"},ne.createElement(Qe.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),ne.createElement(Qe.Z,{onClick:()=>{An(cn==="60px"?"100vh":"60px")}},ne.createElement("span",{className:"current c-blue",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77")),ne.createElement(Qe.Z,{onClick:()=>{window.saveDrawData(qn=>{if(qn===null){Fe.ZP.warning({content:"\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u8BF7\u5148\u7ED8\u5236\u6D41\u7A0B\u56FE",key:"saveFlowChart"});return}Fe.ZP.success({content:"\u4FDD\u5B58\u6210\u529F",key:"saveFlowChart",style:{zIndex:999999999}}),Cn({src:`/api/attachments/${qn}`,id:qn,disabledClose:!0})})}},ne.createElement(Me.ZP,{type:"primary",className:"ml20"},"\u4FDD\u5B58")))},ne.createElement("iframe",{src:`/drawio/src/main/webapp/?id=${dn||""}&gapi=0&od=0&db=0&gh=0&gl=0&local=0`,width:"100%",height:"100%",frameBorder:"0",ref:Gn})))}),We=Ce(14185),we=Ce(47889),ye=Ce(4875);const Oe=we.ZP.Group,$e={margin:"0 8px"};var Ze=({callback:tn,onCancel:dn})=>{function Cn(Pn){tn(Pn)}return le.createElement(Ee.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Cn},le.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},le.createElement("span",{style:$e},"\u5355\u5143\u683C\u6570\uFF1A"),le.createElement("span",{style:$e},"\u884C\u6570"),le.createElement(Ee.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},le.createElement(ye.Z,null)),le.createElement("span",{style:$e},"\u5217\u6570"),le.createElement(Ee.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},le.createElement(ye.Z,null))),le.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},le.createElement("span",{style:$e},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),le.createElement(Ee.default.Item,{name:"align"},le.createElement(Oe,null,le.createElement(we.ZP,{value:"default"},le.createElement("i",{className:"fa fa-align-justify"})),le.createElement(we.ZP,{value:"left"},le.createElement("i",{className:"fa fa-align-left"})),le.createElement(we.ZP,{value:"center"},le.createElement("i",{className:"fa fa-align-center"})),le.createElement(we.ZP,{value:"right"},le.createElement("i",{className:"fa fa-align-right"}))))),le.createElement("div",{className:"flex-container flex-end"},le.createElement(Me.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),le.createElement(Me.ZP,{type:"ghost",onClick:dn},"\u53D6\u6D88")))},Xe=Ce(58755),at=Ce(84915),lt=Ce.n(at),ut=(0,le.forwardRef)(({use3d:tn,width:dn,height:Cn,callback:Pn,showSaveButton:Hn},Gn)=>{const _n=(0,le.useRef)(),Yn=(0,le.useRef)(),[Wn,yr]=(0,le.useState)(!1),cr=(0,le.useRef)({id:_n,appName:"graphing",width:dn||1e3,height:Cn||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,le.useEffect)(()=>{Yn.current=new(lt())(cr.current,!0),window.onload=function(){Yn.current.inject("applet_container")}},[]);const cn=()=>{var An=window.ggbApplet.getPNGBase64(1,!0,72);return Pn&&Pn(An),An};return(0,le.useEffect)(()=>{cr.current.appName=Wn?"3D":"graphing",Yn.current.inject("applet_container")},[Wn]),(0,le.useEffect)(()=>{yr(tn)},[tn]),(0,le.useImperativeHandle)(Gn,()=>({getImgData:cn})),le.createElement(le.Fragment,null,le.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:_n}),le.createElement(Ge.Z,{align:"middle"},le.createElement(Qe.Z,{flex:1},le.createElement(Xe.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:Wn,onChange:An=>yr(An)})),le.createElement(Qe.Z,null,le.createElement(Me.ZP,{size:"large",onClick:cn,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),ct=Ce(9057);const Pt="link",wt="upload-image",Bt="add-flowchart",At="draw-image",pt="add-flowchart",Mt="code-block",kt="add-table",xt="------------",It={default:xt,left:`:${xt}`,center:`:${xt}:`,right:`${xt}:`};var Ut=Ce(79006),en=Ce(76406);function St(){}let jt=0;const Ht=1e4,Qt="\u2581",sn="@\u2581\u2581@",wn="@\u2581@",Bn=` **\u6A21\u677F\u6807\u9898** \u6A21\u677F\u6B63\u6587\u5185\u5BB9\uFF0C\u53EF\u8F93\u5165\u6587\u672C\u5185\u5BB9\u548C\u7C98\u8D34\u56FE\u7247\u7B49\u64CD\u4F5C`,Fn=["pptm","pptx","ppt","pot","pps","ppa","potx","ppsx","ppam","pptm","potm","ppsm","doc","docx","dot","dotx","docm","dotm","xls","xlsx","csv","xlt","xla","xltx","xlsm","xltm","xlam","xlsb"];function gn(tn){return/^\d+$/.test(tn)?`${tn}px`:tn}const un=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",Tn={[un+"-B"]:"bold",[un+"-I"]:"italic"},Mn={[Pt]:"\u6DFB\u52A0\u94FE\u63A5",[Mt]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[wt]:"\u6DFB\u52A0\u56FE\u7247",[At]:"\u6DFB\u52A0\u753B\u56FE",[Bt]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[kt]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var nn=({defaultValue:tn="",onChange:dn,width:Cn="100%",height:Pn=400,miniToolbar:Hn=!1,isFocus:Gn=!1,watch:_n,insertTemp:Yn,mode:Wn="markdown",id:yr="markdown-editor-id",showResizeBar:cr=!1,noStorage:cn=!1,showNullButton:An=!1,showNullProgramButton:qn=!1,hidetoolBar:wr=!1,fullScreen:Rt=!1,onBlur:Xt,onCMBeforeChange:Et,onFullScreen:Dt,className:Tt="",disablePaste:_t=!1,disabled:bt=!1,disabledFill:Zt=!1,placeholder:Kt="",values:Yt="",extraUse:Ft,onAddBlank:$t})=>{const[zt,Wt]=(0,le.useState)(null),[hn,mn]=(0,le.useState)(tn),[In,er]=(0,le.useState)(_n),[ar,fr]=(0,le.useState)(Rt),[Jn,Kn]=(0,le.useState)(""),[$n,dr]=(0,le.useState)(0),[Tr,Cr]=(0,le.useState)(Pn),[Or,Vn]=(0,le.useState)(!1),[xr,hr]=(0,le.useState)(0),[Hr,Xr]=(0,le.useState)(0),Ur=(0,le.useRef)(),Kr=(0,le.useRef)(),ri=(0,le.useRef)(),Fr=(0,le.useRef)(),qr=(0,le.useRef)(),Pr=(0,le.useRef)(),ei=(0,yt.useDispatch)();(0,le.useEffect)(()=>{const Nn=window.scrollY||window.pageYOffset;mn(Yt),zt==null||zt.setValue(Yt),window.scrollTo(0,Nn)},[Yt]),(0,le.useEffect)(()=>{Dt==null||Dt(ar)},[ar]),(0,le.useEffect)(()=>{if(Ur.current){let Nn=function(Un,rr){var Gr;if(_t){rr.preventDefault();return}const wi=rr.clipboardData;if(wi){const ci=wi.types.toString(),ji=wi.items;if(ci==="Files"||wi.types.indexOf("Files")>-1){if(rr.preventDefault(),Wn=="stex")return;try{let Ci=ji[1];((Gr=ji[0])==null?void 0:Gr.kind)==="file"&&(Ci=ji[0]);const Si=Ci.getAsFile(),Ni=Si.name.split(".").pop();(0,Ve.I)(Si,Mi=>{var Pi,ro,vo;Mi.id?((Pi=Si==null?void 0:Si.type)==null?void 0:Pi.indexOf("image"))>-1?Sn.replaceSelection(``):((ro=Si==null?void 0:Si.type)==null?void 0:ro.indexOf("video"))>-1?Sn.replaceSelection(``):((vo=Si==null?void 0:Si.type)==null?void 0:vo.indexOf("pdf"))>-1?Sn.replaceSelection(`${Si.name}`):Fn.includes(Ni)?Sn.replaceSelection(`${Si.name}`):Sn.replaceSelection(`[${Si.name}](/api/attachments/${Mi.id}?type=${Mi.content_type})`):(Mi==null?void 0:Mi.status)===401&&(document.location.href="/user/login")})}catch(Ci){Fe.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const Sn=Te().fromTextArea(Ur.current,{mode:Wn,lineNumbers:!Hn,lineWrapping:!0,value:tn,autoCloseTags:!0,autoCloseBrackets:!0});return Sn.on("keyup",function(Un,rr){rr.keyCode===8&&(Un.getValue()==""?Sn.setOption("placeholder",Kt):Sn.setOption("placeholder",null))}),Sn.on("keydown",function(Un,rr){if(rr.keyCode===8){var Gr=ki(Un);Gr&&rr.preventDefault()}}),Gn&&Sn.focus(),Sn.on("paste",Nn),bt&&Sn.on("beforeChange",function(Un,rr){(rr.origin==="paste"||rr.origin==="+input")&&rr.cancel()}),Wt(Sn),()=>{Sn.off("paste",Nn)}}},[]);const ui=(0,le.useCallback)(()=>{if(Kr.current)try{}catch(Nn){console.log(Nn,"---- to set md editor body height")}},[Tr,Kr,ar]);(0,le.useEffect)(()=>{function Nn(){let Sn=new ge.Z(Un=>{for(let rr of Un)(rr.target.offsetHeight>0||rr.target.offsetWidth>0)&&(ui(),zt.setSize("100%","100%"),zt.refresh())});return Sn.observe(Ur.current.parentElement),Sn}if(zt){const Sn=Nn();return()=>{var Un,rr;(Un=Ur.current)!=null&&Un.parentElement&&Sn.unobserve((rr=Ur.current)==null?void 0:rr.parentElement)}}},[zt,ui]),(0,le.useEffect)(()=>{if(zt){let Nn=[];for(const[Sn,Un]of Object.entries(Tn)){let rr={[Sn]:()=>{mi(Un)}};Nn.push(rr),zt.addKeyMap(rr)}return()=>{for(let Sn of Nn)zt.removeKeyMap(Sn)}}},[zt]),(0,le.useEffect)(()=>{Rt!==ar&&fr(Rt)},[Rt]),(0,Ut.Z)(()=>{if(!cn&&$n>0){let Nn=new Date().getTime(),Sn=window.sessionStorage.getItem(yr);Nn>=$n+Ht&&(!Sn||Sn!==hn)&&(window.sessionStorage.setItem(yr,hn),Vn(!0))}},Ht),(0,le.useEffect)(()=>{er(_n)},[zt,_n]),(0,le.useEffect)(()=>{zt&&Gn&&zt.focus()},[zt,Gn]),(0,le.useEffect)(()=>{if(In&&zt){let Nn=function(Un){let rr=Un.target;if(Fr.current){let Gr=rr.scrollTop/rr.scrollHeight;Fr.current.scrollTop=Fr.current.scrollHeight*Gr}};const Sn=zt.getScrollerElement();return Sn.addEventListener("scroll",Nn),()=>{Sn.removeEventListener("scroll",Nn)}}},[zt,In]),(0,le.useEffect)(()=>{if(zt&&Et){let Nn=function(Sn,Un){Et(Sn,Un)};return zt.on("beforeChange",Nn),()=>{zt.off("beforeChange",Nn)}}},[zt,Et]),(0,le.useEffect)(()=>{if(zt&&Xt){let Nn=function(){Xt(zt.getValue())};return zt.on("blur",Nn),()=>{zt.off("blur",Nn)}}},[zt,Xt]);function ki(Nn,Sn){var Un=Nn.getDoc(),rr=Un.getCursor(),Gr=Un.getLine(rr.line),wi=Gr.charAt(rr.ch-1),ci=Gr.lastIndexOf("@\u2581@",rr.ch),ji=Gr.lastIndexOf("@\u2581\u2581@",rr.ch),Ci=ci>ji?ci:ji,Si=ci>ji?3:4;if(sn.indexOf(wi)===-1)return null;if(console.log("change1:",Sn,Nn,Gr,rr,Ci,ci,ji,wi),Ci>=0&&rr.ch-Ci<5){var Ni=Ci+Si;return Un.replaceRange("",{line:rr.line,ch:Ci},{line:rr.line,ch:Ni}),{line:rr.line,ch:Ni}}return null}(0,le.useEffect)(()=>{if(zt){let Nn=function(Sn,Un){const rr=Sn.getValue();mn(rr),dr(new Date().getTime()),Sn.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),dn&&(qn?dn(rr,kn(rr)):dn(rr))};return zt.on("change",Nn),()=>{zt.off("change",Nn)}}},[zt,dn]),(0,le.useEffect)(()=>{if(zt)if(tn==null)zt.setValue(""),mn("");else{const Nn=window.scrollY||window.pageYOffset;tn!==zt.getValue()&&(zt.setValue(tn),mn(tn),zt.setCursor(bt?1:zt.lineCount(),0),window.scrollTo(0,Nn))}},[zt,tn]);const mi=(0,le.useCallback)(Nn=>{const Sn=zt.getCursor(),Un=zt.getSelection();let rr=Un.split(` `);switch(Nn){case"bold":return zt.replaceSelection("**"+Un+"**"),Un===""&&zt.setCursor(Sn.line,Sn.ch+2),zt.focus();case"italic":return zt.replaceSelection("*"+Un+"*"),Un===""&&zt.setCursor(Sn.line,Sn.ch+1),zt.focus();case"code":return zt.replaceSelection("`"+Un+"`"),Un===""&&zt.setCursor(Sn.line,Sn.ch+1),zt.focus();case"inline-latex":return(0,en.Ye)(ei)?void 0:(Kn("inline-latex"),zt.focus());case"latex":return zt.replaceSelection("```latex\n"+Un+"\n```"),zt.setCursor(Sn.line+1,Un.length+1),zt.focus();case"line-break":return zt.replaceSelection(`
`),zt.focus();case"list-ul":return Un===""?zt.replaceSelection("- "+Un):zt.replaceSelection(rr.map(Gr=>Gr===""?"":`- ${Gr}`).join(` `)),zt.focus();case"list-ol":return Un===""?zt.replaceSelection("1. "+Un):zt.replaceSelection(rr.map((Gr,wi)=>Gr===""?"":`${wi+1}. ${Gr}`).join(` `)),zt.focus();case"add-null-ch":$t==null||$t();return;case"add-signal":return Un===""&&zt.setCursor(Sn.line,Sn.ch),zt.replaceSelection(wn),zt.focus();case"add-multiple":return Un===""&&zt.setCursor(Sn.line,Sn.ch),zt.replaceSelection(sn),zt.focus();case"inster-template-1":return Un===""&&zt.setCursor(Sn.line,Sn.ch),zt.replaceSelection(Bn),zt.focus();case"eraser":return zt.setValue(""),zt.focus();case"trigger-watch":return er(!In),zt.focus();case"trigger-full-screen":return fr(!ar),zt.focus();case Pt:Kn(Pt);return;case Mt:Kn(Mt);return;case wt:Kn(wt);return;case At:Kn(At);return;case"maths-latex":if((0,en.Ye)(ei))return;Kn("maths-latex");return;case Bt:qr.current="",sessionStorage.removeItem("file_id"),Kn(Bt);return;case kt:Kn(kt);return;default:throw new Error}},[zt,In,ar]),xi=(0,le.useCallback)((Nn,Sn)=>{var Un,rr,Gr,wi,ci,ji;Nn!=null&&Nn.disabledClose||Kn("");const{src:Ci,alt:Si,id:Ni}=Nn||{};switch(Jn){case Pt:const{title:go,link:Ao}=Nn;return zt.replaceSelection(`[${go}](${Ao})`),zt.focus();case Mt:const{language:Co,content:ti}=Nn;return zt.replaceSelection(["```"+Co,ti,"```"].join(` `)),zt.focus();case"maths-latex":for(var Mi=atob(Nn),Pi=new Uint8Array(Mi.length),ro=0;ro{yi.id?zt.replaceSelection(`![,](/api/attachments/${yi.id}?type=${yi.content_type})`):(yi==null?void 0:yi.status)===401&&(document.location.href="/user/login")}),zt.focus();case"inline-latex":return(0,en.Ye)(ei)?void 0:(zt.replaceSelection("`$$"+Nn+"$$`"),zt.focus());case pt:return Ni?(zt.getValue().indexOf(Ci)===-1?zt.replaceSelection(`
${Si||
`):document.getElementById(Ni).src=We.Z.API_SERVER+Ci+"?t="+Date.now(),zt.focus()):void 0;case wt:case At:const Wr=Sn,Qi=(Gr=(rr=(Un=Wr==null?void 0:Wr.name)==null?void 0:Un.split("."))==null?void 0:rr.pop)==null?void 0:Gr.call(rr);return((wi=Wr==null?void 0:Wr.type)==null?void 0:wi.indexOf("image"))>-1||!(Wr!=null&&Wr.type)?Wr!=null&&Wr.align||Wr!=null&&Wr.width?zt.replaceSelection(`

${Si||

`):zt.replaceSelection(`${Si||`):((ci=Wr==null?void 0:Wr.type)==null?void 0:ci.indexOf("video"))>-1?zt.replaceSelection(``):((ji=Wr==null?void 0:Wr.type)==null?void 0:ji.indexOf("pdf"))>-1?zt.replaceSelection(`${Wr.name}`):Fn.includes(Qi)?zt.replaceSelection(`${Wr.name}`):zt.replaceSelection(`[${Wr.name}](${Ci})`),zt.focus();case kt:const{row:qi,col:si,align:Zi}=Nn;let Yi=` `;for(let yi=0;yi{switch(Jn){case Pt:return le.createElement(rt,{callback:xi,onCancel:ir});case Mt:return le.createElement(et.Z,{callback:xi,onCancel:ir});case wt:return le.createElement(Ve.Z,{callback:xi,onCancel:ir});case Bt:return le.createElement(Ne,{editImgId:qr.current,callback:xi,onCancel:ir});case kt:return le.createElement(Ze,{callback:xi,onCancel:ir});case"maths-latex":return le.createElement(ut,{showSaveButton:!0,callback:xi});case"inline-latex":return le.createElement(ct.Z,{showSaveButton:!0,callback:xi});default:return null}},[Jn]);function ir(){Kn("")}(0,le.useEffect)(()=>{if(ri.current){let Nn=function(ci){Gr=!0,wi=ci.pageY},Sn=function(){Gr=!1},Un=function(ci){if(Gr){let ji=ci.pageY-wi;ji<0&&(ji=0),ji>300&&(ji=300);let Ci=Pn+ji+"px";Cr(Ci)}},rr=ri.current,Gr=!1,wi=0;return rr.addEventListener("mousedown",Nn),document.addEventListener("mousemove",Un),document.addEventListener("mouseup",Sn),()=>{rr.removeEventListener("mousedown",Nn),document.removeEventListener("mousemove",Un),document.removeEventListener("mouseup",Sn)}}},[zt,ri]),(0,le.useEffect)(()=>{Cr(Pn)},[Pn]);const Qn=gn(Cn),gr=gn(Tr),Xn={width:Qn,height:gr},bn=(0,le.useMemo)(()=>{if($n){let Nn=new Date($n),Sn=Nn.getHours(),Un=Nn.getMinutes(),rr=Nn.getSeconds();return Sn=Sn<10?"0"+Sn:Sn,Un=Un<10?"0"+Un:Un,rr=rr<10?"0"+rr:rr,`${Sn}:${Un}:${rr}`}return 0},[$n]),kn=Nn=>{const Sn=[];if(qn){let Un=-1;Nn=Nn.replace(/(@▁▁@|@▁@)/g,function(rr,Gr,wi){Sn.push({multiLine:rr!==wn})})}return Sn};function Ln(){window.sessionStorage.removeItem(yr),Vn(!1),dr(0)}function jn(){Vn(!1),dr(0),zt.setValue(window.sessionStorage.getItem(yr))}(0,le.useEffect)(()=>{Mn[Jn]&&Jn!==At&&Jn!==Bt&&setTimeout(()=>{const Nn=document.getElementsByClassName("markdown-popup-form")[0],Sn=window.innerWidth/2-Nn.offsetWidth/2,Un=window.innerHeight/2-Nn.offsetHeight/2;hr(Sn),Xr(Un)},0)},[Jn]);const tr=Nn=>{Nn.preventDefault();const Sn=Nn.clientX-xr,Un=Nn.clientY-Hr;document.body.onmousemove=rr=>{let Gr=rr.clientX-Sn,wi=rr.clientY-Un;const ci=document.getElementsByClassName("markdown-popup-form")[0],ji=window.innerWidth-ci.offsetWidth,Ci=window.innerHeight-ci.offsetHeight;Gr=Math.max(0,Math.min(Gr,ji)),wi=Math.max(0,Math.min(wi,Ci)),ur(rr.clientX,rr.clientY,Sn,Un)&&(hr(Gr),Xr(wi))},document.body.onmouseup=function(){document.body.onmousemove=null}},ur=(Nn,Sn,Un,rr)=>{const Gr=document.body.clientHeight,wi=document.body.clientWidth;return Nn<20&&Un>Nn||Nn>wi-20&&UnSn||Sn>Gr-20&&rr{var Sn;qr.current=Nn,(Sn=Pr.current)==null||Sn.setHeight("100vh"),setTimeout(()=>{Kn("add-flowchart")},150)}})):null))),cr?le.createElement("a",{ref:ri,className:"editor-resize"}):null,Jn===At&&le.createElement(vt,{callback:xi,onCancel:ir}),Jn===Bt&&le.createElement(Ne,{ref:Pr,editImgId:qr.current,callback:xi,onCancel:ir}),le.createElement(Se.Z,null,Mn[Jn]&&Jn!==At&&Jn!==Bt?le.createElement(Ye.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:xr,top:Hr},title:le.createElement("div",{style:{cursor:"move"},onMouseDown:tr},Mn[Jn]),open:!0,onCancel:ir,footer:null,destroyOnClose:!0,width:Jn===Bt?"1200px":null,height:Jn===Bt?"80vh":null,className:"markdown-popup-form"},hi):null))}},53332:function(on,Lt,Ce){"use strict";Ce.d(Lt,{Z:function(){return ke},I:function(){return De}});var le=Ce(28284),yt=Ce(6767),a=Ce(37568),Te=Ce(44104),ge=Ce(4875),x=Ce(47889),z=Ce(7939),ie=Ce(23216),oe=Ce(59301),ee=Ce(59301),ue=Object.defineProperty,E=Object.defineProperties,re=Object.getOwnPropertyDescriptors,te=Object.getOwnPropertySymbols,se=Object.prototype.hasOwnProperty,ae=Object.prototype.propertyIsEnumerable,he=(Se,Ee,Ie)=>Ee in Se?ue(Se,Ee,{enumerable:!0,configurable:!0,writable:!0,value:Ie}):Se[Ee]=Ie,me=(Se,Ee)=>{for(var Ie in Ee||(Ee={}))se.call(Ee,Ie)&&he(Se,Ie,Ee[Ie]);if(te)for(var Ie of te(Ee))ae.call(Ee,Ie)&&he(Se,Ie,Ee[Ie]);return Se},ve=(Se,Ee)=>E(Se,re(Ee));const{useForm:pe}=le.default,be={width:280,marginRight:10},je={labelCol:{span:5},wrapperCol:{span:19}};var ke=({callback:Se,onCancel:Ee})=>{const[Ie]=pe();let Me=(0,oe.useRef)();function Le(Ue){Me.current.width=Ie.getFieldValue("width"),Me.current.align=Ie.getFieldValue("align"),Se(Ue,Me.current)}function Ae(Ue,He){if(Ue.status===-1){yt.ZP.error(Ue.message);return}Ie.setFieldsValue({src:`/api/attachments/${Ue.id}`,type:He.type})}function Pe(Ue){let He=Ue.target.files[0];Me.current=He,De(He,Ae)}return ee.createElement(le.default,ve(me({form:Ie},je),{className:"upload-image-panel",onFinish:Le,style:{width:470,overflow:"hidden"}}),ee.createElement(le.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},ee.createElement("div",{className:"flex-container"},ee.createElement(le.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},ee.createElement(a.default,{style:be})),ee.createElement(Be,{onFileChange:Pe}))),ee.createElement(le.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},ee.createElement(a.default,{style:{width:264}})),ee.createElement(le.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},ee.createElement(Te.Z,null,ee.createElement(le.default.Item,{name:"width",style:{margin:0}},ee.createElement(ge.Z,{style:{width:264}})),ee.createElement("span",{className:"ml8"},"%"))),ee.createElement(le.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},ee.createElement(x.ZP.Group,{name:"align",defaultValue:1,options:[{value:"left",label:"\u5DE6\u5BF9\u9F50"},{value:"center",label:"\u5C45\u4E2D\u5BF9\u9F50"},{value:"right",label:"\u53F3\u5BF9\u9F50"}]})),ee.createElement("aside",null,ee.createElement(le.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},ee.createElement(z.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ee.createElement(z.ZP,{type:"default",onClick:Ee},"\u53D6\u6D88"))))};function Be({onFileChange:Se}){return ee.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",ee.createElement("input",{type:"file",onChange:Se}))}function De(Se,Ee){if(!Se)throw new String("\u6CA1\u6709\u6587\u4EF6");let Ie=new FormData;Ie.append("editormd-image-file",Se),Ie.append("file_param_name","editormd-image-file"),Ie.append("byxhr","true");var Me=new window.XMLHttpRequest;Me.withCredentials=!0,Me.addEventListener("load",function(Le){Ee(JSON.parse(Le.target.responseText),Se)},!1),Me.addEventListener("error",function(Le){console.error(Le)},!1),Me.open("POST",`${ie.KI}/api/attachments.json`),Me.send(Ie)}},88487:function(on,Lt,Ce){"use strict";Ce.d(Lt,{Z:function(){return a}});var le=Ce(59301),yt=Ce(4676);class a extends le.Component{constructor(ge){super(ge);const x=window.document;this.node=x.createElement("div"),x.body.appendChild(this.node)}render(){const{children:ge}=this.props;return(0,yt.createPortal)(ge,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},34728:function(on,Lt,Ce){"use strict";Ce.d(Lt,{SV:function(){return vt},ZP:function(){return qe}});var le=Ce(59301),yt=Ce(76374);const a={keywords:["print","auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while"]},Te={quickKey:[{label:"main",content:["public static void main(String[] args) {"," $0","}"].join(` `)},{label:"System.out.println",content:["System.out.println($0)"].join(` `)},{label:"System.out.print",content:["System.out.print($0)"].join(` `)}],keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false"]},ge={keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","friend","gcnew","generic","goto","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],quickKey:[{label:"ifelse",content:["if (${1:condition}) {"," $0","} else {"," ","}"].join(` `)},{label:"include",content:"include<$0>"},{label:"printf",content:"printf($0)"},{label:"system",content:'system("$0")'},{label:"main",content:["int main () {"," $0","}"].join(` `)},{label:"if",content:["if () {"," $0","}"].join(` `)},{label:"for",content:["for(int j=0 ; j<10; j++){"," $0","}"].join(` `)},{label:"trycatch",content:["try{"," $0","}catch(ExceptionName e){","}"].join(` `)},{label:"using namespace std",content:["using namespace std"].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)}]},x={keywords:["and","as","assert","break","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","None","not","or","pass","raise","return","self","try","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","True","False","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],quickKey:[{label:"print",content:["print($0)"].join(` `)}]},z={keywords:["asInstanceOf","catch","class","classOf","def","do","else","extends","finally","for","foreach","forSome","if","import","isInstanceOf","macro","match","new","object","package","return","throw","trait","try","type","until","val","var","while","with","yield","given","enum","then"],quickKey:[{label:"println",content:["println($0)"].join(` `)}]};var ie=Ce(53184),oe=Ce.n(ie),ee=(ot,Qe,Fe)=>new Promise((Re,ne)=>{var fe=we=>{try{We(Fe.next(we))}catch(ye){ne(ye)}},Ne=we=>{try{We(Fe.throw(we))}catch(ye){ne(ye)}},We=we=>we.done?Re(we.value):Promise.resolve(we.value).then(fe,Ne);We((Fe=Fe.apply(ot,Qe)).next())});const ue={languages:["c","abap","apex","azcli","bat","cameligo","clojure","coffee","cpp","csharp","csp","css","dockerfile","fsharp","go","graphql","handlebars","html","ini","java","javascript","json","kotlin","less","lua","markdown","mips","msdax","mysql","objective-c","pascal","pascaligo","perl","pgsql","php","postiats","powerquery","powershell","pug","python","r","razor","redis","redshift","restructuredtext","ruby","rust","sb","scheme","scss","shell","solidity","sophia","sql","st","swift","tcl","twig","vb","xml","yaml'"],tables:{users:["name","id","email","phone","password"],roles:["id","name","order","created_at","updated_at","deleted_at"]}},E=(ot,Qe,Fe,Re)=>{const ne=Qe.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:Fe.lineNumber,endColumn:Fe.column});return Array.from(new Set(ne.match(/\b\w{2,}\b/g)||[])).map(Ne=>({label:Ne,kind:ot.languages.CompletionItemKind.Text,insertText:Ne,range:Re}))},re=(ot,Qe,Fe,Re)=>{ot.languages.registerCompletionItemProvider(Qe,{provideCompletionItems(ne,fe){const Ne=ne.getWordUntilPosition(fe),We={startLineNumber:fe.lineNumber,endLineNumber:fe.lineNumber,startColumn:Ne.startColumn,endColumn:Ne.endColumn},we=ne.getLineContent(fe.lineNumber).substring(Ne.startColumn-2,Ne.endColumn);return{suggestions:[...E(ot,ne,fe,We),...Fe.map(Oe=>({label:Oe,kind:ot.languages.CompletionItemKind.Keyword,documentation:Oe,insertText:Oe,insertTextRules:ot.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:We})),...Re.map(Oe=>({label:Oe.label,kind:ot.languages.CompletionItemKind.Snippet,documentation:Oe.content,insertText:we.startsWith("#")?Oe.content.replace(/#/,""):Oe.content,insertTextRules:ot.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:We}))]}}})};var te=ot=>{ue.languages.forEach(Qe=>{ot.languages.registerDocumentFormattingEditProvider(Qe,{provideDocumentFormattingEdits(Fe){return ee(this,null,function*(){const Re=oe()(Fe.getValue(),{indent_size:2,indent_char:" ",max_preserve_newlines:2,preserve_newlines:!0,keep_array_indentation:!0,break_chained_methods:!1,indent_scripts:"normal",brace_style:"collapse",space_before_conditional:!0,unescape_strings:!1,jslint_happy:!1,end_with_newline:!0,wrap_line_length:0,indent_inner_html:!1,comma_first:!1,e4x:!1,indent_empty_lines:!1});return[{range:Fe.getFullModelRange(),text:Re}]})}})}),re(ot,"java",Te.keywords,Te.quickKey),re(ot,"cpp",ge.keywords,ge.quickKey),re(ot,"c",a.keywords,[]),re(ot,"python",x.keywords,x.quickKey),re(ot,"scala",z.keywords,z.quickKey)};const se="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var ae=Object.defineProperty,he=(ot,Qe,Fe)=>Qe in ot?ae(ot,Qe,{enumerable:!0,configurable:!0,writable:!0,value:Fe}):ot[Qe]=Fe,me=(ot,Qe,Fe)=>he(ot,typeof Qe!="symbol"?Qe+"":Qe,Fe);const ve=class Wu{constructor(Qe,Fe,Re){this.placeholder=Qe,this.editor=Fe,this.monaco=Re,Fe.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return Wu.ID}getDomNode(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.style.width="max-content",this.domNode.textContent=this.placeholder,this.domNode.style.fontStyle="initial",this.domNode.style.color="#D7D7D7",this.domNode.style.pointerEvents="none",this.editor.applyFontInfo(this.domNode)),this.domNode}getPosition(){return{position:{lineNumber:1,column:1},preference:[this.monaco.editor.ContentWidgetPositionPreference.EXACT]}}dispose(){this.editor.removeContentWidget(this)}};me(ve,"ID","editor.widget.placeholderHint");var be=ve,je=Ce(96236),ke=Ce(6767),Be=Ce(25399),De=Ce(78267),Se=Ce(33156),Ee=Ce(56102),Ie=Object.defineProperty,Me=Object.defineProperties,Le=Object.getOwnPropertyDescriptors,Ae=Object.getOwnPropertySymbols,Pe=Object.prototype.hasOwnProperty,Ue=Object.prototype.propertyIsEnumerable,He=(ot,Qe,Fe)=>Qe in ot?Ie(ot,Qe,{enumerable:!0,configurable:!0,writable:!0,value:Fe}):ot[Qe]=Fe,Je=(ot,Qe)=>{for(var Fe in Qe||(Qe={}))Pe.call(Qe,Fe)&&He(ot,Fe,Qe[Fe]);if(Ae)for(var Fe of Ae(Qe))Ue.call(Qe,Fe)&&He(ot,Fe,Qe[Fe]);return ot},st=(ot,Qe)=>Me(ot,Le(Qe)),_e=(ot,Qe)=>{var Fe={};for(var Re in ot)Pe.call(ot,Re)&&Qe.indexOf(Re)<0&&(Fe[Re]=ot[Re]);if(ot!=null&&Ae)for(var Re of Ae(ot))Qe.indexOf(Re)<0&&Ue.call(ot,Re)&&(Fe[Re]=ot[Re]);return Fe},Ke=(ot,Qe,Fe)=>new Promise((Re,ne)=>{var fe=we=>{try{We(Fe.next(we))}catch(ye){ne(ye)}},Ne=we=>{try{We(Fe.throw(we))}catch(ye){ne(ye)}},We=we=>we.done?Re(we.value):Promise.resolve(we.value).then(fe,Ne);We((Fe=Fe.apply(ot,Qe)).next())});function nt(ot){return/^\d+$/.test(ot)?`${ot}px`:ot}function rt(){}let et=!1;const Ve={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python",Scala:"scale",solidity:"sol"};function Ye(ot=[]){let Qe=ot;if(Array.isArray(ot)){for(let Fe=0;FeKe(void 0,null,function*(){try{yield navigator.clipboard.writeText(" "),console.log("\u5185\u5BB9\u5DF2\u81EA\u52A8\u590D\u5236\u5230\u526A\u8D34\u677F:")}catch(ot){console.error("\u81EA\u52A8\u590D\u5236\u5931\u8D25:",ot)}});var qe=ot=>{var Qe=ot,{width:Fe="100%",height:Re="100%",value:ne,language:fe="javascript",style:Ne={},options:We={},overrideServices:we={},theme:ye="vs-dark",onEditBlur:Oe,isCopy:$e=!1,onSave:Ze,autoHeight:Xe=!1,forbidCopy:at=!1,forbidCopyTips:lt,onChange:mt=rt,editorDidMount:ut=rt,onFocus:ct=rt,onBreakPoint:Pt=rt,breakPointValue:wt=[],filename:Bt="educoder.txt",errorLine:At,errorContent:pt="",highlightLine:Mt,openBreakPoint:kt=!1,placeholder:xt="",showMiniMap:It=!0}=Qe,Ut=_e(Qe,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","isCopy","onSave","autoHeight","forbidCopy","forbidCopyTips","onChange","editorDidMount","onFocus","onBreakPoint","breakPointValue","filename","errorLine","errorContent","highlightLine","openBreakPoint","placeholder","showMiniMap"]);const en=(0,le.useRef)(),St=(0,le.useRef)({}),jt=(0,le.useRef)(),Ht=(0,le.useRef)(),Qt=(0,le.useRef)([]),sn=(0,le.useRef)(!1),wn=(0,le.useRef)(),Bn=(0,le.useRef)(),Fn=(0,le.useRef)(!1),[gn,Dn]=(0,le.useState)(!1);function un(){let cn;return en.current&&(cn=new yt.Z(An=>{for(let qn of An)(qn.target.offsetHeight>0||qn.target.offsetWidth>0)&&St.current.instance.layout()}),cn.observe(en.current)),cn}function Tn(){ke.ZP.warning({content:decodeURIComponent(lt||se),key:"monaco-editor-tip"})}const Mn=()=>{let cn=St.current.instance;if(ne!=null&&cn&&gn){const An=cn.getModel();An&&ne!==An.getValue()&&(et=!0,An.setValue(ne),cn.layout(),et=!1)}};(0,le.useEffect)(()=>{const cn=Se.Z.subscribe("formatDocument",An=>{var qn;let wr=St.current.instance;(qn=wr==null?void 0:wr.getAction)==null||qn.call(wr,"editor.action.formatDocument").run()});return window.updateMonacoValue=An=>{mt(An)},cn},[]),(0,le.useEffect)(()=>{var cn;let An=St.current.instance;Ht.current&&clearTimeout(Ht.current),Ht.current=setTimeout(()=>{Mn()},500),ne&&(ne!=null&&ne.length)&&((cn=An==null?void 0:An.updateOptions)==null||cn.call(An,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(ne.split(/\r\n|\r|\n/g).length))+3,5)}))},[ne,gn,St.current]),(0,le.useEffect)(()=>{if(At&&St.current&&St.current.instance){let An=St.current.instance;An.changeViewZones(function(qn){var wr=document.createElement("div");wr.style.padding="10px 20px",wr.style.width="calc(100% - 20px)",wr.className="my-error-line-wrp",wr.innerHTML=pt,qn.addZone({afterLineNumber:At||11,heightInLines:3,domNode:wr})});var cn={domNode:null,getId:function(){return"my.overlay.widget"},getDomNode:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.innerHTML="",this.domNode.style.width="100%",this.domNode.style.padding="20px 100px",this.domNode.style.right="0px",this.domNode.style.top="50px",this.domNode.style.position="relative",this.domNode.style.color="#333"),this.domNode},getPosition:function(){return null}};An.addOverlayWidget(cn),An.revealPositionInCenter({lineNumber:20,column:1})}},[At,St.current,gn]);const nn=(cn="",An)=>{if(!cn||cn.trim()==="")return!0;const wr=St.current.instance.getModel().getLineTokens(An);let Rt=!1;for(let Xt=0;Xt<2;Xt++)wr.getStandardTokenType(Xt)===1&&(Rt=!0);return Rt};(0,le.useEffect)(()=>{var cn;const An=(cn=St.current)==null?void 0:cn.instance;if(An&&gn&&at){const qn=An.onDidBlurEditorWidget(()=>{Fn.current=!1}),wr=An.onDidFocusEditorText(()=>{Fn.current=!0});return()=>{qn.dispose(),wr.dispose()}}},[St.current,gn,at]),(0,le.useEffect)(()=>{var cn;if((cn=St.current)!=null&&cn.instance&&gn&&kt){let An=St.current.instance,qn=An.getModel();if(!qn)return;(()=>{var Ft;let $t=[],zt=[];const Wt=qn.getAllDecorations();for(let mn of Wt)mn.options.className==="highlighted-line"&&($t.push((Ft=mn==null?void 0:mn.range)==null?void 0:Ft.startLineNumber),zt.push(mn==null?void 0:mn.id));if(Mt===$t[0])return;qn.deltaDecorations(zt,[]);const hn=qn.getLineCount();Mt&&Mt<=hn&&(An.deltaDecorations([],[{range:new Ge.Range(Mt,1,Mt,qn.getLineMaxColumn(Mt)),options:{isWholeLine:!0,className:"highlighted-line"}}]),An.revealLineInCenter(Mt))})();const Rt=(Ft=!1)=>{var $t;let zt=[],Wt=[];const hn=qn.getAllDecorations();for(let mn of hn)mn.options.linesDecorationsClassName==="breakpoints-select"&&(zt.push(($t=mn==null?void 0:mn.range)==null?void 0:$t.startLineNumber),Wt.push(mn==null?void 0:mn.id));if(Ft)return{lines:zt,ids:Wt};Pt(zt)},Xt=Ft=>Ke(void 0,null,function*(){let $t={range:new Ge.Range(Ft,1,Ft,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield qn.deltaDecorations([],[$t]),Rt()}),Et=Ft=>Ke(void 0,null,function*(){let $t=[];const zt=An.getLineDecorations(Ft);for(let Wt of zt)Wt.options.linesDecorationsClassName==="breakpoints-select"&&$t.push(Wt.id);yield qn.deltaDecorations($t,[]),Rt()}),Dt=Ft=>{let $t=An.getLineDecorations(Ft);for(let zt of $t)if(zt.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,De.isEqual)(wt,Rt(!0).lines)){qn.deltaDecorations(Rt(!0).ids,[]);const Ft=wt.map($t=>({range:new Ge.Range($t,1,$t,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));qn.deltaDecorations([],Ft)}const Tt=An.onDidChangeModelContent(Ft=>{let $t=An.getPosition();if($t){let zt=$t.lineNumber;clearTimeout(Bn.current),Bn.current=setTimeout(()=>{nn(qn.getLineContent(zt),zt)?Et(zt):Dt(zt)?(Et(zt),Xt(zt)):Rt()},100)}}),_t=An.onMouseDown(Ft=>{var $t,zt,Wt;if(Ft.target.detail&&((Wt=(zt=($t=Ft.target)==null?void 0:$t.element)==null?void 0:zt.className)!=null&&Wt.includes("line-numbers"))){let hn=Ft.target.position.lineNumber;if(nn(qn.getLineContent(hn),hn))return;Dt(hn)?Et(hn):Xt(hn)}}),bt=Ft=>{let $t={range:new Ge.Range(Ft,1,Ft,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};Qt.current=An.deltaDecorations(Qt.current,[$t])},Zt=()=>{Qt.current=An.deltaDecorations(Qt.current,[])},Kt=An.onMouseMove(Ft=>{var $t,zt,Wt;if(Zt(),Ft.target.detail&&((Wt=(zt=($t=Ft.target)==null?void 0:$t.element)==null?void 0:zt.className)!=null&&Wt.includes("line-numbers"))){let hn=Ft.target.position.lineNumber;if(nn(qn.getLineContent(hn),hn))return;bt(hn)}}),Yt=An.onMouseLeave(()=>{Zt()});return()=>{Tt.dispose(),_t.dispose(),Kt.dispose(),Yt.dispose()}}},[St.current,gn,wt,Mt,kt,fe]),(0,le.useEffect)(()=>{var cn;(cn=St.current)!=null&&cn.instance&&kt&&St.current.instance.setPosition({lineNumber:0,column:0})},[Mt]);function tn(){let cn=St.current.instance;if(cn){const An=cn.getSelection(),qn=St.current.pastePos||{},wr=new Ge.Range(qn.startLineNumber||An.endLineNumber,qn.startColumn||An.endColumn,qn.endLineNumber||An.endLineNumber,qn.endColumn||An.endColumn);setTimeout(()=>{cn.executeEdits("",[{range:wr,text:""}])},300)}}function dn(cn){(window.navigator.platform.match("Mac")?cn.metaKey:cn.ctrlKey)&&cn.keyCode==83&&(cn.preventDefault(),Ze())}const Cn=()=>{if(Xe&&St.current.instance){const cn=St.current.instance.getContentHeight();yr(cn{if(!Fn.current)return;const{keyCode:An,ctrlKey:qn,metaKey:wr,target:Rt,type:Xt}=cn;return(Xt==="paste"||(An===67||An===86)&&(wr||qn))&&Rt.nodeName==="TEXTAREA"&&(Tn(),cn.preventDefault()),!1};function Gn(cn,An){var qn=window.URL||window.webkitURL||window,wr=new Blob([An]),Rt=document.createElementNS("http://www.w3.org/1999/xhtml","a");Rt.href=qn.createObjectURL(wr),Rt.download=cn,Pn(Rt)}(0,le.useEffect)(()=>{Cn()},[Cn]),(0,le.useEffect)(()=>{en.current&&!gn&&Promise.all([Ce.e(8909),Ce.e(5977)]).then(Ce.bind(Ce,71448)).then(cn=>{try{Ge=cn,St.current.instance=Ge.editor.create(en.current,{value:ne,language:Ye(fe),theme:ye,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:It||!1}},we);const An=St.current.instance;let Rt=[...je.BH._menuItems].find(Tt=>Tt[0]._debugName=="EditorContext")[1],Xt=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Et=(Tt,_t)=>{var bt,Zt;let Kt=Tt._first;do _t.includes((Zt=(bt=Kt.element)==null?void 0:bt.command)==null?void 0:Zt.id)&&Tt._remove(Kt);while(Kt=Kt.next)};if(ut(An,Ge),setTimeout(()=>{Cn(),St.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{Gn(Bt||"educoder.txt",An.getValue())}})},500),St.current.subscription=An.onDidChangeModelContent(Tt=>{sn.current?clearTimeout(wn.current):(Cn(),mt(An.getValue(),Tt)),wn.current=setTimeout(()=>{sn.current=!1},500)}),window.Monaco||te(Ge,Ye(fe)),at&&(Et(Rt,Xt),en.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",Hn),window.removeEventListener("paste",Hn),window.addEventListener("keydown",Hn),window.addEventListener("paste",Hn)),window.Monaco=Ge,Oe&&An.onDidBlurEditorWidget(()=>{Oe(An.getValue())}),ct&&An.onDidFocusEditorText(()=>{at&&it(),ct(An.getValue())}),at){it();try{An.onDidPaste(Tt=>{const _t=An.getSelection(),bt=St.current.pastePos||{},Zt=new Ge.Range(bt.startLineNumber||_t.endLineNumber,bt.startColumn||_t.endColumn,bt.endLineNumber||_t.endLineNumber,bt.endColumn||_t.endColumn);An.executeEdits("",[{range:Tt.range,text:""}])})}catch(Tt){}}let Dt=un();return xt&&typeof xt=="string"&&new be(xt,An,Ge),Dn(!0),()=>{const Tt=St.current.instance;Tt.dispose();const _t=Tt.getModel();_t&&_t.dispose(),St.current.subscription&&St.current.subscription.dispose(),Dt.unobserve(en.current)}}catch(An){}})},[]),(0,le.useEffect)(()=>{if(St.current.instance&&gn)return document.addEventListener("keydown",dn,!1),()=>{document.removeEventListener("keydown",dn)}},[Ze,gn]),(0,le.useEffect)(()=>{let cn=St.current.instance;if(cn&&gn){let An=Ye(fe);Ge.editor.setModelLanguage(cn.getModel(),An)}},[fe,gn]),(0,le.useEffect)(()=>{St.current.instance&&gn&&Ge.editor.setTheme(ye)},[ye,gn]),(0,le.useEffect)(()=>{let cn=St.current.instance;jt.current=We,cn&&gn&&(cn.updateOptions(Je({},We)),setTimeout(()=>{cn.getModel().updateOptions(Je({},We))},200))},[JSON.stringify(We),gn]),(0,le.useEffect)(()=>{let cn=St.current.instance;cn&&gn&&cn.layout()},[Fe,Re,gn]);const[_n,Yn]=(0,le.useState)(nt(Fe)),[Wn,yr]=(0,le.useState)(nt(Re)),cr=st(Je({},Ne),{width:_n,height:Wn,position:"relative"});return le.createElement("div",{className:"my-monaco-editor",ref:en,style:cr,onFocus:()=>{at&&it()}},$e&&le.createElement(Ee.CopyToClipboard,{text:ne,onCopy:()=>ke.ZP.success("\u590D\u5236\u6210\u529F")},le.createElement(Be.Z,{title:"\u590D\u5236\u4EE3\u7801"},le.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},le.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function vt({width:ot="100%",height:Qe="100%",original:Fe,modified:Re,language:ne,options:fe={}}){const Ne=(0,le.useRef)(),[We,we]=(0,le.useState)(null);function ye(Xe){let at;return Ne.current&&(at=new yt.Z(lt=>{for(let mt of lt)(mt.target.offsetHeight>0||mt.target.offsetWidth>0)&&Xe.layout()}),at.observe(Ne.current)),at}(0,le.useEffect)(()=>(Ne.current&&Promise.all([Ce.e(8909),Ce.e(9404)]).then(Ce.bind(Ce,2550)).then(Xe=>{Ge=Xe;const at=Ge.editor.createDiffEditor(Ne.current,st(Je({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",wordWrap:"off",ignoreTrimWhitespace:!1,"semanticHighlighting.enabled":!0,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},fe),{wordWrap:!0}));we(at);let lt=ye(at);return()=>{at.dispose();const mt=at.getModel();mt&&mt.dispose(),lt.unobserve(Ne.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,le.useEffect)(()=>{We&&We.setModel({original:Ge.editor.createModel(Fe,ne),modified:Ge.editor.createModel(Re,ne)})},[Fe,Re,ne,We]);const Oe=nt(ot),$e=nt(Qe),Ze={width:Oe,height:$e};return le.createElement("div",{className:"my-diff-editor",ref:Ne,style:Ze})}},83078:function(on,Lt,Ce){"use strict";var le=Ce(21385),yt=Ce(82326),a=Ce(58755),Te=Ce(59301);const ge=yt.default.Option;Lt.Z=({isTheoretical:x,onFontSizeChange:z,cmFontSize:ie,cmCodeMode:oe,autoFormat:ee,onCodeModeChange:ue,onTabToSpace:E,onAutoFormat:re,formatDocument:te,className:se="",tabToSpace:ae,children:he,code_editor:me,challenge:ve,shixun_environment_id:pe,shixun_environments:be})=>{var je;const ke={1:"\u7B80\u5355",2:"\u4E2D\u7B49",3:"\u56F0\u96BE"},Be=(je=be==null?void 0:be.find(De=>De.shixun_environment_id===pe))==null?void 0:je.program_language;return console.log("----",Be,be,pe,me),Te.createElement("div",{className:`tpi-code-setting ${se}`},Te.createElement("h3",null,"\u4EE3\u7801\u683C\u5F0F"),Te.createElement("section",null,Te.createElement("div",{className:"file-item"},Te.createElement("b",null,"\u663E\u793A\u6A21\u5F0F"),Te.createElement(yt.default,{bordered:!1,size:"small",value:oe,onChange:ue},Te.createElement(ge,{value:"vs"},"\u767D\u8272\u80CC\u666F"),Te.createElement(ge,{value:"vs-dark"},"\u9ED1\u8272\u80CC\u666F"))),!x&&Te.createElement(Te.Fragment,null,Te.createElement("div",{className:"file-item"},Te.createElement("b",null,"\u5B57\u4F53\u5927\u5C0F"),Te.createElement(yt.default,{bordered:!1,size:"small",value:ie,onChange:z},Te.createElement(ge,{value:12},"12px"),Te.createElement(ge,{value:14},"14px"),Te.createElement(ge,{value:16},"16px"),Te.createElement(ge,{value:18},"18px"),Te.createElement(ge,{value:20},"20px"),Te.createElement(ge,{value:22},"22px"))),Te.createElement("div",{className:"file-item"},Te.createElement("b",null,"Tab\u8F6C\u6362"),Te.createElement(a.Z,{checked:ae,onChange:E})),Te.createElement("div",{className:"file-item",onClick:te},Te.createElement("b",{style:{cursor:"pointer"}},"\u683C\u5F0F\u5316\u4EE3\u7801")))),!x&&Te.createElement(Te.Fragment,null,Te.createElement("h3",null,"\u5FEB\u6377\u952E"),Te.createElement("section",null,Te.createElement("div",{className:"file-item"},Te.createElement("b",null,"\u4FDD\u5B58\u4EE3\u7801"),Te.createElement("span",null,"Ctrl + S")),Te.createElement("div",{className:"file-item"},Te.createElement("b",null,"\u5524\u51FA\u5FEB\u6377\u952E\u5217\u8868"),Te.createElement("span",null,"F1 / Alt + F1")),Te.createElement("div",{className:"file-item"},Te.createElement("b",null,"\u5DE6\u53F3\u7F29\u8FDB"),Te.createElement("span",null,"Ctrl + ]/[")),Te.createElement("div",{className:"file-item"},Te.createElement("b",null,"\u8DF3\u5230\u5339\u914D\u7684\u62EC\u53F7"),Te.createElement("span",null,"Ctrl + Shift + \\")),Te.createElement("div",{className:"file-item"},Te.createElement("b",null,"\u8F6C\u5230\u884C\u9996"),Te.createElement("span",null,"Home")),Te.createElement("div",{className:"file-item"},Te.createElement("b",null,"\u8F6C\u5230\u884C\u5C3E"),Te.createElement("span",null,"End"))),he),!x&&Te.createElement(Te.Fragment,null,Te.createElement("h3",null,"\u5B9E\u8BAD\u57FA\u672C\u4FE1\u606F"),Te.createElement("section",null,Be&&Te.createElement("div",{className:"file-item"},Te.createElement("b",null,"\u7F16\u7A0B\u8BED\u8A00"),Te.createElement("span",null,Be)),Te.createElement("div",{className:"file-item"},Te.createElement("b",null,"\u5B9E\u8BAD\u96BE\u6613\u5EA6"),Te.createElement("span",null,ke[ve==null?void 0:ve.difficulty])),Te.createElement("div",{className:"file-item"},Te.createElement("b",null,"\u5B9E\u9A8C\u73AF\u5883"),Te.createElement("span",null,me==null?void 0:me.name)),Te.createElement("div",{className:"file-item"},Te.createElement("b",null,"\u5B9E\u9A8C\u5BB9\u5668\u7F51\u7EDC"),Te.createElement("span",null,me!=null&&me.close_internet?"\u5173\u95ED\u5916\u7F51":"\u5F00\u542F\u5916\u7F51")))))}},79006:function(on,Lt,Ce){"use strict";Ce.d(Lt,{Z:function(){return yt}});var le=Ce(59301);function yt(a,Te){const ge=(0,le.useRef)();(0,le.useEffect)(()=>{ge.current=a}),(0,le.useEffect)(()=>{function x(){ge.current()}if(Te!==null){let z=setInterval(x,Te);return()=>clearInterval(z)}},[Te])}},92863:function(on,Lt,Ce){"use strict";Ce.r(Lt),Ce.d(Lt,{Types:function(){return gn},default:function(){return Tn}});var le=Ce(59301),yt={header:"header___N_IdR",field:"field___XG_dh","oj-form-container":"oj-form-container___syYzK","oj-left-panel":"oj-left-panel___L082x","oj-form-info":"oj-form-info___q0IU5",footer:"footer___pGCM2",result:"result___LM9Ms",passText:"passText___nUoL4",noPassText:"noPassText___ECHHG",pass:"pass___tDubp",noPass:"noPass___ilYvg","test-case-name":"test-case-name___MI_KD","btn-remove-case":"btn-remove-case___OiaTQ","icon-tag":"icon-tag___D86WO",btn_back:"btn_back___FyaSY",testJi:"testJi___NDviK",upBtn:"upBtn___FiZX4","oj-problems":"oj-problems___xb70g",row:"row___v036E",a:"a___yRaYH",b:"b___gWQyu",inputTwo:"inputTwo___IZ9og",inputOne:"inputOne____NmcT",cusModal:"cusModal___fJ5gm","oj-custom-large-spin":"oj-custom-large-spin___Aar0g",MdEditor:"MdEditor___hgoes"},a=Ce(37568),Te=Ce(62957),ge=Ce(8848),x=Ce(28284),z=Ce(6767),ie=Ce(77019),oe=Ce(5269),ee=Ce(29787),ue=Ce(7939),E=Ce(70858),re=Ce(82326),te=Ce(4875),se=Ce(47889),ae=Ce(62673),he=Ce(44104),me=Ce(93725),ve=Ce(59301);const{Option:pe}=re.default;var be=(nn=>(nn[nn.language=0]="language",nn[nn.difficulty=1]="difficulty",nn[nn.category=2]="category",nn[nn.openOrNot=3]="openOrNot",nn))(be||{});const je={0:[{title:"C",key:"C"},{title:"C++",key:"C++"},{title:"Python",key:"Python"},{title:"Java",key:"Java"}],1:[{title:"\u7B80\u5355",key:1},{title:"\u9002\u4E2D",key:2},{title:"\u56F0\u96BE",key:3}],2:[{title:"\u7A0B\u5E8F\u8BBE\u8BA1",key:1},{title:"\u7B97\u6CD5",key:2}],3:[{title:"\u516C\u5F00",key:1},{title:"\u79C1\u6709",key:0}]};function ke(nn){return je[nn].map(tn=>ve.createElement(pe,{key:tn.title,value:tn.key}," ",tn.title," "))}function Be(nn,tn){nn.map(dn=>{const{id:Cn,name:Pn,sub_disciplines:Hn}=dn;let Gn={value:Cn,label:Pn};tn.push(Gn),Hn&&Hn.length>0&&(Gn.children=[],Be(Hn,Gn.children))})}function De(nn,tn){var dn;let Cn=[];for(let Pn=0;Pn0){Cn[0]=Hn.id;for(let Gn=0;Gntn in nn?it(nn,tn,{enumerable:!0,configurable:!0,writable:!0,value:dn}):nn[tn]=dn,ne=(nn,tn)=>{for(var dn in tn||(tn={}))Qe.call(tn,dn)&&Re(nn,dn,tn[dn]);if(ot)for(var dn of ot(tn))Fe.call(tn,dn)&&Re(nn,dn,tn[dn]);return nn},fe=(nn,tn)=>qe(nn,vt(tn));const Ne={theme:(0,Ye.G)("cmCodeMode","vs-dark"),fontSize:(0,Ye.G)("cmFontSize",14),showEditorSetting:!1,tabToSpace:(0,Ye.G)("cmTabToSpace",!0)};var We=(nn=>(nn[nn.set_font_size=0]="set_font_size",nn[nn.set_theme=1]="set_theme",nn[nn.on_tab_to_space=2]="on_tab_to_space",nn[nn.set_show_editor_setting=3]="set_show_editor_setting",nn))(We||{});function we(nn,tn){switch(tn.type){case 3:return fe(ne({},nn),{showEditorSetting:tn.payload});case 1:return fe(ne({},nn),{theme:tn.payload});case 0:return fe(ne({},nn),{fontSize:tn.payload});case 2:return fe(ne({},nn),{tabToSpace:tn.payload});default:throw new Error}}var ye=({value:nn,onChange:tn,language:dn,onLanguage:Cn,languageItems:Pn,ActionBarRender:Hn=Gn=>le.createElement(Oe,{languageItems:Pn,onLanguage:Cn,language:dn,onShowCodeSetting:Gn})})=>{const[Gn,_n]=(0,le.useReducer)(we,Ne),{theme:Yn,fontSize:Wn,showEditorSetting:yr,tabToSpace:cr}=Gn;console.log(nn,dn,"value");const cn={onFontSizeChange:Rt=>{_n({type:0,payload:Rt}),(0,Ye.t)("cmFontSize",Rt)},tabToSpace:cr,cmFontSize:Wn,className:"oj",cmCodeMode:Yn,onTabToSpace:Rt=>{_n({type:2,payload:Rt}),(0,Ye.t)("cmTabToSpace",Rt)},onCodeModeChange:Rt=>{_n({type:1,payload:Rt}),(0,Ye.t)("cmCodeMode",Rt)}};function An(){_n({type:3,payload:!1})}function qn(){_n({type:3,payload:!0})}const wr={value:nn,language:dn,onChange:tn,theme:Yn,height:"calc(100% - 56px)",options:{fontSize:Wn,insertSpaces:cr}};return le.createElement(le.Fragment,null,le.createElement("div",{className:Ge["code-panel-container"]},Hn(qn),le.createElement(rt.ZP,ne({key:dn},wr))),le.createElement(Ve.Z,null,le.createElement(nt.Z,{rootClassName:"oj",title:null,placement:"right",closable:!1,open:yr,onClose:An},le.createElement(et.Z,ne({},cn)))))};function Oe({languageItems:nn,language:tn,onShowCodeSetting:dn,onLanguage:Cn}){return le.createElement("div",{className:Ge["action-oj-bar"]},nn==null?void 0:nn.map(Pn=>le.createElement("div",{className:tn===(Pn==null?void 0:Pn.language)?Ge.active:"",onClick:()=>Cn(Pn==null?void 0:Pn.language),key:Pn==null?void 0:Pn.language},Pn==null?void 0:Pn.language)),le.createElement("a",{onClick:dn},le.createElement("i",{className:"iconfont icon-shezhi"})))}var $e=Ce(31691),Ze={flex_box_center:"flex_box_center___4yAaY",flex_space_between:"flex_space_between___YaUgM",flex_box_vertical_center:"flex_box_vertical_center___zR3dp",flex_box_center_end:"flex_box_center_end___rwgS5",flex_box_column:"flex_box_column___LhFeP",wrap:"wrap___xTL91",in:"in___eSY86",btns:"btns___UdEGI",customModal:"customModal___CL0OL"},Xe=(nn,tn,dn)=>new Promise((Cn,Pn)=>{var Hn=Yn=>{try{_n(dn.next(Yn))}catch(Wn){Pn(Wn)}},Gn=Yn=>{try{_n(dn.throw(Yn))}catch(Wn){Pn(Wn)}},_n=Yn=>Yn.done?Cn(Yn.value):Promise.resolve(Yn.value).then(Hn,Gn);_n((dn=dn.apply(nn,tn)).next())}),lt=({visible:nn,onOK:tn,onCancel:dn})=>{const[Cn,Pn]=(0,le.useState)(!1),[Hn,Gn]=(0,le.useState)(!1),[_n,Yn]=(0,le.useState)("1"),[Wn,yr]=(0,le.useState)(""),[cr,cn]=(0,le.useState)([]),An=()=>Xe(void 0,null,function*(){if(!Wn){z.ZP.warning(`\u9898\u76EE${Et}\u4E0D\u80FD\u4E3A\u7A7A`);return}Gn(!0);const Dt=yield(0,Ae.ZP)("/api/tag_disciplines.json",{method:"post",body:{target:nn,name:Wn}});if((Dt==null?void 0:Dt.status)===0){tn();return}Gn(!1)}),qn=(Dt="")=>Xe(void 0,null,function*(){Pn(!0);let Tt=yield(0,Ae.ZP)("/api/tag_disciplines.json",{method:"get",params:{target:nn,search:Dt}});cn(Tt.tag_disciplines||[]),Pn(!1)}),wr=Dt=>{let Tt=Dt.name;Te.default.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u91CD\u547D\u540D",content:le.createElement("div",null,le.createElement(a.default,{defaultValue:Tt,placeholder:`\u8BF7\u8F93\u5165${Et}\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57`,maxLength:20,onChange:_t=>{Tt=_t.target.value}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>Xe(void 0,null,function*(){if(!Tt)return z.ZP.warning(`\u9898\u76EE${Et}\u4E0D\u80FD\u4E3A\u7A7A`),Promise.reject();const _t=yield(0,Ae.ZP)(`/api/tag_disciplines/${Dt.id}/rename.json`,{method:"post",body:{id:Dt.id,name:Tt}});(_t==null?void 0:_t.status)===0&&qn()})})},Rt=Dt=>{Te.default.confirm({icon:null,className:"custom-modal-divider",centered:!0,width:570,title:"\u5220\u9664",content:nn==="practice"?le.createElement("div",null,"\u786E\u8BA4\u5C06\u9898\u76EE\u6765\u6E90\u201C",le.createElement("span",{className:"c-light-primary"},Dt.name),"\u201D\u5220\u9664\u5417\uFF1F",le.createElement("br",null),"\u5220\u9664\u540E\uFF0C\u4F1A\u5C06\u76F8\u5173\u9898\u76EE\u4E2D\u7684\u6765\u6E90\u8FDB\u884C\u6E05\u9664\u3002"):le.createElement("div",null,"\u786E\u8BA4\u5C06\u9898\u76EE\u77E5\u8BC6\u70B9\u201C",le.createElement("span",{className:"c-light-primary"},Dt.name),"\u201D\u5220\u9664\u5417\uFF1F",le.createElement("br",null),"\u5220\u9664\u540E\uFF0C\u4F1A\u5C06\u76F8\u5173\u9898\u76EE\u4E2D\u7684\u77E5\u8BC6\u70B9\u8FDB\u884C\u6E05\u9664\u3002"),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>Xe(void 0,null,function*(){const Tt=yield(0,Ae.ZP)(`/api/tag_disciplines/${Dt.id}.json`,{method:"delete",body:{id:Dt.id}});(Tt==null?void 0:Tt.status)===0&&qn()})})},Xt=Dt=>{qn(Dt)},Et=nn==="practice"?"\u77E5\u8BC6\u70B9":"\u6765\u6E90";return le.createElement(Te.default,{afterClose:()=>{Gn(!1),Pn(!1),yr(""),Yn("1"),cn([])},centered:!0,keyboard:!1,width:600,title:`${Et}\u7BA1\u7406`,open:!!nn,className:Ze.customModal,footer:null,onCancel:dn},le.createElement("section",{className:Ze.wrap},le.createElement($e.default,{activeKey:_n,onChange:Dt=>{yr(""),Yn(Dt),qn()}},le.createElement($e.default.TabPane,{tab:`\u65B0\u589E${Et}`,key:"1"},le.createElement(a.default,{value:Wn,onChange:Dt=>yr(Dt.target.value),className:Ze.in,placeholder:`\u8F93\u5165${Et}\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57`,maxLength:20}),le.createElement("div",{className:Ze.btns},le.createElement(ue.ZP,{onClick:dn,className:"mr20"},"\u53D6\u6D88 "),le.createElement(ue.ZP,{loading:Hn,onClick:An,type:"primary"},"\u786E\u8BA4\u65B0\u5EFA"))),le.createElement($e.default.TabPane,{tab:`\u5DF2\u6709${Et}`,key:"2"},le.createElement(a.default.Search,{allowClear:!0,onSearch:Xt,value:Wn,onChange:Dt=>yr(Dt.target.value),className:Ze.in,placeholder:`\u8F93\u5165${Et}\u540D\u79F0\u8FDB\u884C\u67E5\u8BE2`}),le.createElement(E.default,{dataSource:cr,bordered:!1,loading:Cn,scroll:cr.length>7?{y:300}:{},style:{padding:"0 0px 20px 0px"},columns:[{title:`${Et}\u540D\u79F0`,dataIndex:"name",ellipsis:!0},{title:"\u64CD\u4F5C",dataIndex:"action",width:120,render:(Dt,Tt)=>le.createElement("span",null,le.createElement("span",{onClick:()=>wr(Tt),className:"current mr10 c-light-primary"},"\u91CD\u547D\u540D"),le.createElement("span",{onClick:()=>Rt(Tt),className:"current c-grey-666"},"\u5220\u9664"))}],pagination:!1})))))},mt=Ce(14185),ut=Ce(55178),ct=Ce(66649),Pt=Ce.n(ct),wt=Ce(76406),Bt=Ce(35883),At=Ce(15267),pt=Ce(59301),Mt=Object.defineProperty,kt=Object.defineProperties,xt=Object.getOwnPropertyDescriptors,It=Object.getOwnPropertySymbols,Ut=Object.prototype.hasOwnProperty,en=Object.prototype.propertyIsEnumerable,St=(nn,tn,dn)=>tn in nn?Mt(nn,tn,{enumerable:!0,configurable:!0,writable:!0,value:dn}):nn[tn]=dn,jt=(nn,tn)=>{for(var dn in tn||(tn={}))Ut.call(tn,dn)&&St(nn,dn,tn[dn]);if(It)for(var dn of It(tn))en.call(tn,dn)&&St(nn,dn,tn[dn]);return nn},Ht=(nn,tn)=>kt(nn,xt(tn)),Qt=(nn,tn,dn)=>new Promise((Cn,Pn)=>{var Hn=Yn=>{try{_n(dn.next(Yn))}catch(Wn){Pn(Wn)}},Gn=Yn=>{try{_n(dn.throw(Yn))}catch(Wn){Pn(Wn)}},_n=Yn=>Yn.done?Cn(Yn.value):Promise.resolve(Yn.value).then(Hn,Gn);_n((dn=dn.apply(nn,tn)).next())});const{TextArea:sn}=a.default,{confirm:wn}=Te.default,{Panel:Bn}=ge.default,Fn={loading:!0,user:null,status:0,data:void 0,lastedUpdateTime:0};var gn=(nn=>(nn[nn.SET_INITAL_DATA=0]="SET_INITAL_DATA",nn[nn.SET_LOADING=1]="SET_LOADING",nn[nn.SET_STATUS=2]="SET_STATUS",nn))(gn||{});const Dn="#### \u9898\u76EE\u63CF\u8FF0\n\u73B0\u6709\u4E00\u4E2A\u6574\u578B\u6570\u7EC4 `nums`\uFF0C\u8BF7\u7F16\u5199\u7A0B\u5E8F\u5C06\u6570\u7EC4 `nums` \u4E2D\u7684\u6240\u6709 `$$0$$` \u79FB\u52A8\u5230\u6570\u7EC4\u7684\u672B\u5C3E\uFF0C\u4F46\u4E0D\u6539\u53D8\u975E\u96F6\u5143\u7D20\u5728\u6570\u7EC4\u4E2D\u7684\u76F8\u5BF9\u4F4D\u7F6E\u3002\u8BF7\u5728\u539F\u6570\u7EC4 `nums` \u4E0A\u8FDB\u884C\u64CD\u4F5C\u3002\n#### \u8F93\u5165\u8F93\u51FA\u683C\u5F0F\n**\u8F93\u5165\u683C\u5F0F**\n\u7B2C\u4E00\u884C\u6709\u4E00\u4E2A\u6574\u6570 `numsSize`\uFF0C\u8868\u793A\u6570\u7EC4 `nums` \u7684\u5927\u5C0F\uFF1B\n\u7B2C\u4E8C\u884C\u6709 `numsSize` \u4E2A\u6574\u6570\uFF0C\u8868\u793A\u6570\u7EC4 `nums` \u7684\u6240\u6709\u5143\u7D20\uFF0C\u6BCF\u4E2A\u6574\u6570\u7528\u4E00\u4E2A\u7A7A\u683C\u9694\u5F00\u3002\n**\u8F93\u51FA\u683C\u5F0F**\n\u4E00\u884C\u8F93\u51FA\u6570\u7EC4 `nums` \u7684\u6240\u6709\u5143\u7D20\uFF0C\u6709 `numsSize` \u4E2A\u6574\u6570\uFF0C\u6BCF\u4E2A\u6574\u6570\u7528\u4E00\u4E2A\u7A7A\u683C\u9694\u5F00\u3002\n#### \u8F93\u5165\u8F93\u51FA\u6837\u4F8B1\n**\u8F93\u5165**\n`4`\n`0 1 2 3`\n**\u8F93\u51FA**\n`1 2 3 0`\n**\u89E3\u91CA\uFF08\u53EF\u9009\uFF09**\nXXXXX\n#### \u8F93\u5165\u8F93\u51FA\u6837\u4F8B2\n**\u8F93\u5165**\n`5`\n`1 1 0 1 0`\n**\u8F93\u51FA**\n`1 1 1 0 0`\n**\u89E3\u91CA\uFF08\u53EF\u9009\uFF09**\nXXXXX\n#### \u8BF4\u660E\u63D0\u793A\n-`1\u2264n\u2264100`";function un(nn,tn){switch(tn.type){case 0:return jt(jt({},nn),tn.payload);case 1:return Ht(jt({},nn),{loading:tn.payload});case 2:return Ht(jt({},nn),{status:tn.payload});default:throw new Error}}var Tn=()=>{var nn,tn,dn;const Cn=(0,Se.useLocation)(),{id:Pn}=(0,Se.useParams)(),[Hn]=x.default.useForm(),[Gn,_n]=(0,le.useState)(),[Yn,Wn]=(0,le.useState)(!1),[yr,cr]=(0,le.useState)([]),[cn,An]=(0,le.useState)([]),[qn,wr]=(0,le.useState)([]),[Rt,Xt]=(0,le.useState)([]),[Et,Dt]=(0,le.useState)([]),[Tt,_t]=(0,le.useState)("C"),[bt,Zt]=(0,le.useReducer)(un,Fn),{loading:Kt,data:Yt,user:Ft,status:$t}=bt,zt=Yt==null?void 0:Yt.hack_sets,Wt=(nn=Yt==null?void 0:Yt.hack)==null?void 0:nn.test_set_average,[hn,mn]=(0,le.useState)(!1),In=(0,le.useRef)([]),[er,ar]=(0,le.useState)(!1),[fr,Jn]=(0,le.useState)(!1),Kn=(0,le.useRef)(!0),[$n,dr]=(0,le.useState)({});(0,le.useEffect)(()=>((0,Se.getDvaApp)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!1}),(0,Se.getDvaApp)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!0}),()=>{(0,Se.getDvaApp)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!0}),(0,Se.getDvaApp)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!1})}),[]),(0,le.useEffect)(()=>{setTimeout(()=>{document.title="\u5728\u7EBF\u5237\u9898"},400)});const Tr=()=>Qt(void 0,null,function*(){const ir=yield(0,Ae.ZP)("/api/tag_disciplines.json",{method:"get",params:{target:"practice"}}),Qn=yield(0,Ae.ZP)("/api/tag_disciplines.json",{method:"get",params:{target:"practice_source"}});An(ir.tag_disciplines||[]),wr(Qn.tag_disciplines||[])});var Cr=[{language:"C",code:""},{language:"C++",code:""},{language:"Java",code:""},{language:"Python",code:""}];const Or=(0,le.useCallback)(()=>Qt(void 0,null,function*(){if(Zt({type:1,payload:!0}),Pn){const ir=yield He(Pn),{user:Qn,language:gr,practice_sets:Xn,practice_codes:bn,description:kn,difficulty:Ln,name:jn,open_or_not:tr,time_limit:ur,test_set_average:Nn,test_set_score:Sn,status:Un,tag_discipline_ids:rr,source_discipline_ids:Gr,item_banks_group_id:wi,is_file:ci=!1,hide_actual_output:ji,review_privilege:Ci,review_description:Si,submit_rule:Ni}=ir;dr({review_privilege:Ci,status:Un,review_description:Si,name:jn}),mn(ji);const Pi=ci?[{input:"",output:"",score:100,position:1}]:Xn;ci?(cr(Xn),Hn.setFieldsValue({hack_sets:Pi})):cr([]),Zt({type:0,payload:{loading:!0,user:Qn,status:Un,data:{hack:{difficulty:Ln,name:jn,description:kn,open_or_not:tr,time_limit:ur,test_set_average:Nn,test_set_score:Sn,tag_discipline_ids:rr,source_discipline_ids:Gr,is_file:ci,submit_rule:Ni},hack_sets:Pi}}}),_n({hack:{difficulty:Ln,name:jn,description:kn,open_or_not:tr,time_limit:ur,test_set_average:Nn,test_set_score:Sn,tag_discipline_ids:rr,source_discipline_ids:Gr,is_file:ci}});const vo=bn==null?void 0:bn.map(go=>Ht(jt({},go),{code:Ee.Base64.decode(go==null?void 0:go.code)}));Dt(vo),In.current=vo}else{const{user:ir}=yield Ue();Zt({type:0,payload:{loading:!0,status:0,user:ir,data:{hack:{difficulty:"",time_limit:3,description:Dn,test_set_score:!0,test_set_average:!0,open_or_not:!0,name:"",is_file:!1,submit_rule:1},hack_sets:[{input:"",output:"",score:100,position:1}]}}}),_n({hack:{difficulty:"",time_limit:3,description:"",test_set_average:!0,open_or_not:!0,name:"",is_file:!1}}),Dt(Cr),In.current=Cr}Zt({type:1,payload:!1})}),[Pn]);(0,le.useEffect)(()=>{try{Or(),Tr()}catch(ir){console.log(ir,"----")}},[]);function Vn(ir,Qn){return Qt(this,null,function*(){var gr;const{hack_sets:Xn,hack:bn}=jt({},ir);bn.hide_actual_output=hn;let kn=[],Ln=[],jn=0;const tr=bn!=null&&bn.is_file?yr.map((Sn,Un)=>Ht(jt({},Sn),{position:Un+1})):Xn.map(Sn=>Ht(jt({},Sn),{is_file:!1}));for(let Sn of tr)jn+=Sn.score,Sn.id&&Sn.id>=0?kn.push(Sn):Ln.push(Sn);if(!(tr!=null&&tr.length)){z.ZP.error("\u6D4B\u8BD5\u96C6\u4E0D\u80FD\u4E3A\u7A7A");return}if(jn!==100&&!bn.test_set_score){z.ZP.error("\u6D4B\u8BD5\u96C6\u7684\u8BC4\u5206\u5360\u6BD4\u4E4B\u548C\u5FC5\u987B\u7B49\u4E8E100");return}if(tr!=null&&tr.some(Sn=>!Sn.output)){z.ZP.error("\u6D4B\u8BD5\u96C6\u8F93\u51FA\u4E0D\u80FD\u4E3A\u7A7A");return}Kn.current?ar(!0):Jn(!0);let ur;const Nn=Et==null?void 0:Et.map(Sn=>Ht(jt({},Sn),{code:Ee.Base64.encode(Sn==null?void 0:Sn.code)}));if(Pn?ur=yield Je(Pn,{practice:bn,practice_codes:Nn,practice_sets:Ln,update_practice_sets:kn}):ur=yield Pe({practice:bn,practice_codes:Nn,practice_sets:tr,publish:!Kn.current}),ar(!1),Jn(!1),(ur==null?void 0:ur.status)===0){if((gr=ur==null?void 0:ur.similar_practice)!=null&&gr.length){Wn(!0),Xt(ur==null?void 0:ur.similar_practice);return}if(Pn){if(z.ZP.success("\u4FDD\u5B58\u6210\u529F"),!Kn.current){const Sn=yield(0,Ae.ZP)(`/api/practices/${Pn}/start`,{method:"get"});(Sn==null?void 0:Sn.status)===0&&Se.history.push(`/problems/${Sn==null?void 0:Sn.identifier}/oj/${Pn}`)}}else z.ZP.success("\u65B0\u5EFA\u6210\u529F"),Se.history.replace(`/problems/${ur==null?void 0:ur.identifier}/ojedit`)}})}function xr(){Se.history.replace("/problems")}const hr=ir=>{const Qn=Math.floor(100/ir.length),gr=Qn+100%ir.length;ir=ir.map((Xn,bn)=>bn===ir.length-1?Ht(jt({},Xn),{score:gr}):Ht(jt({},Xn),{score:Qn})),cr(ir)};function Hr(ir){ir.target.value||hr(yr),Zt({type:0,payload:{data:Ht(jt({},Yt),{hack:Ht(jt({},Yt.hack),{test_set_score:ir.target.value})})}})}function Xr(ir){Zt({type:0,payload:{data:Ht(jt({},Yt),{hack:Ht(jt({},Yt.hack),{is_file:ir.target.value})})}})}function Ur(ir){mn(ir.target.checked)}function Kr(ir){const Qn=ir.target.value;Qn&&hr(yr),Zt({type:0,payload:{data:Ht(jt({},Yt),{hack:Ht(jt({},Yt.hack),{test_set_average:Qn})})}})}function ri(){let ir=Hn.getFieldValue("hack_sets");const Qn=ir.length+1,gr=Math.floor(100/Qn),Xn=100%Qn;ir.map((bn,kn)=>(Wt&&(bn.score=gr),bn.position=kn+1,bn)),ir.push({input:"",output:"",position:Qn,score:Wt?gr+Xn:0}),Hn.setFieldsValue({hack_sets:ir}),Zt({type:0,payload:{data:Ht(jt({},Yt),{hack_sets:ir})}})}(0,le.useEffect)(()=>{if(Wt){const ir=zt==null?void 0:zt.length,Qn=Math.floor(100/ir),gr=100%ir;zt==null||zt.map((Xn,bn)=>(Xn.score=Qn,Xn.position=bn+1,bn===ir-1&&(Xn.score=Qn+gr),Xn)),Zt({type:0,payload:{data:Ht(jt({},Yt),{hack_sets:zt})}}),Hn.setFieldsValue({hack_sets:zt})}},[Wt]);function Fr(ir){let Qn=Hn.getFieldValue("hack_sets");const gr=(Qn==null?void 0:Qn.length)-1,Xn=Math.ceil(100/gr),bn=100%gr;Qn.splice(ir,1),Qn==null||Qn.map((kn,Ln)=>(Wt&&(kn.score=Xn,Ln===gr-1&&(kn.score=Xn+bn)),kn.position=Ln+1,kn)),Zt({type:0,payload:{data:Ht(jt({},Yt),{hack_sets:Qn})}}),Hn.setFieldsValue({hack_sets:Qn})}function qr(ir){_t(ir)}const Pr=ir=>{var Qn;const gr=(Qn=In.current)==null?void 0:Qn.findIndex(Xn=>Xn.language===Tt);In.current[gr].code=ir,Dt(In.current)},ei=ir=>{_n(jt({},Hn.getFieldsValue()))},ui=ir=>Qt(void 0,null,function*(){const Qn=yield(0,Ae.ZP)(`/api/practices/${ir}/start`,{method:"get"});(Qn==null?void 0:Qn.status)===0&&(0,wt.xg)(`/problems/${Qn==null?void 0:Qn.identifier}/oj/${ir}`)}),ki=()=>Qt(void 0,null,function*(){const ir=yield He(Pn),{name:Qn,status:gr,review_privilege:Xn,review_description:bn}=ir;dr({review_privilege:Xn,status:gr,review_description:bn,name:Qn})}),mi=()=>{let ir="";Te.default.confirm({icon:null,width:700,className:"custom-modal-divider",centered:!0,title:"\u4E0D\u901A\u8FC7\u539F\u56E0",content:pt.createElement("div",{className:"mt20"},pt.createElement(Le.Z,{className:yt.MdEditor,defaultValue:ir,onChange:Qn=>{ir=Qn}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>Qt(void 0,null,function*(){if(!ir)return z.ZP.warning("\u4E0D\u901A\u8FC7\u539F\u56E0\u4E0D\u80FD\u4E3A\u7A7A"),Promise.reject();const Qn=yield(0,Ae.ZP)(`/api/practices/${Pn}/review.json`,{method:"post",body:{op:"fail",description:ir}});(Qn==null?void 0:Qn.status)===0&&(z.ZP.success("\u63D0\u4EA4\u6210\u529F"),ki())})})},xi=()=>Qt(void 0,null,function*(){Te.default.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u63D0\u793A",content:`\u786E\u8BA4\u5C06\u9898\u76EE\u300A${$n==null?void 0:$n.name}\u300B\u7684\u5BA1\u6838\u901A\u8FC7\u5417\uFF1F`,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>Qt(void 0,null,function*(){const ir=yield(0,Ae.ZP)(`/api/practices/${Pn}/review.json`,{method:"post",body:{op:"pass"}});(ir==null?void 0:ir.status)===0&&(z.ZP.success("\u63D0\u4EA4\u6210\u529F"),ki())})})}),hi=()=>{const ir=Te.default.confirm({icon:null,width:700,className:`${yt.cusModal} custom-modal-divider`,centered:!0,title:pt.createElement(ie.Z,null,pt.createElement(oe.Z,{flex:"1"},"\u4E0D\u901A\u8FC7\u539F\u56E0"),pt.createElement(oe.Z,null,pt.createElement("span",{className:"iconfont icon-guanbi7 font12 current c-grey-c",onClick:()=>ir.destroy()}))),content:pt.createElement("div",null,pt.createElement(Bt.Z,{className:"mt20",value:($n==null?void 0:$n.review_description)||""}))})};return pt.createElement(ee.Z,{spinning:Kt,size:"large",className:yt["oj-custom-large-spin"]},Yt?pt.createElement(le.Fragment,null,pt.createElement("header",{className:yt.header},pt.createElement("div",null,pt.createElement("img",{src:`${mt.Z.IMG_SERVER}/images/${Ft==null?void 0:Ft.image_url}`,alt:"user",width:30}),pt.createElement("span",null,Ft==null?void 0:Ft.name)),pt.createElement("h2",null," ",(tn=Yt==null?void 0:Yt.hack)==null?void 0:tn.name," "),Pn?pt.createElement("a",{className:yt.btn_back,onClick:xr}," ",pt.createElement(Ie.Z,null),"\u9000\u51FA"):null),pt.createElement(x.default,{form:Hn,initialValues:Yt,layout:"vertical",className:yt["oj-form-container"],onValuesChange:ei,onFinish:Vn},pt.createElement(Ke.Z,{hideResize:!0,className:yt["oj-problems"],leftChild:pt.createElement(Mn,{formValue:Gn,onRemoveTestCase:Fr,onAddTestCase:ri,hack:Yt.hack,onChangeScore:Hr,onChangehide:Ur,onChangeAverage:Kr,onChangeFile:Xr,uploadData:yr,setUploadData:cr,handleUploadRatio:hr,ischecked:hn,pointData:cn,sourceData:qn,getPointData:Tr}),rightChild:pt.createElement(ye,{value:(dn=Et==null?void 0:Et.find(ir=>ir.language===Tt))==null?void 0:dn.code,onChange:Pr,onLanguage:qr,languageItems:Et,language:Tt})}),pt.createElement("div",{className:yt.footer},!!Pn&&pt.createElement("div",{className:yt.result},pt.createElement("span",null,"\u5BA1\u6838\u7ED3\u679C:"),$n!=null&&$n.review_privilege?pt.createElement(pt.Fragment,null,pt.createElement("div",{onClick:xi,className:yt.pass},"\u901A\u8FC7"),pt.createElement("div",{onClick:mi,className:yt.noPass},"\u4E0D\u901A\u8FC7")):pt.createElement(pt.Fragment,null,($n==null?void 0:$n.status)===0&&pt.createElement("div",{className:yt.passText},pt.createElement("i",{className:"iconfont icon-tongguo"}),"\u672A\u53D1\u5E03"),($n==null?void 0:$n.status)===1&&pt.createElement("div",{className:yt.passText},pt.createElement("i",{className:"iconfont icon-tongguo"}),"\u5DF2\u516C\u5F00"),($n==null?void 0:$n.status)===2&&pt.createElement("div",{className:yt.passText},pt.createElement("i",{className:"iconfont icon-tongguo"}),"\u672A\u5BA1\u6279"),($n==null?void 0:$n.status)===3&&pt.createElement("div",{className:yt.passText},pt.createElement("i",{className:"iconfont icon-tongguo"}),"\u5BA1\u6838\u4E2D"),($n==null?void 0:$n.status)===4&&pt.createElement("div",{className:yt.passText},pt.createElement("i",{className:"iconfont icon-tongguo"}),"\u5BA1\u6838\u5B8C\u6210\u5F85\u516C\u5F00"),($n==null?void 0:$n.status)===5&&pt.createElement("div",{className:yt.noPassText},pt.createElement("i",{className:"iconfont icon-weitongguo1"}),"\u5BA1\u6838\u4E0D\u901A\u8FC7",pt.createElement("span",{onClick:hi},"\u67E5\u770B\u539F\u56E0")))),pt.createElement(ue.ZP,{type:"primary",ghost:!0,onClick:xr},"\u9000\u51FA\u7F16\u8F91"),pt.createElement(ue.ZP,{disabled:fr,loading:er,type:"primary",onClick:()=>{Kn.current=!0,Hn.submit()}},"\u4FDD\u5B58 "),Pn?pt.createElement(ue.ZP,{disabled:er,loading:fr,style:{background:"#2FC25B",border:0},type:"primary",onClick:()=>{Kn.current=!1,Hn.submit()}},"\u7ACB\u5373\u4F53\u9A8C"):pt.createElement(ue.ZP,{disabled:er,loading:fr,type:"primary",onClick:()=>{Kn.current=!1,Hn.submit()}},"\u4FDD\u5B58\u5E76\u53D1\u5E03\u5BA1\u6838")))):null,pt.createElement(Te.default,{centered:!0,destroyOnClose:!0,footer:null,open:Yn,onCancel:()=>Wn(!1),title:"\u76F8\u4F3C\u6027\u68C0\u6D4B",width:"600px"},pt.createElement("div",null,pt.createElement("p",{className:"font14"},"\u7ECF\u7CFB\u7EDF\u68C0\u6D4B\u53D1\u73B0\uFF0C\u672C\u9898\u76EE\u4E0E\u7CFB\u7EDF\u4E2D\u5DF2\u521B\u5EFA\u7684\u9898\u76EE\u9AD8\u5EA6\u96F7\u540C\uFF0C\u8BF7\u8C03\u6574\u9898\u76EE\u540E\u518D\u8FDB\u884C\u4FDD\u5B58"),pt.createElement(E.default,{dataSource:Rt,bordered:!1,scroll:Rt.length>7?{y:300}:{},columns:[{title:"\u76F8\u4F3C\u9898\u9898\u76EE",dataIndex:"name",ellipsis:!0,render:(ir,Qn)=>pt.createElement("span",{onClick:()=>ui(Qn==null?void 0:Qn.identifier),style:{textDecorationLine:"underline"},className:"current c-light-primary"},ir)},{title:"\u521B\u5EFA\u65F6\u95F4",dataIndex:"create_time",width:170,render:ir=>{var Qn;return(Qn=Pt()(ir))==null?void 0:Qn.format("YYYY-MM-DD HH:mm")}}],pagination:!1}))))};function Mn({ischecked:nn,formValue:tn,hack:dn,onChangeAverage:Cn,onChangeScore:Pn,onChangehide:Hn,onChangeFile:Gn,onAddTestCase:_n,onRemoveTestCase:Yn,uploadData:Wn,setUploadData:yr,handleUploadRatio:cr,pointData:cn,sourceData:An,getPointData:qn}){var wr,Rt;const{test_set_average:Xt,test_set_score:Et}=dn,[Dt,Tt]=(0,le.useState)(!1),[_t,bt]=(0,le.useState)(!1),Zt=(Wt,hn)=>{const mn=[...Wn];mn.splice(hn,1),Xt?cr(mn):yr(mn)},Kt=(Wt,hn)=>{console.log(Wt,hn);const mn=Wn.map((In,er)=>er===hn?Ht(jt({},In),{score:Wt.target.value?Number(Wt.target.value):0}):In);yr(mn)},Yt=Wt=>{const hn=Wn.concat(Wt);dn.test_set_average?cr(hn):yr(hn)};function Ft(Wt){Wt.stopPropagation()}function $t(){if((0,At.Ny)()){bt("practice");return}let Wt="";Te.default.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u65B0\u5EFA\u77E5\u8BC6\u70B9",content:pt.createElement("div",null,pt.createElement(a.default,{placeholder:"\u8BF7\u8F93\u5165\u77E5\u8BC6\u70B9\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57",maxLength:20,onChange:hn=>{Wt=hn.target.value}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>Qt(this,null,function*(){const hn=yield(0,Ae.ZP)("/api/tag_disciplines.json",{method:"post",body:{target:"practice",name:Wt}});(hn==null?void 0:hn.status)===0&&qn()})})}function zt(){if((0,At.Ny)()){bt("practice_source");return}let Wt="";Te.default.confirm({icon:null,className:"custom-modal-divider",centered:!0,title:"\u65B0\u5EFA\u6765\u6E90",content:pt.createElement("div",null,pt.createElement(a.default,{placeholder:"\u8BF7\u8F93\u5165\u6765\u6E90\u540D\u79F0\uFF0C\u4E0D\u8D85\u8FC720\u4E2A\u5B57",maxLength:20,onChange:hn=>{Wt=hn.target.value}})),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>Qt(this,null,function*(){const hn=yield(0,Ae.ZP)("/api/tag_disciplines.json",{method:"post",body:{target:"practice_source",name:Wt}});(hn==null?void 0:hn.status)===0&&qn()})})}return pt.createElement("div",{className:yt["oj-left-panel"]},pt.createElement("div",{className:yt["oj-form-info"]},pt.createElement(x.default.Item,{label:"\u9898\u76EE\u540D\u79F0",name:["hack","name"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u9898\u76EE\u540D\u79F0"}],className:yt.inputOne},pt.createElement(a.default,{bordered:!1,maxLength:60,placeholder:"\u8BF7\u8F93\u5165\u9898\u76EE\u540D\u79F0",suffix:pt.createElement("span",null,((Rt=(wr=tn==null?void 0:tn.hack)==null?void 0:wr.name)==null?void 0:Rt.length)||0,"/",pt.createElement("span",{className:"c-grey-999"},"60"))})),pt.createElement(x.default.Item,{name:["hack","description"],valuePropName:"defaultValue",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u63CF\u8FF0\u5185\u5BB9"}]},pt.createElement(Le.Z,{placeholder:"\u8BF7\u8F93\u5165\u9898\u76EE\u63CF\u8FF0\u2026",miniToolbar:!0,id:"moop_cases_content",noStorage:!0,height:200})),pt.createElement("div",{className:yt.row},pt.createElement("div",{className:yt.a},pt.createElement(x.default.Item,{label:"\u96BE\u6613\u5EA6",name:["hack","difficulty"],rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u96BE\u6613\u5EA6"}]},pt.createElement(re.default,null,ke(be.difficulty)))),pt.createElement("div",{className:yt.b},pt.createElement(x.default.Item,{label:"\u9898\u76EE\u6765\u6E90",name:["hack","source_discipline_ids"]},pt.createElement(re.default,{placeholder:"\u9009\u62E9\u9898\u76EE\u6765\u6E90",showSearch:!1,mode:"multiple",showArrow:!0,getPopupContainer:Wt=>Wt.parentNode},An.map(Wt=>pt.createElement(re.default.Option,{key:Wt.id,value:Wt.id},Wt.name)))),pt.createElement(ue.ZP,{style:{padding:"0 18px"},type:"primary",ghost:!0,onClick:()=>zt()},(0,At.Ny)()?"\u6765\u6E90\u7BA1\u7406":"\u65B0\u5EFA\u6765\u6E90"))),pt.createElement("div",{className:yt.row},pt.createElement("div",{className:yt.b,style:{width:"100%",marginLeft:0}},pt.createElement(x.default.Item,{label:"\u77E5\u8BC6\u70B9",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u77E5\u8BC6\u70B9"}],name:["hack","tag_discipline_ids"]},pt.createElement(re.default,{placeholder:"\u9009\u62E9\u77E5\u8BC6\u70B9",showSearch:!1,mode:"multiple",showArrow:!0,getPopupContainer:Wt=>Wt.parentNode},cn.map(Wt=>pt.createElement(re.default.Option,{key:Wt.id,value:Wt.id},Wt.name)))),pt.createElement(ue.ZP,{type:"primary",ghost:!0,onClick:()=>$t()},(0,At.Ny)()?"\u77E5\u8BC6\u70B9\u7BA1\u7406":"\u65B0\u5EFA\u77E5\u8BC6\u70B9"))),pt.createElement("div",{className:yt.field},pt.createElement(x.default.Item,{label:"\u5355\u4E2A\u6D4B\u8BD5\u96C6\u8BC4\u6D4B\u65F6\u957F\u9650\u5236",name:["hack","time_limit"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5355\u4E2A\u6D4B\u8BD5\u96C6\u8BC4\u6D4B\u65F6\u957F\u9650\u5236"},{type:"number",min:1,message:"\u6700\u5C0F\u9650\u5236\u65F6\u95F4\u662F1\u79D2"}],className:yt.inputTwo,extra:pt.createElement("span",{style:{position:"absolute",left:200,top:11,color:"#333"}},"\u79D2",pt.createElement("span",{className:"ml5 c-grey-999"},"(\u4EE3\u7801\u6267\u884C\u6240\u5141\u8BB8\u7684\u6700\u5927\u65F6\u957F)"))},pt.createElement(te.Z,{style:{width:185},min:1}))),pt.createElement("div",{className:"tst-case-info"},pt.createElement("h3",{className:"flex-container",style:{justifyContent:"space-between"}}," ","\u6D4B\u8BD5\u7528\u4F8B\u4E0E\u7CFB\u7EDF\u8BC4\u5206\u89C4\u5219",!dn.is_file&&pt.createElement(ue.ZP,{style:{height:40},type:"primary",ghost:!0,onClick:_n},"\u6DFB\u52A0\u6D4B\u8BD5\u7528\u4F8B")),pt.createElement(x.default.Item,{name:["hack","test_set_score"]},pt.createElement(se.ZP.Group,{onChange:Pn},pt.createElement(se.ZP,{value:!0},"\u901A\u8FC7\u5168\u90E8\u6D4B\u8BD5\u96C6",pt.createElement("span",{className:"tip"}," ","\uFF08\u5B66\u5458\u8BC4\u6D4B\uFF0C\u4EC5\u5F53\u6240\u6709\u6D4B\u8BD5\u96C6\u90FD\u6B63\u786E\u65F6\uFF0C\u624D\u83B7\u5F97\u4E00\u6B21\u6027\u5956\u52B1\uFF09")),pt.createElement(se.ZP,{value:!1},"\u901A\u8FC7\u90E8\u5206\u6D4B\u8BD5\u96C6",pt.createElement("span",{className:"tip"}," ","\uFF08\u5B66\u5458\u8BC4\u6D4B\uFF0C\u901A\u8FC7\u6D4B\u8BD5\u96C6\u5373\u53EF\u83B7\u5F97\u5BF9\u5E94\u5956\u52B1\uFF09")))),pt.createElement(ae.default,{style:{marginBottom:"5px"},checked:nn,onChange:Hn},"\u9690\u85CF\u5B9E\u9645\u8F93\u51FA \uFF08\u9009\u4E2D\uFF0C\u5219\u5728\u5B66\u751F\u505A\u9898\u8FC7\u7A0B\u4E2D\u65E0\u6CD5\u770B\u5230\u5B9E\u9645\u8F93\u51FA\u7ED3\u679C\uFF0C\u4EC5\u5C55\u793A\u662F\u5426\u8BC4\u6D4B\u662F\u5426\u901A\u8FC7\uFF09"),pt.createElement(x.default.Item,{className:yt.testJi,name:["hack","is_file"],label:"\u7528\u4F8B\u7C7B\u578B:"},pt.createElement(se.ZP.Group,{onChange:Gn},pt.createElement(he.Z,{direction:"horizontal"},pt.createElement(se.ZP,{value:!1},"\u6587\u672C"),pt.createElement(se.ZP,{value:!0},"\u6587\u4EF6")))),pt.createElement(x.default.Item,{label:"\u8BC4\u6D4B\u65F6\u7A7A\u683C\u5904\u7406",name:["hack","submit_rule"],rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u8BC4\u6D4B\u65F6\u7A7A\u683C\u5904\u7406"}]},pt.createElement(se.ZP.Group,null,pt.createElement(se.ZP,{value:0},"\u4E0D\u5FFD\u7565\u7A7A\u683C"),pt.createElement(se.ZP,{value:1},"\u5FFD\u7565\u9996\u5C3E\u7A7A\u683C"),pt.createElement(se.ZP,{value:2},"\u5FFD\u7565\u6240\u6709\u7A7A\u683C"),pt.createElement(se.ZP,{value:3},"\u5FFD\u7565\u6BCF\u884C\u9996\u5C3E\u7A7A\u683C"))),!dn.test_set_score&&pt.createElement(x.default.Item,{name:["hack","test_set_average"],label:"\u7CFB\u7EDF\u8BC4\u5206\u5360\u6BD4"},pt.createElement(se.ZP.Group,{onChange:Cn},pt.createElement(se.ZP,{value:!0},"\u5747\u5206\u6BD4\u4F8B"),pt.createElement(se.ZP,{value:!1},"\u81EA\u5B9A\u4E49\u6BD4\u4F8B"))),dn.is_file&&pt.createElement("div",{className:yt.upBtn},pt.createElement(ue.ZP,{ghost:!0,type:"primary",className:"mb20",onClick:()=>Tt(!0)},"\u6279\u91CF\u4E0A\u4F20\u6D4B\u8BD5\u7528\u4F8B"),pt.createElement(ut.Y2,{disabled:dn==null?void 0:dn.test_set_average,inputChange:Kt,showScore:!dn.test_set_score,data:Wn,onRemove:Zt})),!dn.is_file&&pt.createElement(x.default.List,{name:"hack_sets"},(Wt,{})=>pt.createElement(ge.default,{accordion:!0},Wt.map((hn,mn)=>pt.createElement(Bn,{key:`${hn.key}--${mn}`,header:pt.createElement("a",{className:yt["test-case-name"]},pt.createElement("span",null,"\u6D4B\u8BD5\u7528\u4F8B",mn+1),Et?null:pt.createElement(pt.Fragment,null,pt.createElement(x.default.Item,{name:[hn.name,"score"],fieldKey:[hn.fieldKey,"score"],rules:[{required:!0,message:`\u8BF7\u8F93\u5165\u6D4B\u8BD5\u96C6${mn+1}\u8BC4\u5206`}]},pt.createElement(te.Z,{onClick:Ft,min:0,max:100,disabled:Xt})),pt.createElement("span",null,"%"))),extra:mn>0?pt.createElement("div",{onClick:Ft},pt.createElement(me.Z,{okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u786E\u5B9A\u5220\u9664\u6D4B\u8BD5\u96C6\b"+(mn+1),onConfirm:()=>{Yn(mn)}},pt.createElement(Me.Z,{className:yt["btn-remove-case"]}))):null},pt.createElement(x.default.Item,{label:"\u8F93\u5165",name:[hn.name,"input"],fieldKey:[hn.fieldKey,"input"]},pt.createElement(sn,null)),pt.createElement(x.default.Item,{label:"\u8F93\u51FA",name:[hn.name,"output"],fieldKey:[hn.fieldKey,"output"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8F93\u51FA\u5185\u5BB9"}]},pt.createElement(sn,null)))))))),pt.createElement(ut.ZP,{rootIdentifier:null,visible:Dt,onClose:()=>Tt(!1),onOK:Yt}),pt.createElement(lt,{visible:_t,onCancel:()=>{bt(!1),qn()},onOK:()=>{bt(!1),qn()}}))}},55178:function(on,Lt,Ce){"use strict";Ce.d(Lt,{Y2:function(){return He},ZP:function(){return Je}});var le=Ce(59301),yt=Ce(94968),a=Ce(6767),Te=Ce(62957),ge=Ce(77019),x=Ce(47889),z=Ce(7939),ie=Ce(62673),oe=Ce(25399),ee=Ce(37568),ue={wrap:"wrap___MkYbQ",colorBlue:"colorBlue___onjbP",repeatedName:"repeatedName___nbqnE",text:"text___xvutp",greyText:"greyText___dihvZ",noData:"noData___LxOJA",dragger:"dragger___y7F4A",uploadText:"uploadText___Et3KS",btnS:"btnS___k1e6j",testCaseRadio:"testCaseRadio___q1wXT",head:"head___s4Eix",operation:"operation___JCAVh",headProgram:"headProgram___uWA_M",listWrapper:"listWrapper___xW3b4",list:"list___dCbd6",del:"del___abNho",info:"info___J1Wmf"},E="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAATEAAADICAYAAACAj9YNAAAAAXNSR0IArs4c6QAAD59JREFUeF7tnet527gShsFUZFeQpJN1GkncyG46iVJBVFG4D6mLKYmSMLgQM4NXf855NrgMvm/8egBC9BD4oIBhBV7++fPlHP6n8PH/p/84Dp8XS7v8txB2N8sext/h7+G/73++3v67YZ08hz54Xhxr86fAy7c/P+ZVHQB1DaYaCz7AbBzfgVsNefPHBGL5GjJCRQUW0PpecRrp0DugJpWsXnsgVk9bRk5QQCm0nq1khhpb0Gcy1fl3IFZHV0YVKDCfa03nWeOgqdoSrODc9Lz1BGgp8qX1AWJputGrgAJz1bXd2VaBiEVDUJ2J5EpvDMTStaNnogJHeFmvuiSrB2gStYRtgZhQMJqnKWD0rCttsfd7AbPSioYQgFgFURnyQwHnW8ZUq4FZqnIr/YBYQTEZ6lKBDreNshQYxvf9v6+He298khUAYsnS0fGeAsBLmBvj+JWnmULNFs2BWLp29LxSYL4qMczXJLa4Se9Nf7aYiY4CsUTh6MbWsUoOsMUUywrExJLRYakAW8cq+UBVJpAViAnEoinV16Y5QFUWJTcQi5KJRtcKUIFtlBOA7KnQQOypRDS42D5yeN8iIdhePlAdiLVISaNzUn01No6rGKsGALHGeWllegCmxCm2lzdGADEluak5DACmzB1AdmEIEFOWn9rCAWDaHDnGA8jOxgAxpTmqIayXt/0vbt9rcOJODIBsFgaIKc7RlqFRgbVUXzA3IANignTppikAM2Z15yCjEjOWr7XDBWC1Fa40fscgA2KVcsrisADMomuLmDsFGRAznrelwj++Rmc6yOdjWYEOL8QCMcsJWyh2AFZISCXD7P976ernuqvFKskxVWEAMFV2lAmms20lECuTNmZH4S6YWeseB94RyICY0xyOWRYH+TEqGW7TCciAmOEczQmdbWSOenb69nA+BsTs5GPRSNlGFpVT72AdVGNATG/6VYuMbWQ1aXUO7BxkQExn2lWN6uVtP1adgMHVKeB5WwnE1KVb3YDYRtbVV+3ojqsxIKY268oHxmF+eU0tjei1GgNilrIwM1a2kZkCWu/utBoDYtYTMzJ+tpGRQnlv5hBkQMx70h7XRxXWidHPl7nb//fy9XkzOy2AmB2vkiPlSkWydD47OqvGgJjPNL1YFVVYByZLlgjEJGrRtrUCPJFs7YDS+R2BjEpMSY7NsDl+9j9fd6XC4kC/lJLOxgFizgzdYDnzudTpMw6fj//3DK4HIRyANoy/w9+wkwCOKmwDYy1P4QRkVGIVk/AMrnH4XniaXQzUqMIKq+5tOCDmzdH89cyVz6fwJRwqrZgqK3/SEFaBRhVWQlr/Y3i4xU8lVihPlVxj2IVxfJ+2nFRhhYz1PoyDagyIZSapEnhdr2I6R9uqEsxUkO5NFQBiTeVvOrlSeDXVhMltKmB9S0klJsw74CUUjOb6FTBejQExQYoBMIFYNLWkgOnvUwKxyFTjoDxSKJqZVMDylhKIPUk5riqY/JkkaKkChreUQOyB2WwfpT8JtDerABAza93dwAGYP09Z0WMFrG4pqcRWfGULyY97jwoAMSeuAzAnRrIMuQJGt5RUYldW8xRSnvv0cKIAELNvJACz7yEryFLA5H0xKrGj5xzkZyU/nZ0oYPFcDIiFEDgHc/ITyDKyFQBi2RK2GYBtZBvdmVWhAuP4VfL2YA0r6L4SYxupIQ2JQY0CBg/3gdjbflSTQASCAq0VAGKtHZDNTxUm04vWHSgAxOyYzGG+Ha+IdFMFzF2z6HY7yWH+pj8YTGZHASBmwSuqMAsuEWMjBYBYI+FF0wIxkVw07kwBa3fFutxOspXs7KeS5YoUAGIiudo0fuFaRRvhmdWEAkBMuU1sJZUbRHjNFQBizS14HABbSeUGEV5zBYBYcwueQowb+so9Iry2CgCxtvo/nJ2tpGJzCE2NAkBMjRW3gQAxxeYQmhoFgJgaK1Yg9u3PjzAO3xWHSGgo0FoBLru2duDR/HzhW7M7xKZEASCmxIjVMHgyqdkdYlOiABBTYgQQ02wEsWlWAIhpdodKTLM7xKZCAd4npsKGu0HwdSPd/hCdAgV4x35bE+YrFNPnUzj87/IzDp9DWPnvbUNmdhTQpQAQ286P+Unj9DnAafrcgmu7cJgJBVwoYO2O2CS6mVfxXEELYLn4kWERShXYhXF8t/Kn21RDbAEuLqgqzXbCcq+AeqCpgxjgcv9DwQLtKqASaGogxm16u5lN5B0qoOgqRnOIAa8OfwBYshcFVFRmzSAGvLzkMetAgdAUZptD7Agv7myR+SjgT4EmMNsUYlRf/rKWFaHAigKbwmwTiAEvEh0FOlRgo8P/6hADYB0mL0tGgZMCG4CsGsSOr4KeLqlyu56URoG+Fai6vawCMaqvvjOW1aPAqgKVqrLiEANgJDAKoMBdBSqArCjEABjJiwIoEKFA0bfHFoMYAIuwjiYogAInBYqBrAjEeO0zmYkCKJCgQBGQZUMMgCVYRxcUQIFiFVkWxNhCkokogALZCmQe9idDDIBlW8cAKIACJwUyQJYEMQBG7qEAChRXIBFkYogdb+L/Kr4ABkQBFECBBJDJIfa2H1EaBVAABaopIASZCGI8iaxmGwOjAAosFJD86bhoiHEORo6hAApspoCgGouCGOdgm1nHRCiAAsInlnEQe9tPB/m8Uof0kiswjO/hb9jNHYeBVzPJFey6R8y28inE2EZ2nUM5i1/9Sgn5lCNph30jtpUPIcY2ssOkKbTkR79BAVkhkXsZ5gnIHkOMbWQvaVJ2neP4df/z9bCFvPMBZGUl9z7ao1+KdyFGFeY9LSqtLwJgp5m5slPJA4/DPqjG7kOMKsxjKtRdU8T5xXUAL1yeruuJo9HvVWOrEKMKc+T8VktJANgUGrm2lUEO5rmTY+sQowpz4PiGS0gE2Hlb+c+fL2EY+D7uhpaZnCoWYvxmNGlvu6AzAXYG2bc/P8I43yPjgwL3FVjJt5tKjMNWMkigQJHXCwMygeK9N42EGG+p6D1R4tZfFGCALE50WoVwfcB/UYmxlSRFohUQXKWIHvPYkDtkUsU6a39VjV1CjAP9zrIhcbkVAXauyMjFRHP66Lasxq4hxlayjxxIX+UGAANk6fZ003ORh2eIsZXsxv70hRZ6EikJgMuwErU6arvIxQ+IUb53lAEJS20AsClKfrkmeNVHl/ODpSXE2Er2Yb58lY0AxhNLuVU99Tidi80Q47ddT9aL11rlKoU0Cp5YShXroP3xlysQ68DrjCWqABgVWYaDnrteQIzzMM9Wp65NFcAAWaqNrvvNOXqoxICYa6eTFrfhVQppfGwtpYr5bT+di50gxqG+X5/lK1MMsHNFxi9eua8eewzj+8ChvkdnM9bU+EmkJHJ2EBK1nLYFYk6NTV2WIYDNxyC8hyzVaT/9ZojxHic/huasxBjAzttKQJbjuv2+M8Q4W7BvZO4KjAKMJ5a5xrvovwNiLnzMWoTKqxTSFbGjkCrmpj0Qc2Nl2kJcAIyKLM18L72oxLw4mbIOA1cppMuiIpMqZr/9BDHuiNn3Ub4ChwCjIpOngYceQMyDi9I1OAbYGWQ8sJJmhdn2QMysdYmBG38SKVk1uwyJWnbbAjG73skj7whgkzhchpWniMUeQMyiaykxdwaw87aSy7Ap2WKqD08nTdmVHKyrqxRSFXhiKVXMVnsgZsuvlGi7BhhPLFNSxlYfIGbLL2m0AGyhGBWZNH1stAdiNnxKi7KDqxRSYQCZVDH97XmLhX6P0iIEYHd146UHaSmltNcOiCl1JissAPZUPkD2VCIrDXa82dWKVbFxdnqVIlaeZTsuw6aopqzP9D6xKSTMVGZMajgATKQcl2FFculsPI7nv3bEl8B1WiSJiieRErWObTnoTxBNU5cFxH6FEL5oio1YhApwDiYU7KM5IEuWrnnHjz/Zxnv2m5uRGQBVWIaAQCxDvLZdF388l++XtbWiwOzTb6QCw3Q5BBAzavvxDPic+BzuGzXyFDbbyWQDuW6RLF3bjsecX0KMc7G2luTPDsjEGlKFiSVT0+G0+/iAGOdiaszJDGSX1X8c3/c/X/PGyAogrvMMn+kzDp/jeqy24mFWhniNu57PgT8gxrlYY09UTa/6QQHVk6pcaRPMYtdxcRjM2UAbP1TOqvTiLBdUVWbL5kEtH2RdQowt5eZmqJ0QiKm1hsDCxU7h5rE8TylJkaMCKreUVGLkZ7h6gHULMaoxsuSgABAjE1QqcH0nEoiptElFUEBMhQ0EcaXATV6u3vJmS0niUImRAyoVWLkLuQ4xtpQq/ds4KCqxjQVnuqcKrObk3e/bUY09FdR7AyDm3WFr67vzjZT7EKMas2Zx6XiBWGlFGS9Hgbv5+PDNB1RjOZqb7wvEzFvoaAEPvhf8GGJUY46yQLwUICaWjA5VFHhy8frpO6j4nloVWywMCsQsuOQ/xqd5+BRik0ZsK/1nysoKnyZPC1W4sd9C9YZzRrxeKg5ibCsbuthsaiDWTHomPioQlYNREJurMUDWW2ZFJdDWolCJba14u/liX7keDTG2le3MbDQzEGskPNNOL7scv8a+nFMGMaqxnvILiPXktqa1Cl8DJYIY20pNTlePBYhVl5gJSjxQEkMMkHWTeECsG6v1LDT2HGwZcRLEjudj/HUkPd7XiASI1VCVMe8rIDgHKwIxQOY+G4GYe4sVLTARYNMKkiuxGWL8hSRFWVA8FCBWXFIGXFVAeJB/PUYWxACZ66QEYq7tVbK4TIBlV2InGajIlCRE2TCAWFk9Ge2mhBrf9/++Hv4IcsYnuxK7Atn3EAJ/VTnDEEVdgZgiM9yFUqACO2lSDGJnmL3teWrpI+OAmA8f9a0i4xB/bTHFITafkwEyfYkjjwiIyTWjx2MFdmEc32O/ThQrZhWIzSDjK0qxHmhtB8S0OmMxroLbx5ujtZp6HA/8OSerKXK9sYFYPW37GrkiwCYhq1ViS5fYXprMWSBm0jZVQVfZPm5aiV2A7HAxlqpMVY49DAaI2fFKX6SVq6/lgjepxC5gxlmZvoRbjwiIWXFKU5wbwuu07M0hNh/6U5VpSrt7sQAxCy5pirEBwDY7E7unMzDTlIE3sQAx1fYoCq4RvJpWYtfyAzNFCfkRChBTaYuioBrDSxXETsEAM0UJGgIQU2WHkmCG8X2KpMR3HkutqMmZWEzwAC1GpaptgFhVeU0NvgvD+FsTuJbqqYXYMkiA1iThgVgT2dVMqhpc5iB2A7T5kcR852z68NaMOnkPxOroqnXUGVrhb9iV/m5j7QWbqMSeiTBXatPnU/gSxuHzSntA90zE238HYnLNWvTYXU26lusfbSZQnT4GgbUm8P/6C+VmwqlgeQAAAABJRU5ErkJggg==",re=Ce(47257),te=Ce.n(re),se=Ce(25173),ae=Ce(49317),he=Ce(1012),me=Ce(76406),ve=Ce(86974),pe=Ce(59301),be=Object.defineProperty,je=Object.defineProperties,ke=Object.getOwnPropertyDescriptors,Be=Object.getOwnPropertySymbols,De=Object.prototype.hasOwnProperty,Se=Object.prototype.propertyIsEnumerable,Ee=(st,_e,Ke)=>_e in st?be(st,_e,{enumerable:!0,configurable:!0,writable:!0,value:Ke}):st[_e]=Ke,Ie=(st,_e)=>{for(var Ke in _e||(_e={}))De.call(_e,Ke)&&Ee(st,Ke,_e[Ke]);if(Be)for(var Ke of Be(_e))Se.call(_e,Ke)&&Ee(st,Ke,_e[Ke]);return st},Me=(st,_e)=>je(st,ke(_e)),Le=(st,_e,Ke)=>new Promise((nt,rt)=>{var et=Ge=>{try{Ye(Ke.next(Ge))}catch(it){rt(it)}},Ve=Ge=>{try{Ye(Ke.throw(Ge))}catch(it){rt(it)}},Ye=Ge=>Ge.done?nt(Ge.value):Promise.resolve(Ge.value).then(et,Ve);Ye((Ke=Ke.apply(st,_e)).next())});const{Dragger:Ae}=yt.default,Pe=st=>{const _e=it=>it&&it.substring(0,it.lastIndexOf("."));for(var Ke=[...st],nt=0,rt=[],et=0;et{if(it.forEach(qe=>{let vt=qe.name.split(/\.(?=[^\.]+$)/);qe.name=`${vt[0]}.${vt[1].toLowerCase()}`}),it[0].name.includes(".in"))return it.length===2?it:[it[0],{}];if(it[0].name.includes(".out"))return it.length===2?it.reverse():[{},it[0]]})},Ue=({onClose:st,onOK:_e,visible:Ke,wrapClassName:nt,rootIdentifier:rt,multiple:et=!1,defaultMultipleValue:Ve=!0})=>{const[Ye,Ge]=(0,le.useState)([]),[it,qe]=(0,le.useState)({}),[vt,ot]=(0,le.useState)(!1),[Qe,Fe]=(0,le.useState)(!0),Re=(0,le.useRef)([]),ne=(0,le.useRef)(0),fe=()=>{st()};(0,le.useEffect)(()=>{Ne()},[]),(0,le.useEffect)(()=>{Ke&&(Re.current=[],ne.current=0,Ge([]),Fe(Ve))},[Ke]);const Ne=()=>Le(void 0,null,function*(){try{const at=yield(0,ae.ZP)("/api/buckets/get_upload_token_for_big_files",{method:"get"}),lt=JSON.parse((0,se.pe)(at.data));qe(lt)}catch(at){}}),We=at=>at&&at.substring(0,at.lastIndexOf(".")),we=at=>{var lt,mt;const ut=We((lt=at[0])==null?void 0:lt.name)||We((mt=at[1])==null?void 0:mt.name),ct=Ye.filter(Pt=>We(Pt.name)!==ut);Re.current=[...ct],Ge([...ct])},ye=at=>{if(!Qe){const wt=new FormData;wt.append("file",at.file),(0,ae.ZP)("/api/attachments/get_file_content.json",{method:"post",body:wt},!0).then(At=>{if(At.status===0){ne.current=ne.current+1;const pt=Re.current.map(Mt=>{var kt;if(Mt.name===at.name){const xt=Ie({},Mt);return(kt=at==null?void 0:at.name)!=null&&kt.includes(".in")?xt.input=At==null?void 0:At.content:xt.output=At==null?void 0:At.content,xt}return Mt});if(Re.current=[...pt],Ge([...pt]),ne.current>0&&ne.current===Ye.length){ot(!1);let Mt=Pe(pt);Mt=Mt.filter(kt=>{var xt,It;return!!((xt=kt[0])!=null&&xt.name&&((It=kt[1])!=null&&It.name))}),Mt=Mt.map(kt=>Me(Ie(Ie({},kt[0]),kt[1]),{is_file:!1})),_e(Mt),st()}}else ot(!1),st()});return}const lt=new(te())({endpoint:it.end_point,region:it.region,accessKeyId:it.access_key_id,accessKeySecret:it.access_key_secret,bucket:it.bucket,stsToken:it.security_token}),mt=at.name,ut={container_type:"TestSet",file_name:mt},ct=(0,he.Z)();let Pt=`testsets/${rt}/${ct}${mt.indexOf(".")>-1?"."+mt.split(".").pop():""}`;rt===null&&(Pt=`testsets/${ct}${mt.indexOf(".")>-1?"."+mt.split(".").pop():""}`),lt.multipartUpload(Pt,new Blob([at.file],{type:at.file.type}),{timeout:3600*1e3,partSize:1002400,callback:{customValue:{id:mt+""},url:it==null?void 0:it.callback_url,host:it==null?void 0:it.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+(0,ae.rz)(ut)}}).then(function(wt){if(wt.data.status===0){ne.current=ne.current+1;const Bt=Re.current.map(At=>{var pt,Mt,kt,xt,It,Ut,en,St,jt,Ht,Qt,sn,wn,Bn,Fn,gn,Dn;if(At.name===((Mt=(pt=wt.data)==null?void 0:pt.data)==null?void 0:Mt.file_name)){const un=Ie({},At);return(It=(xt=(kt=wt.data)==null?void 0:kt.data)==null?void 0:xt.file_name)!=null&&It.includes(".in")?(un.in_object_key=(en=(Ut=wt.data)==null?void 0:Ut.data)==null?void 0:en.object,un.in_object_size=(jt=(St=wt.data)==null?void 0:St.data)==null?void 0:jt.size,un.input=(Qt=(Ht=wt.data)==null?void 0:Ht.data)==null?void 0:Qt.file_name,un.in_file=at):(un.out_object_key=(wn=(sn=wt.data)==null?void 0:sn.data)==null?void 0:wn.object,un.out_object_size=(Fn=(Bn=wt.data)==null?void 0:Bn.data)==null?void 0:Fn.size,un.output=(Dn=(gn=wt.data)==null?void 0:gn.data)==null?void 0:Dn.file_name,un.out_file=at),un}return At});if(Re.current=[...Bt],Ge([...Bt]),ne.current>0&&ne.current===Ye.length){ot(!1);let At=Pe(Bt);At=At.filter(pt=>{var Mt,kt;return!!((Mt=pt[0])!=null&&Mt.name&&((kt=pt[1])!=null&&kt.name))}),At=At.map(pt=>Me(Ie(Ie({},pt[0]),pt[1]),{is_file:!0})),_e(At),st()}}})},Oe=at=>new Promise((lt,mt)=>{let ut=0,ct=[];for(let Pt=0;Pt{ut++,ut===at.length&&(ct.length?(a.ZP.warning(`${ct.join("\uFF0C")}\u6587\u4EF6\u5DF2\u635F\u574F\u6216\u5DF2\u88AB\u4FEE\u6539\uFF0C\u8BF7\u5220\u9664\u540E\u91CD\u65B0\u4E0A\u4F20\uFF01`),mt()):lt(at))}).catch(wt=>{console.log("\u9519\u8BEF\u4FE1\u606F\uFF1A",wt),ut++,ct.push(at[Pt].name),ut===at.length&&(ct.length?(a.ZP.warning(`${ct.join("\uFF0C")}\u6587\u4EF6\u5DF2\u635F\u574F\u6216\u5DF2\u88AB\u4FEE\u6539\uFF0C\u8BF7\u5220\u9664\u540E\u91CD\u65B0\u4E0A\u4F20\uFF01`),mt()):lt(at))})}),$e=()=>Le(void 0,null,function*(){if(Ye.length===0){a.ZP.warning("\u8BF7\u9009\u62E9\u4E0A\u4F20\u6587\u4EF6");return}if(yield Oe(Ye),ot(!0),Pe(Ye).some(lt=>{var mt,ut;return!((mt=lt[0])!=null&&mt.name&&((ut=lt[1])!=null&&ut.name))})){Te.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u4E0A\u4F20\u7684\u6D4B\u8BD5\u7528\u4F8B\u4E2D\u5B58\u5728\u672A\u914D\u5BF9\u7684\u6587\u4EF6\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u4EC5\u4FDD\u5B58\u5DF2\u914D\u5BF9\u7684\u6D4B\u8BD5\u7528\u4F8B\uFF1F",onOk:()=>Le(void 0,null,function*(){Ye.map(lt=>Le(void 0,null,function*(){ye(lt)}))}),onCancel:()=>{ot(!1)}});return}Ye.map(lt=>Le(void 0,null,function*(){ye(lt)}))}),Ze={name:"file",fileList:Ye,multiple:!0,accept:".in, .out",showUploadList:!1,beforeUpload:at=>{if(Ye!=null&&Ye.some(mt=>mt.name===at.name))return a.ZP.info(`${at.name}\u6587\u4EF6\u5DF2\u5B58\u5728`),!1;if(at.size/1024/1024>100)return a.ZP.info("\u6587\u4EF6\u8D85\u8FC7100M\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42"),!1;if(!/\.(in|out|IN|OUT)$/.test(at.name))return a.ZP.warning("\u8F93\u5165\u6587\u4EF6\u53EA\u80FD\u4E0A\u4F20.in\u548C.out\u7C7B\u578B\u7684\u6587\u672C\u6587\u4EF6"),!1;const lt={name:at.name,uid:at.uid,file:at,percent:0};return Ye.push(lt),Re.current=[...Ye],Ge([...Ye]),!1}},Xe=Pe(Ye);return console.log(Ye,Xe,"fileList"),pe.createElement(Te.default,{open:Ke,wrapClassName:nt,onOk:$e,centered:!0,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",okButtonProps:{loading:vt},onCancel:fe,width:730,title:"\u6279\u91CF\u4E0A\u4F20\u6D4B\u8BD5\u7528\u4F8B"},pe.createElement("div",{className:ue.wrap},Ye.length?pe.createElement("div",null,pe.createElement(ge.Z,{justify:"space-between",align:"middle",style:{marginBottom:40}},pe.createElement("div",{style:{visibility:et?"visible":"hidden"}},pe.createElement("span",{className:ue.greyText},"\u7528\u4F8B\u7C7B\u578B"),pe.createElement(x.ZP.Group,{className:`ml20 ${ue.testCaseRadio}`,optionType:"button",value:Qe,onChange:at=>Fe(at.target.value)},pe.createElement(x.ZP,{value:!1},"\u6587\u672C"),pe.createElement(x.ZP,{value:!0},"\u6587\u4EF6"))),pe.createElement(yt.default,Ie({},Ze),pe.createElement(z.ZP,{type:"primary",className:ue.btnS},pe.createElement("i",{className:"iconfont icon-shangchuan2"}),"\u4E0A\u4F20\u6587\u4EF6"))),pe.createElement(He,{data:Xe,onRemove:we})):pe.createElement("div",{className:`${ue.noData} mb30`},pe.createElement(yt.default.Dragger,Me(Ie({},Ze),{className:ue.dragger}),pe.createElement("img",{src:E,alt:"",className:"mb20"}),pe.createElement("div",null,pe.createElement("span",null,"\u62D6\u62FD\u6587\u4EF6\u6216"),pe.createElement("span",{className:ue.uploadText},"\u70B9\u51FB\u6B64\u5904\u4E0A\u4F20")))),pe.createElement("div",{className:ue.text},pe.createElement("span",{style:{color:"#FA6400"}},"\u63D0\u793A"),pe.createElement("br",null),"1\u3001\u6587\u4EF6\u5FC5\u987B\u4E0A\u4F20.in\u548C.out\u7C7B\u578B\u7684\u6587\u672C\u6587\u4EF6\u3002",pe.createElement("br",null),"2\u3001\u4E0A\u4F20\u7684\u6587\u4EF6\u7F16\u7801\u4EC5\u652F\u6301UTF-8\uFF0C\u5426\u5219\u53EF\u80FD\u4F1A\u51FA\u73B0\u6587\u672C\u4E71\u7801\u3002",pe.createElement("br",null),"3\u3001\u8F93\u5165\u8F93\u51FA\u6587\u4EF6\u9700\u6587\u4EF6\u540D\u79F0\u4E00\u4E00\u5BF9\u5E94\uFF0C\u672A\u5BF9\u5E94\u65F6\uFF0C\u5C06\u65E0\u6CD5\u4E0A\u4F20\u3002",pe.createElement("br",null),"4\u3001\u5355\u4E2A\u4E0A\u4F20\u6587\u4EF6\u4E0D\u80FD\u8D85\u8FC7100MB\uFF0C\u8D85\u8FC7\u65F6\u53EF\u4EE5\u5206\u6279\u6B21\u4E0A\u4F20\u3002",pe.createElement("br",null))))},He=({data:st=[],onRemove:_e,width:Ke="auto",showScore:nt=!1,disabled:rt=!1,inputChange:et,onEvaluatingChange:Ve,onSelectAll:Ye,checkAll1:Ge,checkAll2:it,checkAll3:qe,checkAll4:vt,checkAll5:ot,showEvaluatingSetting:Qe=!1,className:Fe="",isProgramHomework:Re=!1})=>{const ne={value:"",filename:"",dataUrl:""},[fe,Ne]=(0,le.useState)(Ie({},ne)),We=Oe=>{let $e=document.createElement("a");document.body.appendChild($e);let Ze=URL.createObjectURL(Oe.file);$e.href=Ze,$e.download=Oe.name,$e.click(),URL.revokeObjectURL(Ze),document.body.removeChild($e)},we=(Oe,$e)=>{(0,me.LR)(Oe,$e)},ye=(Oe,$e)=>{Te.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:pe.createElement("div",{className:"tc font16"},"\u8BF7\u786E\u8BA4\u662F\u5426\u5220\u9664\u8BE5\u6D4B\u8BD5\u7528\u4F8B?"),onOk:()=>{_e(Oe,$e)},onCancel:()=>{}})};return st.length?pe.createElement("div",{className:Fe,style:{width:Ke}},pe.createElement("div",{className:`${Re?ue.headProgram:ue.head}`},Qe&&pe.createElement("div",{style:{width:"15%",display:"flex",alignItems:"center"}},pe.createElement(ie.default,{checked:Ge,onChange:Oe=>{Ye(Oe.target.checked,"hidden")}}),pe.createElement(oe.Z,{title:'\u9690\u85CF\u6D4B\u8BD5\u96C6\u53EF\u4EE5\u9632\u6B62\u5B66\u751F\u901A\u8FC7"print"\u7B49\u624B\u6BB5\u76F4\u63A5\u901A\u5173'},pe.createElement("span",{style:{marginLeft:"8px"}},"\u9690\u85CF"),pe.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),pe.createElement("div",{style:{width:Re?"25%":"15%"}},"\u7528\u4F8B"),pe.createElement("div",{style:{width:nt?Re?"20%":"15%":"25%",padding:"0 12px"}},"\u8F93\u5165"),pe.createElement("div",{style:{width:nt?Re?"20%":"15%":"25%",padding:"0 12px"}},"\u8F93\u51FA"),nt&&pe.createElement("div",{style:{width:"20%"}},"\u5F97\u5206\u6BD4\u4F8B"),Qe&&pe.createElement("div",{style:{width:"20%",display:"flex",alignItems:"center"}},pe.createElement(ie.default,{checked:vt,onChange:Oe=>{Ye(Oe.target.checked,"input_visible")}}),pe.createElement(oe.Z,{title:"\u52FE\u9009\u540E\uFF0C\u8F93\u5165\u5BF9\u5B66\u5458\u59CB\u7EC8\u4E0D\u53EF\u89C1"},pe.createElement("span",{style:{marginLeft:"8px"}},"\u8F93\u5165"),pe.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),Qe&&pe.createElement("div",{style:{width:"20%",display:"flex",alignItems:"center"}},pe.createElement(ie.default,{checked:it,onChange:Oe=>{Ye(Oe.target.checked,"is_invisible")}}),pe.createElement(oe.Z,{title:"\u52FE\u9009\u540E\uFF0C\u9884\u671F\u8F93\u51FA\u5BF9\u5B66\u5458\u59CB\u7EC8\u4E0D\u53EF\u89C1"},pe.createElement("span",{style:{marginLeft:"8px"}},"\u9884\u671F\u8F93\u51FA"),pe.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),Qe&&pe.createElement("div",{style:{width:"20%",display:"flex",alignItems:"center"}},pe.createElement(ie.default,{checked:ot,onChange:Oe=>{Ye(Oe.target.checked,"actual_output_visible")}}),pe.createElement(oe.Z,{title:"\u52FE\u9009\u540E\uFF0C\u5B9E\u9645\u8F93\u51FA\u5BF9\u5B66\u5458\u59CB\u7EC8\u4E0D\u53EF\u89C1"},pe.createElement("span",{style:{marginLeft:"8px"}},"\u5B9E\u9645\u8F93\u51FA"),pe.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),Qe&&pe.createElement("div",{style:{width:"20%",display:"flex",alignItems:"center"}},pe.createElement(ie.default,{checked:qe,onChange:Oe=>{Ye(Oe.target.checked,"last_match_rule")}}),pe.createElement(oe.Z,{title:"\u52FE\u9009\u540E\uFF0C\u5B9E\u9645\u8F93\u51FA\u4E0E\u9884\u671F\u8F93\u51FA\u6700\u540E\u4E00\u884C\u76F8\u540C\u5373\u53EF\u901A\u5173"},pe.createElement("span",{style:{marginLeft:"8px"}},"\u7279\u6B8A\u5224\u5B9A"),pe.createElement("i",{className:"ml5 font14 iconfont icon-xiaowenhao1"}))),pe.createElement("div",{className:ue.operation,style:Re?{flex:1,textAlign:"right"}:{width:"10%"}},"\u64CD\u4F5C")),pe.createElement("div",{className:ue.listWrapper,style:{boxShadow:Re?"0px 2px 4px 0px #EAEEF4":"unset"}},st.map((Oe,$e)=>{var Ze,Xe,at,lt;return pe.createElement("div",{key:$e,className:ue.list,style:Re?{marginBottom:"0px",height:"66px",borderBottom:"1px solid #F6F7F8"}:{}},Qe&&pe.createElement("div",{style:{width:"15%"}},pe.createElement(ie.default,{checked:!!Oe.hidden,onChange:mt=>{Ve(mt.target.checked,$e,"hidden")}})),pe.createElement("div",{style:{width:Re?"25%":"15%",paddingLeft:Re?"5px":"0px",paddingRight:Re?"5px":"0px"}},"\u6D4B\u8BD5\u7528\u4F8B",$e+1),pe.createElement("div",{className:ue.info,style:{width:nt?Re?"20%":"15%":"25%"}},pe.createElement("span",{title:Oe.input||((Ze=Oe[0])==null?void 0:Ze.name),onClick:()=>Le(void 0,null,function*(){let mt;Oe.input?Oe.input_file_url?mt=Oe.input_file_url:mt=Oe.in_file:mt=Oe[0];let ut;typeof mt=="string"?(ut=yield fetch(mt,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}}),Ne({value:yield ut.text(),filename:"",dataUrl:mt})):(ut=yield(0,me.db)(mt.file),Ne({value:ut.text,filename:mt.name,dataUrl:ut.link}))})},Oe.input||((Xe=Oe[0])==null?void 0:Xe.name))),pe.createElement("div",{className:ue.info,style:{width:nt?Re?"20%":"15%":"25%"}},pe.createElement("span",{title:Oe.output||((at=Oe[1])==null?void 0:at.name),onClick:()=>Le(void 0,null,function*(){let mt;Oe.input?Oe.output_file_url?mt=Oe.output_file_url:mt=Oe.out_file:mt=Oe[1];let ut;typeof mt=="string"?(ut=yield fetch(mt,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}}),Ne({value:yield ut.text(),filename:"",dataUrl:mt})):(ut=yield(0,me.db)(mt.file),Ne({value:ut.text,filename:mt.name,dataUrl:ut.link}))})},Oe.output||((lt=Oe[1])==null?void 0:lt.name))),nt&&pe.createElement("div",{style:{width:"20%"}},pe.createElement(ee.default,{size:"large",addonAfter:Re?"%":null,disabled:rt,style:{width:"80%"},onChange:mt=>et(mt,$e),value:Oe.score}),!Re&&pe.createElement("span",null,"\xA0%")),Qe&&pe.createElement("div",{style:{width:"20%"}},pe.createElement(ie.default,{checked:Oe.input_visible||!1,onChange:mt=>{Ve(mt.target.checked,$e,"input_visible")},className:"font14"},"\u5BF9\u5B66\u5458\u4E0D\u53EF\u89C1")),Qe&&pe.createElement("div",{style:{width:"20%"}},pe.createElement(ie.default,{checked:Oe.is_invisible||!1,onChange:mt=>{Ve(mt.target.checked,$e,"is_invisible")},className:"font14"},"\u5BF9\u5B66\u5458\u4E0D\u53EF\u89C1")),Qe&&pe.createElement("div",{style:{width:"20%"}},pe.createElement(ie.default,{checked:Oe.actual_output_visible||!1,onChange:mt=>{Ve(mt.target.checked,$e,"actual_output_visible")},className:"font14"},"\u5BF9\u5B66\u5458\u4E0D\u53EF\u89C1")),Qe&&pe.createElement("div",{style:{width:"20%"}},pe.createElement(ie.default,{checked:Oe.last_match_rule||!1,onChange:mt=>{Ve(mt.target.checked,$e,"last_match_rule")},className:"font14"},"\u672B\u5C3E\u5339\u914D")),pe.createElement("div",{onClick:()=>ye(Oe,$e),style:Re?{flex:1,textAlign:"right",paddingLeft:"5px",paddingRight:"5px"}:{width:"10%",textAlign:"center"}},pe.createElement("span",{className:ue.del},"\u5220\u9664")))})),pe.createElement(ve.Z,{close:!0,data:fe.dataUrl,filename:fe.filename,type:fe.dataUrl.length?"txt":"",onClose:()=>Ne(Ie({},ne)),monacoEditor:{value:fe.value,language:"txt",onChange:()=>{},options:{fontSize:14,readOnly:!0,minimap:{enabled:!1}}}})):pe.createElement(pe.Fragment,null)};var Je=Ue},20047:function(on,Lt,Ce){"use strict";Ce.d(Lt,{AL:function(){return be},Iy:function(){return ue},Qv:function(){return te},ez:function(){return pe},jb:function(){return E}});var le=Ce(32834),yt=Ce.n(le),a=Ce(11690),Te=Ce.n(a);let ge=1;function x(Se,Ee){const Ie=Se.match(/^(\s+)(?:```)/);if(Ie===null)return Ee;const Me=Ie[1];return Ee.split(` `).map(Le=>{const Ae=Le.match(/^\s+/);if(Ae===null)return Le;const[Pe]=Ae;return Pe.length>=Me.length?Le.slice(Me.length):Le}).join(` `)}let z=[],ie=["