@hprint/plugins 0.0.7 → 0.0.8
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.
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +3 -3
- package/src/assets/style/resizePlugin.css +27 -27
- package/src/objects/Arrow.js +47 -47
- package/src/objects/ThinTailArrow.js +50 -50
- package/src/plugins/ControlsPlugin.ts +413 -413
- package/src/plugins/ControlsRotatePlugin.ts +111 -111
- package/src/plugins/CopyPlugin.ts +261 -261
- package/src/plugins/DeleteHotKeyPlugin.ts +57 -57
- package/src/plugins/DrawLinePlugin.ts +162 -162
- package/src/plugins/DrawPolygonPlugin.ts +205 -205
- package/src/plugins/DringPlugin.ts +125 -125
- package/src/plugins/FlipPlugin.ts +59 -59
- package/src/plugins/FontPlugin.ts +165 -165
- package/src/plugins/FreeDrawPlugin.ts +49 -49
- package/src/plugins/GroupPlugin.ts +82 -82
- package/src/plugins/GroupTextEditorPlugin.ts +198 -198
- package/src/plugins/HistoryPlugin.ts +181 -181
- package/src/plugins/ImageStroke.ts +121 -121
- package/src/plugins/LayerPlugin.ts +108 -108
- package/src/plugins/MaskPlugin.ts +155 -155
- package/src/plugins/MaterialPlugin.ts +224 -224
- package/src/plugins/MiddleMousePlugin.ts +45 -45
- package/src/plugins/MoveHotKeyPlugin.ts +46 -46
- package/src/plugins/PathTextPlugin.ts +89 -89
- package/src/plugins/PolygonModifyPlugin.ts +224 -224
- package/src/plugins/PrintPlugin.ts +81 -81
- package/src/plugins/PsdPlugin.ts +52 -52
- package/src/plugins/SimpleClipImagePlugin.ts +244 -244
- package/src/types/eventType.ts +11 -11
- package/src/utils/psd.js +432 -432
- package/src/utils/ruler/guideline.ts +145 -145
- package/src/utils/ruler/index.ts +91 -91
- package/src/utils/ruler/utils.ts +162 -162
- package/tsconfig.json +10 -10
- package/vite.config.ts +29 -29
package/dist/index.js
CHANGED
|
@@ -438,7 +438,7 @@ gl_FragColor.rgb *= color.a;
|
|
|
438
438
|
`?(d++,p[d]=0):p[d]++;p[0]>0&&(this.insertCharStyleObject(f.lineIndex,f.charIndex,p[0],u),u=u&&u.slice(p[0]+1)),d&&this.insertNewlineStyleObject(f.lineIndex,f.charIndex+p[0],d);for(var A=1;A<d;A++)p[A]>0?this.insertCharStyleObject(f.lineIndex+A,0,p[A],u):u&&this.styles[f.lineIndex+A]&&u[0]&&(this.styles[f.lineIndex+A][0]=u[0]),u=u&&u.slice(p[A]+1);p[A]>0&&this.insertCharStyleObject(f.lineIndex+A,0,p[A],u)},setSelectionStartEndWithShift:function(l,h,u){u<=l?(h===l?this._selectionDirection="left":this._selectionDirection==="right"&&(this._selectionDirection="left",this.selectionEnd=l),this.selectionStart=u):u>l&&u<h?this._selectionDirection==="right"?this.selectionEnd=u:this.selectionStart=u:(h===l?this._selectionDirection="right":this._selectionDirection==="left"&&(this._selectionDirection="right",this.selectionStart=h),this.selectionEnd=u)},setSelectionInBoundaries:function(){var l=this.text.length;this.selectionStart>l?this.selectionStart=l:this.selectionStart<0&&(this.selectionStart=0),this.selectionEnd>l?this.selectionEnd=l:this.selectionEnd<0&&(this.selectionEnd=0)}})})(),i.util.object.extend(i.IText.prototype,{initDoubleClickSimulation:function(){this.__lastClickTime=+new Date,this.__lastLastClickTime=+new Date,this.__lastPointer={},this.on("mousedown",this.onMouseDown)},onMouseDown:function(g){if(this.canvas){this.__newClickTime=+new Date;var l=g.pointer;this.isTripleClick(l)&&(this.fire("tripleclick",g),this._stopEvent(g.e)),this.__lastLastClickTime=this.__lastClickTime,this.__lastClickTime=this.__newClickTime,this.__lastPointer=l,this.__lastIsEditing=this.isEditing,this.__lastSelected=this.selected}},isTripleClick:function(g){return this.__newClickTime-this.__lastClickTime<500&&this.__lastClickTime-this.__lastLastClickTime<500&&this.__lastPointer.x===g.x&&this.__lastPointer.y===g.y},_stopEvent:function(g){g.preventDefault&&g.preventDefault(),g.stopPropagation&&g.stopPropagation()},initCursorSelectionHandlers:function(){this.initMousedownHandler(),this.initMouseupHandler(),this.initClicks()},doubleClickHandler:function(g){this.isEditing&&this.selectWord(this.getSelectionStartFromPointer(g.e))},tripleClickHandler:function(g){this.isEditing&&this.selectLine(this.getSelectionStartFromPointer(g.e))},initClicks:function(){this.on("mousedblclick",this.doubleClickHandler),this.on("tripleclick",this.tripleClickHandler)},_mouseDownHandler:function(g){!this.canvas||!this.editable||g.e.button&&g.e.button!==1||(this.__isMousedown=!0,this.selected&&(this.inCompositionMode=!1,this.setCursorByClick(g.e)),this.isEditing&&(this.__selectionStartOnMouseDown=this.selectionStart,this.selectionStart===this.selectionEnd&&this.abortCursorAnimation(),this.renderCursorOrSelection()))},_mouseDownHandlerBefore:function(g){!this.canvas||!this.editable||g.e.button&&g.e.button!==1||(this.selected=this===this.canvas._activeObject)},initMousedownHandler:function(){this.on("mousedown",this._mouseDownHandler),this.on("mousedown:before",this._mouseDownHandlerBefore)},initMouseupHandler:function(){this.on("mouseup",this.mouseUpHandler)},mouseUpHandler:function(g){if(this.__isMousedown=!1,!(!this.editable||this.group||g.transform&&g.transform.actionPerformed||g.e.button&&g.e.button!==1)){if(this.canvas){var l=this.canvas._activeObject;if(l&&l!==this)return}this.__lastSelected&&!this.__corner?(this.selected=!1,this.__lastSelected=!1,this.enterEditing(g.e),this.selectionStart===this.selectionEnd?this.initDelayedCursor(!0):this.renderCursorOrSelection()):this.selected=!0}},setCursorByClick:function(g){var l=this.getSelectionStartFromPointer(g),h=this.selectionStart,u=this.selectionEnd;g.shiftKey?this.setSelectionStartEndWithShift(h,u,l):(this.selectionStart=l,this.selectionEnd=l),this.isEditing&&(this._fireSelectionChanged(),this._updateTextarea())},getSelectionStartFromPointer:function(g){for(var l=this.getLocalPointer(g),h=0,u=0,f=0,p=0,d=0,A,w,m=0,x=this._textLines.length;m<x&&f<=l.y;m++)f+=this.getHeightOfLine(m)*this.scaleY,d=m,m>0&&(p+=this._textLines[m-1].length+this.missingNewlineOffset(m-1));A=this._getLineLeftOffset(d),u=A*this.scaleX,w=this._textLines[d],this.direction==="rtl"&&(l.x=this.width*this.scaleX-l.x+u);for(var C=0,E=w.length;C<E&&(h=u,u+=this.__charBounds[d][C].kernedWidth*this.scaleX,u<=l.x);C++)p++;return this._getNewSelectionStartFromOffset(l,h,u,p,E)},_getNewSelectionStartFromOffset:function(g,l,h,u,f){var p=g.x-l,d=h-g.x,A=d>p||d<0?0:1,w=u+A;return this.flipX&&(w=f-w),w>this._text.length&&(w=this._text.length),w}}),i.util.object.extend(i.IText.prototype,{initHiddenTextarea:function(){this.hiddenTextarea=i.document.createElement("textarea"),this.hiddenTextarea.setAttribute("autocapitalize","off"),this.hiddenTextarea.setAttribute("autocorrect","off"),this.hiddenTextarea.setAttribute("autocomplete","off"),this.hiddenTextarea.setAttribute("spellcheck","false"),this.hiddenTextarea.setAttribute("data-fabric-hiddentextarea",""),this.hiddenTextarea.setAttribute("wrap","off");var g=this._calcTextareaPosition();this.hiddenTextarea.style.cssText="position: absolute; top: "+g.top+"; left: "+g.left+"; z-index: -999; opacity: 0; width: 1px; height: 1px; font-size: 1px; padding-top: "+g.fontSize+";",this.hiddenTextareaContainer?this.hiddenTextareaContainer.appendChild(this.hiddenTextarea):i.document.body.appendChild(this.hiddenTextarea),i.util.addListener(this.hiddenTextarea,"keydown",this.onKeyDown.bind(this)),i.util.addListener(this.hiddenTextarea,"keyup",this.onKeyUp.bind(this)),i.util.addListener(this.hiddenTextarea,"input",this.onInput.bind(this)),i.util.addListener(this.hiddenTextarea,"copy",this.copy.bind(this)),i.util.addListener(this.hiddenTextarea,"cut",this.copy.bind(this)),i.util.addListener(this.hiddenTextarea,"paste",this.paste.bind(this)),i.util.addListener(this.hiddenTextarea,"compositionstart",this.onCompositionStart.bind(this)),i.util.addListener(this.hiddenTextarea,"compositionupdate",this.onCompositionUpdate.bind(this)),i.util.addListener(this.hiddenTextarea,"compositionend",this.onCompositionEnd.bind(this)),!this._clickHandlerInitialized&&this.canvas&&(i.util.addListener(this.canvas.upperCanvasEl,"click",this.onClick.bind(this)),this._clickHandlerInitialized=!0)},keysMap:{9:"exitEditing",27:"exitEditing",33:"moveCursorUp",34:"moveCursorDown",35:"moveCursorRight",36:"moveCursorLeft",37:"moveCursorLeft",38:"moveCursorUp",39:"moveCursorRight",40:"moveCursorDown"},keysMapRtl:{9:"exitEditing",27:"exitEditing",33:"moveCursorUp",34:"moveCursorDown",35:"moveCursorLeft",36:"moveCursorRight",37:"moveCursorRight",38:"moveCursorUp",39:"moveCursorLeft",40:"moveCursorDown"},ctrlKeysMapUp:{67:"copy",88:"cut"},ctrlKeysMapDown:{65:"selectAll"},onClick:function(){this.hiddenTextarea&&this.hiddenTextarea.focus()},onKeyDown:function(g){if(this.isEditing){var l=this.direction==="rtl"?this.keysMapRtl:this.keysMap;if(g.keyCode in l)this[l[g.keyCode]](g);else if(g.keyCode in this.ctrlKeysMapDown&&(g.ctrlKey||g.metaKey))this[this.ctrlKeysMapDown[g.keyCode]](g);else return;g.stopImmediatePropagation(),g.preventDefault(),g.keyCode>=33&&g.keyCode<=40?(this.inCompositionMode=!1,this.clearContextTop(),this.renderCursorOrSelection()):this.canvas&&this.canvas.requestRenderAll()}},onKeyUp:function(g){if(!this.isEditing||this._copyDone||this.inCompositionMode){this._copyDone=!1;return}if(g.keyCode in this.ctrlKeysMapUp&&(g.ctrlKey||g.metaKey))this[this.ctrlKeysMapUp[g.keyCode]](g);else return;g.stopImmediatePropagation(),g.preventDefault(),this.canvas&&this.canvas.requestRenderAll()},onInput:function(g){var l=this.fromPaste;if(this.fromPaste=!1,g&&g.stopPropagation(),!!this.isEditing){var h=this._splitTextIntoLines(this.hiddenTextarea.value).graphemeText,u=this._text.length,f=h.length,p,d,A=f-u,w=this.selectionStart,m=this.selectionEnd,x=w!==m,C,E,B;if(this.hiddenTextarea.value===""){this.styles={},this.updateFromTextArea(),this.fire("changed"),this.canvas&&(this.canvas.fire("text:changed",{target:this}),this.canvas.requestRenderAll());return}var k=this.fromStringToGraphemeSelection(this.hiddenTextarea.selectionStart,this.hiddenTextarea.selectionEnd,this.hiddenTextarea.value),M=w>k.selectionStart;x?(p=this._text.slice(w,m),A+=m-w):f<u&&(M?p=this._text.slice(m+A,m):p=this._text.slice(w,w-A)),d=h.slice(k.selectionEnd-A,k.selectionEnd),p&&p.length&&(d.length&&(C=this.getSelectionStyles(w,w+1,!1),C=d.map(function(){return C[0]})),x?(E=w,B=m):M?(E=m-p.length,B=m):(E=m,B=m+p.length),this.removeStyleFromTo(E,B)),d.length&&(l&&d.join("")===i.copiedText&&!i.disableStyleCopyPaste&&(C=i.copiedTextStyle),this.insertNewStyleBlock(d,w,C)),this.updateFromTextArea(),this.fire("changed"),this.canvas&&(this.canvas.fire("text:changed",{target:this}),this.canvas.requestRenderAll())}},onCompositionStart:function(){this.inCompositionMode=!0},onCompositionEnd:function(){this.inCompositionMode=!1},onCompositionUpdate:function(g){this.compositionStart=g.target.selectionStart,this.compositionEnd=g.target.selectionEnd,this.updateTextareaPosition()},copy:function(){this.selectionStart!==this.selectionEnd&&(i.copiedText=this.getSelectedText(),i.disableStyleCopyPaste?i.copiedTextStyle=null:i.copiedTextStyle=this.getSelectionStyles(this.selectionStart,this.selectionEnd,!0),this._copyDone=!0)},paste:function(){this.fromPaste=!0},_getClipboardData:function(g){return g&&g.clipboardData||i.window.clipboardData},_getWidthBeforeCursor:function(g,l){var h=this._getLineLeftOffset(g),u;return l>0&&(u=this.__charBounds[g][l-1],h+=u.left+u.width),h},getDownCursorOffset:function(g,l){var h=this._getSelectionForOffset(g,l),u=this.get2DCursorLocation(h),f=u.lineIndex;if(f===this._textLines.length-1||g.metaKey||g.keyCode===34)return this._text.length-h;var p=u.charIndex,d=this._getWidthBeforeCursor(f,p),A=this._getIndexOnLine(f+1,d),w=this._textLines[f].slice(p);return w.length+A+1+this.missingNewlineOffset(f)},_getSelectionForOffset:function(g,l){return g.shiftKey&&this.selectionStart!==this.selectionEnd&&l?this.selectionEnd:this.selectionStart},getUpCursorOffset:function(g,l){var h=this._getSelectionForOffset(g,l),u=this.get2DCursorLocation(h),f=u.lineIndex;if(f===0||g.metaKey||g.keyCode===33)return-h;var p=u.charIndex,d=this._getWidthBeforeCursor(f,p),A=this._getIndexOnLine(f-1,d),w=this._textLines[f].slice(0,p),m=this.missingNewlineOffset(f-1);return-this._textLines[f-1].length+A-w.length+(1-m)},_getIndexOnLine:function(g,l){for(var h=this._textLines[g],u=this._getLineLeftOffset(g),f=u,p=0,d,A,w=0,m=h.length;w<m;w++)if(d=this.__charBounds[g][w].width,f+=d,f>l){A=!0;var x=f-d,C=f,E=Math.abs(x-l),B=Math.abs(C-l);p=B<E?w:w-1;break}return A||(p=h.length-1),p},moveCursorDown:function(g){this.selectionStart>=this._text.length&&this.selectionEnd>=this._text.length||this._moveCursorUpOrDown("Down",g)},moveCursorUp:function(g){this.selectionStart===0&&this.selectionEnd===0||this._moveCursorUpOrDown("Up",g)},_moveCursorUpOrDown:function(g,l){var h="get"+g+"CursorOffset",u=this[h](l,this._selectionDirection==="right");l.shiftKey?this.moveCursorWithShift(u):this.moveCursorWithoutShift(u),u!==0&&(this.setSelectionInBoundaries(),this.abortCursorAnimation(),this._currentCursorOpacity=1,this.initDelayedCursor(),this._fireSelectionChanged(),this._updateTextarea())},moveCursorWithShift:function(g){var l=this._selectionDirection==="left"?this.selectionStart+g:this.selectionEnd+g;return this.setSelectionStartEndWithShift(this.selectionStart,this.selectionEnd,l),g!==0},moveCursorWithoutShift:function(g){return g<0?(this.selectionStart+=g,this.selectionEnd=this.selectionStart):(this.selectionEnd+=g,this.selectionStart=this.selectionEnd),g!==0},moveCursorLeft:function(g){this.selectionStart===0&&this.selectionEnd===0||this._moveCursorLeftOrRight("Left",g)},_move:function(g,l,h){var u;if(g.altKey)u=this["findWordBoundary"+h](this[l]);else if(g.metaKey||g.keyCode===35||g.keyCode===36)u=this["findLineBoundary"+h](this[l]);else return this[l]+=h==="Left"?-1:1,!0;if(typeof u<"u"&&this[l]!==u)return this[l]=u,!0},_moveLeft:function(g,l){return this._move(g,l,"Left")},_moveRight:function(g,l){return this._move(g,l,"Right")},moveCursorLeftWithoutShift:function(g){var l=!0;return this._selectionDirection="left",this.selectionEnd===this.selectionStart&&this.selectionStart!==0&&(l=this._moveLeft(g,"selectionStart")),this.selectionEnd=this.selectionStart,l},moveCursorLeftWithShift:function(g){if(this._selectionDirection==="right"&&this.selectionStart!==this.selectionEnd)return this._moveLeft(g,"selectionEnd");if(this.selectionStart!==0)return this._selectionDirection="left",this._moveLeft(g,"selectionStart")},moveCursorRight:function(g){this.selectionStart>=this._text.length&&this.selectionEnd>=this._text.length||this._moveCursorLeftOrRight("Right",g)},_moveCursorLeftOrRight:function(g,l){var h="moveCursor"+g+"With";this._currentCursorOpacity=1,l.shiftKey?h+="Shift":h+="outShift",this[h](l)&&(this.abortCursorAnimation(),this.initDelayedCursor(),this._fireSelectionChanged(),this._updateTextarea())},moveCursorRightWithShift:function(g){if(this._selectionDirection==="left"&&this.selectionStart!==this.selectionEnd)return this._moveRight(g,"selectionStart");if(this.selectionEnd!==this._text.length)return this._selectionDirection="right",this._moveRight(g,"selectionEnd")},moveCursorRightWithoutShift:function(g){var l=!0;return this._selectionDirection="right",this.selectionStart===this.selectionEnd?(l=this._moveRight(g,"selectionStart"),this.selectionEnd=this.selectionStart):this.selectionStart=this.selectionEnd,l},removeChars:function(g,l){typeof l>"u"&&(l=g+1),this.removeStyleFromTo(g,l),this._text.splice(g,l-g),this.text=this._text.join(""),this.set("dirty",!0),this._shouldClearDimensionCache()&&(this.initDimensions(),this.setCoords()),this._removeExtraneousStyles()},insertChars:function(g,l,h,u){typeof u>"u"&&(u=h),u>h&&this.removeStyleFromTo(h,u);var f=i.util.string.graphemeSplit(g);this.insertNewStyleBlock(f,h,l),this._text=[].concat(this._text.slice(0,h),f,this._text.slice(u)),this.text=this._text.join(""),this.set("dirty",!0),this._shouldClearDimensionCache()&&(this.initDimensions(),this.setCoords()),this._removeExtraneousStyles()}}),(function(){var g=i.util.toFixed,l=/ +/g;i.util.object.extend(i.Text.prototype,{_toSVG:function(){var h=this._getSVGLeftTopOffsets(),u=this._getSVGTextAndBg(h.textTop,h.textLeft);return this._wrapSVGTextAndBg(u)},toSVG:function(h){return this._createBaseSVGMarkup(this._toSVG(),{reviver:h,noStyle:!0,withShadow:!0})},_getSVGLeftTopOffsets:function(){return{textLeft:-this.width/2,textTop:-this.height/2,lineTop:this.getHeightOfLine(0)}},_wrapSVGTextAndBg:function(h){var u=!0,f=this.getSvgTextDecoration(this);return[h.textBgRects.join(""),' <text xml:space="preserve" ',this.fontFamily?'font-family="'+this.fontFamily.replace(/"/g,"'")+'" ':"",this.fontSize?'font-size="'+this.fontSize+'" ':"",this.fontStyle?'font-style="'+this.fontStyle+'" ':"",this.fontWeight?'font-weight="'+this.fontWeight+'" ':"",f?'text-decoration="'+f+'" ':"",'style="',this.getSvgStyles(u),'"',this.addPaintOrder()," >",h.textSpans.join(""),`</text>
|
|
439
439
|
`]},_getSVGTextAndBg:function(h,u){var f=[],p=[],d=h,A;this._setSVGBg(p);for(var w=0,m=this._textLines.length;w<m;w++)A=this._getLineLeftOffset(w),(this.textBackgroundColor||this.styleHas("textBackgroundColor",w))&&this._setSVGTextLineBg(p,w,u+A,d),this._setSVGTextLineText(f,w,u+A,d),d+=this.getHeightOfLine(w);return{textSpans:f,textBgRects:p}},_createTextCharSpan:function(h,u,f,p){var d=h!==h.trim()||h.match(l),A=this.getSvgSpanStyles(u,d),w=A?'style="'+A+'"':"",m=u.deltaY,x="",C=i.Object.NUM_FRACTION_DIGITS;return m&&(x=' dy="'+g(m,C)+'" '),['<tspan x="',g(f,C),'" y="',g(p,C),'" ',x,w,">",i.util.string.escapeXml(h),"</tspan>"].join("")},_setSVGTextLineText:function(h,u,f,p){var d=this.getHeightOfLine(u),A=this.textAlign.indexOf("justify")!==-1,w,m,x="",C,E,B=0,k=this._textLines[u],M;p+=d*(1-this._fontSizeFraction)/this.lineHeight;for(var T=0,D=k.length-1;T<=D;T++)M=T===D||this.charSpacing,x+=k[T],C=this.__charBounds[u][T],B===0?(f+=C.kernedWidth-C.width,B+=C.width):B+=C.kernedWidth,A&&!M&&this._reSpaceAndTab.test(k[T])&&(M=!0),M||(w=w||this.getCompleteStyleDeclaration(u,T),m=this.getCompleteStyleDeclaration(u,T+1),M=i.util.hasStyleChanged(w,m,!0)),M&&(E=this._getStyleDeclaration(u,T)||{},h.push(this._createTextCharSpan(x,E,f,p)),x="",w=m,f+=B,B=0)},_pushTextBgRect:function(h,u,f,p,d,A){var w=i.Object.NUM_FRACTION_DIGITS;h.push(" <rect ",this._getFillAttributes(u),' x="',g(f,w),'" y="',g(p,w),'" width="',g(d,w),'" height="',g(A,w),`"></rect>
|
|
440
440
|
`)},_setSVGTextLineBg:function(h,u,f,p){for(var d=this._textLines[u],A=this.getHeightOfLine(u)/this.lineHeight,w=0,m=0,x,C,E=this.getValueOfPropertyAt(u,0,"textBackgroundColor"),B=0,k=d.length;B<k;B++)x=this.__charBounds[u][B],C=this.getValueOfPropertyAt(u,B,"textBackgroundColor"),C!==E?(E&&this._pushTextBgRect(h,E,f+m,p,w,A),m=x.left,w=x.width,E=C):w+=x.kernedWidth;C&&this._pushTextBgRect(h,C,f+m,p,w,A)},_getFillAttributes:function(h){var u=h&&typeof h=="string"?new i.Color(h):"";return!u||!u.getSource()||u.getAlpha()===1?'fill="'+h+'"':'opacity="'+u.getAlpha()+'" fill="'+u.setAlpha(1).toRgb()+'"'},_getSVGLineTopOffset:function(h){for(var u=0,f=0,p=0;p<h;p++)u+=this.getHeightOfLine(p);return f=this.getHeightOfLine(p),{lineTop:u,offset:(this._fontSizeMult-this._fontSizeFraction)*f/(this.lineHeight*this._fontSizeMult)}},getSvgStyles:function(h){var u=i.Object.prototype.getSvgStyles.call(this,h);return u+" white-space: pre;"}})})(),(function(g){var l=g.fabric||(g.fabric={});l.Textbox=l.util.createClass(l.IText,l.Observable,{type:"textbox",minWidth:20,dynamicMinWidth:2,__cachedLines:null,lockScalingFlip:!0,noScaleCache:!1,_dimensionAffectingProps:l.Text.prototype._dimensionAffectingProps.concat("width"),_wordJoiners:/[ \t\r]/,splitByGrapheme:!1,initDimensions:function(){this.__skipDimension||(this.isEditing&&this.initDelayedCursor(),this.clearContextTop(),this._clearCache(),this.dynamicMinWidth=0,this._styleMap=this._generateStyleMap(this._splitText()),this.dynamicMinWidth>this.width&&this._set("width",this.dynamicMinWidth),this.textAlign.indexOf("justify")!==-1&&this.enlargeSpaces(),this.height=this.calcTextHeight(),this.saveState({propertySet:"_dimensionAffectingProps"}))},_generateStyleMap:function(h){for(var u=0,f=0,p=0,d={},A=0;A<h.graphemeLines.length;A++)h.graphemeText[p]===`
|
|
441
|
-
`&&A>0?(f=0,p++,u++):!this.splitByGrapheme&&this._reSpaceAndTab.test(h.graphemeText[p])&&A>0&&(f++,p++),d[A]={line:u,offset:f},p+=h.graphemeLines[A].length,f+=h.graphemeLines[A].length;return d},styleHas:function(h,u){if(this._styleMap&&!this.isWrapping){var f=this._styleMap[u];f&&(u=f.line)}return l.Text.prototype.styleHas.call(this,h,u)},isEmptyStyles:function(h){if(!this.styles)return!0;var u=0,f=h+1,p,d,A=!1,w=this._styleMap[h],m=this._styleMap[h+1];w&&(h=w.line,u=w.offset),m&&(f=m.line,A=f===h,p=m.offset),d=typeof h>"u"?this.styles:{line:this.styles[h]};for(var x in d)for(var C in d[x])if(C>=u&&(!A||C<p))for(var E in d[x][C])return!1;return!0},_getStyleDeclaration:function(h,u){if(this._styleMap&&!this.isWrapping){var f=this._styleMap[h];if(!f)return null;h=f.line,u=f.offset+u}return this.callSuper("_getStyleDeclaration",h,u)},_setStyleDeclaration:function(h,u,f){var p=this._styleMap[h];h=p.line,u=p.offset+u,this.styles[h][u]=f},_deleteStyleDeclaration:function(h,u){var f=this._styleMap[h];h=f.line,u=f.offset+u,delete this.styles[h][u]},_getLineStyle:function(h){var u=this._styleMap[h];return!!this.styles[u.line]},_setLineStyle:function(h){var u=this._styleMap[h];this.styles[u.line]={}},_wrapText:function(h,u){var f=[],p;for(this.isWrapping=!0,p=0;p<h.length;p++)f=f.concat(this._wrapLine(h[p],p,u));return this.isWrapping=!1,f},_measureWord:function(h,u,f){var p=0,d,A=!0;f=f||0;for(var w=0,m=h.length;w<m;w++){var x=this._getGraphemeBox(h[w],u,w+f,d,A);p+=x.kernedWidth,d=h[w]}return p},_wrapLine:function(h,u,f,j){var d=0,A=this.splitByGrapheme,w=[],m=[],x=A?l.util.string.graphemeSplit(h):h.split(this._wordJoiners),C="",E=0,B=A?"":" ",k=0,M=0,T=0,D=!0,N=this._getWidthOfCharSpacing(),j=j||0;x.length===0&&x.push([]),f-=j;for(var Y=0;Y<x.length;Y++)C=A?x[Y]:l.util.string.graphemeSplit(x[Y]),k=this._measureWord(C,u,E),E+=C.length,d+=M+k-N,d>f&&!D?(w.push(m),m=[],d=k,D=!0):d+=N,!D&&!A&&m.push(B),m=m.concat(C),M=A?0:this._measureWord([B],u,E),E++,D=!1,k>T&&(T=k);return Y&&w.push(m),T+j>this.dynamicMinWidth&&(this.dynamicMinWidth=T-N+j),w},isEndOfWrapping:function(h){return!this._styleMap[h+1]||this._styleMap[h+1].line!==this._styleMap[h].line},missingNewlineOffset:function(h){return this.splitByGrapheme?this.isEndOfWrapping(h)?1:0:1},_splitTextIntoLines:function(h){for(var u=l.Text.prototype._splitTextIntoLines.call(this,h),f=this._wrapText(u.lines,this.width),p=new Array(f.length),d=0;d<f.length;d++)p[d]=f[d].join("");return u.lines=p,u.graphemeLines=f,u},getMinWidth:function(){return Math.max(this.minWidth,this.dynamicMinWidth)},_removeExtraneousStyles:function(){var h={};for(var u in this._styleMap)this._textLines[u]&&(h[this._styleMap[u].line]=1);for(var u in this.styles)h[u]||delete this.styles[u]},toObject:function(h){return this.callSuper("toObject",["minWidth","splitByGrapheme"].concat(h))}}),l.Textbox.fromObject=function(h,u){var f=l.util.stylesFromArray(h.styles,h.text),p=Object.assign({},h,{styles:f});return l.Object._fromObject("Textbox",p,u,"text")}})(a),(function(){var g=i.controlsUtils,l=g.scaleSkewCursorStyleHandler,h=g.scaleCursorStyleHandler,u=g.scalingEqually,f=g.scalingYOrSkewingX,p=g.scalingXOrSkewingY,d=g.scaleOrSkewActionName,A=i.Object.prototype.controls;if(A.ml=new i.Control({x:-.5,y:0,cursorStyleHandler:l,actionHandler:p,getActionName:d}),A.mr=new i.Control({x:.5,y:0,cursorStyleHandler:l,actionHandler:p,getActionName:d}),A.mb=new i.Control({x:0,y:.5,cursorStyleHandler:l,actionHandler:f,getActionName:d}),A.mt=new i.Control({x:0,y:-.5,cursorStyleHandler:l,actionHandler:f,getActionName:d}),A.tl=new i.Control({x:-.5,y:-.5,cursorStyleHandler:h,actionHandler:u}),A.tr=new i.Control({x:.5,y:-.5,cursorStyleHandler:h,actionHandler:u}),A.bl=new i.Control({x:-.5,y:.5,cursorStyleHandler:h,actionHandler:u}),A.br=new i.Control({x:.5,y:.5,cursorStyleHandler:h,actionHandler:u}),A.mtr=new i.Control({x:0,y:-.5,actionHandler:g.rotationWithSnapping,cursorStyleHandler:g.rotationStyleHandler,offsetY:-40,withConnection:!0,actionName:"rotate"}),i.Textbox){var w=i.Textbox.prototype.controls={};w.mtr=A.mtr,w.tr=A.tr,w.br=A.br,w.tl=A.tl,w.bl=A.bl,w.mt=A.mt,w.mb=A.mb,w.mr=new i.Control({x:.5,y:0,actionHandler:g.changeWidth,cursorStyleHandler:l,actionName:"resizing"}),w.ml=new i.Control({x:-.5,y:0,actionHandler:g.changeWidth,cursorStyleHandler:l,actionName:"resizing"})}})()})(_A)),_A}var Gl=fB();function hB(a){return rB(a).promise.value}function uB(a){return new Promise(i=>{const{onChange:s,open:o}=sB(a);s(v=>{i(v)}),o()})}function dB(a){return new Promise(i=>{const s=document.createElement("img");s.src=a,document.body.appendChild(s),s.onload=()=>{i(s)}})}const pB=(a,i)=>nB({source:a,...i}).copy();function gB(a,i){const s=document.createElement("a");s.href=a,s.download=`${vI()}.${i}`,document.body.appendChild(s),s.click(),s.remove()}function vB(a,i,s,o,v,b,y){y!==void 0&&(a.save(),a.translate(i,s),a.rotate(y),a.drawImage(o,-v/2,-b/2,v,b),a.restore())}const AB=a=>a instanceof Gl.fabric.Image,mB=a=>a instanceof Gl.fabric.Group,bB=a=>a instanceof Gl.fabric.IText,wB=a=>a instanceof Gl.fabric.ActiveSelection;function yB(a){return new Promise(i=>{const s=new FileReader;s.addEventListener("load",()=>{i(s.result)}),s.readAsDataURL(a)})}function xB(a){if(!a)return null;const i=a.split(","),s=i[0].match(/:(.*?);/)[1],o=window.atob(i[1]),v=new ArrayBuffer(o.length),b=new Uint8Array(v);for(let y=0;y<o.length;y++)b[y]=o.charCodeAt(y);return[new Blob([v],{type:s}),s.slice(6)]}const P1={getImgStr:hB,downFile:gB,selectFiles:uB,insertImgFile:dB,clipboardText:pB,drawImg:vB,isImage:AB,isGroup:mB,isIText:bB,isActiveSelection:wB,blobToBase64:yB,base64ToBlob:xB},CB="0.0.7";window&&(window._hprintPrintVersion=CB);Gl.fabric;function TA(a,i,s){const o=a.type==="image",v=p=>p===void 0?void 0:ey(Bn.pxToMm(p,i),s),b=a.left,y=a.top,g=o?a.getScaledWidth():a.width,l=o?a.getScaledHeight():a.height,h=a.strokeWidth,u=a.fontSize,f=a._originSize?.mm||{};a._originSize={...a._originSize,mm:{...f,left:v(b),top:v(y),width:v(g),height:v(l),strokeWidth:v(h),fontSize:v(u)}}}function ma(a){return a.getUnit?.()??"px"}function F1(a,i,s){if(i==="px")return typeof a=="string"?Number(a):a;if(i==="mm")return Bn.mmToPx(a,s,{direct:!0});const o=typeof a=="string"?Number(a):a;return Bn.mmToPx(o*Bn.CONSTANTS.INCH_TO_MM,s,{direct:!0})}function u1(a={},i,s,o=["left","top","width","height","fontSize","boxWidth"]){const v=new Set(o),b={},y={};for(const g of Object.keys(a)){if(!v.has(g))continue;const l=a[g];l!==void 0&&(y[g]=l,b[g]=F1(l,i,s))}return{processed:b,originByUnit:{[i]:y}}}function ey(a,i){if(i===void 0)return a;const s=Math.pow(10,i);return Math.round(a*s)/s}function ip(a,i){if(typeof a=="number")return ey(a,i);if(Array.isArray(a))return a.map(s=>ip(s,i));if(a&&typeof a=="object"){const s={};return Object.keys(a).forEach(o=>{s[o]=ip(a[o],i)}),s}return a}function Aa(a,i){return ip(a,i)}function OA(a,i=2){const s=Number(a).toFixed(i);return s.includes(".")?s.replace(/\.?0+$/,""):s}var ty=typeof global=="object"&&global&&global.Object===Object&&global,IB=typeof self=="object"&&self&&self.Object===Object&&self,ca=ty||IB||Function("return this")(),Ma=ca.Symbol,ry=Object.prototype,EB=ry.hasOwnProperty,BB=ry.toString,tl=Ma?Ma.toStringTag:void 0;function SB(a){var i=EB.call(a,tl),s=a[tl];try{a[tl]=void 0;var o=!0}catch{}var v=BB.call(a);return o&&(i?a[tl]=s:delete a[tl]),v}var kB=Object.prototype,_B=kB.toString;function MB(a){return _B.call(a)}var TB="[object Null]",OB="[object Undefined]",RA=Ma?Ma.toStringTag:void 0;function Ga(a){return a==null?a===void 0?OB:TB:RA&&RA in Object(a)?SB(a):MB(a)}function On(a){return a!=null&&typeof a=="object"}var RB="[object Symbol]";function d1(a){return typeof a=="symbol"||On(a)&&Ga(a)==RB}var DB=NaN;function DA(a){return typeof a=="number"?a:d1(a)?DB:+a}function gn(a,i){for(var s=-1,o=a==null?0:a.length,v=Array(o);++s<o;)v[s]=i(a[s],s,a);return v}var yr=Array.isArray,FA=Ma?Ma.prototype:void 0,QA=FA?FA.toString:void 0;function p1(a){if(typeof a=="string")return a;if(yr(a))return gn(a,p1)+"";if(d1(a))return QA?QA.call(a):"";var i=a+"";return i=="0"&&1/a==-1/0?"-0":i}function Zh(a,i){return function(s,o){var v;if(s===void 0&&o===void 0)return i;if(s!==void 0&&(v=s),o!==void 0){if(v===void 0)return o;typeof s=="string"||typeof o=="string"?(s=p1(s),o=p1(o)):(s=DA(s),o=DA(o)),v=a(s,o)}return v}}var FB=Zh(function(a,i){return a+i},0),QB=/\s/;function iy(a){for(var i=a.length;i--&&QB.test(a.charAt(i)););return i}var jB=/^\s+/;function ny(a){return a&&a.slice(0,iy(a)+1).replace(jB,"")}function Sn(a){var i=typeof a;return a!=null&&(i=="object"||i=="function")}var jA=NaN,NB=/^[-+]0x[0-9a-f]+$/i,PB=/^0b[01]+$/i,UB=/^0o[0-7]+$/i,LB=parseInt;function w1(a){if(typeof a=="number")return a;if(d1(a))return jA;if(Sn(a)){var i=typeof a.valueOf=="function"?a.valueOf():a;a=Sn(i)?i+"":i}if(typeof a!="string")return a===0?a:+a;a=ny(a);var s=PB.test(a);return s||UB.test(a)?LB(a.slice(2),s?2:8):NB.test(a)?jA:+a}var NA=1/0,GB=17976931348623157e292;function Es(a){if(!a)return a===0?a:0;if(a=w1(a),a===NA||a===-NA){var i=a<0?-1:1;return i*GB}return a===a?a:0}function Er(a){var i=Es(a),s=i%1;return i===i?s?i-s:i:0}var YB="Expected a function";function HB(a,i){if(typeof i!="function")throw new TypeError(YB);return a=Er(a),function(){if(--a<1)return i.apply(this,arguments)}}function t1(a){return a}var zB="[object AsyncFunction]",qB="[object Function]",WB="[object GeneratorFunction]",VB="[object Proxy]";function _s(a){if(!Sn(a))return!1;var i=Ga(a);return i==qB||i==WB||i==zB||i==VB}var vf=ca["__core-js_shared__"],PA=(function(){var a=/[^.]+$/.exec(vf&&vf.keys&&vf.keys.IE_PROTO||"");return a?"Symbol(src)_1."+a:""})();function XB(a){return!!PA&&PA in a}var $B=Function.prototype,JB=$B.toString;function _o(a){if(a!=null){try{return JB.call(a)}catch{}try{return a+""}catch{}}return""}var KB=/[\\^$.*+?()[\]{}|]/g,ZB=/^\[object .+?Constructor\]$/,eS=Function.prototype,tS=Object.prototype,rS=eS.toString,iS=tS.hasOwnProperty,nS=RegExp("^"+rS.call(iS).replace(KB,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ay(a){if(!Sn(a)||XB(a))return!1;var i=_s(a)?nS:ZB;return i.test(_o(a))}function aS(a,i){return a?.[i]}function Mo(a,i){var s=aS(a,i);return ay(s)?s:void 0}var Ol=Mo(ca,"WeakMap"),Rf=Ol&&new Ol,sy=Rf?function(a,i){return Rf.set(a,i),a}:t1,UA=Object.create,uc=(function(){function a(){}return function(i){if(!Sn(i))return{};if(UA)return UA(i);a.prototype=i;var s=new a;return a.prototype=void 0,s}})();function Rl(a){return function(){var i=arguments;switch(i.length){case 0:return new a;case 1:return new a(i[0]);case 2:return new a(i[0],i[1]);case 3:return new a(i[0],i[1],i[2]);case 4:return new a(i[0],i[1],i[2],i[3]);case 5:return new a(i[0],i[1],i[2],i[3],i[4]);case 6:return new a(i[0],i[1],i[2],i[3],i[4],i[5]);case 7:return new a(i[0],i[1],i[2],i[3],i[4],i[5],i[6])}var s=uc(a.prototype),o=a.apply(s,i);return Sn(o)?o:s}}var sS=1;function oS(a,i,s){var o=i&sS,v=Rl(a);function b(){var y=this&&this!==ca&&this instanceof b?v:a;return y.apply(o?s:this,arguments)}return b}function g1(a,i,s){switch(s.length){case 0:return a.call(i);case 1:return a.call(i,s[0]);case 2:return a.call(i,s[0],s[1]);case 3:return a.call(i,s[0],s[1],s[2])}return a.apply(i,s)}var cS=Math.max;function oy(a,i,s,o){for(var v=-1,b=a.length,y=s.length,g=-1,l=i.length,h=cS(b-y,0),u=Array(l+h),f=!o;++g<l;)u[g]=i[g];for(;++v<y;)(f||v<b)&&(u[s[v]]=a[v]);for(;h--;)u[g++]=a[v++];return u}var lS=Math.max;function cy(a,i,s,o){for(var v=-1,b=a.length,y=-1,g=s.length,l=-1,h=i.length,u=lS(b-g,0),f=Array(u+h),p=!o;++v<u;)f[v]=a[v];for(var d=v;++l<h;)f[d+l]=i[l];for(;++y<g;)(p||v<b)&&(f[d+s[y]]=a[v++]);return f}function fS(a,i){for(var s=a.length,o=0;s--;)a[s]===i&&++o;return o}function eu(){}var hS=4294967295;function zr(a){this.__wrapped__=a,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=hS,this.__views__=[]}zr.prototype=uc(eu.prototype);zr.prototype.constructor=zr;function Dl(){}var e3=Rf?function(a){return Rf.get(a)}:Dl,tc={},uS=Object.prototype,dS=uS.hasOwnProperty;function Af(a){for(var i=a.name+"",s=tc[i],o=dS.call(tc,i)?s.length:0;o--;){var v=s[o],b=v.func;if(b==null||b==a)return v.name}return i}function x1(a,i){this.__wrapped__=a,this.__actions__=[],this.__chain__=!!i,this.__index__=0,this.__values__=void 0}x1.prototype=uc(eu.prototype);x1.prototype.constructor=x1;function Ja(a,i){var s=-1,o=a.length;for(i||(i=Array(o));++s<o;)i[s]=a[s];return i}function ly(a){if(a instanceof zr)return a.clone();var i=new x1(a.__wrapped__,a.__chain__);return i.__actions__=Ja(a.__actions__),i.__index__=a.__index__,i.__values__=a.__values__,i}var pS=Object.prototype,gS=pS.hasOwnProperty;function J(a){if(On(a)&&!yr(a)&&!(a instanceof zr)){if(a instanceof x1)return a;if(gS.call(a,"__wrapped__"))return ly(a)}return new x1(a)}J.prototype=eu.prototype;J.prototype.constructor=J;function np(a){var i=Af(a),s=J[i];if(typeof s!="function"||!(i in zr.prototype))return!1;if(a===s)return!0;var o=e3(s);return!!o&&a===o[0]}var vS=800,AS=16,mS=Date.now;function fy(a){var i=0,s=0;return function(){var o=mS(),v=AS-(o-s);if(s=o,v>0){if(++i>=vS)return arguments[0]}else i=0;return a.apply(void 0,arguments)}}var hy=fy(sy),bS=/\{\n\/\* \[wrapped with (.+)\] \*/,wS=/,? & /;function yS(a){var i=a.match(bS);return i?i[1].split(wS):[]}var xS=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function CS(a,i){var s=i.length;if(!s)return a;var o=s-1;return i[o]=(s>1?"& ":"")+i[o],i=i.join(s>2?", ":" "),a.replace(xS,`{
|
|
441
|
+
`&&A>0?(f=0,p++,u++):!this.splitByGrapheme&&this._reSpaceAndTab.test(h.graphemeText[p])&&A>0&&(f++,p++),d[A]={line:u,offset:f},p+=h.graphemeLines[A].length,f+=h.graphemeLines[A].length;return d},styleHas:function(h,u){if(this._styleMap&&!this.isWrapping){var f=this._styleMap[u];f&&(u=f.line)}return l.Text.prototype.styleHas.call(this,h,u)},isEmptyStyles:function(h){if(!this.styles)return!0;var u=0,f=h+1,p,d,A=!1,w=this._styleMap[h],m=this._styleMap[h+1];w&&(h=w.line,u=w.offset),m&&(f=m.line,A=f===h,p=m.offset),d=typeof h>"u"?this.styles:{line:this.styles[h]};for(var x in d)for(var C in d[x])if(C>=u&&(!A||C<p))for(var E in d[x][C])return!1;return!0},_getStyleDeclaration:function(h,u){if(this._styleMap&&!this.isWrapping){var f=this._styleMap[h];if(!f)return null;h=f.line,u=f.offset+u}return this.callSuper("_getStyleDeclaration",h,u)},_setStyleDeclaration:function(h,u,f){var p=this._styleMap[h];h=p.line,u=p.offset+u,this.styles[h][u]=f},_deleteStyleDeclaration:function(h,u){var f=this._styleMap[h];h=f.line,u=f.offset+u,delete this.styles[h][u]},_getLineStyle:function(h){var u=this._styleMap[h];return!!this.styles[u.line]},_setLineStyle:function(h){var u=this._styleMap[h];this.styles[u.line]={}},_wrapText:function(h,u){var f=[],p;for(this.isWrapping=!0,p=0;p<h.length;p++)f=f.concat(this._wrapLine(h[p],p,u));return this.isWrapping=!1,f},_measureWord:function(h,u,f){var p=0,d,A=!0;f=f||0;for(var w=0,m=h.length;w<m;w++){var x=this._getGraphemeBox(h[w],u,w+f,d,A);p+=x.kernedWidth,d=h[w]}return p},_wrapLine:function(h,u,f,j){var d=0,A=this.splitByGrapheme,w=[],m=[],x=A?l.util.string.graphemeSplit(h):h.split(this._wordJoiners),C="",E=0,B=A?"":" ",k=0,M=0,T=0,D=!0,N=this._getWidthOfCharSpacing(),j=j||0;x.length===0&&x.push([]),f-=j;for(var Y=0;Y<x.length;Y++)C=A?x[Y]:l.util.string.graphemeSplit(x[Y]),k=this._measureWord(C,u,E),E+=C.length,d+=M+k-N,d>f&&!D?(w.push(m),m=[],d=k,D=!0):d+=N,!D&&!A&&m.push(B),m=m.concat(C),M=A?0:this._measureWord([B],u,E),E++,D=!1,k>T&&(T=k);return Y&&w.push(m),T+j>this.dynamicMinWidth&&(this.dynamicMinWidth=T-N+j),w},isEndOfWrapping:function(h){return!this._styleMap[h+1]||this._styleMap[h+1].line!==this._styleMap[h].line},missingNewlineOffset:function(h){return this.splitByGrapheme?this.isEndOfWrapping(h)?1:0:1},_splitTextIntoLines:function(h){for(var u=l.Text.prototype._splitTextIntoLines.call(this,h),f=this._wrapText(u.lines,this.width),p=new Array(f.length),d=0;d<f.length;d++)p[d]=f[d].join("");return u.lines=p,u.graphemeLines=f,u},getMinWidth:function(){return Math.max(this.minWidth,this.dynamicMinWidth)},_removeExtraneousStyles:function(){var h={};for(var u in this._styleMap)this._textLines[u]&&(h[this._styleMap[u].line]=1);for(var u in this.styles)h[u]||delete this.styles[u]},toObject:function(h){return this.callSuper("toObject",["minWidth","splitByGrapheme"].concat(h))}}),l.Textbox.fromObject=function(h,u){var f=l.util.stylesFromArray(h.styles,h.text),p=Object.assign({},h,{styles:f});return l.Object._fromObject("Textbox",p,u,"text")}})(a),(function(){var g=i.controlsUtils,l=g.scaleSkewCursorStyleHandler,h=g.scaleCursorStyleHandler,u=g.scalingEqually,f=g.scalingYOrSkewingX,p=g.scalingXOrSkewingY,d=g.scaleOrSkewActionName,A=i.Object.prototype.controls;if(A.ml=new i.Control({x:-.5,y:0,cursorStyleHandler:l,actionHandler:p,getActionName:d}),A.mr=new i.Control({x:.5,y:0,cursorStyleHandler:l,actionHandler:p,getActionName:d}),A.mb=new i.Control({x:0,y:.5,cursorStyleHandler:l,actionHandler:f,getActionName:d}),A.mt=new i.Control({x:0,y:-.5,cursorStyleHandler:l,actionHandler:f,getActionName:d}),A.tl=new i.Control({x:-.5,y:-.5,cursorStyleHandler:h,actionHandler:u}),A.tr=new i.Control({x:.5,y:-.5,cursorStyleHandler:h,actionHandler:u}),A.bl=new i.Control({x:-.5,y:.5,cursorStyleHandler:h,actionHandler:u}),A.br=new i.Control({x:.5,y:.5,cursorStyleHandler:h,actionHandler:u}),A.mtr=new i.Control({x:0,y:-.5,actionHandler:g.rotationWithSnapping,cursorStyleHandler:g.rotationStyleHandler,offsetY:-40,withConnection:!0,actionName:"rotate"}),i.Textbox){var w=i.Textbox.prototype.controls={};w.mtr=A.mtr,w.tr=A.tr,w.br=A.br,w.tl=A.tl,w.bl=A.bl,w.mt=A.mt,w.mb=A.mb,w.mr=new i.Control({x:.5,y:0,actionHandler:g.changeWidth,cursorStyleHandler:l,actionName:"resizing"}),w.ml=new i.Control({x:-.5,y:0,actionHandler:g.changeWidth,cursorStyleHandler:l,actionName:"resizing"})}})()})(_A)),_A}var Gl=fB();function hB(a){return rB(a).promise.value}function uB(a){return new Promise(i=>{const{onChange:s,open:o}=sB(a);s(v=>{i(v)}),o()})}function dB(a){return new Promise(i=>{const s=document.createElement("img");s.src=a,document.body.appendChild(s),s.onload=()=>{i(s)}})}const pB=(a,i)=>nB({source:a,...i}).copy();function gB(a,i){const s=document.createElement("a");s.href=a,s.download=`${vI()}.${i}`,document.body.appendChild(s),s.click(),s.remove()}function vB(a,i,s,o,v,b,y){y!==void 0&&(a.save(),a.translate(i,s),a.rotate(y),a.drawImage(o,-v/2,-b/2,v,b),a.restore())}const AB=a=>a instanceof Gl.fabric.Image,mB=a=>a instanceof Gl.fabric.Group,bB=a=>a instanceof Gl.fabric.IText,wB=a=>a instanceof Gl.fabric.ActiveSelection;function yB(a){return new Promise(i=>{const s=new FileReader;s.addEventListener("load",()=>{i(s.result)}),s.readAsDataURL(a)})}function xB(a){if(!a)return null;const i=a.split(","),s=i[0].match(/:(.*?);/)[1],o=window.atob(i[1]),v=new ArrayBuffer(o.length),b=new Uint8Array(v);for(let y=0;y<o.length;y++)b[y]=o.charCodeAt(y);return[new Blob([v],{type:s}),s.slice(6)]}const P1={getImgStr:hB,downFile:gB,selectFiles:uB,insertImgFile:dB,clipboardText:pB,drawImg:vB,isImage:AB,isGroup:mB,isIText:bB,isActiveSelection:wB,blobToBase64:yB,base64ToBlob:xB},CB="0.0.8";window&&(window._hprintPrintVersion=CB);Gl.fabric;function TA(a,i,s){const o=a.type==="image",v=p=>p===void 0?void 0:ey(Bn.pxToMm(p,i),s),b=a.left,y=a.top,g=o?a.getScaledWidth():a.width,l=o?a.getScaledHeight():a.height,h=a.strokeWidth,u=a.fontSize,f=a._originSize?.mm||{};a._originSize={...a._originSize,mm:{...f,left:v(b),top:v(y),width:v(g),height:v(l),strokeWidth:v(h),fontSize:v(u)}}}function ma(a){return a.getUnit?.()??"px"}function F1(a,i,s){if(i==="px")return typeof a=="string"?Number(a):a;if(i==="mm")return Bn.mmToPx(a,s,{direct:!0});const o=typeof a=="string"?Number(a):a;return Bn.mmToPx(o*Bn.CONSTANTS.INCH_TO_MM,s,{direct:!0})}function u1(a={},i,s,o=["left","top","width","height","fontSize","boxWidth"]){const v=new Set(o),b={},y={};for(const g of Object.keys(a)){if(!v.has(g))continue;const l=a[g];l!==void 0&&(y[g]=l,b[g]=F1(l,i,s))}return{processed:b,originByUnit:{[i]:y}}}function ey(a,i){if(i===void 0)return a;const s=Math.pow(10,i);return Math.round(a*s)/s}function ip(a,i){if(typeof a=="number")return ey(a,i);if(Array.isArray(a))return a.map(s=>ip(s,i));if(a&&typeof a=="object"){const s={};return Object.keys(a).forEach(o=>{s[o]=ip(a[o],i)}),s}return a}function Aa(a,i){return ip(a,i)}function OA(a,i=2){const s=Number(a).toFixed(i);return s.includes(".")?s.replace(/\.?0+$/,""):s}var ty=typeof global=="object"&&global&&global.Object===Object&&global,IB=typeof self=="object"&&self&&self.Object===Object&&self,ca=ty||IB||Function("return this")(),Ma=ca.Symbol,ry=Object.prototype,EB=ry.hasOwnProperty,BB=ry.toString,tl=Ma?Ma.toStringTag:void 0;function SB(a){var i=EB.call(a,tl),s=a[tl];try{a[tl]=void 0;var o=!0}catch{}var v=BB.call(a);return o&&(i?a[tl]=s:delete a[tl]),v}var kB=Object.prototype,_B=kB.toString;function MB(a){return _B.call(a)}var TB="[object Null]",OB="[object Undefined]",RA=Ma?Ma.toStringTag:void 0;function Ga(a){return a==null?a===void 0?OB:TB:RA&&RA in Object(a)?SB(a):MB(a)}function On(a){return a!=null&&typeof a=="object"}var RB="[object Symbol]";function d1(a){return typeof a=="symbol"||On(a)&&Ga(a)==RB}var DB=NaN;function DA(a){return typeof a=="number"?a:d1(a)?DB:+a}function gn(a,i){for(var s=-1,o=a==null?0:a.length,v=Array(o);++s<o;)v[s]=i(a[s],s,a);return v}var yr=Array.isArray,FA=Ma?Ma.prototype:void 0,QA=FA?FA.toString:void 0;function p1(a){if(typeof a=="string")return a;if(yr(a))return gn(a,p1)+"";if(d1(a))return QA?QA.call(a):"";var i=a+"";return i=="0"&&1/a==-1/0?"-0":i}function Zh(a,i){return function(s,o){var v;if(s===void 0&&o===void 0)return i;if(s!==void 0&&(v=s),o!==void 0){if(v===void 0)return o;typeof s=="string"||typeof o=="string"?(s=p1(s),o=p1(o)):(s=DA(s),o=DA(o)),v=a(s,o)}return v}}var FB=Zh(function(a,i){return a+i},0),QB=/\s/;function iy(a){for(var i=a.length;i--&&QB.test(a.charAt(i)););return i}var jB=/^\s+/;function ny(a){return a&&a.slice(0,iy(a)+1).replace(jB,"")}function Sn(a){var i=typeof a;return a!=null&&(i=="object"||i=="function")}var jA=NaN,NB=/^[-+]0x[0-9a-f]+$/i,PB=/^0b[01]+$/i,UB=/^0o[0-7]+$/i,LB=parseInt;function w1(a){if(typeof a=="number")return a;if(d1(a))return jA;if(Sn(a)){var i=typeof a.valueOf=="function"?a.valueOf():a;a=Sn(i)?i+"":i}if(typeof a!="string")return a===0?a:+a;a=ny(a);var s=PB.test(a);return s||UB.test(a)?LB(a.slice(2),s?2:8):NB.test(a)?jA:+a}var NA=1/0,GB=17976931348623157e292;function Es(a){if(!a)return a===0?a:0;if(a=w1(a),a===NA||a===-NA){var i=a<0?-1:1;return i*GB}return a===a?a:0}function Er(a){var i=Es(a),s=i%1;return i===i?s?i-s:i:0}var YB="Expected a function";function HB(a,i){if(typeof i!="function")throw new TypeError(YB);return a=Er(a),function(){if(--a<1)return i.apply(this,arguments)}}function t1(a){return a}var zB="[object AsyncFunction]",qB="[object Function]",WB="[object GeneratorFunction]",VB="[object Proxy]";function _s(a){if(!Sn(a))return!1;var i=Ga(a);return i==qB||i==WB||i==zB||i==VB}var vf=ca["__core-js_shared__"],PA=(function(){var a=/[^.]+$/.exec(vf&&vf.keys&&vf.keys.IE_PROTO||"");return a?"Symbol(src)_1."+a:""})();function XB(a){return!!PA&&PA in a}var $B=Function.prototype,JB=$B.toString;function _o(a){if(a!=null){try{return JB.call(a)}catch{}try{return a+""}catch{}}return""}var KB=/[\\^$.*+?()[\]{}|]/g,ZB=/^\[object .+?Constructor\]$/,eS=Function.prototype,tS=Object.prototype,rS=eS.toString,iS=tS.hasOwnProperty,nS=RegExp("^"+rS.call(iS).replace(KB,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ay(a){if(!Sn(a)||XB(a))return!1;var i=_s(a)?nS:ZB;return i.test(_o(a))}function aS(a,i){return a?.[i]}function Mo(a,i){var s=aS(a,i);return ay(s)?s:void 0}var Ol=Mo(ca,"WeakMap"),Rf=Ol&&new Ol,sy=Rf?function(a,i){return Rf.set(a,i),a}:t1,UA=Object.create,uc=(function(){function a(){}return function(i){if(!Sn(i))return{};if(UA)return UA(i);a.prototype=i;var s=new a;return a.prototype=void 0,s}})();function Rl(a){return function(){var i=arguments;switch(i.length){case 0:return new a;case 1:return new a(i[0]);case 2:return new a(i[0],i[1]);case 3:return new a(i[0],i[1],i[2]);case 4:return new a(i[0],i[1],i[2],i[3]);case 5:return new a(i[0],i[1],i[2],i[3],i[4]);case 6:return new a(i[0],i[1],i[2],i[3],i[4],i[5]);case 7:return new a(i[0],i[1],i[2],i[3],i[4],i[5],i[6])}var s=uc(a.prototype),o=a.apply(s,i);return Sn(o)?o:s}}var sS=1;function oS(a,i,s){var o=i&sS,v=Rl(a);function b(){var y=this&&this!==ca&&this instanceof b?v:a;return y.apply(o?s:this,arguments)}return b}function g1(a,i,s){switch(s.length){case 0:return a.call(i);case 1:return a.call(i,s[0]);case 2:return a.call(i,s[0],s[1]);case 3:return a.call(i,s[0],s[1],s[2])}return a.apply(i,s)}var cS=Math.max;function oy(a,i,s,o){for(var v=-1,b=a.length,y=s.length,g=-1,l=i.length,h=cS(b-y,0),u=Array(l+h),f=!o;++g<l;)u[g]=i[g];for(;++v<y;)(f||v<b)&&(u[s[v]]=a[v]);for(;h--;)u[g++]=a[v++];return u}var lS=Math.max;function cy(a,i,s,o){for(var v=-1,b=a.length,y=-1,g=s.length,l=-1,h=i.length,u=lS(b-g,0),f=Array(u+h),p=!o;++v<u;)f[v]=a[v];for(var d=v;++l<h;)f[d+l]=i[l];for(;++y<g;)(p||v<b)&&(f[d+s[y]]=a[v++]);return f}function fS(a,i){for(var s=a.length,o=0;s--;)a[s]===i&&++o;return o}function eu(){}var hS=4294967295;function zr(a){this.__wrapped__=a,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=hS,this.__views__=[]}zr.prototype=uc(eu.prototype);zr.prototype.constructor=zr;function Dl(){}var e3=Rf?function(a){return Rf.get(a)}:Dl,tc={},uS=Object.prototype,dS=uS.hasOwnProperty;function Af(a){for(var i=a.name+"",s=tc[i],o=dS.call(tc,i)?s.length:0;o--;){var v=s[o],b=v.func;if(b==null||b==a)return v.name}return i}function x1(a,i){this.__wrapped__=a,this.__actions__=[],this.__chain__=!!i,this.__index__=0,this.__values__=void 0}x1.prototype=uc(eu.prototype);x1.prototype.constructor=x1;function Ja(a,i){var s=-1,o=a.length;for(i||(i=Array(o));++s<o;)i[s]=a[s];return i}function ly(a){if(a instanceof zr)return a.clone();var i=new x1(a.__wrapped__,a.__chain__);return i.__actions__=Ja(a.__actions__),i.__index__=a.__index__,i.__values__=a.__values__,i}var pS=Object.prototype,gS=pS.hasOwnProperty;function J(a){if(On(a)&&!yr(a)&&!(a instanceof zr)){if(a instanceof x1)return a;if(gS.call(a,"__wrapped__"))return ly(a)}return new x1(a)}J.prototype=eu.prototype;J.prototype.constructor=J;function np(a){var i=Af(a),s=J[i];if(typeof s!="function"||!(i in zr.prototype))return!1;if(a===s)return!0;var o=e3(s);return!!o&&a===o[0]}var vS=800,AS=16,mS=Date.now;function fy(a){var i=0,s=0;return function(){var o=mS(),v=AS-(o-s);if(s=o,v>0){if(++i>=vS)return arguments[0]}else i=0;return a.apply(void 0,arguments)}}var hy=fy(sy),bS=/\{\n\/\* \[wrapped with (.+)\] \*/,wS=/,? & /;function yS(a){var i=a.match(bS);return i?i[1].split(wS):[]}var xS=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function CS(a,i){var s=i.length;if(!s)return a;var o=s-1;return i[o]=(s>1?"& ":"")+i[o],i=i.join(s>2?", ":" "),a.replace(xS,`{
|
|
442
442
|
/* [wrapped with `+i+`] */
|
|
443
443
|
`)}function t3(a){return function(){return a}}var Df=(function(){try{var a=Mo(Object,"defineProperty");return a({},"",{}),a}catch{}})(),IS=Df?function(a,i){return Df(a,"toString",{configurable:!0,enumerable:!1,value:t3(i),writable:!0})}:t1,r3=fy(IS);function B1(a,i){for(var s=-1,o=a==null?0:a.length;++s<o&&i(a[s],s,a)!==!1;);return a}function tu(a,i,s,o){for(var v=a.length,b=s+(o?1:-1);o?b--:++b<v;)if(i(a[b],b,a))return b;return-1}function uy(a){return a!==a}function ES(a,i,s){for(var o=s-1,v=a.length;++o<v;)if(a[o]===i)return o;return-1}function dc(a,i,s){return i===i?ES(a,i,s):tu(a,uy,s)}function ru(a,i){var s=a==null?0:a.length;return!!s&&dc(a,i,0)>-1}var BS=1,SS=2,kS=8,_S=16,MS=32,TS=64,OS=128,RS=256,DS=512,FS=[["ary",OS],["bind",BS],["bindKey",SS],["curry",kS],["curryRight",_S],["flip",DS],["partial",MS],["partialRight",TS],["rearg",RS]];function QS(a,i){return B1(FS,function(s){var o="_."+s[0];i&s[1]&&!ru(a,o)&&a.push(o)}),a.sort()}function dy(a,i,s){var o=i+"";return r3(a,CS(o,QS(yS(o),s)))}var jS=4,NS=8,LA=32,GA=64;function py(a,i,s,o,v,b,y,g,l,h){var u=i&NS,f=u?y:void 0,p=u?void 0:y,d=u?b:void 0,A=u?void 0:b;i|=u?LA:GA,i&=~(u?GA:LA),i&jS||(i&=-4);var w=[a,i,v,d,f,A,p,g,l,h],m=s.apply(void 0,w);return np(a)&&hy(m,w),m.placeholder=o,dy(m,a,i)}function pc(a){var i=a;return i.placeholder}var PS=9007199254740991,US=/^(?:0|[1-9]\d*)$/;function Ms(a,i){var s=typeof a;return i=i??PS,!!i&&(s=="number"||s!="symbol"&&US.test(a))&&a>-1&&a%1==0&&a<i}var LS=Math.min;function GS(a,i){for(var s=a.length,o=LS(i.length,s),v=Ja(a);o--;){var b=i[o];a[o]=Ms(b,s)?v[b]:void 0}return a}var YA="__lodash_placeholder__";function Js(a,i){for(var s=-1,o=a.length,v=0,b=[];++s<o;){var y=a[s];(y===i||y===YA)&&(a[s]=YA,b[v++]=s)}return b}var YS=1,HS=2,zS=8,qS=16,WS=128,VS=512;function iu(a,i,s,o,v,b,y,g,l,h){var u=i&WS,f=i&YS,p=i&HS,d=i&(zS|qS),A=i&VS,w=p?void 0:Rl(a);function m(){for(var x=arguments.length,C=Array(x),E=x;E--;)C[E]=arguments[E];if(d)var B=pc(m),k=fS(C,B);if(o&&(C=oy(C,o,v,d)),b&&(C=cy(C,b,y,d)),x-=k,d&&x<h){var M=Js(C,B);return py(a,i,iu,m.placeholder,s,C,M,g,l,h-x)}var T=f?s:this,D=p?T[a]:a;return x=C.length,g?C=GS(C,g):A&&x>1&&C.reverse(),u&&l<x&&(C.length=l),this&&this!==ca&&this instanceof m&&(D=w||Rl(D)),D.apply(T,C)}return m}function XS(a,i,s){var o=Rl(a);function v(){for(var b=arguments.length,y=Array(b),g=b,l=pc(v);g--;)y[g]=arguments[g];var h=b<3&&y[0]!==l&&y[b-1]!==l?[]:Js(y,l);if(b-=h.length,b<s)return py(a,i,iu,v.placeholder,void 0,y,h,void 0,void 0,s-b);var u=this&&this!==ca&&this instanceof v?o:a;return g1(u,this,y)}return v}var $S=1;function JS(a,i,s,o){var v=i&$S,b=Rl(a);function y(){for(var g=-1,l=arguments.length,h=-1,u=o.length,f=Array(u+l),p=this&&this!==ca&&this instanceof y?b:a;++h<u;)f[h]=o[h];for(;l--;)f[h++]=arguments[++g];return g1(p,v?s:this,f)}return y}var HA="__lodash_placeholder__",D0=1,KS=2,ZS=4,zA=8,rl=128,qA=256,ek=Math.min;function tk(a,i){var s=a[1],o=i[1],v=s|o,b=v<(D0|KS|rl),y=o==rl&&s==zA||o==rl&&s==qA&&a[7].length<=i[8]||o==(rl|qA)&&i[7].length<=i[8]&&s==zA;if(!(b||y))return a;o&D0&&(a[2]=i[2],v|=s&D0?0:ZS);var g=i[3];if(g){var l=a[3];a[3]=l?oy(l,g,i[4]):g,a[4]=l?Js(a[3],HA):i[4]}return g=i[5],g&&(l=a[5],a[5]=l?cy(l,g,i[6]):g,a[6]=l?Js(a[5],HA):i[6]),g=i[7],g&&(a[7]=g),o&rl&&(a[8]=a[8]==null?i[8]:ek(a[8],i[8])),a[9]==null&&(a[9]=i[9]),a[0]=i[0],a[1]=v,a}var rk="Expected a function",WA=1,ik=2,VA=8,XA=16,$A=32,nk=64,JA=Math.max;function Ts(a,i,s,o,v,b,y,g){var l=i&ik;if(!l&&typeof a!="function")throw new TypeError(rk);var h=o?o.length:0;if(h||(i&=-97,o=v=void 0),y=y===void 0?y:JA(Er(y),0),g=g===void 0?g:Er(g),h-=v?v.length:0,i&nk){var u=o,f=v;o=v=void 0}var p=l?void 0:e3(a),d=[a,i,s,o,v,u,f,b,y,g];if(p&&tk(d,p),a=d[0],i=d[1],s=d[2],o=d[3],v=d[4],g=d[9]=d[9]===void 0?l?0:a.length:JA(d[9]-h,0),!g&&i&(VA|XA)&&(i&=-25),!i||i==WA)var A=oS(a,i,s);else i==VA||i==XA?A=XS(a,i,g):(i==$A||i==(WA|$A))&&!v.length?A=JS(a,i,s,o):A=iu.apply(void 0,d);var w=p?sy:hy;return dy(w(A,d),a,i)}var ak=128;function gy(a,i,s){return i=s?void 0:i,i=a&&i==null?a.length:i,Ts(a,ak,void 0,void 0,void 0,void 0,i)}function Os(a,i,s){i=="__proto__"&&Df?Df(a,i,{configurable:!0,enumerable:!0,value:s,writable:!0}):a[i]=s}function Y1(a,i){return a===i||a!==a&&i!==i}var sk=Object.prototype,ok=sk.hasOwnProperty;function Yl(a,i,s){var o=a[i];(!(ok.call(a,i)&&Y1(o,s))||s===void 0&&!(i in a))&&Os(a,i,s)}function cs(a,i,s,o){var v=!s;s||(s={});for(var b=-1,y=i.length;++b<y;){var g=i[b],l=o?o(s[g],a[g],g,s,a):void 0;l===void 0&&(l=a[g]),v?Os(s,g,l):Yl(s,g,l)}return s}var KA=Math.max;function vy(a,i,s){return i=KA(i===void 0?a.length-1:i,0),function(){for(var o=arguments,v=-1,b=KA(o.length-i,0),y=Array(b);++v<b;)y[v]=o[i+v];v=-1;for(var g=Array(i+1);++v<i;)g[v]=o[v];return g[i]=s(y),g1(a,this,g)}}function Mr(a,i){return r3(vy(a,i,t1),a+"")}var ck=9007199254740991;function nu(a){return typeof a=="number"&&a>-1&&a%1==0&&a<=ck}function r1(a){return a!=null&&nu(a.length)&&!_s(a)}function La(a,i,s){if(!Sn(s))return!1;var o=typeof i;return(o=="number"?r1(s)&&Ms(i,s.length):o=="string"&&i in s)?Y1(s[i],a):!1}function gc(a){return Mr(function(i,s){var o=-1,v=s.length,b=v>1?s[v-1]:void 0,y=v>2?s[2]:void 0;for(b=a.length>3&&typeof b=="function"?(v--,b):void 0,y&&La(s[0],s[1],y)&&(b=v<3?void 0:b,v=1),i=Object(i);++o<v;){var g=s[o];g&&a(i,g,o,b)}return i})}var lk=Object.prototype;function Hl(a){var i=a&&a.constructor,s=typeof i=="function"&&i.prototype||lk;return a===s}function i3(a,i){for(var s=-1,o=Array(a);++s<a;)o[s]=i(s);return o}var fk="[object Arguments]";function ZA(a){return On(a)&&Ga(a)==fk}var Ay=Object.prototype,hk=Ay.hasOwnProperty,uk=Ay.propertyIsEnumerable,Eo=ZA((function(){return arguments})())?ZA:function(a){return On(a)&&hk.call(a,"callee")&&!uk.call(a,"callee")};function n3(){return!1}var my=typeof exports=="object"&&exports&&!exports.nodeType&&exports,em=my&&typeof module=="object"&&module&&!module.nodeType&&module,dk=em&&em.exports===my,tm=dk?ca.Buffer:void 0,pk=tm?tm.isBuffer:void 0,Ks=pk||n3,gk="[object Arguments]",vk="[object Array]",Ak="[object Boolean]",mk="[object Date]",bk="[object Error]",wk="[object Function]",yk="[object Map]",xk="[object Number]",Ck="[object Object]",Ik="[object RegExp]",Ek="[object Set]",Bk="[object String]",Sk="[object WeakMap]",kk="[object ArrayBuffer]",_k="[object DataView]",Mk="[object Float32Array]",Tk="[object Float64Array]",Ok="[object Int8Array]",Rk="[object Int16Array]",Dk="[object Int32Array]",Fk="[object Uint8Array]",Qk="[object Uint8ClampedArray]",jk="[object Uint16Array]",Nk="[object Uint32Array]",cn={};cn[Mk]=cn[Tk]=cn[Ok]=cn[Rk]=cn[Dk]=cn[Fk]=cn[Qk]=cn[jk]=cn[Nk]=!0;cn[gk]=cn[vk]=cn[kk]=cn[Ak]=cn[_k]=cn[mk]=cn[bk]=cn[wk]=cn[yk]=cn[xk]=cn[Ck]=cn[Ik]=cn[Ek]=cn[Bk]=cn[Sk]=!1;function Pk(a){return On(a)&&nu(a.length)&&!!cn[Ga(a)]}function v1(a){return function(i){return a(i)}}var by=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Al=by&&typeof module=="object"&&module&&!module.nodeType&&module,Uk=Al&&Al.exports===by,F0=Uk&&ty.process,C1=(function(){try{var a=Al&&Al.require&&Al.require("util").types;return a||F0&&F0.binding&&F0.binding("util")}catch{}})(),rm=C1&&C1.isTypedArray,vc=rm?v1(rm):Pk,Lk=Object.prototype,Gk=Lk.hasOwnProperty;function wy(a,i){var s=yr(a),o=!s&&Eo(a),v=!s&&!o&&Ks(a),b=!s&&!o&&!v&&vc(a),y=s||o||v||b,g=y?i3(a.length,String):[],l=g.length;for(var h in a)(i||Gk.call(a,h))&&!(y&&(h=="length"||v&&(h=="offset"||h=="parent")||b&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||Ms(h,l)))&&g.push(h);return g}function yy(a,i){return function(s){return a(i(s))}}var Yk=yy(Object.keys,Object),Hk=Object.prototype,zk=Hk.hasOwnProperty;function a3(a){if(!Hl(a))return Yk(a);var i=[];for(var s in Object(a))zk.call(a,s)&&s!="constructor"&&i.push(s);return i}function la(a){return r1(a)?wy(a):a3(a)}var qk=Object.prototype,Wk=qk.hasOwnProperty,Vk=gc(function(a,i){if(Hl(i)||r1(i)){cs(i,la(i),a);return}for(var s in i)Wk.call(i,s)&&Yl(a,s,i[s])});function Xk(a){var i=[];if(a!=null)for(var s in Object(a))i.push(s);return i}var $k=Object.prototype,Jk=$k.hasOwnProperty;function Kk(a){if(!Sn(a))return Xk(a);var i=Hl(a),s=[];for(var o in a)o=="constructor"&&(i||!Jk.call(a,o))||s.push(o);return s}function i1(a){return r1(a)?wy(a,!0):Kk(a)}var Zk=gc(function(a,i){cs(i,i1(i),a)}),ap=gc(function(a,i,s,o){cs(i,i1(i),a,o)}),e_=gc(function(a,i,s,o){cs(i,la(i),a,o)}),t_=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r_=/^\w*$/;function s3(a,i){if(yr(a))return!1;var s=typeof a;return s=="number"||s=="symbol"||s=="boolean"||a==null||d1(a)?!0:r_.test(a)||!t_.test(a)||i!=null&&a in Object(i)}var Fl=Mo(Object,"create");function i_(){this.__data__=Fl?Fl(null):{},this.size=0}function n_(a){var i=this.has(a)&&delete this.__data__[a];return this.size-=i?1:0,i}var a_="__lodash_hash_undefined__",s_=Object.prototype,o_=s_.hasOwnProperty;function c_(a){var i=this.__data__;if(Fl){var s=i[a];return s===a_?void 0:s}return o_.call(i,a)?i[a]:void 0}var l_=Object.prototype,f_=l_.hasOwnProperty;function h_(a){var i=this.__data__;return Fl?i[a]!==void 0:f_.call(i,a)}var u_="__lodash_hash_undefined__";function d_(a,i){var s=this.__data__;return this.size+=this.has(a)?0:1,s[a]=Fl&&i===void 0?u_:i,this}function Bo(a){var i=-1,s=a==null?0:a.length;for(this.clear();++i<s;){var o=a[i];this.set(o[0],o[1])}}Bo.prototype.clear=i_;Bo.prototype.delete=n_;Bo.prototype.get=c_;Bo.prototype.has=h_;Bo.prototype.set=d_;function p_(){this.__data__=[],this.size=0}function au(a,i){for(var s=a.length;s--;)if(Y1(a[s][0],i))return s;return-1}var g_=Array.prototype,v_=g_.splice;function A_(a){var i=this.__data__,s=au(i,a);if(s<0)return!1;var o=i.length-1;return s==o?i.pop():v_.call(i,s,1),--this.size,!0}function m_(a){var i=this.__data__,s=au(i,a);return s<0?void 0:i[s][1]}function b_(a){return au(this.__data__,a)>-1}function w_(a,i){var s=this.__data__,o=au(s,a);return o<0?(++this.size,s.push([a,i])):s[o][1]=i,this}function Rs(a){var i=-1,s=a==null?0:a.length;for(this.clear();++i<s;){var o=a[i];this.set(o[0],o[1])}}Rs.prototype.clear=p_;Rs.prototype.delete=A_;Rs.prototype.get=m_;Rs.prototype.has=b_;Rs.prototype.set=w_;var Ql=Mo(ca,"Map");function y_(){this.size=0,this.__data__={hash:new Bo,map:new(Ql||Rs),string:new Bo}}function x_(a){var i=typeof a;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?a!=="__proto__":a===null}function su(a,i){var s=a.__data__;return x_(i)?s[typeof i=="string"?"string":"hash"]:s.map}function C_(a){var i=su(this,a).delete(a);return this.size-=i?1:0,i}function I_(a){return su(this,a).get(a)}function E_(a){return su(this,a).has(a)}function B_(a,i){var s=su(this,a),o=s.size;return s.set(a,i),this.size+=s.size==o?0:1,this}function Ds(a){var i=-1,s=a==null?0:a.length;for(this.clear();++i<s;){var o=a[i];this.set(o[0],o[1])}}Ds.prototype.clear=y_;Ds.prototype.delete=C_;Ds.prototype.get=I_;Ds.prototype.has=E_;Ds.prototype.set=B_;var S_="Expected a function";function ou(a,i){if(typeof a!="function"||i!=null&&typeof i!="function")throw new TypeError(S_);var s=function(){var o=arguments,v=i?i.apply(this,o):o[0],b=s.cache;if(b.has(v))return b.get(v);var y=a.apply(this,o);return s.cache=b.set(v,y)||b,y};return s.cache=new(ou.Cache||Ds),s}ou.Cache=Ds;var k_=500;function __(a){var i=ou(a,function(o){return s.size===k_&&s.clear(),o}),s=i.cache;return i}var M_=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,T_=/\\(\\)?/g,xy=__(function(a){var i=[];return a.charCodeAt(0)===46&&i.push(""),a.replace(M_,function(s,o,v,b){i.push(v?b.replace(T_,"$1"):o||s)}),i});function yi(a){return a==null?"":p1(a)}function to(a,i){return yr(a)?a:s3(a,i)?[a]:xy(yi(a))}function ls(a){if(typeof a=="string"||d1(a))return a;var i=a+"";return i=="0"&&1/a==-1/0?"-0":i}function To(a,i){i=to(i,a);for(var s=0,o=i.length;a!=null&&s<o;)a=a[ls(i[s++])];return s&&s==o?a:void 0}function jl(a,i,s){var o=a==null?void 0:To(a,i);return o===void 0?s:o}function o3(a,i){for(var s=-1,o=i.length,v=Array(o),b=a==null;++s<o;)v[s]=b?void 0:jl(a,i[s]);return v}function ro(a,i){for(var s=-1,o=i.length,v=a.length;++s<o;)a[v+s]=i[s];return a}var im=Ma?Ma.isConcatSpreadable:void 0;function O_(a){return yr(a)||Eo(a)||!!(im&&a&&a[im])}function wa(a,i,s,o,v){var b=-1,y=a.length;for(s||(s=O_),v||(v=[]);++b<y;){var g=a[b];i>0&&s(g)?i>1?wa(g,i-1,s,o,v):ro(v,g):o||(v[v.length]=g)}return v}function Cy(a){var i=a==null?0:a.length;return i?wa(a,1):[]}function Fs(a){return r3(vy(a,void 0,Cy),a+"")}var R_=Fs(o3),cu=yy(Object.getPrototypeOf,Object),D_="[object Object]",F_=Function.prototype,Q_=Object.prototype,Iy=F_.toString,j_=Q_.hasOwnProperty,N_=Iy.call(Object);function zl(a){if(!On(a)||Ga(a)!=D_)return!1;var i=cu(a);if(i===null)return!0;var s=j_.call(i,"constructor")&&i.constructor;return typeof s=="function"&&s instanceof s&&Iy.call(s)==N_}var P_="[object DOMException]",U_="[object Error]";function c3(a){if(!On(a))return!1;var i=Ga(a);return i==U_||i==P_||typeof a.message=="string"&&typeof a.name=="string"&&!zl(a)}var Ey=Mr(function(a,i){try{return g1(a,void 0,i)}catch(s){return c3(s)?s:new Error(s)}}),L_="Expected a function";function By(a,i){var s;if(typeof i!="function")throw new TypeError(L_);return a=Er(a),function(){return--a>0&&(s=i.apply(this,arguments)),a<=1&&(i=void 0),s}}var G_=1,Y_=32,lu=Mr(function(a,i,s){var o=G_;if(s.length){var v=Js(s,pc(lu));o|=Y_}return Ts(a,o,i,s,v)});lu.placeholder={};var H_=Fs(function(a,i){return B1(i,function(s){s=ls(s),Os(a,s,lu(a[s],a))}),a}),z_=1,q_=2,W_=32,l3=Mr(function(a,i,s){var o=z_|q_;if(s.length){var v=Js(s,pc(l3));o|=W_}return Ts(i,o,a,s,v)});l3.placeholder={};function I1(a,i,s){var o=-1,v=a.length;i<0&&(i=-i>v?0:v+i),s=s>v?v:s,s<0&&(s+=v),v=i>s?0:s-i>>>0,i>>>=0;for(var b=Array(v);++o<v;)b[o]=a[o+i];return b}function io(a,i,s){var o=a.length;return s=s===void 0?o:s,!i&&s>=o?a:I1(a,i,s)}var V_="\\ud800-\\udfff",X_="\\u0300-\\u036f",$_="\\ufe20-\\ufe2f",J_="\\u20d0-\\u20ff",K_=X_+$_+J_,Z_="\\ufe0e\\ufe0f",eM="\\u200d",tM=RegExp("["+eM+V_+K_+Z_+"]");function Ac(a){return tM.test(a)}function rM(a){return a.split("")}var Sy="\\ud800-\\udfff",iM="\\u0300-\\u036f",nM="\\ufe20-\\ufe2f",aM="\\u20d0-\\u20ff",sM=iM+nM+aM,oM="\\ufe0e\\ufe0f",cM="["+Sy+"]",sp="["+sM+"]",op="\\ud83c[\\udffb-\\udfff]",lM="(?:"+sp+"|"+op+")",ky="[^"+Sy+"]",_y="(?:\\ud83c[\\udde6-\\uddff]){2}",My="[\\ud800-\\udbff][\\udc00-\\udfff]",fM="\\u200d",Ty=lM+"?",Oy="["+oM+"]?",hM="(?:"+fM+"(?:"+[ky,_y,My].join("|")+")"+Oy+Ty+")*",uM=Oy+Ty+hM,dM="(?:"+[ky+sp+"?",sp,_y,My,cM].join("|")+")",pM=RegExp(op+"(?="+op+")|"+dM+uM,"g");function gM(a){return a.match(pM)||[]}function L1(a){return Ac(a)?gM(a):rM(a)}function Ry(a){return function(i){i=yi(i);var s=Ac(i)?L1(i):void 0,o=s?s[0]:i.charAt(0),v=s?io(s,1).join(""):i.slice(1);return o[a]()+v}}var f3=Ry("toUpperCase");function Dy(a){return f3(yi(a).toLowerCase())}function h3(a,i,s,o){var v=-1,b=a==null?0:a.length;for(o&&b&&(s=a[++v]);++v<b;)s=i(s,a[v],v,a);return s}function u3(a){return function(i){return a?.[i]}}var vM={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},AM=u3(vM),mM=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,bM="\\u0300-\\u036f",wM="\\ufe20-\\ufe2f",yM="\\u20d0-\\u20ff",xM=bM+wM+yM,CM="["+xM+"]",IM=RegExp(CM,"g");function Fy(a){return a=yi(a),a&&a.replace(mM,AM).replace(IM,"")}var EM=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function BM(a){return a.match(EM)||[]}var SM=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function kM(a){return SM.test(a)}var Qy="\\ud800-\\udfff",_M="\\u0300-\\u036f",MM="\\ufe20-\\ufe2f",TM="\\u20d0-\\u20ff",OM=_M+MM+TM,jy="\\u2700-\\u27bf",Ny="a-z\\xdf-\\xf6\\xf8-\\xff",RM="\\xac\\xb1\\xd7\\xf7",DM="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",FM="\\u2000-\\u206f",QM=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Py="A-Z\\xc0-\\xd6\\xd8-\\xde",jM="\\ufe0e\\ufe0f",Uy=RM+DM+FM+QM,Ly="['’]",nm="["+Uy+"]",NM="["+OM+"]",Gy="\\d+",PM="["+jy+"]",Yy="["+Ny+"]",Hy="[^"+Qy+Uy+Gy+jy+Ny+Py+"]",UM="\\ud83c[\\udffb-\\udfff]",LM="(?:"+NM+"|"+UM+")",GM="[^"+Qy+"]",zy="(?:\\ud83c[\\udde6-\\uddff]){2}",qy="[\\ud800-\\udbff][\\udc00-\\udfff]",qo="["+Py+"]",YM="\\u200d",am="(?:"+Yy+"|"+Hy+")",HM="(?:"+qo+"|"+Hy+")",sm="(?:"+Ly+"(?:d|ll|m|re|s|t|ve))?",om="(?:"+Ly+"(?:D|LL|M|RE|S|T|VE))?",Wy=LM+"?",Vy="["+jM+"]?",zM="(?:"+YM+"(?:"+[GM,zy,qy].join("|")+")"+Vy+Wy+")*",qM="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",WM="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",VM=Vy+Wy+zM,XM="(?:"+[PM,zy,qy].join("|")+")"+VM,$M=RegExp([qo+"?"+Yy+"+"+sm+"(?="+[nm,qo,"$"].join("|")+")",HM+"+"+om+"(?="+[nm,qo+am,"$"].join("|")+")",qo+"?"+am+"+"+sm,qo+"+"+om,WM,qM,Gy,XM].join("|"),"g");function JM(a){return a.match($M)||[]}function Xy(a,i,s){return a=yi(a),i=s?void 0:i,i===void 0?kM(a)?JM(a):BM(a):a.match(i)||[]}var KM="['’]",ZM=RegExp(KM,"g");function mc(a){return function(i){return h3(Xy(Fy(i).replace(ZM,"")),a,"")}}var eT=mc(function(a,i,s){return i=i.toLowerCase(),a+(s?Dy(i):i)});function tT(){if(!arguments.length)return[];var a=arguments[0];return yr(a)?a:[a]}var rT=ca.isFinite,iT=Math.min;function d3(a){var i=Math[a];return function(s,o){if(s=w1(s),o=o==null?0:iT(Er(o),292),o&&rT(s)){var v=(yi(s)+"e").split("e"),b=i(v[0]+"e"+(+v[1]+o));return v=(yi(b)+"e").split("e"),+(v[0]+"e"+(+v[1]-o))}return i(s)}}var nT=d3("ceil");function $y(a){var i=J(a);return i.__chain__=!0,i}var aT=Math.ceil,sT=Math.max;function oT(a,i,s){(s?La(a,i,s):i===void 0)?i=1:i=sT(Er(i),0);var o=a==null?0:a.length;if(!o||i<1)return[];for(var v=0,b=0,y=Array(aT(o/i));v<o;)y[b++]=I1(a,v,v+=i);return y}function Oo(a,i,s){return a===a&&(s!==void 0&&(a=a<=s?a:s),i!==void 0&&(a=a>=i?a:i)),a}function cT(a,i,s){return s===void 0&&(s=i,i=void 0),s!==void 0&&(s=w1(s),s=s===s?s:0),i!==void 0&&(i=w1(i),i=i===i?i:0),Oo(w1(a),i,s)}function lT(){this.__data__=new Rs,this.size=0}function fT(a){var i=this.__data__,s=i.delete(a);return this.size=i.size,s}function hT(a){return this.__data__.get(a)}function uT(a){return this.__data__.has(a)}var dT=200;function pT(a,i){var s=this.__data__;if(s instanceof Rs){var o=s.__data__;if(!Ql||o.length<dT-1)return o.push([a,i]),this.size=++s.size,this;s=this.__data__=new Ds(o)}return s.set(a,i),this.size=s.size,this}function U1(a){var i=this.__data__=new Rs(a);this.size=i.size}U1.prototype.clear=lT;U1.prototype.delete=fT;U1.prototype.get=hT;U1.prototype.has=uT;U1.prototype.set=pT;function Jy(a,i){return a&&cs(i,la(i),a)}function gT(a,i){return a&&cs(i,i1(i),a)}var Ky=typeof exports=="object"&&exports&&!exports.nodeType&&exports,cm=Ky&&typeof module=="object"&&module&&!module.nodeType&&module,vT=cm&&cm.exports===Ky,lm=vT?ca.Buffer:void 0,fm=lm?lm.allocUnsafe:void 0;function Zy(a,i){if(i)return a.slice();var s=a.length,o=fm?fm(s):new a.constructor(s);return a.copy(o),o}function no(a,i){for(var s=-1,o=a==null?0:a.length,v=0,b=[];++s<o;){var y=a[s];i(y,s,a)&&(b[v++]=y)}return b}function p3(){return[]}var AT=Object.prototype,mT=AT.propertyIsEnumerable,hm=Object.getOwnPropertySymbols,g3=hm?function(a){return a==null?[]:(a=Object(a),no(hm(a),function(i){return mT.call(a,i)}))}:p3;function bT(a,i){return cs(a,g3(a),i)}var wT=Object.getOwnPropertySymbols,e6=wT?function(a){for(var i=[];a;)ro(i,g3(a)),a=cu(a);return i}:p3;function yT(a,i){return cs(a,e6(a),i)}function t6(a,i,s){var o=i(a);return yr(a)?o:ro(o,s(a))}function cp(a){return t6(a,la,g3)}function v3(a){return t6(a,i1,e6)}var lp=Mo(ca,"DataView"),fp=Mo(ca,"Promise"),rc=Mo(ca,"Set"),um="[object Map]",xT="[object Object]",dm="[object Promise]",pm="[object Set]",gm="[object WeakMap]",vm="[object DataView]",CT=_o(lp),IT=_o(Ql),ET=_o(fp),BT=_o(rc),ST=_o(Ol),Sa=Ga;(lp&&Sa(new lp(new ArrayBuffer(1)))!=vm||Ql&&Sa(new Ql)!=um||fp&&Sa(fp.resolve())!=dm||rc&&Sa(new rc)!=pm||Ol&&Sa(new Ol)!=gm)&&(Sa=function(a){var i=Ga(a),s=i==xT?a.constructor:void 0,o=s?_o(s):"";if(o)switch(o){case CT:return vm;case IT:return um;case ET:return dm;case BT:return pm;case ST:return gm}return i});var kT=Object.prototype,_T=kT.hasOwnProperty;function MT(a){var i=a.length,s=new a.constructor(i);return i&&typeof a[0]=="string"&&_T.call(a,"index")&&(s.index=a.index,s.input=a.input),s}var Ff=ca.Uint8Array;function A3(a){var i=new a.constructor(a.byteLength);return new Ff(i).set(new Ff(a)),i}function TT(a,i){var s=i?A3(a.buffer):a.buffer;return new a.constructor(s,a.byteOffset,a.byteLength)}var OT=/\w*$/;function RT(a){var i=new a.constructor(a.source,OT.exec(a));return i.lastIndex=a.lastIndex,i}var Am=Ma?Ma.prototype:void 0,mm=Am?Am.valueOf:void 0;function DT(a){return mm?Object(mm.call(a)):{}}function r6(a,i){var s=i?A3(a.buffer):a.buffer;return new a.constructor(s,a.byteOffset,a.length)}var FT="[object Boolean]",QT="[object Date]",jT="[object Map]",NT="[object Number]",PT="[object RegExp]",UT="[object Set]",LT="[object String]",GT="[object Symbol]",YT="[object ArrayBuffer]",HT="[object DataView]",zT="[object Float32Array]",qT="[object Float64Array]",WT="[object Int8Array]",VT="[object Int16Array]",XT="[object Int32Array]",$T="[object Uint8Array]",JT="[object Uint8ClampedArray]",KT="[object Uint16Array]",ZT="[object Uint32Array]";function eO(a,i,s){var o=a.constructor;switch(i){case YT:return A3(a);case FT:case QT:return new o(+a);case HT:return TT(a,s);case zT:case qT:case WT:case VT:case XT:case $T:case JT:case KT:case ZT:return r6(a,s);case jT:return new o;case NT:case LT:return new o(a);case PT:return RT(a);case UT:return new o;case GT:return DT(a)}}function i6(a){return typeof a.constructor=="function"&&!Hl(a)?uc(cu(a)):{}}var tO="[object Map]";function rO(a){return On(a)&&Sa(a)==tO}var bm=C1&&C1.isMap,n6=bm?v1(bm):rO,iO="[object Set]";function nO(a){return On(a)&&Sa(a)==iO}var wm=C1&&C1.isSet,a6=wm?v1(wm):nO,aO=1,sO=2,oO=4,s6="[object Arguments]",cO="[object Array]",lO="[object Boolean]",fO="[object Date]",hO="[object Error]",o6="[object Function]",uO="[object GeneratorFunction]",dO="[object Map]",pO="[object Number]",c6="[object Object]",gO="[object RegExp]",vO="[object Set]",AO="[object String]",mO="[object Symbol]",bO="[object WeakMap]",wO="[object ArrayBuffer]",yO="[object DataView]",xO="[object Float32Array]",CO="[object Float64Array]",IO="[object Int8Array]",EO="[object Int16Array]",BO="[object Int32Array]",SO="[object Uint8Array]",kO="[object Uint8ClampedArray]",_O="[object Uint16Array]",MO="[object Uint32Array]",$i={};$i[s6]=$i[cO]=$i[wO]=$i[yO]=$i[lO]=$i[fO]=$i[xO]=$i[CO]=$i[IO]=$i[EO]=$i[BO]=$i[dO]=$i[pO]=$i[c6]=$i[gO]=$i[vO]=$i[AO]=$i[mO]=$i[SO]=$i[kO]=$i[_O]=$i[MO]=!0;$i[hO]=$i[o6]=$i[bO]=!1;function y1(a,i,s,o,v,b){var y,g=i&aO,l=i&sO,h=i&oO;if(s&&(y=v?s(a,o,v,b):s(a)),y!==void 0)return y;if(!Sn(a))return a;var u=yr(a);if(u){if(y=MT(a),!g)return Ja(a,y)}else{var f=Sa(a),p=f==o6||f==uO;if(Ks(a))return Zy(a,g);if(f==c6||f==s6||p&&!v){if(y=l||p?{}:i6(a),!g)return l?yT(a,gT(y,a)):bT(a,Jy(y,a))}else{if(!$i[f])return v?a:{};y=eO(a,f,g)}}b||(b=new U1);var d=b.get(a);if(d)return d;b.set(a,y),a6(a)?a.forEach(function(m){y.add(y1(m,i,s,m,a,b))}):n6(a)&&a.forEach(function(m,x){y.set(x,y1(m,i,s,x,a,b))});var A=h?l?v3:cp:l?i1:la,w=u?void 0:A(a);return B1(w||a,function(m,x){w&&(x=m,m=a[x]),Yl(y,x,y1(m,i,s,x,a,b))}),y}var TO=4;function OO(a){return y1(a,TO)}var RO=1,DO=4;function l6(a){return y1(a,RO|DO)}var FO=1,QO=4;function jO(a,i){return i=typeof i=="function"?i:void 0,y1(a,FO|QO,i)}var NO=4;function PO(a,i){return i=typeof i=="function"?i:void 0,y1(a,NO,i)}function UO(){return new x1(this.value(),this.__chain__)}function LO(a){for(var i=-1,s=a==null?0:a.length,o=0,v=[];++i<s;){var b=a[i];b&&(v[o++]=b)}return v}function GO(){var a=arguments.length;if(!a)return[];for(var i=Array(a-1),s=arguments[0],o=a;o--;)i[o-1]=arguments[o];return ro(yr(s)?Ja(s):[s],wa(i,1))}var YO="__lodash_hash_undefined__";function HO(a){return this.__data__.set(a,YO),this}function zO(a){return this.__data__.has(a)}function So(a){var i=-1,s=a==null?0:a.length;for(this.__data__=new Ds;++i<s;)this.add(a[i])}So.prototype.add=So.prototype.push=HO;So.prototype.has=zO;function m3(a,i){for(var s=-1,o=a==null?0:a.length;++s<o;)if(i(a[s],s,a))return!0;return!1}function Nl(a,i){return a.has(i)}var qO=1,WO=2;function f6(a,i,s,o,v,b){var y=s&qO,g=a.length,l=i.length;if(g!=l&&!(y&&l>g))return!1;var h=b.get(a),u=b.get(i);if(h&&u)return h==i&&u==a;var f=-1,p=!0,d=s&WO?new So:void 0;for(b.set(a,i),b.set(i,a);++f<g;){var A=a[f],w=i[f];if(o)var m=y?o(w,A,f,i,a,b):o(A,w,f,a,i,b);if(m!==void 0){if(m)continue;p=!1;break}if(d){if(!m3(i,function(x,C){if(!Nl(d,C)&&(A===x||v(A,x,s,o,b)))return d.push(C)})){p=!1;break}}else if(!(A===w||v(A,w,s,o,b))){p=!1;break}}return b.delete(a),b.delete(i),p}function b3(a){var i=-1,s=Array(a.size);return a.forEach(function(o,v){s[++i]=[v,o]}),s}function fu(a){var i=-1,s=Array(a.size);return a.forEach(function(o){s[++i]=o}),s}var VO=1,XO=2,$O="[object Boolean]",JO="[object Date]",KO="[object Error]",ZO="[object Map]",eR="[object Number]",tR="[object RegExp]",rR="[object Set]",iR="[object String]",nR="[object Symbol]",aR="[object ArrayBuffer]",sR="[object DataView]",ym=Ma?Ma.prototype:void 0,Q0=ym?ym.valueOf:void 0;function oR(a,i,s,o,v,b,y){switch(s){case sR:if(a.byteLength!=i.byteLength||a.byteOffset!=i.byteOffset)return!1;a=a.buffer,i=i.buffer;case aR:return!(a.byteLength!=i.byteLength||!b(new Ff(a),new Ff(i)));case $O:case JO:case eR:return Y1(+a,+i);case KO:return a.name==i.name&&a.message==i.message;case tR:case iR:return a==i+"";case ZO:var g=b3;case rR:var l=o&VO;if(g||(g=fu),a.size!=i.size&&!l)return!1;var h=y.get(a);if(h)return h==i;o|=XO,y.set(a,i);var u=f6(g(a),g(i),o,v,b,y);return y.delete(a),u;case nR:if(Q0)return Q0.call(a)==Q0.call(i)}return!1}var cR=1,lR=Object.prototype,fR=lR.hasOwnProperty;function hR(a,i,s,o,v,b){var y=s&cR,g=cp(a),l=g.length,h=cp(i),u=h.length;if(l!=u&&!y)return!1;for(var f=l;f--;){var p=g[f];if(!(y?p in i:fR.call(i,p)))return!1}var d=b.get(a),A=b.get(i);if(d&&A)return d==i&&A==a;var w=!0;b.set(a,i),b.set(i,a);for(var m=y;++f<l;){p=g[f];var x=a[p],C=i[p];if(o)var E=y?o(C,x,p,i,a,b):o(x,C,p,a,i,b);if(!(E===void 0?x===C||v(x,C,s,o,b):E)){w=!1;break}m||(m=p=="constructor")}if(w&&!m){var B=a.constructor,k=i.constructor;B!=k&&"constructor"in a&&"constructor"in i&&!(typeof B=="function"&&B instanceof B&&typeof k=="function"&&k instanceof k)&&(w=!1)}return b.delete(a),b.delete(i),w}var uR=1,xm="[object Arguments]",Cm="[object Array]",C2="[object Object]",dR=Object.prototype,Im=dR.hasOwnProperty;function pR(a,i,s,o,v,b){var y=yr(a),g=yr(i),l=y?Cm:Sa(a),h=g?Cm:Sa(i);l=l==xm?C2:l,h=h==xm?C2:h;var u=l==C2,f=h==C2,p=l==h;if(p&&Ks(a)){if(!Ks(i))return!1;y=!0,u=!1}if(p&&!u)return b||(b=new U1),y||vc(a)?f6(a,i,s,o,v,b):oR(a,i,l,s,o,v,b);if(!(s&uR)){var d=u&&Im.call(a,"__wrapped__"),A=f&&Im.call(i,"__wrapped__");if(d||A){var w=d?a.value():a,m=A?i.value():i;return b||(b=new U1),v(w,m,s,o,b)}}return p?(b||(b=new U1),hR(a,i,s,o,v,b)):!1}function ql(a,i,s,o,v){return a===i?!0:a==null||i==null||!On(a)&&!On(i)?a!==a&&i!==i:pR(a,i,s,o,ql,v)}var gR=1,vR=2;function w3(a,i,s,o){var v=s.length,b=v,y=!o;if(a==null)return!b;for(a=Object(a);v--;){var g=s[v];if(y&&g[2]?g[1]!==a[g[0]]:!(g[0]in a))return!1}for(;++v<b;){g=s[v];var l=g[0],h=a[l],u=g[1];if(y&&g[2]){if(h===void 0&&!(l in a))return!1}else{var f=new U1;if(o)var p=o(h,u,l,a,i,f);if(!(p===void 0?ql(u,h,gR|vR,o,f):p))return!1}}return!0}function h6(a){return a===a&&!Sn(a)}function y3(a){for(var i=la(a),s=i.length;s--;){var o=i[s],v=a[o];i[s]=[o,v,h6(v)]}return i}function u6(a,i){return function(s){return s==null?!1:s[a]===i&&(i!==void 0||a in Object(s))}}function d6(a){var i=y3(a);return i.length==1&&i[0][2]?u6(i[0][0],i[0][1]):function(s){return s===a||w3(s,a,i)}}function AR(a,i){return a!=null&&i in Object(a)}function p6(a,i,s){i=to(i,a);for(var o=-1,v=i.length,b=!1;++o<v;){var y=ls(i[o]);if(!(b=a!=null&&s(a,y)))break;a=a[y]}return b||++o!=v?b:(v=a==null?0:a.length,!!v&&nu(v)&&Ms(y,v)&&(yr(a)||Eo(a)))}function x3(a,i){return a!=null&&p6(a,i,AR)}var mR=1,bR=2;function g6(a,i){return s3(a)&&h6(i)?u6(ls(a),i):function(s){var o=jl(s,a);return o===void 0&&o===i?x3(s,a):ql(i,o,mR|bR)}}function C3(a){return function(i){return i?.[a]}}function wR(a){return function(i){return To(i,a)}}function v6(a){return s3(a)?C3(ls(a)):wR(a)}function pr(a){return typeof a=="function"?a:a==null?t1:typeof a=="object"?yr(a)?g6(a[0],a[1]):d6(a):v6(a)}var yR="Expected a function";function xR(a){var i=a==null?0:a.length,s=pr;return a=i?gn(a,function(o){if(typeof o[1]!="function")throw new TypeError(yR);return[s(o[0]),o[1]]}):[],Mr(function(o){for(var v=-1;++v<i;){var b=a[v];if(g1(b[0],this,o))return g1(b[1],this,o)}})}function A6(a,i,s){var o=s.length;if(a==null)return!o;for(a=Object(a);o--;){var v=s[o],b=i[v],y=a[v];if(y===void 0&&!(v in a)||!b(y))return!1}return!0}function CR(a){var i=la(a);return function(s){return A6(s,a,i)}}var IR=1;function ER(a){return CR(y1(a,IR))}function BR(a,i){return i==null||A6(a,i,la(i))}function SR(a,i,s,o){for(var v=-1,b=a==null?0:a.length;++v<b;){var y=a[v];i(o,y,s(y),a)}return o}function m6(a){return function(i,s,o){for(var v=-1,b=Object(i),y=o(i),g=y.length;g--;){var l=y[a?g:++v];if(s(b[l],l,b)===!1)break}return i}}var I3=m6();function fs(a,i){return a&&I3(a,i,la)}function b6(a,i){return function(s,o){if(s==null)return s;if(!r1(s))return a(s,o);for(var v=s.length,b=i?v:-1,y=Object(s);(i?b--:++b<v)&&o(y[b],b,y)!==!1;);return s}}var ao=b6(fs);function kR(a,i,s,o){return ao(a,function(v,b,y){i(o,v,s(v),y)}),o}function hu(a,i){return function(s,o){var v=yr(s)?SR:kR,b=i?i():{};return v(s,a,pr(o),b)}}var _R=Object.prototype,MR=_R.hasOwnProperty,TR=hu(function(a,i,s){MR.call(a,s)?++a[s]:Os(a,s,1)});function OR(a,i){var s=uc(a);return i==null?s:Jy(s,i)}var RR=8;function E3(a,i,s){i=s?void 0:i;var o=Ts(a,RR,void 0,void 0,void 0,void 0,void 0,i);return o.placeholder=E3.placeholder,o}E3.placeholder={};var DR=16;function B3(a,i,s){i=s?void 0:i;var o=Ts(a,DR,void 0,void 0,void 0,void 0,void 0,i);return o.placeholder=B3.placeholder,o}B3.placeholder={};var mf=function(){return ca.Date.now()},FR="Expected a function",QR=Math.max,jR=Math.min;function w6(a,i,s){var o,v,b,y,g,l,h=0,u=!1,f=!1,p=!0;if(typeof a!="function")throw new TypeError(FR);i=w1(i)||0,Sn(s)&&(u=!!s.leading,f="maxWait"in s,b=f?QR(w1(s.maxWait)||0,i):b,p="trailing"in s?!!s.trailing:p);function d(M){var T=o,D=v;return o=v=void 0,h=M,y=a.apply(D,T),y}function A(M){return h=M,g=setTimeout(x,i),u?d(M):y}function w(M){var T=M-l,D=M-h,N=i-T;return f?jR(N,b-D):N}function m(M){var T=M-l,D=M-h;return l===void 0||T>=i||T<0||f&&D>=b}function x(){var M=mf();if(m(M))return C(M);g=setTimeout(x,w(M))}function C(M){return g=void 0,p&&o?d(M):(o=v=void 0,y)}function E(){g!==void 0&&clearTimeout(g),h=0,o=l=v=g=void 0}function B(){return g===void 0?y:C(mf())}function k(){var M=mf(),T=m(M);if(o=arguments,v=this,l=M,T){if(g===void 0)return A(l);if(f)return clearTimeout(g),g=setTimeout(x,i),d(l)}return g===void 0&&(g=setTimeout(x,i)),y}return k.cancel=E,k.flush=B,k}function NR(a,i){return a==null||a!==a?i:a}var y6=Object.prototype,PR=y6.hasOwnProperty,UR=Mr(function(a,i){a=Object(a);var s=-1,o=i.length,v=o>2?i[2]:void 0;for(v&&La(i[0],i[1],v)&&(o=1);++s<o;)for(var b=i[s],y=i1(b),g=-1,l=y.length;++g<l;){var h=y[g],u=a[h];(u===void 0||Y1(u,y6[h])&&!PR.call(a,h))&&(a[h]=b[h])}return a});function hp(a,i,s){(s!==void 0&&!Y1(a[i],s)||s===void 0&&!(i in a))&&Os(a,i,s)}function Ln(a){return On(a)&&r1(a)}function up(a,i){if(!(i==="constructor"&&typeof a[i]=="function")&&i!="__proto__")return a[i]}function x6(a){return cs(a,i1(a))}function LR(a,i,s,o,v,b,y){var g=up(a,s),l=up(i,s),h=y.get(l);if(h){hp(a,s,h);return}var u=b?b(g,l,s+"",a,i,y):void 0,f=u===void 0;if(f){var p=yr(l),d=!p&&Ks(l),A=!p&&!d&&vc(l);u=l,p||d||A?yr(g)?u=g:Ln(g)?u=Ja(g):d?(f=!1,u=Zy(l,!0)):A?(f=!1,u=r6(l,!0)):u=[]:zl(l)||Eo(l)?(u=g,Eo(g)?u=x6(g):(!Sn(g)||_s(g))&&(u=i6(l))):f=!1}f&&(y.set(l,u),v(u,l,o,b,y),y.delete(l)),hp(a,s,u)}function uu(a,i,s,o,v){a!==i&&I3(i,function(b,y){if(v||(v=new U1),Sn(b))LR(a,i,y,s,uu,o,v);else{var g=o?o(up(a,y),b,y+"",a,i,v):void 0;g===void 0&&(g=b),hp(a,y,g)}},i1)}function C6(a,i,s,o,v,b){return Sn(a)&&Sn(i)&&(b.set(i,a),uu(a,i,void 0,C6,b),b.delete(i)),a}var I6=gc(function(a,i,s,o){uu(a,i,s,o)}),GR=Mr(function(a){return a.push(void 0,C6),g1(I6,void 0,a)}),YR="Expected a function";function E6(a,i,s){if(typeof a!="function")throw new TypeError(YR);return setTimeout(function(){a.apply(void 0,s)},i)}var HR=Mr(function(a,i){return E6(a,1,i)}),zR=Mr(function(a,i,s){return E6(a,w1(i)||0,s)});function S3(a,i,s){for(var o=-1,v=a==null?0:a.length;++o<v;)if(s(i,a[o]))return!0;return!1}var qR=200;function Wl(a,i,s,o){var v=-1,b=ru,y=!0,g=a.length,l=[],h=i.length;if(!g)return l;s&&(i=gn(i,v1(s))),o?(b=S3,y=!1):i.length>=qR&&(b=Nl,y=!1,i=new So(i));e:for(;++v<g;){var u=a[v],f=s==null?u:s(u);if(u=o||u!==0?u:0,y&&f===f){for(var p=h;p--;)if(i[p]===f)continue e;l.push(u)}else b(i,f,o)||l.push(u)}return l}var WR=Mr(function(a,i){return Ln(a)?Wl(a,wa(i,1,Ln,!0)):[]});function E1(a){var i=a==null?0:a.length;return i?a[i-1]:void 0}var VR=Mr(function(a,i){var s=E1(i);return Ln(s)&&(s=void 0),Ln(a)?Wl(a,wa(i,1,Ln,!0),pr(s)):[]}),XR=Mr(function(a,i){var s=E1(i);return Ln(s)&&(s=void 0),Ln(a)?Wl(a,wa(i,1,Ln,!0),void 0,s):[]}),$R=Zh(function(a,i){return a/i},1);function JR(a,i,s){var o=a==null?0:a.length;return o?(i=s||i===void 0?1:Er(i),I1(a,i<0?0:i,o)):[]}function KR(a,i,s){var o=a==null?0:a.length;return o?(i=s||i===void 0?1:Er(i),i=o-i,I1(a,0,i<0?0:i)):[]}function du(a,i,s,o){for(var v=a.length,b=o?v:-1;(o?b--:++b<v)&&i(a[b],b,a););return s?I1(a,o?0:b,o?b+1:v):I1(a,o?b+1:0,o?v:b)}function ZR(a,i){return a&&a.length?du(a,pr(i),!0,!0):[]}function eD(a,i){return a&&a.length?du(a,pr(i),!0):[]}function hs(a){return typeof a=="function"?a:t1}function tD(a,i){var s=yr(a)?B1:ao;return s(a,hs(i))}function rD(a,i){for(var s=a==null?0:a.length;s--&&i(a[s],s,a)!==!1;);return a}var B6=m6(!0);function k3(a,i){return a&&B6(a,i,la)}var S6=b6(k3,!0);function iD(a,i){var s=yr(a)?rD:S6;return s(a,hs(i))}function nD(a,i,s){a=yi(a),i=p1(i);var o=a.length;s=s===void 0?o:Oo(Er(s),0,o);var v=s;return s-=i.length,s>=0&&a.slice(s,v)==i}function aD(a,i){return gn(i,function(s){return[s,a[s]]})}function sD(a){var i=-1,s=Array(a.size);return a.forEach(function(o){s[++i]=[o,o]}),s}var oD="[object Map]",cD="[object Set]";function k6(a){return function(i){var s=Sa(i);return s==oD?b3(i):s==cD?sD(i):aD(i,a(i))}}var lD=k6(la),fD=k6(i1),hD={"&":"&","<":"<",">":">",'"':""","'":"'"},uD=u3(hD),_6=/[&<>"']/g,dD=RegExp(_6.source);function M6(a){return a=yi(a),a&&dD.test(a)?a.replace(_6,uD):a}var T6=/[\\^$.*+?()[\]{}|]/g,pD=RegExp(T6.source);function gD(a){return a=yi(a),a&&pD.test(a)?a.replace(T6,"\\$&"):a}function O6(a,i){for(var s=-1,o=a==null?0:a.length;++s<o;)if(!i(a[s],s,a))return!1;return!0}function vD(a,i){var s=!0;return ao(a,function(o,v,b){return s=!!i(o,v,b),s}),s}function AD(a,i,s){var o=yr(a)?O6:vD;return s&&La(a,i,s)&&(i=void 0),o(a,pr(i))}var mD=4294967295;function R6(a){return a?Oo(Er(a),0,mD):0}function bD(a,i,s,o){var v=a.length;for(s=Er(s),s<0&&(s=-s>v?0:v+s),o=o===void 0||o>v?v:Er(o),o<0&&(o+=v),o=s>o?0:R6(o);s<o;)a[s++]=i;return a}function wD(a,i,s,o){var v=a==null?0:a.length;return v?(s&&typeof s!="number"&&La(a,i,s)&&(s=0,o=v),bD(a,i,s,o)):[]}function D6(a,i){var s=[];return ao(a,function(o,v,b){i(o,v,b)&&s.push(o)}),s}function yD(a,i){var s=yr(a)?no:D6;return s(a,pr(i))}function F6(a){return function(i,s,o){var v=Object(i);if(!r1(i)){var b=pr(s);i=la(i),s=function(g){return b(v[g],g,v)}}var y=a(i,s,o);return y>-1?v[b?i[y]:y]:void 0}}var xD=Math.max;function Q6(a,i,s){var o=a==null?0:a.length;if(!o)return-1;var v=s==null?0:Er(s);return v<0&&(v=xD(o+v,0)),tu(a,pr(i),v)}var CD=F6(Q6);function j6(a,i,s){var o;return s(a,function(v,b,y){if(i(v,b,y))return o=b,!1}),o}function ID(a,i){return j6(a,pr(i),fs)}var ED=Math.max,BD=Math.min;function N6(a,i,s){var o=a==null?0:a.length;if(!o)return-1;var v=o-1;return s!==void 0&&(v=Er(s),v=s<0?ED(o+v,0):BD(v,o-1)),tu(a,pr(i),v,!0)}var SD=F6(N6);function kD(a,i){return j6(a,pr(i),k3)}function _D(a){return a&&a.length?a[0]:void 0}function P6(a,i){var s=-1,o=r1(a)?Array(a.length):[];return ao(a,function(v,b,y){o[++s]=i(v,b,y)}),o}function pu(a,i){var s=yr(a)?gn:P6;return s(a,pr(i))}function MD(a,i){return wa(pu(a,i),1)}var TD=1/0;function OD(a,i){return wa(pu(a,i),TD)}function RD(a,i,s){return s=s===void 0?1:Er(s),wa(pu(a,i),s)}var DD=1/0;function FD(a){var i=a==null?0:a.length;return i?wa(a,DD):[]}function QD(a,i){var s=a==null?0:a.length;return s?(i=i===void 0?1:Er(i),wa(a,i)):[]}var jD=512;function ND(a){return Ts(a,jD)}var PD=d3("floor"),UD="Expected a function",LD=8,GD=32,YD=128,HD=256;function U6(a){return Fs(function(i){var s=i.length,o=s,v=x1.prototype.thru;for(a&&i.reverse();o--;){var b=i[o];if(typeof b!="function")throw new TypeError(UD);if(v&&!y&&Af(b)=="wrapper")var y=new x1([],!0)}for(o=y?o:s;++o<s;){b=i[o];var g=Af(b),l=g=="wrapper"?e3(b):void 0;l&&np(l[0])&&l[1]==(YD|LD|GD|HD)&&!l[4].length&&l[9]==1?y=y[Af(l[0])].apply(y,l[3]):y=b.length==1&&np(b)?y[g]():y.thru(b)}return function(){var h=arguments,u=h[0];if(y&&h.length==1&&yr(u))return y.plant(u).value();for(var f=0,p=s?i[f].apply(this,h):u;++f<s;)p=i[f].call(this,p);return p}})}var zD=U6(),qD=U6(!0);function WD(a,i){return a==null?a:I3(a,hs(i),i1)}function VD(a,i){return a==null?a:B6(a,hs(i),i1)}function XD(a,i){return a&&fs(a,hs(i))}function $D(a,i){return a&&k3(a,hs(i))}function JD(a){for(var i=-1,s=a==null?0:a.length,o={};++i<s;){var v=a[i];o[v[0]]=v[1]}return o}function gu(a,i){return no(i,function(s){return _s(a[s])})}function KD(a){return a==null?[]:gu(a,la(a))}function ZD(a){return a==null?[]:gu(a,i1(a))}var eF=Object.prototype,tF=eF.hasOwnProperty,rF=hu(function(a,i,s){tF.call(a,s)?a[s].push(i):Os(a,s,[i])});function _3(a,i){return a>i}function vu(a){return function(i,s){return typeof i=="string"&&typeof s=="string"||(i=w1(i),s=w1(s)),a(i,s)}}var iF=vu(_3),nF=vu(function(a,i){return a>=i}),aF=Object.prototype,sF=aF.hasOwnProperty;function oF(a,i){return a!=null&&sF.call(a,i)}function cF(a,i){return a!=null&&p6(a,i,oF)}var lF=Math.max,fF=Math.min;function hF(a,i,s){return a>=fF(i,s)&&a<lF(i,s)}function uF(a,i,s){return i=Es(i),s===void 0?(s=i,i=0):s=Es(s),a=w1(a),hF(a,i,s)}var dF="[object String]";function Au(a){return typeof a=="string"||!yr(a)&&On(a)&&Ga(a)==dF}function M3(a,i){return gn(i,function(s){return a[s]})}function bc(a){return a==null?[]:M3(a,la(a))}var pF=Math.max;function gF(a,i,s,o){a=r1(a)?a:bc(a),s=s&&!o?Er(s):0;var v=a.length;return s<0&&(s=pF(v+s,0)),Au(a)?s<=v&&a.indexOf(i,s)>-1:!!v&&dc(a,i,s)>-1}var vF=Math.max;function AF(a,i,s){var o=a==null?0:a.length;if(!o)return-1;var v=s==null?0:Er(s);return v<0&&(v=vF(o+v,0)),dc(a,i,v)}function mF(a){var i=a==null?0:a.length;return i?I1(a,0,-1):[]}var bF=Math.min;function T3(a,i,s){for(var o=s?S3:ru,v=a[0].length,b=a.length,y=b,g=Array(b),l=1/0,h=[];y--;){var u=a[y];y&&i&&(u=gn(u,v1(i))),l=bF(u.length,l),g[y]=!s&&(i||v>=120&&u.length>=120)?new So(y&&u):void 0}u=a[0];var f=-1,p=g[0];e:for(;++f<v&&h.length<l;){var d=u[f],A=i?i(d):d;if(d=s||d!==0?d:0,!(p?Nl(p,A):o(h,A,s))){for(y=b;--y;){var w=g[y];if(!(w?Nl(w,A):o(a[y],A,s)))continue e}p&&p.push(A),h.push(d)}}return h}function O3(a){return Ln(a)?a:[]}var wF=Mr(function(a){var i=gn(a,O3);return i.length&&i[0]===a[0]?T3(i):[]}),yF=Mr(function(a){var i=E1(a),s=gn(a,O3);return i===E1(s)?i=void 0:s.pop(),s.length&&s[0]===a[0]?T3(s,pr(i)):[]}),xF=Mr(function(a){var i=E1(a),s=gn(a,O3);return i=typeof i=="function"?i:void 0,i&&s.pop(),s.length&&s[0]===a[0]?T3(s,void 0,i):[]});function CF(a,i,s,o){return fs(a,function(v,b,y){i(o,s(v),b,y)}),o}function L6(a,i){return function(s,o){return CF(s,a,i(o),{})}}var IF=Object.prototype,EF=IF.toString,BF=L6(function(a,i,s){i!=null&&typeof i.toString!="function"&&(i=EF.call(i)),a[i]=s},t3(t1)),G6=Object.prototype,SF=G6.hasOwnProperty,kF=G6.toString,_F=L6(function(a,i,s){i!=null&&typeof i.toString!="function"&&(i=kF.call(i)),SF.call(a,i)?a[i].push(s):a[i]=[s]},pr);function Y6(a,i){return i.length<2?a:To(a,I1(i,0,-1))}function Vl(a,i,s){i=to(i,a),a=Y6(a,i);var o=a==null?a:a[ls(E1(i))];return o==null?void 0:g1(o,a,s)}var MF=Mr(Vl),TF=Mr(function(a,i,s){var o=-1,v=typeof i=="function",b=r1(a)?Array(a.length):[];return ao(a,function(y){b[++o]=v?g1(i,y,s):Vl(y,i,s)}),b}),OF="[object ArrayBuffer]";function RF(a){return On(a)&&Ga(a)==OF}var Em=C1&&C1.isArrayBuffer,DF=Em?v1(Em):RF,FF="[object Boolean]";function QF(a){return a===!0||a===!1||On(a)&&Ga(a)==FF}var jF="[object Date]";function NF(a){return On(a)&&Ga(a)==jF}var Bm=C1&&C1.isDate,PF=Bm?v1(Bm):NF;function UF(a){return On(a)&&a.nodeType===1&&!zl(a)}var LF="[object Map]",GF="[object Set]",YF=Object.prototype,HF=YF.hasOwnProperty;function zF(a){if(a==null)return!0;if(r1(a)&&(yr(a)||typeof a=="string"||typeof a.splice=="function"||Ks(a)||vc(a)||Eo(a)))return!a.length;var i=Sa(a);if(i==LF||i==GF)return!a.size;if(Hl(a))return!a3(a).length;for(var s in a)if(HF.call(a,s))return!1;return!0}function qF(a,i){return ql(a,i)}function WF(a,i,s){s=typeof s=="function"?s:void 0;var o=s?s(a,i):void 0;return o===void 0?ql(a,i,void 0,s):!!o}var VF=ca.isFinite;function XF(a){return typeof a=="number"&&VF(a)}function H6(a){return typeof a=="number"&&a==Er(a)}function $F(a,i){return a===i||w3(a,i,y3(i))}function JF(a,i,s){return s=typeof s=="function"?s:void 0,w3(a,i,y3(i),s)}var KF="[object Number]";function z6(a){return typeof a=="number"||On(a)&&Ga(a)==KF}function ZF(a){return z6(a)&&a!=+a}var eQ=vf?_s:n3,tQ="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.";function rQ(a){if(eQ(a))throw new Error(tQ);return ay(a)}function iQ(a){return a==null}function nQ(a){return a===null}var aQ="[object RegExp]";function sQ(a){return On(a)&&Ga(a)==aQ}var Sm=C1&&C1.isRegExp,R3=Sm?v1(Sm):sQ,km=9007199254740991;function oQ(a){return H6(a)&&a>=-km&&a<=km}function cQ(a){return a===void 0}var lQ="[object WeakMap]";function fQ(a){return On(a)&&Sa(a)==lQ}var hQ="[object WeakSet]";function uQ(a){return On(a)&&Ga(a)==hQ}var dQ=1;function pQ(a){return pr(typeof a=="function"?a:y1(a,dQ))}var gQ=Array.prototype,vQ=gQ.join;function AQ(a,i){return a==null?"":vQ.call(a,i)}var mQ=mc(function(a,i,s){return a+(s?"-":"")+i.toLowerCase()}),bQ=hu(function(a,i,s){Os(a,s,i)});function wQ(a,i,s){for(var o=s+1;o--;)if(a[o]===i)return o;return o}var yQ=Math.max,xQ=Math.min;function CQ(a,i,s){var o=a==null?0:a.length;if(!o)return-1;var v=o;return s!==void 0&&(v=Er(s),v=v<0?yQ(o+v,0):xQ(v,o-1)),i===i?wQ(a,i,v):tu(a,uy,v,!0)}var IQ=mc(function(a,i,s){return a+(s?" ":"")+i.toLowerCase()}),EQ=Ry("toLowerCase");function D3(a,i){return a<i}var BQ=vu(D3),SQ=vu(function(a,i){return a<=i});function kQ(a,i){var s={};return i=pr(i),fs(a,function(o,v,b){Os(s,i(o,v,b),o)}),s}function _Q(a,i){var s={};return i=pr(i),fs(a,function(o,v,b){Os(s,v,i(o,v,b))}),s}var MQ=1;function TQ(a){return d6(y1(a,MQ))}var OQ=1;function RQ(a,i){return g6(a,y1(i,OQ))}function mu(a,i,s){for(var o=-1,v=a.length;++o<v;){var b=a[o],y=i(b);if(y!=null&&(g===void 0?y===y&&!d1(y):s(y,g)))var g=y,l=b}return l}function DQ(a){return a&&a.length?mu(a,t1,_3):void 0}function FQ(a,i){return a&&a.length?mu(a,pr(i),_3):void 0}function F3(a,i){for(var s,o=-1,v=a.length;++o<v;){var b=i(a[o]);b!==void 0&&(s=s===void 0?b:s+b)}return s}var QQ=NaN;function q6(a,i){var s=a==null?0:a.length;return s?F3(a,i)/s:QQ}function jQ(a){return q6(a,t1)}function NQ(a,i){return q6(a,pr(i))}var PQ=gc(function(a,i,s){uu(a,i,s)}),UQ=Mr(function(a,i){return function(s){return Vl(s,a,i)}}),LQ=Mr(function(a,i){return function(s){return Vl(a,s,i)}});function GQ(a){return a&&a.length?mu(a,t1,D3):void 0}function YQ(a,i){return a&&a.length?mu(a,pr(i),D3):void 0}function HQ(a,i,s){var o=la(i),v=gu(i,o),b=!(Sn(s)&&"chain"in s)||!!s.chain,y=_s(a);return B1(v,function(g){var l=i[g];a[g]=l,y&&(a.prototype[g]=function(){var h=this.__chain__;if(b||h){var u=a(this.__wrapped__),f=u.__actions__=Ja(this.__actions__);return f.push({func:l,args:arguments,thisArg:a}),u.__chain__=h,u}return l.apply(a,ro([this.value()],arguments))})}),a}var zQ=Zh(function(a,i){return a*i},1),qQ="Expected a function";function bu(a){if(typeof a!="function")throw new TypeError(qQ);return function(){var i=arguments;switch(i.length){case 0:return!a.call(this);case 1:return!a.call(this,i[0]);case 2:return!a.call(this,i[0],i[1]);case 3:return!a.call(this,i[0],i[1],i[2])}return!a.apply(this,i)}}function WQ(a){for(var i,s=[];!(i=a.next()).done;)s.push(i.value);return s}var VQ="[object Map]",XQ="[object Set]",j0=Ma?Ma.iterator:void 0;function W6(a){if(!a)return[];if(r1(a))return Au(a)?L1(a):Ja(a);if(j0&&a[j0])return WQ(a[j0]());var i=Sa(a),s=i==VQ?b3:i==XQ?fu:bc;return s(a)}function $Q(){this.__values__===void 0&&(this.__values__=W6(this.value()));var a=this.__index__>=this.__values__.length,i=a?void 0:this.__values__[this.__index__++];return{done:a,value:i}}function V6(a,i){var s=a.length;if(s)return i+=i<0?s:0,Ms(i,s)?a[i]:void 0}function JQ(a,i){return a&&a.length?V6(a,Er(i)):void 0}function KQ(a){return a=Er(a),Mr(function(i){return V6(i,a)})}function Q3(a,i){return i=to(i,a),a=Y6(a,i),a==null||delete a[ls(E1(i))]}function ZQ(a){return zl(a)?void 0:a}var ej=1,tj=2,rj=4,ij=Fs(function(a,i){var s={};if(a==null)return s;var o=!1;i=gn(i,function(b){return b=to(b,a),o||(o=b.length>1),b}),cs(a,v3(a),s),o&&(s=y1(s,ej|tj|rj,ZQ));for(var v=i.length;v--;)Q3(s,i[v]);return s});function Xl(a,i,s,o){if(!Sn(a))return a;i=to(i,a);for(var v=-1,b=i.length,y=b-1,g=a;g!=null&&++v<b;){var l=ls(i[v]),h=s;if(l==="__proto__"||l==="constructor"||l==="prototype")return a;if(v!=y){var u=g[l];h=o?o(u,l,g):void 0,h===void 0&&(h=Sn(u)?u:Ms(i[v+1])?[]:{})}Yl(g,l,h),g=g[l]}return a}function X6(a,i,s){for(var o=-1,v=i.length,b={};++o<v;){var y=i[o],g=To(a,y);s(g,y)&&Xl(b,to(y,a),g)}return b}function $6(a,i){if(a==null)return{};var s=gn(v3(a),function(o){return[o]});return i=pr(i),X6(a,s,function(o,v){return i(o,v[0])})}function nj(a,i){return $6(a,bu(pr(i)))}function aj(a){return By(2,a)}function sj(a,i){var s=a.length;for(a.sort(i);s--;)a[s]=a[s].value;return a}function J6(a,i){if(a!==i){var s=a!==void 0,o=a===null,v=a===a,b=d1(a),y=i!==void 0,g=i===null,l=i===i,h=d1(i);if(!g&&!h&&!b&&a>i||b&&y&&l&&!g&&!h||o&&y&&l||!s&&l||!v)return 1;if(!o&&!b&&!h&&a<i||h&&s&&v&&!o&&!b||g&&s&&v||!y&&v||!l)return-1}return 0}function oj(a,i,s){for(var o=-1,v=a.criteria,b=i.criteria,y=v.length,g=s.length;++o<y;){var l=J6(v[o],b[o]);if(l){if(o>=g)return l;var h=s[o];return l*(h=="desc"?-1:1)}}return a.index-i.index}function K6(a,i,s){i.length?i=gn(i,function(b){return yr(b)?function(y){return To(y,b.length===1?b[0]:b)}:b}):i=[t1];var o=-1;i=gn(i,v1(pr));var v=P6(a,function(b,y,g){var l=gn(i,function(h){return h(b)});return{criteria:l,index:++o,value:b}});return sj(v,function(b,y){return oj(b,y,s)})}function cj(a,i,s,o){return a==null?[]:(yr(i)||(i=i==null?[]:[i]),s=o?void 0:s,yr(s)||(s=s==null?[]:[s]),K6(a,i,s))}function j3(a){return Fs(function(i){return i=gn(i,v1(pr)),Mr(function(s){var o=this;return a(i,function(v){return g1(v,o,s)})})})}var lj=j3(gn),fj=Mr,hj=Math.min,uj=fj(function(a,i){i=i.length==1&&yr(i[0])?gn(i[0],v1(pr)):gn(wa(i,1),v1(pr));var s=i.length;return Mr(function(o){for(var v=-1,b=hj(o.length,s);++v<b;)o[v]=i[v].call(this,o[v]);return g1(a,this,o)})}),dj=j3(O6),pj=j3(m3),gj=9007199254740991,vj=Math.floor;function dp(a,i){var s="";if(!a||i<1||i>gj)return s;do i%2&&(s+=a),i=vj(i/2),i&&(a+=a);while(i);return s}var Aj=C3("length"),Z6="\\ud800-\\udfff",mj="\\u0300-\\u036f",bj="\\ufe20-\\ufe2f",wj="\\u20d0-\\u20ff",yj=mj+bj+wj,xj="\\ufe0e\\ufe0f",Cj="["+Z6+"]",pp="["+yj+"]",gp="\\ud83c[\\udffb-\\udfff]",Ij="(?:"+pp+"|"+gp+")",ex="[^"+Z6+"]",tx="(?:\\ud83c[\\udde6-\\uddff]){2}",rx="[\\ud800-\\udbff][\\udc00-\\udfff]",Ej="\\u200d",ix=Ij+"?",nx="["+xj+"]?",Bj="(?:"+Ej+"(?:"+[ex,tx,rx].join("|")+")"+nx+ix+")*",Sj=nx+ix+Bj,kj="(?:"+[ex+pp+"?",pp,tx,rx,Cj].join("|")+")",_m=RegExp(gp+"(?="+gp+")|"+kj+Sj,"g");function _j(a){for(var i=_m.lastIndex=0;_m.test(a);)++i;return i}function wc(a){return Ac(a)?_j(a):Aj(a)}var Mj=Math.ceil;function Qf(a,i){i=i===void 0?" ":p1(i);var s=i.length;if(s<2)return s?dp(i,a):i;var o=dp(i,Mj(a/wc(i)));return Ac(i)?io(L1(o),0,a).join(""):o.slice(0,a)}var Tj=Math.ceil,Oj=Math.floor;function Rj(a,i,s){a=yi(a),i=Er(i);var o=i?wc(a):0;if(!i||o>=i)return a;var v=(i-o)/2;return Qf(Oj(v),s)+a+Qf(Tj(v),s)}function Dj(a,i,s){a=yi(a),i=Er(i);var o=i?wc(a):0;return i&&o<i?a+Qf(i-o,s):a}function Fj(a,i,s){a=yi(a),i=Er(i);var o=i?wc(a):0;return i&&o<i?Qf(i-o,s)+a:a}var Qj=/^\s+/,jj=ca.parseInt;function Nj(a,i,s){return s||i==null?i=0:i&&(i=+i),jj(yi(a).replace(Qj,""),i||0)}var Pj=32,wu=Mr(function(a,i){var s=Js(i,pc(wu));return Ts(a,Pj,void 0,i,s)});wu.placeholder={};var Uj=64,N3=Mr(function(a,i){var s=Js(i,pc(N3));return Ts(a,Uj,void 0,i,s)});N3.placeholder={};var Lj=hu(function(a,i,s){a[s?0:1].push(i)},function(){return[[],[]]});function Gj(a,i){return X6(a,i,function(s,o){return x3(a,o)})}var ax=Fs(function(a,i){return a==null?{}:Gj(a,i)});function Yj(a){for(var i,s=this;s instanceof eu;){var o=ly(s);o.__index__=0,o.__values__=void 0,i?v.__wrapped__=o:i=o;var v=o;s=s.__wrapped__}return v.__wrapped__=a,i}function Hj(a){return function(i){return a==null?void 0:To(a,i)}}function zj(a,i,s,o){for(var v=s-1,b=a.length;++v<b;)if(o(a[v],i))return v;return-1}var qj=Array.prototype,Mm=qj.splice;function P3(a,i,s,o){var v=o?zj:dc,b=-1,y=i.length,g=a;for(a===i&&(i=Ja(i)),s&&(g=gn(a,v1(s)));++b<y;)for(var l=0,h=i[b],u=s?s(h):h;(l=v(g,u,l,o))>-1;)g!==a&&Mm.call(g,l,1),Mm.call(a,l,1);return a}function sx(a,i){return a&&a.length&&i&&i.length?P3(a,i):a}var Wj=Mr(sx);function Vj(a,i,s){return a&&a.length&&i&&i.length?P3(a,i,pr(s)):a}function Xj(a,i,s){return a&&a.length&&i&&i.length?P3(a,i,void 0,s):a}var $j=Array.prototype,Jj=$j.splice;function ox(a,i){for(var s=a?i.length:0,o=s-1;s--;){var v=i[s];if(s==o||v!==b){var b=v;Ms(v)?Jj.call(a,v,1):Q3(a,v)}}return a}var Kj=Fs(function(a,i){var s=a==null?0:a.length,o=o3(a,i);return ox(a,gn(i,function(v){return Ms(v,s)?+v:v}).sort(J6)),o}),Zj=Math.floor,eN=Math.random;function U3(a,i){return a+Zj(eN()*(i-a+1))}var tN=parseFloat,rN=Math.min,iN=Math.random;function nN(a,i,s){if(s&&typeof s!="boolean"&&La(a,i,s)&&(i=s=void 0),s===void 0&&(typeof i=="boolean"?(s=i,i=void 0):typeof a=="boolean"&&(s=a,a=void 0)),a===void 0&&i===void 0?(a=0,i=1):(a=Es(a),i===void 0?(i=a,a=0):i=Es(i)),a>i){var o=a;a=i,i=o}if(s||a%1||i%1){var v=iN();return rN(a+v*(i-a+tN("1e-"+((v+"").length-1))),i)}return U3(a,i)}var aN=Math.ceil,sN=Math.max;function oN(a,i,s,o){for(var v=-1,b=sN(aN((i-a)/(s||1)),0),y=Array(b);b--;)y[o?b:++v]=a,a+=s;return y}function cx(a){return function(i,s,o){return o&&typeof o!="number"&&La(i,s,o)&&(s=o=void 0),i=Es(i),s===void 0?(s=i,i=0):s=Es(s),o=o===void 0?i<s?1:-1:Es(o),oN(i,s,o,a)}}var cN=cx(),lN=cx(!0),fN=256,hN=Fs(function(a,i){return Ts(a,fN,void 0,void 0,void 0,i)});function lx(a,i,s,o,v){return v(a,function(b,y,g){s=o?(o=!1,b):i(s,b,y,g)}),s}function uN(a,i,s){var o=yr(a)?h3:lx,v=arguments.length<3;return o(a,pr(i),s,v,ao)}function dN(a,i,s,o){var v=a==null?0:a.length;for(o&&v&&(s=a[--v]);v--;)s=i(s,a[v],v,a);return s}function pN(a,i,s){var o=yr(a)?dN:lx,v=arguments.length<3;return o(a,pr(i),s,v,S6)}function gN(a,i){var s=yr(a)?no:D6;return s(a,bu(pr(i)))}function vN(a,i){var s=[];if(!(a&&a.length))return s;var o=-1,v=[],b=a.length;for(i=pr(i);++o<b;){var y=a[o];i(y,o,a)&&(s.push(y),v.push(o))}return ox(a,v),s}function AN(a,i,s){return(s?La(a,i,s):i===void 0)?i=1:i=Er(i),dp(yi(a),i)}function mN(){var a=arguments,i=yi(a[0]);return a.length<3?i:i.replace(a[1],a[2])}var bN="Expected a function";function wN(a,i){if(typeof a!="function")throw new TypeError(bN);return i=i===void 0?i:Er(i),Mr(a,i)}function yN(a,i,s){i=to(i,a);var o=-1,v=i.length;for(v||(v=1,a=void 0);++o<v;){var b=a?.[ls(i[o])];b===void 0&&(o=v,b=s),a=_s(b)?b.call(a):b}return a}var xN=Array.prototype,CN=xN.reverse;function vp(a){return a==null?a:CN.call(a)}var IN=d3("round");function fx(a){var i=a.length;return i?a[U3(0,i-1)]:void 0}function EN(a){return fx(bc(a))}function BN(a){var i=yr(a)?fx:EN;return i(a)}function yu(a,i){var s=-1,o=a.length,v=o-1;for(i=i===void 0?o:i;++s<i;){var b=U3(s,v),y=a[b];a[b]=a[s],a[s]=y}return a.length=i,a}function SN(a,i){return yu(Ja(a),Oo(i,0,a.length))}function kN(a,i){var s=bc(a);return yu(s,Oo(i,0,s.length))}function _N(a,i,s){(s?La(a,i,s):i===void 0)?i=1:i=Er(i);var o=yr(a)?SN:kN;return o(a,i)}function hx(a,i,s){return a==null?a:Xl(a,i,s)}function MN(a,i,s,o){return o=typeof o=="function"?o:void 0,a==null?a:Xl(a,i,s,o)}function TN(a){return yu(Ja(a))}function ON(a){return yu(bc(a))}function RN(a){var i=yr(a)?TN:ON;return i(a)}var DN="[object Map]",FN="[object Set]";function QN(a){if(a==null)return 0;if(r1(a))return Au(a)?wc(a):a.length;var i=Sa(a);return i==DN||i==FN?a.size:a3(a).length}function jN(a,i,s){var o=a==null?0:a.length;return o?(s&&typeof s!="number"&&La(a,i,s)?(i=0,s=o):(i=i==null?0:Er(i),s=s===void 0?o:Er(s)),I1(a,i,s)):[]}var NN=mc(function(a,i,s){return a+(s?"_":"")+i.toLowerCase()});function PN(a,i){var s;return ao(a,function(o,v,b){return s=i(o,v,b),!s}),!!s}function UN(a,i,s){var o=yr(a)?m3:PN;return s&&La(a,i,s)&&(i=void 0),o(a,pr(i))}var LN=Mr(function(a,i){if(a==null)return[];var s=i.length;return s>1&&La(a,i[0],i[1])?i=[]:s>2&&La(i[0],i[1],i[2])&&(i=[i[0]]),K6(a,wa(i,1),[])}),GN=4294967295,YN=GN-1,HN=Math.floor,zN=Math.min;function L3(a,i,s,o){var v=0,b=a==null?0:a.length;if(b===0)return 0;i=s(i);for(var y=i!==i,g=i===null,l=d1(i),h=i===void 0;v<b;){var u=HN((v+b)/2),f=s(a[u]),p=f!==void 0,d=f===null,A=f===f,w=d1(f);if(y)var m=o||A;else h?m=A&&(o||p):g?m=A&&p&&(o||!d):l?m=A&&p&&!d&&(o||!w):d||w?m=!1:m=o?f<=i:f<i;m?v=u+1:b=u}return zN(b,YN)}var qN=4294967295,WN=qN>>>1;function xu(a,i,s){var o=0,v=a==null?o:a.length;if(typeof i=="number"&&i===i&&v<=WN){for(;o<v;){var b=o+v>>>1,y=a[b];y!==null&&!d1(y)&&(s?y<=i:y<i)?o=b+1:v=b}return v}return L3(a,i,t1,s)}function VN(a,i){return xu(a,i)}function XN(a,i,s){return L3(a,i,pr(s))}function $N(a,i){var s=a==null?0:a.length;if(s){var o=xu(a,i);if(o<s&&Y1(a[o],i))return o}return-1}function JN(a,i){return xu(a,i,!0)}function KN(a,i,s){return L3(a,i,pr(s),!0)}function ZN(a,i){var s=a==null?0:a.length;if(s){var o=xu(a,i,!0)-1;if(Y1(a[o],i))return o}return-1}function ux(a,i){for(var s=-1,o=a.length,v=0,b=[];++s<o;){var y=a[s],g=i?i(y):y;if(!s||!Y1(g,l)){var l=g;b[v++]=y===0?0:y}}return b}function eP(a){return a&&a.length?ux(a):[]}function tP(a,i){return a&&a.length?ux(a,pr(i)):[]}var rP=4294967295;function iP(a,i,s){return s&&typeof s!="number"&&La(a,i,s)&&(i=s=void 0),s=s===void 0?rP:s>>>0,s?(a=yi(a),a&&(typeof i=="string"||i!=null&&!R3(i))&&(i=p1(i),!i&&Ac(a))?io(L1(a),0,s):a.split(i,s)):[]}var nP="Expected a function",aP=Math.max;function sP(a,i){if(typeof a!="function")throw new TypeError(nP);return i=i==null?0:aP(Er(i),0),Mr(function(s){var o=s[i],v=io(s,0,i);return o&&ro(v,o),g1(a,this,v)})}var oP=mc(function(a,i,s){return a+(s?" ":"")+f3(i)});function cP(a,i,s){return a=yi(a),s=s==null?0:Oo(Er(s),0,a.length),i=p1(i),a.slice(s,s+i.length)==i}function lP(){return{}}function fP(){return""}function hP(){return!0}var uP=Zh(function(a,i){return a-i},0);function dP(a){return a&&a.length?F3(a,t1):0}function pP(a,i){return a&&a.length?F3(a,pr(i)):0}function gP(a){var i=a==null?0:a.length;return i?I1(a,1,i):[]}function vP(a,i,s){return a&&a.length?(i=s||i===void 0?1:Er(i),I1(a,0,i<0?0:i)):[]}function AP(a,i,s){var o=a==null?0:a.length;return o?(i=s||i===void 0?1:Er(i),i=o-i,I1(a,i<0?0:i,o)):[]}function mP(a,i){return a&&a.length?du(a,pr(i),!1,!0):[]}function bP(a,i){return a&&a.length?du(a,pr(i)):[]}function wP(a,i){return i(a),a}var dx=Object.prototype,yP=dx.hasOwnProperty;function Tm(a,i,s,o){return a===void 0||Y1(a,dx[s])&&!yP.call(o,s)?i:a}var xP={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};function CP(a){return"\\"+xP[a]}var px=/<%=([\s\S]+?)%>/g,IP=/<%-([\s\S]+?)%>/g,EP=/<%([\s\S]+?)%>/g,Ap={escape:IP,evaluate:EP,interpolate:px,variable:"",imports:{_:{escape:M6}}},BP="Invalid `variable` option passed into `_.template`",SP=/\b__p \+= '';/g,kP=/\b(__p \+=) '' \+/g,_P=/(__e\(.*?\)|\b__t\)) \+\n'';/g,MP=/[()=,{}\[\]\/\s]/,TP=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,I2=/($^)/,OP=/['\n\r\u2028\u2029\\]/g,RP=Object.prototype,Om=RP.hasOwnProperty;function DP(a,i,s){var o=Ap.imports._.templateSettings||Ap;s&&La(a,i,s)&&(i=void 0),a=yi(a),i=ap({},i,o,Tm);var v=ap({},i.imports,o.imports,Tm),b=la(v),y=M3(v,b),g,l,h=0,u=i.interpolate||I2,f="__p += '",p=RegExp((i.escape||I2).source+"|"+u.source+"|"+(u===px?TP:I2).source+"|"+(i.evaluate||I2).source+"|$","g"),d=Om.call(i,"sourceURL")?"//# sourceURL="+(i.sourceURL+"").replace(/\s/g," ")+`
|
|
444
444
|
`:"";a.replace(p,function(m,x,C,E,B,k){return C||(C=E),f+=a.slice(h,k).replace(OP,CP),x&&(g=!0,f+=`' +
|
package/dist/index.mjs
CHANGED
|
@@ -20384,7 +20384,7 @@ const P1 = {
|
|
|
20384
20384
|
isActiveSelection: wB,
|
|
20385
20385
|
blobToBase64: yB,
|
|
20386
20386
|
base64ToBlob: xB
|
|
20387
|
-
}, CB = "0.0.
|
|
20387
|
+
}, CB = "0.0.8";
|
|
20388
20388
|
window && (window._hprintPrintVersion = CB);
|
|
20389
20389
|
Gl.fabric;
|
|
20390
20390
|
function TA(a, i, s) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hprint/plugins",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.8",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
"qs": "~6.12.3",
|
|
23
23
|
"socket.io-client": "^4.8.1",
|
|
24
24
|
"uuid": "~8.3.2",
|
|
25
|
-
"@hprint/core": "0.0.
|
|
26
|
-
"@hprint/shared": "0.0.
|
|
25
|
+
"@hprint/core": "0.0.8",
|
|
26
|
+
"@hprint/shared": "0.0.8"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@types/bwip-js": "^3.2.3",
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
.resize-bar {
|
|
2
|
-
border-radius: 3px;
|
|
3
|
-
background-color: rgba(160, 160, 160, 0.6);
|
|
4
|
-
position: absolute;
|
|
5
|
-
}
|
|
6
|
-
.resize-bar:hover {
|
|
7
|
-
background-color: #328cff;
|
|
8
|
-
}
|
|
9
|
-
.resize-bar.horizontal {
|
|
10
|
-
width: 6px;
|
|
11
|
-
height: 30px;
|
|
12
|
-
}
|
|
13
|
-
.resize-bar.vertical {
|
|
14
|
-
width: 30px;
|
|
15
|
-
height: 6px;
|
|
16
|
-
}
|
|
17
|
-
.resize-bar.active {
|
|
18
|
-
background-color: #328cff;
|
|
19
|
-
}
|
|
20
|
-
#resize-left-bar,
|
|
21
|
-
#resize-right-bar {
|
|
22
|
-
cursor: ew-resize;
|
|
23
|
-
}
|
|
24
|
-
#resize-top-bar,
|
|
25
|
-
#resize-bottom-bar {
|
|
26
|
-
cursor: ns-resize;
|
|
27
|
-
}
|
|
1
|
+
.resize-bar {
|
|
2
|
+
border-radius: 3px;
|
|
3
|
+
background-color: rgba(160, 160, 160, 0.6);
|
|
4
|
+
position: absolute;
|
|
5
|
+
}
|
|
6
|
+
.resize-bar:hover {
|
|
7
|
+
background-color: #328cff;
|
|
8
|
+
}
|
|
9
|
+
.resize-bar.horizontal {
|
|
10
|
+
width: 6px;
|
|
11
|
+
height: 30px;
|
|
12
|
+
}
|
|
13
|
+
.resize-bar.vertical {
|
|
14
|
+
width: 30px;
|
|
15
|
+
height: 6px;
|
|
16
|
+
}
|
|
17
|
+
.resize-bar.active {
|
|
18
|
+
background-color: #328cff;
|
|
19
|
+
}
|
|
20
|
+
#resize-left-bar,
|
|
21
|
+
#resize-right-bar {
|
|
22
|
+
cursor: ew-resize;
|
|
23
|
+
}
|
|
24
|
+
#resize-top-bar,
|
|
25
|
+
#resize-bottom-bar {
|
|
26
|
+
cursor: ns-resize;
|
|
27
|
+
}
|
package/src/objects/Arrow.js
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
import { fabric } from '@hprint/core';
|
|
2
|
-
|
|
3
|
-
fabric.Arrow = fabric.util.createClass(fabric.Line, {
|
|
4
|
-
type: 'arrow',
|
|
5
|
-
superType: 'drawing',
|
|
6
|
-
initialize(points, options) {
|
|
7
|
-
if (!points) {
|
|
8
|
-
const { x1, x2, y1, y2 } = options;
|
|
9
|
-
points = [x1, y1, x2, y2];
|
|
10
|
-
}
|
|
11
|
-
options = options || {};
|
|
12
|
-
this.callSuper('initialize', points, options);
|
|
13
|
-
},
|
|
14
|
-
_render(ctx) {
|
|
15
|
-
this.callSuper('_render', ctx);
|
|
16
|
-
ctx.save();
|
|
17
|
-
// 乘或除对应的scaleX(Y),抵消元素放缩造成的影响,使箭头不会变形
|
|
18
|
-
ctx.scale(1 / this.scaleX, 1 / this.scaleY);
|
|
19
|
-
const xDiff = (this.x2 - this.x1) * this.scaleX;
|
|
20
|
-
const yDiff = (this.y2 - this.y1) * this.scaleY;
|
|
21
|
-
const angle = Math.atan2(yDiff, xDiff);
|
|
22
|
-
ctx.translate(
|
|
23
|
-
((this.x2 - this.x1) / 2) * this.scaleX,
|
|
24
|
-
((this.y2 - this.y1) / 2) * this.scaleY
|
|
25
|
-
);
|
|
26
|
-
ctx.rotate(angle);
|
|
27
|
-
ctx.beginPath();
|
|
28
|
-
// Move 5px in front of line to start the arrow so it does not have the square line end showing in front (0,0)
|
|
29
|
-
ctx.moveTo(0, 0);
|
|
30
|
-
ctx.lineTo(-10, 5);
|
|
31
|
-
ctx.lineTo(-10, -5);
|
|
32
|
-
ctx.closePath();
|
|
33
|
-
ctx.lineWidth = this.lineWidth;
|
|
34
|
-
ctx.strokeStyle = this.stroke;
|
|
35
|
-
ctx.fillStyle = this.fill;
|
|
36
|
-
ctx.stroke();
|
|
37
|
-
ctx.fill();
|
|
38
|
-
ctx.restore();
|
|
39
|
-
},
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
fabric.Arrow.fromObject = (options, callback) => {
|
|
43
|
-
const { x1, x2, y1, y2 } = options;
|
|
44
|
-
return callback(new fabric.Arrow([x1, y1, x2, y2], options));
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
export default fabric.Arrow;
|
|
1
|
+
import { fabric } from '@hprint/core';
|
|
2
|
+
|
|
3
|
+
fabric.Arrow = fabric.util.createClass(fabric.Line, {
|
|
4
|
+
type: 'arrow',
|
|
5
|
+
superType: 'drawing',
|
|
6
|
+
initialize(points, options) {
|
|
7
|
+
if (!points) {
|
|
8
|
+
const { x1, x2, y1, y2 } = options;
|
|
9
|
+
points = [x1, y1, x2, y2];
|
|
10
|
+
}
|
|
11
|
+
options = options || {};
|
|
12
|
+
this.callSuper('initialize', points, options);
|
|
13
|
+
},
|
|
14
|
+
_render(ctx) {
|
|
15
|
+
this.callSuper('_render', ctx);
|
|
16
|
+
ctx.save();
|
|
17
|
+
// 乘或除对应的scaleX(Y),抵消元素放缩造成的影响,使箭头不会变形
|
|
18
|
+
ctx.scale(1 / this.scaleX, 1 / this.scaleY);
|
|
19
|
+
const xDiff = (this.x2 - this.x1) * this.scaleX;
|
|
20
|
+
const yDiff = (this.y2 - this.y1) * this.scaleY;
|
|
21
|
+
const angle = Math.atan2(yDiff, xDiff);
|
|
22
|
+
ctx.translate(
|
|
23
|
+
((this.x2 - this.x1) / 2) * this.scaleX,
|
|
24
|
+
((this.y2 - this.y1) / 2) * this.scaleY
|
|
25
|
+
);
|
|
26
|
+
ctx.rotate(angle);
|
|
27
|
+
ctx.beginPath();
|
|
28
|
+
// Move 5px in front of line to start the arrow so it does not have the square line end showing in front (0,0)
|
|
29
|
+
ctx.moveTo(0, 0);
|
|
30
|
+
ctx.lineTo(-10, 5);
|
|
31
|
+
ctx.lineTo(-10, -5);
|
|
32
|
+
ctx.closePath();
|
|
33
|
+
ctx.lineWidth = this.lineWidth;
|
|
34
|
+
ctx.strokeStyle = this.stroke;
|
|
35
|
+
ctx.fillStyle = this.fill;
|
|
36
|
+
ctx.stroke();
|
|
37
|
+
ctx.fill();
|
|
38
|
+
ctx.restore();
|
|
39
|
+
},
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
fabric.Arrow.fromObject = (options, callback) => {
|
|
43
|
+
const { x1, x2, y1, y2 } = options;
|
|
44
|
+
return callback(new fabric.Arrow([x1, y1, x2, y2], options));
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export default fabric.Arrow;
|
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
import { fabric } from '@hprint/core';
|
|
2
|
-
|
|
3
|
-
fabric.ThinTailArrow = fabric.util.createClass(fabric.Line, {
|
|
4
|
-
type: 'thinTailArrow',
|
|
5
|
-
superType: 'drawing',
|
|
6
|
-
initialize(points, options) {
|
|
7
|
-
if (!points) {
|
|
8
|
-
const { x1, x2, y1, y2 } = options;
|
|
9
|
-
points = [x1, y1, x2, y2];
|
|
10
|
-
}
|
|
11
|
-
options = options || {};
|
|
12
|
-
this.callSuper('initialize', points, options);
|
|
13
|
-
},
|
|
14
|
-
_render(ctx) {
|
|
15
|
-
ctx.save();
|
|
16
|
-
// 乘或除对应的scaleX(Y),抵消元素放缩造成的影响,使箭头不会变形
|
|
17
|
-
ctx.scale(1 / this.scaleX, 1 / this.scaleY);
|
|
18
|
-
const xDiff = (this.x2 - this.x1) * this.scaleX;
|
|
19
|
-
const yDiff = (this.y2 - this.y1) * this.scaleY;
|
|
20
|
-
ctx.translate(-xDiff / 2, -yDiff / 2);
|
|
21
|
-
// 箭头方位角
|
|
22
|
-
const angle = Math.atan2(yDiff, xDiff);
|
|
23
|
-
ctx.rotate(angle);
|
|
24
|
-
// 箭头总长(最小长度是20)
|
|
25
|
-
let length = Math.hypot(xDiff, yDiff);
|
|
26
|
-
length = length < 20 ? 20 : length;
|
|
27
|
-
// 绘制箭头
|
|
28
|
-
ctx.beginPath();
|
|
29
|
-
ctx.moveTo(0, 0);
|
|
30
|
-
ctx.lineTo(length - 18, -5);
|
|
31
|
-
ctx.lineTo(length - 20, -12);
|
|
32
|
-
ctx.lineTo(length, 0);
|
|
33
|
-
ctx.lineTo(length - 20, 12);
|
|
34
|
-
ctx.lineTo(length - 18, 5);
|
|
35
|
-
ctx.lineTo(0, 0);
|
|
36
|
-
ctx.lineWidth = this.strokeWidth;
|
|
37
|
-
ctx.strokeStyle = this.stroke;
|
|
38
|
-
ctx.fillStyle = this.fill;
|
|
39
|
-
ctx.stroke();
|
|
40
|
-
ctx.fill();
|
|
41
|
-
ctx.restore();
|
|
42
|
-
},
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
fabric.ThinTailArrow.fromObject = (options, callback) => {
|
|
46
|
-
const { x1, x2, y1, y2 } = options;
|
|
47
|
-
return callback(new fabric.ThinTailArrow([x1, y1, x2, y2], options));
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
export default fabric.ThinTailArrow;
|
|
1
|
+
import { fabric } from '@hprint/core';
|
|
2
|
+
|
|
3
|
+
fabric.ThinTailArrow = fabric.util.createClass(fabric.Line, {
|
|
4
|
+
type: 'thinTailArrow',
|
|
5
|
+
superType: 'drawing',
|
|
6
|
+
initialize(points, options) {
|
|
7
|
+
if (!points) {
|
|
8
|
+
const { x1, x2, y1, y2 } = options;
|
|
9
|
+
points = [x1, y1, x2, y2];
|
|
10
|
+
}
|
|
11
|
+
options = options || {};
|
|
12
|
+
this.callSuper('initialize', points, options);
|
|
13
|
+
},
|
|
14
|
+
_render(ctx) {
|
|
15
|
+
ctx.save();
|
|
16
|
+
// 乘或除对应的scaleX(Y),抵消元素放缩造成的影响,使箭头不会变形
|
|
17
|
+
ctx.scale(1 / this.scaleX, 1 / this.scaleY);
|
|
18
|
+
const xDiff = (this.x2 - this.x1) * this.scaleX;
|
|
19
|
+
const yDiff = (this.y2 - this.y1) * this.scaleY;
|
|
20
|
+
ctx.translate(-xDiff / 2, -yDiff / 2);
|
|
21
|
+
// 箭头方位角
|
|
22
|
+
const angle = Math.atan2(yDiff, xDiff);
|
|
23
|
+
ctx.rotate(angle);
|
|
24
|
+
// 箭头总长(最小长度是20)
|
|
25
|
+
let length = Math.hypot(xDiff, yDiff);
|
|
26
|
+
length = length < 20 ? 20 : length;
|
|
27
|
+
// 绘制箭头
|
|
28
|
+
ctx.beginPath();
|
|
29
|
+
ctx.moveTo(0, 0);
|
|
30
|
+
ctx.lineTo(length - 18, -5);
|
|
31
|
+
ctx.lineTo(length - 20, -12);
|
|
32
|
+
ctx.lineTo(length, 0);
|
|
33
|
+
ctx.lineTo(length - 20, 12);
|
|
34
|
+
ctx.lineTo(length - 18, 5);
|
|
35
|
+
ctx.lineTo(0, 0);
|
|
36
|
+
ctx.lineWidth = this.strokeWidth;
|
|
37
|
+
ctx.strokeStyle = this.stroke;
|
|
38
|
+
ctx.fillStyle = this.fill;
|
|
39
|
+
ctx.stroke();
|
|
40
|
+
ctx.fill();
|
|
41
|
+
ctx.restore();
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
fabric.ThinTailArrow.fromObject = (options, callback) => {
|
|
46
|
+
const { x1, x2, y1, y2 } = options;
|
|
47
|
+
return callback(new fabric.ThinTailArrow([x1, y1, x2, y2], options));
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export default fabric.ThinTailArrow;
|