1234567891011 |
- import{o as t,b as e,w as s,g as i,n as a,r as o,d as n,t as r,i as l,h,E as u,G as c,H as d,a as p,f,J as m,q as y,K as g,L as b,N as k,O as w,P as x,Q as _,R as C}from"./index-Br_46Bl3.js";const S={data:()=>({}),created(){this.popup=this.getParent()},methods:{getParent(t="uniPopup"){let e=this.$parent,s=e.$options.name;for(;s!==t;){if(e=e.$parent,!e)return!1;s=e.$options.name}return e}}},v=(t,e)=>{const s=t.__vccOpts||t;for(const[i,a]of e)s[i]=a;return s};const A=v({name:"uniPopupMessage",mixins:[S],props:{type:{type:String,default:"success"},message:{type:String,default:""},duration:{type:Number,default:3e3},maskShow:{type:Boolean,default:!1}},data:()=>({}),created(){this.popup.maskShow=this.maskShow,this.popup.messageChild=this},methods:{timerClose(){0!==this.duration&&(clearTimeout(this.timer),this.timer=setTimeout((()=>{this.popup.close()}),this.duration))}}},[["render",function(u,c,d,p,f,m){const y=l,g=h;return t(),e(g,{class:"uni-popup-message"},{default:s((()=>[i(g,{class:a(["uni-popup-message__box fixforpc-width","uni-popup__"+d.type])},{default:s((()=>[o(u.$slots,"default",{},(()=>[i(y,{class:a(["uni-popup-message-text","uni-popup__"+d.type+"-text"])},{default:s((()=>[n(r(d.message),1)])),_:1},8,["class"])]),!0)])),_:3},8,["class"])])),_:3})}],["__scopeId","data-v-d81cfb56"]]);function T(t,e){return"string"==typeof t?e:t}class P{constructor(t,e){this.options=t,this.animation=u({...t}),this.currentStepAnimates={},this.next=0,this.$=e}_nvuePushAnimates(t,e){let s=this.currentStepAnimates[this.next],i={};if(i=s||{styles:{},config:{}},O.includes(t)){i.styles.transform||(i.styles.transform="");let s="";"rotate"===t&&(s="deg"),i.styles.transform+=`${t}(${e+s}) `}else i.styles[t]=`${e}`;this.currentStepAnimates[this.next]=i}_animateRun(t={},e={}){let s=this.$.$refs.ani.ref;if(s)return new Promise(((i,a)=>{nvueAnimation.transition(s,{styles:t,...e},(t=>{i()}))}))}_nvueNextAnimate(t,e=0,s){let i=t[e];if(i){let{styles:a,config:o}=i;this._animateRun(a,o).then((()=>{e+=1,this._nvueNextAnimate(t,e,s)}))}else this.currentStepAnimates={},"function"==typeof s&&s(),this.isEnd=!0}step(t={}){return this.animation.step(t),this}run(t){this.$.animationData=this.animation.export(),this.$.timer=setTimeout((()=>{"function"==typeof t&&t()}),this.$.durationTime)}}const O=["matrix","matrix3d","rotate","rotate3d","rotateX","rotateY","rotateZ","scale","scale3d","scaleX","scaleY","scaleZ","skew","skewX","skewY","translate","translate3d","translateX","translateY","translateZ"];function $(t,e){if(e)return clearTimeout(e.timer),new P(t,e)}O.concat(["opacity","backgroundColor"],["width","height","left","right","top","bottom"]).forEach((t=>{P.prototype[t]=function(...e){return this.animation[t](...e),this}}));const I=v({name:"uniTransition",emits:["click","change"],props:{show:{type:Boolean,default:!1},modeClass:{type:[Array,String],default:()=>"fade"},duration:{type:Number,default:300},styles:{type:Object,default:()=>({})},customClass:{type:String,default:""},onceRender:{type:Boolean,default:!1}},data:()=>({isShow:!1,transform:"",opacity:1,animationData:{},durationTime:300,config:{}}),watch:{show:{handler(t){t?this.open():this.isShow&&this.close()},immediate:!0}},computed:{stylesObject(){let t={...this.styles,"transition-duration":this.duration/1e3+"s"},e="";for(let s in t){e+=this.toLine(s)+":"+t[s]+";"}return e},transformStyles(){return"transform:"+this.transform+";opacity:"+this.opacity+";"+this.stylesObject}},created(){this.config={duration:this.duration,timingFunction:"ease",transformOrigin:"50% 50%",delay:0},this.durationTime=this.duration},methods:{init(t={}){t.duration&&(this.durationTime=t.duration),this.animation=$(Object.assign(this.config,t),this)},onClick(){this.$emit("click",{detail:this.isShow})},step(t,e={}){if(this.animation){for(let e in t)try{"object"==typeof t[e]?this.animation[e](...t[e]):this.animation[e](t[e])}catch(s){console.error(`方法 ${e} 不存在`)}return this.animation.step(e),this}},run(t){this.animation&&this.animation.run(t)},open(){clearTimeout(this.timer),this.transform="",this.isShow=!0;let{opacity:t,transform:e}=this.styleInit(!1);void 0!==t&&(this.opacity=t),this.transform=e,this.$nextTick((()=>{this.timer=setTimeout((()=>{this.animation=$(this.config,this),this.tranfromInit(!1).step(),this.animation.run(),this.$emit("change",{detail:this.isShow})}),20)}))},close(t){this.animation&&this.tranfromInit(!0).step().run((()=>{this.isShow=!1,this.animationData=null,this.animation=null;let{opacity:t,transform:e}=this.styleInit(!1);this.opacity=t||1,this.transform=e,this.$emit("change",{detail:this.isShow})}))},styleInit(t){let e={transform:""},s=(t,s)=>{"fade"===s?e.opacity=this.animationType(t)[s]:e.transform+=this.animationType(t)[s]+" "};return"string"==typeof this.modeClass?s(t,this.modeClass):this.modeClass.forEach((e=>{s(t,e)})),e},tranfromInit(t){let e=(t,e)=>{let s=null;"fade"===e?s=t?0:1:(s=t?"-100%":"0","zoom-in"===e&&(s=t?.8:1),"zoom-out"===e&&(s=t?1.2:1),"slide-right"===e&&(s=t?"100%":"0"),"slide-bottom"===e&&(s=t?"100%":"0")),this.animation[this.animationMode()[e]](s)};return"string"==typeof this.modeClass?e(t,this.modeClass):this.modeClass.forEach((s=>{e(t,s)})),this.animation},animationType:t=>({fade:t?0:1,"slide-top":`translateY(${t?"0":"-100%"})`,"slide-right":`translateX(${t?"0":"100%"})`,"slide-bottom":`translateY(${t?"0":"100%"})`,"slide-left":`translateX(${t?"0":"-100%"})`,"zoom-in":`scaleX(${t?1:.8}) scaleY(${t?1:.8})`,"zoom-out":`scaleX(${t?1:1.2}) scaleY(${t?1:1.2})`}),animationMode:()=>({fade:"opacity","slide-top":"translateY","slide-right":"translateX","slide-bottom":"translateY","slide-left":"translateX","zoom-in":"scale","zoom-out":"scale"}),toLine:t=>t.replace(/([A-Z])/g,"-$1").toLowerCase()}},[["render",function(i,n,r,l,u,f){const m=h;return c((t(),e(m,{ref:"ani",animation:u.animationData,class:a(r.customClass),style:p(f.transformStyles),onClick:f.onClick},{default:s((()=>[o(i.$slots,"default")])),_:3},8,["animation","class","style","onClick"])),[[d,u.isShow]])}]]);const E=v({name:"uniPopup",components:{keypress:{name:"Keypress",props:{disable:{type:Boolean,default:!1}},mounted(){const t={esc:["Esc","Escape"],tab:"Tab",enter:"Enter",space:[" ","Spacebar"],up:["Up","ArrowUp"],left:["Left","ArrowLeft"],right:["Right","ArrowRight"],down:["Down","ArrowDown"],delete:["Backspace","Delete","Del"]};document.addEventListener("keyup",(e=>{if(this.disable)return;const s=Object.keys(t).find((s=>{const i=e.key,a=t[s];return a===i||Array.isArray(a)&&a.includes(i)}));s&&setTimeout((()=>{this.$emit(s,{})}),0)}))},render:()=>{}}},emits:["change","maskClick"],props:{animation:{type:Boolean,default:!0},type:{type:String,default:"center"},isMaskClick:{type:Boolean,default:null},maskClick:{type:Boolean,default:null},backgroundColor:{type:String,default:"none"},safeArea:{type:Boolean,default:!0},maskBackgroundColor:{type:String,default:"rgba(0, 0, 0, 0.4)"},borderRadius:{type:String}},watch:{type:{handler:function(t){this.config[t]&&this[this.config[t]](!0)},immediate:!0},isDesktop:{handler:function(t){this.config[t]&&this[this.config[this.type]](!0)},immediate:!0},maskClick:{handler:function(t){this.mkclick=t},immediate:!0},isMaskClick:{handler:function(t){this.mkclick=t},immediate:!0},showPopup(t){document.getElementsByTagName("body")[0].style.overflow=t?"hidden":"visible"}},data(){return{duration:300,ani:[],showPopup:!1,showTrans:!1,popupWidth:0,popupHeight:0,config:{top:"top",bottom:"bottom",center:"center",left:"left",right:"right",message:"top",dialog:"center",share:"bottom"},maskClass:{position:"fixed",bottom:0,top:0,left:0,right:0,backgroundColor:"rgba(0, 0, 0, 0.4)"},transClass:{backgroundColor:"transparent",borderRadius:this.borderRadius||"0",position:"fixed",left:0,right:0},maskShow:!0,mkclick:!0,popupstyle:"top"}},computed:{getStyles(){let t={backgroundColor:this.bg};return this.borderRadius,t=Object.assign(t,{borderRadius:this.borderRadius}),t},isDesktop(){return this.popupWidth>=500&&this.popupHeight>=500},bg(){return""===this.backgroundColor||"none"===this.backgroundColor?"transparent":this.backgroundColor}},mounted(){(()=>{const{windowWidth:t,windowHeight:e,windowTop:s,safeArea:i,screenHeight:a,safeAreaInsets:o}=g();this.popupWidth=t,this.popupHeight=e+(s||0),i&&this.safeArea?this.safeAreaInsets=o.bottom:this.safeAreaInsets=0})()},unmounted(){this.setH5Visible()},activated(){this.setH5Visible(!this.showPopup)},deactivated(){this.setH5Visible(!0)},created(){null===this.isMaskClick&&null===this.maskClick?this.mkclick=!0:this.mkclick=null!==this.isMaskClick?this.isMaskClick:this.maskClick,this.animation?this.duration=300:this.duration=0,this.messageChild=null,this.clearPropagation=!1,this.maskClass.backgroundColor=this.maskBackgroundColor},methods:{setH5Visible(t=!0){document.getElementsByTagName("body")[0].style.overflow=t?"visible":"hidden"},closeMask(){this.maskShow=!1},disableMask(){this.mkclick=!1},clear(t){t.stopPropagation(),this.clearPropagation=!0},open(t){if(this.showPopup)return;t&&-1!==["top","center","bottom","left","right","message","dialog","share"].indexOf(t)||(t=this.type),this.config[t]?(this[this.config[t]](),this.$emit("change",{show:!0,type:t})):console.error("缺少类型:",t)},close(t){this.showTrans=!1,this.$emit("change",{show:!1,type:this.type}),clearTimeout(this.timer),this.timer=setTimeout((()=>{this.showPopup=!1}),300)},touchstart(){this.clearPropagation=!1},onTap(){this.clearPropagation?this.clearPropagation=!1:(this.$emit("maskClick"),this.mkclick&&this.close())},top(t){this.popupstyle=this.isDesktop?"fixforpc-top":"top",this.ani=["slide-top"],this.transClass={position:"fixed",left:0,right:0,backgroundColor:this.bg,borderRadius:this.borderRadius||"0"},t||(this.showPopup=!0,this.showTrans=!0,this.$nextTick((()=>{this.showPoptrans(),this.messageChild&&"message"===this.type&&this.messageChild.timerClose()})))},bottom(t){this.popupstyle="bottom",this.ani=["slide-bottom"],this.transClass={position:"fixed",left:0,right:0,bottom:0,paddingBottom:this.safeAreaInsets+"px",backgroundColor:this.bg,borderRadius:this.borderRadius||"0"},t||this.showPoptrans()},center(t){this.popupstyle="center",this.ani=["zoom-out","fade"],this.transClass={position:"fixed",display:"flex",flexDirection:"column",bottom:0,left:0,right:0,top:0,justifyContent:"center",alignItems:"center",borderRadius:this.borderRadius||"0"},t||this.showPoptrans()},left(t){this.popupstyle="left",this.ani=["slide-left"],this.transClass={position:"fixed",left:0,bottom:0,top:0,backgroundColor:this.bg,borderRadius:this.borderRadius||"0",display:"flex",flexDirection:"column"},t||this.showPoptrans()},right(t){this.popupstyle="right",this.ani=["slide-right"],this.transClass={position:"fixed",bottom:0,right:0,top:0,backgroundColor:this.bg,borderRadius:this.borderRadius||"0",display:"flex",flexDirection:"column"},t||this.showPoptrans()},showPoptrans(){this.$nextTick((()=>{this.showPopup=!0,this.showTrans=!0}))}}},[["render",function(n,r,l,u,c,d){const g=T(f("uni-transition"),I),b=h,k=m("keypress");return c.showPopup?(t(),e(b,{key:0,class:a(["uni-popup",[c.popupstyle,d.isDesktop?"fixforpc-z-index":""]])},{default:s((()=>[i(b,{onTouchstart:d.touchstart},{default:s((()=>[c.maskShow?(t(),e(g,{key:"1",name:"mask","mode-class":"fade",styles:c.maskClass,duration:c.duration,show:c.showTrans,onClick:d.onTap},null,8,["styles","duration","show","onClick"])):y("",!0),i(g,{key:"2","mode-class":c.ani,name:"content",styles:c.transClass,duration:c.duration,show:c.showTrans,onClick:d.onTap},{default:s((()=>[i(b,{class:a(["uni-popup__wrapper",[c.popupstyle]]),style:p(d.getStyles),onClick:d.clear},{default:s((()=>[o(n.$slots,"default",{},void 0,!0)])),_:3},8,["style","class","onClick"])])),_:3},8,["mode-class","styles","duration","show","onClick"])])),_:3},8,["onTouchstart"]),c.maskShow?(t(),e(k,{key:0,onEsc:d.onTap},null,8,["onEsc"])):y("",!0)])),_:3},8,["class"])):y("",!0)}],["__scopeId","data-v-fc99ec19"]]);const B=v({name:"UniCard",emits:["click"],props:{title:{type:String,default:""},subTitle:{type:String,default:""},padding:{type:String,default:"10px"},margin:{type:String,default:"15px"},spacing:{type:String,default:"0 10px"},extra:{type:String,default:""},cover:{type:String,default:""},thumbnail:{type:String,default:""},isFull:{type:Boolean,default:!1},isShadow:{type:Boolean,default:!0},shadow:{type:String,default:"0px 0px 3px 1px rgba(0, 0, 0, 0.08)"},border:{type:Boolean,default:!0}},methods:{onClick(t){this.$emit("click",t)}}},[["render",function(u,c,d,f,m,g){const k=b,w=h,x=l;return t(),e(w,{class:a(["uni-card",{"uni-card--full":d.isFull,"uni-card--shadow":d.isShadow,"uni-card--border":d.border}]),style:p({margin:d.isFull?0:d.margin,padding:d.spacing,"box-shadow":d.isShadow?d.shadow:""})},{default:s((()=>[o(u.$slots,"cover",{},(()=>[d.cover?(t(),e(w,{key:0,class:"uni-card__cover"},{default:s((()=>[i(k,{class:"uni-card__cover-image",mode:"widthFix",onClick:c[0]||(c[0]=t=>g.onClick("cover")),src:d.cover},null,8,["src"])])),_:1})):y("",!0)]),!0),o(u.$slots,"title",{},(()=>[d.title||d.extra?(t(),e(w,{key:0,class:"uni-card__header"},{default:s((()=>[i(w,{class:"uni-card__header-box",onClick:c[1]||(c[1]=t=>g.onClick("title"))},{default:s((()=>[d.thumbnail?(t(),e(w,{key:0,class:"uni-card__header-avatar"},{default:s((()=>[i(k,{class:"uni-card__header-avatar-image",src:d.thumbnail,mode:"aspectFit"},null,8,["src"])])),_:1})):y("",!0),i(w,{class:"uni-card__header-content"},{default:s((()=>[i(x,{class:"uni-card__header-content-title uni-ellipsis"},{default:s((()=>[n(r(d.title),1)])),_:1}),d.title&&d.subTitle?(t(),e(x,{key:0,class:"uni-card__header-content-subtitle uni-ellipsis"},{default:s((()=>[n(r(d.subTitle),1)])),_:1})):y("",!0)])),_:1})])),_:1}),i(w,{class:"uni-card__header-extra",onClick:c[2]||(c[2]=t=>g.onClick("extra"))},{default:s((()=>[i(x,{class:"uni-card__header-extra-text"},{default:s((()=>[n(r(d.extra),1)])),_:1})])),_:1})])),_:1})):y("",!0)]),!0),i(w,{class:"uni-card__content",style:p({padding:d.padding}),onClick:c[3]||(c[3]=t=>g.onClick("content"))},{default:s((()=>[o(u.$slots,"default",{},void 0,!0)])),_:3},8,["style"]),i(w,{class:"uni-card__actions",onClick:c[4]||(c[4]=t=>g.onClick("actions"))},{default:s((()=>[o(u.$slots,"actions",{},void 0,!0)])),_:3})])),_:3},8,["class","style"])}],["__scopeId","data-v-b4135a35"]]);var R="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function D(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function j(t){if(t.__esModule)return t;var e=t.default;if("function"==typeof e){var s=function t(){return this instanceof t?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};s.prototype=e.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(t).forEach((function(e){var i=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(s,e,i.get?i:{enumerable:!0,get:function(){return t[e]}})})),s}var N={exports:{}};const M=j(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));
- /**
- * [js-md5]{@link https://github.com/emn178/js-md5}
- *
- * @namespace md5
- * @version 0.8.3
- * @author Chen, Yi-Cyuan [emn178@gmail.com]
- * @copyright Chen, Yi-Cyuan 2014-2023
- * @license MIT
- */
- var z;z=N,function(){var t="input is invalid type",e="object"==typeof window,s=e?window:{};s.JS_MD5_NO_WINDOW&&(e=!1);var i=!e&&"object"==typeof self,a=!s.JS_MD5_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node;a?s=R:i&&(s=self);var o,n=!s.JS_MD5_NO_COMMON_JS&&z.exports,r=!s.JS_MD5_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,l="0123456789abcdef".split(""),h=[128,32768,8388608,-2147483648],u=[0,8,16,24],c=["hex","array","digest","buffer","arrayBuffer","base64"],d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),p=[];if(r){var f=new ArrayBuffer(68);o=new Uint8Array(f),p=new Uint32Array(f)}var m=Array.isArray;!s.JS_MD5_NO_NODE_JS&&m||(m=function(t){return"[object Array]"===Object.prototype.toString.call(t)});var y=ArrayBuffer.isView;!r||!s.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW&&y||(y=function(t){return"object"==typeof t&&t.buffer&&t.buffer.constructor===ArrayBuffer});var g=function(e){var s=typeof e;if("string"===s)return[e,!0];if("object"!==s||null===e)throw new Error(t);if(r&&e.constructor===ArrayBuffer)return[new Uint8Array(e),!1];if(!m(e)&&!y(e))throw new Error(t);return[e,!1]},b=function(t){return function(e){return new x(!0).update(e)[t]()}},k=function(e){var i,a=M,o=M.Buffer;return i=o.from&&!s.JS_MD5_NO_BUFFER_FROM?o.from:function(t){return new o(t)},function(s){if("string"==typeof s)return a.createHash("md5").update(s,"utf8").digest("hex");if(null==s)throw new Error(t);return s.constructor===ArrayBuffer&&(s=new Uint8Array(s)),m(s)||y(s)||s.constructor===o?a.createHash("md5").update(i(s)).digest("hex"):e(s)}},w=function(t){return function(e,s){return new _(e,!0).update(s)[t]()}};function x(t){if(t)p[0]=p[16]=p[1]=p[2]=p[3]=p[4]=p[5]=p[6]=p[7]=p[8]=p[9]=p[10]=p[11]=p[12]=p[13]=p[14]=p[15]=0,this.blocks=p,this.buffer8=o;else if(r){var e=new ArrayBuffer(68);this.buffer8=new Uint8Array(e),this.blocks=new Uint32Array(e)}else this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.h0=this.h1=this.h2=this.h3=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0}function _(t,e){var s,i=g(t);if(t=i[0],i[1]){var a,o=[],n=t.length,r=0;for(s=0;s<n;++s)(a=t.charCodeAt(s))<128?o[r++]=a:a<2048?(o[r++]=192|a>>>6,o[r++]=128|63&a):a<55296||a>=57344?(o[r++]=224|a>>>12,o[r++]=128|a>>>6&63,o[r++]=128|63&a):(a=65536+((1023&a)<<10|1023&t.charCodeAt(++s)),o[r++]=240|a>>>18,o[r++]=128|a>>>12&63,o[r++]=128|a>>>6&63,o[r++]=128|63&a);t=o}t.length>64&&(t=new x(!0).update(t).array());var l=[],h=[];for(s=0;s<64;++s){var u=t[s]||0;l[s]=92^u,h[s]=54^u}x.call(this,e),this.update(h),this.oKeyPad=l,this.inner=!0,this.sharedMemory=e}x.prototype.update=function(t){if(this.finalized)throw new Error("finalize already called");var e=g(t);t=e[0];for(var s,i,a=e[1],o=0,n=t.length,l=this.blocks,h=this.buffer8;o<n;){if(this.hashed&&(this.hashed=!1,l[0]=l[16],l[16]=l[1]=l[2]=l[3]=l[4]=l[5]=l[6]=l[7]=l[8]=l[9]=l[10]=l[11]=l[12]=l[13]=l[14]=l[15]=0),a)if(r)for(i=this.start;o<n&&i<64;++o)(s=t.charCodeAt(o))<128?h[i++]=s:s<2048?(h[i++]=192|s>>>6,h[i++]=128|63&s):s<55296||s>=57344?(h[i++]=224|s>>>12,h[i++]=128|s>>>6&63,h[i++]=128|63&s):(s=65536+((1023&s)<<10|1023&t.charCodeAt(++o)),h[i++]=240|s>>>18,h[i++]=128|s>>>12&63,h[i++]=128|s>>>6&63,h[i++]=128|63&s);else for(i=this.start;o<n&&i<64;++o)(s=t.charCodeAt(o))<128?l[i>>>2]|=s<<u[3&i++]:s<2048?(l[i>>>2]|=(192|s>>>6)<<u[3&i++],l[i>>>2]|=(128|63&s)<<u[3&i++]):s<55296||s>=57344?(l[i>>>2]|=(224|s>>>12)<<u[3&i++],l[i>>>2]|=(128|s>>>6&63)<<u[3&i++],l[i>>>2]|=(128|63&s)<<u[3&i++]):(s=65536+((1023&s)<<10|1023&t.charCodeAt(++o)),l[i>>>2]|=(240|s>>>18)<<u[3&i++],l[i>>>2]|=(128|s>>>12&63)<<u[3&i++],l[i>>>2]|=(128|s>>>6&63)<<u[3&i++],l[i>>>2]|=(128|63&s)<<u[3&i++]);else if(r)for(i=this.start;o<n&&i<64;++o)h[i++]=t[o];else for(i=this.start;o<n&&i<64;++o)l[i>>>2]|=t[o]<<u[3&i++];this.lastByteIndex=i,this.bytes+=i-this.start,i>=64?(this.start=i-64,this.hash(),this.hashed=!0):this.start=i}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this},x.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var t=this.blocks,e=this.lastByteIndex;t[e>>>2]|=h[3&e],e>=56&&(this.hashed||this.hash(),t[0]=t[16],t[16]=t[1]=t[2]=t[3]=t[4]=t[5]=t[6]=t[7]=t[8]=t[9]=t[10]=t[11]=t[12]=t[13]=t[14]=t[15]=0),t[14]=this.bytes<<3,t[15]=this.hBytes<<3|this.bytes>>>29,this.hash()}},x.prototype.hash=function(){var t,e,s,i,a,o,n=this.blocks;this.first?e=((e=((t=((t=n[0]-680876937)<<7|t>>>25)-271733879<<0)^(s=((s=(-271733879^(i=((i=(-1732584194^2004318071&t)+n[1]-117830708)<<12|i>>>20)+t<<0)&(-271733879^t))+n[2]-1126478375)<<17|s>>>15)+i<<0)&(i^t))+n[3]-1316259209)<<22|e>>>10)+s<<0:(t=this.h0,e=this.h1,s=this.h2,e=((e+=((t=((t+=((i=this.h3)^e&(s^i))+n[0]-680876936)<<7|t>>>25)+e<<0)^(s=((s+=(e^(i=((i+=(s^t&(e^s))+n[1]-389564586)<<12|i>>>20)+t<<0)&(t^e))+n[2]+606105819)<<17|s>>>15)+i<<0)&(i^t))+n[3]-1044525330)<<22|e>>>10)+s<<0),e=((e+=((t=((t+=(i^e&(s^i))+n[4]-176418897)<<7|t>>>25)+e<<0)^(s=((s+=(e^(i=((i+=(s^t&(e^s))+n[5]+1200080426)<<12|i>>>20)+t<<0)&(t^e))+n[6]-1473231341)<<17|s>>>15)+i<<0)&(i^t))+n[7]-45705983)<<22|e>>>10)+s<<0,e=((e+=((t=((t+=(i^e&(s^i))+n[8]+1770035416)<<7|t>>>25)+e<<0)^(s=((s+=(e^(i=((i+=(s^t&(e^s))+n[9]-1958414417)<<12|i>>>20)+t<<0)&(t^e))+n[10]-42063)<<17|s>>>15)+i<<0)&(i^t))+n[11]-1990404162)<<22|e>>>10)+s<<0,e=((e+=((t=((t+=(i^e&(s^i))+n[12]+1804603682)<<7|t>>>25)+e<<0)^(s=((s+=(e^(i=((i+=(s^t&(e^s))+n[13]-40341101)<<12|i>>>20)+t<<0)&(t^e))+n[14]-1502002290)<<17|s>>>15)+i<<0)&(i^t))+n[15]+1236535329)<<22|e>>>10)+s<<0,e=((e+=((i=((i+=(e^s&((t=((t+=(s^i&(e^s))+n[1]-165796510)<<5|t>>>27)+e<<0)^e))+n[6]-1069501632)<<9|i>>>23)+t<<0)^t&((s=((s+=(t^e&(i^t))+n[11]+643717713)<<14|s>>>18)+i<<0)^i))+n[0]-373897302)<<20|e>>>12)+s<<0,e=((e+=((i=((i+=(e^s&((t=((t+=(s^i&(e^s))+n[5]-701558691)<<5|t>>>27)+e<<0)^e))+n[10]+38016083)<<9|i>>>23)+t<<0)^t&((s=((s+=(t^e&(i^t))+n[15]-660478335)<<14|s>>>18)+i<<0)^i))+n[4]-405537848)<<20|e>>>12)+s<<0,e=((e+=((i=((i+=(e^s&((t=((t+=(s^i&(e^s))+n[9]+568446438)<<5|t>>>27)+e<<0)^e))+n[14]-1019803690)<<9|i>>>23)+t<<0)^t&((s=((s+=(t^e&(i^t))+n[3]-187363961)<<14|s>>>18)+i<<0)^i))+n[8]+1163531501)<<20|e>>>12)+s<<0,e=((e+=((i=((i+=(e^s&((t=((t+=(s^i&(e^s))+n[13]-1444681467)<<5|t>>>27)+e<<0)^e))+n[2]-51403784)<<9|i>>>23)+t<<0)^t&((s=((s+=(t^e&(i^t))+n[7]+1735328473)<<14|s>>>18)+i<<0)^i))+n[12]-1926607734)<<20|e>>>12)+s<<0,e=((e+=((o=(i=((i+=((a=e^s)^(t=((t+=(a^i)+n[5]-378558)<<4|t>>>28)+e<<0))+n[8]-2022574463)<<11|i>>>21)+t<<0)^t)^(s=((s+=(o^e)+n[11]+1839030562)<<16|s>>>16)+i<<0))+n[14]-35309556)<<23|e>>>9)+s<<0,e=((e+=((o=(i=((i+=((a=e^s)^(t=((t+=(a^i)+n[1]-1530992060)<<4|t>>>28)+e<<0))+n[4]+1272893353)<<11|i>>>21)+t<<0)^t)^(s=((s+=(o^e)+n[7]-155497632)<<16|s>>>16)+i<<0))+n[10]-1094730640)<<23|e>>>9)+s<<0,e=((e+=((o=(i=((i+=((a=e^s)^(t=((t+=(a^i)+n[13]+681279174)<<4|t>>>28)+e<<0))+n[0]-358537222)<<11|i>>>21)+t<<0)^t)^(s=((s+=(o^e)+n[3]-722521979)<<16|s>>>16)+i<<0))+n[6]+76029189)<<23|e>>>9)+s<<0,e=((e+=((o=(i=((i+=((a=e^s)^(t=((t+=(a^i)+n[9]-640364487)<<4|t>>>28)+e<<0))+n[12]-421815835)<<11|i>>>21)+t<<0)^t)^(s=((s+=(o^e)+n[15]+530742520)<<16|s>>>16)+i<<0))+n[2]-995338651)<<23|e>>>9)+s<<0,e=((e+=((i=((i+=(e^((t=((t+=(s^(e|~i))+n[0]-198630844)<<6|t>>>26)+e<<0)|~s))+n[7]+1126891415)<<10|i>>>22)+t<<0)^((s=((s+=(t^(i|~e))+n[14]-1416354905)<<15|s>>>17)+i<<0)|~t))+n[5]-57434055)<<21|e>>>11)+s<<0,e=((e+=((i=((i+=(e^((t=((t+=(s^(e|~i))+n[12]+1700485571)<<6|t>>>26)+e<<0)|~s))+n[3]-1894986606)<<10|i>>>22)+t<<0)^((s=((s+=(t^(i|~e))+n[10]-1051523)<<15|s>>>17)+i<<0)|~t))+n[1]-2054922799)<<21|e>>>11)+s<<0,e=((e+=((i=((i+=(e^((t=((t+=(s^(e|~i))+n[8]+1873313359)<<6|t>>>26)+e<<0)|~s))+n[15]-30611744)<<10|i>>>22)+t<<0)^((s=((s+=(t^(i|~e))+n[6]-1560198380)<<15|s>>>17)+i<<0)|~t))+n[13]+1309151649)<<21|e>>>11)+s<<0,e=((e+=((i=((i+=(e^((t=((t+=(s^(e|~i))+n[4]-145523070)<<6|t>>>26)+e<<0)|~s))+n[11]-1120210379)<<10|i>>>22)+t<<0)^((s=((s+=(t^(i|~e))+n[2]+718787259)<<15|s>>>17)+i<<0)|~t))+n[9]-343485551)<<21|e>>>11)+s<<0,this.first?(this.h0=t+1732584193<<0,this.h1=e-271733879<<0,this.h2=s-1732584194<<0,this.h3=i+271733878<<0,this.first=!1):(this.h0=this.h0+t<<0,this.h1=this.h1+e<<0,this.h2=this.h2+s<<0,this.h3=this.h3+i<<0)},x.prototype.hex=function(){this.finalize();var t=this.h0,e=this.h1,s=this.h2,i=this.h3;return l[t>>>4&15]+l[15&t]+l[t>>>12&15]+l[t>>>8&15]+l[t>>>20&15]+l[t>>>16&15]+l[t>>>28&15]+l[t>>>24&15]+l[e>>>4&15]+l[15&e]+l[e>>>12&15]+l[e>>>8&15]+l[e>>>20&15]+l[e>>>16&15]+l[e>>>28&15]+l[e>>>24&15]+l[s>>>4&15]+l[15&s]+l[s>>>12&15]+l[s>>>8&15]+l[s>>>20&15]+l[s>>>16&15]+l[s>>>28&15]+l[s>>>24&15]+l[i>>>4&15]+l[15&i]+l[i>>>12&15]+l[i>>>8&15]+l[i>>>20&15]+l[i>>>16&15]+l[i>>>28&15]+l[i>>>24&15]},x.prototype.toString=x.prototype.hex,x.prototype.digest=function(){this.finalize();var t=this.h0,e=this.h1,s=this.h2,i=this.h3;return[255&t,t>>>8&255,t>>>16&255,t>>>24&255,255&e,e>>>8&255,e>>>16&255,e>>>24&255,255&s,s>>>8&255,s>>>16&255,s>>>24&255,255&i,i>>>8&255,i>>>16&255,i>>>24&255]},x.prototype.array=x.prototype.digest,x.prototype.arrayBuffer=function(){this.finalize();var t=new ArrayBuffer(16),e=new Uint32Array(t);return e[0]=this.h0,e[1]=this.h1,e[2]=this.h2,e[3]=this.h3,t},x.prototype.buffer=x.prototype.arrayBuffer,x.prototype.base64=function(){for(var t,e,s,i="",a=this.array(),o=0;o<15;)t=a[o++],e=a[o++],s=a[o++],i+=d[t>>>2]+d[63&(t<<4|e>>>4)]+d[63&(e<<2|s>>>6)]+d[63&s];return t=a[o],i+=d[t>>>2]+d[t<<4&63]+"=="},_.prototype=new x,_.prototype.finalize=function(){if(x.prototype.finalize.call(this),this.inner){this.inner=!1;var t=this.array();x.call(this,this.sharedMemory),this.update(this.oKeyPad),this.update(t),x.prototype.finalize.call(this)}};var C=function(){var t=b("hex");a&&(t=k(t)),t.create=function(){return new x},t.update=function(e){return t.create().update(e)};for(var e=0;e<c.length;++e){var s=c[e];t[s]=b(s)}return t}();C.md5=C,C.md5.hmac=function(){var t=w("hex");t.create=function(t){return new _(t)},t.update=function(e,s){return t.create(e).update(s)};for(var e=0;e<c.length;++e){var s=c[e];t[s]=w(s)}return t}(),n?z.exports=C:s.md5=C}();const U=D(N.exports);const F="10.11.12.100",H="9000";function J(t){return q("/exam-boot/exam/examPaperDetail","GET",t)}function Y(t){return q("/exam-boot/exam/createExamPapers","GET",t)}function L(t){return q("/exam-boot/exam/listExamPapers","GET",t)}function X(t){return q("/exam-boot/exam/onlineExamPapers","GET",t)}function W(t){return q("/exam-boot/exam/queryById","GET",t)}function G(t){return q("/exam-boot/sys/login","POST",t)}function V(t){return q("/exam-boot/exam/cacheExamPaperAnswer","POST",t)}function K(t){return q("/exam-boot/exam/getCacheExamPaperAnswer","GET",t)}function Z(t){return q("/exam-boot/exam/submitExamPaper","POST",t)}function q(t,e,s){let i;return"/exam-boot/exam/cacheExamPaperAnswer"!==t&&k({title:"加载中...",mask:!0}),"/exam-boot/sys/login"===t?(sessionStorage.setItem("sign",class{static sortAsc(t){let e=new Array,s=0;for(let o in t)e[s]=o,s++;let i=e.sort(),a={};for(let o in i)a[i[o]]=t[i[o]];return a}static getSign(t,e){let s=this.parseQueryString(t),i=this.mergeObject(s,e),a=this.sortAsc(i);return delete a._t,U(JSON.stringify(a)+"dd05f1c54d63749eda95f9fa6d49v442a").toUpperCase()}static parseQueryString(t){let e=/([^&=]+)=([\w\W]*?)(&|$|#)/g,s=/^[^\?]+\?([\w\W]+)$/.exec(t),i={},a=t.substring(t.lastIndexOf("/")+1);if(a.includes(",")&&(a.includes("?")&&(a=a.substring(0,a.indexOf("?"))),i["x-path-variable"]=decodeURIComponent(a)),s&&s[1]){let t,a=s[1];for(;null!=(t=e.exec(a));)this.myIsNaN(t[2])&&(t[2]=t[2].toString()),i[t[1]]=t[2]}return i}static mergeObject(t,e){if(e&&Object.keys(e).length>0)for(let s in e)!0===e.hasOwnProperty(s)&&(this.myIsNaN(e[s])&&(e[s]=e[s].toString()),t[s]=e[s]);return t}static urlEncode(t,e,s){if(null==t)return"";let i="",a=typeof t;if("string"==a||"number"==a||"boolean"==a)i+="&"+e+"="+(null==s||s?encodeURIComponent(t):t);else for(let o in t){let a=null==e?o:e+(t instanceof Array?"["+o+"]":"."+o);i+=this.urlEncode(t[o],a,s)}return i}static getTimestamp(){return(new Date).getTime()}static myIsNaN(t){return"number"==typeof t&&!isNaN(t)}}.getSign(t,s)),i=w({url:"http://10.11.12.100:8080"+t,method:e,data:s}).finally((()=>{x(),_()}))):i=w({url:"http://10.11.12.100:8080"+t,method:e,header:{"x-access-token":sessionStorage.getItem("token"),"x-tenant-id":"0","x-Sign":sessionStorage.getItem("sign"),"x-timestamp":(new Date).getTime()+"","x-version":"v3"},data:s}).then((t=>{if(console.log(t),!1!==t.data.success||4!==t.data.code[0])return t;sessionStorage.removeItem("examId"),sessionStorage.removeItem("token"),sessionStorage.removeItem("user"),sessionStorage.removeItem("sign"),C({url:"/pages/login/Login"})})).finally((()=>{x(),_()})),i}function Q(){q("/exam-boot/sys/logout","GET",{t:new Date}).then((t=>{x(),_()})),sessionStorage.removeItem("examId"),sessionStorage.removeItem("token"),sessionStorage.removeItem("user"),sessionStorage.removeItem("sign"),C({url:"/pages/login/Login"})}function tt(t){let e=sessionStorage.getItem("user"),s=sessionStorage.getItem("token");null===e||null===s?Q():null!=t?C({url:t}):console.log("跳转失败")}function et(){tt("/pages/login/Login")}function st(){tt("/pages/examPage/examStart")}export{v as _,H as a,T as b,A as c,E as d,B as e,X as f,G as g,W as h,Q as i,L as j,Y as k,V as l,F as m,J as n,et as o,K as p,S as q,tt as r,Z as s,st as t};
|