@nocobase/portal-template-default 1.0.10 → 1.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/dist/assets/CoordinateSystem-C8P-Cleg.js +1 -0
  2. package/dist/assets/LegendVisualProvider-Bdgkckq-.js +1 -0
  3. package/dist/assets/LineDraw-iG-ADes-.js +1 -0
  4. package/dist/assets/SymbolDraw-DXoSw1tM.js +1 -0
  5. package/dist/assets/VisualMapping-C_ee4Eht.js +1 -0
  6. package/dist/assets/auth-method-demo-DaOCuvsq.js +1 -0
  7. package/dist/assets/auto-login-provider-5Uxza9Ms.js +2 -0
  8. package/dist/assets/auto-login-provider-DyaPGK2D.js +1 -0
  9. package/dist/assets/auto-redirect-provider-CfwRvYOI.js +1 -0
  10. package/dist/assets/auto-redirect-provider-Cr3jmYts.js +1 -0
  11. package/dist/assets/auto-redirect-provider-QkJQRBbG.js +1 -0
  12. package/dist/assets/calendar-DjDRfD5t.js +1 -0
  13. package/dist/assets/card-DuQBOS6A.js +1 -0
  14. package/dist/assets/cas-sign-in-button-CyqG1QME.js +1 -0
  15. package/dist/assets/components-D-ptYjX_.js +20 -0
  16. package/dist/assets/configuration-gate-C08mkkiX.js +1 -0
  17. package/dist/assets/createClipPathFromCoordSys-wj34-b1B.js +1 -0
  18. package/dist/assets/createSeriesDataSimply-D0A6SAVQ.js +1 -0
  19. package/dist/assets/customGraphicKeyframeAnimation-DWrhrHL_.js +3 -0
  20. package/dist/assets/demo-BYWHeKUe.js +1 -0
  21. package/dist/assets/demo-CPWoNtx8.js +1 -0
  22. package/dist/assets/demo-CyvJk5zV.js +1 -0
  23. package/dist/assets/demo-D4OiKplc.js +1 -0
  24. package/dist/assets/demo-DBueJg0m.js +1 -0
  25. package/dist/assets/demo-DkIhyiRK.js +1 -0
  26. package/dist/assets/demo-tpTjO0sC.js +1 -0
  27. package/dist/assets/dingtalk-sign-in-button-DSWsSruv.js +1 -0
  28. package/dist/assets/echarts-preview-DxHNfq1C.js +1 -0
  29. package/dist/assets/echarts-runtime-D8kXn6ME.js +58 -0
  30. package/dist/assets/echarts-runtime-advanced-QY8v95qK.js +1 -0
  31. package/dist/assets/echarts-runtime-common-D-yqAK-r.js +1 -0
  32. package/dist/assets/echarts-runtime-components-P4-i8jPU.js +1 -0
  33. package/dist/assets/echarts-runtime-hierarchy-ByQZ-DbP.js +1 -0
  34. package/dist/assets/floating-BFVEyPEp.js +15 -0
  35. package/dist/assets/index-BgCbGDMc.js +43 -0
  36. package/dist/assets/index-Btk35Nx-.js +23 -0
  37. package/dist/assets/index-CwNxd66J.js +1 -0
  38. package/dist/assets/index-MB-jfQld.js +686 -0
  39. package/dist/assets/index-NH3aqqQz.css +1 -0
  40. package/dist/assets/index-gFtCXH3o.js +58 -0
  41. package/dist/assets/index-um5hdKdZ.js +23 -0
  42. package/dist/assets/labelHelper-DQqRy3a_.js +1 -0
  43. package/dist/assets/ldap-sign-in-form--6Gt3yGq.js +1 -0
  44. package/dist/assets/nocobase-ai-chat-VTMaZFQB.svg +50 -0
  45. package/dist/assets/oidc-sign-in-button-CQdRcR_p.js +1 -0
  46. package/dist/assets/page-context-CnQ4GYM7.js +73 -0
  47. package/dist/assets/prompt-card-B2RS4nt2.js +1 -0
  48. package/dist/assets/prompt-output-DZHRM2ft.js +1 -0
  49. package/dist/assets/saml-sign-in-button-BHL5a0JV.js +1 -0
  50. package/dist/assets/sectorHelper-DN_Vv6OL.js +1 -0
  51. package/dist/assets/shortcut-C5x5LQWU.js +47 -0
  52. package/dist/assets/sms-sign-in-form-DTX9GV2I.js +1 -0
  53. package/dist/assets/static.browser-jI1psK0d.js +30 -0
  54. package/dist/assets/switch-CRL8PmRI.js +1 -0
  55. package/dist/assets/tool-cards-DFttLAfo.js +40 -0
  56. package/dist/assets/use-authenticator-sign-in-CRGjzXju.js +1 -0
  57. package/dist/assets/use-dingtalk-sign-in-8WYzJ2jf.js +1 -0
  58. package/dist/assets/use-wecom-sign-in-C9j8wfCD.js +1 -0
  59. package/dist/assets/wecom-sign-in-button-mIS1zGSU.js +1 -0
  60. package/dist/favicon.ico +0 -0
  61. package/dist/index.html +40 -0
  62. package/dist/index.raw.html +49 -0
  63. package/dist/logo-dark.png +0 -0
  64. package/dist/logo-mark-dark.png +0 -0
  65. package/dist/logo-mark.png +0 -0
  66. package/dist/logo.png +0 -0
  67. package/package.json +2 -2
@@ -0,0 +1 @@
1
+ function i(e,t){return e.type===t}export{i};
@@ -0,0 +1 @@
1
+ function d(a){return{seriesType:a,reset:function(t,e){var n=e.findComponents({mainType:"legend"});if(!(!n||!n.length)){var i=t.getData();i.filterSelf(function(o){for(var u=i.getName(o),r=0;r<n.length;r++)if(!n[r].isSelected(u))return!1;return!0})}}}}var s=(function(){function a(t,e){this._getDataWithEncodedVisual=t,this._getRawData=e}return a.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},a.prototype.containName=function(t){var e=this._getRawData();return e.indexOfName(t)>=0},a.prototype.indexOfName=function(t){var e=this._getDataWithEncodedVisual();return e.indexOfName(t)},a.prototype.getItemVisual=function(t,e){var n=this._getDataWithEncodedVisual();return n.getItemVisual(t,e)},a})();export{s as L,d};
@@ -0,0 +1 @@
1
+ import{_ as R,bF as k,W as N,a4 as G,bG as H,bH as fe,be as he,bI as me,bq as pe,f as C,k as ce,aL as ve,bJ as W,bK as F,bL as re,bM as de,D as ye,bx as ge,aS as _e,bk as oe,P as be,j as Te,y as Y,x as Se,u as ae,z as K,r as Le,ap as Me,H as Pe,t as we,ac as Ce,ad as Ae,bn as Ie,G as ie,ae as ne,af as se,a as Oe,I as Re}from"./echarts-runtime-D8kXn6ME.js";var j=H,Be=(function(a){R(r,a);function r(e){var t=a.call(this)||this;return t.type="view",t.dimensions=["x","y"],t._roamTransformable=new k,t._rawTransformable=new k,t.name=e,t}return r.prototype.setBoundingRect=function(e,t,o,i){return this._rect=new N(e,t,o,i),this._rect},r.prototype.getBoundingRect=function(){return this._rect},r.prototype.setViewRect=function(e,t,o,i){this._transformTo(e,t,o,i),this._viewRect=new N(e,t,o,i)},r.prototype._transformTo=function(e,t,o,i){var n=this.getBoundingRect(),s=this._rawTransformable;s.transform=n.calculateTransform(new N(e,t,o,i));var l=s.parent;s.parent=null,s.decomposeTransform(),s.parent=l,this._updateTransform()},r.prototype.setCenter=function(e,t){e&&(this._center=[G(e[0],t.getWidth()),G(e[1],t.getHeight())],this._updateCenterAndZoom())},r.prototype.setZoom=function(e){e=e||1;var t=this.zoomLimit;t&&(t.max!=null&&(e=Math.min(t.max,e)),t.min!=null&&(e=Math.max(t.min,e))),this._zoom=e,this._updateCenterAndZoom()},r.prototype.getDefaultCenter=function(){var e=this.getBoundingRect(),t=e.x+e.width/2,o=e.y+e.height/2;return[t,o]},r.prototype.getCenter=function(){return this._center||this.getDefaultCenter()},r.prototype.getZoom=function(){return this._zoom||1},r.prototype.getRoamTransform=function(){return this._roamTransformable.getLocalTransform()},r.prototype._updateCenterAndZoom=function(){var e=this._rawTransformable.getLocalTransform(),t=this._roamTransformable,o=this.getDefaultCenter(),i=this.getCenter(),n=this.getZoom();i=H([],i,e),o=H([],o,e),t.originX=i[0],t.originY=i[1],t.x=o[0]-i[0],t.y=o[1]-i[1],t.scaleX=t.scaleY=n,this._updateTransform()},r.prototype._updateTransform=function(){var e=this._roamTransformable,t=this._rawTransformable;t.parent=e,e.updateTransform(),t.updateTransform(),fe(this.transform||(this.transform=[]),t.transform||he()),this._rawTransform=t.getLocalTransform(),this.invTransform=this.invTransform||[],me(this.invTransform,this.transform),this.decomposeTransform()},r.prototype.getTransformInfo=function(){var e=this._rawTransformable,t=this._roamTransformable,o=new k;return o.transform=t.transform,o.decomposeTransform(),{roam:{x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY},raw:{x:e.x,y:e.y,scaleX:e.scaleX,scaleY:e.scaleY}}},r.prototype.getViewRect=function(){return this._viewRect},r.prototype.getViewRectAfterRoam=function(){var e=this.getBoundingRect().clone();return e.applyTransform(this.transform),e},r.prototype.dataToPoint=function(e,t,o){var i=t?this._rawTransform:this.transform;return o=o||[],i?j(o,e,i):pe(o,e)},r.prototype.pointToData=function(e){var t=this.invTransform;return t?j([],e,t):[e[0],e[1]]},r.prototype.convertToPixel=function(e,t,o){var i=U(t);return i===this?i.dataToPoint(o):null},r.prototype.convertFromPixel=function(e,t,o){var i=U(t);return i===this?i.pointToData(o):null},r.prototype.containPoint=function(e){return this.getViewRectAfterRoam().contain(e[0],e[1])},r.dimensions=["x","y"],r})(k);function U(a){var r=a.seriesModel;return r?r.coordinateSystem:null}function D(a,r){return a.pointToProjected?a.pointToProjected(r):a.pointToData(r)}function ze(a,r,e,t){var o=a.getZoom(),i=a.getCenter(),n=r.zoom,s=a.projectedToPoint?a.projectedToPoint(i):a.dataToPoint(i);if(r.dx!=null&&r.dy!=null&&(s[0]-=r.dx,s[1]-=r.dy,a.setCenter(D(a,s),t)),n!=null){if(e){var l=e.min||0,u=e.max||1/0;n=Math.max(Math.min(o*n,u),l)/o}a.scaleX*=n,a.scaleY*=n;var f=(r.originX-a.x)*(n-1),m=(r.originY-a.y)*(n-1);a.x-=f,a.y-=m,a.updateTransform(),a.setCenter(D(a,s),t),a.setZoom(n*o)}return{center:a.getCenter(),zoom:a.getZoom()}}var xe=(function(a){R(r,a);function r(e){var t=a.call(this)||this;t._zr=e;var o=C(t._mousedownHandler,t),i=C(t._mousemoveHandler,t),n=C(t._mouseupHandler,t),s=C(t._mousewheelHandler,t),l=C(t._pinchHandler,t);return t.enable=function(u,f){this.disable(),this._opt=ce(ve(f)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),u==null&&(u=!0),(u===!0||u==="move"||u==="pan")&&(e.on("mousedown",o),e.on("mousemove",i),e.on("mouseup",n)),(u===!0||u==="scale"||u==="zoom")&&(e.on("mousewheel",s),e.on("pinch",l))},t.disable=function(){e.off("mousedown",o),e.off("mousemove",i),e.off("mouseup",n),e.off("mousewheel",s),e.off("pinch",l)},t}return r.prototype.isDragging=function(){return this._dragging},r.prototype.isPinching=function(){return this._pinching},r.prototype.setPointerChecker=function(e){this.pointerChecker=e},r.prototype.dispose=function(){this.disable()},r.prototype._mousedownHandler=function(e){if(!W(e)){for(var t=e.target;t;){if(t.draggable)return;t=t.__hostTarget||t.parent}var o=e.offsetX,i=e.offsetY;this.pointerChecker&&this.pointerChecker(e,o,i)&&(this._x=o,this._y=i,this._dragging=!0)}},r.prototype._mousemoveHandler=function(e){if(!(!this._dragging||!E("moveOnMouseMove",e,this._opt)||e.gestureEvent==="pinch"||F(this._zr,"globalPan"))){var t=e.offsetX,o=e.offsetY,i=this._x,n=this._y,s=t-i,l=o-n;this._x=t,this._y=o,this._opt.preventDefaultMouseMove&&re(e.event),le(this,"pan","moveOnMouseMove",e,{dx:s,dy:l,oldX:i,oldY:n,newX:t,newY:o,isAvailableBehavior:null})}},r.prototype._mouseupHandler=function(e){W(e)||(this._dragging=!1)},r.prototype._mousewheelHandler=function(e){var t=E("zoomOnMouseWheel",e,this._opt),o=E("moveOnMouseWheel",e,this._opt),i=e.wheelDelta,n=Math.abs(i),s=e.offsetX,l=e.offsetY;if(!(i===0||!t&&!o)){if(t){var u=n>3?1.4:n>1?1.2:1.1,f=i>0?u:1/u;X(this,"zoom","zoomOnMouseWheel",e,{scale:f,originX:s,originY:l,isAvailableBehavior:null})}if(o){var m=Math.abs(i),h=(i>0?1:-1)*(m>3?.4:m>1?.15:.05);X(this,"scrollMove","moveOnMouseWheel",e,{scrollDelta:h,originX:s,originY:l,isAvailableBehavior:null})}}},r.prototype._pinchHandler=function(e){if(!F(this._zr,"globalPan")){var t=e.pinchScale>1?1.1:1/1.1;X(this,"zoom",null,e,{scale:t,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})}},r})(de);function X(a,r,e,t,o){a.pointerChecker&&a.pointerChecker(t,o.originX,o.originY)&&(re(t.event),le(a,r,e,t,o))}function le(a,r,e,t,o){o.isAvailableBehavior=C(E,null,e,t),a.trigger(r,o)}function E(a,r,e){var t=e[a];return!a||t&&(!ye(t)||r.event[t+"Key"])}function Ve(a,r,e){var t=a.target;t.x+=r,t.y+=e,t.dirty()}function He(a,r,e,t){var o=a.target,i=a.zoomLimit,n=a.zoom=a.zoom||1;if(n*=r,i){var s=i.min||0,l=i.max||1/0;n=Math.max(Math.min(l,n),s)}var u=n/a.zoom;a.zoom=n,o.x-=(e-o.x)*(u-1),o.y-=(t-o.y)*(u-1),o.scaleX*=u,o.scaleY*=u,o.dirty()}var $=ge.prototype,B=_e.prototype,ue=(function(){function a(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return a})();(function(a){R(r,a);function r(){return a!==null&&a.apply(this,arguments)||this}return r})(ue);function z(a){return isNaN(+a.cpx1)||isNaN(+a.cpy1)}var ke=(function(a){R(r,a);function r(e){var t=a.call(this,e)||this;return t.type="ec-line",t}return r.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},r.prototype.getDefaultShape=function(){return new ue},r.prototype.buildPath=function(e,t){z(t)?$.buildPath.call(this,e,t):B.buildPath.call(this,e,t)},r.prototype.pointAt=function(e){return z(this.shape)?$.pointAt.call(this,e):B.pointAt.call(this,e)},r.prototype.tangentAt=function(e){var t=this.shape,o=z(t)?[t.x2-t.x1,t.y2-t.y1]:B.tangentAt.call(this,e);return oe(o,o)},r})(be),x=["fromSymbol","toSymbol"];function q(a){return"_"+a+"Type"}function J(a,r,e){var t=r.getItemVisual(e,a);if(!t||t==="none")return t;var o=r.getItemVisual(e,a+"Size"),i=r.getItemVisual(e,a+"Rotate"),n=r.getItemVisual(e,a+"Offset"),s=r.getItemVisual(e,a+"KeepAspect"),l=ne(o),u=se(n||0,l);return t+l+u+(i||"")+(s||"")}function Q(a,r,e){var t=r.getItemVisual(e,a);if(!(!t||t==="none")){var o=r.getItemVisual(e,a+"Size"),i=r.getItemVisual(e,a+"Rotate"),n=r.getItemVisual(e,a+"Offset"),s=r.getItemVisual(e,a+"KeepAspect"),l=ne(o),u=se(n||0,l),f=Oe(t,-l[0]/2+u[0],-l[1]/2+u[1],l[0],l[1],null,s);return f.__specifiedRotation=i==null||isNaN(i)?void 0:+i*Math.PI/180||0,f.name=a,f}}function Ee(a){var r=new ke({name:"line",subPixelOptimize:!0});return Z(r.shape,a),r}function Z(a,r){a.x1=r[0][0],a.y1=r[0][1],a.x2=r[1][0],a.y2=r[1][1],a.percent=1;var e=r[2];e?(a.cpx1=e[0],a.cpy1=e[1]):(a.cpx1=NaN,a.cpy1=NaN)}var Ne=(function(a){R(r,a);function r(e,t,o){var i=a.call(this)||this;return i._createLine(e,t,o),i}return r.prototype._createLine=function(e,t,o){var i=e.hostModel,n=e.getItemLayout(t),s=Ee(n);s.shape.percent=0,Te(s,{shape:{percent:1}},i,t),this.add(s),Y(x,function(l){var u=Q(l,e,t);this.add(u),this[q(l)]=J(l,e,t)},this),this._updateCommonStl(e,t,o)},r.prototype.updateData=function(e,t,o){var i=e.hostModel,n=this.childOfName("line"),s=e.getItemLayout(t),l={shape:{}};Z(l.shape,s),Se(n,l,i,t),Y(x,function(u){var f=J(u,e,t),m=q(u);if(this[m]!==f){this.remove(this.childOfName(u));var h=Q(u,e,t);this.add(h)}this[m]=f},this),this._updateCommonStl(e,t,o)},r.prototype.getLinePath=function(){return this.childAt(0)},r.prototype._updateCommonStl=function(e,t,o){var i=e.hostModel,n=this.childOfName("line"),s=o&&o.emphasisLineStyle,l=o&&o.blurLineStyle,u=o&&o.selectLineStyle,f=o&&o.labelStatesModels,m=o&&o.emphasisDisabled,h=o&&o.focus,A=o&&o.blurScope;if(!o||e.hasItemOption){var v=e.getItemModel(t),d=v.getModel("emphasis");s=d.getModel("lineStyle").getLineStyle(),l=v.getModel(["blur","lineStyle"]).getLineStyle(),u=v.getModel(["select","lineStyle"]).getLineStyle(),m=d.get("disabled"),h=d.get("focus"),A=d.get("blurScope"),f=ae(v)}var S=e.getItemVisual(t,"style"),b=S.stroke;n.useStyle(S),n.style.fill=null,n.style.strokeNoScale=!0,n.ensureState("emphasis").style=s,n.ensureState("blur").style=l,n.ensureState("select").style=u,Y(x,function(P){var p=this.childOfName(P);if(p){p.setColor(b),p.style.opacity=S.opacity;for(var L=0;L<K.length;L++){var c=K[L],w=n.getState(c);if(w){var M=w.style||{},I=p.ensureState(c),O=I.style||(I.style={});M.stroke!=null&&(O[p.__isEmptyBrush?"stroke":"fill"]=M.stroke),M.opacity!=null&&(O.opacity=M.opacity)}}p.markRedraw()}},this);var T=i.getRawValue(t);Le(this,f,{labelDataIndex:t,labelFetcher:{getFormattedLabel:function(P,p){return i.getFormattedLabel(P,p,e.dataType)}},inheritColor:b||"#000",defaultOpacity:S.opacity,defaultText:(T==null?e.getName(t):isFinite(T)?Me(T):T)+""});var g=this.getTextContent();if(g){var _=f.normal;g.__align=g.style.align,g.__verticalAlign=g.style.verticalAlign,g.__position=_.get("position")||"middle";var y=_.get("distance");Pe(y)||(y=[y,y]),g.__labelDistance=y}this.setTextConfig({position:null,local:!0,inside:!1}),we(this,h,A,m)},r.prototype.highlight=function(){Ce(this)},r.prototype.downplay=function(){Ae(this)},r.prototype.updateLayout=function(e,t){this.setLinePoints(e.getItemLayout(t))},r.prototype.setLinePoints=function(e){var t=this.childOfName("line");Z(t.shape,e),t.dirty()},r.prototype.beforeUpdate=function(){var e=this,t=e.childOfName("fromSymbol"),o=e.childOfName("toSymbol"),i=e.getTextContent();if(!t&&!o&&(!i||i.ignore))return;for(var n=1,s=this.parent;s;)s.scaleX&&(n/=s.scaleX),s=s.parent;var l=e.childOfName("line");if(!this.__dirty&&!l.__dirty)return;var u=l.shape.percent,f=l.pointAt(0),m=l.pointAt(u),h=Ie([],m,f);oe(h,h);function A(w,M){var I=w.__specifiedRotation;if(I==null){var O=l.tangentAt(M);w.attr("rotation",(M===1?-1:1)*Math.PI/2-Math.atan2(O[1],O[0]))}else w.attr("rotation",I)}if(t&&(t.setPosition(f),A(t,0),t.scaleX=t.scaleY=n*u,t.markRedraw()),o&&(o.setPosition(m),A(o,1),o.scaleX=o.scaleY=n*u,o.markRedraw()),i&&!i.ignore){i.x=i.y=0,i.originX=i.originY=0;var v=void 0,d=void 0,S=i.__labelDistance,b=S[0]*n,T=S[1]*n,g=u/2,_=l.tangentAt(g),y=[_[1],-_[0]],P=l.pointAt(g);y[1]>0&&(y[0]=-y[0],y[1]=-y[1]);var p=_[0]<0?-1:1;if(i.__position!=="start"&&i.__position!=="end"){var L=-Math.atan2(_[1],_[0]);m[0]<f[0]&&(L=Math.PI+L),i.rotation=L}var c=void 0;switch(i.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":c=-T,d="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":c=T,d="top";break;default:c=0,d="middle"}switch(i.__position){case"end":i.x=h[0]*b+m[0],i.y=h[1]*T+m[1],v=h[0]>.8?"left":h[0]<-.8?"right":"center",d=h[1]>.8?"top":h[1]<-.8?"bottom":"middle";break;case"start":i.x=-h[0]*b+f[0],i.y=-h[1]*T+f[1],v=h[0]>.8?"right":h[0]<-.8?"left":"center",d=h[1]>.8?"bottom":h[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":i.x=b*p+f[0],i.y=f[1]+c,v=_[0]<0?"right":"left",i.originX=-b*p,i.originY=-c;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":i.x=P[0],i.y=P[1]+c,v="center",i.originY=-c;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":i.x=-b*p+m[0],i.y=m[1]+c,v=_[0]>=0?"right":"left",i.originX=b*p,i.originY=-c;break}i.scaleX=i.scaleY=n,i.setStyle({verticalAlign:i.__verticalAlign||d,align:i.__align||v})}},r})(ie),Ze=(function(){function a(r){this.group=new ie,this._LineCtor=r||Ne}return a.prototype.updateData=function(r){var e=this;this._progressiveEls=null;var t=this,o=t.group,i=t._lineData;t._lineData=r,i||o.removeAll();var n=ee(r);r.diff(i).add(function(s){e._doAdd(r,s,n)}).update(function(s,l){e._doUpdate(i,r,l,s,n)}).remove(function(s){o.remove(i.getItemGraphicEl(s))}).execute()},a.prototype.updateLayout=function(){var r=this._lineData;r&&r.eachItemGraphicEl(function(e,t){e.updateLayout(r,t)},this)},a.prototype.incrementalPrepareUpdate=function(r){this._seriesScope=ee(r),this._lineData=null,this.group.removeAll()},a.prototype.incrementalUpdate=function(r,e){this._progressiveEls=[];function t(s){!s.isGroup&&!Ye(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var o=r.start;o<r.end;o++){var i=e.getItemLayout(o);if(V(i)){var n=new this._LineCtor(e,o,this._seriesScope);n.traverse(t),this.group.add(n),e.setItemGraphicEl(o,n),this._progressiveEls.push(n)}}},a.prototype.remove=function(){this.group.removeAll()},a.prototype.eachRendered=function(r){Re(this._progressiveEls||this.group,r)},a.prototype._doAdd=function(r,e,t){var o=r.getItemLayout(e);if(V(o)){var i=new this._LineCtor(r,e,t);r.setItemGraphicEl(e,i),this.group.add(i)}},a.prototype._doUpdate=function(r,e,t,o,i){var n=r.getItemGraphicEl(t);if(!V(e.getItemLayout(o))){this.group.remove(n);return}n?n.updateData(e,o,i):n=new this._LineCtor(e,o,i),e.setItemGraphicEl(o,n),this.group.add(n)},a})();function Ye(a){return a.animators&&a.animators.length>0}function ee(a){var r=a.hostModel,e=r.getModel("emphasis");return{lineStyle:r.getModel("lineStyle").getLineStyle(),emphasisLineStyle:e.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:r.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:r.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:e.get("disabled"),blurScope:e.get("blurScope"),focus:e.get("focus"),labelStatesModels:ae(r)}}function te(a){return isNaN(a[0])||isNaN(a[1])}function V(a){return a&&!te(a[0])&&!te(a[1])}export{Ze as L,xe as R,Be as V,He as a,ze as b,Ne as c,Ve as u};
@@ -0,0 +1 @@
1
+ import{_ as U,a as Z,ac as j,ad as k,x as G,J as F,j as H,u as N,af as B,al as J,N as C,r as K,t as $,l as q,ah as T,ae as Q,G as X,I as W,a9 as x}from"./echarts-runtime-D8kXn6ME.js";import{a as ee}from"./labelHelper-DQqRy3a_.js";var te=(function(n){U(t,n);function t(e,l,i,a){var m=n.call(this)||this;return m.updateData(e,l,i,a),m}return t.prototype._createSymbol=function(e,l,i,a,m){this.removeAll();var s=Z(e,-1,-1,2,2,null,m);s.attr({z2:100,culling:!0,scaleX:a[0]/2,scaleY:a[1]/2}),s.drift=le,this._symbolType=e,this.add(s)},t.prototype.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(null,e)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){j(this.childAt(0))},t.prototype.downplay=function(){k(this.childAt(0))},t.prototype.setZ=function(e,l){var i=this.childAt(0);i.zlevel=e,i.z=l},t.prototype.setDraggable=function(e,l){var i=this.childAt(0);i.draggable=e,i.cursor=!l&&e?"move":i.cursor},t.prototype.updateData=function(e,l,i,a){this.silent=!1;var m=e.getItemVisual(l,"symbol")||"circle",s=e.hostModel,c=t.getSymbolSize(e,l),h=m!==this._symbolType,y=a&&a.disableAnimation;if(h){var u=e.getItemVisual(l,"symbolKeepAspect");this._createSymbol(m,e,l,c,u)}else{var o=this.childAt(0);o.silent=!1;var r={scaleX:c[0]/2,scaleY:c[1]/2};y?o.attr(r):G(o,r,s,l),F(o)}if(this._updateCommon(e,l,c,i,a),h){var o=this.childAt(0);if(!y){var r={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:o.style.opacity}};o.scaleX=o.scaleY=0,o.style.opacity=0,H(o,r,s,l)}}y&&this.childAt(0).stopAnimation("leave")},t.prototype._updateCommon=function(e,l,i,a,m){var s=this.childAt(0),c=e.hostModel,h,y,u,o,r,f,b,v,p;if(a&&(h=a.emphasisItemStyle,y=a.blurItemStyle,u=a.selectItemStyle,o=a.focus,r=a.blurScope,b=a.labelStatesModels,v=a.hoverScale,p=a.cursorStyle,f=a.emphasisDisabled),!a||e.hasItemOption){var g=a&&a.itemModel?a.itemModel:e.getItemModel(l),S=g.getModel("emphasis");h=S.getModel("itemStyle").getItemStyle(),u=g.getModel(["select","itemStyle"]).getItemStyle(),y=g.getModel(["blur","itemStyle"]).getItemStyle(),o=S.get("focus"),r=S.get("blurScope"),f=S.get("disabled"),b=N(g),v=S.getShallow("scale"),p=g.getShallow("cursor")}var V=e.getItemVisual(l,"symbolRotate");s.attr("rotation",(V||0)*Math.PI/180||0);var _=B(e.getItemVisual(l,"symbolOffset"),i);_&&(s.x=_[0],s.y=_[1]),p&&s.attr("cursor",p);var d=e.getItemVisual(l,"style"),E=d.fill;if(s instanceof J){var I=s.style;s.useStyle(C({image:I.image,x:I.x,y:I.y,width:I.width,height:I.height},d))}else s.__isEmptyBrush?s.useStyle(C({},d)):s.useStyle(d),s.style.decal=null,s.setColor(E,m&&m.symbolInnerColor),s.style.strokeNoScale=!0;var D=e.getItemVisual(l,"liftZ"),A=this._z2;D!=null?A==null&&(this._z2=s.z2,s.z2+=D):A!=null&&(s.z2=A,this._z2=null);var w=m&&m.useNameLabel;K(s,b,{labelFetcher:c,labelDataIndex:l,defaultText:R,inheritColor:E,defaultOpacity:d.opacity});function R(P){return w?e.getName(P):ee(e,P)}this._sizeX=i[0]/2,this._sizeY=i[1]/2;var z=s.ensureState("emphasis");z.style=h,s.ensureState("select").style=u,s.ensureState("blur").style=y;var O=v==null||v===!0?Math.max(1.1,3/this._sizeY):isFinite(v)&&v>0?+v:1;z.scaleX=this._sizeX*O,z.scaleY=this._sizeY*O,this.setSymbolScale(1),$(this,o,r,f)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,l,i){var a=this.childAt(0),m=q(this).dataIndex,s=i&&i.animation;if(this.silent=a.silent=!0,i&&i.fadeLabel){var c=a.getTextContent();c&&T(c,{style:{opacity:0}},l,{dataIndex:m,removeOpt:s,cb:function(){a.removeTextContent()}})}else a.removeTextContent();T(a,{style:{opacity:0},scaleX:0,scaleY:0},l,{dataIndex:m,cb:e,removeOpt:s})},t.getSymbolSize=function(e,l){return Q(e.getItemVisual(l,"symbolSize"))},t})(X);function le(n,t){this.parent.drift(n,t)}function M(n,t,e,l){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(l.isIgnore&&l.isIgnore(e))&&!(l.clipShape&&!l.clipShape.contain(t[0],t[1]))&&n.getItemVisual(e,"symbol")!=="none"}function L(n){return n!=null&&!x(n)&&(n={isIgnore:n}),n||{}}function Y(n){var t=n.hostModel,e=t.getModel("emphasis");return{emphasisItemStyle:e.getModel("itemStyle").getItemStyle(),blurItemStyle:t.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:t.getModel(["select","itemStyle"]).getItemStyle(),focus:e.get("focus"),blurScope:e.get("blurScope"),emphasisDisabled:e.get("disabled"),hoverScale:e.get("scale"),labelStatesModels:N(t),cursorStyle:t.get("cursor")}}var ie=(function(){function n(t){this.group=new X,this._SymbolCtor=t||te}return n.prototype.updateData=function(t,e){this._progressiveEls=null,e=L(e);var l=this.group,i=t.hostModel,a=this._data,m=this._SymbolCtor,s=e.disableAnimation,c=Y(t),h={disableAnimation:s},y=e.getSymbolPoint||function(u){return t.getItemLayout(u)};a||l.removeAll(),t.diff(a).add(function(u){var o=y(u);if(M(t,o,u,e)){var r=new m(t,u,c,h);r.setPosition(o),t.setItemGraphicEl(u,r),l.add(r)}}).update(function(u,o){var r=a.getItemGraphicEl(o),f=y(u);if(!M(t,f,u,e)){l.remove(r);return}var b=t.getItemVisual(u,"symbol")||"circle",v=r&&r.getSymbolType&&r.getSymbolType();if(!r||v&&v!==b)l.remove(r),r=new m(t,u,c,h),r.setPosition(f);else{r.updateData(t,u,c,h);var p={x:f[0],y:f[1]};s?r.attr(p):G(r,p,i)}l.add(r),t.setItemGraphicEl(u,r)}).remove(function(u){var o=a.getItemGraphicEl(u);o&&o.fadeOut(function(){l.remove(o)},i)}).execute(),this._getSymbolPoint=y,this._data=t},n.prototype.updateLayout=function(){var t=this,e=this._data;e&&e.eachItemGraphicEl(function(l,i){var a=t._getSymbolPoint(i);l.setPosition(a),l.markRedraw()})},n.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=Y(t),this._data=null,this.group.removeAll()},n.prototype.incrementalUpdate=function(t,e,l){this._progressiveEls=[],l=L(l);function i(c){c.isGroup||(c.incremental=!0,c.ensureState("emphasis").hoverLayer=!0)}for(var a=t.start;a<t.end;a++){var m=e.getItemLayout(a);if(M(e,m,a,l)){var s=new this._SymbolCtor(e,a,this._seriesScope);s.traverse(i),s.setPosition(m),this.group.add(s),e.setItemGraphicEl(a,s),this._progressiveEls.push(s)}}},n.prototype.eachRendered=function(t){W(this._progressiveEls||this.group,t)},n.prototype.remove=function(t){var e=this.group,l=this._data;l&&t?l.eachItemGraphicEl(function(i){i.fadeOut(function(){e.remove(i)},l.hostModel)}):e.removeAll()},n})();export{ie as S,te as a};
@@ -0,0 +1 @@
1
+ import{_ as j,m as T,k as U,bN as ae,aL as se,D as O,o as he,aX as de,a1 as ve,bO as ge,bP as me,bQ as ye,bR as xe,y as v,H as P,ai as Ve,bS as be,aw as Ae,aK as we,bT as re,bU as Me,bV as Ie,a4 as G,bW as ie,bX as Te,b as Se,aY as Le,aU as _e,aA as D,a9 as H,bY as Ne,f as ne,aV as ze,bZ as $,b_ as q,bg as Ce,bf as K}from"./echarts-runtime-D8kXn6ME.js";var N=me.value;function R(r,e){return U({show:e},r)}var Pe=(function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){var t=this.get("boundaryGap"),a=this.get("splitNumber"),i=this.get("scale"),n=this.get("axisLine"),o=this.get("axisTick"),s=this.get("axisLabel"),u=this.get("axisName"),f=this.get(["axisName","show"]),l=this.get(["axisName","formatter"]),h=this.get("axisNameGap"),m=this.get("triggerEvent"),b=T(this.get("indicator")||[],function(c){c.max!=null&&c.max>0&&!c.min?c.min=0:c.min!=null&&c.min<0&&!c.max&&(c.max=0);var g=u;c.color!=null&&(g=U({color:c.color},u));var d=ae(se(c),{boundaryGap:t,splitNumber:a,scale:i,axisLine:n,axisTick:o,axisLabel:s,name:c.text,showName:f,nameLocation:"end",nameGap:h,nameTextStyle:g,triggerEvent:m},!1);if(O(l)){var x=d.name;d.name=l.replace("{value}",x??"")}else he(l)&&(d.name=l(d.name,d));var y=new de(d,null,this.ecModel);return ve(y,ge.prototype),y.mainType="radar",y.componentIndex=this.componentIndex,y},this);this._indicatorModels=b},e.prototype.getIndicatorModels=function(){return this._indicatorModels},e.type="radar",e.defaultOption={z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:ae({lineStyle:{color:"#bbb"}},N.axisLine),axisLabel:R(N.axisLabel,!1),axisTick:R(N.axisTick,!1),splitLine:R(N.splitLine,!0),splitArea:R(N.splitArea,!0),indicator:[]},e})(ye),De=["axisLine","axisTickLabel","axisName"],He=(function(r){j(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,i){var n=this.group;n.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},e.prototype._buildAxes=function(t){var a=t.coordinateSystem,i=a.getIndicatorAxes(),n=T(i,function(o){var s=o.model.get("showName")?o.name:"",u=new xe(o.model,{axisName:s,position:[a.cx,a.cy],rotation:o.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return u});v(n,function(o){v(De,o.add,o),this.group.add(o.getGroup())},this)},e.prototype._buildSplitLineAndArea=function(t){var a=t.coordinateSystem,i=a.getIndicatorAxes();if(!i.length)return;var n=t.get("shape"),o=t.getModel("splitLine"),s=t.getModel("splitArea"),u=o.getModel("lineStyle"),f=s.getModel("areaStyle"),l=o.get("show"),h=s.get("show"),m=u.get("color"),b=f.get("color"),c=P(m)?m:[m],g=P(b)?b:[b],d=[],x=[];function y(V,M,L){var _=L%M.length;return V[_]=V[_]||[],_}if(n==="circle")for(var S=i[0].getTicksCoords(),ee=a.cx,te=a.cy,p=0;p<S.length;p++){if(l){var A=y(d,c,p);d[A].push(new Ve({shape:{cx:ee,cy:te,r:S[p].coord}}))}if(h&&p<S.length-1){var A=y(x,g,p);x[A].push(new be({shape:{cx:ee,cy:te,r0:S[p].coord,r:S[p+1].coord}}))}}else for(var E,ce=T(i,function(V,M){var L=V.getTicksCoords();return E=E==null?L.length-1:Math.min(L.length-1,E),T(L,function(_){return a.coordToPoint(_.coord,M)})}),Y=[],p=0;p<=E;p++){for(var w=[],Z=0;Z<i.length;Z++)w.push(ce[Z][p]);if(w[0]&&w.push(w[0].slice()),l){var A=y(d,c,p);d[A].push(new Ae({shape:{points:w}}))}if(h&&Y){var A=y(x,g,p-1);x[A].push(new we({shape:{points:w.concat(Y)}}))}Y=w.slice().reverse()}var fe=u.getLineStyle(),pe=f.getAreaStyle();v(x,function(V,M){this.group.add(re(V,{style:U({stroke:"none",fill:g[M%g.length]},pe),silent:!0}))},this),v(d,function(V,M){this.group.add(re(V,{style:U({fill:"none",stroke:c[M%c.length]},fe),silent:!0}))},this)},e.type="radar",e})(Me),ke=(function(r){j(e,r);function e(t,a,i){var n=r.call(this,t,a,i)||this;return n.type="value",n.angle=0,n.name="",n}return e})(Ie),Ee=(function(){function r(e,t,a){this.dimensions=[],this._model=e,this._indicatorAxes=T(e.getIndicatorModels(),function(i,n){var o="indicator_"+n,s=new ke(o,new ie);return s.name=i.get("name"),s.model=i,i.axis=s,this.dimensions.push(o),s},this),this.resize(e,a)}return r.prototype.getIndicatorAxes=function(){return this._indicatorAxes},r.prototype.dataToPoint=function(e,t){var a=this._indicatorAxes[t];return this.coordToPoint(a.dataToCoord(e),t)},r.prototype.coordToPoint=function(e,t){var a=this._indicatorAxes[t],i=a.angle,n=this.cx+e*Math.cos(i),o=this.cy-e*Math.sin(i);return[n,o]},r.prototype.pointToData=function(e){var t=e[0]-this.cx,a=e[1]-this.cy,i=Math.sqrt(t*t+a*a);t/=i,a/=i;for(var n=Math.atan2(-a,t),o=1/0,s,u=-1,f=0;f<this._indicatorAxes.length;f++){var l=this._indicatorAxes[f],h=Math.abs(n-l.angle);h<o&&(s=l,u=f,o=h)}return[u,+(s&&s.coordToData(i))]},r.prototype.resize=function(e,t){var a=e.get("center"),i=t.getWidth(),n=t.getHeight(),o=Math.min(i,n)/2;this.cx=G(a[0],i),this.cy=G(a[1],n),this.startAngle=e.get("startAngle")*Math.PI/180;var s=e.get("radius");(O(s)||Se(s))&&(s=[0,s]),this.r0=G(s[0],o),this.r=G(s[1],o),v(this._indicatorAxes,function(u,f){u.setExtent(this.r0,this.r);var l=this.startAngle+f*Math.PI*2/this._indicatorAxes.length;l=Math.atan2(Math.sin(l),Math.cos(l)),u.angle=l},this)},r.prototype.update=function(e,t){var a=this._indicatorAxes,i=this._model;v(a,function(s){s.scale.setExtent(1/0,-1/0)}),e.eachSeriesByType("radar",function(s,u){if(!(s.get("coordinateSystem")!=="radar"||e.getComponent("radar",s.get("radarIndex"))!==i)){var f=s.getData();v(a,function(l){l.scale.unionExtentFromData(f,f.mapDimension(l.dim))})}},this);var n=i.get("splitNumber"),o=new ie;o.setExtent(0,n),o.setInterval(1),v(a,function(s,u){Te(s.scale,s.model,o)})},r.prototype.convertToPixel=function(e,t,a){return console.warn("Not implemented."),null},r.prototype.convertFromPixel=function(e,t,a){return console.warn("Not implemented."),null},r.prototype.containPoint=function(e){return console.warn("Not implemented."),!1},r.create=function(e,t){var a=[];return e.eachComponent("radar",function(i){var n=new r(i,e,t);a.push(n),i.coordinateSystem=n}),e.eachSeriesByType("radar",function(i){i.get("coordinateSystem")==="radar"&&(i.coordinateSystem=a[i.get("radarIndex")||0])}),a},r.dimensions=[],r})();function Xe(r){r.registerCoordinateSystem("radar",Ee),r.registerComponentModel(Pe),r.registerComponentView(He),r.registerVisual({seriesType:"radar",reset:function(e){var t=e.getData();t.each(function(a){t.setItemVisual(a,"legendIcon","roundRect")}),t.setVisual("legendIcon","roundRect")}})}var k=v,Ge=H,X=-1,le=(function(){function r(e){var t=e.mappingMethod,a=e.type,i=this.option=se(e);this.type=a,this.mappingMethod=t,this._normalizeData=Be[t];var n=r.visualHandlers[a];this.applyVisual=n.applyVisual,this.getColorMapper=n.getColorMapper,this._normalizedToVisual=n._normalizedToVisual[t],t==="piecewise"?(Q(i),Re(i)):t==="category"?i.categories?Fe(i):Q(i,!0):(_e(t!=="linear"||i.dataExtent),Q(i))}return r.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},r.prototype.getNormalizer=function(){return ne(this._normalizeData,this)},r.listVisualTypes=function(){return ze(r.visualHandlers)},r.isValidType=function(e){return r.visualHandlers.hasOwnProperty(e)},r.eachVisual=function(e,t,a){H(e)?v(e,t,a):t.call(a,e)},r.mapVisual=function(e,t,a){var i,n=P(e)?[]:H(e)?{}:(i=!0,null);return r.eachVisual(e,function(o,s){var u=t.call(a,o,s);i?n=u:n[s]=u}),n},r.retrieveVisuals=function(e){var t={},a;return e&&k(r.visualHandlers,function(i,n){e.hasOwnProperty(n)&&(t[n]=e[n],a=!0)}),a?t:null},r.prepareVisualTypes=function(e){if(P(e))e=e.slice();else if(Ge(e)){var t=[];k(e,function(a,i){t.push(i)}),e=t}else return[];return e.sort(function(a,i){return i==="color"&&a!=="color"&&a.indexOf("color")===0?1:-1}),e},r.dependsOn=function(e,t){return t==="color"?!!(e&&e.indexOf(t)===0):e===t},r.findPieceIndex=function(e,t,a){for(var i,n=1/0,o=0,s=t.length;o<s;o++){var u=t[o].value;if(u!=null){if(u===e||O(u)&&u===e+"")return o;a&&m(u,o)}}for(var o=0,s=t.length;o<s;o++){var f=t[o],l=f.interval,h=f.close;if(l){if(l[0]===-1/0){if(B(h[1],e,l[1]))return o}else if(l[1]===1/0){if(B(h[0],l[0],e))return o}else if(B(h[0],l[0],e)&&B(h[1],e,l[1]))return o;a&&m(l[0],o),a&&m(l[1],o)}}if(a)return e===1/0?t.length-1:e===-1/0?0:i;function m(b,c){var g=Math.abs(b-e);g<n&&(n=g,i=c)}},r.visualHandlers={color:{applyVisual:z("color"),getColorMapper:function(){var e=this.option;return ne(e.mappingMethod==="category"?function(t,a){return!a&&(t=this._normalizeData(t)),C.call(this,t)}:function(t,a,i){var n=!!i;return!a&&(t=this._normalizeData(t)),i=q(t,e.parsedVisual,i),n?i:$(i,"rgba")},this)},_normalizedToVisual:{linear:function(e){return $(q(e,this.option.parsedVisual),"rgba")},category:C,piecewise:function(e,t){var a=W.call(this,t);return a==null&&(a=$(q(e,this.option.parsedVisual),"rgba")),a},fixed:I}},colorHue:F(function(e,t){return K(e,t)}),colorSaturation:F(function(e,t){return K(e,null,t)}),colorLightness:F(function(e,t){return K(e,null,null,t)}),colorAlpha:F(function(e,t){return Ce(e,t)}),decal:{applyVisual:z("decal"),_normalizedToVisual:{linear:null,category:C,piecewise:null,fixed:null}},opacity:{applyVisual:z("opacity"),_normalizedToVisual:J([0,1])},liftZ:{applyVisual:z("liftZ"),_normalizedToVisual:{linear:I,category:I,piecewise:I,fixed:I}},symbol:{applyVisual:function(e,t,a){var i=this.mapValueToVisual(e);a("symbol",i)},_normalizedToVisual:{linear:oe,category:C,piecewise:function(e,t){var a=W.call(this,t);return a==null&&(a=oe.call(this,e)),a},fixed:I}},symbolSize:{applyVisual:z("symbolSize"),_normalizedToVisual:J([0,1])}},r})();function Re(r){var e=r.pieceList;r.hasSpecialVisual=!1,v(e,function(t,a){t.originIndex=a,t.visual!=null&&(r.hasSpecialVisual=!0)})}function Fe(r){var e=r.categories,t=r.categoryMap={},a=r.visual;if(k(e,function(o,s){t[o]=s}),!P(a)){var i=[];H(a)?k(a,function(o,s){var u=t[s];i[u??X]=o}):i[X]=a,a=ue(r,i)}for(var n=e.length-1;n>=0;n--)a[n]==null&&(delete t[e[n]],e.pop())}function Q(r,e){var t=r.visual,a=[];H(t)?k(t,function(n){a.push(n)}):t!=null&&a.push(t);var i={color:1,symbol:1};!e&&a.length===1&&!i.hasOwnProperty(r.type)&&(a[1]=a[0]),ue(r,a)}function F(r){return{applyVisual:function(e,t,a){var i=this.mapValueToVisual(e);a("color",r(t("color"),i))},_normalizedToVisual:J([0,1])}}function oe(r){var e=this.option.visual;return e[Math.round(D(r,[0,1],[0,e.length-1],!0))]||{}}function z(r){return function(e,t,a){a(r,this.mapValueToVisual(e))}}function C(r){var e=this.option.visual;return e[this.option.loop&&r!==X?r%e.length:r]}function I(){return this.option.visual[0]}function J(r){return{linear:function(e){return D(e,r,this.option.visual,!0)},category:C,piecewise:function(e,t){var a=W.call(this,t);return a==null&&(a=D(e,r,this.option.visual,!0)),a},fixed:I}}function W(r){var e=this.option,t=e.pieceList;if(e.hasSpecialVisual){var a=le.findPieceIndex(r,t),i=t[a];if(i&&i.visual)return i.visual[this.type]}}function ue(r,e){return r.visual=e,r.type==="color"&&(r.parsedVisual=T(e,function(t){var a=Ne(t);return a||[0,0,0,1]})),e}var Be={linear:function(r){return D(r,this.option.dataExtent,[0,1],!0)},piecewise:function(r){var e=this.option.pieceList,t=le.findPieceIndex(r,e,!0);if(t!=null)return D(t,[0,e.length-1],[0,1],!0)},category:function(r){var e=this.option.categories?this.option.categoryMap[r]:r;return e??X},fixed:Le};function B(r,e,t){return r?e<=t:e<t}export{le as V,Xe as i};
@@ -0,0 +1 @@
1
+ import{j as e,B as a}from"./index-MB-jfQld.js";import{C as r,a as d,b as l,c,d as x}from"./card-DuQBOS6A.js";function h({authType:s,children:t,description:i,methodName:n}){return e.jsxs("div",{className:"space-y-8 pb-12",children:[e.jsxs("header",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(a,{variant:"secondary",children:"Authentication"}),e.jsx(a,{variant:"outline",children:s})]}),e.jsx("h1",{className:"font-heading text-3xl font-semibold tracking-tight",children:n}),e.jsx("p",{className:"max-w-3xl text-muted-foreground",children:i})]}),e.jsxs(r,{className:"max-w-2xl",children:[e.jsxs(d,{children:[e.jsx(l,{children:"Default component"}),e.jsx(c,{children:"Installed Registries add this UI to the dynamic login page automatically."})]}),e.jsx(x,{children:e.jsx("div",{className:"max-w-sm",children:t})})]})]})}export{h as A};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-CwNxd66J.js","assets/index-MB-jfQld.js","assets/index-NH3aqqQz.css"])))=>i.map(i=>d[i]);
2
+ import{b1 as p,b as d,a_ as m,a$ as s,b2 as w,j as k,b3 as y,b4 as b}from"./index-MB-jfQld.js";import{i as A}from"./use-dingtalk-sign-in-8WYzJ2jf.js";const T=new Set(["/login","/signin","/register","/forgot-password"]);async function C(l){const u=await b(()=>import("./index-CwNxd66J.js").then(c=>c.i),__vite__mapDeps([0,1,2])),n=u.default??u;return new Promise((c,h)=>{const i=t=>{const a=(t==null?void 0:t.code)??(t==null?void 0:t.authCode);a?c(String(a)):h(new Error("DingTalk did not return an authorization code."))},o=t=>h(new Error((t==null?void 0:t.errorMessage)||(t==null?void 0:t.message)||"Unable to request a DingTalk authorization code.")),f=()=>{var a,e;const t=(e=(a=n==null?void 0:n.runtime)==null?void 0:a.permission)==null?void 0:e.requestAuthCode;if(typeof t=="function"){const r=t({corpId:l,success:i,fail:o});r!=null&&r.then&&r.then(i).catch(o);return}if(typeof(n==null?void 0:n.getAuthCode)=="function"){n.getAuthCode({corpId:l,success:i,fail:o});return}o({message:"DingTalk auth-code API is unavailable."})};try{typeof n.ready=="function"?n.ready(f):f()}catch(t){o(t)}})}function v({children:l}){const{pathname:u,search:n}=p(),c=d.useRef(!1),h=A(),i=m(`${u}${n}`),o=h&&!s.getToken()&&!T.has(u),[f,t]=d.useState(o);return d.useEffect(()=>{if(!o||c.current){t(!1);return}c.current=!0,t(!0);const a=new AbortController;return(async()=>{try{const e=await s.action("dingtalk","checkLogin",{method:"GET",query:{isDingTalkBrowser:!0,redirect:i},signal:a.signal,authenticator:null,includeRole:!1,withAclMeta:!1});if((e==null?void 0:e.success)!==!1)return;if(e.autoLoginType==="oauth"&&e.authUrl){window.location.replace(s.resolveUrl(e.authUrl));return}if(e.autoLoginType!=="internal"||!e.authenticator||!e.corpId)return;const r=await C(e.corpId),g=await s.action("auth","signIn",{method:"POST",authenticator:e.authenticator,body:{authCode:r,loginType:"internal"}});if(!g.token)throw new Error("NocoBase did not return an access token.");s.setAuthenticator(e.authenticator),s.setToken(g.token),s.setRole(null),w(),window.location.replace(i)}catch(e){e instanceof DOMException&&e.name==="AbortError"||console.warn("Unable to complete DingTalk automatic login",e)}finally{t(!1)}})(),()=>a.abort()},[i,o]),f?k.jsx(y,{className:"min-h-svh"}):l}export{v as default};
@@ -0,0 +1 @@
1
+ import{j as r}from"./index-MB-jfQld.js";import{A as i}from"./auto-redirect-provider-CfwRvYOI.js";import{i as t}from"./use-wecom-sign-in-C9j8wfCD.js";function n({children:e}){const o=t();return r.jsx(i,{resource:"wecom",action:"checkLogin",enabled:o,query:{isWeComBrowser:o},children:e})}export{n as default};
@@ -0,0 +1 @@
1
+ import{b1 as b,b as s,a_ as A,a$ as a,j as w,b3 as x}from"./index-MB-jfQld.js";const E=new Set(["/login","/signin","/register","/forgot-password"]);function C({resource:o,action:r,enabled:d=!0,query:c,children:g}){const{pathname:i,search:m}=b(),l=s.useRef(!1),u=A(`${i}${m}`),n=d&&!a.getToken()&&!E.has(i),[p,t]=s.useState(n),f=s.useMemo(()=>c,[JSON.stringify(c)]);return s.useEffect(()=>{if(!n||l.current){t(!1);return}l.current=!0,t(!0);const h=new AbortController;return a.action(o,r,{method:"GET",query:{redirect:u,...f},signal:h.signal,authenticator:null,includeRole:!1,withAclMeta:!1}).then(e=>{if((e==null?void 0:e.success)===!1&&e.authUrl){window.location.replace(a.resolveUrl(e.authUrl));return}t(!1)}).catch(e=>{e instanceof DOMException&&e.name==="AbortError"||t(!1)}),()=>h.abort()},[r,u,o,n,f]),p?w.jsx(x,{className:"min-h-svh"}):g}export{C as A};
@@ -0,0 +1 @@
1
+ import{j as e}from"./index-MB-jfQld.js";import{A as t}from"./auto-redirect-provider-CfwRvYOI.js";function c({children:r}){return e.jsx(t,{resource:"saml",action:"checkRedirect",children:r})}export{c as default};
@@ -0,0 +1 @@
1
+ import{j as e}from"./index-MB-jfQld.js";import{A as t}from"./auto-redirect-provider-CfwRvYOI.js";function c({children:r}){return e.jsx(t,{resource:"oidc",action:"checkRedirect",children:r})}export{c as default};
@@ -0,0 +1 @@
1
+ import{bC as y,b as E,j as ae,bD as Nn,c as T,bE as Cn,C as xn,bF as it,D as pn}from"./index-MB-jfQld.js";function Yn(e,t,n="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:e,timeZoneName:n}).format(t).split(/\s/g).slice(2).join(" ")}const je={},De={};function oe(e,t){try{const r=(je[e]||(je[e]=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"longOffset"}).format))(t).split("GMT")[1];return r in De?De[r]:ut(r,r.split(":"))}catch{if(e in De)return De[e];const n=e==null?void 0:e.match(Tn);return n?ut(e,n.slice(1)):NaN}}const Tn=/([+-]\d\d):?(\d\d)?/;function ut(e,t){const n=+(t[0]||0),r=+(t[1]||0),a=+(t[2]||0)/60;return De[e]=n*60+r>0?n*60+r+a:n*60-r-a}class te extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(oe(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),vt(this,t)):this.setTime(Date.now())}static tz(t,...n){return n.length?new te(...n,t):new te(Date.now(),t)}withTimeZone(t){return new te(+this,t)}getTimezoneOffset(){const t=-oe(this.timeZone,this);return t>0?Math.floor(t):Math.ceil(t)}setTime(t){return Date.prototype.setTime.apply(this,arguments),Ye(this),+this}[Symbol.for("constructDateFrom")](t){return new te(+new Date(t),this.timeZone)}}const ct=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!ct.test(e))return;const t=e.replace(ct,"$1UTC");te.prototype[t]&&(e.startsWith("get")?te.prototype[e]=function(){return this.internal[t]()}:(te.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),_n(this),+this},te.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),Ye(this),+this}))});function Ye(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(-oe(e.timeZone,e)*60))}function _n(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),vt(e)}function vt(e,t){const n=Array.isArray(t)?Pn(t):+e.internal,r=oe(e.timeZone,e),a=r>0?Math.floor(r):Math.ceil(r),o=new Date(+e);o.setUTCHours(o.getUTCHours()-1);const s=-new Date(+e).getTimezoneOffset(),i=-new Date(+o).getTimezoneOffset(),u=s-i;let c=s;if(u&&s!==a){const I=Date.prototype.getHours.apply(e),B=Array.isArray(t)?t[3]||0:e.internal.getUTCHours();if(I!==B){const j=new Date(+e),V=s-a;V&&j.setUTCMinutes(j.getUTCMinutes()+V);const G=oe(e.timeZone,j);(G>0?Math.floor(G):Math.ceil(G))===a&&(c=i)}}const d=c-a;d&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+d);const l=new Date(+e);l.setUTCSeconds(0);const h=s>0?l.getSeconds():(l.getSeconds()-60)%60,w=Math.round(-(oe(e.timeZone,e)*60))%60;(w||h)&&Date.prototype.setUTCSeconds.call(e,Date.prototype.getUTCSeconds.call(e)+w+h);const D=oe(e.timeZone,e),O=D>0?Math.floor(D):Math.ceil(D),C=-new Date(+e).getTimezoneOffset()-O,b=O!==a,g=C-d,N=O-a,M=n-O*60*1e3,f=N>0&&dt(e)-n===N*60*1e3&&dt(e,M)!==n;if(b&&g&&!f){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+g);const I=oe(e.timeZone,e),B=I>0?Math.floor(I):Math.ceil(I),j=O-B;j&&g<0&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+j)}Ye(e);const _=(t?n:n+w*1e3)-+e.internal;_&&Math.abs(_)<1800*1e3&&(Date.prototype.setTime.call(e,+e+_),Ye(e))}function Pn(e){return Date.UTC(e[0],e.length>1?e[1]:0,e.length>2?e[2]:1,...e.slice(3))}function dt(e,t){const n=new Date(t??+e);return n.setUTCSeconds(n.getUTCSeconds()-Math.round(-oe(e.timeZone,n)*60)),+n}class z extends te{static tz(t,...n){return n.length?new z(...n,t):new z(Date.now(),t)}toISOString(){const[t,n,r]=this.tzComponents(),a=`${t}${n}:${r}`;return this.internal.toISOString().slice(0,-1)+a}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[t,n,r,a]=this.internal.toUTCString().split(" ");return`${t==null?void 0:t.slice(0,-1)} ${r} ${n} ${a}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[n,r,a]=this.tzComponents();return`${t} GMT${n}${r}${a} (${Yn(this.timeZone,this)})`}toLocaleString(t,n){return Date.prototype.toLocaleString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}toLocaleDateString(t,n){return Date.prototype.toLocaleDateString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}toLocaleTimeString(t,n){return Date.prototype.toLocaleTimeString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}tzComponents(){const t=this.getTimezoneOffset(),n=t>0?"-":"+",r=String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),a=String(Math.abs(t)%60).padStart(2,"0");return[n,r,a]}withTimeZone(t){return new z(+this,t)}[Symbol.for("constructDateFrom")](t){return new z(+new Date(t),this.timeZone)}}const Ot=6048e5,En=864e5,ft=Symbol.for("constructDateFrom");function q(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&ft in e?e[ft](t):e instanceof Date?new e.constructor(t):new Date(t)}function F(e,t){return q(t||e,e)}function Wt(e,t,n){const r=F(e,n==null?void 0:n.in);return isNaN(t)?q(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function St(e,t,n){const r=F(e,n==null?void 0:n.in);if(isNaN(t))return q(e,NaN);if(!t)return r;const a=r.getDate(),o=q(e,r.getTime());o.setMonth(r.getMonth()+t+1,0);const s=o.getDate();return a>=s?o:(r.setFullYear(o.getFullYear(),o.getMonth(),a),r)}let Fn={};function Se(){return Fn}function me(e,t){var i,u,c,d;const n=Se(),r=(t==null?void 0:t.weekStartsOn)??((u=(i=t==null?void 0:t.locale)==null?void 0:i.options)==null?void 0:u.weekStartsOn)??n.weekStartsOn??((d=(c=n.locale)==null?void 0:c.options)==null?void 0:d.weekStartsOn)??0,a=F(e,t==null?void 0:t.in),o=a.getDay(),s=(o<r?7:0)+o-r;return a.setDate(a.getDate()-s),a.setHours(0,0,0,0),a}function Oe(e,t){return me(e,{...t,weekStartsOn:1})}function Nt(e,t){const n=F(e,t==null?void 0:t.in),r=n.getFullYear(),a=q(n,0);a.setFullYear(r+1,0,4),a.setHours(0,0,0,0);const o=Oe(a),s=q(n,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);const i=Oe(s);return n.getTime()>=o.getTime()?r+1:n.getTime()>=i.getTime()?r:r-1}function lt(e){const t=F(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function ye(e,...t){const n=q.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function We(e,t){const n=F(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function Xe(e,t,n){const[r,a]=ye(n==null?void 0:n.in,e,t),o=We(r),s=We(a),i=+o-lt(o),u=+s-lt(s);return Math.round((i-u)/En)}function Bn(e,t){const n=Nt(e,t),r=q(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Oe(r)}function In(e,t,n){return Wt(e,t*7,n)}function Hn(e,t,n){return St(e,t*12,n)}function An(e,t){let n,r=t==null?void 0:t.in;return e.forEach(a=>{!r&&typeof a=="object"&&(r=q.bind(null,a));const o=F(a,r);(!n||n<o||isNaN(+o))&&(n=o)}),q(r,n||NaN)}function qn(e,t){let n,r=t==null?void 0:t.in;return e.forEach(a=>{!r&&typeof a=="object"&&(r=q.bind(null,a));const o=F(a,r);(!n||n>o||isNaN(+o))&&(n=o)}),q(r,n||NaN)}function jn(e,t,n){const[r,a]=ye(n==null?void 0:n.in,e,t);return+We(r)==+We(a)}function Ct(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function zn(e){return!(!Ct(e)&&typeof e!="number"||isNaN(+F(e)))}function xt(e,t,n){const[r,a]=ye(n==null?void 0:n.in,e,t),o=r.getFullYear()-a.getFullYear(),s=r.getMonth()-a.getMonth();return o*12+s}function Gn(e,t){const n=F(e,t==null?void 0:t.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function pt(e,t){const[n,r]=ye(e,t.start,t.end);return{start:n,end:r}}function Rn(e,t){const{start:n,end:r}=pt(t==null?void 0:t.in,e);let a=+n>+r;const o=a?+n:+r,s=a?r:n;s.setHours(0,0,0,0),s.setDate(1);let i=1;const u=[];for(;+s<=o;)u.push(q(n,s)),s.setMonth(s.getMonth()+i);return a?u.reverse():u}function $n(e,t){const n=F(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function Qn(e,t){const n=F(e,t==null?void 0:t.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}function Yt(e,t){const n=F(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Xn(e,t){const{start:n,end:r}=pt(t==null?void 0:t.in,e);let a=+n>+r;const o=a?+n:+r,s=a?r:n;s.setHours(0,0,0,0),s.setMonth(0,1);let i=1;const u=[];for(;+s<=o;)u.push(q(n,s)),s.setFullYear(s.getFullYear()+i);return a?u.reverse():u}function Tt(e,t){var i,u,c,d;const n=Se(),r=(t==null?void 0:t.weekStartsOn)??((u=(i=t==null?void 0:t.locale)==null?void 0:i.options)==null?void 0:u.weekStartsOn)??n.weekStartsOn??((d=(c=n.locale)==null?void 0:c.options)==null?void 0:d.weekStartsOn)??0,a=F(e,t==null?void 0:t.in),o=a.getDay(),s=(o<r?-7:0)+6-(o-r);return a.setDate(a.getDate()+s),a.setHours(23,59,59,999),a}function Vn(e,t){return Tt(e,{...t,weekStartsOn:1})}const Un={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Kn=(e,t,n)=>{let r;const a=Un[e];return typeof a=="string"?r=a:t===1?r=a.one:r=a.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function ze(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Zn={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Jn={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Ln={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},er={date:ze({formats:Zn,defaultWidth:"full"}),time:ze({formats:Jn,defaultWidth:"full"}),dateTime:ze({formats:Ln,defaultWidth:"full"})},tr={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},nr=(e,t,n,r)=>tr[e];function Me(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let a;if(r==="formatting"&&e.formattingValues){const s=e.defaultFormattingWidth||e.defaultWidth,i=n!=null&&n.width?String(n.width):s;a=e.formattingValues[i]||e.formattingValues[s]}else{const s=e.defaultWidth,i=n!=null&&n.width?String(n.width):e.defaultWidth;a=e.values[i]||e.values[s]}const o=e.argumentCallback?e.argumentCallback(t):t;return a[o]}}const rr={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},ar={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},or={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},sr={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},ir={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},ur={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},cr=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},dr={ordinalNumber:cr,era:Me({values:rr,defaultWidth:"wide"}),quarter:Me({values:ar,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Me({values:or,defaultWidth:"wide"}),day:Me({values:sr,defaultWidth:"wide"}),dayPeriod:Me({values:ir,defaultWidth:"wide",formattingValues:ur,defaultFormattingWidth:"wide"})};function ke(e){return(t,n={})=>{const r=n.width,a=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(a);if(!o)return null;const s=o[0],i=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(i)?lr(i,l=>l.test(s)):fr(i,l=>l.test(s));let c;c=e.valueCallback?e.valueCallback(u):u,c=n.valueCallback?n.valueCallback(c):c;const d=t.slice(s.length);return{value:c,rest:d}}}function fr(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function lr(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function hr(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const a=r[0],o=t.match(e.parsePattern);if(!o)return null;let s=e.valueCallback?e.valueCallback(o[0]):o[0];s=n.valueCallback?n.valueCallback(s):s;const i=t.slice(a.length);return{value:s,rest:i}}}const mr=/^(\d+)(th|st|nd|rd)?/i,yr=/\d+/i,gr={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},wr={any:[/^b/i,/^(a|c)/i]},br={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Mr={any:[/1/i,/2/i,/3/i,/4/i]},kr={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Dr={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},vr={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Or={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Wr={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Sr={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Nr={ordinalNumber:hr({matchPattern:mr,parsePattern:yr,valueCallback:e=>parseInt(e,10)}),era:ke({matchPatterns:gr,defaultMatchWidth:"wide",parsePatterns:wr,defaultParseWidth:"any"}),quarter:ke({matchPatterns:br,defaultMatchWidth:"wide",parsePatterns:Mr,defaultParseWidth:"any",valueCallback:e=>e+1}),month:ke({matchPatterns:kr,defaultMatchWidth:"wide",parsePatterns:Dr,defaultParseWidth:"any"}),day:ke({matchPatterns:vr,defaultMatchWidth:"wide",parsePatterns:Or,defaultParseWidth:"any"}),dayPeriod:ke({matchPatterns:Wr,defaultMatchWidth:"any",parsePatterns:Sr,defaultParseWidth:"any"})},he={code:"en-US",formatDistance:Kn,formatLong:er,formatRelative:nr,localize:dr,match:Nr,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Cr(e,t){const n=F(e,t==null?void 0:t.in);return Xe(n,Yt(n))+1}function Ve(e,t){const n=F(e,t==null?void 0:t.in),r=+Oe(n)-+Bn(n);return Math.round(r/Ot)+1}function _t(e,t){var d,l,h,w;const n=F(e,t==null?void 0:t.in),r=n.getFullYear(),a=Se(),o=(t==null?void 0:t.firstWeekContainsDate)??((l=(d=t==null?void 0:t.locale)==null?void 0:d.options)==null?void 0:l.firstWeekContainsDate)??a.firstWeekContainsDate??((w=(h=a.locale)==null?void 0:h.options)==null?void 0:w.firstWeekContainsDate)??1,s=q((t==null?void 0:t.in)||e,0);s.setFullYear(r+1,0,o),s.setHours(0,0,0,0);const i=me(s,t),u=q((t==null?void 0:t.in)||e,0);u.setFullYear(r,0,o),u.setHours(0,0,0,0);const c=me(u,t);return+n>=+i?r+1:+n>=+c?r:r-1}function xr(e,t){var i,u,c,d;const n=Se(),r=(t==null?void 0:t.firstWeekContainsDate)??((u=(i=t==null?void 0:t.locale)==null?void 0:i.options)==null?void 0:u.firstWeekContainsDate)??n.firstWeekContainsDate??((d=(c=n.locale)==null?void 0:c.options)==null?void 0:d.firstWeekContainsDate)??1,a=_t(e,t),o=q((t==null?void 0:t.in)||e,0);return o.setFullYear(a,0,r),o.setHours(0,0,0,0),me(o,t)}function Ue(e,t){const n=F(e,t==null?void 0:t.in),r=+me(n,t)-+xr(n,t);return Math.round(r/Ot)+1}function P(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const ue={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return P(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):P(n+1,2)},d(e,t){return P(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return P(e.getHours()%12||12,t.length)},H(e,t){return P(e.getHours(),t.length)},m(e,t){return P(e.getMinutes(),t.length)},s(e,t){return P(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),a=Math.trunc(r*Math.pow(10,n-3));return P(a,t.length)}},fe={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},ht={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),a=r>0?r:1-r;return n.ordinalNumber(a,{unit:"year"})}return ue.y(e,t)},Y:function(e,t,n,r){const a=_t(e,r),o=a>0?a:1-a;if(t==="YY"){const s=o%100;return P(s,2)}return t==="Yo"?n.ordinalNumber(o,{unit:"year"}):P(o,t.length)},R:function(e,t){const n=Nt(e);return P(n,t.length)},u:function(e,t){const n=e.getFullYear();return P(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return P(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return P(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return ue.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return P(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const a=Ue(e,r);return t==="wo"?n.ordinalNumber(a,{unit:"week"}):P(a,t.length)},I:function(e,t,n){const r=Ve(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):P(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):ue.d(e,t)},D:function(e,t,n){const r=Cr(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):P(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const a=e.getDay(),o=(a-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return P(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});case"eeee":default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const a=e.getDay(),o=(a-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return P(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});case"cccc":default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),a=r===0?7:r;switch(t){case"i":return String(a);case"ii":return P(a,t.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const a=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let a;switch(r===12?a=fe.noon:r===0?a=fe.midnight:a=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let a;switch(r>=17?a=fe.evening:r>=12?a=fe.afternoon:r>=4?a=fe.morning:a=fe.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return ue.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):ue.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):P(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):P(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):ue.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):ue.s(e,t)},S:function(e,t){return ue.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return yt(r);case"XXXX":case"XX":return ce(r);case"XXXXX":case"XXX":default:return ce(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return yt(r);case"xxxx":case"xx":return ce(r);case"xxxxx":case"xxx":default:return ce(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+mt(r,":");case"OOOO":default:return"GMT"+ce(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+mt(r,":");case"zzzz":default:return"GMT"+ce(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return P(r,t.length)},T:function(e,t,n){return P(+e,t.length)}};function mt(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),a=Math.trunc(r/60),o=r%60;return o===0?n+String(a):n+String(a)+t+P(o,2)}function yt(e,t){return e%60===0?(e>0?"-":"+")+P(Math.abs(e)/60,2):ce(e,t)}function ce(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),a=P(Math.trunc(r/60),2),o=P(r%60,2);return n+a+t+o}const gt=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},Pt=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},pr=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],a=n[2];if(!a)return gt(e,t);let o;switch(r){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",gt(r,t)).replace("{{time}}",Pt(a,t))},Yr={p:Pt,P:pr},Tr=/^D+$/,_r=/^Y+$/,Pr=["D","DD","YY","YYYY"];function Er(e){return Tr.test(e)}function Fr(e){return _r.test(e)}function Br(e,t,n){const r=Ir(e,t,n);if(console.warn(r),Pr.includes(e))throw new RangeError(r)}function Ir(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Hr=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ar=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,qr=/^'([^]*?)'?$/,jr=/''/g,zr=/[a-zA-Z]/;function ve(e,t,n){var d,l,h,w,D,O,v,C;const r=Se(),a=(n==null?void 0:n.locale)??r.locale??he,o=(n==null?void 0:n.firstWeekContainsDate)??((l=(d=n==null?void 0:n.locale)==null?void 0:d.options)==null?void 0:l.firstWeekContainsDate)??r.firstWeekContainsDate??((w=(h=r.locale)==null?void 0:h.options)==null?void 0:w.firstWeekContainsDate)??1,s=(n==null?void 0:n.weekStartsOn)??((O=(D=n==null?void 0:n.locale)==null?void 0:D.options)==null?void 0:O.weekStartsOn)??r.weekStartsOn??((C=(v=r.locale)==null?void 0:v.options)==null?void 0:C.weekStartsOn)??0,i=F(e,n==null?void 0:n.in);if(!zn(i))throw new RangeError("Invalid time value");let u=t.match(Ar).map(b=>{const g=b[0];if(g==="p"||g==="P"){const N=Yr[g];return N(b,a.formatLong)}return b}).join("").match(Hr).map(b=>{if(b==="''")return{isToken:!1,value:"'"};const g=b[0];if(g==="'")return{isToken:!1,value:Gr(b)};if(ht[g])return{isToken:!0,value:b};if(g.match(zr))throw new RangeError("Format string contains an unescaped latin alphabet character `"+g+"`");return{isToken:!1,value:b}});a.localize.preprocessor&&(u=a.localize.preprocessor(i,u));const c={firstWeekContainsDate:o,weekStartsOn:s,locale:a};return u.map(b=>{if(!b.isToken)return b.value;const g=b.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&Fr(g)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&Er(g))&&Br(g,t,String(e));const N=ht[g[0]];return N(i,g,a.localize,c)}).join("")}function Gr(e){const t=e.match(qr);return t?t[1].replace(jr,"'"):e}function Rr(e,t){const n=F(e,t==null?void 0:t.in),r=n.getFullYear(),a=n.getMonth(),o=q(n,0);return o.setFullYear(r,a+1,0),o.setHours(0,0,0,0),o.getDate()}function $r(e,t){return F(e,t==null?void 0:t.in).getMonth()}function Qr(e,t){return F(e,t==null?void 0:t.in).getFullYear()}function Xr(e,t){return+F(e)>+F(t)}function Vr(e,t){return+F(e)<+F(t)}function Ur(e,t,n){const[r,a]=ye(n==null?void 0:n.in,e,t);return r.getFullYear()===a.getFullYear()&&r.getMonth()===a.getMonth()}function Kr(e,t,n){const[r,a]=ye(n==null?void 0:n.in,e,t);return r.getFullYear()===a.getFullYear()}function Zr(e,t,n){const r=F(e,n==null?void 0:n.in),a=r.getFullYear(),o=r.getDate(),s=q(e,0);s.setFullYear(a,t,15),s.setHours(0,0,0,0);const i=Rr(s);return r.setMonth(t,Math.min(o,i)),r}function Jr(e,t,n){const r=F(e,n==null?void 0:n.in);return isNaN(+r)?q(e,NaN):(r.setFullYear(t),r)}const wt=5,Lr=4;function ea(e,t){const n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,a=t.addDays(e,-r+1),o=t.addDays(a,wt*7-1);return t.getMonth(e)===t.getMonth(o)?wt:Lr}function Et(e,t){const n=t.startOfMonth(e),r=n.getDay();return r===1?n:r===0?t.addDays(n,-6):t.addDays(n,-1*(r-1))}function ta(e,t){const n=Et(e,t),r=ea(e,t);return t.addDays(n,r*7-1)}const Ft={...he,labels:{labelDayButton:(e,t,n,r)=>{let a;r&&typeof r.format=="function"?a=r.format.bind(r):a=(s,i)=>ve(s,i,{locale:he,...n});let o=a(e,"PPPP");return t.today&&(o=`Today, ${o}`),t.selected&&(o=`${o}, selected`),o},labelMonthDropdown:"Choose the Month",labelNext:"Go to the Next Month",labelPrevious:"Go to the Previous Month",labelWeekNumber:e=>`Week ${e}`,labelYearDropdown:"Choose the Year",labelGrid:(e,t,n)=>{let r;return n&&typeof n.format=="function"?r=n.format.bind(n):r=(a,o)=>ve(a,o,{locale:he,...t}),r(e,"LLLL yyyy")},labelGridcell:(e,t,n,r)=>{let a;r&&typeof r.format=="function"?a=r.format.bind(r):a=(s,i)=>ve(s,i,{locale:he,...n});let o=a(e,"PPPP");return t!=null&&t.today&&(o=`Today, ${o}`),o},labelNav:"Navigation bar",labelWeekNumberHeader:"Week Number",labelWeekday:(e,t,n)=>{let r;return n&&typeof n.format=="function"?r=n.format.bind(n):r=(a,o)=>ve(a,o,{locale:he,...t}),r(e,"cccc")}}};class Q{constructor(t,n){this.today=()=>{var a;if((a=this.overrides)!=null&&a.today)return this.overrides.today();if(this.options.timeZone)return z.tz(this.options.timeZone);const r=this.options.Date??Date;return new r},this.newDate=(r,a,o)=>{var s;return(s=this.overrides)!=null&&s.newDate?this.overrides.newDate(r,a,o):this.options.timeZone?new z(r,a,o,this.options.timeZone):new Date(r,a,o)},this.addDays=(r,a)=>{var o;return(o=this.overrides)!=null&&o.addDays?this.overrides.addDays(r,a):Wt(r,a)},this.addMonths=(r,a)=>{var o;return(o=this.overrides)!=null&&o.addMonths?this.overrides.addMonths(r,a):St(r,a)},this.addWeeks=(r,a)=>{var o;return(o=this.overrides)!=null&&o.addWeeks?this.overrides.addWeeks(r,a):In(r,a)},this.addYears=(r,a)=>{var o;return(o=this.overrides)!=null&&o.addYears?this.overrides.addYears(r,a):Hn(r,a)},this.differenceInCalendarDays=(r,a)=>{var o;return(o=this.overrides)!=null&&o.differenceInCalendarDays?this.overrides.differenceInCalendarDays(r,a):Xe(r,a)},this.differenceInCalendarMonths=(r,a)=>{var o;return(o=this.overrides)!=null&&o.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(r,a):xt(r,a)},this.eachMonthOfInterval=r=>{var a;return(a=this.overrides)!=null&&a.eachMonthOfInterval?this.overrides.eachMonthOfInterval(r):Rn(r)},this.eachYearOfInterval=r=>{var i;const a=(i=this.overrides)!=null&&i.eachYearOfInterval?this.overrides.eachYearOfInterval(r):Xn(r),o=new Set(a.map(u=>this.getYear(u)));if(o.size===a.length)return a;const s=[];return o.forEach(u=>{s.push(new Date(u,0,1))}),s},this.endOfBroadcastWeek=r=>{var a;return(a=this.overrides)!=null&&a.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(r):ta(r,this)},this.endOfISOWeek=r=>{var a;return(a=this.overrides)!=null&&a.endOfISOWeek?this.overrides.endOfISOWeek(r):Vn(r)},this.endOfMonth=r=>{var a;return(a=this.overrides)!=null&&a.endOfMonth?this.overrides.endOfMonth(r):Gn(r)},this.endOfWeek=(r,a)=>{var o;return(o=this.overrides)!=null&&o.endOfWeek?this.overrides.endOfWeek(r,a):Tt(r,this.options)},this.endOfYear=r=>{var a;return(a=this.overrides)!=null&&a.endOfYear?this.overrides.endOfYear(r):Qn(r)},this.format=(r,a,o)=>{var i;const s=(i=this.overrides)!=null&&i.format?this.overrides.format(r,a,this.options):ve(r,a,this.options);return this.options.numerals&&this.options.numerals!=="latn"?this.replaceDigits(s):s},this.getISOWeek=r=>{var a;return(a=this.overrides)!=null&&a.getISOWeek?this.overrides.getISOWeek(r):Ve(r)},this.getMonth=(r,a)=>{var o;return(o=this.overrides)!=null&&o.getMonth?this.overrides.getMonth(r,this.options):$r(r,this.options)},this.getYear=(r,a)=>{var o;return(o=this.overrides)!=null&&o.getYear?this.overrides.getYear(r,this.options):Qr(r,this.options)},this.getWeek=(r,a)=>{var o;return(o=this.overrides)!=null&&o.getWeek?this.overrides.getWeek(r,this.options):Ue(r,this.options)},this.isAfter=(r,a)=>{var o;return(o=this.overrides)!=null&&o.isAfter?this.overrides.isAfter(r,a):Xr(r,a)},this.isBefore=(r,a)=>{var o;return(o=this.overrides)!=null&&o.isBefore?this.overrides.isBefore(r,a):Vr(r,a)},this.isDate=r=>{var a;return(a=this.overrides)!=null&&a.isDate?this.overrides.isDate(r):Ct(r)},this.isSameDay=(r,a)=>{var o;return(o=this.overrides)!=null&&o.isSameDay?this.overrides.isSameDay(r,a):jn(r,a)},this.isSameMonth=(r,a)=>{var o;return(o=this.overrides)!=null&&o.isSameMonth?this.overrides.isSameMonth(r,a):Ur(r,a)},this.isSameYear=(r,a)=>{var o;return(o=this.overrides)!=null&&o.isSameYear?this.overrides.isSameYear(r,a):Kr(r,a)},this.max=r=>{var a;return(a=this.overrides)!=null&&a.max?this.overrides.max(r):An(r)},this.min=r=>{var a;return(a=this.overrides)!=null&&a.min?this.overrides.min(r):qn(r)},this.setMonth=(r,a)=>{var o;return(o=this.overrides)!=null&&o.setMonth?this.overrides.setMonth(r,a):Zr(r,a)},this.setYear=(r,a)=>{var o;return(o=this.overrides)!=null&&o.setYear?this.overrides.setYear(r,a):Jr(r,a)},this.startOfBroadcastWeek=(r,a)=>{var o;return(o=this.overrides)!=null&&o.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(r,this):Et(r,this)},this.startOfDay=r=>{var a;return(a=this.overrides)!=null&&a.startOfDay?this.overrides.startOfDay(r):We(r)},this.startOfISOWeek=r=>{var a;return(a=this.overrides)!=null&&a.startOfISOWeek?this.overrides.startOfISOWeek(r):Oe(r)},this.startOfMonth=r=>{var a;return(a=this.overrides)!=null&&a.startOfMonth?this.overrides.startOfMonth(r):$n(r)},this.startOfWeek=(r,a)=>{var o;return(o=this.overrides)!=null&&o.startOfWeek?this.overrides.startOfWeek(r,this.options):me(r,this.options)},this.startOfYear=r=>{var a;return(a=this.overrides)!=null&&a.startOfYear?this.overrides.startOfYear(r):Yt(r)},this.options={locale:Ft,...t},this.overrides=n}getDigitMap(){const{numerals:t="latn"}=this.options,n=new Intl.NumberFormat("en-US",{numberingSystem:t}),r={};for(let a=0;a<10;a++)r[a.toString()]=n.format(a);return r}replaceDigits(t){const n=this.getDigitMap();return t.replace(/\d/g,r=>n[r]||r)}formatNumber(t){return this.replaceDigits(t.toString())}getMonthYearOrder(){var n;const t=(n=this.options.locale)==null?void 0:n.code;return t&&Q.yearFirstLocales.has(t)?"year-first":"month-first"}formatMonthYear(t){const{locale:n,timeZone:r,numerals:a}=this.options,o=n==null?void 0:n.code;if(o&&Q.yearFirstLocales.has(o))try{return new Intl.DateTimeFormat(o,{month:"long",year:"numeric",timeZone:r,numberingSystem:a}).format(t)}catch{}const s=this.getMonthYearOrder()==="year-first"?"y LLLL":"LLLL y";return this.format(t,s)}}Q.yearFirstLocales=new Set(["eu","hu","ja","ja-Hira","ja-JP","ko","ko-KR","lt","lt-LT","lv","lv-LV","mn","mn-MN","zh","zh-CN","zh-HK","zh-TW"]);const ne=new Q;class Bt{constructor(t,n,r=ne){this.date=t,this.displayMonth=n,this.outside=!!(n&&!r.isSameMonth(t,n)),this.dateLib=r,this.isoDate=r.format(t,"yyyy-MM-dd"),this.displayMonthId=r.format(n,"yyyy-MM"),this.dateMonthId=r.format(t,"yyyy-MM")}isEqualTo(t){return this.dateLib.isSameDay(t.date,this.date)&&this.dateLib.isSameMonth(t.displayMonth,this.displayMonth)}}class na{constructor(t,n){this.date=t,this.weeks=n}}class ra{constructor(t,n){this.days=n,this.weekNumber=t}}function aa(e){return y.createElement("span",{...e})}function oa(e){const{size:t=24,orientation:n="left",className:r,style:a}=e;return y.createElement("svg",{className:r,style:a,width:t,height:t,viewBox:"0 0 24 24"},n==="up"&&y.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),n==="down"&&y.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),n==="left"&&y.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),n==="right"&&y.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function sa(e){const{day:t,modifiers:n,...r}=e;return y.createElement("td",{...r})}function ia(e){const{day:t,modifiers:n,...r}=e,a=y.useRef(null);return y.useEffect(()=>{var o;n.focused&&((o=a.current)==null||o.focus())},[n.focused]),y.createElement("button",{ref:a,...r})}var m;(function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"})(m||(m={}));var H;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(H||(H={}));var J;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})(J||(J={}));var $;(function(e){e.weeks_before_enter="weeks_before_enter",e.weeks_before_exit="weeks_before_exit",e.weeks_after_enter="weeks_after_enter",e.weeks_after_exit="weeks_after_exit",e.caption_after_enter="caption_after_enter",e.caption_after_exit="caption_after_exit",e.caption_before_enter="caption_before_enter",e.caption_before_exit="caption_before_exit"})($||($={}));const It=E.createContext(void 0);function Te(){const e=E.useContext(It);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function ua(e){const{options:t,className:n,...r}=e,{classNames:a,components:o,styles:s}=Te(),i=[a[m.Dropdown],n].join(" "),u=t==null?void 0:t.find(({value:c})=>c===r.value);return y.createElement("span",{"data-disabled":r.disabled,className:a[m.DropdownRoot],style:s==null?void 0:s[m.DropdownRoot]},y.createElement(o.Select,{className:i,...r},t==null?void 0:t.map(({value:c,label:d,disabled:l})=>y.createElement(o.Option,{key:c,value:c,disabled:l},d))),y.createElement("span",{className:a[m.CaptionLabel],style:s==null?void 0:s[m.CaptionLabel],"aria-hidden":!0},u==null?void 0:u.label,y.createElement(o.Chevron,{orientation:"down",size:18,className:a[m.Chevron],style:s==null?void 0:s[m.Chevron]})))}function ca(e){return y.createElement("div",{...e})}function da(e){return y.createElement("div",{...e})}function fa(e){const{calendarMonth:t,displayIndex:n,...r}=e;return y.createElement("div",{...r},e.children)}function la(e){const{calendarMonth:t,displayIndex:n,...r}=e;return y.createElement("div",{...r})}function ha(e){return y.createElement("table",{...e})}function ma(e){return y.createElement("div",{...e})}function ya(e){const{components:t}=Te();return y.createElement(t.Dropdown,{...e})}function ga(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:a,...o}=e,{components:s,classNames:i,styles:u,labels:{labelPrevious:c,labelNext:d}}=Te(),l=E.useCallback(w=>{a&&(n==null||n(w))},[a,n]),h=E.useCallback(w=>{r&&(t==null||t(w))},[r,t]);return y.createElement("nav",{...o},y.createElement(s.PreviousMonthButton,{type:"button",className:i[m.PreviousMonthButton],style:u==null?void 0:u[m.PreviousMonthButton],tabIndex:r?void 0:-1,"aria-disabled":r?void 0:!0,"aria-label":c(r),onClick:h},y.createElement(s.Chevron,{disabled:r?void 0:!0,className:i[m.Chevron],style:u==null?void 0:u[m.Chevron],orientation:"left"})),y.createElement(s.NextMonthButton,{type:"button",className:i[m.NextMonthButton],style:u==null?void 0:u[m.NextMonthButton],tabIndex:a?void 0:-1,"aria-disabled":a?void 0:!0,"aria-label":d(a),onClick:l},y.createElement(s.Chevron,{disabled:a?void 0:!0,orientation:"right",className:i[m.Chevron],style:u==null?void 0:u[m.Chevron]})))}function wa(e){return y.createElement("button",{...e})}function ba(e){return y.createElement("option",{...e})}function Ma(e){return y.createElement("button",{...e})}function ka(e){const{rootRef:t,...n}=e;return y.createElement("div",{...n,ref:t})}function Da(e){return y.createElement("select",{...e})}function va(e){const{week:t,...n}=e;return y.createElement("tr",{...n})}function Oa(e){return y.createElement("th",{...e})}function Wa(e){return y.createElement("thead",{"aria-hidden":!0},y.createElement("tr",{...e}))}function Sa(e){const{week:t,...n}=e;return y.createElement("th",{...n})}function Na(e){return y.createElement("th",{...e})}function Ca(e){return y.createElement("tbody",{...e})}function xa(e){const{components:t}=Te();return y.createElement(t.Dropdown,{...e})}const pa=Object.freeze(Object.defineProperty({__proto__:null,CaptionLabel:aa,Chevron:oa,Day:sa,DayButton:ia,Dropdown:ua,DropdownNav:ca,Footer:da,Month:fa,MonthCaption:la,MonthGrid:ha,Months:ma,MonthsDropdown:ya,Nav:ga,NextMonthButton:wa,Option:ba,PreviousMonthButton:Ma,Root:ka,Select:Da,Week:va,WeekNumber:Sa,WeekNumberHeader:Na,Weekday:Oa,Weekdays:Wa,Weeks:Ca,YearsDropdown:xa},Symbol.toStringTag,{value:"Module"}));function se(e,t,n=!1,r=ne){let{from:a,to:o}=e;const{differenceInCalendarDays:s,isSameDay:i}=r;return a&&o?(s(o,a)<0&&([a,o]=[o,a]),s(t,a)>=(n?1:0)&&s(o,t)>=(n?1:0)):!n&&o?i(o,t):!n&&a?i(a,t):!1}function Ke(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function _e(e){return!!(e&&typeof e=="object"&&"from"in e)}function Ze(e){return!!(e&&typeof e=="object"&&"after"in e)}function Je(e){return!!(e&&typeof e=="object"&&"before"in e)}function Ht(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function At(e,t){return Array.isArray(e)&&e.every(t.isDate)}function ie(e,t,n=ne){const r=Array.isArray(t)?t:[t],{isSameDay:a,differenceInCalendarDays:o,isAfter:s}=n;return r.some(i=>{if(typeof i=="boolean")return i;if(n.isDate(i))return a(e,i);if(At(i,n))return i.some(u=>a(e,u));if(_e(i))return se(i,e,!1,n);if(Ht(i))return Array.isArray(i.dayOfWeek)?i.dayOfWeek.includes(e.getDay()):i.dayOfWeek===e.getDay();if(Ke(i)){const u=o(i.before,e),c=o(i.after,e),d=u>0,l=c<0;return s(i.before,i.after)?l&&d:d||l}return Ze(i)?o(e,i.after)>0:Je(i)?o(i.before,e)>0:typeof i=="function"?i(e):!1})}function Ya(e,t,n,r,a){const{disabled:o,hidden:s,modifiers:i,showOutsideDays:u,broadcastCalendar:c,today:d=a.today()}=t,{isSameDay:l,isSameMonth:h,startOfMonth:w,isBefore:D,endOfMonth:O,isAfter:v}=a,C=n&&w(n),b=r&&O(r),g={[H.focused]:[],[H.outside]:[],[H.disabled]:[],[H.hidden]:[],[H.today]:[]},N={};for(const M of e){const{date:f,displayMonth:S}=M,_=!!(S&&!h(f,S)),I=!!(C&&D(f,C)),B=!!(b&&v(f,b)),j=!!(o&&ie(f,o,a)),V=!!(s&&ie(f,s,a))||I||B||!c&&!u&&_||c&&u===!1&&_,G=l(f,d);_&&g.outside.push(M),j&&g.disabled.push(M),V&&g.hidden.push(M),G&&g.today.push(M),i&&Object.keys(i).forEach(R=>{const de=i==null?void 0:i[R];de&&ie(f,de,a)&&(N[R]?N[R].push(M):N[R]=[M])})}return M=>{const f={[H.focused]:!1,[H.disabled]:!1,[H.hidden]:!1,[H.outside]:!1,[H.today]:!1},S={};for(const _ in g){const I=g[_];f[_]=I.some(B=>B===M)}for(const _ in N)S[_]=N[_].some(I=>I===M);return{...f,...S}}}function Ta(e,t,n={}){return Object.entries(e).filter(([,a])=>a===!0).reduce((a,[o])=>(n[o]?a.push(n[o]):t[H[o]]?a.push(t[H[o]]):t[J[o]]&&a.push(t[J[o]]),a),[t[m.Day]])}function _a(e){return{...pa,...e}}function Pa(e){const t={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0,"data-nav-layout":e.navLayout||void 0};return Object.entries(e).forEach(([n,r])=>{n.startsWith("data-")&&(t[n]=r)}),t}function Le(){const e={};for(const t in m)e[m[t]]=`rdp-${m[t]}`;for(const t in H)e[H[t]]=`rdp-${H[t]}`;for(const t in J)e[J[t]]=`rdp-${J[t]}`;for(const t in $)e[$[t]]=`rdp-${$[t]}`;return e}function Ea(e,t,n){return(n??new Q(t)).formatMonthYear(e)}function Fa(e,t,n){return(n??new Q(t)).format(e,"d")}function Ba(e,t=ne){return t.format(e,"LLLL")}function Ia(e,t,n){return(n??new Q(t)).format(e,"cccccc")}function Ha(e,t=ne){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function Aa(){return""}function qa(e,t=ne){return t.format(e,"yyyy")}const ja=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:Ea,formatDay:Fa,formatMonthDropdown:Ba,formatWeekNumber:Ha,formatWeekNumberHeader:Aa,formatWeekdayName:Ia,formatYearDropdown:qa},Symbol.toStringTag,{value:"Module"}));function za(e){return{...ja,...e}}function qt(e,t,n,r){let a=(r??new Q(n)).format(e,"PPPP");return t.today&&(a=`Today, ${a}`),t.selected&&(a=`${a}, selected`),a}function jt(e,t,n){return(n??new Q(t)).formatMonthYear(e)}function zt(e,t,n,r){let a=(r??new Q(n)).format(e,"PPPP");return t!=null&&t.today&&(a=`Today, ${a}`),a}function Gt(e){return"Choose the Month"}function Rt(){return""}const Ga="Go to the Next Month";function $t(e,t){return Ga}function Qt(e){return"Go to the Previous Month"}function Xt(e,t,n){return(n??new Q(t)).format(e,"cccc")}function Vt(e,t){return`Week ${e}`}function Ut(e){return"Week Number"}function Kt(e){return"Choose the Year"}const Ra=Object.freeze(Object.defineProperty({__proto__:null,labelDayButton:qt,labelGrid:jt,labelGridcell:zt,labelMonthDropdown:Gt,labelNav:Rt,labelNext:$t,labelPrevious:Qt,labelWeekNumber:Vt,labelWeekNumberHeader:Ut,labelWeekday:Xt,labelYearDropdown:Kt},Symbol.toStringTag,{value:"Module"})),Z=(e,t,n)=>t||(n?typeof n=="function"?n:(...r)=>n:e);function $a(e,t){var r;const n=((r=t.locale)==null?void 0:r.labels)??{};return{...Ra,...e??{},labelDayButton:Z(qt,e==null?void 0:e.labelDayButton,n.labelDayButton),labelMonthDropdown:Z(Gt,e==null?void 0:e.labelMonthDropdown,n.labelMonthDropdown),labelNext:Z($t,e==null?void 0:e.labelNext,n.labelNext),labelPrevious:Z(Qt,e==null?void 0:e.labelPrevious,n.labelPrevious),labelWeekNumber:Z(Vt,e==null?void 0:e.labelWeekNumber,n.labelWeekNumber),labelYearDropdown:Z(Kt,e==null?void 0:e.labelYearDropdown,n.labelYearDropdown),labelGrid:Z(jt,e==null?void 0:e.labelGrid,n.labelGrid),labelGridcell:Z(zt,e==null?void 0:e.labelGridcell,n.labelGridcell),labelNav:Z(Rt,e==null?void 0:e.labelNav,n.labelNav),labelWeekNumberHeader:Z(Ut,e==null?void 0:e.labelWeekNumberHeader,n.labelWeekNumberHeader),labelWeekday:Z(Xt,e==null?void 0:e.labelWeekday,n.labelWeekday)}}function Qa(e,t,n,r,a){const{startOfMonth:o,startOfYear:s,endOfYear:i,eachMonthOfInterval:u,getMonth:c}=a;return u({start:s(e),end:i(e)}).map(h=>{const w=r.formatMonthDropdown(h,a),D=c(h),O=t&&h<o(t)||n&&h>o(n)||!1;return{value:D,label:w,disabled:O}})}function Xa(e,t={},n={}){let r={...t==null?void 0:t[m.Day]};return Object.entries(e).filter(([,a])=>a===!0).forEach(([a])=>{r={...r,...n==null?void 0:n[a]}}),r}function Va(e,t,n,r){const a=r??e.today(),o=n?e.startOfBroadcastWeek(a,e):t?e.startOfISOWeek(a):e.startOfWeek(a),s=[];for(let i=0;i<7;i++){const u=e.addDays(o,i);s.push(u)}return s}function Ua(e,t,n,r,a=!1){if(!e||!t)return;const{startOfYear:o,endOfYear:s,eachYearOfInterval:i,getYear:u}=r,c=o(e),d=s(t),l=i({start:c,end:d});return a&&l.reverse(),l.map(h=>{const w=n.formatYearDropdown(h,r);return{value:u(h),label:w,disabled:!1}})}function Ka(e,t={}){var i;const{weekStartsOn:n,locale:r}=t,a=n??((i=r==null?void 0:r.options)==null?void 0:i.weekStartsOn)??0,o=u=>{const c=typeof u=="number"||typeof u=="string"?new Date(u):u;return new z(c.getFullYear(),c.getMonth(),c.getDate(),12,0,0,e)},s=u=>{const c=o(u);return new Date(c.getFullYear(),c.getMonth(),c.getDate(),0,0,0,0)};return{today:()=>o(z.tz(e)),newDate:(u,c,d)=>new z(u,c,d,12,0,0,e),startOfDay:u=>o(u),startOfWeek:(u,c)=>{const d=o(u),l=(c==null?void 0:c.weekStartsOn)??a,h=(d.getDay()-l+7)%7;return d.setDate(d.getDate()-h),d},startOfISOWeek:u=>{const c=o(u),d=(c.getDay()-1+7)%7;return c.setDate(c.getDate()-d),c},startOfMonth:u=>{const c=o(u);return c.setDate(1),c},startOfYear:u=>{const c=o(u);return c.setMonth(0,1),c},endOfWeek:(u,c)=>{const d=o(u),w=((((c==null?void 0:c.weekStartsOn)??a)+6)%7-d.getDay()+7)%7;return d.setDate(d.getDate()+w),d},endOfISOWeek:u=>{const c=o(u),d=(7-c.getDay())%7;return c.setDate(c.getDate()+d),c},endOfMonth:u=>{const c=o(u);return c.setMonth(c.getMonth()+1,0),c},endOfYear:u=>{const c=o(u);return c.setMonth(11,31),c},eachMonthOfInterval:u=>{const c=o(u.start),d=o(u.end),l=[],h=new z(c.getFullYear(),c.getMonth(),1,12,0,0,e),w=d.getFullYear()*12+d.getMonth();for(;h.getFullYear()*12+h.getMonth()<=w;)l.push(new z(h,e)),h.setMonth(h.getMonth()+1,1);return l},addDays:(u,c)=>{const d=o(u);return d.setDate(d.getDate()+c),d},addWeeks:(u,c)=>{const d=o(u);return d.setDate(d.getDate()+c*7),d},addMonths:(u,c)=>{const d=o(u);return d.setMonth(d.getMonth()+c),d},addYears:(u,c)=>{const d=o(u);return d.setFullYear(d.getFullYear()+c),d},eachYearOfInterval:u=>{const c=o(u.start),d=o(u.end),l=[],h=new z(c.getFullYear(),0,1,12,0,0,e);for(;h.getFullYear()<=d.getFullYear();)l.push(new z(h,e)),h.setFullYear(h.getFullYear()+1,0,1);return l},getWeek:(u,c)=>{var l;const d=s(u);return Ue(d,{weekStartsOn:(c==null?void 0:c.weekStartsOn)??a,firstWeekContainsDate:(c==null?void 0:c.firstWeekContainsDate)??((l=r==null?void 0:r.options)==null?void 0:l.firstWeekContainsDate)??1})},getISOWeek:u=>{const c=s(u);return Ve(c)},differenceInCalendarDays:(u,c)=>{const d=s(u),l=s(c);return Xe(d,l)},differenceInCalendarMonths:(u,c)=>{const d=s(u),l=s(c);return xt(d,l)}}}const Ne=e=>e instanceof HTMLElement?e:null,Ge=e=>[...e.querySelectorAll("[data-animated-month]")??[]],Za=e=>Ne(e.querySelector("[data-animated-month]")),Re=e=>Ne(e.querySelector("[data-animated-caption]")),$e=e=>Ne(e.querySelector("[data-animated-weeks]")),Ja=e=>Ne(e.querySelector("[data-animated-nav]")),La=e=>Ne(e.querySelector("[data-animated-weekdays]"));function eo(e,t,{classNames:n,months:r,focused:a,dateLib:o}){const s=E.useRef(null),i=E.useRef(r),u=E.useRef(!1);E.useLayoutEffect(()=>{const c=i.current;if(i.current=r,!t||!e.current||!(e.current instanceof HTMLElement)||r.length===0||c.length===0||r.length!==c.length)return;const d=o.isSameMonth(r[0].date,c[0].date),l=o.isAfter(r[0].date,c[0].date),h=l?n[$.caption_after_enter]:n[$.caption_before_enter],w=l?n[$.weeks_after_enter]:n[$.weeks_before_enter],D=s.current,O=e.current.cloneNode(!0);if(O instanceof HTMLElement?(Ge(O).forEach(g=>{if(!(g instanceof HTMLElement))return;const N=Za(g);N&&g.contains(N)&&g.removeChild(N);const M=Re(g);M&&M.classList.remove(h);const f=$e(g);f&&f.classList.remove(w)}),s.current=O):s.current=null,u.current||d||a)return;const v=D instanceof HTMLElement?Ge(D):[],C=Ge(e.current);if(C!=null&&C.every(b=>b instanceof HTMLElement)&&(v!=null&&v.every(b=>b instanceof HTMLElement))){u.current=!0,e.current.style.isolation="isolate";const b=Ja(e.current);b&&(b.style.zIndex="1"),C.forEach((g,N)=>{const M=v[N];if(!M)return;g.style.position="relative",g.style.overflow="hidden";const f=Re(g);f&&f.classList.add(h);const S=$e(g);S&&S.classList.add(w);const _=()=>{u.current=!1,e.current&&(e.current.style.isolation=""),b&&(b.style.zIndex=""),f&&f.classList.remove(h),S&&S.classList.remove(w),g.style.position="",g.style.overflow="",g.contains(M)&&g.removeChild(M)};M.style.pointerEvents="none",M.style.position="absolute",M.style.overflow="hidden",M.setAttribute("aria-hidden","true");const I=La(M);I&&(I.style.opacity="0");const B=Re(M);B&&(B.classList.add(l?n[$.caption_before_exit]:n[$.caption_after_exit]),B.addEventListener("animationend",_));const j=$e(M);j&&j.classList.add(l?n[$.weeks_before_exit]:n[$.weeks_after_exit]),g.insertBefore(M,g.firstChild)})}})}function to(e,t,n,r){const a=e[0],o=e[e.length-1],{ISOWeek:s,fixedWeeks:i,broadcastCalendar:u}=n??{},{addDays:c,differenceInCalendarDays:d,differenceInCalendarMonths:l,endOfBroadcastWeek:h,endOfISOWeek:w,endOfMonth:D,endOfWeek:O,isAfter:v,startOfBroadcastWeek:C,startOfISOWeek:b,startOfWeek:g}=r,N=u?C(a,r):s?b(a):g(a),M=u?h(o):s?w(D(o)):O(D(o)),f=t&&(u?h(t):s?w(t):O(t)),S=f&&v(M,f)?f:M,_=d(S,N),I=l(o,a)+1,B=[];for(let G=0;G<=_;G++){const R=c(N,G);B.push(R)}const V=(u?35:42)*I;if(i&&B.length<V){const G=V-B.length;for(let R=0;R<G;R++){const de=c(B[B.length-1],1);B.push(de)}}return B}function no(e){const t=[];return e.reduce((n,r)=>{const a=r.weeks.reduce((o,s)=>o.concat(s.days.slice()),t.slice());return n.concat(a.slice())},t.slice())}function ro(e,t,n,r){const{numberOfMonths:a=1}=n,o=[];for(let s=0;s<a;s++){const i=r.addMonths(e,s);if(t&&i>t)break;o.push(i)}return o}function bt(e,t,n,r){const{month:a,defaultMonth:o,today:s=r.today(),numberOfMonths:i=1}=e;let u=a||o||s;const{differenceInCalendarMonths:c,addMonths:d,startOfMonth:l}=r;if(n&&c(n,u)<i-1){const h=-1*(i-1);u=d(n,h)}return t&&c(u,t)<0&&(u=t),l(u)}function ao(e,t,n,r){const{addDays:a,endOfBroadcastWeek:o,endOfISOWeek:s,endOfMonth:i,endOfWeek:u,getISOWeek:c,getWeek:d,startOfBroadcastWeek:l,startOfISOWeek:h,startOfWeek:w}=r,D=e.reduce((O,v)=>{const C=n.broadcastCalendar?l(v,r):n.ISOWeek?h(v):w(v),b=n.broadcastCalendar?o(v):n.ISOWeek?s(i(v)):u(i(v)),g=t.filter(S=>S>=C&&S<=b),N=n.broadcastCalendar?35:42;if(n.fixedWeeks&&g.length<N){const S=t.filter(_=>{const I=N-g.length;return _>b&&_<=a(b,I)});g.push(...S)}const M=g.reduce((S,_)=>{const I=n.ISOWeek?c(_):d(_),B=S.find(V=>V.weekNumber===I),j=new Bt(_,v,r);return B?B.days.push(j):S.push(new ra(I,[j])),S},[]),f=new na(v,M);return O.push(f),O},[]);return n.reverseMonths?D.reverse():D}function oo(e,t){let{startMonth:n,endMonth:r}=e;const{startOfYear:a,startOfDay:o,startOfMonth:s,endOfMonth:i,addYears:u,endOfYear:c,today:d}=t,l=e.captionLayout==="dropdown"||e.captionLayout==="dropdown-years";return n?n=s(n):!n&&l&&(n=a(u(e.today??d(),-100))),r?r=i(r):!r&&l&&(r=c(e.today??d())),[n&&o(n),r&&o(r)]}function so(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:a,numberOfMonths:o=1}=n,{startOfMonth:s,addMonths:i,differenceInCalendarMonths:u}=r,c=a?o:1,d=s(e);if(!t)return i(d,c);if(!(u(t,e)<o))return i(d,c)}function io(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:a,numberOfMonths:o}=n,{startOfMonth:s,addMonths:i,differenceInCalendarMonths:u}=r,c=a?o??1:1,d=s(e);if(!t)return i(d,-c);if(!(u(d,t)<=0))return i(d,-c)}function uo(e){const t=[];return e.reduce((n,r)=>n.concat(r.weeks.slice()),t.slice())}function Pe(e,t){const[n,r]=E.useState(e);return[t===void 0?n:t,r]}function co(e,t){var N;const[n,r]=oo(e,t),{startOfMonth:a,endOfMonth:o}=t,s=bt(e,n,r,t),[i,u]=Pe(s,e.month?s:void 0);E.useEffect(()=>{const M=bt(e,n,r,t);u(M)},[e.timeZone]);const{months:c,weeks:d,days:l,previousMonth:h,nextMonth:w}=E.useMemo(()=>{const M=ro(i,r,{numberOfMonths:e.numberOfMonths},t),f=to(M,e.endMonth?o(e.endMonth):void 0,{ISOWeek:e.ISOWeek,fixedWeeks:e.fixedWeeks,broadcastCalendar:e.broadcastCalendar},t),S=ao(M,f,{broadcastCalendar:e.broadcastCalendar,fixedWeeks:e.fixedWeeks,ISOWeek:e.ISOWeek,reverseMonths:e.reverseMonths},t),_=uo(S),I=no(S),B=io(i,n,e,t),j=so(i,r,e,t);return{months:S,weeks:_,days:I,previousMonth:B,nextMonth:j}},[t,i.getTime(),r==null?void 0:r.getTime(),n==null?void 0:n.getTime(),e.disableNavigation,e.broadcastCalendar,(N=e.endMonth)==null?void 0:N.getTime(),e.fixedWeeks,e.ISOWeek,e.numberOfMonths,e.pagedNavigation,e.reverseMonths]),{disableNavigation:D,onMonthChange:O}=e,v=M=>d.some(f=>f.days.some(S=>S.isEqualTo(M))),C=M=>{if(D)return;let f=a(M);n&&f<a(n)&&(f=a(n)),r&&f>a(r)&&(f=a(r)),u(f),O==null||O(f)};return{months:c,weeks:d,days:l,navStart:n,navEnd:r,previousMonth:h,nextMonth:w,goToMonth:C,goToDay:M=>{v(M)||C(M.date)}}}var ee;(function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"})(ee||(ee={}));function Mt(e){return!e[H.disabled]&&!e[H.hidden]&&!e[H.outside]}function fo(e,t,n,r){let a,o=-1;for(const s of e){const i=t(s);Mt(i)&&(i[H.focused]&&o<ee.FocusedModifier?(a=s,o=ee.FocusedModifier):r!=null&&r.isEqualTo(s)&&o<ee.LastFocused?(a=s,o=ee.LastFocused):n(s.date)&&o<ee.Selected?(a=s,o=ee.Selected):i[H.today]&&o<ee.Today&&(a=s,o=ee.Today))}return a||(a=e.find(s=>Mt(t(s)))),a}function lo(e,t,n,r,a,o,s){const{ISOWeek:i,broadcastCalendar:u}=o,{addDays:c,addMonths:d,addWeeks:l,addYears:h,endOfBroadcastWeek:w,endOfISOWeek:D,endOfWeek:O,max:v,min:C,startOfBroadcastWeek:b,startOfISOWeek:g,startOfWeek:N}=s;let f={day:c,week:l,month:d,year:h,startOfWeek:S=>u?b(S,s):i?g(S):N(S),endOfWeek:S=>u?w(S):i?D(S):O(S)}[e](n,t==="after"?1:-1);return t==="before"&&r?f=v([r,f]):t==="after"&&a&&(f=C([a,f])),f}function Zt(e,t,n,r,a,o,s,i=0){if(i>365)return;const u=lo(e,t,n.date,r,a,o,s),c=!!(o.disabled&&ie(u,o.disabled,s)),d=!!(o.hidden&&ie(u,o.hidden,s)),l=u,h=new Bt(u,l,s);return!c&&!d?h:Zt(e,t,h,r,a,o,s,i+1)}function ho(e,t,n,r,a){const{autoFocus:o}=e,[s,i]=E.useState(),u=fo(t.days,n,r||(()=>!1),s),[c,d]=E.useState(o?u:void 0);return{isFocusTarget:O=>!!(u!=null&&u.isEqualTo(O)),setFocused:d,focused:c,blur:()=>{i(c),d(void 0)},moveFocus:(O,v)=>{if(!c)return;const C=Zt(O,v,c,t.navStart,t.navEnd,e,a);C&&(e.disableNavigation&&!t.days.some(g=>g.isEqualTo(C))||(t.goToDay(C),d(C)))}}}function mo(e,t){const{selected:n,required:r,onSelect:a}=e,[o,s]=Pe(n,a?n:void 0),i=a?n:o,{isSameDay:u}=t,c=w=>(i==null?void 0:i.some(D=>u(D,w)))??!1,{min:d,max:l}=e;return{selected:i,select:(w,D,O)=>{let v=[...i??[]];if(c(w)){if((i==null?void 0:i.length)===d||r&&(i==null?void 0:i.length)===1)return;v=i==null?void 0:i.filter(C=>!u(C,w))}else(i==null?void 0:i.length)===l?v=[w]:v=[...v,w];return a||s(v),a==null||a(v,w,D,O),v},isSelected:c}}function yo(e,t,n=0,r=0,a=!1,o=ne){const{from:s,to:i}=t||{},{isSameDay:u,isAfter:c,isBefore:d}=o;let l;if(!s&&!i)l={from:e,to:n>0?void 0:e};else if(s&&!i)u(s,e)?n===0?l={from:s,to:e}:a?l={from:s,to:void 0}:l=void 0:d(e,s)?l={from:e,to:s}:l={from:s,to:e};else if(s&&i)if(u(s,e)&&u(i,e))a?l={from:s,to:i}:l=void 0;else if(u(s,e))l={from:s,to:n>0?void 0:e};else if(u(i,e))l={from:e,to:n>0?void 0:e};else if(d(e,s))l={from:e,to:i};else if(c(e,s))l={from:s,to:e};else if(c(e,i))l={from:s,to:e};else throw new Error("Invalid range");if(l!=null&&l.from&&(l!=null&&l.to)){const h=o.differenceInCalendarDays(l.to,l.from);r>0&&h>r?l={from:e,to:void 0}:n>1&&h<n&&(l={from:e,to:void 0})}return l}function go(e,t,n=ne){const r=Array.isArray(t)?t:[t];let a=e.from;const o=n.differenceInCalendarDays(e.to,e.from),s=Math.min(o,6);for(let i=0;i<=s;i++){if(r.includes(a.getDay()))return!0;a=n.addDays(a,1)}return!1}function kt(e,t,n=ne){return se(e,t.from,!1,n)||se(e,t.to,!1,n)||se(t,e.from,!1,n)||se(t,e.to,!1,n)}function wo(e,t,n=ne){const r=Array.isArray(t)?t:[t];if(r.filter(i=>typeof i!="function").some(i=>typeof i=="boolean"?i:n.isDate(i)?se(e,i,!1,n):At(i,n)?i.some(u=>se(e,u,!1,n)):_e(i)?i.from&&i.to?kt(e,{from:i.from,to:i.to},n):!1:Ht(i)?go(e,i.dayOfWeek,n):Ke(i)?n.isAfter(i.before,i.after)?kt(e,{from:n.addDays(i.after,1),to:n.addDays(i.before,-1)},n):ie(e.from,i,n)||ie(e.to,i,n):Ze(i)||Je(i)?ie(e.from,i,n)||ie(e.to,i,n):!1))return!0;const s=r.filter(i=>typeof i=="function");if(s.length){let i=e.from;const u=n.differenceInCalendarDays(e.to,e.from);for(let c=0;c<=u;c++){if(s.some(d=>d(i)))return!0;i=n.addDays(i,1)}}return!1}function bo(e,t){const{disabled:n,excludeDisabled:r,resetOnSelect:a,selected:o,required:s,onSelect:i}=e,[u,c]=Pe(o,i?o:void 0),d=i?o:u;return{selected:d,select:(w,D,O)=>{const{min:v,max:C}=e;let b;if(w){const g=d==null?void 0:d.from,N=d==null?void 0:d.to,M=!!g&&!!N,f=!!g&&!!N&&t.isSameDay(g,N)&&t.isSameDay(w,g);a&&(M||!(d!=null&&d.from))?!s&&f?b=void 0:b={from:w,to:void 0}:b=yo(w,d,v,C,s,t)}return r&&n&&(b!=null&&b.from)&&b.to&&wo({from:b.from,to:b.to},n,t)&&(b.from=w,b.to=void 0),i||c(b),i==null||i(b,w,D,O),b},isSelected:w=>d&&se(d,w,!1,t)}}function Mo(e,t){const{selected:n,required:r,onSelect:a}=e,[o,s]=Pe(n,a?n:void 0),i=a?n:o,{isSameDay:u}=t;return{selected:i,select:(l,h,w)=>{let D=l;return!r&&i&&i&&u(l,i)&&(D=void 0),a||s(D),a==null||a(D,l,h,w),D},isSelected:l=>i?u(i,l):!1}}function ko(e,t){const n=Mo(e,t),r=mo(e,t),a=bo(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return a;default:return}}function X(e,t){return e instanceof z&&e.timeZone===t?e:new z(e,t)}function le(e,t,n){return X(e,t)}function Dt(e,t,n){return typeof e=="boolean"||typeof e=="function"?e:e instanceof Date?le(e,t):Array.isArray(e)?e.map(r=>r instanceof Date?le(r,t):r):_e(e)?{...e,from:e.from?X(e.from,t):e.from,to:e.to?X(e.to,t):e.to}:Ke(e)?{before:le(e.before,t),after:le(e.after,t)}:Ze(e)?{after:le(e.after,t)}:Je(e)?{before:le(e.before,t)}:e}function Qe(e,t,n){return e&&(Array.isArray(e)?e.map(r=>Dt(r,t)):Dt(e,t))}function Do(e){var st;let t=e;const n=t.timeZone;if(n&&(t={...e,timeZone:n},t.today&&(t.today=X(t.today,n)),t.month&&(t.month=X(t.month,n)),t.defaultMonth&&(t.defaultMonth=X(t.defaultMonth,n)),t.startMonth&&(t.startMonth=X(t.startMonth,n)),t.endMonth&&(t.endMonth=X(t.endMonth,n)),t.mode==="single"&&t.selected?t.selected=X(t.selected,n):t.mode==="multiple"&&t.selected?t.selected=(st=t.selected)==null?void 0:st.map(k=>X(k,n)):t.mode==="range"&&t.selected&&(t.selected={from:t.selected.from?X(t.selected.from,n):t.selected.from,to:t.selected.to?X(t.selected.to,n):t.selected.to}),t.disabled!==void 0&&(t.disabled=Qe(t.disabled,n)),t.hidden!==void 0&&(t.hidden=Qe(t.hidden,n)),t.modifiers)){const k={};Object.keys(t.modifiers).forEach(x=>{var W;k[x]=Qe((W=t.modifiers)==null?void 0:W[x],n)}),t.modifiers=k}const{components:r,formatters:a,labels:o,dateLib:s,locale:i,classNames:u}=E.useMemo(()=>{const k={...Ft,...t.locale},x=t.broadcastCalendar?1:t.weekStartsOn,W=t.noonSafe&&t.timeZone?Ka(t.timeZone,{weekStartsOn:x,locale:k}):void 0,A=t.dateLib&&W?{...W,...t.dateLib}:t.dateLib??W,Y=new Q({locale:k,weekStartsOn:x,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},A);return{dateLib:Y,components:_a(t.components),formatters:za(t.formatters),labels:$a(t.labels,Y.options),locale:k,classNames:{...Le(),...t.classNames}}},[t.locale,t.broadcastCalendar,t.weekStartsOn,t.firstWeekContainsDate,t.useAdditionalWeekYearTokens,t.useAdditionalDayOfYearTokens,t.timeZone,t.numerals,t.dateLib,t.noonSafe,t.components,t.formatters,t.labels,t.classNames]);t.today||(t={...t,today:s.today()});const{captionLayout:c,mode:d,navLayout:l,numberOfMonths:h=1,onDayBlur:w,onDayClick:D,onDayFocus:O,onDayKeyDown:v,onDayMouseEnter:C,onDayMouseLeave:b,onNextClick:g,onPrevClick:N,showWeekNumber:M,styles:f}=t,{formatCaption:S,formatDay:_,formatMonthDropdown:I,formatWeekNumber:B,formatWeekNumberHeader:j,formatWeekdayName:V,formatYearDropdown:G}=a,R=co(t,s),{days:de,months:ge,navStart:Ee,navEnd:Fe,previousMonth:U,nextMonth:K,goToMonth:re}=R,Be=Ya(de,t,Ee,Fe,s),{isSelected:we,select:be,selected:Ce}=ko(t,s)??{},{blur:et,focused:xe,isFocusTarget:Jt,moveFocus:tt,setFocused:pe}=ho(t,R,Be,we??(()=>!1),s),{labelDayButton:Lt,labelGridcell:en,labelGrid:tn,labelMonthDropdown:nn,labelNav:nt,labelPrevious:rn,labelNext:an,labelWeekday:on,labelWeekNumber:sn,labelWeekNumberHeader:un,labelYearDropdown:cn}=o,dn=E.useMemo(()=>Va(s,t.ISOWeek,t.broadcastCalendar,t.today),[s,t.ISOWeek,t.broadcastCalendar,t.today]),rt=d!==void 0||D!==void 0,Ie=E.useCallback(()=>{U&&(re(U),N==null||N(U))},[U,re,N]),He=E.useCallback(()=>{K&&(re(K),g==null||g(K))},[re,K,g]),fn=E.useCallback((k,x)=>W=>{W.preventDefault(),W.stopPropagation(),pe(k),!x.disabled&&(be==null||be(k.date,x,W),D==null||D(k.date,x,W))},[be,D,pe]),ln=E.useCallback((k,x)=>W=>{pe(k),O==null||O(k.date,x,W)},[O,pe]),hn=E.useCallback((k,x)=>W=>{et(),w==null||w(k.date,x,W)},[et,w]),mn=E.useCallback((k,x)=>W=>{const A={ArrowLeft:[W.shiftKey?"month":"day",t.dir==="rtl"?"after":"before"],ArrowRight:[W.shiftKey?"month":"day",t.dir==="rtl"?"before":"after"],ArrowDown:[W.shiftKey?"year":"week","after"],ArrowUp:[W.shiftKey?"year":"week","before"],PageUp:[W.shiftKey?"year":"month","before"],PageDown:[W.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(A[W.key]){W.preventDefault(),W.stopPropagation();const[Y,L]=A[W.key];tt(Y,L)}v==null||v(k.date,x,W)},[tt,v,t.dir]),yn=E.useCallback((k,x)=>W=>{C==null||C(k.date,x,W)},[C]),gn=E.useCallback((k,x)=>W=>{b==null||b(k.date,x,W)},[b]),wn=E.useCallback((k,x)=>W=>{const A=Number(W.target.value),Y=s.setMonth(s.startOfMonth(k),A);re(s.addMonths(Y,-x))},[s,re]),bn=E.useCallback((k,x)=>W=>{const A=Number(W.target.value),Y=s.setYear(s.startOfMonth(k),A);re(s.addMonths(Y,-x))},[s,re]),{className:Mn,style:kn}=E.useMemo(()=>({className:[u[m.Root],t.className].filter(Boolean).join(" "),style:{...f==null?void 0:f[m.Root],...t.style}}),[u,t.className,t.style,f]),Dn=Pa(t),at=k=>{const x=f==null?void 0:f[m.Dropdown],W=f==null?void 0:f[k];if(!(!x&&!W))return{...x,...W}},ot=E.useRef(null);eo(ot,!!t.animate,{classNames:u,months:ge,focused:xe,dateLib:s});const vn={dayPickerProps:t,selected:Ce,select:be,isSelected:we,months:ge,nextMonth:K,previousMonth:U,goToMonth:re,getModifiers:Be,components:r,classNames:u,styles:f,labels:o,formatters:a};return y.createElement(It.Provider,{value:vn},y.createElement(r.Root,{rootRef:t.animate?ot:void 0,className:Mn,style:kn,dir:t.dir,id:t.id,lang:t.lang??i.code,nonce:t.nonce,title:t.title,role:t.role,"aria-label":t["aria-label"],"aria-labelledby":t["aria-labelledby"],...Dn},y.createElement(r.Months,{className:u[m.Months],style:f==null?void 0:f[m.Months]},!t.hideNavigation&&!l&&y.createElement(r.Nav,{"data-animated-nav":t.animate?"true":void 0,className:u[m.Nav],style:f==null?void 0:f[m.Nav],"aria-label":nt(),onPreviousClick:Ie,onNextClick:He,previousMonth:U,nextMonth:K}),ge.map((k,x)=>{const W=t.reverseMonths?ge.length-1-x:x;return y.createElement(r.Month,{"data-animated-month":t.animate?"true":void 0,className:u[m.Month],style:f==null?void 0:f[m.Month],key:x,displayIndex:x,calendarMonth:k},l==="around"&&!t.hideNavigation&&x===0&&y.createElement(r.PreviousMonthButton,{type:"button",className:u[m.PreviousMonthButton],style:f==null?void 0:f[m.PreviousMonthButton],tabIndex:U?void 0:-1,"aria-disabled":U?void 0:!0,"aria-label":rn(U),onClick:Ie,"data-animated-button":t.animate?"true":void 0},y.createElement(r.Chevron,{disabled:U?void 0:!0,className:u[m.Chevron],style:f==null?void 0:f[m.Chevron],orientation:t.dir==="rtl"?"right":"left"})),y.createElement(r.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:u[m.MonthCaption],style:f==null?void 0:f[m.MonthCaption],calendarMonth:k,displayIndex:x},c!=null&&c.startsWith("dropdown")?y.createElement(r.DropdownNav,{className:u[m.Dropdowns],style:f==null?void 0:f[m.Dropdowns]},(()=>{const A=c==="dropdown"||c==="dropdown-months"?y.createElement(r.MonthsDropdown,{key:"month",className:u[m.MonthsDropdown],"aria-label":nn(),disabled:!!t.disableNavigation,onChange:wn(k.date,W),options:Qa(k.date,Ee,Fe,a,s),style:at(m.MonthsDropdown),value:s.getMonth(k.date)}):y.createElement("span",{key:"month"},I(k.date,s)),Y=c==="dropdown"||c==="dropdown-years"?y.createElement(r.YearsDropdown,{key:"year",className:u[m.YearsDropdown],"aria-label":cn(s.options),disabled:!!t.disableNavigation,onChange:bn(k.date,W),options:Ua(Ee,Fe,a,s,!!t.reverseYears),style:at(m.YearsDropdown),value:s.getYear(k.date)}):y.createElement("span",{key:"year"},G(k.date,s));return s.getMonthYearOrder()==="year-first"?[Y,A]:[A,Y]})(),y.createElement("span",{role:"status","aria-live":"polite",style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}},S(k.date,s.options,s))):y.createElement(r.CaptionLabel,{className:u[m.CaptionLabel],style:f==null?void 0:f[m.CaptionLabel],role:"status","aria-live":"polite"},S(k.date,s.options,s))),l==="around"&&!t.hideNavigation&&x===h-1&&y.createElement(r.NextMonthButton,{type:"button",className:u[m.NextMonthButton],style:f==null?void 0:f[m.NextMonthButton],tabIndex:K?void 0:-1,"aria-disabled":K?void 0:!0,"aria-label":an(K),onClick:He,"data-animated-button":t.animate?"true":void 0},y.createElement(r.Chevron,{disabled:K?void 0:!0,className:u[m.Chevron],style:f==null?void 0:f[m.Chevron],orientation:t.dir==="rtl"?"left":"right"})),x===h-1&&l==="after"&&!t.hideNavigation&&y.createElement(r.Nav,{"data-animated-nav":t.animate?"true":void 0,className:u[m.Nav],style:f==null?void 0:f[m.Nav],"aria-label":nt(),onPreviousClick:Ie,onNextClick:He,previousMonth:U,nextMonth:K}),y.createElement(r.MonthGrid,{role:"grid","aria-multiselectable":d==="multiple"||d==="range","aria-label":tn(k.date,s.options,s)||void 0,className:u[m.MonthGrid],style:f==null?void 0:f[m.MonthGrid]},!t.hideWeekdays&&y.createElement(r.Weekdays,{"data-animated-weekdays":t.animate?"true":void 0,className:u[m.Weekdays],style:f==null?void 0:f[m.Weekdays]},M&&y.createElement(r.WeekNumberHeader,{"aria-label":un(s.options),className:u[m.WeekNumberHeader],style:f==null?void 0:f[m.WeekNumberHeader],scope:"col"},j()),dn.map(A=>y.createElement(r.Weekday,{"aria-label":on(A,s.options,s),className:u[m.Weekday],key:String(A),style:f==null?void 0:f[m.Weekday],scope:"col"},V(A,s.options,s)))),y.createElement(r.Weeks,{"data-animated-weeks":t.animate?"true":void 0,className:u[m.Weeks],style:f==null?void 0:f[m.Weeks]},k.weeks.map(A=>y.createElement(r.Week,{className:u[m.Week],key:A.weekNumber,style:f==null?void 0:f[m.Week],week:A},M&&y.createElement(r.WeekNumber,{week:A,style:f==null?void 0:f[m.WeekNumber],"aria-label":sn(A.weekNumber,{locale:i}),className:u[m.WeekNumber],scope:"row",role:"rowheader"},B(A.weekNumber,s)),A.days.map(Y=>{const{date:L}=Y,p=Be(Y);if(p[H.focused]=!p.hidden&&!!(xe!=null&&xe.isEqualTo(Y)),p[J.selected]=(we==null?void 0:we(L))||p.selected,_e(Ce)){const{from:Ae,to:qe}=Ce;p[J.range_start]=!!(Ae&&qe&&s.isSameDay(L,Ae)),p[J.range_end]=!!(Ae&&qe&&s.isSameDay(L,qe)),p[J.range_middle]=se(Ce,L,!0,s)}const On=Xa(p,f,t.modifiersStyles),Wn=Ta(p,u,t.modifiersClassNames),Sn=!rt&&!p.hidden?en(L,p,s.options,s):void 0;return y.createElement(r.Day,{key:`${Y.isoDate}_${Y.displayMonthId}`,day:Y,modifiers:p,className:Wn.join(" "),style:On,role:"gridcell","aria-selected":p.selected||void 0,"aria-label":Sn,"data-day":Y.isoDate,"data-month":Y.outside?Y.dateMonthId:void 0,"data-selected":p.selected||void 0,"data-disabled":p.disabled||void 0,"data-hidden":p.hidden||void 0,"data-outside":Y.outside||void 0,"data-focused":p.focused||void 0,"data-today":p.today||void 0},!p.hidden&&rt?y.createElement(r.DayButton,{className:u[m.DayButton],style:f==null?void 0:f[m.DayButton],type:"button",day:Y,modifiers:p,disabled:!p.focused&&p.disabled||void 0,"aria-disabled":p.focused&&p.disabled||void 0,tabIndex:Jt(Y)?0:-1,"aria-label":Lt(L,p,s.options,s),onClick:fn(Y,p),onBlur:hn(Y,p),onFocus:ln(Y,p),onKeyDown:mn(Y,p),onMouseEnter:yn(Y,p),onMouseLeave:gn(Y,p)},_(L,s.options,s)):!p.hidden&&_(Y.date,s.options,s))}))))))})),t.footer&&y.createElement(r.Footer,{className:u[m.Footer],style:f==null?void 0:f[m.Footer],role:"status","aria-live":"polite"},t.footer)))}function Wo({className:e,classNames:t,showOutsideDays:n=!0,captionLayout:r="label",buttonVariant:a="ghost",locale:o,formatters:s,components:i,...u}){const c=Le();return ae.jsx(Do,{showOutsideDays:n,className:T("group/calendar bg-background p-2 [--cell-radius:var(--radius-md)] [--cell-size:--spacing(7)] in-data-[slot=card-content]:bg-transparent in-data-[slot=popover-content]:bg-transparent",String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,e),captionLayout:r,locale:o,formatters:{formatMonthDropdown:d=>d.toLocaleString(o==null?void 0:o.code,{month:"short"}),...s},classNames:{root:T("w-fit",c.root),months:T("relative flex flex-col gap-4 md:flex-row",c.months),month:T("flex w-full flex-col gap-4",c.month),nav:T("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",c.nav),button_previous:T(it({variant:a}),"size-(--cell-size) p-0 select-none aria-disabled:opacity-50",c.button_previous),button_next:T(it({variant:a}),"size-(--cell-size) p-0 select-none aria-disabled:opacity-50",c.button_next),month_caption:T("flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)",c.month_caption),dropdowns:T("flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium",c.dropdowns),dropdown_root:T("relative rounded-(--cell-radius)",c.dropdown_root),dropdown:T("absolute inset-0 bg-popover opacity-0",c.dropdown),caption_label:T("font-medium select-none",r==="label"?"text-sm":"flex items-center gap-1 rounded-(--cell-radius) text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground",c.caption_label),month_grid:T("w-full border-collapse",c.month_grid),weekdays:T("flex",c.weekdays),weekday:T("flex-1 rounded-(--cell-radius) text-[0.8rem] font-normal text-muted-foreground select-none",c.weekday),week:T("mt-2 flex w-full",c.week),week_number_header:T("w-(--cell-size) select-none",c.week_number_header),week_number:T("text-[0.8rem] text-muted-foreground select-none",c.week_number),day:T("group/day relative aspect-square h-full w-full rounded-(--cell-radius) p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-r-(--cell-radius)",u.showWeekNumber?"[&:nth-child(2)[data-selected=true]_button]:rounded-l-(--cell-radius)":"[&:first-child[data-selected=true]_button]:rounded-l-(--cell-radius)",c.day),range_start:T("relative isolate z-0 rounded-l-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:right-0 after:w-4 after:bg-muted",c.range_start),range_middle:T("rounded-none",c.range_middle),range_end:T("relative isolate z-0 rounded-r-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:left-0 after:w-4 after:bg-muted",c.range_end),today:T("rounded-(--cell-radius) bg-muted text-foreground data-[selected=true]:rounded-none",c.today),outside:T("text-muted-foreground aria-selected:text-muted-foreground",c.outside),disabled:T("text-muted-foreground opacity-50",c.disabled),hidden:T("invisible",c.hidden),...t},components:{Root:({className:d,rootRef:l,...h})=>ae.jsx("div",{"data-slot":"calendar",ref:l,className:T(d),...h}),Chevron:({className:d,orientation:l,...h})=>l==="left"?ae.jsx(Nn,{className:T("size-4",d),...h}):l==="right"?ae.jsx(Cn,{className:T("size-4",d),...h}):ae.jsx(xn,{className:T("size-4",d),...h}),DayButton:({...d})=>ae.jsx(vo,{locale:o,...d}),WeekNumber:({children:d,...l})=>ae.jsx("td",{...l,children:ae.jsx("div",{className:"flex size-(--cell-size) items-center justify-center text-center",children:d})}),...i},...u})}function vo({className:e,day:t,modifiers:n,locale:r,...a}){const o=Le(),s=E.useRef(null);return E.useEffect(()=>{var i;n.focused&&((i=s.current)==null||i.focus())},[n.focused]),ae.jsx(pn,{variant:"ghost",size:"icon","data-day":t.date.toLocaleDateString(r==null?void 0:r.code),"data-selected-single":n.selected&&!n.range_start&&!n.range_end&&!n.range_middle,"data-range-start":n.range_start,"data-range-end":n.range_end,"data-range-middle":n.range_middle,className:T("relative isolate z-10 flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 border-0 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:rounded-(--cell-radius) data-[range-end=true]:rounded-r-(--cell-radius) data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-muted data-[range-middle=true]:text-foreground data-[range-start=true]:rounded-(--cell-radius) data-[range-start=true]:rounded-l-(--cell-radius) data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground dark:hover:text-foreground [&>span]:text-xs [&>span]:opacity-70",o.day,e),...a})}export{Wo as Calendar,vo as CalendarDayButton};
@@ -0,0 +1 @@
1
+ import{j as r,c as d}from"./index-MB-jfQld.js";function c({className:a,size:t="default",...s}){return r.jsx("div",{"data-slot":"card","data-size":t,className:d("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",a),...s})}function o({className:a,...t}){return r.jsx("div",{"data-slot":"card-header",className:d("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)",a),...t})}function i({className:a,...t}){return r.jsx("div",{"data-slot":"card-title",className:d("font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm",a),...t})}function n({className:a,...t}){return r.jsx("div",{"data-slot":"card-description",className:d("text-sm text-muted-foreground",a),...t})}function l({className:a,...t}){return r.jsx("div",{"data-slot":"card-content",className:d("px-(--card-spacing)",a),...t})}export{c as C,o as a,i as b,n as c,l as d};
@@ -0,0 +1 @@
1
+ import{aZ as c,b as o,a_ as u,a$ as i,j as r,aT as g,aV as m,aW as d,D as p,b0 as x,r as b}from"./index-MB-jfQld.js";function j(e){const[s]=c(),n=o.useMemo(()=>{if(s.get("authenticator")!==e.name)return;const a=s.get("error");return a?new Error(a):void 0},[e.name,s]);return{signIn:o.useCallback(()=>{const a=u(s.get("to")||s.get("redirect")||"/"),l=i.buildUrl("cas:login",{authenticator:e.name,__appName:i.getAppName(),redirect:a});window.location.replace(l.toString())},[e.name,s]),error:n}}function f({authenticator:e,onSignIn:s}){const{signIn:n,error:t}=j(e);return r.jsxs("div",{className:"space-y-3",children:[t&&r.jsxs(g,{variant:"destructive",children:[r.jsx(m,{children:"CAS sign-in failed"}),r.jsx(d,{children:t.message})]}),r.jsxs(p,{type:"button",variant:"outline",className:"w-full",onClick:s??n,children:[r.jsx(x,{}),b(e.title||e.authTypeTitle||"CAS")]})]})}export{f as default};
@@ -0,0 +1,20 @@
1
+ import{r as Y,u as J,a as Q,b as c,j as e,L as F,S as R,B as $,c as C,d as A,e as T,f as P,g as U,s as X,h as Z,i as d,k as w,I as ee,T as se,l as V,m as z,n as N,o as m,p as G,q as p}from"./index-MB-jfQld.js";import{C as x,a as L,b as k,c as _,d as B}from"./card-DuQBOS6A.js";import{P as te}from"./prompt-output-DZHRM2ft.js";const y="__union__",M="anonymous";function q(s){return Y((s==null?void 0:s.title)||(s==null?void 0:s.name)||"Role",{ns:"starter"})}function ae({roles:s,roleMode:t,allowAnonymous:r=!1}){if(t==="only-use-union")return[{name:y,title:"Full permissions"}];const o=s.filter(n=>n.name!==y&&n.name!==M);return r&&o.push({name:M,title:"Anonymous"}),t==="allow-use-union"&&o.unshift({name:y,title:"Full permissions"}),o}function ne({className:s,triggerClassName:t,label:r="Switch role",showWhenUnavailable:o=!1}){var D;const{data:n,isLoading:S}=J(),i=Q(),[g,j]=c.useState(!1),[l,I]=c.useState(),a=i.status==="ready"?i.permissions:void 0,h=c.useMemo(()=>ae({roles:(n==null?void 0:n.roles)??[],roleMode:a==null?void 0:a.roleMode,allowAnonymous:a==null?void 0:a.allowAnonymous}),[n==null?void 0:n.roles,a==null?void 0:a.allowAnonymous,a==null?void 0:a.roleMode]),f=(a==null?void 0:a.currentRole)??((D=h[0])==null?void 0:D.name),W=h.length>1&&(a==null?void 0:a.roleMode)!=="only-use-union",K=async u=>{if(!(!u||u===f)){j(!0),I(void 0);try{await X(u),window.location.reload()}catch(b){I(b instanceof Error?b.message:"Unable to switch role"),j(!1)}}};return S||i.status==="idle"||i.status==="loading"?e.jsx(F,{className:"size-4 animate-spin text-muted-foreground"}):!W&&!o?null:W?e.jsxs("div",{className:C("space-y-2",s),children:[r===!1?null:e.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:r}),e.jsxs(A,{value:f,disabled:g,onValueChange:K,children:[e.jsxs(T,{className:C("w-full min-w-52",t),"aria-label":"Switch role",children:[g?e.jsx(F,{className:"animate-spin"}):e.jsx(R,{}),e.jsx(P,{children:E(h,f)})]}),e.jsx(U,{children:h.map((u,b)=>{var O;return e.jsx(re,{role:u,showSeparator:b===1&&((O=h[0])==null?void 0:O.name)===y},u.name)})})]}),l?e.jsx("p",{className:"text-xs text-destructive",children:l}):null]}):e.jsxs("div",{className:C("flex items-center gap-2 text-sm",s),children:[e.jsx(R,{className:"size-4 text-muted-foreground"}),e.jsx("span",{className:"text-muted-foreground",children:"Current role"}),e.jsx($,{variant:"secondary",children:E(h,f)})]})}function re({role:s,showSeparator:t}){return e.jsxs(e.Fragment,{children:[t?e.jsx(Z,{}):null,e.jsx(d,{value:s.name,children:q(s)})]})}function E(s,t){return q(s.find(r=>r.name===t)??(t?{name:t}:void 0))}const H={header:"Application header","user-menu":"User menu",settings:"Account settings",custom:"Custom surface"},le={"current-role":"Show current role",hide:"Hide component"},oe={header:"Place it in the application header beside the existing account controls. Keep the trigger compact and preserve the responsive user menu.","user-menu":"Place it inside the existing user/account popover as a full-width menu section, separated from profile and sign-out actions.",settings:"Place it in an account settings section with a field label and short explanation of how the active role changes visible data and actions.",custom:"Place it in the application surface described below, matching the surrounding layout and spacing."};function ie(){const[s,t]=c.useState("user-menu"),[r,o]=c.useState("Working as"),[n,S]=c.useState("current-role"),[i,g]=c.useState("Use the Starter's existing account controls and visual language. Do not create a separate demo page."),j=c.useMemo(()=>`Integrate the RoleSwitcher into the existing NocoBase Admin Starter.
2
+
3
+ Target placement
4
+ - Placement: ${H[s]}
5
+ - ${oe[s]}
6
+ - Application context: ${i}
7
+
8
+ Component presentation
9
+ - Label: ${r.trim()?r:"No label; pass label={false}."}
10
+ - When role switching is unavailable: ${n==="current-role"?"Keep the current identity visible by passing showWhenUnavailable.":"Hide the component by keeping showWhenUnavailable false."}
11
+ - Use className and triggerClassName only to fit the existing surface; do not fork or restyle the internal Select implementation.
12
+
13
+ Integration requirements
14
+ - Import and reuse RoleSwitcher from the installed local entry point at @/extensions/nocobase-acl.
15
+ - Update the existing application surface instead of creating an isolated example page.
16
+ - Do not fetch, hard-code, or pass a duplicate role list. The component reads roles from the signed-in identity.
17
+ - Do not reimplement Full permissions, Anonymous, or role-mode logic. The component derives these options from the Starter ACL store.
18
+ - Do not add a separate role-switch mutation. The component already calls users:setDefaultRole and reloads the application after a successful switch.
19
+ - Preserve existing account, responsive navigation, and sign-out behavior.
20
+ - Return the complete updated component for the target surface and mention any imports that were added.`,[r,s,i,n]);return e.jsxs("div",{className:"grid items-start gap-5 xl:grid-cols-[360px_minmax(0,1fr)]",children:[e.jsxs(x,{className:"gap-0 py-0",children:[e.jsxs(L,{className:"border-b py-4",children:[e.jsx(k,{className:"text-base",children:"Placement settings"}),e.jsx(_,{children:"Choose where the shared role switcher belongs and how its compact state should appear."})]}),e.jsxs(B,{className:"space-y-5 py-5",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(w,{children:"Placement"}),e.jsxs(A,{value:s,onValueChange:l=>l&&t(l),children:[e.jsx(T,{className:"w-full",children:e.jsx(P,{children:H[s]})}),e.jsxs(U,{children:[e.jsx(d,{value:"header",children:"Application header"}),e.jsx(d,{value:"user-menu",children:"User menu"}),e.jsx(d,{value:"settings",children:"Account settings"}),e.jsx(d,{value:"custom",children:"Custom surface"})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(w,{htmlFor:"role-switcher-label",children:"Label"}),e.jsx(ee,{id:"role-switcher-label",value:r,onChange:l=>o(l.target.value),placeholder:"Leave empty for no label"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(w,{children:"Single-role behavior"}),e.jsxs(A,{value:n,onValueChange:l=>l&&S(l),children:[e.jsx(T,{className:"w-full",children:e.jsx(P,{children:le[n]})}),e.jsxs(U,{children:[e.jsx(d,{value:"current-role",children:"Show current role"}),e.jsx(d,{value:"hide",children:"Hide component"})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(w,{htmlFor:"role-switcher-surface",children:"Application context"}),e.jsx(se,{id:"role-switcher-surface",value:i,onChange:l=>g(l.target.value),className:"min-h-28"})]})]})]}),e.jsx(te,{title:"Generated integration prompt",description:"Updates as you change placement and presentation settings.",prompt:j})]})}const ce=[["className","string","undefined","Styles the component wrapper so it can fit a toolbar, menu, or settings layout."],["triggerClassName","string","undefined","Styles only the Select trigger without changing the wrapper."],["label","ReactNode | false",'"Switch role"',"Replaces the field label. Pass false for a compact control without a label."],["showWhenUnavailable","boolean","false","Shows the current role as a non-interactive badge when the user cannot switch roles."]],de=[["Multiple assigned roles","Renders a Select using roles from the signed-in identity."],["allow-use-union","Prepends Full permissions using the __union__ role."],["only-use-union","Shows Full permissions as the current non-interactive role."],["allowAnonymous","Appends Anonymous to the available role options."],["One available role","Returns null, or shows the current-role badge when showWhenUnavailable is true."]];function xe(){return e.jsxs("div",{className:"space-y-12 pb-12",children:[e.jsxs("header",{className:"space-y-2",children:[e.jsx("h1",{className:"text-2xl font-semibold tracking-[-0.025em] sm:text-3xl",children:"Role switcher"}),e.jsx("p",{className:"max-w-3xl text-sm leading-6 text-muted-foreground",children:"A reusable role selector backed by the Starter's NocoBase ACL store and signed-in identity."})]}),e.jsxs("section",{className:"space-y-5 border-t pt-8",children:[e.jsx(v,{eyebrow:"Role selection",title:"RoleSwitcher",description:"The component resolves the signed-in user's roles and NocoBase role mode automatically. Business pages only decide its placement and presentation."}),e.jsxs("div",{className:"grid items-start gap-5 xl:grid-cols-2",children:[e.jsxs(x,{children:[e.jsxs(L,{children:[e.jsx(k,{children:"Live component"}),e.jsx(_,{children:"Uses the current identity and active NocoBase ACL response."})]}),e.jsx(B,{children:e.jsx(ne,{showWhenUnavailable:!0,className:"w-full max-w-sm",label:"Working as"})})]}),e.jsxs(x,{children:[e.jsxs(L,{children:[e.jsx(k,{children:"Unavailable state"}),e.jsx(_,{children:"With one usable role, showWhenUnavailable keeps identity visible without presenting a disabled Select."})]}),e.jsx(B,{children:e.jsxs("div",{className:"flex min-h-9 items-center gap-2 text-sm",children:[e.jsx(R,{className:"size-4 text-muted-foreground"}),e.jsx("span",{className:"text-muted-foreground",children:"Current role"}),e.jsx($,{variant:"secondary",children:"Member"})]})})]})]})]}),e.jsxs("section",{className:"space-y-5 border-t pt-8",children:[e.jsx(v,{eyebrow:"Prompt generator",title:"Place the role switcher in an existing application surface",description:"Describe the target placement and presentation. The generated prompt integrates the exported component without rebuilding its role-loading or switching behavior."}),e.jsx(ie,{})]}),e.jsxs("section",{className:"space-y-5 border-t pt-8",children:[e.jsx(v,{eyebrow:"Component API",title:"Role switcher props",description:"Role data, union mode, Anonymous, persistence, and reload behavior are built in rather than exposed as duplicated application props."}),e.jsx(he,{rows:ce})]}),e.jsxs("section",{className:"space-y-5 border-t pt-8",children:[e.jsx(v,{eyebrow:"Automatic behavior",title:"Role options follow NocoBase configuration",description:"These states are derived from the identity and roles:check response, so applications do not maintain a second role list."}),e.jsx(x,{className:"gap-0 overflow-hidden py-0",children:e.jsxs(V,{children:[e.jsx(z,{children:e.jsxs(N,{children:[e.jsx(m,{children:"Condition"}),e.jsx(m,{children:"Rendered behavior"})]})}),e.jsx(G,{children:de.map(([s,t])=>e.jsxs(N,{children:[e.jsx(p,{className:"font-medium",children:s}),e.jsx(p,{className:"text-muted-foreground",children:t})]},s))})]})})]})]})}function he({rows:s}){return e.jsx(x,{className:"gap-0 overflow-hidden py-0",children:e.jsxs(V,{children:[e.jsx(z,{children:e.jsxs(N,{children:[e.jsx(m,{children:"Prop"}),e.jsx(m,{children:"Type"}),e.jsx(m,{children:"Default"}),e.jsx(m,{children:"Description"})]})}),e.jsx(G,{children:s.map(([t,r,o,n])=>e.jsxs(N,{children:[e.jsx(p,{className:"font-mono text-xs font-medium",children:t}),e.jsx(p,{className:"font-mono text-xs text-muted-foreground",children:r}),e.jsx(p,{className:"font-mono text-xs text-muted-foreground",children:o}),e.jsx(p,{className:"min-w-72 whitespace-normal text-muted-foreground",children:n})]},t))})]})})}function v({eyebrow:s,title:t,description:r}){return e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.16em] text-muted-foreground",children:s}),e.jsx("h2",{className:"mt-2 text-xl font-semibold tracking-tight",children:t}),e.jsx("p",{className:"mt-1.5 max-w-3xl text-sm leading-6 text-muted-foreground",children:r})]})}export{xe as AclComponentsPage};
@@ -0,0 +1 @@
1
+ import{aI as c,j as s,aS as d,aT as m,aU as p,aV as y,aW as v}from"./index-MB-jfQld.js";const t=[{username:"atlas",nickname:"Atlas",position:"General assistant",greeting:"How can I help with this page?"},{username:"viz",nickname:"Viz",position:"Insights analyst",greeting:"What would you like to explore?"}],o=[{value:"__preview__",label:"Preview only",configured:!1}],a=()=>new ReadableStream({start(e){e.close()}}),u={listEmployees:async()=>t,listModels:async()=>o,updateEmployeeUserPrompt:async()=>{},listConversations:async()=>[],getConversationMessages:async()=>[],getConversationActiveState:async()=>"idle",updateConversationTitle:async()=>{},destroyConversation:async()=>{},uploadFile:async e=>({id:crypto.randomUUID(),filename:e.name,mimetype:e.type,size:e.size}),createConversation:async()=>`preview-${crypto.randomUUID()}`,sendMessagesStream:async()=>a(),resendMessagesStream:async()=>a(),updateToolCallDecision:async()=>({updated:0,toolCalls:[]}),resumeToolCallStream:async()=>a(),resumeConversationStream:async()=>a()};function h({children:e}){const{configurationStatus:i,hasEnabledModels:r,employees:n}=c();if(i==="ready"&&r&&n.length>0)return e;const l=n.length?e:s.jsx(d,{employees:t,models:o,service:u,children:e});return s.jsxs("div",{className:"space-y-6",children:[s.jsxs(m,{children:[s.jsx(p,{}),s.jsx(y,{children:"Preview mode"}),s.jsx(v,{children:"Component examples remain available. Sending messages requires an enabled AI model in the connected NocoBase application."})]}),l]})}export{h as A};
@@ -0,0 +1 @@
1
+ import{_ as $,am as I,an as L,P as N,ao as O,ap as H,M as Y,j as X,R as S,o as y}from"./echarts-runtime-D8kXn6ME.js";var R=Math.min,j=Math.max;function F(h,t){return isNaN(h)||isNaN(t)}function Z(h,t,l,r,f,i,a,n,u){for(var s,w,c,q,P,e,b=l,p=0;p<r;p++){var o=t[b*2],v=t[b*2+1];if(b>=f||b<0)break;if(F(o,v)){if(u){b+=i;continue}break}if(b===l)h[i>0?"moveTo":"lineTo"](o,v),c=o,q=v;else{var T=o-s,d=v-w;if(T*T+d*d<.5){b+=i;continue}if(a>0){for(var A=b+i,k=t[A*2],M=t[A*2+1];k===o&&M===v&&p<r;)p++,A+=i,b+=i,k=t[A*2],M=t[A*2+1],o=t[b*2],v=t[b*2+1],T=o-s,d=v-w;var W=p+1;if(u)for(;F(k,M)&&W<r;)W++,A+=i,k=t[A*2],M=t[A*2+1];var G=.5,z=0,B=0,m=void 0,g=void 0;if(W>=r||F(k,M))P=o,e=v;else{z=k-s,B=M-w;var J=o-s,Q=k-o,U=v-w,V=M-v,D=void 0,E=void 0;if(n==="x"){D=Math.abs(J),E=Math.abs(Q);var C=z>0?1:-1;P=o-C*D*a,e=v,m=o+C*E*a,g=v}else if(n==="y"){D=Math.abs(U),E=Math.abs(V);var K=B>0?1:-1;P=o,e=v-K*D*a,m=o,g=v+K*E*a}else D=Math.sqrt(J*J+U*U),E=Math.sqrt(Q*Q+V*V),G=E/(E+D),P=o-z*a*(1-G),e=v-B*a*(1-G),m=o+z*a*G,g=v+B*a*G,m=R(m,j(k,o)),g=R(g,j(M,v)),m=j(m,R(k,o)),g=j(g,R(M,v)),z=m-o,B=g-v,P=o-z*D/E,e=v-B*D/E,P=R(P,j(s,o)),e=R(e,j(w,v)),P=j(P,R(s,o)),e=j(e,R(w,v)),z=o-P,B=v-e,m=o+z*E/D,g=v+B*E/D}h.bezierCurveTo(c,q,P,e,o,v),c=m,q=g}else h.lineTo(o,v)}s=o,w=v,b+=i}return p}var _=(function(){function h(){this.smooth=0,this.smoothConstraint=!0}return h})(),ta=(function(h){$(t,h);function t(l){var r=h.call(this,l)||this;return r.type="ec-polyline",r}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new _},t.prototype.buildPath=function(l,r){var f=r.points,i=0,a=f.length/2;if(r.connectNulls){for(;a>0&&F(f[a*2-2],f[a*2-1]);a--);for(;i<a&&F(f[i*2],f[i*2+1]);i++);}for(;i<a;)i+=Z(l,f,i,a,a,1,r.smooth,r.smoothMonotone,r.connectNulls)+1},t.prototype.getPointOn=function(l,r){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var f=this.path,i=f.data,a=I.CMD,n,u,s=r==="x",w=[],c=0;c<i.length;){var q=i[c++],P=void 0,e=void 0,b=void 0,p=void 0,o=void 0,v=void 0,T=void 0;switch(q){case a.M:n=i[c++],u=i[c++];break;case a.L:if(P=i[c++],e=i[c++],T=s?(l-n)/(P-n):(l-u)/(e-u),T<=1&&T>=0){var d=s?(e-u)*T+u:(P-n)*T+n;return s?[l,d]:[d,l]}n=P,u=e;break;case a.C:P=i[c++],e=i[c++],b=i[c++],p=i[c++],o=i[c++],v=i[c++];var A=s?L(n,P,b,o,l,w):L(u,e,p,v,l,w);if(A>0)for(var k=0;k<A;k++){var M=w[k];if(M<=1&&M>=0){var d=s?O(u,e,p,v,M):O(n,P,b,o,M);return s?[l,d]:[d,l]}}n=o,u=v;break}}},t})(N),x=(function(h){$(t,h);function t(){return h!==null&&h.apply(this,arguments)||this}return t})(_),oa=(function(h){$(t,h);function t(l){var r=h.call(this,l)||this;return r.type="ec-polygon",r}return t.prototype.getDefaultShape=function(){return new x},t.prototype.buildPath=function(l,r){var f=r.points,i=r.stackedOnPoints,a=0,n=f.length/2,u=r.smoothMonotone;if(r.connectNulls){for(;n>0&&F(f[n*2-2],f[n*2-1]);n--);for(;a<n&&F(f[a*2],f[a*2+1]);a++);}for(;a<n;){var s=Z(l,f,a,n,n,1,r.smooth,u,r.connectNulls);Z(l,i,a+s-1,s,n,-1,r.stackedOnSmooth,u,r.connectNulls),a+=s+1,l.closePath()}},t})(N);function aa(h,t,l,r,f){var i=h.getArea(),a=i.x,n=i.y,u=i.width,s=i.height,w=l.get(["lineStyle","width"])||0;a-=w/2,n-=w/2,u+=w,s+=w,u=Math.ceil(u),a!==Math.floor(a)&&(a=Math.floor(a),u++);var c=new S({shape:{x:a,y:n,width:u,height:s}});if(t){var q=h.getBaseAxis(),P=q.isHorizontal(),e=q.inverse;P?(e&&(c.shape.x+=u),c.shape.width=0):(e||(c.shape.y+=s),c.shape.height=0);var b=y(f)?function(p){f(p,c)}:null;X(c,{shape:{width:u,height:s,x:a,y:n}},l,null,r,b)}return c}function ra(h,t,l){var r=h.getArea(),f=H(r.r0,1),i=H(r.r,1),a=new Y({shape:{cx:H(h.cx,1),cy:H(h.cy,1),r0:f,r:i,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}});if(t){var n=h.getBaseAxis().dim==="angle";n?a.shape.endAngle=r.startAngle:a.shape.r=f,X(a,{shape:{endAngle:r.endAngle,r:i}},l)}return a}function va(h,t,l,r,f){if(h){if(h.type==="polar")return ra(h,t,l);if(h.type==="cartesian2d")return aa(h,t,l,r,f)}else return null;return null}export{ta as E,oa as a,ra as b,aa as c,va as d};
@@ -0,0 +1 @@
1
+ import{H as t,N as c,as as m,at as o}from"./echarts-runtime-D8kXn6ME.js";function S(e,a,n){a=t(a)&&{coordDimensions:a}||c({encodeDefine:e.getEncode()},a);var r=e.getSource(),s=m(r,a).dimensions,i=new o(s,e);return i.initData(r,n),i}export{S as c};
@@ -0,0 +1,3 @@
1
+ import{D as Q,aV as W,G as C,R as le,c8 as d,cd as mt,ce as wt,al as bt,aw as Ke,aK as $e,cf as At,bx as Et,ai as Ct,cg as Tt,L as Ft,k as Gt,y as x,m as O,ch as Pt,ci as Ae,cj as Qe,b6 as Lt,b5 as et,be as tt,a_ as m,aU as Mt,W as ee,ck as Rt,cl as Dt,cm as kt,_ as M,ab as Wt,a1 as at,c6 as rt,N as F,c4 as Vt,aj as Bt,bN as ve,a4 as re,aB as nt,cn as Ot,co as zt,aH as Yt,cp as it,aX as Ee,o as Ut,bQ as de,cq as Ht,aC as ge,x as Xt,cr as Jt,bc as ue,aT as ot,aP as jt,bB as It,r as Nt,u as Zt,l as fe,cs as qt,t as Kt,ct as $t,cu as Qt,bU as ye,a$ as J,a9 as ea,f as xe,cv as ta,cw as aa,bh as st,bV as ra,cx as na,cy as ia,cz as oa,aL as lt,cA as sa,ap as la,bd as ua,a5 as fa,bO as pa,cB as ca,bR as ha,cC as va,cD as da,cE as ga,cF as ya,cG as xa,cH as ut,cI as j,cJ as Sa,a3 as Se,P as _a,cK as ma,H as wa}from"./echarts-runtime-D8kXn6ME.js";import{V as ft,R as ba,u as Aa,a as Ea,b as Ca}from"./LineDraw-iG-ADes-.js";function pt(r){if(Q(r)){var e=new DOMParser;r=e.parseFromString(r,"text/xml")}var t=r;for(t.nodeType===9&&(t=t.firstChild);t.nodeName.toLowerCase()!=="svg"||t.nodeType!==1;)t=t.nextSibling;return t}var ne,q={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-anchor":"textAlign",visibility:"visibility",display:"display"},Ce=W(q),K={"alignment-baseline":"textBaseline","stop-color":"stopColor"},Te=W(K),Ta=(function(){function r(){this._defs={},this._root=null}return r.prototype.parse=function(e,t){t=t||{};var a=pt(e);this._defsUsePending=[];var n=new C;this._root=n;var i=[],o=a.getAttribute("viewBox")||"",s=parseFloat(a.getAttribute("width")||t.width),l=parseFloat(a.getAttribute("height")||t.height);isNaN(s)&&(s=null),isNaN(l)&&(l=null),b(a,n,null,!0,!1);for(var u=a.firstChild;u;)this._parseNode(u,n,i,null,!1,!1),u=u.nextSibling;Pa(this._defs,this._defsUsePending),this._defsUsePending=[];var f,p;if(o){var h=te(o);h.length>=4&&(f={x:parseFloat(h[0]||0),y:parseFloat(h[1]||0),width:parseFloat(h[2]),height:parseFloat(h[3])})}if(f&&s!=null&&l!=null&&(p=ht(f,{x:0,y:0,width:s,height:l}),!t.ignoreViewBox)){var c=n;n=new C,n.add(c),c.scaleX=c.scaleY=p.scale,c.x=p.x,c.y=p.y}return!t.ignoreRootClip&&s!=null&&l!=null&&n.setClipPath(new le({shape:{x:0,y:0,width:s,height:l}})),{root:n,width:s,height:l,viewBoxRect:f,viewBoxTransform:p,named:i}},r.prototype._parseNode=function(e,t,a,n,i,o){var s=e.nodeName.toLowerCase(),l,u=n;if(s==="defs"&&(i=!0),s==="text"&&(o=!0),s==="defs"||s==="switch")l=t;else{if(!i){var f=ne[s];if(f&&d(ne,s)){l=f.call(this,e,t);var p=e.getAttribute("name");if(p){var h={name:p,namedFrom:null,svgNodeTagLower:s,el:l};a.push(h),s==="g"&&(u=h)}else n&&a.push({name:n.name,namedFrom:n,svgNodeTagLower:s,el:l});t.add(l)}}var c=Fe[s];if(c&&d(Fe,s)){var v=c.call(this,e),g=e.getAttribute("id");g&&(this._defs[g]=v)}}if(l&&l.isGroup)for(var y=e.firstChild;y;)y.nodeType===1?this._parseNode(y,l,a,u,i,o):y.nodeType===3&&o&&this._parseText(y,l),y=y.nextSibling},r.prototype._parseText=function(e,t){var a=new mt({style:{text:e.textContent},silent:!0,x:this._textX||0,y:this._textY||0});A(t,a),b(e,a,this._defsUsePending,!1,!1),Fa(a,t);var n=a.style,i=n.fontSize;i&&i<9&&(n.fontSize=9,a.scaleX*=i/9,a.scaleY*=i/9);var o=(n.fontSize||n.fontFamily)&&[n.fontStyle,n.fontWeight,(n.fontSize||12)+"px",n.fontFamily||"sans-serif"].join(" ");n.font=o;var s=a.getBoundingRect();return this._textX+=s.width,t.add(a),a},r.internalField=(function(){ne={g:function(e,t){var a=new C;return A(t,a),b(e,a,this._defsUsePending,!1,!1),a},rect:function(e,t){var a=new le;return A(t,a),b(e,a,this._defsUsePending,!1,!1),a.setShape({x:parseFloat(e.getAttribute("x")||"0"),y:parseFloat(e.getAttribute("y")||"0"),width:parseFloat(e.getAttribute("width")||"0"),height:parseFloat(e.getAttribute("height")||"0")}),a.silent=!0,a},circle:function(e,t){var a=new Ct;return A(t,a),b(e,a,this._defsUsePending,!1,!1),a.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),r:parseFloat(e.getAttribute("r")||"0")}),a.silent=!0,a},line:function(e,t){var a=new Et;return A(t,a),b(e,a,this._defsUsePending,!1,!1),a.setShape({x1:parseFloat(e.getAttribute("x1")||"0"),y1:parseFloat(e.getAttribute("y1")||"0"),x2:parseFloat(e.getAttribute("x2")||"0"),y2:parseFloat(e.getAttribute("y2")||"0")}),a.silent=!0,a},ellipse:function(e,t){var a=new At;return A(t,a),b(e,a,this._defsUsePending,!1,!1),a.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),rx:parseFloat(e.getAttribute("rx")||"0"),ry:parseFloat(e.getAttribute("ry")||"0")}),a.silent=!0,a},polygon:function(e,t){var a=e.getAttribute("points"),n;a&&(n=Le(a));var i=new $e({shape:{points:n||[]},silent:!0});return A(t,i),b(e,i,this._defsUsePending,!1,!1),i},polyline:function(e,t){var a=e.getAttribute("points"),n;a&&(n=Le(a));var i=new Ke({shape:{points:n||[]},silent:!0});return A(t,i),b(e,i,this._defsUsePending,!1,!1),i},image:function(e,t){var a=new bt;return A(t,a),b(e,a,this._defsUsePending,!1,!1),a.setStyle({image:e.getAttribute("xlink:href")||e.getAttribute("href"),x:+e.getAttribute("x"),y:+e.getAttribute("y"),width:+e.getAttribute("width"),height:+e.getAttribute("height")}),a.silent=!0,a},text:function(e,t){var a=e.getAttribute("x")||"0",n=e.getAttribute("y")||"0",i=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0";this._textX=parseFloat(a)+parseFloat(i),this._textY=parseFloat(n)+parseFloat(o);var s=new C;return A(t,s),b(e,s,this._defsUsePending,!1,!0),s},tspan:function(e,t){var a=e.getAttribute("x"),n=e.getAttribute("y");a!=null&&(this._textX=parseFloat(a)),n!=null&&(this._textY=parseFloat(n));var i=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0",s=new C;return A(t,s),b(e,s,this._defsUsePending,!1,!0),this._textX+=parseFloat(i),this._textY+=parseFloat(o),s},path:function(e,t){var a=e.getAttribute("d")||"",n=wt(a);return A(t,n),b(e,n,this._defsUsePending,!1,!1),n.silent=!0,n}}})(),r})(),Fe={lineargradient:function(r){var e=parseInt(r.getAttribute("x1")||"0",10),t=parseInt(r.getAttribute("y1")||"0",10),a=parseInt(r.getAttribute("x2")||"10",10),n=parseInt(r.getAttribute("y2")||"0",10),i=new Ft(e,t,a,n);return Ge(r,i),Pe(r,i),i},radialgradient:function(r){var e=parseInt(r.getAttribute("cx")||"0",10),t=parseInt(r.getAttribute("cy")||"0",10),a=parseInt(r.getAttribute("r")||"0",10),n=new Tt(e,t,a);return Ge(r,n),Pe(r,n),n}};function Ge(r,e){var t=r.getAttribute("gradientUnits");t==="userSpaceOnUse"&&(e.global=!0)}function Pe(r,e){for(var t=r.firstChild;t;){if(t.nodeType===1&&t.nodeName.toLocaleLowerCase()==="stop"){var a=t.getAttribute("offset"),n=void 0;a&&a.indexOf("%")>0?n=parseInt(a,10)/100:a?n=parseFloat(a):n=0;var i={};ct(t,i,i);var o=i.stopColor||t.getAttribute("stop-color")||"#000000";e.colorStops.push({offset:n,color:o})}t=t.nextSibling}}function A(r,e){r&&r.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),Gt(e.__inheritedStyle,r.__inheritedStyle))}function Le(r){for(var e=te(r),t=[],a=0;a<e.length;a+=2){var n=parseFloat(e[a]),i=parseFloat(e[a+1]);t.push([n,i])}return t}function b(r,e,t,a,n){var i=e,o=i.__inheritedStyle=i.__inheritedStyle||{},s={};r.nodeType===1&&(Ra(r,e),ct(r,o,s),a||Da(r,o,s)),i.style=i.style||{},o.fill!=null&&(i.style.fill=Me(i,"fill",o.fill,t)),o.stroke!=null&&(i.style.stroke=Me(i,"stroke",o.stroke,t)),x(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function(l){o[l]!=null&&(i.style[l]=parseFloat(o[l]))}),x(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign"],function(l){o[l]!=null&&(i.style[l]=o[l])}),n&&(i.__selfStyle=s),o.lineDash&&(i.style.lineDash=O(te(o.lineDash),function(l){return parseFloat(l)})),(o.visibility==="hidden"||o.visibility==="collapse")&&(i.invisible=!0),o.display==="none"&&(i.ignore=!0)}function Fa(r,e){var t=e.__selfStyle;if(t){var a=t.textBaseline,n=a;!a||a==="auto"||a==="baseline"?n="alphabetic":a==="before-edge"||a==="text-before-edge"?n="top":a==="after-edge"||a==="text-after-edge"?n="bottom":(a==="central"||a==="mathematical")&&(n="middle"),r.style.textBaseline=n}var i=e.__inheritedStyle;if(i){var o=i.textAlign,s=o;o&&(o==="middle"&&(s="center"),r.style.textAlign=s)}}var Ga=/^url\(\s*#(.*?)\)/;function Me(r,e,t,a){var n=t&&t.match(Ga);if(n){var i=Pt(n[1]);a.push([r,e,i]);return}return t==="none"&&(t=null),t}function Pa(r,e){for(var t=0;t<e.length;t++){var a=e[t];a[0].style[a[1]]=r[a[2]]}}var La=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function te(r){return r.match(La)||[]}var Ma=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.eE,]*)\)/g,ie=Math.PI/180;function Ra(r,e){var t=r.getAttribute("transform");if(t){t=t.replace(/,/g," ");var a=[],n=null;t.replace(Ma,function(p,h,c){return a.push(h,c),""});for(var i=a.length-1;i>0;i-=2){var o=a[i],s=a[i-1],l=te(o);switch(n=n||tt(),s){case"translate":et(n,n,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":Lt(n,n,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":Qe(n,n,-parseFloat(l[0])*ie,[parseFloat(l[1]||"0"),parseFloat(l[2]||"0")]);break;case"skewX":var u=Math.tan(parseFloat(l[0])*ie);Ae(n,[1,0,u,1,0,0],n);break;case"skewY":var f=Math.tan(parseFloat(l[0])*ie);Ae(n,[1,f,0,1,0,0],n);break;case"matrix":n[0]=parseFloat(l[0]),n[1]=parseFloat(l[1]),n[2]=parseFloat(l[2]),n[3]=parseFloat(l[3]),n[4]=parseFloat(l[4]),n[5]=parseFloat(l[5]);break}}e.setLocalTransform(n)}}var Re=/([^\s:;]+)\s*:\s*([^:;]+)/g;function ct(r,e,t){var a=r.getAttribute("style");if(a){Re.lastIndex=0;for(var n;(n=Re.exec(a))!=null;){var i=n[1],o=d(q,i)?q[i]:null;o&&(e[o]=n[2]);var s=d(K,i)?K[i]:null;s&&(t[s]=n[2])}}}function Da(r,e,t){for(var a=0;a<Ce.length;a++){var n=Ce[a],i=r.getAttribute(n);i!=null&&(e[q[n]]=i)}for(var a=0;a<Te.length;a++){var n=Te[a],i=r.getAttribute(n);i!=null&&(t[K[n]]=i)}}function ht(r,e){var t=e.width/r.width,a=e.height/r.height,n=Math.min(t,a);return{scale:n,x:-(r.x+r.width/2)*n+(e.x+e.width/2),y:-(r.y+r.height/2)*n+(e.y+e.height/2)}}function ka(r,e){var t=new Ta;return t.parse(r,e)}var Wa=m(["rect","circle","line","ellipse","polygon","polyline","path","text","tspan","g"]),Va=(function(){function r(e,t){this.type="geoSVG",this._usedGraphicMap=m(),this._freedGraphics=[],this._mapName=e,this._parsedXML=pt(t)}return r.prototype.load=function(){var e=this._firstGraphic;if(!e){e=this._firstGraphic=this._buildGraphic(this._parsedXML),this._freedGraphics.push(e),this._boundingRect=this._firstGraphic.boundingRect.clone();var t=Oa(e.named),a=t.regions,n=t.regionsMap;this._regions=a,this._regionsMap=n}return{boundingRect:this._boundingRect,regions:this._regions,regionsMap:this._regionsMap}},r.prototype._buildGraphic=function(e){var t,a;try{t=e&&ka(e,{ignoreViewBox:!0,ignoreRootClip:!0})||{},a=t.root,Mt(a!=null)}catch(y){throw new Error(`Invalid svg format
2
+ `+y.message)}var n=new C;n.add(a),n.isGeoSVGGraphicRoot=!0;var i=t.width,o=t.height,s=t.viewBoxRect,l=this._boundingRect;if(!l){var u=void 0,f=void 0,p=void 0,h=void 0;if(i!=null?(u=0,p=i):s&&(u=s.x,p=s.width),o!=null?(f=0,h=o):s&&(f=s.y,h=s.height),u==null||f==null){var c=a.getBoundingRect();u==null&&(u=c.x,p=c.width),f==null&&(f=c.y,h=c.height)}l=this._boundingRect=new ee(u,f,p,h)}if(s){var v=ht(s,l);a.scaleX=a.scaleY=v.scale,a.x=v.x,a.y=v.y}n.setClipPath(new le({shape:l.plain()}));var g=[];return x(t.named,function(y){Wa.get(y.svgNodeTagLower)!=null&&(g.push(y),Ba(y.el))}),{root:n,boundingRect:l,named:g}},r.prototype.useGraphic=function(e){var t=this._usedGraphicMap,a=t.get(e);return a||(a=this._freedGraphics.pop()||this._buildGraphic(this._parsedXML),t.set(e,a),a)},r.prototype.freeGraphic=function(e){var t=this._usedGraphicMap,a=t.get(e);a&&(t.removeKey(e),this._freedGraphics.push(a))},r})();function Ba(r){r.silent=!1,r.isGroup&&r.traverse(function(e){e.silent=!1})}function Oa(r){var e=[],t=m();return x(r,function(a){if(a.namedFrom==null){var n=new Rt(a.name,a.el);e.push(n),t.set(a.name,n)}}),{regions:e,regionsMap:t}}var pe=[126,25],De="南海诸岛",k=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]];for(var D=0;D<k.length;D++)for(var V=0;V<k[D].length;V++)k[D][V][0]/=10.5,k[D][V][1]/=-10.5/.75,k[D][V][0]+=pe[0],k[D][V][1]+=pe[1];function za(r,e){if(r==="china"){for(var t=0;t<e.length;t++)if(e[t].name===De)return;e.push(new Dt(De,O(k,function(a){return{type:"polygon",exterior:a}}),pe))}}var Ya={南海诸岛:[32,80],广东:[0,-10],香港:[10,5],澳门:[-10,10],天津:[5,5]};function Ua(r,e){if(r==="china"){var t=Ya[e.name];if(t){var a=e.getCenter();a[0]+=t[0]/10.5,a[1]+=-t[1]/(10.5/.75),e.setCenter(a)}}}var Ha=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]];function Xa(r,e){r==="china"&&e.name==="台湾"&&e.geometries.push({type:"polygon",exterior:Ha[0]})}var Ja="name",ja=(function(){function r(e,t,a){this.type="geoJSON",this._parsedMap=m(),this._mapName=e,this._specialAreas=a,this._geoJSON=Na(t)}return r.prototype.load=function(e,t){t=t||Ja;var a=this._parsedMap.get(t);if(!a){var n=this._parseToRegions(t);a=this._parsedMap.set(t,{regions:n,boundingRect:Ia(n)})}var i=m(),o=[];return x(a.regions,function(s){var l=s.name;e&&d(e,l)&&(s=s.cloneShallow(l=e[l])),o.push(s),i.set(l,s)}),{regions:o,boundingRect:a.boundingRect||new ee(0,0,0,0),regionsMap:i}},r.prototype._parseToRegions=function(e){var t=this._mapName,a=this._geoJSON,n;try{n=a?kt(a,e):[]}catch(i){throw new Error(`Invalid geoJson format
3
+ `+i.message)}return za(t,n),x(n,function(i){var o=i.name;Ua(t,i),Xa(t,i);var s=this._specialAreas&&this._specialAreas[o];s&&i.transformTo(s.left,s.top,s.width,s.height)},this),n},r.prototype.getMapForUser=function(){return{geoJson:this._geoJSON,geoJSON:this._geoJSON,specialAreas:this._specialAreas}},r})();function Ia(r){for(var e,t=0;t<r.length;t++){var a=r[t].getBoundingRect();e=e||a.clone(),e.union(a)}return e}function Na(r){return Q(r)?typeof JSON<"u"&&JSON.parse?JSON.parse(r):new Function("return ("+r+");")():r}var X=m();const L={registerMap:function(r,e,t){if(e.svg){var a=new Va(r,e.svg);X.set(r,a)}else{var n=e.geoJson||e.geoJSON;n&&!e.features?t=e.specialAreas:n=e;var a=new ja(r,n,t);X.set(r,a)}},getGeoResource:function(r){return X.get(r)},getMapForUser:function(r){var e=X.get(r);return e&&e.type==="geoJSON"&&e.getMapForUser()},load:function(r,e,t){var a=X.get(r);if(a)return a.load(e,t)}};var Za={geoJSON:{aspectScale:.75,invertLongitute:!0},geoSVG:{aspectScale:1,invertLongitute:!1}},vt=["lng","lat"],ce=(function(r){M(e,r);function e(t,a,n){var i=r.call(this,t)||this;i.dimensions=vt,i.type="geo",i._nameCoordMap=m(),i.map=a;var o=n.projection,s=L.load(a,n.nameMap,n.nameProperty),l=L.getGeoResource(a);i.resourceType=l?l.type:null;var u=i.regions=s.regions,f=Za[l.type];i._regionsMap=s.regionsMap,i.regions=s.regions,i.projection=o;var p;if(o)for(var h=0;h<u.length;h++){var c=u[h].getBoundingRect(o);p=p||c.clone(),p.union(c)}else p=s.boundingRect;return i.setBoundingRect(p.x,p.y,p.width,p.height),i.aspectScale=o?1:Wt(n.aspectScale,f.aspectScale),i._invertLongitute=o?!1:f.invertLongitute,i}return e.prototype._transformTo=function(t,a,n,i){var o=this.getBoundingRect(),s=this._invertLongitute;o=o.clone(),s&&(o.y=-o.y-o.height);var l=this._rawTransformable;l.transform=o.calculateTransform(new ee(t,a,n,i));var u=l.parent;l.parent=null,l.decomposeTransform(),l.parent=u,s&&(l.scaleY=-l.scaleY),this._updateTransform()},e.prototype.getRegion=function(t){return this._regionsMap.get(t)},e.prototype.getRegionByCoord=function(t){for(var a=this.regions,n=0;n<a.length;n++){var i=a[n];if(i.type==="geoJSON"&&i.contain(t))return a[n]}},e.prototype.addGeoCoord=function(t,a){this._nameCoordMap.set(t,a)},e.prototype.getGeoCoord=function(t){var a=this._regionsMap.get(t);return this._nameCoordMap.get(t)||a&&a.getCenter()},e.prototype.dataToPoint=function(t,a,n){if(Q(t)&&(t=this.getGeoCoord(t)),t){var i=this.projection;return i&&(t=i.project(t)),t&&this.projectedToPoint(t,a,n)}},e.prototype.pointToData=function(t){var a=this.projection;return a&&(t=a.unproject(t)),t&&this.pointToProjected(t)},e.prototype.pointToProjected=function(t){return r.prototype.pointToData.call(this,t)},e.prototype.projectedToPoint=function(t,a,n){return r.prototype.dataToPoint.call(this,t,a,n)},e.prototype.convertToPixel=function(t,a,n){var i=ke(a);return i===this?i.dataToPoint(n):null},e.prototype.convertFromPixel=function(t,a,n){var i=ke(a);return i===this?i.pointToData(n):null},e})(ft);at(ce,ft);function ke(r){var e=r.geoModel,t=r.seriesModel;return e?e.coordinateSystem:t?t.coordinateSystem||(t.getReferringComponents("geo",rt).models[0]||{}).coordinateSystem:null}function We(r,e){var t=r.get("boundingCoords");if(t!=null){var a=t[0],n=t[1];if(isFinite(a[0])&&isFinite(a[1])&&isFinite(n[0])&&isFinite(n[1])){var i=this.projection;if(i){var o=a[0],s=a[1],l=n[0],u=n[1];a=[1/0,1/0],n=[-1/0,-1/0];var f=function(I,U,P,R){for(var E=P-I,H=R-U,ae=0;ae<=100;ae++){var we=ae/100,be=i.project([I+E*we,U+H*we]);Ot(a,a,be),zt(n,n,be)}};f(o,s,l,s),f(l,s,l,u),f(l,u,o,u),f(o,u,l,s)}this.setBoundingRect(a[0],a[1],n[0]-a[0],n[1]-a[1])}}var p=this.getBoundingRect(),h=r.get("layoutCenter"),c=r.get("layoutSize"),v=e.getWidth(),g=e.getHeight(),y=p.width/p.height*this.aspectScale,S=!1,w,G;h&&c&&(w=[re(h[0],v),re(h[1],g)],G=re(c,Math.min(v,g)),!isNaN(w[0])&&!isNaN(w[1])&&!isNaN(G)&&(S=!0));var _;if(S)_={},y>1?(_.width=G,_.height=G/y):(_.height=G,_.width=G*y),_.y=w[1]-_.height/2,_.x=w[0]-_.width/2;else{var Y=r.getBoxLayoutParams();Y.aspect=y,_=nt(Y,{width:v,height:g})}this.setViewRect(_.x,_.y,_.width,_.height),this.setCenter(r.get("center"),e),this.setZoom(r.get("zoom"))}function qa(r,e){x(e.get("geoCoord"),function(t,a){r.addGeoCoord(a,t)})}var Ka=(function(){function r(){this.dimensions=vt}return r.prototype.create=function(e,t){var a=[];function n(o){return{nameProperty:o.get("nameProperty"),aspectScale:o.get("aspectScale"),projection:o.get("projection")}}e.eachComponent("geo",function(o,s){var l=o.get("map"),u=new ce(l+s,l,F({nameMap:o.get("nameMap")},n(o)));u.zoomLimit=o.get("scaleLimit"),a.push(u),o.coordinateSystem=u,u.model=o,u.resize=We,u.resize(o,t)}),e.eachSeries(function(o){var s=o.get("coordinateSystem");if(s==="geo"){var l=o.get("geoIndex")||0;o.coordinateSystem=a[l]}});var i={};return e.eachSeriesByType("map",function(o){if(!o.getHostGeoModel()){var s=o.getMapType();i[s]=i[s]||[],i[s].push(o)}}),x(i,function(o,s){var l=O(o,function(f){return f.get("nameMap")}),u=new ce(s,s,F({nameMap:Vt(l)},n(o[0])));u.zoomLimit=Bt.apply(null,O(o,function(f){return f.get("scaleLimit")})),a.push(u),u.resize=We,u.resize(o[0],t),x(o,function(f){f.coordinateSystem=u,qa(u,f)})}),a},r.prototype.getFilledRegions=function(e,t,a,n){for(var i=(e||[]).slice(),o=m(),s=0;s<i.length;s++)o.set(i[s].name,i[s]);var l=L.load(t,a,n);return x(l.regions,function(u){var f=u.name,p=o.get(f),h=u.properties&&u.properties.echartsStyle;p||(p={name:f},i.push(p)),h&&ve(p,h)}),i},r})(),dt=new Ka,$a=(function(r){M(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,a,n){var i=L.getGeoResource(t.map);if(i&&i.type==="geoJSON"){var o=t.itemStyle=t.itemStyle||{};"color"in o||(o.color="#eee")}this.mergeDefaultAndTheme(t,n),Yt(t,"label",["show"])},e.prototype.optionUpdated=function(){var t=this,a=this.option;a.regions=dt.getFilledRegions(a.regions,a.map,a.nameMap,a.nameProperty);var n={};this._optionModelMap=it(a.regions||[],function(i,o){var s=o.name;return s&&(i.set(s,new Ee(o,t,t.ecModel)),o.selected&&(n[s]=!0)),i},m()),a.selectedMap||(a.selectedMap=n)},e.prototype.getRegionModel=function(t){return this._optionModelMap.get(t)||new Ee(null,this,this.ecModel)},e.prototype.getFormattedLabel=function(t,a){var n=this.getRegionModel(t),i=a==="normal"?n.get(["label","formatter"]):n.get(["emphasis","label","formatter"]),o={name:t};if(Ut(i))return o.status=a,i(o);if(Q(i))return i.replace("{a}",t??"")},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.select=function(t){var a=this.option,n=a.selectedMode;if(n){n!=="multiple"&&(a.selectedMap=null);var i=a.selectedMap||(a.selectedMap={});i[t]=!0}},e.prototype.unSelect=function(t){var a=this.option.selectedMap;a&&(a[t]=!1)},e.prototype.toggleSelected=function(t){this[this.isSelected(t)?"unSelect":"select"](t)},e.prototype.isSelected=function(t){var a=this.option.selectedMap;return!!(a&&a[t])},e.type="geo",e.layoutMode="box",e.defaultOption={z:0,show:!0,left:"center",top:"center",aspectScale:null,silent:!1,map:"",boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},regions:[]},e})(de),_e=["rect","circle","line","ellipse","polygon","polyline","path"],Qa=m(_e),er=m(_e.concat(["g"])),tr=m(_e.concat(["g"])),gt=ge();function N(r){var e=r.getItemStyle(),t=r.get("areaColor");return t!=null&&(e.fill=t),e}function Ve(r){var e=r.style;e&&(e.stroke=e.stroke||e.fill,e.fill=null)}var ar=(function(){function r(e){var t=new C;this.uid=Ht("ec_map_draw"),this._controller=new ba(e.getZr()),this._controllerHost={target:t},this.group=t,t.add(this._regionsGroup=new C),t.add(this._svgGroup=new C)}return r.prototype.draw=function(e,t,a,n,i){var o=e.mainType==="geo",s=e.getData&&e.getData();o&&t.eachComponent({mainType:"series",subType:"map"},function(S){!s&&S.getHostGeoModel()===e&&(s=S.getData())});var l=e.coordinateSystem,u=this._regionsGroup,f=this.group,p=l.getTransformInfo(),h=p.raw,c=p.roam,v=!u.childAt(0)||i;v?(f.x=c.x,f.y=c.y,f.scaleX=c.scaleX,f.scaleY=c.scaleY,f.dirty()):Xt(f,c,e);var g=s&&s.getVisual("visualMeta")&&s.getVisual("visualMeta").length>0,y={api:a,geo:l,mapOrGeoModel:e,data:s,isVisualEncodedByVisualMap:g,isGeo:o,transformInfoRaw:h};l.resourceType==="geoJSON"?this._buildGeoJSON(y):l.resourceType==="geoSVG"&&this._buildSVG(y),this._updateController(e,t,a),this._updateMapSelectHandler(e,u,a,n)},r.prototype._buildGeoJSON=function(e){var t=this._regionsGroupByName=m(),a=m(),n=this._regionsGroup,i=e.transformInfoRaw,o=e.mapOrGeoModel,s=e.data,l=e.geo.projection,u=l&&l.stream;function f(c,v){return v&&(c=v(c)),c&&[c[0]*i.scaleX+i.x,c[1]*i.scaleY+i.y]}function p(c){for(var v=[],g=!u&&l&&l.project,y=0;y<c.length;++y){var S=f(c[y],g);S&&v.push(S)}return v}function h(c){return{shape:{points:p(c)}}}n.removeAll(),x(e.geo.regions,function(c){var v=c.name,g=t.get(v),y=a.get(v)||{},S=y.dataIdx,w=y.regionModel;if(!g){g=t.set(v,new C),n.add(g),S=s?s.indexOfName(v):null,w=e.isGeo?o.getRegionModel(v):s?s.getItemModel(S):null;var G=w.get("silent",!0);G!=null&&(g.silent=G),a.set(v,{dataIdx:S,regionModel:w})}var _=[],Y=[];x(c.geometries,function(P){if(P.type==="polygon"){var R=[P.exterior].concat(P.interiors||[]);u&&(R=He(R,u)),x(R,function(H){_.push(new $e(h(H)))})}else{var E=P.points;u&&(E=He(E,u,!0)),x(E,function(H){Y.push(new Ke(h(H)))})}});var I=f(c.getCenter(),l&&l.project);function U(P,R){if(P.length){var E=new Jt({culling:!0,segmentIgnoreThreshold:1,shape:{paths:P}});g.add(E),Be(e,E,S,w),Oe(e,E,v,w,o,S,I),R&&(Ve(E),x(E.states,Ve))}}U(_),U(Y,!0)}),t.each(function(c,v){var g=a.get(v),y=g.dataIdx,S=g.regionModel;ze(e,c,v,S,o,y),Ye(e,c,v,S,o),Ue(e,c,v,S,o)},this)},r.prototype._buildSVG=function(e){var t=e.geo.map,a=e.transformInfoRaw;this._svgGroup.x=a.x,this._svgGroup.y=a.y,this._svgGroup.scaleX=a.scaleX,this._svgGroup.scaleY=a.scaleY,this._svgResourceChanged(t)&&(this._freeSVG(),this._useSVG(t));var n=this._svgDispatcherMap=m(),i=!1;x(this._svgGraphicRecord.named,function(o){var s=o.name,l=e.mapOrGeoModel,u=e.data,f=o.svgNodeTagLower,p=o.el,h=u?u.indexOfName(s):null,c=l.getRegionModel(s);Qa.get(f)!=null&&p instanceof ue&&Be(e,p,h,c),p instanceof ue&&(p.culling=!0);var v=c.get("silent",!0);if(v!=null&&(p.silent=v),p.z2EmphasisLift=0,!o.namedFrom&&(tr.get(f)!=null&&Oe(e,p,s,c,l,h,null),ze(e,p,s,c,l,h),Ye(e,p,s,c,l),er.get(f)!=null)){var g=Ue(e,p,s,c,l);g==="self"&&(i=!0);var y=n.get(s)||n.set(s,[]);y.push(p)}},this),this._enableBlurEntireSVG(i,e)},r.prototype._enableBlurEntireSVG=function(e,t){if(e&&t.isGeo){var a=t.mapOrGeoModel.getModel(["blur","itemStyle"]).getItemStyle(),n=a.opacity;this._svgGraphicRecord.root.traverse(function(i){if(!i.isGroup){ot(i);var o=i.ensureState("blur").style||{};o.opacity==null&&n!=null&&(o.opacity=n),i.ensureState("emphasis")}})}},r.prototype.remove=function(){this._regionsGroup.removeAll(),this._regionsGroupByName=null,this._svgGroup.removeAll(),this._freeSVG(),this._controller.dispose(),this._controllerHost=null},r.prototype.findHighDownDispatchers=function(e,t){if(e==null)return[];var a=t.coordinateSystem;if(a.resourceType==="geoJSON"){var n=this._regionsGroupByName;if(n){var i=n.get(e);return i?[i]:[]}}else if(a.resourceType==="geoSVG")return this._svgDispatcherMap&&this._svgDispatcherMap.get(e)||[]},r.prototype._svgResourceChanged=function(e){return this._svgMapName!==e},r.prototype._useSVG=function(e){var t=L.getGeoResource(e);if(t&&t.type==="geoSVG"){var a=t.useGraphic(this.uid);this._svgGroup.add(a.root),this._svgGraphicRecord=a,this._svgMapName=e}},r.prototype._freeSVG=function(){var e=this._svgMapName;if(e!=null){var t=L.getGeoResource(e);t&&t.type==="geoSVG"&&t.freeGraphic(this.uid),this._svgGraphicRecord=null,this._svgDispatcherMap=null,this._svgGroup.removeAll(),this._svgMapName=null}},r.prototype._updateController=function(e,t,a){var n=e.coordinateSystem,i=this._controller,o=this._controllerHost;o.zoomLimit=e.get("scaleLimit"),o.zoom=n.getZoom(),i.enable(e.get("roam")||!1);var s=e.mainType;function l(){var u={type:"geoRoam",componentType:s};return u[s+"Id"]=e.id,u}i.off("pan").on("pan",function(u){this._mouseDownFlag=!1,Aa(o,u.dx,u.dy),a.dispatchAction(F(l(),{dx:u.dx,dy:u.dy,animation:{duration:0}}))},this),i.off("zoom").on("zoom",function(u){this._mouseDownFlag=!1,Ea(o,u.scale,u.originX,u.originY),a.dispatchAction(F(l(),{totalZoom:o.zoom,zoom:u.scale,originX:u.originX,originY:u.originY,animation:{duration:0}}))},this),i.setPointerChecker(function(u,f,p){return n.containPoint([f,p])&&!jt(u,a,e)})},r.prototype.resetForLabelLayout=function(){this.group.traverse(function(e){var t=e.getTextContent();t&&(t.ignore=gt(t).ignore)})},r.prototype._updateMapSelectHandler=function(e,t,a,n){var i=this;t.off("mousedown"),t.off("click"),e.get("selectedMode")&&(t.on("mousedown",function(){i._mouseDownFlag=!0}),t.on("click",function(o){i._mouseDownFlag&&(i._mouseDownFlag=!1)}))},r})();function Be(r,e,t,a){var n=a.getModel("itemStyle"),i=a.getModel(["emphasis","itemStyle"]),o=a.getModel(["blur","itemStyle"]),s=a.getModel(["select","itemStyle"]),l=N(n),u=N(i),f=N(s),p=N(o),h=r.data;if(h){var c=h.getItemVisual(t,"style"),v=h.getItemVisual(t,"decal");r.isVisualEncodedByVisualMap&&c.fill&&(l.fill=c.fill),v&&(l.decal=It(v,r.api))}e.setStyle(l),e.style.strokeNoScale=!0,e.ensureState("emphasis").style=u,e.ensureState("select").style=f,e.ensureState("blur").style=p,ot(e)}function Oe(r,e,t,a,n,i,o){var s=r.data,l=r.isGeo,u=s&&isNaN(s.get(s.mapDimension("value"),i)),f=s&&s.getItemLayout(i);if(l||u||f&&f.showLabel){var p=l?t:i,h=void 0;(!s||i>=0)&&(h=n);var c=o?{normal:{align:"center",verticalAlign:"middle"}}:null;Nt(e,Zt(a),{labelFetcher:h,labelDataIndex:p,defaultText:t},c);var v=e.getTextContent();if(v&&(gt(v).ignore=v.ignore,e.textConfig&&o)){var g=e.getBoundingRect().clone();e.textConfig.layoutRect=g,e.textConfig.position=[(o[0]-g.x)/g.width*100+"%",(o[1]-g.y)/g.height*100+"%"]}e.disableLabelAnimation=!0}else e.removeTextContent(),e.removeTextConfig(),e.disableLabelAnimation=null}function ze(r,e,t,a,n,i){r.data?r.data.setItemGraphicEl(i,e):fe(e).eventData={componentType:"geo",componentIndex:n.componentIndex,geoIndex:n.componentIndex,name:t,region:a&&a.option||{}}}function Ye(r,e,t,a,n){r.data||qt({el:e,componentModel:n,itemName:t,itemTooltipOption:a.get("tooltip")})}function Ue(r,e,t,a,n){e.highDownSilentOnTouch=!!n.get("selectedMode");var i=a.getModel("emphasis"),o=i.get("focus");return Kt(e,o,i.get("blurScope"),i.get("disabled")),r.isGeo&&$t(e,n,t),o}function He(r,e,t){var a=[],n;function i(){n=[]}function o(){n.length&&(a.push(n),n=[])}var s=e({polygonStart:i,polygonEnd:o,lineStart:i,lineEnd:o,point:function(l,u){isFinite(l)&&isFinite(u)&&n.push([l,u])},sphere:function(){}});return!t&&s.polygonStart(),x(r,function(l){s.lineStart();for(var u=0;u<l.length;u++)s.point(l[u][0],l[u][1]);s.lineEnd()}),!t&&s.polygonEnd(),a}var rr=(function(r){M(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.focusBlurEnabled=!0,t}return e.prototype.init=function(t,a){this._api=a},e.prototype.render=function(t,a,n,i){if(this._model=t,!t.get("show")){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;return}this._mapDraw||(this._mapDraw=new ar(n));var o=this._mapDraw;o.draw(t,a,n,this,i),o.group.on("click",this._handleRegionClick,this),o.group.silent=t.get("silent"),this.group.add(o.group),this.updateSelectStatus(t,a,n)},e.prototype._handleRegionClick=function(t){var a;Qt(t.target,function(n){return(a=fe(n).eventData)!=null},!0),a&&this._api.dispatchAction({type:"geoToggleSelect",geoId:this._model.id,name:a.name})},e.prototype.updateSelectStatus=function(t,a,n){var i=this;this._mapDraw.group.traverse(function(o){var s=fe(o).eventData;if(s)return i._model.isSelected(s.name)?n.enterSelect(o):n.leaveSelect(o),!0})},e.prototype.findHighDownDispatchers=function(t){return this._mapDraw&&this._mapDraw.findHighDownDispatchers(t,this._model)},e.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove()},e.type="geo",e})(ye);function nr(r,e,t){L.registerMap(r,e,t)}function Ur(r){r.registerCoordinateSystem("geo",dt),r.registerComponentModel($a),r.registerComponentView(rr),r.registerImpl("registerMap",nr),r.registerImpl("getMap",function(t){return L.getMapForUser(t)});function e(t,a){a.update="geo:updateSelectStatus",r.registerAction(a,function(n,i){var o={},s=[];return i.eachComponent({mainType:"geo",query:n},function(l){l[t](n.name);var u=l.coordinateSystem;x(u.regions,function(p){o[p.name]=l.isSelected(p.name)||!1});var f=[];x(o,function(p,h){o[h]&&f.push(h)}),s.push({geoIndex:l.componentIndex,name:f})}),{selected:o,allSelected:s,name:n.name}})}e("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),e("select",{type:"geoSelect",event:"geoselected"}),e("unSelect",{type:"geoUnSelect",event:"geounselected"}),r.registerAction({type:"geoRoam",event:"geoRoam",update:"updateTransform"},function(t,a,n){var i=t.componentType||"series";a.eachComponent({mainType:i,query:t},function(o){var s=o.coordinateSystem;if(s.type==="geo"){var l=Ca(s,t,o.get("scaleLimit"),n);o.setCenter&&o.setCenter(l.center),o.setZoom&&o.setZoom(l.zoom),i==="series"&&x(o.seriesGroup,function(u){u.setCenter(l.center),u.setZoom(l.zoom)})}})})}function ir(r){or(r),sr(r)}function or(r){if(!r.parallel){var e=!1;x(r.series,function(t){t&&t.type==="parallel"&&(e=!0)}),e&&(r.parallel=[{}])}}function sr(r){var e=J(r.parallelAxis);x(e,function(t){if(ea(t)){var a=t.parallelIndex||0,n=J(r.parallel)[a];n&&n.parallelAxisDefault&&ve(t,n.parallelAxisDefault,!1)}})}var lr=5,ur=(function(r){M(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){this._model=t,this._api=n,this._handlers||(this._handlers={},x(fr,function(i,o){n.getZr().on(o,this._handlers[o]=xe(i,this))},this)),ta(this,"_throttledDispatchExpand",t.get("axisExpandRate"),"fixRate")},e.prototype.dispose=function(t,a){aa(this,"_throttledDispatchExpand"),x(this._handlers,function(n,i){a.getZr().off(i,n)}),this._handlers=null},e.prototype._throttledDispatchExpand=function(t){this._dispatchExpand(t)},e.prototype._dispatchExpand=function(t){t&&this._api.dispatchAction(F({type:"parallelAxisExpand"},t))},e.type="parallel",e})(ye),fr={mousedown:function(r){oe(this,"click")&&(this._mouseDownPoint=[r.offsetX,r.offsetY])},mouseup:function(r){var e=this._mouseDownPoint;if(oe(this,"click")&&e){var t=[r.offsetX,r.offsetY],a=Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2);if(a>lr)return;var n=this._model.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]);n.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:n.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(r){if(!(this._mouseDownPoint||!oe(this,"mousemove"))){var e=this._model,t=e.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]),a=t.behavior;a==="jump"&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand(a==="none"?null:{axisExpandWindow:t.axisExpandWindow,animation:a==="jump"?null:{duration:0}})}}};function oe(r,e){var t=r._model;return t.get("axisExpandable")&&t.get("axisExpandTriggerOn")===e}var pr=(function(r){M(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){r.prototype.init.apply(this,arguments),this.mergeOption({})},e.prototype.mergeOption=function(t){var a=this.option;t&&ve(a,t,!0),this._initDimensions()},e.prototype.contains=function(t,a){var n=t.get("parallelIndex");return n!=null&&a.getComponent("parallel",n)===this},e.prototype.setAxisExpand=function(t){x(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(a){t.hasOwnProperty(a)&&(this.option[a]=t[a])},this)},e.prototype._initDimensions=function(){var t=this.dimensions=[],a=this.parallelAxisIndex=[],n=st(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(i){return(i.get("parallelIndex")||0)===this.componentIndex},this);x(n,function(i){t.push("dim"+i.get("dim")),a.push(i.componentIndex)})},e.type="parallel",e.dependencies=["parallelAxis"],e.layoutMode="box",e.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},e})(de),cr=(function(r){M(e,r);function e(t,a,n,i,o){var s=r.call(this,t,a,n)||this;return s.type=i||"value",s.axisIndex=o,s}return e.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},e})(ra),se=x,yt=Math.min,xt=Math.max,Xe=Math.floor,hr=Math.ceil,Je=la,vr=Math.PI,dr=(function(){function r(e,t,a){this.type="parallel",this._axesMap=m(),this._axesLayout={},this.dimensions=e.dimensions,this._model=e,this._init(e,t,a)}return r.prototype._init=function(e,t,a){var n=e.dimensions,i=e.parallelAxisIndex;se(n,function(o,s){var l=i[s],u=t.getComponent("parallelAxis",l),f=this._axesMap.set(o,new cr(o,na(u),[0,0],u.get("type"),l)),p=f.type==="category";f.onBand=p&&u.get("boundaryGap"),f.inverse=u.get("inverse"),u.axis=f,f.model=u,f.coordinateSystem=u.coordinateSystem=this},this)},r.prototype.update=function(e,t){this._updateAxesFromSeries(this._model,e)},r.prototype.containPoint=function(e){var t=this._makeLayoutInfo(),a=t.axisBase,n=t.layoutBase,i=t.pixelDimIndex,o=e[1-i],s=e[i];return o>=a&&o<=a+t.axisLength&&s>=n&&s<=n+t.layoutLength},r.prototype.getModel=function(){return this._model},r.prototype._updateAxesFromSeries=function(e,t){t.eachSeries(function(a){if(e.contains(a,t)){var n=a.getData();se(this.dimensions,function(i){var o=this._axesMap.get(i);o.scale.unionExtentFromData(n,n.mapDimension(i)),ia(o.scale,o.model)},this)}},this)},r.prototype.resize=function(e,t){this._rect=nt(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),this._layoutAxes()},r.prototype.getRect=function(){return this._rect},r.prototype._makeLayoutInfo=function(){var e=this._model,t=this._rect,a=["x","y"],n=["width","height"],i=e.get("layout"),o=i==="horizontal"?0:1,s=t[n[o]],l=[0,s],u=this.dimensions.length,f=Z(e.get("axisExpandWidth"),l),p=Z(e.get("axisExpandCount")||0,[0,u]),h=e.get("axisExpandable")&&u>3&&u>p&&p>1&&f>0&&s>0,c=e.get("axisExpandWindow"),v;if(c)v=Z(c[1]-c[0],l),c[1]=c[0]+v;else{v=Z(f*(p-1),l);var g=e.get("axisExpandCenter")||Xe(u/2);c=[f*g-v/2],c[1]=c[0]+v}var y=(s-v)/(u-p);y<3&&(y=0);var S=[Xe(Je(c[0]/f,1))+1,hr(Je(c[1]/f,1))-1],w=y/f*c[0];return{layout:i,pixelDimIndex:o,layoutBase:t[a[o]],layoutLength:s,axisBase:t[a[1-o]],axisLength:t[n[1-o]],axisExpandable:h,axisExpandWidth:f,axisCollapseWidth:y,axisExpandWindow:c,axisCount:u,winInnerIndices:S,axisExpandWindow0Pos:w}},r.prototype._layoutAxes=function(){var e=this._rect,t=this._axesMap,a=this.dimensions,n=this._makeLayoutInfo(),i=n.layout;t.each(function(o){var s=[0,n.axisLength],l=o.inverse?1:0;o.setExtent(s[l],s[1-l])}),se(a,function(o,s){var l=(n.axisExpandable?yr:gr)(s,n),u={horizontal:{x:l.position,y:n.axisLength},vertical:{x:0,y:l.position}},f={horizontal:vr/2,vertical:0},p=[u[i].x+e.x,u[i].y+e.y],h=f[i],c=tt();Qe(c,c,h),et(c,c,p),this._axesLayout[o]={position:p,rotation:h,transform:c,axisNameAvailableWidth:l.axisNameAvailableWidth,axisLabelShow:l.axisLabelShow,nameTruncateMaxWidth:l.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},r.prototype.getAxis=function(e){return this._axesMap.get(e)},r.prototype.dataToPoint=function(e,t){return this.axisCoordToPoint(this._axesMap.get(t).dataToCoord(e),t)},r.prototype.eachActiveState=function(e,t,a,n){a==null&&(a=0),n==null&&(n=e.count());var i=this._axesMap,o=this.dimensions,s=[],l=[];x(o,function(y){s.push(e.mapDimension(y)),l.push(i.get(y).model)});for(var u=this.hasAxisBrushed(),f=a;f<n;f++){var p=void 0;if(!u)p="normal";else{p="active";for(var h=e.getValues(s,f),c=0,v=o.length;c<v;c++){var g=l[c].getActiveState(h[c]);if(g==="inactive"){p="inactive";break}}}t(p,f)}},r.prototype.hasAxisBrushed=function(){for(var e=this.dimensions,t=this._axesMap,a=!1,n=0,i=e.length;n<i;n++)t.get(e[n]).model.getActiveState()!=="normal"&&(a=!0);return a},r.prototype.axisCoordToPoint=function(e,t){var a=this._axesLayout[t];return oa([e,0],a.transform)},r.prototype.getAxisLayout=function(e){return lt(this._axesLayout[e])},r.prototype.getSlidedAxisExpandWindow=function(e){var t=this._makeLayoutInfo(),a=t.pixelDimIndex,n=t.axisExpandWindow.slice(),i=n[1]-n[0],o=[0,t.axisExpandWidth*(t.axisCount-1)];if(!this.containPoint(e))return{behavior:"none",axisExpandWindow:n};var s=e[a]-t.layoutBase-t.axisExpandWindow0Pos,l,u="slide",f=t.axisCollapseWidth,p=this._model.get("axisExpandSlideTriggerArea"),h=p[0]!=null;if(f)h&&f&&s<i*p[0]?(u="jump",l=s-i*p[2]):h&&f&&s>i*(1-p[0])?(u="jump",l=s-i*(1-p[2])):(l=s-i*p[1])>=0&&(l=s-i*(1-p[1]))<=0&&(l=0),l*=t.axisExpandWidth/f,l?sa(l,n,o,"all"):u="none";else{var c=n[1]-n[0],v=o[1]*s/c;n=[xt(0,v-c/2)],n[1]=yt(o[1],n[0]+c),n[0]=n[1]-c}return{axisExpandWindow:n,behavior:u}},r})();function Z(r,e){return yt(xt(r,e[0]),e[1])}function gr(r,e){var t=e.layoutLength/(e.axisCount-1);return{position:t*r,axisNameAvailableWidth:t,axisLabelShow:!0}}function yr(r,e){var t=e.layoutLength,a=e.axisExpandWidth,n=e.axisCount,i=e.axisCollapseWidth,o=e.winInnerIndices,s,l=i,u=!1,f;return r<o[0]?(s=r*i,f=i):r<=o[1]?(s=e.axisExpandWindow0Pos+r*a-e.axisExpandWindow[0],l=a,u=!0):(s=t-(n-1-r)*i,f=i),{position:s,axisNameAvailableWidth:l,axisLabelShow:u,nameTruncateMaxWidth:f}}function xr(r,e){var t=[];return r.eachComponent("parallel",function(a,n){var i=new dr(a,r,e);i.name="parallel_"+n,i.resize(a,e),a.coordinateSystem=i,i.model=a,t.push(i)}),r.eachSeries(function(a){if(a.get("coordinateSystem")==="parallel"){var n=a.getReferringComponents("parallel",rt).models[0];a.coordinateSystem=n.coordinateSystem}}),t}var Sr={create:xr},he=(function(r){M(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.activeIntervals=[],t}return e.prototype.getAreaSelectStyle=function(){return ua([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},e.prototype.setActiveIntervals=function(t){var a=this.activeIntervals=lt(t);if(a)for(var n=a.length-1;n>=0;n--)fa(a[n])},e.prototype.getActiveState=function(t){var a=this.activeIntervals;if(!a.length)return"normal";if(t==null||isNaN(+t))return"inactive";if(a.length===1){var n=a[0];if(n[0]<=t&&t<=n[1])return"active"}else for(var i=0,o=a.length;i<o;i++)if(a[i][0]<=t&&t<=a[i][1])return"active";return"inactive"},e})(de);at(he,pa);var _r=["axisLine","axisTickLabel","axisName"],mr=(function(r){M(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,a){r.prototype.init.apply(this,arguments),(this._brushController=new ca(a.getZr())).on("brush",xe(this._onBrush,this))},e.prototype.render=function(t,a,n,i){if(!wr(t,a,i)){this.axisModel=t,this.api=n,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new C,this.group.add(this._axisGroup),!!t.get("show")){var s=Ar(t,a),l=s.coordinateSystem,u=t.getAreaSelectStyle(),f=u.width,p=t.axis.dim,h=l.getAxisLayout(p),c=F({strokeContainThreshold:f},h),v=new ha(t,c);x(_r,v.add,v),this._axisGroup.add(v.getGroup()),this._refreshBrushController(c,u,t,s,f,n),va(o,this._axisGroup,t)}}},e.prototype._refreshBrushController=function(t,a,n,i,o,s){var l=n.axis.getExtent(),u=l[1]-l[0],f=Math.min(30,Math.abs(u)*.1),p=ee.create({x:l[0],y:-o/2,width:u,height:o});p.x-=f,p.width+=2*f,this._brushController.mount({enableGlobalPan:!0,rotation:t.rotation,x:t.position[0],y:t.position[1]}).setPanels([{panelId:"pl",clipPath:ya(p),isTargetByCursor:ga(p,s,i),getLinearBrushOtherExtent:da(p,0)}]).enableBrush({brushType:"lineX",brushStyle:a,removeOnClick:!0}).updateCovers(br(n))},e.prototype._onBrush=function(t){var a=t.areas,n=this.axisModel,i=n.axis,o=O(a,function(s){return[i.coordToData(s.range[0],!0),i.coordToData(s.range[1],!0)]});(!n.option.realtime===t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:n.id,intervals:o})},e.prototype.dispose=function(){this._brushController.dispose()},e.type="parallelAxis",e})(ye);function wr(r,e,t){return t&&t.type==="axisAreaSelect"&&e.findComponents({mainType:"parallelAxis",query:t})[0]===r}function br(r){var e=r.axis;return O(r.activeIntervals,function(t){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(t[0],!0),e.dataToCoord(t[1],!0)]}})}function Ar(r,e){return e.getComponent("parallel",r.get("parallelIndex"))}var Er={type:"axisAreaSelect",event:"axisAreaSelected"};function Cr(r){r.registerAction(Er,function(e,t){t.eachComponent({mainType:"parallelAxis",query:e},function(a){a.axis.model.setActiveIntervals(e.intervals)})}),r.registerAction("parallelAxisExpand",function(e,t){t.eachComponent({mainType:"parallel",query:e},function(a){a.setAxisExpand(e)})})}var Tr={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function Hr(r){r.registerComponentView(ur),r.registerComponentModel(pr),r.registerCoordinateSystem("parallel",Sr),r.registerPreprocessor(ir),r.registerComponentModel(he),r.registerComponentView(mr),xa(r,"parallel",he,Tr),Cr(r)}function Xr(r,e,t,a){return r&&(r.legacy||r.legacy!==!1&&!t&&!a&&e!=="tspan"&&(e==="text"||d(r,"text")))}function Jr(r,e,t){var a=r,n,i,o;if(e==="text")o=a;else{o={},d(a,"text")&&(o.text=a.text),d(a,"rich")&&(o.rich=a.rich),d(a,"textFill")&&(o.fill=a.textFill),d(a,"textStroke")&&(o.stroke=a.textStroke),d(a,"fontFamily")&&(o.fontFamily=a.fontFamily),d(a,"fontSize")&&(o.fontSize=a.fontSize),d(a,"fontStyle")&&(o.fontStyle=a.fontStyle),d(a,"fontWeight")&&(o.fontWeight=a.fontWeight),i={type:"text",style:o,silent:!0},n={};var s=d(a,"textPosition");t?n.position=s?a.textPosition:"inside":s&&(n.position=a.textPosition),d(a,"textPosition")&&(n.position=a.textPosition),d(a,"textOffset")&&(n.offset=a.textOffset),d(a,"textRotation")&&(n.rotation=a.textRotation),d(a,"textDistance")&&(n.distance=a.textDistance)}return je(o,r),x(o.rich,function(l){je(l,l)}),{textConfig:n,textContent:i}}function je(r,e){e&&(e.font=e.textFont||e.font,d(e,"textStrokeWidth")&&(r.lineWidth=e.textStrokeWidth),d(e,"textAlign")&&(r.align=e.textAlign),d(e,"textVerticalAlign")&&(r.verticalAlign=e.textVerticalAlign),d(e,"textLineHeight")&&(r.lineHeight=e.textLineHeight),d(e,"textWidth")&&(r.width=e.textWidth),d(e,"textHeight")&&(r.height=e.textHeight),d(e,"textBackgroundColor")&&(r.backgroundColor=e.textBackgroundColor),d(e,"textPadding")&&(r.padding=e.textPadding),d(e,"textBorderColor")&&(r.borderColor=e.textBorderColor),d(e,"textBorderWidth")&&(r.borderWidth=e.textBorderWidth),d(e,"textBorderRadius")&&(r.borderRadius=e.textBorderRadius),d(e,"textBoxShadowColor")&&(r.shadowColor=e.textBoxShadowColor),d(e,"textBoxShadowBlur")&&(r.shadowBlur=e.textBoxShadowBlur),d(e,"textBoxShadowOffsetX")&&(r.shadowOffsetX=e.textBoxShadowOffsetX),d(e,"textBoxShadowOffsetY")&&(r.shadowOffsetY=e.textBoxShadowOffsetY))}function jr(r,e,t){var a=r;a.textPosition=a.textPosition||t.position||"inside",t.offset!=null&&(a.textOffset=t.offset),t.rotation!=null&&(a.textRotation=t.rotation),t.distance!=null&&(a.textDistance=t.distance);var n=a.textPosition.indexOf("inside")>=0,i=r.fill||"#000";Ie(a,e);var o=a.textFill==null;return n?o&&(a.textFill=t.insideFill||"#fff",!a.textStroke&&t.insideStroke&&(a.textStroke=t.insideStroke),!a.textStroke&&(a.textStroke=i),a.textStrokeWidth==null&&(a.textStrokeWidth=2)):(o&&(a.textFill=r.fill||t.outsideFill||"#000"),!a.textStroke&&t.outsideStroke&&(a.textStroke=t.outsideStroke)),a.text=e.text,a.rich=e.rich,x(e.rich,function(s){Ie(s,s)}),a}function Ie(r,e){e&&(d(e,"fill")&&(r.textFill=e.fill),d(e,"stroke")&&(r.textStroke=e.fill),d(e,"lineWidth")&&(r.textStrokeWidth=e.lineWidth),d(e,"font")&&(r.font=e.font),d(e,"fontStyle")&&(r.fontStyle=e.fontStyle),d(e,"fontWeight")&&(r.fontWeight=e.fontWeight),d(e,"fontSize")&&(r.fontSize=e.fontSize),d(e,"fontFamily")&&(r.fontFamily=e.fontFamily),d(e,"align")&&(r.textAlign=e.align),d(e,"verticalAlign")&&(r.textVerticalAlign=e.verticalAlign),d(e,"lineHeight")&&(r.textLineHeight=e.lineHeight),d(e,"width")&&(r.textWidth=e.width),d(e,"height")&&(r.textHeight=e.height),d(e,"backgroundColor")&&(r.textBackgroundColor=e.backgroundColor),d(e,"padding")&&(r.textPadding=e.padding),d(e,"borderColor")&&(r.textBorderColor=e.borderColor),d(e,"borderWidth")&&(r.textBorderWidth=e.borderWidth),d(e,"borderRadius")&&(r.textBorderRadius=e.borderRadius),d(e,"shadowColor")&&(r.textBoxShadowColor=e.shadowColor),d(e,"shadowBlur")&&(r.textBoxShadowBlur=e.shadowBlur),d(e,"shadowOffsetX")&&(r.textBoxShadowOffsetX=e.shadowOffsetX),d(e,"shadowOffsetY")&&(r.textBoxShadowOffsetY=e.shadowOffsetY),d(e,"textShadowColor")&&(r.textShadowColor=e.textShadowColor),d(e,"textShadowBlur")&&(r.textShadowBlur=e.textShadowBlur),d(e,"textShadowOffsetX")&&(r.textShadowOffsetX=e.textShadowOffsetX),d(e,"textShadowOffsetY")&&(r.textShadowOffsetY=e.textShadowOffsetY))}var St={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},Ne=W(St);it(j,function(r,e){return r[e]=1,r},{});j.join(", ");var $=["","style","shape","extra"],z=ge();function me(r,e,t,a,n){var i=r+"Animation",o=ut(r,a,n)||{},s=z(e).userDuring;return o.duration>0&&(o.during=s?xe(Rr,{el:e,userDuring:s}):null,o.setToFinal=!0,o.scope=r),F(o,t[i]),o}function Ir(r,e,t,a){a=a||{};var n=a.dataIndex,i=a.isInit,o=a.clearStyle,s=t.isAnimationEnabled(),l=z(r),u=e.style;l.userDuring=e.during;var f={},p={};if(kr(r,e,p),qe("shape",e,p),qe("extra",e,p),!i&&s&&(Dr(r,e,f),Ze("shape",r,e,f),Ze("extra",r,e,f),Wr(r,e,u,f)),p.style=u,Gr(r,p,o),Lr(r,e),s)if(i){var h={};x($,function(v){var g=v?e[v]:e;g&&g.enterFrom&&(v&&(h[v]=h[v]||{}),F(v?h[v]:h,g.enterFrom))});var c=me("enter",r,e,t,n);c.duration>0&&r.animateFrom(h,c)}else Pr(r,e,n||0,t,f);Fr(r,e),u?r.dirty():r.markRedraw()}function Fr(r,e){for(var t=z(r).leaveToProps,a=0;a<$.length;a++){var n=$[a],i=n?e[n]:e;i&&i.leaveTo&&(t||(t=z(r).leaveToProps={}),n&&(t[n]=t[n]||{}),F(n?t[n]:t,i.leaveTo))}}function Nr(r,e,t,a){if(r){var n=r.parent,i=z(r).leaveToProps;if(i){var o=me("update",r,e,t,0);o.done=function(){n.remove(r)},r.animateTo(i,o)}else n.remove(r)}}function B(r){return r==="all"}function Gr(r,e,t){var a=e.style;if(!r.isGroup&&a){if(t){r.useStyle({});for(var n=r.animators,i=0;i<n.length;i++){var o=n[i];o.targetName==="style"&&o.changeTarget(r.style)}}r.setStyle(a)}e&&(e.style=null,e&&r.attr(e),e.style=a)}function Pr(r,e,t,a,n){if(n){var i=me("update",r,e,a,t);i.duration>0&&r.animateFrom(n,i)}}function Lr(r,e){d(e,"silent")&&(r.silent=e.silent),d(e,"ignore")&&(r.ignore=e.ignore),r instanceof ue&&d(e,"invisible")&&(r.invisible=e.invisible),r instanceof _a&&d(e,"autoBatch")&&(r.autoBatch=e.autoBatch)}var T={},Mr={setTransform:function(r,e){return T.el[r]=e,this},getTransform:function(r){return T.el[r]},setShape:function(r,e){var t=T.el,a=t.shape||(t.shape={});return a[r]=e,t.dirtyShape&&t.dirtyShape(),this},getShape:function(r){var e=T.el.shape;if(e)return e[r]},setStyle:function(r,e){var t=T.el,a=t.style;return a&&(a[r]=e,t.dirtyStyle&&t.dirtyStyle()),this},getStyle:function(r){var e=T.el.style;if(e)return e[r]},setExtra:function(r,e){var t=T.el.extra||(T.el.extra={});return t[r]=e,this},getExtra:function(r){var e=T.el.extra;if(e)return e[r]}};function Rr(){var r=this,e=r.el;if(e){var t=z(e).userDuring,a=r.userDuring;if(t!==a){r.el=r.userDuring=null;return}T.el=e,a(Mr)}}function Ze(r,e,t,a){var n=t[r];if(n){var i=e[r],o;if(i){var s=t.transition,l=n.transition;if(l)if(!o&&(o=a[r]={}),B(l))F(o,i);else for(var u=J(l),f=0;f<u.length;f++){var p=u[f],h=i[p];o[p]=h}else if(B(s)||Se(s,r)>=0){!o&&(o=a[r]={});for(var c=W(i),f=0;f<c.length;f++){var p=c[f],h=i[p];Vr(n[p],h)&&(o[p]=h)}}}}}function qe(r,e,t){var a=e[r];if(a)for(var n=t[r]={},i=W(a),o=0;o<i.length;o++){var s=i[o];n[s]=Sa(a[s])}}function Dr(r,e,t){for(var a=e.transition,n=B(a)?j:J(a||[]),i=0;i<n.length;i++){var o=n[i];if(!(o==="style"||o==="shape"||o==="extra")){var s=r[o];t[o]=s}}}function kr(r,e,t){for(var a=0;a<Ne.length;a++){var n=Ne[a],i=St[n],o=e[n];o&&(t[i[0]]=o[0],t[i[1]]=o[1])}for(var a=0;a<j.length;a++){var s=j[a];e[s]!=null&&(t[s]=e[s])}}function Wr(r,e,t,a){if(t){var n=r.style,i;if(n){var o=t.transition,s=e.transition;if(o&&!B(o)){var l=J(o);!i&&(i=a.style={});for(var u=0;u<l.length;u++){var f=l[u],p=n[f];i[f]=p}}else if(r.getAnimationStyleProps&&(B(s)||B(o)||Se(s,"style")>=0)){var h=r.getAnimationStyleProps(),c=h?h.style:null;if(c){!i&&(i=a.style={});for(var v=W(t),u=0;u<v.length;u++){var f=v[u];if(c[f]){var p=n[f];i[f]=p}}}}}}}function Vr(r,e){return ma(r)?r!==e:r!=null&&isFinite(r)}var _t=ge(),Br=["percent","easing","shape","style","extra"];function Zr(r){r.stopAnimation("keyframe"),r.attr(_t(r))}function Or(r,e,t){if(!(!t.isAnimationEnabled()||!e)){if(wa(e)){x(e,function(s){Or(r,s,t)});return}var a=e.keyframes,n=e.duration;if(t&&n==null){var i=ut("enter",t,0);n=i&&i.duration}if(!(!a||!n)){var o=_t(r);x($,function(s){if(!(s&&!r[s])){var l;a.sort(function(u,f){return u.percent-f.percent}),x(a,function(u){var f=r.animators,p=s?u[s]:u;if(p){var h=W(p);if(s||(h=st(h,function(g){return Se(Br,g)<0})),!!h.length){l||(l=r.animate(s,e.loop,!0),l.scope="keyframe");for(var c=0;c<f.length;c++)f[c]!==l&&f[c].targetName===l.targetName&&f[c].stopTracks(h);s&&(o[s]=o[s]||{});var v=s?o[s]:o;x(h,function(g){v[g]=((s?r[s]:r)||{})[g]}),l.whenWithKeys(n*u.percent,p,h,u.easing)}}}),l&&l.delay(e.delay||0).duration(n).start(e.easing)}})}}}export{ar as M,Hr as a,Nr as b,jr as c,Ir as d,Or as e,Xr as f,L as g,Jr as h,Ur as i,B as j,Zr as s,Fr as u};
@@ -0,0 +1 @@
1
+ import{j as o}from"./index-MB-jfQld.js";import{A as t}from"./auth-method-demo-DaOCuvsq.js";import e from"./wecom-sign-in-button-mIS1zGSU.js";import"./card-DuQBOS6A.js";import"./use-wecom-sign-in-C9j8wfCD.js";const i={name:"company-wecom",authType:"wecom",title:"Sign in via WeCom",options:{btnTooltip:"Use the account associated with your company directory."}};function c(){return o.jsx(t,{authType:"wecom",methodName:"WeCom",description:"Provide a WeCom sign-in button and support automatic login when the application is opened inside WeCom.",children:o.jsx(e,{authenticator:i,onSignIn:()=>{}})})}export{c as WecomAuthDemoPage};
@@ -0,0 +1 @@
1
+ import{j as t}from"./index-MB-jfQld.js";import{A as o}from"./auth-method-demo-DaOCuvsq.js";import e from"./ldap-sign-in-form--6Gt3yGq.js";import"./card-DuQBOS6A.js";import"./use-authenticator-sign-in-CRGjzXju.js";const r={name:"company-ldap",authType:"LDAP",title:"Company directory",options:{autoSignup:!0}};function s(){return t.jsx(o,{authType:"LDAP",methodName:"LDAP directory",description:"Use the familiar account and password form while sending credentials through the selected LDAP authenticator.",children:t.jsx(e,{authenticator:r,onSignIn:()=>{}})})}export{s as LdapAuthDemoPage};
@@ -0,0 +1 @@
1
+ import{j as t}from"./index-MB-jfQld.js";import{A as i}from"./auth-method-demo-DaOCuvsq.js";import n from"./dingtalk-sign-in-button-DSWsSruv.js";import"./card-DuQBOS6A.js";import"./use-dingtalk-sign-in-8WYzJ2jf.js";const o={name:"company-dingtalk",authType:"dingtalk",title:"Sign in via DingTalk"};function p(){return t.jsx(i,{authType:"dingtalk",methodName:"DingTalk",description:"Provide DingTalk OAuth login and support internal micro-app automatic login through DingTalk JSAPI.",children:t.jsx(n,{authenticator:o,onSignIn:()=>{}})})}export{p as DingtalkAuthDemoPage};
@@ -0,0 +1 @@
1
+ import{j as t}from"./index-MB-jfQld.js";import{A as e}from"./auth-method-demo-DaOCuvsq.js";import r from"./saml-sign-in-button-BHL5a0JV.js";import"./card-DuQBOS6A.js";const o={name:"company-saml",authType:"SAML",title:"Company SAML"};function h(){return t.jsx(e,{authType:"SAML",methodName:"SAML",description:"Start an identity-provider redirect and return through the Starter's shared authentication callback.",children:t.jsx(r,{authenticator:o,onSignIn:()=>{}})})}export{h as SamlAuthDemoPage};