initial
This commit is contained in:
commit
9883323161
17470 files changed
+4470592
No files matched your search
@@ -0,0 +1,66 @@
|
||||
/*! Element Plus v2.2.6 */(function(V,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(V=typeof globalThis<"u"?globalThis:V||self,t(V.ElementPlus={},V.Vue))})(this,function(V,t){"use strict";var Np=typeof global=="object"&&global&&global.Object===Object&&global,a2=typeof self=="object"&&self&&self.Object===Object&&self,$t=Np||a2||Function("return this")(),At=$t.Symbol,$p=Object.prototype,s2=$p.hasOwnProperty,i2=$p.toString,Cl=At?At.toStringTag:void 0;function c2(e){var n=s2.call(e,Cl),o=e[Cl];try{e[Cl]=void 0;var r=!0}catch{}var l=i2.call(e);return r&&(n?e[Cl]=o:delete e[Cl]),l}var d2=Object.prototype,f2=d2.toString;function u2(e){return f2.call(e)}var p2="[object Null]",m2="[object Undefined]",Bp=At?At.toStringTag:void 0;function Lt(e){return e==null?e===void 0?m2:p2:Bp&&Bp in Object(e)?c2(e):u2(e)}function bt(e){return e!=null&&typeof e=="object"}var h2="[object Symbol]";function tn(e){return typeof e=="symbol"||bt(e)&&Lt(e)==h2}var g2=0/0;function _p(e){return typeof e=="number"?e:tn(e)?g2:+e}function ht(e,n){for(var o=-1,r=e==null?0:e.length,l=Array(r);++o<r;)l[o]=n(e[o],o,e);return l}var He=Array.isArray,y2=1/0,vp=At?At.prototype:void 0,Tp=vp?vp.toString:void 0;function nn(e){if(typeof e=="string")return e;if(He(e))return ht(e,nn)+"";if(tn(e))return Tp?Tp.call(e):"";var n=e+"";return n=="0"&&1/e==-y2?"-0":n}function Na(e,n){return function(o,r){var l;if(o===void 0&&r===void 0)return n;if(o!==void 0&&(l=o),r!==void 0){if(l===void 0)return r;typeof o=="string"||typeof r=="string"?(o=nn(o),r=nn(r)):(o=_p(o),r=_p(r)),l=e(o,r)}return l}}var b2=Na(function(e,n){return e+n},0),C2=/\s/;function Vp(e){for(var n=e.length;n--&&C2.test(e.charAt(n)););return n}var w2=/^\s+/;function Mp(e){return e&&e.slice(0,Vp(e)+1).replace(w2,"")}function gt(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}var Rp=0/0,k2=/^[-+]0x[0-9a-f]+$/i,S2=/^0b[01]+$/i,E2=/^0o[0-7]+$/i,N2=parseInt;function gn(e){if(typeof e=="number")return e;if(tn(e))return Rp;if(gt(e)){var n=typeof e.valueOf=="function"?e.valueOf():e;e=gt(n)?n+"":n}if(typeof e!="string")return e===0?e:+e;e=Mp(e);var o=S2.test(e);return o||E2.test(e)?N2(e.slice(2),o?2:8):k2.test(e)?Rp:+e}var Pp=1/0,$2=17976931348623157e292;function ro(e){if(!e)return e===0?e:0;if(e=gn(e),e===Pp||e===-Pp){var n=e<0?-1:1;return n*$2}return e===e?e:0}function je(e){var n=ro(e),o=n%1;return n===n?o?n-o:n:0}var B2="Expected a function";function _2(e,n){if(typeof n!="function")throw new TypeError(B2);return e=je(e),function(){if(--e<1)return n.apply(this,arguments)}}function Ft(e){return e}var v2="[object AsyncFunction]",T2="[object Function]",V2="[object GeneratorFunction]",M2="[object Proxy]";function lo(e){if(!gt(e))return!1;var n=Lt(e);return n==T2||n==V2||n==v2||n==M2}var $a=$t["__core-js_shared__"],Ip=function(){var e=/[^.]+$/.exec($a&&$a.keys&&$a.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function R2(e){return!!Ip&&Ip in e}var P2=Function.prototype,I2=P2.toString;function or(e){if(e!=null){try{return I2.call(e)}catch{}try{return e+""}catch{}}return""}var A2=/[\\^$.*+?()[\]{}|]/g,O2=/^\[object .+?Constructor\]$/,z2=Function.prototype,D2=Object.prototype,L2=z2.toString,F2=D2.hasOwnProperty,x2=RegExp("^"+L2.call(F2).replace(A2,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Ap(e){if(!gt(e)||R2(e))return!1;var n=lo(e)?x2:O2;return n.test(or(e))}function H2(e,n){return e?.[n]}function rr(e,n){var o=H2(e,n);return Ap(o)?o:void 0}var wl=rr($t,"WeakMap"),Ba=wl&&new wl,Op=Ba?function(e,n){return Ba.set(e,n),e}:Ft,zp=Object.create,Mr=function(){function e(){}return function(n){if(!gt(n))return{};if(zp)return zp(n);e.prototype=n;var o=new e;return e.prototype=void 0,o}}();function kl(e){return function(){var n=arguments;switch(n.length){case 0:return new e;case 1:return new e(n[0]);case 2:return new e(n[0],n[1]);case 3:return new e(n[0],n[1],n[2]);case 4:return new e(n[0],n[1],n[2],n[3]);case 5:return new e(n[0],n[1],n[2],n[3],n[4]);case 6:return new e(n[0],n[1],n[2],n[3],n[4],n[5]);case 7:return new e(n[0],n[1],n[2],n[3],n[4],n[5],n[6])}var o=Mr(e.prototype),r=e.apply(o,n);return gt(r)?r:o}}var K2=1;function W2(e,n,o){var r=n&K2,l=kl(e);function a(){var s=this&&this!==$t&&this instanceof a?l:e;return s.apply(r?o:this,arguments)}return a}function on(e,n,o){switch(o.length){case 0:return e.call(n);case 1:return e.call(n,o[0]);case 2:return e.call(n,o[0],o[1]);case 3:return e.call(n,o[0],o[1],o[2])}return e.apply(n,o)}var j2=Math.max;function Dp(e,n,o,r){for(var l=-1,a=e.length,s=o.length,i=-1,c=n.length,d=j2(a-s,0),f=Array(c+d),u=!r;++i<c;)f[i]=n[i];for(;++l<s;)(u||l<a)&&(f[o[l]]=e[l]);for(;d--;)f[i++]=e[l++];return f}var U2=Math.max;function Lp(e,n,o,r){for(var l=-1,a=e.length,s=-1,i=o.length,c=-1,d=n.length,f=U2(a-i,0),u=Array(f+d),p=!r;++l<f;)u[l]=e[l];for(var m=l;++c<d;)u[m+c]=n[c];for(;++s<i;)(p||l<a)&&(u[m+o[s]]=e[l++]);return u}functiLine truncated
|
||||
/* [wrapped with `+n+`] */
|
||||
`)}function Ti(e){return function(){return e}}var Ta=function(){try{var e=rr(Object,"defineProperty");return e({},"",{}),e}catch{}}(),sN=Ta?function(e,n){return Ta(e,"toString",{configurable:!0,enumerable:!1,value:Ti(n),writable:!0})}:Ft,Vi=xp(sN);function bn(e,n){for(var o=-1,r=e==null?0:e.length;++o<r&&n(e[o],o,e)!==!1;);return e}function Va(e,n,o,r){for(var l=e.length,a=o+(r?1:-1);r?a--:++a<l;)if(n(e[a],a,e))return a;return-1}function Kp(e){return e!==e}function iN(e,n,o){for(var r=o-1,l=e.length;++r<l;)if(e[r]===n)return r;return-1}function Pr(e,n,o){return n===n?iN(e,n,o):Va(e,Kp,o)}function Ma(e,n){var o=e==null?0:e.length;return!!o&&Pr(e,n,0)>-1}var cN=1,dN=2,fN=8,uN=16,pN=32,mN=64,hN=128,gN=256,yN=512,bN=[["ary",hN],["bind",cN],["bindKey",dN],["curry",fN],["curryRight",uN],["flip",yN],["partial",pN],["partialRight",mN],["rearg",gN]];function CN(e,n){return bn(bN,function(o){var r="_."+o[0];n&o[1]&&!Ma(e,r)&&e.push(r)}),e.sort()}function Wp(e,n,o){var r=n+"";return Vi(e,aN(r,CN(rN(r),o)))}var wN=1,kN=2,SN=4,EN=8,jp=32,Up=64;function Gp(e,n,o,r,l,a,s,i,c,d){var f=n&EN,u=f?s:void 0,p=f?void 0:s,m=f?a:void 0,g=f?void 0:a;n|=f?jp:Up,n&=~(f?Up:jp),n&SN||(n&=~(wN|kN));var h=[e,n,l,m,u,g,p,i,c,d],y=o.apply(void 0,h);return vi(e)&&Hp(y,h),y.placeholder=r,Wp(y,e,n)}function Ir(e){var n=e;return n.placeholder}var NN=9007199254740991,$N=/^(?:0|[1-9]\d*)$/;function ao(e,n){var o=typeof e;return n=n??NN,!!n&&(o=="number"||o!="symbol"&&$N.test(e))&&e>-1&&e%1==0&&e<n}var BN=Math.min;function _N(e,n){for(var o=e.length,r=BN(n.length,o),l=Gt(e);r--;){var a=n[r];e[r]=ao(a,o)?l[a]:void 0}return e}var qp="__lodash_placeholder__";function _o(e,n){for(var o=-1,r=e.length,l=0,a=[];++o<r;){var s=e[o];(s===n||s===qp)&&(e[o]=qp,a[l++]=o)}return a}var vN=1,TN=2,VN=8,MN=16,RN=128,PN=512;function Ra(e,n,o,r,l,a,s,i,c,d){var f=n&RN,u=n&vN,p=n&TN,m=n&(VN|MN),g=n&PN,h=p?void 0:kl(e);function y(){for(var b=arguments.length,w=Array(b),C=b;C--;)w[C]=arguments[C];if(m)var k=Ir(y),S=G2(w,k);if(r&&(w=Dp(w,r,l,m)),a&&(w=Lp(w,a,s,m)),b-=S,m&&b<d){var N=_o(w,k);return Gp(e,n,Ra,y.placeholder,o,w,N,i,c,d-b)}var E=u?o:this,v=p?E[e]:e;return b=w.length,i?w=_N(w,i):g&&b>1&&w.reverse(),f&&c<b&&(w.length=c),this&&this!==$t&&this instanceof y&&(v=h||kl(v)),v.apply(E,w)}return y}function IN(e,n,o){var r=kl(e);function l(){for(var a=arguments.length,s=Array(a),i=a,c=Ir(l);i--;)s[i]=arguments[i];var d=a<3&&s[0]!==c&&s[a-1]!==c?[]:_o(s,c);if(a-=d.length,a<o)return Gp(e,n,Ra,l.placeholder,void 0,s,d,void 0,void 0,o-a);var f=this&&this!==$t&&this instanceof l?r:e;return on(f,this,s)}return l}var AN=1;function ON(e,n,o,r){var l=n&AN,a=kl(e);function s(){for(var i=-1,c=arguments.length,d=-1,f=r.length,u=Array(f+c),p=this&&this!==$t&&this instanceof s?a:e;++d<f;)u[d]=r[d];for(;c--;)u[d++]=arguments[++i];return on(p,l?o:this,u)}return s}var Yp="__lodash_placeholder__",Mi=1,zN=2,DN=4,Xp=8,Sl=128,Zp=256,LN=Math.min;function FN(e,n){var o=e[1],r=n[1],l=o|r,a=l<(Mi|zN|Sl),s=r==Sl&&o==Xp||r==Sl&&o==Zp&&e[7].length<=n[8]||r==(Sl|Zp)&&n[7].length<=n[8]&&o==Xp;if(!(a||s))return e;r&Mi&&(e[2]=n[2],l|=o&Mi?0:DN);var i=n[3];if(i){var c=e[3];e[3]=c?Dp(c,i,n[4]):i,e[4]=c?_o(e[3],Yp):n[4]}return i=n[5],i&&(c=e[5],e[5]=c?Lp(c,i,n[6]):i,e[6]=c?_o(e[5],Yp):n[6]),i=n[7],i&&(e[7]=i),r&Sl&&(e[8]=e[8]==null?n[8]:LN(e[8],n[8])),e[9]==null&&(e[9]=n[9]),e[0]=n[0],e[1]=l,e}var xN="Expected a function",Jp=1,HN=2,Ri=8,Pi=16,Ii=32,Qp=64,em=Math.max;function so(e,n,o,r,l,a,s,i){var c=n&HN;if(!c&&typeof e!="function")throw new TypeError(xN);var d=r?r.length:0;if(d||(n&=~(Ii|Qp),r=l=void 0),s=s===void 0?s:em(je(s),0),i=i===void 0?i:je(i),d-=l?l.length:0,n&Qp){var f=r,u=l;r=l=void 0}var p=c?void 0:_i(e),m=[e,n,o,r,l,f,u,a,s,i];if(p&&FN(m,p),e=m[0],n=m[1],o=m[2],r=m[3],l=m[4],i=m[9]=m[9]===void 0?c?0:e.length:em(m[9]-d,0),!i&&n&(Ri|Pi)&&(n&=~(Ri|Pi)),!n||n==Jp)var g=W2(e,n,o);else n==Ri||n==Pi?g=IN(e,n,i):(n==Ii||n==(Jp|Ii))&&!l.length?g=ON(e,n,o,r):g=Ra.apply(void 0,m);var h=p?Op:Hp;return Wp(h(g,m),e,n)}var KN=128;function tm(e,n,o){return n=o?void 0:n,n=e&&n==null?e.length:n,so(e,KN,void 0,void 0,void 0,void 0,n)}function io(e,n,o){n=="__proto__"&&Ta?Ta(e,n,{configurable:!0,enumerable:!0,value:o,writable:!0}):e[n]=o}function Vn(e,n){return e===n||e!==e&&n!==n}var WN=Object.prototype,jN=WN.hasOwnProperty;function El(e,n,o){var r=e[n];(!(jN.call(e,n)&&Vn(r,o))||o===void 0&&!(n in e))&&io(e,n,o)}function xn(e,n,o,r){var l=!o;o||(o={});for(var a=-1,s=n.length;++a<s;){var i=n[a],c=r?r(o[i],e[i],i,o,e):void 0;c===void 0&&(c=e[i]),l?io(o,i,c):El(o,i,c)}return o}var nm=Math.max;function om(e,n,o){return n=nm(n===void 0?e.length-1:n,0),function(){for(var r=arguments,l=-1,a=nm(r.length-n,0),s=Array(a);++l<a;)s[l]=r[n+l];l=-1;for(var i=Array(n+1);++l<n;)i[l]=r[l];return i[n]=o(s),on(e,this,i)}}function Ge(e,n){return Vi(om(e,n,Ft),e+"")}var UN=9007199254740991;function Pa(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=UN}function qt(e){return e!=null&&Pa(e.length)&&!lo(e)}function xt(e,n,o){if(!g
Line truncated
|
||||
`:"";e.replace(p,function(y,b,w,C,k,S){return w||(w=C),u+=e.slice(d,S).replace(lI,XP),b&&(i=!0,u+=`' +
|
||||
__e(`+b+`) +
|
||||
'`),k&&(c=!0,u+=`';
|
||||
`+k+`;
|
||||
__p += '`),w&&(u+=`' +
|
||||
((__t = (`+w+`)) == null ? '' : __t) +
|
||||
'`),d=S+y.length,y}),u+=`';
|
||||
`;var g=Fg.call(n,"variable")&&n.variable;if(!g)u=`with (obj) {
|
||||
`+u+`
|
||||
}
|
||||
`;else if(oI.test(g))throw new Error(QP);u=(c?u.replace(eI,""):u).replace(tI,"$1").replace(nI,"$1;"),u="function("+(g||"obj")+`) {
|
||||
`+(g?"":`obj || (obj = {});
|
||||
`)+"var __t, __p = ''"+(i?", __e = _.escape":"")+(c?`, __j = Array.prototype.join;
|
||||
function print() { __p += __j.call(arguments, '') }
|
||||
`:`;
|
||||
`)+u+`return __p
|
||||
}`;var h=bm(function(){return Function(a,m+"return "+u).apply(void 0,s)});if(h.source=u,xi(h))throw h;return h}var iI="Expected a function";function Io(e,n,o){var r=!0,l=!0;if(typeof e!="function")throw new TypeError(iI);return gt(o)&&(r="leading"in o?!!o.leading:r,l="trailing"in o?!!o.trailing:l),Ot(e,n,{leading:r,maxWait:n,trailing:l})}function Ol(e,n){return n(e)}var cI=9007199254740991,zc=4294967295,dI=Math.min;function fI(e,n){if(e=je(e),e<1||e>cI)return[];var o=zc,r=dI(e,zc);n=jn(n),e-=zc;for(var l=Ai(r,n);++o<e;)n(o);return l}function uI(){return this}function xg(e,n){var o=e;return o instanceof qe&&(o=o.value()),Ui(n,function(r,l){return l.func.apply(l.thisArg,Vo([r],l.args))},o)}function Dc(){return xg(this.__wrapped__,this.__actions__)}function pI(e){return Qe(e).toLowerCase()}function mI(e){return He(e)?ht(e,Hn):tn(e)?[e]:Gt(mm(Qe(e)))}var Hg=9007199254740991;function hI(e){return e?cr(je(e),-Hg,Hg):e===0?e:0}function gI(e){return Qe(e).toUpperCase()}function yI(e,n,o){var r=He(e),l=r||vo(e)||Or(e);if(n=Le(n),o==null){var a=e&&e.constructor;l?o=r?new a:[]:gt(e)?o=lo(a)?Mr(za(e)):{}:o={}}return(l?bn:Wn)(e,function(s,i,c){return n(o,s,i,c)}),o}function Kg(e,n){for(var o=e.length;o--&&Pr(n,e[o],0)>-1;);return o}function Wg(e,n){for(var o=-1,r=e.length;++o<r&&Pr(n,e[o],0)>-1;);return o}function bI(e,n,o){if(e=Qe(e),e&&(o||n===void 0))return Mp(e);if(!e||!(n=nn(n)))return e;var r=Mn(e),l=Mn(n),a=Wg(r,l),s=Kg(r,l)+1;return Mo(r,a,s).join("")}function CI(e,n,o){if(e=Qe(e),e&&(o||n===void 0))return e.slice(0,Vp(e)+1);if(!e||!(n=nn(n)))return e;var r=Mn(e),l=Kg(r,Mn(n))+1;return Mo(r,0,l).join("")}var wI=/^\s+/;function kI(e,n,o){if(e=Qe(e),e&&(o||n===void 0))return e.replace(wI,"");if(!e||!(n=nn(n)))return e;var r=Mn(e),l=Wg(r,Mn(n));return Mo(r,l).join("")}var SI=30,EI="...",NI=/\w*$/;function $I(e,n){var o=SI,r=EI;if(gt(n)){var l="separator"in n?n.separator:l;o="length"in n?je(n.length):o,r="omission"in n?nn(n.omission):r}e=Qe(e);var a=e.length;if(zr(e)){var s=Mn(e);a=s.length}if(o>=a)return e;var i=o-Hr(r);if(i<1)return r;var c=s?Mo(s,0,i).join(""):e.slice(0,i);if(l===void 0)return c+r;if(s&&(i+=c.length-i),Sc(l)){if(e.slice(i).search(l)){var d,f=c;for(l.global||(l=RegExp(l.source,Qe(NI.exec(l))+"g")),l.lastIndex=0;d=l.exec(f);)var u=d.index;c=c.slice(0,u===void 0?i:u)}}else if(e.indexOf(nn(l),i)!=i){var p=c.lastIndexOf(l);p>-1&&(c=c.slice(0,p))}return c+r}function BI(e){return tm(e,1)}var _I={"&":"&","<":"<",">":">",""":'"',"'":"'"},vI=Gi(_I),jg=/&(?:amp|lt|gt|quot|#39);/g,TI=RegExp(jg.source);function VI(e){return e=Qe(e),e&&TI.test(e)?e.replace(jg,vI):e}var MI=1/0,RI=Fr&&1/Fa(new Fr([,-0]))[1]==MI?function(e){return new Fr(e)}:Bi,PI=200;function Ao(e,n,o){var r=-1,l=Ma,a=e.length,s=!0,i=[],c=i;if(o)s=!1,l=hc;else if(a>=PI){var d=n?null:RI(e);if(d)return Fa(d);s=!1,l=Vl,c=new fr}else c=n?[]:i;e:for(;++r<a;){var f=e[r],u=n?n(f):f;if(f=o||f!==0?f:0,s&&u===u){for(var p=c.length;p--;)if(c[p]===u)continue e;n&&c.push(u),i.push(f)}else l(c,u,o)||(c!==i&&c.push(u),i.push(f))}return i}var ns=Ge(function(e){return Ao(Tt(e,1,wt,!0))}),II=Ge(function(e){var n=ln(e);return wt(n)&&(n=void 0),Ao(Tt(e,1,wt,!0),Le(n))}),AI=Ge(function(e){var n=ln(e);return n=typeof n=="function"?n:void 0,Ao(Tt(e,1,wt,!0),void 0,n)});function OI(e){return e&&e.length?Ao(e):[]}function zI(e,n){return e&&e.length?Ao(e,Le(n)):[]}function DI(e,n){return n=typeof n=="function"?n:void 0,e&&e.length?Ao(e,void 0,n):[]}var LI=0;function FI(e){var n=++LI;return Qe(e)+n}function xI(e,n){return e==null?!0:Bc(e,n)}var HI=Math.max;function Lc(e){if(!(e&&e.length))return[];var n=0;return e=Ro(e,function(o){if(wt(o))return n=HI(o.length,n),!0}),Ai(n,function(o){return ht(e,cc(o))})}function Ug(e,n){if(!(e&&e.length))return[];var o=Lc(e);return n==null?o:ht(o,function(r){return on(n,void 0,r)})}function Gg(e,n,o,r){return Al(e,n,o(sr(e,n)),r)}function KI(e,n,o){return e==null?e:Gg(e,n,jn(o))}function WI(e,n,o,r){return r=typeof r=="function"?r:void 0,e==null?e:Gg(e,n,jn(o),r)}var jI=Lr(function(e,n,o){return e+(o?" ":"")+n.toUpperCase()});function UI(e){return e==null?[]:Cc(e,Yt(e))}var GI=Ge(function(e,n){return wt(e)?Rl(e,n):[]});function qI(e,n){return Ja(jn(n),e)}var YI=uo(function(e){var n=e.length,o=n?e[0]:0,r=this.__wrapped__,l=function(a){return Fi(a,e)};return n>1||this.__actions__.length||!(r instanceof qe)||!ao(o)?this.thru(l):(r=r.slice(o,+o+(n?1:0)),r.__actions__.push({func:Ol,args:[l],thisArg:void 0}),new yn(r,this.__chain__).thru(function(a){return n&&!a.length&&a.push(void 0),a}))});function XI(){return Gm(this)}function ZI(){var e=this.__wrapped__;if(e instanceof qe){var n=e;return this.__actions__.length&&(n=new qe(this)),n=n.reverse(),n.__actions__.push({func:Ol,args:[Ic],thisArg:void 0}),new yn(n,this.__chain__)}return this.thru(Ic)}function Fc(e,n,o){var r=e.length;if(r<2)return r?Ao(e[0]):[];for(var l=-1,a=Array(r);++l<r;)for(var s=e[l],i=-1;++i<r;)i!=l&&(a[l]=Rl(a[l]||s,e[i],n,o));return Ao(Tt(a,1),n,o)}var
Line truncated
|
||||
* @license
|
||||
* Lodash (Custom Build) <https://lodash.com/>
|
||||
* Build: `lodash modularize exports="es" -o ./`
|
||||
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
||||
* Released under MIT license <https://lodash.com/license>
|
||||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||||
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||||
*/const SA='a[href],button:not([disabled]),button:not([hidden]),:not([tabindex="-1"]),input:not([disabled]),input:not([type="hidden"]),select:not([disabled]),textarea:not([disabled])',EA=e=>getComputedStyle(e).position==="fixed"?!1:e.offsetParent!==null,Qg=e=>Array.from(e.querySelectorAll(SA)).filter(n=>NA(n)&&EA(n)),NA=e=>{if(e.tabIndex>0||e.tabIndex===0&&e.getAttribute("tabIndex")!==null)return!0;if(e.disabled)return!1;switch(e.nodeName){case"A":return!!e.href&&e.rel!=="ignore";case"INPUT":return!(e.type==="hidden"||e.type==="file");case"BUTTON":case"SELECT":case"TEXTAREA":return!0;default:return!1}},os=function(e,n,...o){let r;n.includes("mouse")||n.includes("click")?r="MouseEvents":n.includes("key")?r="KeyboardEvent":r="HTMLEvents";const l=document.createEvent(r);return l.initEvent(n,...o),e.dispatchEvent(l),e},e0=e=>!e.getAttribute("aria-owns"),t0=(e,n,o)=>{const{parentNode:r}=e;if(!r)return null;const l=r.querySelectorAll(o),a=Array.prototype.indexOf.call(l,e);return l[a+n]||null},rs=e=>{!e||(e.focus(),!e0(e)&&e.click())},Kt=(e,n,o,r=!1)=>{e&&n&&o&&e?.addEventListener(n,o,r)},Sn=(e,n,o,r=!1)=>{e&&n&&o&&e?.removeEventListener(n,o,r)},$A=(e,n,o)=>{const r=function(...l){o&&o.apply(this,l),Sn(e,n,r)};Kt(e,n,r)},ct=(e,n,{checkForDefaultPrevented:o=!0}={})=>l=>{const a=e?.(l);if(o===!1||!a)return n?.(l)},n0=e=>n=>n.pointerType==="mouse"?e(n):void 0;var BA=Object.defineProperty,_A=Object.defineProperties,vA=Object.getOwnPropertyDescriptors,o0=Object.getOwnPropertySymbols,TA=Object.prototype.hasOwnProperty,VA=Object.prototype.propertyIsEnumerable,r0=(e,n,o)=>n in e?BA(e,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[n]=o,MA=(e,n)=>{for(var o in n||(n={}))TA.call(n,o)&&r0(e,o,n[o]);if(o0)for(var o of o0(n))VA.call(n,o)&&r0(e,o,n[o]);return e},RA=(e,n)=>_A(e,vA(n));function l0(e,n){var o;const r=t.shallowRef();return t.watchEffect(()=>{r.value=e()},RA(MA({},n),{flush:(o=n?.flush)!=null?o:"sync"})),t.readonly(r)}function ls(e){return t.getCurrentScope()?(t.onScopeDispose(e),!0):!1}var a0;const Ae=typeof window<"u",PA=e=>typeof e<"u",Bt=e=>typeof e=="boolean",Ne=e=>typeof e=="number",IA=e=>typeof e=="string",Kc=()=>{};Ae&&((a0=window?.navigator)==null?void 0:a0.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function s0(e,n){function o(...r){e(()=>n.apply(this,r),{fn:n,thisArg:this,args:r})}return o}function AA(e,n={}){let o,r;return a=>{const s=t.unref(e),i=t.unref(n.maxWait);if(o&&clearTimeout(o),s<=0||i!==void 0&&i<=0)return r&&(clearTimeout(r),r=null),a();i&&!r&&(r=setTimeout(()=>{o&&clearTimeout(o),r=null,a()},i)),o=setTimeout(()=>{r&&clearTimeout(r),r=null,a()},s)}}function OA(e,n=!0,o=!0){let r=0,l,a=!0;const s=()=>{l&&(clearTimeout(l),l=void 0)};return c=>{const d=t.unref(e),f=Date.now()-r;if(s(),d<=0)return r=Date.now(),c();f>d&&(o||!a)?(r=Date.now(),c()):n&&(l=setTimeout(()=>{r=Date.now(),a=!0,s(),c()},d)),!o&&!l&&(l=setTimeout(()=>a=!0,d)),a=!1}}function zA(e,n=200,o={}){return s0(AA(n,o),e)}function DA(e,n=200,o={}){if(n<=0)return e;const r=t.ref(e.value),l=zA(()=>{r.value=e.value},n,o);return t.watch(e,()=>l()),r}function i0(e,n=200,o=!0,r=!0){return s0(OA(n,o,r),e)}function c0(e,n=!0){t.getCurrentInstance()?t.onMounted(e):n?e():t.nextTick(e)}function ur(e,n,o={}){const{immediate:r=!0}=o,l=t.ref(!1);let a=null;function s(){a&&(clearTimeout(a),a=null)}function i(){l.value=!1,s()}function c(...d){s(),l.value=!0,a=setTimeout(()=>{l.value=!1,a=null,e(...d)},t.unref(n))}return r&&(l.value=!0,Ae&&c()),ls(i),{isPending:l,start:c,stop:i}}function Pn(e){var n;const o=t.unref(e);return(n=o?.$el)!=null?n:o}const zl=Ae?window:void 0,LA=Ae?window.document:void 0;function lt(...e){let n,o,r,l;if(IA(e[0])?([o,r,l]=e,n=zl):[n,o,r,l]=e,!n)return Kc;let a=Kc;const s=t.watch(()=>Pn(n),c=>{a(),c&&(c.addEventListener(o,r,l),a=()=>{c.removeEventListener(o,r,l),a=Kc})},{immediate:!0,flush:"post"}),i=()=>{s(),a()};return ls(i),i}function Wc(e,n,o={}){const{window:r=zl,ignore:l,capture:a=!0}=o;if(!r)return;const s=t.ref(!0);let i;const c=u=>{r.clearTimeout(i);const p=Pn(e),m=u.composedPath();!p||p===u.target||m.includes(p)||!s.value||l&&l.length>0&&l.some(g=>{const h=Pn(g);return h&&(u.target===h||m.includes(h))})||n(u)},d=[lt(r,"click",c,{passive:!0,capture:a}),lt(r,"pointerdown",u=>{const p=Pn(e);s.value=!!p&&!u.composedPath().includes(p)},{passive:!0}),lt(r,"pointerup",u=>{i=r.setTimeout(()=>c(u),50)},{passive:!0})];return()=>d.forEach(u=>u())}const jc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Uc="__vueuse_ssr_handlers__";jc[Uc]=jc[Uc]||{},jc[Uc];function FA({document:e=LA}={}){if(!e)return t.ref("visible");const n=t.ref(e.visibilityState);return lt(e,"visibilitychange",()=>{n.value=e.visibilityState}),n}var d0=Object.getOwnPropertySymbols,xA=Object.prototype.hasOwnProperty,HA=Object.prototype.propertyIsEnumerable,KA=(e,n)=>{var o={};for(var r in e)xA.call(e,r)&&n.indexOf(r)<0&&(o[r]=e[r]);if(e!=null&&d0)for(var r of d0(e))n.indexOLine truncated
|
||||
height:0 !important;
|
||||
visibility:hidden !important;
|
||||
overflow:hidden !important;
|
||||
position:absolute !important;
|
||||
z-index:-1000 !important;
|
||||
top:0 !important;
|
||||
right:0 !important;
|
||||
`,K6=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing"];function W6(e){const n=window.getComputedStyle(e),o=n.getPropertyValue("box-sizing"),r=Number.parseFloat(n.getPropertyValue("padding-bottom"))+Number.parseFloat(n.getPropertyValue("padding-top")),l=Number.parseFloat(n.getPropertyValue("border-bottom-width"))+Number.parseFloat(n.getPropertyValue("border-top-width"));return{contextStyle:K6.map(s=>`${s}:${n.getPropertyValue(s)}`).join(";"),paddingSize:r,borderSize:l,boxSizing:o}}function My(e,n=1,o){var r;zn||(zn=document.createElement("textarea"),document.body.appendChild(zn));const{paddingSize:l,borderSize:a,boxSizing:s,contextStyle:i}=W6(e);zn.setAttribute("style",`${i};${H6}`),zn.value=e.value||e.placeholder||"";let c=zn.scrollHeight;const d={};s==="border-box"?c=c+a:s==="content-box"&&(c=c-l),zn.value="";const f=zn.scrollHeight-l;if(Ne(n)){let u=f*n;s==="border-box"&&(u=u+l+a),c=Math.max(u,c),d.minHeight=`${u}px`}if(Ne(o)){let u=f*o;s==="border-box"&&(u=u+l+a),c=Math.min(u,c)}return d.height=`${c}px`,(r=zn.parentNode)==null||r.removeChild(zn),zn=void 0,d}const Ry=ae({id:{type:String,default:void 0},size:un,disabled:Boolean,modelValue:{type:j([String,Number,Object]),default:""},type:{type:String,default:"text"},resize:{type:String,values:["none","both","horizontal","vertical"]},autosize:{type:j([Boolean,Object]),default:!1},autocomplete:{type:String,default:"off"},formatter:{type:Function},parser:{type:Function},placeholder:{type:String},form:{type:String,default:""},readonly:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},showPassword:{type:Boolean,default:!1},showWordLimit:{type:Boolean,default:!1},suffixIcon:{type:Et,default:""},prefixIcon:{type:Et,default:""},containerRole:{type:String,default:void 0},label:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},validateEvent:{type:Boolean,default:!0},inputStyle:{type:j([Object,Array,String]),default:()=>ut({})}}),Py={[Ve]:e=>ze(e),input:e=>ze(e),change:e=>ze(e),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent,clear:()=>!0,mouseleave:e=>e instanceof MouseEvent,mouseenter:e=>e instanceof MouseEvent,keydown:e=>e instanceof Event,compositionstart:e=>e instanceof CompositionEvent,compositionupdate:e=>e instanceof CompositionEvent,compositionend:e=>e instanceof CompositionEvent},j6=["role"],U6=["id","type","disabled","formatter","parser","readonly","autocomplete","tabindex","aria-label","placeholder"],G6=["id","tabindex","disabled","readonly","autocomplete","aria-label","placeholder"],q6={name:"ElInput",inheritAttrs:!1},Y6=t.defineComponent({...q6,props:Ry,emits:Py,setup(e,{expose:n,emit:o}){const r=e,l={suffix:"append",prefix:"prepend"},a=t.getCurrentInstance(),s=t.useAttrs(),i=t.useSlots(),c=t.computed(()=>{const X={};return r.containerRole==="combobox"&&(X["aria-haspopup"]=s["aria-haspopup"],X["aria-owns"]=s["aria-owns"],X["aria-expanded"]=s["aria-expanded"]),X}),d=ms({excludeKeys:t.computed(()=>Object.keys(c.value))}),{form:f,formItem:u}=Wo(),{inputId:p}=go(r,{formItemContext:u}),m=yt(),g=Ko(),h=Y("input"),y=Y("textarea"),b=t.shallowRef(),w=t.shallowRef(),C=t.ref(!1),k=t.ref(!1),S=t.ref(!1),N=t.ref(!1),E=t.ref(),v=t.shallowRef(r.inputStyle),B=t.computed(()=>b.value||w.value),O=t.computed(()=>{var X;return(X=f?.statusIcon)!=null?X:!1}),D=t.computed(()=>u?.validateState||""),F=t.computed(()=>D.value&&$0[D.value]),P=t.computed(()=>N.value?h8:kD),R=t.computed(()=>[s.style,r.inputStyle]),x=t.computed(()=>[r.inputStyle,v.value,{resize:r.resize}]),I=t.computed(()=>an(r.modelValue)?"":String(r.modelValue)),_=t.computed(()=>r.clearable&&!g.value&&!r.readonly&&!!I.value&&(C.value||k.value)),T=t.computed(()=>r.showPassword&&!g.value&&!r.readonly&&!!I.value&&(!!I.value||C.value)),$=t.computed(()=>r.showWordLimit&&!!d.value.maxlength&&(r.type==="text"||r.type==="textarea")&&!g.value&&!r.readonly&&!r.showPassword),A=t.computed(()=>Array.from(I.value).length),L=t.computed(()=>!!$.value&&A.value>Number(d.value.maxlength)),H=t.computed(()=>!!i.suffix||!!r.suffixIcon||_.value||r.showPassword||$.value||!!D.value&&O.value),[K,Z]=ky(b);sn(w,X=>{if(!$.value||r.resize!=="both")return;const Ee=X[0],{width:Re}=Ee.contentRect;E.value={right:`calc(100% - ${Re+15+6}px)`}});const J=()=>{const{type:X,autosize:Ee}=r;if(!(!Ae||X!=="textarea"))if(Ee){const Re=ot(Ee)?Ee.minRows:void 0,xe=ot(Ee)?Ee.maxRows:void 0;v.value={...My(w.value,Re,xe)}}else v.value={minHeight:My(w.value).minHeight}},U=()=>{const X=B.value;!X||X.value===I.value||(X.value=I.value)},G=X=>{const{el:Ee}=a.vnode;if(!Ee)return;const xe=Array.from(Ee.querySelectorAll(`.${h.e(X)}`)).find(re=>re.parentNode===Ee);if(!xe)return;const q=l[X];i[q]?xe.style.transform=`translateX(${X==="suffix"?"-":""}${Ee.querySelector(`.${h.be("group",q)}`).offsetWidth}px)`:xe.removeAttribute("style")},ie=()=>{G("prefix"),G("suf
Line truncated
|
||||
* Checks if an event is supported in the current execution environment.
|
||||
*
|
||||
* NOTE: This will not work correctly for non-generic events such as `change`,
|
||||
* `reset`, `load`, `error`, and `select`.
|
||||
*
|
||||
* Borrows from Modernizr.
|
||||
*
|
||||
* @param {string} eventNameSuffix Event name, e.g. "click".
|
||||
* @param {?boolean} capture Check if the capture phase is supported.
|
||||
* @return {boolean} True if the event is supported.
|
||||
* @internal
|
||||
* @license Modernizr 3.0.0pre (Custom Build) | MIT
|
||||
*/const F5=function(e,n){if(e&&e.addEventListener){const o=function(r){const l=L5(r);n&&Reflect.apply(n,this,[r,l])};e.addEventListener("wheel",o,{passive:!0})}},CC={beforeMount(e,n){F5(e,n.value)}},wC={beforeMount(e,n){e._handleResize=()=>{var o;e&&((o=n.value)==null||o.call(n,e))},XA(e,e._handleResize)},beforeUnmount(e){ZA(e,e._handleResize)}},x5=ae({role:{type:String,required:!0},spinnerDate:{type:j(Object),required:!0},showSeconds:{type:Boolean,default:!0},arrowControl:Boolean,amPmMode:{type:j(String),default:""},...Jb}),H5=["onClick"],K5=["onMouseenter"];var _f=ne(t.defineComponent({__name:"basic-time-spinner",props:x5,emits:["change","select-range","set-option"],setup(e,{emit:n}){const o=e,r=Y("time"),{getHoursList:l,getMinutesList:a,getSecondsList:s}=tC(o.disabledHours,o.disabledMinutes,o.disabledSeconds);let i=!1;const c=t.ref(),d=t.ref(),f=t.ref(),u=t.ref(),p={hours:d,minutes:f,seconds:u},m=t.computed(()=>o.showSeconds?cf:cf.slice(0,2)),g=t.computed(()=>{const{spinnerDate:T}=o,$=T.hour(),A=T.minute(),L=T.second();return{hours:$,minutes:A,seconds:L}}),h=t.computed(()=>{const{hours:T,minutes:$}=t.unref(g);return{hours:l(o.role),minutes:a(T,o.role),seconds:s(T,$,o.role)}}),y=t.computed(()=>{const{hours:T,minutes:$,seconds:A}=t.unref(g);return{hours:Ps(T,23),minutes:Ps($,59),seconds:Ps(A,59)}}),b=Ot(T=>{i=!1,k(T)},200),w=T=>{if(!!!o.amPmMode)return"";const A=o.amPmMode==="A";let L=T<12?" am":" pm";return A&&(L=L.toUpperCase()),L},C=T=>{let $;switch(T){case"hours":$=[0,2];break;case"minutes":$=[3,5];break;case"seconds":$=[6,8];break}const[A,L]=$;n("select-range",A,L),c.value=T},k=T=>{E(T,t.unref(g)[T])},S=()=>{k("hours"),k("minutes"),k("seconds")},N=T=>T.querySelector(`.${r.namespace.value}-scrollbar__wrap`),E=(T,$)=>{if(o.arrowControl)return;const A=t.unref(p[T]);A&&A.$el&&(N(A.$el).scrollTop=Math.max(0,$*v(T)))},v=T=>{const $=t.unref(p[T]);return $?.$el.querySelector("li").offsetHeight||0},B=()=>{D(1)},O=()=>{D(-1)},D=T=>{c.value||C("hours");const $=c.value;let A=t.unref(g)[$];const L=c.value==="hours"?24:60;A=(A+T+L)%L,F($,A),E($,A),t.nextTick(()=>C($))},F=(T,$)=>{if(t.unref(h)[T][$])return;const{hours:H,minutes:K,seconds:Z}=t.unref(g);let J;switch(T){case"hours":J=o.spinnerDate.hour($).minute(K).second(Z);break;case"minutes":J=o.spinnerDate.hour(H).minute($).second(Z);break;case"seconds":J=o.spinnerDate.hour(H).minute(K).second($);break}n("change",J)},P=(T,{value:$,disabled:A})=>{A||(F(T,$),C(T),E(T,$))},R=T=>{i=!0,b(T);const $=Math.min(Math.round((N(t.unref(p[T]).$el).scrollTop-(x(T)*.5-10)/v(T)+3)/v(T)),T==="hours"?23:59);F(T,$)},x=T=>t.unref(p[T]).$el.offsetHeight,I=()=>{const T=$=>{const A=t.unref(p[$]);A&&A.$el&&(N(A.$el).onscroll=()=>{R($)})};T("hours"),T("minutes"),T("seconds")};t.onMounted(()=>{t.nextTick(()=>{!o.arrowControl&&I(),S(),o.role==="start"&&C("hours")})});const _=(T,$)=>{p[$].value=T};return n("set-option",[`${o.role}_scrollDown`,D]),n("set-option",[`${o.role}_emitSelectRange`,C]),t.watch(()=>o.spinnerDate,()=>{i||S()}),(T,$)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass([t.unref(r).b("spinner"),{"has-seconds":T.showSeconds}])},[T.arrowControl?t.createCommentVNode("v-if",!0):(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(t.unref(m),A=>(t.openBlock(),t.createBlock(t.unref(Jn),{key:A,ref_for:!0,ref:L=>_(L,A),class:t.normalizeClass(t.unref(r).be("spinner","wrapper")),"wrap-style":"max-height: inherit;","view-class":t.unref(r).be("spinner","list"),noresize:"",tag:"ul",onMouseenter:L=>C(A),onMousemove:L=>k(A)},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(h)[A],(L,H)=>(t.openBlock(),t.createElementBlock("li",{key:H,class:t.normalizeClass([t.unref(r).be("spinner","item"),t.unref(r).is("active",H===t.unref(g)[A]),t.unref(r).is("disabled",L)]),onClick:K=>P(A,{value:H,disabled:L})},[A==="hours"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(t.toDisplayString(("0"+(T.amPmMode?H%12||12:H)).slice(-2))+t.toDisplayString(w(H)),1)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(("0"+H).slice(-2)),1)],64))],10,H5))),128))]),_:2},1032,["class","view-class","onMouseenter","onMousemove"]))),128)),T.arrowControl?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList(t.unref(m),A=>(t.openBlock(),t.createElementBlock("div",{key:A,class:t.normalizeClass([t.unref(r).be("spinner","wrapper"),t.unref(r).is("arrow")]),onMouseenter:L=>C(A)},[t.withDirectives((t.openBlock(),t.createBlock(t.unref(ue),{class:t.normalizeClass(["arrow-up",t.unref(r).be("spinner","arrow")])},{default:t.withCtx(()=>[t.createVNode(t.unref(xl))]),_:1},8,["class"])),[[t.unref(na),O]]),t.withDirectives((t.openBlock(),t.createBlock(t.unref(ue),{class:t.normalizeClass(["arrow-down",t.unref(r).be("spinner","arrow")])},{default:t.withCtx(()=>[t.createVNode(t.unref(pr))]),_:1},8,["class"])),[[t.unref(na),B]]),t.createElementVNode("ul",{class:t.normalizeCLine truncated
|
||||
Add an empty element to avoid render label,
|
||||
do not use empty fragment here for https://github.com/vuejs/vue-next/pull/2485
|
||||
`),qH]),_:1},8,["model-value","label","disabled","onUpdate:modelValue"])):e.isLeaf&&e.node.checked?(t.openBlock(),t.createBlock(d,{key:2,class:t.normalizeClass(e.ns.e("prefix"))},{default:t.withCtx(()=>[t.createVNode(c)]),_:1},8,["class"])):t.createCommentVNode("v-if",!0),t.createCommentVNode(" content "),t.createVNode(f),t.createCommentVNode(" postfix "),e.isLeaf?t.createCommentVNode("v-if",!0):(t.openBlock(),t.createElementBlock(t.Fragment,{key:3},[e.node.loading?(t.openBlock(),t.createBlock(d,{key:0,class:t.normalizeClass([e.ns.is("loading"),e.ns.e("postfix")])},{default:t.withCtx(()=>[t.createVNode(u)]),_:1},8,["class"])):(t.openBlock(),t.createBlock(d,{key:1,class:t.normalizeClass(["arrow-right",e.ns.e("postfix")])},{default:t.withCtx(()=>[t.createVNode(p)]),_:1},8,["class"]))],64))],42,GH)}var XH=ne(UH,[["render",YH],["__file","node.vue"]]);const ZH=t.defineComponent({name:"ElCascaderMenu",components:{Loading:Do,ElIcon:ue,ElScrollbar:Jn,ElCascaderNode:XH},props:{nodes:{type:Array,required:!0},index:{type:Number,required:!0}},setup(e){const n=t.getCurrentInstance(),o=Y("cascader-menu"),{t:r}=We(),l=Kl();let a=null,s=null;const i=t.inject(xs),c=t.ref(null),d=t.computed(()=>!e.nodes.length),f=t.computed(()=>!i.initialLoaded),u=t.computed(()=>`cascader-menu-${l}-${e.index}`),p=y=>{a=y.target},m=y=>{if(!(!i.isHoverMenu||!a||!c.value))if(a.contains(y.target)){g();const b=n.vnode.el,{left:w}=b.getBoundingClientRect(),{offsetWidth:C,offsetHeight:k}=b,S=y.clientX-w,N=a.offsetTop,E=N+a.offsetHeight;c.value.innerHTML=`
|
||||
<path style="pointer-events: auto;" fill="transparent" d="M${S} ${N} L${C} 0 V${N} Z" />
|
||||
<path style="pointer-events: auto;" fill="transparent" d="M${S} ${E} L${C} ${k} V${E} Z" />
|
||||
`}else s||(s=window.setTimeout(h,i.config.hoverThreshold))},g=()=>{!s||(clearTimeout(s),s=null)},h=()=>{!c.value||(c.value.innerHTML="",g())};return{ns:o,panel:i,hoverZone:c,isEmpty:d,isLoading:f,menuId:u,t:r,handleExpand:p,handleMouseMove:m,clearHoverZone:h}}});function JH(e,n,o,r,l,a){const s=t.resolveComponent("el-cascader-node"),i=t.resolveComponent("loading"),c=t.resolveComponent("el-icon"),d=t.resolveComponent("el-scrollbar");return t.openBlock(),t.createBlock(d,{key:e.menuId,tag:"ul",role:"menu",class:t.normalizeClass(e.ns.b()),"wrap-class":e.ns.e("wrap"),"view-class":[e.ns.e("list"),e.ns.is("empty",e.isEmpty)],onMousemove:e.handleMouseMove,onMouseleave:e.clearHoverZone},{default:t.withCtx(()=>{var f;return[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.nodes,u=>(t.openBlock(),t.createBlock(s,{key:u.uid,node:u,"menu-id":e.menuId,onExpand:e.handleExpand},null,8,["node","menu-id","onExpand"]))),128)),e.isLoading?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(e.ns.e("empty-text"))},[t.createVNode(c,{size:"14",class:t.normalizeClass(e.ns.is("loading"))},{default:t.withCtx(()=>[t.createVNode(i)]),_:1},8,["class"]),t.createTextVNode(" "+t.toDisplayString(e.t("el.cascader.loading")),1)],2)):e.isEmpty?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(e.ns.e("empty-text"))},t.toDisplayString(e.t("el.cascader.noData")),3)):(f=e.panel)!=null&&f.isHoverMenu?(t.openBlock(),t.createElementBlock("svg",{key:2,ref:"hoverZone",class:t.normalizeClass(e.ns.e("hover-zone"))},null,2)):t.createCommentVNode("v-if",!0)]}),_:1},8,["class","wrap-class","view-class","onMousemove","onMouseleave"])}var QH=ne(ZH,[["render",JH],["__file","menu.vue"]]),Af=(e=>(e.CLICK="click",e.HOVER="hover",e))(Af||{});let e9=0;const t9=e=>{const n=[e];let{parent:o}=e;for(;o;)n.unshift(o),o=o.parent;return n};class tl{constructor(n,o,r,l=!1){this.data=n,this.config=o,this.parent=r,this.root=l,this.uid=e9++,this.checked=!1,this.indeterminate=!1,this.loading=!1;const{value:a,label:s,children:i}=o,c=n[i],d=t9(this);this.level=l?0:r?r.level+1:1,this.value=n[a],this.label=n[s],this.pathNodes=d,this.pathValues=d.map(f=>f.value),this.pathLabels=d.map(f=>f.label),this.childrenData=c,this.children=(c||[]).map(f=>new tl(f,o,this)),this.loaded=!o.lazy||this.isLeaf||!Ll(c)}get isDisabled(){const{data:n,parent:o,config:r}=this,{disabled:l,checkStrictly:a}=r;return(dt(l)?l(n,this):!!n[l])||!a&&o?.isDisabled}get isLeaf(){const{data:n,config:o,childrenData:r,loaded:l}=this,{lazy:a,leaf:s}=o,i=dt(s)?s(n,this):n[s];return cn(i)?a&&!l?!1:!(Array.isArray(r)&&r.length):!!i}get valueByOption(){return this.config.emitPath?this.pathValues:this.value}appendChild(n){const{childrenData:o,children:r}=this,l=new tl(n,this.config,this);return Array.isArray(o)?o.push(n):this.childrenData=[n],r.push(l),l}calcText(n,o){const r=n?this.pathLabels.join(o):this.label;return this.text=r,r}broadcast(n,...o){const r=`onParent${mo(n)}`;this.children.forEach(l=>{l&&(l.broadcast(n,...o),l[r]&&l[r](...o))})}emit(n,...o){const{parent:r}=this,l=`onChild${mo(n)}`;r&&(r[l]&&r[l](...o),r.emit(n,...o))}onParentCheck(n){this.isDisabled||this.setCheckState(n)}onChildCheck(){const{children:n}=this,o=n.filter(l=>!l.isDisabled),r=o.length?o.every(l=>l.checked):!1;this.setCheckState(r)}setCheckState(n){const o=this.children.length,r=this.children.reduce((l,a)=>{const s=a.checked?1:a.indeterminate?.5:0;return l+s},0);this.checked=this.loaded&&this.children.filter(l=>!l.isDisabled).every(l=>l.loaded&&l.checked)&&n,this.indeterminate=this.loaded&&r!==o&&r>0}doCheck(n){if(this.checked===n)return;const{checkStrictly:o,multiple:r}=this.config;o||!r?this.checked=n:(this.broadcast("check",n),this.setCheckState(n),this.emit("check"))}}const Of=(e,n)=>e.reduce((o,r)=>(r.isLeaf?o.push(r):(!n&&o.push(r),o=o.concat(Of(r.children,n))),o),[]);class XC{constructor(n,o){this.config=o;const r=(n||[]).map(l=>new tl(l,this.config));this.nodes=r,this.allNodes=Of(r,!1),this.leafNodes=Of(r,!0)}getNodes(){return this.nodes}getFlattedNodes(n){return n?this.leafNodes:this.allNodes}appendNode(n,o){const r=o?o.appendChild(n):new tl(n,this.config);o||this.nodes.push(r),this.allNodes.push(r),r.isLeaf&&this.leafNodes.push(r)}appendNodes(n,o){n.forEach(r=>this.appendNode(r,o))}getNodeByValue(n,o=!1){return!n&&n!==0?null:this.getFlattedNodes(o).find(l=>Xt(l.value,n)||Xt(l.pathValues,n))||null}getSameNode(n){return n&&this.getFlattedNodes(!1).find(({value:r,level:l})=>Xt(n.value,r)&&n.level===l)||null}}const zf={modelValue:[Number,String,Array],options:{type:Array,default:()=>[]},props:{type:Object,default:()=>({})}},ZC={expandTrigger:Af.CLICK,multiple:!1,checkStrictly:!1,emitPath:!0,lazy:!1,lazyLoad:Ze,value:"value",label:"label",children:"children",leaf:"leaf",disabled:"disabled",hoverThreshold:500},JC=e=>t.computed(()=>({...ZC,...e.props})),QC=e=>{if(!e)return 0;const n=e.id.split("-");return Number(n[n.length-2])},n9=e=>{if(!e)return;const n=e.querySelecto
Line truncated
|
||||
M 50 50
|
||||
m 0 ${k?"":"-"}${C}
|
||||
a ${C} ${C} 0 1 1 0 ${k?"-":""}${C*2}
|
||||
a ${C} ${C} 0 1 1 0 ${k?"":"-"}${C*2}
|
||||
`}),c=t.computed(()=>2*Math.PI*s.value),d=t.computed(()=>n.type==="dashboard"?.75:1),f=t.computed(()=>`${-1*c.value*(1-d.value)/2}px`),u=t.computed(()=>({strokeDasharray:`${c.value*d.value}px, ${c.value}px`,strokeDashoffset:f.value})),p=t.computed(()=>({strokeDasharray:`${c.value*d.value*(n.percentage/100)}px, ${c.value}px`,strokeDashoffset:f.value,transition:"stroke-dasharray 0.6s ease 0s, stroke 0.6s ease, opacity ease 0.6s"})),m=t.computed(()=>{let C;return n.color?C=w(n.percentage):C=o[n.status]||o.default,C}),g=t.computed(()=>n.status==="warning"?cs:n.type==="line"?n.status==="success"?Qc:zo:n.status==="success"?Hl:An),h=t.computed(()=>n.type==="line"?12+n.strokeWidth*.4:n.width*.111111+2),y=t.computed(()=>n.format(n.percentage));function b(C){const k=100/C.length;return C.map((N,E)=>ze(N)?{color:N,percentage:(E+1)*k}:N).sort((N,E)=>N.percentage-E.percentage)}const w=C=>{var k;const{color:S}=n;if(dt(S))return S(C);if(ze(S))return S;{const N=b(S);for(const E of N)if(E.percentage>C)return E.color;return(k=N[N.length-1])==null?void 0:k.color}};return(C,k)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass([t.unref(r).b(),t.unref(r).m(C.type),t.unref(r).is(C.status),{[t.unref(r).m("without-text")]:!C.showText,[t.unref(r).m("text-inside")]:C.textInside}]),role:"progressbar","aria-valuenow":C.percentage,"aria-valuemin":"0","aria-valuemax":"100"},[C.type==="line"?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(t.unref(r).b("bar"))},[t.createElementVNode("div",{class:t.normalizeClass(t.unref(r).be("bar","outer")),style:t.normalizeStyle({height:`${C.strokeWidth}px`})},[t.createElementVNode("div",{class:t.normalizeClass([t.unref(r).be("bar","inner"),{[t.unref(r).bem("bar","inner","indeterminate")]:C.indeterminate}]),style:t.normalizeStyle(t.unref(l))},[(C.showText||C.$slots.default)&&C.textInside?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(t.unref(r).be("bar","innerText"))},[t.renderSlot(C.$slots,"default",{percentage:C.percentage},()=>[t.createElementVNode("span",null,t.toDisplayString(t.unref(y)),1)])],2)):t.createCommentVNode("v-if",!0)],6)],6)],2)):(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(t.unref(r).b("circle")),style:t.normalizeStyle({height:`${C.width}px`,width:`${C.width}px`})},[(t.openBlock(),t.createElementBlock("svg",OG,[t.createElementVNode("path",{class:t.normalizeClass(t.unref(r).be("circle","track")),d:t.unref(i),stroke:`var(${t.unref(r).cssVarName("fill-color-light")}, #e5e9f2)`,"stroke-width":t.unref(a),fill:"none",style:t.normalizeStyle(t.unref(u))},null,14,zG),t.createElementVNode("path",{class:t.normalizeClass(t.unref(r).be("circle","path")),d:t.unref(i),stroke:t.unref(m),fill:"none",opacity:C.percentage?1:0,"stroke-linecap":C.strokeLinecap,"stroke-width":t.unref(a),style:t.normalizeStyle(t.unref(p))},null,14,DG)]))],6)),(C.showText||C.$slots.default)&&!C.textInside?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(t.unref(r).e("text")),style:t.normalizeStyle({fontSize:`${t.unref(h)}px`})},[t.renderSlot(C.$slots,"default",{percentage:C.percentage},()=>[C.status?(t.openBlock(),t.createBlock(t.unref(ue),{key:1},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.unref(g))))]),_:1})):(t.openBlock(),t.createElementBlock("span",LG,t.toDisplayString(t.unref(y)),1))])],6)):t.createCommentVNode("v-if",!0)],10,AG))}});var HG=ne(xG,[["__file","progress.vue"]]);const Cu=Te(HG),Ek=ae({modelValue:{type:Number,default:0},id:{type:String,default:void 0},lowThreshold:{type:Number,default:2},highThreshold:{type:Number,default:4},max:{type:Number,default:5},colors:{type:j([Array,Object]),default:()=>ut(["","",""])},voidColor:{type:String,default:""},disabledVoidColor:{type:String,default:""},icons:{type:j([Array,Object]),default:()=>[is,is,is]},voidIcon:{type:Et,default:()=>r8},disabledVoidIcon:{type:Et,default:()=>is},disabled:{type:Boolean},allowHalf:{type:Boolean},showText:{type:Boolean},showScore:{type:Boolean},textColor:{type:String,default:""},texts:{type:j(Array),default:()=>ut(["Extremely bad","Disappointed","Fair","Satisfied","Surprise"])},scoreTemplate:{type:String,default:"{value}"},size:{type:String,validator:xo},label:{type:String,default:void 0}}),Nk={[rt]:e=>Ne(e),[Ve]:e=>Ne(e)},KG=["id","aria-label","aria-labelledby","aria-valuenow","aria-valuetext","aria-valuemax"],WG=["onMousemove","onClick"],jG={name:"ElRate"},UG=t.defineComponent({...jG,props:Ek,emits:Nk,setup(e,{expose:n,emit:o}){const r=e;function l(I,_){const T=L=>ot(L),$=Object.keys(_).map(L=>+L).filter(L=>{const H=_[L];return(T(H)?H.excluded:!1)?I<L:I<=L}).sort((L,H)=>L-H),A=_[$[0]];return T(A)&&A.value||A}const a=t.inject(fn,void 0),s=t.inject(Mt,void 0),i=yt(),c=Y("rate"),{inputId:d,isLabeledByFormItem:f}=go(r,{formItemContext:s}),u=t.ref(r.modelValue),p=t.ref(-1),m=t.ref(!0),g=t.computed(()=>[c.b(),c.m(i.value)]),h=t.computed(()=>r.disabled||a?.disabled),y=t.computed(()=>c.cs
Line truncated
|
||||
* escape-html
|
||||
* Copyright(c) 2012-2013 TJ Holowaychuk
|
||||
* Copyright(c) 2015 Andreas Lubbe
|
||||
* Copyright(c) 2015 Tiancheng "Timothy" Gu
|
||||
* MIT Licensed
|
||||
*/const zu=function(e){let n=e.target;for(;n&&n.tagName.toUpperCase()!=="HTML";){if(n.tagName.toUpperCase()==="TD")return n;n=n.parentNode}return null},$S=function(e){return e!==null&&typeof e=="object"},OY=function(e,n,o,r,l){if(!n&&!r&&(!l||Array.isArray(l)&&!l.length))return e;typeof o=="string"?o=o==="descending"?-1:1:o=o&&o<0?-1:1;const a=r?null:function(i,c){return l?(Array.isArray(l)||(l=[l]),l.map(d=>typeof d=="string"?et(i,d):d(i,c,e))):(n!=="$key"&&$S(i)&&"$value"in i&&(i=i.$value),[$S(i)?et(i,n):i])},s=function(i,c){if(r)return r(i.value,c.value);for(let d=0,f=i.key.length;d<f;d++){if(i.key[d]<c.key[d])return-1;if(i.key[d]>c.key[d])return 1}return 0};return e.map((i,c)=>({value:i,index:c,key:a?a(i,c):null})).sort((i,c)=>{let d=s(i,c);return d||(d=i.index-c.index),d*+o}).map(i=>i.value)},BS=function(e,n){let o=null;return e.columns.forEach(r=>{r.id===n&&(o=r)}),o},zY=function(e,n){let o=null;for(let r=0;r<e.columns.length;r++){const l=e.columns[r];if(l.columnKey===n){o=l;break}}return o},_S=function(e,n,o){const r=(n.className||"").match(new RegExp(`${o}-table_[^\\s]+`,"gm"));return r?BS(e,r[0]):null},It=(e,n)=>{if(!e)throw new Error("Row is required when get row identity");if(typeof n=="string"){if(!n.includes("."))return`${e[n]}`;const o=n.split(".");let r=e;for(const l of o)r=r[l];return`${r}`}else if(typeof n=="function")return n.call(null,e)},_r=function(e,n){const o={};return(e||[]).forEach((r,l)=>{o[It(r,n)]={row:r,index:l}}),o};function DY(e,n){const o={};let r;for(r in e)o[r]=e[r];for(r in n)if(Vt(n,r)){const l=n[r];typeof l<"u"&&(o[r]=l)}return o}function Du(e){return e===""||e!==void 0&&(e=Number.parseInt(e,10),Number.isNaN(e)&&(e="")),e}function vS(e){return e===""||e!==void 0&&(e=Du(e),Number.isNaN(e)&&(e=80)),e}function Lu(e){return typeof e=="number"?e:typeof e=="string"?/^\d+(?:px)?$/.test(e)?Number.parseInt(e,10):e:null}function LY(...e){return e.length===0?n=>n:e.length===1?e[0]:e.reduce((n,o)=>(...r)=>n(o(...r)))}function di(e,n,o){let r=!1;const l=e.indexOf(n),a=l!==-1,s=()=>{e.push(n),r=!0},i=()=>{e.splice(l,1),r=!0};return typeof o=="boolean"?o&&!a?s():!o&&a&&i():a?i():s(),r}function FY(e,n,o="children",r="hasChildren"){const l=s=>!(Array.isArray(s)&&s.length);function a(s,i,c){n(s,i,c),i.forEach(d=>{if(d[r]){n(d,null,c+1);return}const f=d[o];l(f)||a(d,f,c+1)})}e.forEach(s=>{if(s[r]){n(s,null,0);return}const i=s[o];l(i)||a(s,i,0)})}let Qo;function xY(e,n,o,r,l){const{nextZIndex:a}=Xn(),s=e?.dataset.prefix,i=e?.querySelector(`.${s}-scrollbar__wrap`);function c(){const g=l==="light",h=document.createElement("div");return h.className=`${s}-popper ${g?"is-light":"is-dark"}`,o=IY(o),h.innerHTML=o,h.style.zIndex=String(a()),e?.appendChild(h),h}function d(){const g=document.createElement("div");return g.className=`${s}-popper__arrow`,g}function f(){u&&u.update()}Qo=()=>{try{u&&u.destroy(),p&&e?.removeChild(p),Sn(n,"mouseenter",f),Sn(n,"mouseleave",Qo),i&&Sn(i,"scroll",Qo),Qo=void 0}catch{}};let u=null;const p=c(),m=d();return p.appendChild(m),u=db(n,p,{strategy:"absolute",modifiers:[{name:"offset",options:{offset:[0,8]}},{name:"arrow",options:{element:m,padding:10}}],...r}),Kt(n,"mouseenter",f),Kt(n,"mouseleave",Qo),i&&Kt(i,"scroll",Qo),u}const TS=(e,n,o,r)=>{let l=0,a=e;if(r){if(r[e].colSpan>1)return{};for(let c=0;c<e;c++)l+=r[c].colSpan;a=l+r[e].colSpan-1}else l=e;let s;const i=o.states.columns;switch(n){case"left":a<o.states.fixedLeafColumnsLength.value&&(s="left");break;case"right":l>=i.value.length-o.states.rightFixedLeafColumnsLength.value&&(s="right");break;default:a<o.states.fixedLeafColumnsLength.value?s="left":l>=i.value.length-o.states.rightFixedLeafColumnsLength.value&&(s="right")}return s?{direction:s,start:l,after:a}:{}},Fu=(e,n,o,r,l)=>{const a=[],{direction:s,start:i}=TS(n,o,r,l);if(s){const c=s==="left";a.push(`${e}-fixed-column--${s}`),c&&i===r.states.fixedLeafColumnsLength.value-1?a.push("is-last-column"):!c&&i===r.states.columns.value.length-r.states.rightFixedLeafColumnsLength.value&&a.push("is-first-column")}return a};function VS(e,n){return e+(n.realWidth===null||Number.isNaN(n.realWidth)?Number(n.width):n.realWidth)}const xu=(e,n,o,r)=>{const{direction:l,start:a=0}=TS(e,n,o,r);if(!l)return;const s={},i=l==="left",c=o.states.columns.value;return i?s.left=c.slice(0,e).reduce(VS,0):s.right=c.slice(a+1).reverse().reduce(VS,0),s},cl=(e,n)=>{!e||Number.isNaN(e[n])||(e[n]=`${e[n]}px`)};function HY(e){const n=t.getCurrentInstance(),o=t.ref(!1),r=t.ref([]);return{updateExpandRows:()=>{const c=e.data.value||[],d=e.rowKey.value;if(o.value)r.value=c.slice();else if(d){const f=_r(r.value,d);r.value=c.reduce((u,p)=>{const m=It(p,d);return f[m]&&u.push(p),u},[])}else r.value=[]},toggleRowExpansion:(c,d)=>{di(r.value,c,d)&&n.emit("expand-change",c,r.value.slice())},setExpandRowKeys:c=>{n.store.assertRowKey();const d=e.data.value||[],f=e.rowKey.value,u=_r(d,f);r.value=c.reduce((p,m)=>{const g=u[m];return g&&p.push(g.row),p},[])},isRowExpanded:c=>{const d=e.rowKey.value;retuLine truncated
|
||||
@@ -0,0 +1,2 @@
|
||||
<?php
|
||||
// Silence is golden.
|
||||
@@ -0,0 +1,347 @@
|
||||
(function () {
|
||||
window.init_wpfront_notifiction_bar_options = function (data, settings, is_pro) {
|
||||
var $ = jQuery;
|
||||
var app = Vue.createApp({
|
||||
data() {
|
||||
return data;
|
||||
},
|
||||
mounted() {
|
||||
var $div = $('div.wrap.notification-bar-add-edit');
|
||||
$(function () {
|
||||
$div.find('.if-js-closed').removeClass('if-js-closed').addClass('closed');
|
||||
postboxes.add_postbox_toggles('<?php echo $this->controller->get_menu_slug(); ?>');
|
||||
});
|
||||
|
||||
this.minutestohours();
|
||||
if (is_pro) {
|
||||
this.tinymce();
|
||||
if (data.editor == "visual") {
|
||||
this.tinymceinit();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
tinymceinit() {
|
||||
if (typeof tinymce !== 'undefined') {
|
||||
tinymce.init({
|
||||
body_id: "wpfront-notification-bar-editor",
|
||||
body_class: "wpfront-notification-bar-editor wpfront-message",
|
||||
selector: 'textarea#notification-bar-message-text',
|
||||
height: '400',
|
||||
plugins: 'code, lists, link, fullscreen, image, media, quickbars, hr',
|
||||
quickbars_selection_toolbar: 'bold italic underline | formatselect | blockquote quicklink',
|
||||
menubar: false,
|
||||
media_live_embeds: true,
|
||||
content_css: settings.content_css,
|
||||
content_style: "body{ text-align: center; padding: 0; margin: 0; } p{ margin: 0; }",
|
||||
toolbar1: 'undo redo | styleselect | fontselect fontsizeselect forecolor backcolor | numlist bullist | bold italic strikethrough blockquote underline lineheight hr | code',
|
||||
toolbar2: 'alignleft aligncenter alignright | link unlink | outdent indent | uploadmedia image media',
|
||||
fontsize_formats: settings.fontsize_formats,
|
||||
font_formats: settings.font_formats,
|
||||
setup: function (editor) {
|
||||
var frame;
|
||||
editor.ui.registry.addButton('uploadmedia', {
|
||||
icon: 'upload',
|
||||
tooltip: settings.tinymce_tooltip,
|
||||
onAction: function () {
|
||||
if (frame) {
|
||||
frame.open();
|
||||
return;
|
||||
}
|
||||
|
||||
frame = wp.media({
|
||||
title: settings.tinymce_title,
|
||||
button: {
|
||||
text: settings.tinymce_button_text,
|
||||
},
|
||||
multiple: false
|
||||
});
|
||||
|
||||
|
||||
frame.on('select', function () {
|
||||
|
||||
var attachment = frame.state().get('selection').first().toJSON();
|
||||
var media_file;
|
||||
|
||||
if (attachment.type == 'image') {
|
||||
media_file = '<img width="' + attachment.width + '" height="' + attachment.height + '"' + 'src="' + attachment.url + '">';
|
||||
} else if (attachment.type == 'video') {
|
||||
media_file = '<video width="320" height="240" controls>' + '<source src="' + attachment.url + '" type="video/mp4">' + '</video>';
|
||||
} else {
|
||||
media_file = '<a href="' + attachment.url + '">' + attachment.name + '</a>';
|
||||
}
|
||||
editor.execCommand('mceInsertContent', false, media_file);
|
||||
});
|
||||
|
||||
frame.open();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
} else {
|
||||
var self = this;
|
||||
setTimeout(function(){ self.tinymceinit() }, 100);
|
||||
}
|
||||
},
|
||||
tinymce(){
|
||||
},
|
||||
mediaLibrary() {
|
||||
var mediaLibrary = null;
|
||||
if (mediaLibrary === null) {
|
||||
mediaLibrary = wp.media.frames.file_frame = wp.media({
|
||||
title: settings.choose_image,
|
||||
multiple: false,
|
||||
button: {
|
||||
text: settings.select_image
|
||||
}
|
||||
}).on('select', function () {
|
||||
var obj = mediaLibrary.state().get('selection').first().toJSON();
|
||||
|
||||
$('#reopen-button-image-url').val(obj.url);
|
||||
});
|
||||
}
|
||||
|
||||
mediaLibrary.open();
|
||||
return false;
|
||||
},
|
||||
|
||||
minutestohours() {
|
||||
var duration = parseInt($('input[name="wpfront-notification-bar-options[schedule_duration]"]').val());
|
||||
if (duration > 60) {
|
||||
var hours = (duration / 60);
|
||||
var comp_hours = Math.floor(hours);
|
||||
var minutes = (hours - comp_hours) * 60;
|
||||
var comp_minutes = Math.round(minutes);
|
||||
var hours_minutes;
|
||||
if (comp_minutes > 0) {
|
||||
hours_minutes = settings.x_hours_minutes.replace("%1$d", comp_hours).replace("%2$d", comp_minutes);
|
||||
} else {
|
||||
hours_minutes = settings.x_hours.replace("%1$d", comp_hours);
|
||||
}
|
||||
$('#schedule_duration').replaceWith('<span id="schedule_duration" class="description">= ' + hours_minutes + '</span>');
|
||||
} else {
|
||||
$('#schedule_duration').replaceWith('<span id="schedule_duration" class="description"></span>');
|
||||
}
|
||||
},
|
||||
|
||||
schedules() {
|
||||
var cronminutes = [];
|
||||
var cronhours = [];
|
||||
var cronmday = [];
|
||||
var cronmon = [];
|
||||
var cronwday = [];
|
||||
var schedule_date = $('input[name="wpfront-notification-bar-options[schedule_start_date]"]').val();
|
||||
var schedule_time = $('input[name="wpfront-notification-bar-options[schedule_start_time]"]').val();
|
||||
var schedule_end_date = $('input[name="wpfront-notification-bar-options[schedule_end_date]"]').val();
|
||||
var schedule_end_time = $('input[name="wpfront-notification-bar-options[schedule_end_time]"]').val();
|
||||
var schedule_duration = $('input[name="wpfront-notification-bar-options[schedule_duration]"]').val();
|
||||
|
||||
if ('day' == $('input[name="wpfront-notification-bar-options[schedule]"]:checked').val()) {
|
||||
$("input:checkbox[name='wpfront-day-minutes[]']:checked").each(function () {
|
||||
cronminutes.push($(this).val());
|
||||
});
|
||||
$("input:checkbox[name='wpfront-day-hour[]']:checked").each(function () {
|
||||
cronhours.push($(this).val());
|
||||
});
|
||||
cronmday.push('*');
|
||||
cronmon.push('*');
|
||||
cronwday.push('*');
|
||||
}
|
||||
|
||||
if ('week' == $('input[name="wpfront-notification-bar-options[schedule]"]:checked').val()) {
|
||||
$("input:checkbox[name='wpfront-day-minutes[]']:checked").each(function () {
|
||||
cronminutes.push($(this).val());
|
||||
});
|
||||
$("input:checkbox[name='wpfront-day-hour[]']:checked").each(function () {
|
||||
cronhours.push($(this).val());
|
||||
});
|
||||
cronmday.push('*');
|
||||
cronmon.push('*');
|
||||
$("input:checkbox[name='wpfront-week-days[]']:checked").each(function () {
|
||||
cronwday.push($(this).val());
|
||||
});
|
||||
}
|
||||
|
||||
if ('mon' == $('input[name="wpfront-notification-bar-options[schedule]"]:checked').val()) {
|
||||
$("input:checkbox[name='wpfront-day-minutes[]']:checked").each(function () {
|
||||
cronminutes.push($(this).val());
|
||||
});
|
||||
$("input:checkbox[name='wpfront-day-hour[]']:checked").each(function () {
|
||||
cronhours.push($(this).val());
|
||||
});
|
||||
$("input:checkbox[name='wpfront-month-days[]']:checked").each(function () {
|
||||
cronmday.push($(this).val());
|
||||
});
|
||||
cronmon.push('*');
|
||||
cronwday.push('*');
|
||||
}
|
||||
|
||||
var data = {
|
||||
action: 'notification_bar_cron_text',
|
||||
cronminutes: cronminutes,
|
||||
cronhours: cronhours,
|
||||
cronmday: cronmday,
|
||||
cronmon: cronmon,
|
||||
cronwday: cronwday,
|
||||
schedulestartdate: schedule_date,
|
||||
schedulestarttime: schedule_time,
|
||||
scheduleduration: schedule_duration,
|
||||
scheduleenddate: schedule_end_date,
|
||||
scheduleendtime: schedule_end_time
|
||||
};
|
||||
|
||||
var loading = $("a.thickbox.more_schedules").attr("data-action");
|
||||
|
||||
$("#div_more_schedules_inside").text(loading);
|
||||
$.post(ajaxurl, data, function (response) {
|
||||
$('#notification-bar-schedule').replaceWith(response.data[0]);
|
||||
$("#div_more_schedules_inside").replaceWith(response.data[1]);
|
||||
});
|
||||
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
app.component('HelpIcon', {
|
||||
props: ['helpText'],
|
||||
template: '<el-tooltip :content="helpText" raw-content="true" placement="right"><i class="tooltip fa fa-question-circle-o help-icon"></i></el-tooltip>'
|
||||
});
|
||||
|
||||
app.component('ColorPicker', {
|
||||
props: ['modelValue', 'name'],
|
||||
template: $('#color-picker').html(),
|
||||
});
|
||||
|
||||
app.component('PostsFilterSelection', {
|
||||
props: ['modelValue', 'name'],
|
||||
template: $('#posts-filter-selection').html(),
|
||||
computed: {
|
||||
selectedPosts: {
|
||||
get() {
|
||||
return this.modelValue.split(',');
|
||||
},
|
||||
set(values) {
|
||||
this.$emit('update:modelValue', values.filter(e => e).join().trim());
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
app.component('DisplayRolesSettings', {
|
||||
props: ['modelValue', 'name'],
|
||||
template: $('#display-roles-settings').html(),
|
||||
computed: {
|
||||
selectedRoles: {
|
||||
get() {
|
||||
return this.modelValue;
|
||||
},
|
||||
set(values) {
|
||||
this.$emit('update:modelValue', values);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
app.component('DatePicker', {
|
||||
props: ['modelValue', 'name'],
|
||||
data: function () {
|
||||
return { data: this.modelValue }
|
||||
},
|
||||
template: $('#date-picker').html(),
|
||||
});
|
||||
|
||||
app.component('TimePicker', {
|
||||
props: ['modelValue', 'name'],
|
||||
data: function () {
|
||||
return { data: this.modelValue }
|
||||
},
|
||||
template: $('#time-picker').html(),
|
||||
});
|
||||
|
||||
app.component('ScheduleSelectionSettings', {
|
||||
props: ['modelValue'],
|
||||
template: $('#schedule-selection-settings').html(),
|
||||
data() {
|
||||
data.scheduleType = this.scheduledata();
|
||||
return data;
|
||||
},
|
||||
methods: {
|
||||
schedules() {
|
||||
this.$parent.schedules();
|
||||
},
|
||||
scheduledata() {
|
||||
$time_units = data.schedule.split(' ');
|
||||
$minutes = $time_units[0].split(',');
|
||||
$hours = $time_units[1].split(',');
|
||||
$month_days = $time_units[2].split(',');
|
||||
$month = $time_units[3].split(',');
|
||||
$week_days = $time_units[4].split(',');
|
||||
|
||||
if (!isNaN($month_days[0]) || ($month_days[0] == "L")) {
|
||||
$schedule_type = "mon";
|
||||
}
|
||||
|
||||
if (!isNaN($week_days[0])) {
|
||||
$schedule_type = "week";
|
||||
}
|
||||
|
||||
if ($month_days[0] + $week_days[0] == '**') {
|
||||
$schedule_type = 'day';
|
||||
}
|
||||
|
||||
return $schedule_type;
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
selectedMonthDays: {
|
||||
get() {
|
||||
$time_units = this.modelValue.split(' ');
|
||||
$month_days = $time_units[2].split(',');
|
||||
return $month_days;
|
||||
},
|
||||
set(values) {
|
||||
this.$emit('input', values);
|
||||
}
|
||||
},
|
||||
|
||||
selectedWeekDays: {
|
||||
get() {
|
||||
$time_units = this.modelValue.split(' ');
|
||||
$week_days = $time_units[4].split(',');
|
||||
return $week_days;
|
||||
},
|
||||
set(values) {
|
||||
this.$emit('input', values);
|
||||
}
|
||||
},
|
||||
|
||||
selectedHours: {
|
||||
get() {
|
||||
$time_units = this.modelValue.split(' ');
|
||||
$hours = $time_units[1].split(',');
|
||||
return $hours;
|
||||
},
|
||||
set(values) {
|
||||
this.$emit('input', values);
|
||||
}
|
||||
},
|
||||
|
||||
selectedMinutes: {
|
||||
get() {
|
||||
$time_units = this.modelValue.split(' ');
|
||||
$minutes = $time_units[0].split(',');
|
||||
return $minutes;
|
||||
},
|
||||
set(values) {
|
||||
this.$emit('input', values);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
app.use(ElementPlus);
|
||||
app.mount('#notification-bar-add-edit');
|
||||
|
||||
};
|
||||
})();
|
||||
@@ -0,0 +1 @@
|
||||
window.init_wpfront_notifiction_bar_options=function(e,t,i){var n=jQuery,o=Vue.createApp({data:()=>e,mounted(){var t=n("div.wrap.notification-bar-add-edit");n((function(){t.find(".if-js-closed").removeClass("if-js-closed").addClass("closed"),postboxes.add_postbox_toggles("<?php echo $this->controller->get_menu_slug(); ?>")})),this.minutestohours(),i&&(this.tinymce(),"visual"==e.editor&&this.tinymceinit())},methods:{tinymceinit(){if("undefined"!=typeof tinymce)tinymce.init({body_id:"wpfront-notification-bar-editor",body_class:"wpfront-notification-bar-editor wpfront-message",selector:"textarea#notification-bar-message-text",height:"400",plugins:"code, lists, link, fullscreen, image, media, quickbars, hr",quickbars_selection_toolbar:"bold italic underline | formatselect | blockquote quicklink",menubar:!1,media_live_embeds:!0,content_css:t.content_css,content_style:"body{ text-align: center; padding: 0; margin: 0; } p{ margin: 0; }",toolbar1:"undo redo | styleselect | fontselect fontsizeselect forecolor backcolor | numlist bullist | bold italic strikethrough blockquote underline lineheight hr | code",toolbar2:"alignleft aligncenter alignright | link unlink | outdent indent | uploadmedia image media",fontsize_formats:t.fontsize_formats,font_formats:t.font_formats,setup:function(e){var i;e.ui.registry.addButton("uploadmedia",{icon:"upload",tooltip:t.tinymce_tooltip,onAction:function(){i||(i=wp.media({title:t.tinymce_title,button:{text:t.tinymce_button_text},multiple:!1})).on("select",(function(){var t,n=i.state().get("selection").first().toJSON();t="image"==n.type?'<img width="'+n.width+'" height="'+n.height+'"src="'+n.url+'">':"video"==n.type?'<video width="320" height="240" controls><source src="'+n.url+'" type="video/mp4"></video>':'<a href="'+n.url+'">'+n.name+"</a>",e.execCommand("mceInsertContent",!1,t)})),i.open()}})}});else{var e=this;setTimeout((function(){e.tinymceinit()}),100)}},tinymce(){},mediaLibrary(){var e=null;return null===e&&(e=wp.media.frames.file_frame=wp.media({title:t.choose_image,multiple:!1,button:{text:t.select_image}}).on("select",(function(){var t=e.state().get("selection").first().toJSON();n("#reopen-button-image-url").val(t.url)}))),e.open(),!1},minutestohours(){var e=parseInt(n('input[name="wpfront-notification-bar-options[schedule_duration]"]').val());if(e>60){var i,o=e/60,s=Math.floor(o),a=60*(o-s),l=Math.round(a);i=l>0?t.x_hours_minutes.replace("%1$d",s).replace("%2$d",l):t.x_hours.replace("%1$d",s),n("#schedule_duration").replaceWith('<span id="schedule_duration" class="description">= '+i+"</span>")}else n("#schedule_duration").replaceWith('<span id="schedule_duration" class="description"></span>')},schedules(){var e=[],t=[],i=[],o=[],s=[],a=n('input[name="wpfront-notification-bar-options[schedule_start_date]"]').val(),l=n('input[name="wpfront-notification-bar-options[schedule_start_time]"]').val(),c=n('input[name="wpfront-notification-bar-options[schedule_end_date]"]').val(),u=n('input[name="wpfront-notification-bar-options[schedule_end_time]"]').val(),d=n('input[name="wpfront-notification-bar-options[schedule_duration]"]').val();"day"==n('input[name="wpfront-notification-bar-options[schedule]"]:checked').val()&&(n("input:checkbox[name='wpfront-day-minutes[]']:checked").each((function(){e.push(n(this).val())})),n("input:checkbox[name='wpfront-day-hour[]']:checked").each((function(){t.push(n(this).val())})),i.push("*"),o.push("*"),s.push("*")),"week"==n('input[name="wpfront-notification-bar-options[schedule]"]:checked').val()&&(n("input:checkbox[name='wpfront-day-minutes[]']:checked").each((function(){e.push(n(this).val())})),n("input:checkbox[name='wpfront-day-hour[]']:checked").each((function(){t.push(n(this).val())})),i.push("*"),o.push("*"),n("input:checkbox[name='wpfront-week-days[]']:checked").each((function(){s.push(n(this).val())}))),"mon"==n('input[name="wpfront-notification-bar-options[schedule]"]:checked').val()&&(n("input:checkbox[name='wpfront-day-minutes[]']:checked").each((function(){e.push(n(this).val())})),n("input:checkbox[name='wpfront-day-hour[]']:checked").each((function(){t.push(n(this).val())})),n("input:checkbox[name='wpfront-month-days[]']:checked").each((function(){i.push(n(this).val())})),o.push("*"),s.push("*"));var r={action:"notification_bar_cron_text",cronminutes:e,cronhours:t,cronmday:i,cronmon:o,cronwday:s,schedulestartdate:a,schedulestarttime:l,scheduleduration:d,scheduleenddate:c,scheduleendtime:u},p=n("a.thickbox.more_schedules").attr("data-action");n("#div_more_schedules_inside").text(p),n.post(ajaxurl,r,(function(e){n("#notification-bar-schedule").replaceWith(e.data[0]),n("#div_more_schedules_inside").replaceWith(e.data[1])}))}}});o.component("HelpIcon",{props:["helpText"],template:'<el-tooltip :content="helpText" raw-content="true" placement="right"><i class="tooltip fa fa-question-circle-o help-icon"></i></el-tooltip>'}),o.component("ColorPicker",{props:["modelValue","name"],template:n("#color-picker").html()}),o.component("PostsFilterLine truncated
|
||||
@@ -0,0 +1,27 @@
|
||||
/**
|
||||
* Copyright (c) Tiny Technologies, Inc. All rights reserved.
|
||||
*/
|
||||
!function(){"use strict";function r(e){if(null===e)return"null";if(void 0===e)return"undefined";var t=typeof e;return"object"==t&&(Array.prototype.isPrototypeOf(e)||e.constructor&&"Array"===e.constructor.name)?"array":"object"==t&&(String.prototype.isPrototypeOf(e)||e.constructor&&"String"===e.constructor.name)?"string":t}function f(o){return m(function(e,t){if(e.length!==t.length)return!1;for(var n=e.length,r=0;r<n;r++)if(!o.eq(e[r],t[r]))return!1;return!0})}function d(l){return m(function(e,t){var n,r,o,i=Object.keys(e),a=Object.keys(t);if(r=f(g),o=function(e){return t=n,Array.prototype.slice.call(e).sort(t);var t},!m(function(e,t){return r.eq(o(e),o(t))}).eq(i,a))return!1;for(var u=i.length,s=0;s<u;s++){var c=i[s];if(!l.eq(e[c],t[c]))return!1}return!0})}function e(r){return function(e){return n=typeof(t=e),(null===t?"null":"object"==n&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"==n&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":n)===r;var t,n}}function t(t){return function(e){return typeof e===t}}function n(t){return function(e){return t===e}}function re(e){return null==e}function V(e){return!re(e)}function oe(){}function i(n,r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n(r.apply(null,e))}}function a(t,n){return function(e){return t(n(e))}}function J(e){return function(){return e}}function u(e){return e}function o(e,t){return e===t}var m=function(e){return{eq:e}},g=m(function(e,t){return e===t}),p=m(function(e,t){if(e===t)return!0;var n=r(e);return n===r(t)&&(-1!==["undefined","boolean","number","string","function","xml","null"].indexOf(n)?e===t:"array"===n?f(p).eq(e,t):"object"===n&&d(p).eq(e,t))}),K=e("string"),h=e("object"),S=e("array"),l=n(null),v=t("boolean"),b=n(void 0),y=t("function"),E=t("number");function A(r){for(var o=[],e=1;e<arguments.length;e++)o[e-1]=arguments[e];return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=o.concat(e);return r.apply(null,n)}}function s(t){return function(e){return!t(e)}}function C(e){return e()}function w(e){e()}function c(){return N}var T=J(!1),x=J(!0),N={fold:function(e,t){return e()},isSome:T,isNone:x,getOr:u,getOrThunk:k,getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:J(null),getOrUndefined:J(void 0),or:u,orThunk:k,map:c,each:oe,bind:c,exists:T,forall:x,filter:function(){return N},toArray:function(){return[]},toString:J("none()")};function k(e){return e()}function _(e,t){return be.call(e,t)}function ie(e,t){return-1<_(e,t)}function F(e,t){for(var n=0,r=e.length;n<r;n++)if(t(e[n],n))return!0;return!1}function R(e,t){for(var n=e.length,r=new Array(n),o=0;o<n;o++){var i=e[o];r[o]=t(i,o)}return r}function X(e,t){for(var n=0,r=e.length;n<r;n++)t(e[n],n)}function D(e,t){for(var n=e.length-1;0<=n;n--)t(e[n],n)}function O(e,t){for(var n=[],r=[],o=0,i=e.length;o<i;o++){var a=e[o];(t(a,o)?n:r).push(a)}return{pass:n,fail:r}}function U(e,t){for(var n=[],r=0,o=e.length;r<o;r++){var i=e[r];t(i,r)&&n.push(i)}return n}function B(e,n,r){return D(e,function(e,t){r=n(r,e,t)}),r}function P(e,n,r){return X(e,function(e,t){r=n(r,e,t)}),r}function L(e,t,n){for(var r=0,o=e.length;r<o;r++){var i=e[r];if(t(i,r))return he.some(i);if(n(i,r))break}return he.none()}function I(e,t){return L(e,t,T)}function M(e,t){for(var n=0,r=e.length;n<r;n++)if(t(e[n],n))return he.some(n);return he.none()}function z(e,t){return function(e){for(var t=[],n=0,r=e.length;n<r;++n){if(!S(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);ye.apply(t,e[n])}return t}(R(e,t))}function j(e,t){for(var n=0,r=e.length;n<r;++n)if(!0!==t(e[n],n))return!1;return!0}function H(e){var t=ve.call(e,0);return t.reverse(),t}function q(e,t){return U(e,function(e){return!ie(t,e)})}function $(e,t){return 0<=t&&t<e.length?he.some(e[t]):he.none()}function W(e){return $(e,0)}function Y(e){return $(e,e.length-1)}function G(e,t){for(var n=0;n<e.length;n++){var r=t(e[n],n);if(r.isSome())return r}return he.none()}function Q(e,t){for(var n=we(e),r=0,o=n.length;r<o;r++){var i=n[r];t(e[i],i)}}function Z(e,n){return Se(e,function(e,t){return{k:t,v:n(e,t)}})}function ee(n){return function(e,t){n[t]=e}}function te(e,n,r,o){return Q(e,function(e,t){(n(e,t)?r:o)(e,t)}),1}function ne(e,t){var n={};return te(e,t,ee(n),oe),n}function ae(e,t){return Ee(e,t)?he.from(e[t]):he.none()}function ue(e,t){return Ee(e,t)&&void 0!==e[t]&&null!==e[t]}function se(e,t,n){var r,o;if(!e)return!1;if(n=n||e,void 0!==e.length){for(r=0,o=e.length;r<o;r++)if(!1===t.call(n,e[r],r,e))return!1}else for(r in e)if(Ee(e,r)&&!1===t.call(n,e[r],r,e))return!1;return!0}function ce(n,r){var o=[];return se(n,function(e,t){o.push(r(e,t,n))}),o}function le(n,r){var o=[];return se(n,function(e,t){r&&!r(e,t,n)||o.push(e)}),o}function fe(e,t){if(e)for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function de(e,t,n,r){for(var o=b(n)?e[0]:n,i=0;i<e.lLine truncated
|
||||
|
||||
/* Ephox Fluffy plugin
|
||||
*
|
||||
* Copyright 2010-2016 Ephox Corporation. All rights reserved.
|
||||
*
|
||||
* Version: 2.5.0-13
|
||||
*/
|
||||
|
||||
!function(){"use strict";function o(n){return function(){return n}}function n(){return f}var u="undefined"!=typeof window?window:Function("return this;")(),t=function(n,t){return{isRequired:n,applyPatch:t}},i=function(i,o){return function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];var r=o.apply(this,n),e=void 0===r?n:r;return i.apply(this,e)}},r=function(n,t){if(n)for(var r=0;r<t.length;r++)t[r].isRequired(n)&&t[r].applyPatch(n);return n},a=o(!1),c=o(!0),f={fold:function(n,t){return n()},is:a,isSome:a,isNone:c,getOr:s,getOrThunk:l,getOrDie:function(n){throw new Error(n||"error: getOrDie called on none.")},getOrNull:o(null),getOrUndefined:o(void 0),or:s,orThunk:l,map:n,each:function(){},bind:n,exists:a,forall:c,filter:n,equals:e,equals_:e,toArray:function(){return[]},toString:o("none()")};function e(n){return n.isNone()}function l(n){return n()}function s(n){return n}function g(e){return function(n){return r=typeof(t=n),(null===t?"null":"object"==r&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"==r&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":r)===e;var t,r}}function d(n,t){return r=n,e=t,-1<D.call(r,e);var r,e}function p(n,t){return function(n){for(var t=[],r=0,e=n.length;r<e;++r){if(!A(n[r]))throw new Error("Arr.flatten item "+r+" was not an array, input: "+n);P.apply(t,n[r])}return t}(function(n,t){for(var r=n.length,e=new Array(r),i=0;i<r;i++){var o=n[i];e[i]=t(o,i)}return e}(n,t))}function v(u){return function(){for(var n=new Array(arguments.length),t=0;t<n.length;t++)n[t]=arguments[t];if(0===n.length)throw new Error("Can't merge zero objects");for(var r={},e=0;e<n.length;e++){var i=n[e];for(var o in i)U.call(i,o)&&(r[o]=u(r[o],i[o]))}return r}}function h(n,t){for(var r=T(n),e=0,i=r.length;e<i;e++){var o=r[e];t(n[o],o)}}function y(r){return function(n,t){r[t]=n}}function m(n,t){var r,e,i,o={},u={};return r=t,e=y(o),i=y(u),h(n,function(n,t){(r(n,t)?e:i)(n,t)}),{t:o,f:u}}function E(n,t){return C(n,t)?j(n[t]):S()}function w(n){if(_(n)||""===n)return[];var t=A(n)?p(n,function(n){return n.split(/[\s+,]/)}):n.split(/[\s+,]/);return p(t,function(n){return 0<n.length?[n.trim()]:[]})}function O(n,t){var r=N(n,t),e=w(t.plugins),i=E(r,"custom_plugin_urls").getOr({}),o=m(i,function(n,t){return d(e,t)}),u=E(r,"external_plugins").getOr({}),a={};h(o.t,function(n,t){a[t]=n});var c=R(a,u);return R(t,0===T(c).length?{}:{external_plugins:c})}var M,b=function(r){function n(){return i}function t(n){return n(r)}var e=o(r),i={fold:function(n,t){return t(r)},is:function(n){return r===n},isSome:c,isNone:a,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:n,orThunk:n,map:function(n){return b(n(r))},each:function(n){n(r)},bind:t,exists:t,forall:t,filter:function(n){return n(r)?i:f},toArray:function(){return[r]},toString:function(){return"some("+r+")"},equals:function(n){return n.is(r)},equals_:function(n,t){return n.fold(a,function(n){return t(r,n)})}};return i},S=n,j=function(n){return null==n?f:b(n)},x=g("object"),A=g("array"),_=(M=void 0,function(n){return M===n}),D=Array.prototype.indexOf,P=Array.prototype.push,U=Object.prototype.hasOwnProperty,N=v(function(n,t){return x(n)&&x(t)?N(n,t):t}),R=v(function(n,t){return t}),T=Object.keys,q=Object.hasOwnProperty,C=function(n,t){return q.call(n,t)},I={getCustomPluginUrls:O,patch:t(function(){return!0},function(r){r.EditorManager.init=i(r.EditorManager.init,function(n){return[O(r.defaultSettings,n)]}),r.EditorManager.createEditor=i(r.EditorManager.createEditor,function(n,t){return[n,O(r.defaultSettings,t)]})})};function k(){for(var n=0,t=0,r=arguments.length;t<r;t++)n+=arguments[t].length;var e=Array(n),i=0;for(t=0;t<r;t++)for(var o=arguments[t],u=0,a=o.length;u<a;u++,i++)e[i]=o[u];return e}function L(n,t){return function(n,t){for(var r=null!=t?t:u,e=0;e<n.length&&null!=r;++e)r=r[n[e]];return r}(n.split("."),t)}function V(n){return parseInt(n,10)}function z(n,t){var r=n-t;return 0==r?0:0<r?1:-1}function B(n,t,r){return{major:n,minor:t,patch:r}}function F(n){var t=/([0-9]+)\.([0-9]+)\.([0-9]+)(?:(\-.+)?)/.exec(n);return t?B(V(t[1]),V(t[2]),V(t[3])):B(0,0,0)}function $(n,t){return!!n&&-1===function(n,t){var r=z(n.major,t.major);if(0!==r)return r;var e=z(n.minor,t.minor);if(0!==e)return e;var i=z(n.patch,t.patch);return 0!==i?i:0}(F([(r=n).majorVersion,r.minorVersion].join(".").split(".").slice(0,3).join(".")),F(t));var r}function G(o){return function(n){var t=L("tinymce.util.Tools",u),r=w(n.plugins),e=o.defaultSettings.forced_plugins||[],i=0<e.length?r.concat(e):r;return[t.extend({},n,{plugins:i})]}}function H(){return(new Date).getTime()}function J(e){return function(){var n,t,r=(t="position",(((n=e).currentStyle?n.currentStyle[t]:window.getComputedStyle(n,null)[t])||"").toLowerCase());return"absolute"===r||"fixed"===r}}function K(n){n.parentNode.removeChild(n)}function Q(n,t){n.notificationManager?n.notificationManager.open({text:t,type:"warning",timeout:0,Line truncated
|
||||
|
||||
(function(cloudSettings) {
|
||||
tinymce.overrideDefaults(cloudSettings);
|
||||
})({"rtc_tenant_id":"no-api-key","imagetools_proxy":"https://imageproxy.tiny.cloud/2/image","suffix":".min","linkchecker_service_url":"https://hyperlinking.tiny.cloud","spellchecker_rpc_url":"https://spelling.tiny.cloud","spellchecker_api_key":"no-api-key","tinydrive_service_url":"https://catalog.tiny.cloud","api_key":"no-api-key","imagetools_api_key":"no-api-key","tinydrive_api_key":"no-api-key","forced_plugins":["chiffer"],"referrer_policy":"origin","content_css_cors":true,"custom_plugin_urls":{},"chiffer_snowplow_service_url":"https://sp.tinymce.com/i","mediaembed_api_key":"no-api-key","rtc_service_url":"https://rtc.tiny.cloud","linkchecker_api_key":"no-api-key","mediaembed_service_url":"https://hyperlinking.tiny.cloud","service_message":"This domain is not registered with Tiny Cloud. Please see the \u003ca target=\"_blank\" href=\"https://www.tiny.cloud/docs/quick-start/\"\u003equick start guide\u003c/a\u003e or \u003ca target=\"_blank\" href=\"https://www.tiny.cloud/auth/signup/\"\u003ecreate an account\u003c/a\u003e."});
|
||||
tinymce.baseURL = "https://cdn.tiny.cloud/1/no-api-key/tinymce/5.9.2-118"
|
||||
|
||||
/* Ephox chiffer plugin
|
||||
*
|
||||
* Copyright 2010-2019 Tiny Technologies Inc. All rights reserved.
|
||||
*
|
||||
* Version: 1.10.0-15
|
||||
*/
|
||||
|
||||
!function(){"use strict";function o(){}function n(t,e){return m.call(t,e)}function e(t){var e=t.command;return n(_,e)?function(t){if(!f(t.value)){t=t.value["list-style-type"];return"advlist_"+(""===t?"default":t)}}(t):n(g,e)?g[e]:n(p,e)?p[e]:n(S,e)?S[e]:void 0}function c(){return(new Date).getTime()}function t(t,e){var r,a,n,e=(r=t,a=e,{send:function(t,e,n){var t="?aid="+a+"&tna=tinymce_cloud&p=web&dtm="+e+"&stm="+c()+"&tz="+("undefined"!=typeof Intl?encodeURIComponent(Intl.DateTimeFormat().resolvedOptions().timeZone):"N%2FA")+"&e=se&se_ca="+t,o=document.createElement("img");o.src=r.chiffer_snowplow_service_url+t;t=function(t){return function(){o.onload=null,o.onerror=null,n(t)}};o.onload=t(!0),o.onerror=t(!1)}});return n=e,{sendStat:function(t){n.send(t,c(),o)}}}var r,a,i,s,u,d,l=(r="string",function(t){return t=typeof(e=t),(null===e?"null":"object"==t&&(Array.prototype.isPrototypeOf(e)||e.constructor&&"Array"===e.constructor.name)?"array":"object"==t&&(String.prototype.isPrototypeOf(e)||e.constructor&&"String"===e.constructor.name)?"string":t)===r;var e}),f=(a=void 0,function(t){return a===t}),m=Object.hasOwnProperty,p={mceInsertToc:"toc_insert",mceUpdateToc:"toc_update"},g={mceEditImage:"imagetools_open_dialog",mceImageRotateLeft:"imagetools_rotate",mceImageRotateRight:"imagetools_rotate",mceImageFlipVertical:"imagetools_flip",mceImageFlipHorizontal:"imagetools_flip"},_={InsertUnorderedList:!0,InsertOrderedList:!0},S={mceInsertTemplate:"template_insert"};s=tinymce.defaultSettings,u={load:o},d=function(t){t=t.api_key;return l(t)?t:void 0}(s),u=void 0===d?u:((i=t(s,d)).sendStat("script_load"),{load:function(t){t.once("init",function(){return i.sendStat("init")}),t.once("focus",function(){return i.sendStat("focus")}),t.on("ExportPdf",function(){return i.sendStat("export_pdf")}),t.on("PastePreProcess PowerPasteTempStats",function(t){t=t.source;null==t||i.sendStat("powerpaste_"+t)}),t.on("VisualChars",function(t){!0===t.state&&i.sendStat("visualchars_true")}),t.on("RtcSessionConnected",function(t){var e=t.time;switch(e){case 0:i.sendStat("rtc_started");break;case 5:case 10:case 20:i.sendStat("rtc_connected_"+e+"min")}}),t.on("RtcSessionError",function(){return i.sendStat("rtc_error")}),t.on("RtcSessionDirty",function(){return i.sendStat("rtc_edited")}),t.on("SpellcheckerLanguageChanged",function(t){t=t.language;i.sendStat("spellcheckerpro_language_changed_"+t)}),t.on("ExecCommand",function(t){t=e(t);f(t)||i.sendStat(t)})}}),tinymce.PluginManager.add("chiffer",u.load)}();
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1 @@
|
||||
var Vue=function(e){"use strict";function t(e,t){const n=Object.create(null),o=e.split(",");for(let r=0;r<o.length;r++)n[o[r]]=!0;return t?e=>!!n[e.toLowerCase()]:e=>!!n[e]}const n=t("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt"),o=t("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function r(e){return!!e||""===e}function s(e){if(N(e)){const t={};for(let n=0;n<e.length;n++){const o=e[n],r=R(o)?c(o):s(o);if(r)for(const e in r)t[e]=r[e]}return t}return R(e)||P(e)?e:void 0}const i=/;(?![^(]*\))/g,l=/:(.+)/;function c(e){const t={};return e.split(i).forEach((e=>{if(e){const n=e.split(l);n.length>1&&(t[n[0].trim()]=n[1].trim())}})),t}function a(e){let t="";if(R(e))t=e;else if(N(e))for(let n=0;n<e.length;n++){const o=a(e[n]);o&&(t+=o+" ")}else if(P(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const u=t("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot"),p=t("svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistanceLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view"),f=t("area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr");function d(e,t){if(e===t)return!0;let n=O(e),o=O(t);if(n||o)return!(!n||!o)&&e.getTime()===t.getTime();if(n=A(e),o=A(t),n||o)return e===t;if(n=N(e),o=N(t),n||o)return!(!n||!o)&&function(e,t){if(e.length!==t.length)return!1;let n=!0;for(let o=0;n&&o<e.length;o++)n=d(e[o],t[o]);return n}(e,t);if(n=P(e),o=P(t),n||o){if(!n||!o)return!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e){const o=e.hasOwnProperty(n),r=t.hasOwnProperty(n);if(o&&!r||!o&&r||!d(e[n],t[n]))return!1}}return String(e)===String(t)}function h(e,t){return e.findIndex((e=>d(e,t)))}const m=(e,t)=>t&&t.__v_isRef?m(e,t.value):E(t)?{[`Map(${t.size})`]:[...t.entries()].reduce(((e,[t,n])=>(e[`${t} =>`]=n,e)),{})}:$(t)?{[`Set(${t.size})`]:[...t.values()]}:!P(t)||N(t)||B(t)?t:String(t),g={},v=[],y=()=>{},b=()=>!1,_=/^on[^a-z]/,S=e=>_.test(e),x=e=>e.startsWith("onUpdate:"),C=Object.assign,w=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},k=Object.prototype.hasOwnProperty,T=(e,t)=>k.call(e,t),N=Array.isArray,E=e=>"[object Map]"===I(e),$=e=>"[object Set]"===I(e),O=e=>"[object Date]"===I(e),F=e=>"function"==typeof e,R=e=>"string"==typeof e,A=e=>"symbol"==typeof e,P=e=>null!==e&&"object"==typeof e,M=e=>P(e)&&F(e.then)&&F(e.catch),V=Object.prototype.toString,I=e=>V.call(e),B=e=>"[object Object]"===I(e),L=e=>R(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,j=t(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),U=t("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),D=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},H=/-(\w)/g,W=D((e=>e.replace(H,((e,t)=>t?t.toUpperCase():"")))),z=/\B([A-Z])/g,K=D((e=>e.replace(z,"-$1").toLowerCase())),G=D((e=>e.charAt(0).toUpperCase()+e.slice(1))),q=D((e=>e?`on${G(e)}`:"")),J=(e,t)=>!Object.is(e,t),Y=(e,t)=>{for(let n=0;n<e.length;n++)e[n](t)},Z=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},Q=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let X;let ee;class te{constructor(e=!1){this.active=!0,this.effects=[],this.cleanups=[],!e&&ee&&(this.parent=ee,this.index=(ee.scopes||(ee.scopes=[])).push(this)-1)}run(e){if(this.active){const t=ee;try{return ee=this,e()}finally{ee=t}}}on(){ee=this}off(){ee=this.parent}stop(e){if(this.active){let t,n;for(t=0,n=this.effects.length;t<n;t++)this.effects[t].stop();for(t=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].stop(!0);if(this.parent&&!e){const e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.active=!1}}}funLine truncated
|
||||
@@ -0,0 +1,354 @@
|
||||
/*
|
||||
WPFront Notification Bar Plugin
|
||||
Copyright (C) 2013, WPFront.com
|
||||
Website: wpfront.com
|
||||
Contact: syam@wpfront.com
|
||||
|
||||
WPFront Notification Bar Plugin is distributed under the GNU General Public License, Version 3,
|
||||
June 2007. Copyright (C) 2007 Free Software Foundation, Inc., 51 Franklin
|
||||
St, Fifth Floor, Boston, MA 02110, USA
|
||||
|
||||
*/
|
||||
|
||||
(function () {
|
||||
//displays the notification bar
|
||||
window.wpfront_notification_bar = function (data, process) {
|
||||
var log = function (msg) {
|
||||
if (data.log) {
|
||||
console.log(data.log_prefix + ' ' + msg);
|
||||
}
|
||||
};
|
||||
|
||||
if (typeof jQuery === "undefined" || (data.keep_closed && typeof Cookies === "undefined") || (data.set_max_views && typeof Cookies === "undefined")) {
|
||||
log('Waiting for ' + (typeof jQuery === "undefined" ? 'jQuery.' : 'Cookies.'));
|
||||
setTimeout(function () {
|
||||
wpfront_notification_bar(data, process);
|
||||
}, 100);
|
||||
return;
|
||||
}
|
||||
|
||||
if (data.position == 2 && process !== true) {
|
||||
jQuery(function () {
|
||||
wpfront_notification_bar(data, true);
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
var get_element_id = function (id) {
|
||||
return id + data.id_suffix;
|
||||
}
|
||||
|
||||
var $ = jQuery;
|
||||
|
||||
var keep_closed_cookie = data.keep_closed_cookie;
|
||||
|
||||
var bar_views = 0;
|
||||
var max_views_cookie = data.max_views_cookie;
|
||||
|
||||
var spacer = $(get_element_id("#wpfront-notification-bar-spacer")).removeClass('hidden');
|
||||
var bar = $(get_element_id("#wpfront-notification-bar"));
|
||||
var open_button = $(get_element_id("#wpfront-notification-bar-open-button"));
|
||||
|
||||
//set the position
|
||||
if (data.position == 1) {
|
||||
log('Setting notification bar at top.');
|
||||
var top = 0;
|
||||
if (data.fixed_position && data.is_admin_bar_showing) {
|
||||
top = $("html").css("margin-top");
|
||||
if (top == "0px")
|
||||
top = $("html").css("padding-top");
|
||||
top = parseInt(top);
|
||||
}
|
||||
if (data.fixed_position) {
|
||||
top += data.position_offset;
|
||||
}
|
||||
bar.css("top", top + "px");
|
||||
open_button.css("top", top + "px");
|
||||
spacer.css("top", data.position_offset + "px");
|
||||
var $body = $("body")
|
||||
var $firstChild = $body.children().first();
|
||||
if ($firstChild.hasClass("wpfront-notification-bar-spacer")) {
|
||||
while (true) {
|
||||
var $next = $firstChild.next();
|
||||
if ($next.hasClass("wpfront-notification-bar-spacer")) {
|
||||
$firstChild = $next;
|
||||
} else {
|
||||
$firstChild.after(spacer);
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$body.prepend(spacer);
|
||||
}
|
||||
|
||||
$(function () {
|
||||
if ($body.children().first().hasClass("wpfront-notification-bar-spacer")) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (data.fixed_position && !$body.children().first().is(spacer)) {
|
||||
$body.prepend(spacer);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
log('Setting notification bar at bottom.');
|
||||
var $body = $("body");
|
||||
if (!$body.children().last().is(spacer)) {
|
||||
$body.append(spacer);
|
||||
}
|
||||
$(function () {
|
||||
if (!$body.children().last().is(spacer)) {
|
||||
$body.append(spacer);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
var height = bar.height();
|
||||
if (data.height > 0) {
|
||||
height = data.height;
|
||||
bar.find("table, tbody, tr").css("height", "100%");
|
||||
}
|
||||
|
||||
bar.height(0).css({"position": (data.fixed_position ? "fixed" : "relative"), "visibility": "visible"});
|
||||
open_button.css({"position": (data.fixed_position ? "fixed" : "absolute")});
|
||||
|
||||
//function to set bar height based on options
|
||||
var closed = false;
|
||||
var user_closed = false;
|
||||
|
||||
function setHeight(height, callback, userclosed) {
|
||||
callback = callback || $.noop;
|
||||
|
||||
if (userclosed)
|
||||
user_closed = true;
|
||||
|
||||
if (height == 0) {
|
||||
if (closed)
|
||||
return;
|
||||
closed = true;
|
||||
} else {
|
||||
if (!closed)
|
||||
return;
|
||||
closed = false;
|
||||
}
|
||||
|
||||
if (height == 0 && data.keep_closed && userclosed) {
|
||||
if (data.keep_closed_for > 0)
|
||||
Cookies.set(keep_closed_cookie, 1, {path: "/", expires: data.keep_closed_for, sameSite: "strict"});
|
||||
else
|
||||
Cookies.set(keep_closed_cookie, 1, {path: "/", sameSite: "strict"});
|
||||
}
|
||||
|
||||
if (height !== 0 && data.set_max_views) {
|
||||
bar_views = Cookies.get(max_views_cookie);
|
||||
if (typeof bar_views === "undefined") {
|
||||
bar_views = 0;
|
||||
} else {
|
||||
bar_views = parseInt(bar_views);
|
||||
}
|
||||
if (data.max_views_for > 0) {
|
||||
Cookies.set(max_views_cookie, bar_views + 1, {path: "/", expires: data.max_views_for, sameSite: "strict"});
|
||||
} else {
|
||||
Cookies.set(max_views_cookie, bar_views + 1, {path: "/", sameSite: "strict"});
|
||||
}
|
||||
log('Setting view count to ' + (bar_views + 1) + '.');
|
||||
}
|
||||
|
||||
var fn = callback;
|
||||
callback = function () {
|
||||
fn();
|
||||
if (height > 0) {
|
||||
//set height to auto if in case content wraps on resize
|
||||
if (data.height == 0)
|
||||
bar.height("auto");
|
||||
|
||||
if (data.display_open_button) {
|
||||
log('Setting reopen button state to hidden.');
|
||||
open_button.addClass('hidden');
|
||||
}
|
||||
|
||||
closed = false;
|
||||
}
|
||||
|
||||
if (height == 0 && data.display_open_button) {
|
||||
log('Setting reopen button state to visible.');
|
||||
open_button.removeClass('hidden');
|
||||
}
|
||||
|
||||
if(height > 0){
|
||||
bar.removeClass('hidden');
|
||||
} else {
|
||||
bar.addClass('hidden');
|
||||
}
|
||||
};
|
||||
|
||||
//set animation
|
||||
if (height > 0)
|
||||
log('Setting notification bar state to visible.');
|
||||
else
|
||||
log('Setting notification bar state to hidden.');
|
||||
|
||||
if (data.animate_delay > 0) {
|
||||
bar.stop().show().animate({"height": height + "px"}, {
|
||||
"duration": data.animate_delay * 1000,
|
||||
"easing": "swing",
|
||||
"complete": function () {
|
||||
if (data.fixed_position) {
|
||||
spacer.height(height);
|
||||
}
|
||||
handle_theme_sticky(height);
|
||||
callback();
|
||||
},
|
||||
"step": function (progress) {
|
||||
if (data.fixed_position) {
|
||||
spacer.height(progress);
|
||||
}
|
||||
handle_theme_sticky(progress);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
bar.height(height);
|
||||
if (data.fixed_position) {
|
||||
spacer.height(height);
|
||||
}
|
||||
handle_theme_sticky(height);
|
||||
callback();
|
||||
}
|
||||
}
|
||||
|
||||
var theme_sticky_selector_position = null;
|
||||
var theme_sticky_interval_id = 0;
|
||||
var handle_theme_sticky_needed = data.fixed_position && data.theme_sticky_selector != "";
|
||||
function handle_theme_sticky(recursive) {
|
||||
if (!handle_theme_sticky_needed) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (recursive !== true) {
|
||||
clearInterval(theme_sticky_interval_id);
|
||||
var intervalCount = 0;
|
||||
theme_sticky_interval_id = setInterval(function () {
|
||||
handle_theme_sticky(true);
|
||||
|
||||
intervalCount++;
|
||||
|
||||
if (intervalCount > 100) {
|
||||
clearInterval(theme_sticky_interval_id);
|
||||
return;
|
||||
}
|
||||
|
||||
}, 10);
|
||||
}
|
||||
|
||||
var $theme_sticky_selector = $(data.theme_sticky_selector);
|
||||
if ($theme_sticky_selector.length == 0 || $theme_sticky_selector.css('position') !== 'fixed') {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (data.position == 1) {
|
||||
if (theme_sticky_selector_position === null) {
|
||||
theme_sticky_selector_position = $theme_sticky_selector.position().top;
|
||||
}
|
||||
if (bar.is(":visible")) {
|
||||
$theme_sticky_selector.css("top", (bar.height() + bar.position().top) + "px");
|
||||
} else {
|
||||
$theme_sticky_selector.css("top", theme_sticky_selector_position + "px");
|
||||
}
|
||||
}
|
||||
|
||||
if (data.position == 2) {
|
||||
if (theme_sticky_selector_position === null) {
|
||||
theme_sticky_selector_position = $theme_sticky_selector.height() + parseFloat($theme_sticky_selector.css("bottom"));
|
||||
}
|
||||
if (bar.is(":visible")) {
|
||||
$theme_sticky_selector.css("bottom", (bar.height() + parseFloat(bar.css("bottom"))) + "px");
|
||||
} else {
|
||||
$theme_sticky_selector.css("bottom", theme_sticky_selector_position + "px");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (handle_theme_sticky_needed) {
|
||||
$(window).on("scroll resize", function () {
|
||||
handle_theme_sticky();
|
||||
});
|
||||
}
|
||||
|
||||
if (data.close_button) {
|
||||
spacer.on('click', '.wpfront-close', function () {
|
||||
setHeight(0, null, true);
|
||||
});
|
||||
}
|
||||
|
||||
//close button action
|
||||
if (data.button_action_close_bar) {
|
||||
spacer.on('click', '.wpfront-button', function () {
|
||||
setHeight(0, null, true);
|
||||
});
|
||||
}
|
||||
|
||||
if (data.display_open_button) {
|
||||
spacer.on('click', get_element_id('#wpfront-notification-bar-open-button'), function () {
|
||||
setHeight(height);
|
||||
});
|
||||
}
|
||||
|
||||
if (data.keep_closed) {
|
||||
if (Cookies.get(keep_closed_cookie)) {
|
||||
log('Keep closed enabled and keep closed cookie exists. Hiding notification bar.');
|
||||
setHeight(0, function(){
|
||||
bar.removeClass('keep-closed');
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
bar.removeClass('keep-closed');
|
||||
|
||||
if (data.set_max_views) {
|
||||
bar_views = Cookies.get(max_views_cookie);
|
||||
if (typeof bar_views === "undefined") {
|
||||
bar_views = 0;
|
||||
}
|
||||
if (bar_views >= data.max_views) {
|
||||
log('Reached max views, hiding notification bar.');
|
||||
setHeight(0, function(){
|
||||
bar.removeClass('max-views-reached');
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
bar.removeClass('max-views-reached');
|
||||
|
||||
closed = true;
|
||||
|
||||
if (data.display_scroll) {
|
||||
log('Display on scroll enabled. Hiding notification bar.');
|
||||
setHeight(0);
|
||||
|
||||
$(window).on('scroll', function () {
|
||||
if (user_closed)
|
||||
return;
|
||||
|
||||
if ($(this).scrollTop() > data.display_scroll_offset) {
|
||||
setHeight(height);
|
||||
} else {
|
||||
setHeight(0);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
//set open after seconds and auto close seconds.
|
||||
log('Setting notification bar open event after ' + data.display_after + ' second(s).');
|
||||
setTimeout(function () {
|
||||
setHeight(height, function () {
|
||||
if (data.auto_close_after > 0) {
|
||||
log('Setting notification bar auto close event after ' + data.auto_close_after + ' second(s).');
|
||||
setTimeout(function () {
|
||||
setHeight(0, null, true);
|
||||
}, data.auto_close_after * 1000);
|
||||
}
|
||||
});
|
||||
}, data.display_after * 1000);
|
||||
}
|
||||
};
|
||||
})();
|
||||
+1
@@ -0,0 +1 @@
|
||||
window.wpfront_notification_bar=function(i,t){var e=function(t){i.log&&console.log(i.log_prefix+" "+t)};if("undefined"==typeof jQuery||i.keep_closed&&"undefined"==typeof Cookies||i.set_max_views&&"undefined"==typeof Cookies)return e("Waiting for "+("undefined"==typeof jQuery?"jQuery.":"Cookies.")),void setTimeout((function(){wpfront_notification_bar(i,t)}),100);if(2!=i.position||!0===t){var o=function(t){return t+i.id_suffix},n=jQuery,s=i.keep_closed_cookie,a=0,r=i.max_views_cookie,c=n(o("#wpfront-notification-bar-spacer")).removeClass("hidden"),f=n(o("#wpfront-notification-bar")),p=n(o("#wpfront-notification-bar-open-button"));if(1==i.position){e("Setting notification bar at top.");var l=0;i.fixed_position&&i.is_admin_bar_showing&&("0px"==(l=n("html").css("margin-top"))&&(l=n("html").css("padding-top")),l=parseInt(l)),i.fixed_position&&(l+=i.position_offset),f.css("top",l+"px"),p.css("top",l+"px"),c.css("top",i.position_offset+"px");var d=(u=n("body")).children().first();if(d.hasClass("wpfront-notification-bar-spacer"))for(;;){var _=d.next();if(!_.hasClass("wpfront-notification-bar-spacer")){d.after(c);break}d=_}else u.prepend(c);n((function(){u.children().first().hasClass("wpfront-notification-bar-spacer")||i.fixed_position&&!u.children().first().is(c)&&u.prepend(c)}))}else{var u;e("Setting notification bar at bottom."),(u=n("body")).children().last().is(c)||u.append(c),n((function(){u.children().last().is(c)||u.append(c)}))}var h=f.height();i.height>0&&(h=i.height,f.find("table, tbody, tr").css("height","100%")),f.height(0).css({position:i.fixed_position?"fixed":"relative",visibility:"visible"}),p.css({position:i.fixed_position?"fixed":"absolute"});var b=!1,v=!1,g=null,m=0,x=i.fixed_position&&""!=i.theme_sticky_selector;if(x&&n(window).on("scroll resize",(function(){k()})),i.close_button&&c.on("click",".wpfront-close",(function(){w(0,null,!0)})),i.button_action_close_bar&&c.on("click",".wpfront-button",(function(){w(0,null,!0)})),i.display_open_button&&c.on("click",o("#wpfront-notification-bar-open-button"),(function(){w(h)})),i.keep_closed&&Cookies.get(s))return e("Keep closed enabled and keep closed cookie exists. Hiding notification bar."),void w(0,(function(){f.removeClass("keep-closed")}));if(f.removeClass("keep-closed"),i.set_max_views&&(void 0===(a=Cookies.get(r))&&(a=0),a>=i.max_views))return e("Reached max views, hiding notification bar."),void w(0,(function(){f.removeClass("max-views-reached")}));f.removeClass("max-views-reached"),b=!0,i.display_scroll?(e("Display on scroll enabled. Hiding notification bar."),w(0),n(window).on("scroll",(function(){v||(n(this).scrollTop()>i.display_scroll_offset?w(h):w(0))}))):(e("Setting notification bar open event after "+i.display_after+" second(s)."),setTimeout((function(){w(h,(function(){i.auto_close_after>0&&(e("Setting notification bar auto close event after "+i.auto_close_after+" second(s)."),setTimeout((function(){w(0,null,!0)}),1e3*i.auto_close_after))}))}),1e3*i.display_after))}else jQuery((function(){wpfront_notification_bar(i,!0)}));function w(t,o,l){if(o=o||n.noop,l&&(v=!0),0==t){if(b)return;b=!0}else{if(!b)return;b=!1}0==t&&i.keep_closed&&l&&(i.keep_closed_for>0?Cookies.set(s,1,{path:"/",expires:i.keep_closed_for,sameSite:"strict"}):Cookies.set(s,1,{path:"/",sameSite:"strict"})),0!==t&&i.set_max_views&&(a=void 0===(a=Cookies.get(r))?0:parseInt(a),i.max_views_for>0?Cookies.set(r,a+1,{path:"/",expires:i.max_views_for,sameSite:"strict"}):Cookies.set(r,a+1,{path:"/",sameSite:"strict"}),e("Setting view count to "+(a+1)+"."));var d=o;o=function(){d(),t>0&&(0==i.height&&f.height("auto"),i.display_open_button&&(e("Setting reopen button state to hidden."),p.addClass("hidden")),b=!1),0==t&&i.display_open_button&&(e("Setting reopen button state to visible."),p.removeClass("hidden")),t>0?f.removeClass("hidden"):f.addClass("hidden")},e(t>0?"Setting notification bar state to visible.":"Setting notification bar state to hidden."),i.animate_delay>0?f.stop().show().animate({height:t+"px"},{duration:1e3*i.animate_delay,easing:"swing",complete:function(){i.fixed_position&&c.height(t),k(t),o()},step:function(t){i.fixed_position&&c.height(t),k(t)}}):(f.height(t),i.fixed_position&&c.height(t),k(t),o())}function k(t){if(!x)return 0;if(!0!==t){clearInterval(m);var e=0;m=setInterval((function(){k(!0),++e>100&&clearInterval(m)}),10)}var o=n(i.theme_sticky_selector);if(0==o.length||"fixed"!==o.css("position"))return 0;1==i.position&&(null===g&&(g=o.position().top),f.is(":visible")?o.css("top",f.height()+f.position().top+"px"):o.css("top",g+"px")),2==i.position&&(null===g&&(g=o.height()+parseFloat(o.css("bottom"))),f.is(":visible")?o.css("bottom",f.height()+parseFloat(f.css("bottom"))+"px"):o.css("bottom",g+"px"))}};
|
||||
Reference in new issue
Block a user