@manycore/custom-sdk 1.13.9-alpha.3 → 1.13.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +6 -6
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- window.__customSdkVersion = '1.13.9-alpha.3';!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("servkit"),require("lodash"),require("react"),require("react-dom"),require("@manycore/custom-miniapp-sdk")):"function"==typeof define&&define.amd?define(["servkit","lodash","react","react-dom","@manycore/custom-miniapp-sdk"],t):"object"==typeof exports?exports.CustomSdk=t(require("servkit"),require("lodash"),require("react"),require("react-dom"),require("@manycore/custom-miniapp-sdk")):e.CustomSdk=t(e.servkit,e._,e.React,e.ReactDOM,e["@manycore/custom-miniapp-sdk"])}(window,(function(__WEBPACK_EXTERNAL_MODULE__0__,__WEBPACK_EXTERNAL_MODULE__2__,__WEBPACK_EXTERNAL_MODULE__11__,__WEBPACK_EXTERNAL_MODULE__91__,__WEBPACK_EXTERNAL_MODULE__249__){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=2095)}([function(e,t){e.exports=__WEBPACK_EXTERNAL_MODULE__0__},function(e,t,r){e.exports=r(1347)},function(e,t){e.exports=__WEBPACK_EXTERNAL_MODULE__2__},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProtocolTranslators=t.TranslatorWithContext=t.Translator=t.CompositeCurve2dData=t.SurfaceOfLinearExtrusionData=t.PolylineCurve3dData=t.PolylineCurve2dData=t.GeneralTrimmedSurfaceData=t.RectTrimmedSurfaceData=t.TrimmedSurfaceData=t.NurbsSurfaceData=t.NurbsCurve3dData=t.SurfaceDataConverter=t.CurveDataConverter=t.DataConverter=t.SurfaceToData=t.CurveToData=t.ToroidalSurfaceData=t.SurfaceData=t.Ray3dData=t.PlaneData=t.LineSeg3dData=t.Line3dData=t.Ellipse3dData=t.EllipticalArc3dData=t.EllipticalArc2dData=t.Ellipse2dData=t.RevolveSurfaceData=t.CylindricalSurfaceData=t.Curve3dData=t.ConicalSurfaceData=t.CompositeCurve3dData=t.Circle3dData=t.BoundedCurve3dData=t.Arc3dData=t.GeomLoop2dData=t.GeomFace2dData=t.Ray2dData=t.LineSeg2dData=t.Line2dData=t.Curve3dOnSurfacesData=t.CurveOnSurfaceData=t.Curve2dData=t.Circle2dData=t.BoundedCurve2dData=t.BezierCurve2dData=t.Arc2dData=t.Vector3dData=t.Vector2dData=t.Point3dData=t.Point2dData=t.MVector3dData=t.MVector2dData=t.MPoint3dData=t.MPoint2dData=t.IntervalData=t.CCS3dData=t.CCS2dData=t.TriangledMeshData=t.Transform3dData=t.Transform2dData=t.QuaternionData=t.EulerData=t.Matrix4Data=t.Matrix3Data=t.BezierCurve3dData=t.BBox3dData=t.BBox2dData=t.triangulateOnNurbs=t.triangulateOnDevelopable=t.triangulateOnRevSurface=t.Triangulate=t.simplifyPolygons=t.clipping=t.addRect=t.simplifyPolygonsByHorizontal=t.TriangulatePolygon=t.TriangulateRevSurface=void 0,t.TriangulateNurbs=t.TriangulateDevelopable=t.TriangulatePlane=t.SurfaceUVUtils=t.LoopCentroid=t.ClipperOffset=t.Path3dOffset=t.Path2dOffset=t.PathRectify=t.LineArcDistance=t.CurveDistance=t.FacesBoolean=t.DetectLoop=t.LoopSimplify=t.LoopNormal=t.LoopInLoop=t.LoopCCW=t.LoopArea=t.Curve2dOverlap=t.CurveOverlap=t.LoopUtils=t.PtInLoop=t.SurfaceIntersect=t.CurveSurfaceIntersect=t.Curve2dIntersect=t.CurveIntersect=t.SurfaceOfLinearExtrusion=t.ToroidalSurface=t.GeneralTrimmedSurface=t.RevolveSurface=t.RectTrimmedSurface=t.TrimmedSurface=t.BoundedSurface=t.NurbsSurface=t.ConicalSurface=t.CylindricalSurface=t.Plane=t.ElementarySurface=t.Surface=t.EllipticalArc3d=t.Arc3d=t.Curve3dOnSurfaces=t.CurveOnSurface=t.Ellipse3d=t.Circle3d=t.ConicCurve3d=t.NurbsCurve3d=t.PolylineCurve3d=t.LineSeg3d=t.Ray3d=t.Line3d=t.CompositeCurve3d=t.CompositeCurve2d=t.BoundedCurve3d=t.BezierCurve3d=t.Curve3d=t.GeomLoop2d=t.GeomFace2d=t.EllipticalArc2d=t.Ellipse2d=t.BezierCurve2d=t.Arc2d=t.Circle2d=t.Ray2d=t.PolylineCurve2d=t.NurbsCurve2d=t.LineSeg2d=t.Line2d=t.BoundedCurve2d=t.Curve2d=t.RectMeshNode=t.SurfacePoint=t.TriangledMesh=t.Transform3d=t.Transform2d=t.CCS3d=t.CCS2d=t.BBox3d=t.BBox2d=t.UV=t.Matrix4=t.Matrix3=t.Quaternion=t.Interval=t.EulerOrder=t.Euler=t.MVector3d=t.MVector2d=t.Vector3d=t.Vector2d=t.MPoint3d=t.MPoint2d=t.Point3d=t.Point2d=t.Num=t.rpSolve=t.legendreGaussIntegration=t.Tolerance=t.Axis3d=t.Axis2d=void 0;var n=r(1348),i=mr(n),o=r(562),A=mr(o),a=r(87),s=mr(a),u=r(150),c=mr(u),l=r(118),g=r(70),f=r(372),h=r(41),p=mr(h),d=r(373),I=r(109),y=mr(I),C=r(167),E=mr(C),B=r(444),v=mr(B),m=r(774),Q=mr(m),b=mr(r(563)),_=mr(r(775)),S=mr(r(19)),w=mr(r(33)),D=mr(r(56)),R=r(296),M=r(374),x=vr(r(13)),P=mr(r(564)),T=mr(r(776)),F=r(194),O=r(76),L=mr(r(40)),N=mr(r(43)),k=r(777),G=r(778),U=r(445),j=r(297),V=r(779),H=r(446),Y=r(565),K=r(566),q=r(1351),J=r(1352),W=r(1353),z=r(1354),X=r(130),Z=r(151),$=r(780),ee=r(1355),te=r(1356),re=r(1357),ne=r(375),ie=r(298),oe=vr(r(299)),Ae=vr(r(317)),ae=vr(r(788)),se=vr(r(1371)),ue=vr(r(1373)),ce=r(304),le=r(381),ge=r(170),fe=r(306),he=r(790),pe=r(305),de=r(382),Ie=r(383),ye=r(791),Ce=r(580),Ee=r(384),Be=r(307),ve=r(308),me=r(385),Qe=r(309),be=r(311),_e=r(154),Se=r(310),we=r(794),De=r(390),Re=r(389),Me=r(386),xe=r(453),Pe=r(392),Te=r(387),Fe=r(312),Oe=r(454),Le=r(313),Ne=r(314),ke=r(315),Ge=r(393),Ue=r(394),je=r(316),Ve=r(388),He=r(456),Ye=r(395),Ke=r(263),qe=r(396),Je=r(398),We=r(578),ze=r(94),Xe=r(196),Ze=r(195),$e=r(119),et=r(172),tt=r(301),rt=r(95),nt=r(110),it=r(579),ot=r(581),At=r(57),at=r(45),st=r(105),ut=r(121),ct=r(261),lt=r(61),gt=r(131),ft=r(120),ht=r(391),pt=r(77),dt=r(458),It=r(567),yt=r(171),Ct=r(262),Et=r(376),Bt=r(198),vt=r(132),mt=r(379),Qt=r(168),bt=r(169),_t=r(455),St=r(58),wt=r(62),Dt=r(106),Rt=r(318),Mt=r(49),xt=r(197),Pt=r(152),Tt=r(457),Ft=r(319),Ot=r(572),Lt=r(397),Nt=r(199),kt=r(576),Gt=r(1375),Ut=r(26),jt=r(1385),Vt=vr(r(822)),Ht=vr(r(1389)),Yt=vr(r(823)),Kt=vr(r(300)),qt=vr(r(1390)),Jt=vr(r(88)),Wt=vr(r(1393)),zt=vr(r(461)),Xt=vr(r(303)),Zt=vr(r(153)),$t=vr(r(792)),er=vr(r(793)),tr=vr(r(378)),rr=vr(r(1395)),nr=vr(r(219)),ir=vr(r(1396)),or=vr(r(1397)),Ar=vr(r(827)),ar=vr(r(1404)),sr=vr(r(577)),ur=vr(r(321)),cr=vr(r(462)),lr=vr(r(218)),gr=r(1405),fr=vr(gr),hr=r(1406),pr=vr(hr),dr=vr(r(1407)),Ir=vr(r(1409)),yr=r(1410),Cr=vr(yr),Er=r(380),Br=r(399);function vr(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function mr(e){return e&&e.__esModule?e:{default:e}}var Qr=Object.assign({},Ae,ae),br=Object.assign({},Qr,se);t.Axis2d=i.default,t.Axis3d=A.default,t.Tolerance=x,t.legendreGaussIntegration=d.legendreGaussIntegration,t.rpSolve=M.rpSolve,t.Num=S.default,t.Point2d=w.default,t.Point3d=D.default,t.MPoint2d=v.default,t.MPoint3d=Q.default,t.Vector2d=L.default,t.Vector3d=N.default,t.MVector2d=b.default,t.MVector3d=_.default,t.Euler=f.Euler,t.EulerOrder=f.EulerOrder,t.Interval=p.default,t.Quaternion=R.Quaternion,t.Matrix3=y.default,t.Matrix4=E.default,t.UV=O.UV,t.BBox2d=s.default,t.BBox3d=c.default,t.CCS2d=l.CCS2d,t.CCS3d=g.CCS3d,t.Transform2d=P.default,t.Transform3d=T.default,t.TriangledMesh=F.TriangledMesh,t.SurfacePoint=Er.SurfacePoint,t.RectMeshNode=Er.RectMeshNode,t.Curve2d=tt.Curve2d,t.BoundedCurve2d=Ze.BoundedCurve2d,t.Line2d=At.Line2d,t.LineSeg2d=at.LineSeg2d,t.NurbsCurve2d=st.NurbsCurve2d,t.PolylineCurve2d=ut.PolylineCurve2d,t.Ray2d=ct.Ray2d,t.Circle2d=$e.Circle2d,t.Arc2d=ze.Arc2d,t.BezierCurve2d=Xe.BezierCurve2d,t.Ellipse2d=rt.Ellipse2d,t.EllipticalArc2d=nt.EllipticalArc2d,t.GeomFace2d=it.GeomFace2d,t.GeomLoop2d=ot.GeomLoop2d,t.Curve3d=Et.Curve3d,t.BezierCurve3d=gt.BezierCurve3d,t.BoundedCurve3d=ft.BoundedCurve3d,t.CompositeCurve2d=et.CompositeCurve2d,t.CompositeCurve3d=dt.CompositeCurve3d,t.Line3d=St.Line3d,t.Ray3d=Pt.Ray3d,t.LineSeg3d=wt.LineSeg3d,t.PolylineCurve3d=xt.PolylineCurve3d,t.NurbsCurve3d=Dt.NurbsCurve3d,t.ConicCurve3d=It.ConicCurve3d,t.Circle3d=pt.Circle3d,t.Ellipse3d=Qt.Ellipse3d,t.CurveOnSurface=Ct.CurveOnSurface,t.Curve3dOnSurfaces=Bt.Curve3dOnSurfaces,t.Arc3d=lt.Arc3d,t.EllipticalArc3d=bt.EllipticalArc3d,t.Surface=Ot.Surface,t.ElementarySurface=mt.ElementarySurface,t.Plane=Mt.Plane,t.CylindricalSurface=vt.CylindricalSurface,t.ConicalSurface=yt.ConicalSurface,t.NurbsSurface=Rt.NurbsSurface,t.BoundedSurface=ht.BoundedSurface,t.TrimmedSurface=kt.TrimmedSurface,t.RectTrimmedSurface=Tt.RectTrimmedSurface,t.RevolveSurface=Ft.RevolveSurface,t.GeneralTrimmedSurface=_t.GeneralTrimmedSurface,t.ToroidalSurface=Nt.ToroidalSurface,t.SurfaceOfLinearExtrusion=Lt.SurfaceOfLinearExtrusion,t.CurveIntersect=Kt,t.Curve2dIntersect=Jt,t.CurveSurfaceIntersect=qt,t.SurfaceIntersect=Wt,t.PtInLoop=nr,t.LoopUtils=ir,t.CurveOverlap=sr,t.Curve2dOverlap=ur,t.LoopArea=Xt,t.LoopCCW=Zt,t.LoopInLoop=er,t.LoopNormal=tr,t.LoopSimplify=rr,t.DetectLoop=zt,t.FacesBoolean=Vt,t.CurveDistance=Ht,t.LineArcDistance=Yt,t.PathRectify=cr,t.Path2dOffset=Ar,t.Path3dOffset=ar,t.ClipperOffset=or,t.LoopCentroid=$t,t.SurfaceUVUtils=lr,t.TriangulatePlane=dr,t.TriangulateDevelopable=fr,t.TriangulateNurbs=pr,t.TriangulateRevSurface=Cr,t.TriangulatePolygon=Ir,t.simplifyPolygonsByHorizontal=Br.simplifyPolygonsByHorizontal,t.addRect=Br.addRect,t.clipping=Br.clipping,t.simplifyPolygons=Br.simplifyPolygons,t.Triangulate=Ir,t.triangulateOnRevSurface=yr.triangulateOnRevSurface,t.triangulateOnDevelopable=gr.triangulateOnDevelopable,t.triangulateOnNurbs=hr.triangulateOnNurbs,t.BBox2dData=k.BBox2dData,t.BBox3dData=G.BBox3dData,t.BezierCurve3dData=be.BezierCurve3dData,t.Matrix3Data=Y.Matrix3Data,t.Matrix4Data=K.Matrix4Data,t.EulerData=V.EulerData,t.QuaternionData=$.QuaternionData,t.Transform2dData=ee.Transform2dData,t.Transform3dData=te.Transform3dData,t.TriangledMeshData=re.TriangledMeshData,t.CCS2dData=U.CCS2dData,t.CCS3dData=j.CCS3dData,t.IntervalData=H.IntervalData,t.MPoint2dData=q.MPoint2dData,t.MPoint3dData=J.MPoint3dData,t.MVector2dData=W.MVector2dData,t.MVector3dData=z.MVector3dData,t.Point2dData=X.Point2dData,t.Point3dData=Z.Point3dData,t.Vector2dData=ne.Vector2dData,t.Vector3dData=ie.Vector3dData,t.Arc2dData=ce.Arc2dData,t.BezierCurve2dData=le.BezierCurve2dData,t.BoundedCurve2dData=ge.BoundedCurve2dData,t.Circle2dData=fe.Circle2dData,t.Curve2dData=pe.Curve2dData,t.CurveOnSurfaceData=Re.CurveOnSurfaceData,t.Curve3dOnSurfacesData=xe.Curve3dOnSurfacesData,t.Line2dData=Ee.Line2dData,t.LineSeg2dData=Be.LineSeg2dData,t.Ray2dData=me.Ray2dData,t.GeomFace2dData=ye.GeomFace2dData,t.GeomLoop2dData=Ce.GeomLoop2dData,t.Arc3dData=Qe.Arc3dData,t.BoundedCurve3dData=_e.BoundedCurve3dData,t.Circle3dData=Se.Circle3dData,t.CompositeCurve3dData=we.CompositeCurve3dData,t.ConicalSurfaceData=De.ConicalSurfaceData,t.Curve3dData=Me.Curve3dData,t.CylindricalSurfaceData=Pe.CylindricalSurfaceData,t.RevolveSurfaceData=Ye.RevolveSurfaceData,t.Ellipse2dData=de.Ellipse2dData,t.EllipticalArc2dData=Ie.EllipticalArc2dData,t.EllipticalArc3dData=Fe.EllipticalArc3dData,t.Ellipse3dData=Te.Ellipse3dData,t.Line3dData=Le.Line3dData,t.LineSeg3dData=Ne.LineSeg3dData,t.PlaneData=Ue.PlaneData,t.Ray3dData=Ve.Ray3dData,t.SurfaceData=Ke.SurfaceData,t.ToroidalSurfaceData=Je.ToroidalSurfaceData,t.CurveToData=oe,t.SurfaceToData=ue,t.DataConverter=br,t.CurveDataConverter=Qr,t.SurfaceDataConverter=se,t.NurbsCurve3dData=ke.NurbsCurve3dData,t.NurbsSurfaceData=Ge.NurbsSurfaceData,t.TrimmedSurfaceData=We.TrimmedSurfaceData,t.RectTrimmedSurfaceData=He.RectTrimmedSurfaceData,t.GeneralTrimmedSurfaceData=Oe.GeneralTrimmedSurfaceData,t.PolylineCurve2dData=ve.PolylineCurve2dData,t.PolylineCurve3dData=je.PolylineCurve3dData,t.SurfaceOfLinearExtrusionData=qe.SurfaceOfLinearExtrusionData,t.CompositeCurve2dData=he.CompositeCurve2dData,t.Translator=Ut.Translator,t.TranslatorWithContext=jt.TranslatorWithContext,t.ProtocolTranslators=Gt.ProtocolTranslators},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}
1
+ window.__customSdkVersion = '1.13.10';!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("servkit"),require("lodash"),require("react"),require("react-dom"),require("@manycore/custom-miniapp-sdk")):"function"==typeof define&&define.amd?define(["servkit","lodash","react","react-dom","@manycore/custom-miniapp-sdk"],t):"object"==typeof exports?exports.CustomSdk=t(require("servkit"),require("lodash"),require("react"),require("react-dom"),require("@manycore/custom-miniapp-sdk")):e.CustomSdk=t(e.servkit,e._,e.React,e.ReactDOM,e["@manycore/custom-miniapp-sdk"])}(window,(function(__WEBPACK_EXTERNAL_MODULE__0__,__WEBPACK_EXTERNAL_MODULE__2__,__WEBPACK_EXTERNAL_MODULE__11__,__WEBPACK_EXTERNAL_MODULE__91__,__WEBPACK_EXTERNAL_MODULE__249__){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=2095)}([function(e,t){e.exports=__WEBPACK_EXTERNAL_MODULE__0__},function(e,t,r){e.exports=r(1347)},function(e,t){e.exports=__WEBPACK_EXTERNAL_MODULE__2__},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProtocolTranslators=t.TranslatorWithContext=t.Translator=t.CompositeCurve2dData=t.SurfaceOfLinearExtrusionData=t.PolylineCurve3dData=t.PolylineCurve2dData=t.GeneralTrimmedSurfaceData=t.RectTrimmedSurfaceData=t.TrimmedSurfaceData=t.NurbsSurfaceData=t.NurbsCurve3dData=t.SurfaceDataConverter=t.CurveDataConverter=t.DataConverter=t.SurfaceToData=t.CurveToData=t.ToroidalSurfaceData=t.SurfaceData=t.Ray3dData=t.PlaneData=t.LineSeg3dData=t.Line3dData=t.Ellipse3dData=t.EllipticalArc3dData=t.EllipticalArc2dData=t.Ellipse2dData=t.RevolveSurfaceData=t.CylindricalSurfaceData=t.Curve3dData=t.ConicalSurfaceData=t.CompositeCurve3dData=t.Circle3dData=t.BoundedCurve3dData=t.Arc3dData=t.GeomLoop2dData=t.GeomFace2dData=t.Ray2dData=t.LineSeg2dData=t.Line2dData=t.Curve3dOnSurfacesData=t.CurveOnSurfaceData=t.Curve2dData=t.Circle2dData=t.BoundedCurve2dData=t.BezierCurve2dData=t.Arc2dData=t.Vector3dData=t.Vector2dData=t.Point3dData=t.Point2dData=t.MVector3dData=t.MVector2dData=t.MPoint3dData=t.MPoint2dData=t.IntervalData=t.CCS3dData=t.CCS2dData=t.TriangledMeshData=t.Transform3dData=t.Transform2dData=t.QuaternionData=t.EulerData=t.Matrix4Data=t.Matrix3Data=t.BezierCurve3dData=t.BBox3dData=t.BBox2dData=t.triangulateOnNurbs=t.triangulateOnDevelopable=t.triangulateOnRevSurface=t.Triangulate=t.simplifyPolygons=t.clipping=t.addRect=t.simplifyPolygonsByHorizontal=t.TriangulatePolygon=t.TriangulateRevSurface=void 0,t.TriangulateNurbs=t.TriangulateDevelopable=t.TriangulatePlane=t.SurfaceUVUtils=t.LoopCentroid=t.ClipperOffset=t.Path3dOffset=t.Path2dOffset=t.PathRectify=t.LineArcDistance=t.CurveDistance=t.FacesBoolean=t.DetectLoop=t.LoopSimplify=t.LoopNormal=t.LoopInLoop=t.LoopCCW=t.LoopArea=t.Curve2dOverlap=t.CurveOverlap=t.LoopUtils=t.PtInLoop=t.SurfaceIntersect=t.CurveSurfaceIntersect=t.Curve2dIntersect=t.CurveIntersect=t.SurfaceOfLinearExtrusion=t.ToroidalSurface=t.GeneralTrimmedSurface=t.RevolveSurface=t.RectTrimmedSurface=t.TrimmedSurface=t.BoundedSurface=t.NurbsSurface=t.ConicalSurface=t.CylindricalSurface=t.Plane=t.ElementarySurface=t.Surface=t.EllipticalArc3d=t.Arc3d=t.Curve3dOnSurfaces=t.CurveOnSurface=t.Ellipse3d=t.Circle3d=t.ConicCurve3d=t.NurbsCurve3d=t.PolylineCurve3d=t.LineSeg3d=t.Ray3d=t.Line3d=t.CompositeCurve3d=t.CompositeCurve2d=t.BoundedCurve3d=t.BezierCurve3d=t.Curve3d=t.GeomLoop2d=t.GeomFace2d=t.EllipticalArc2d=t.Ellipse2d=t.BezierCurve2d=t.Arc2d=t.Circle2d=t.Ray2d=t.PolylineCurve2d=t.NurbsCurve2d=t.LineSeg2d=t.Line2d=t.BoundedCurve2d=t.Curve2d=t.RectMeshNode=t.SurfacePoint=t.TriangledMesh=t.Transform3d=t.Transform2d=t.CCS3d=t.CCS2d=t.BBox3d=t.BBox2d=t.UV=t.Matrix4=t.Matrix3=t.Quaternion=t.Interval=t.EulerOrder=t.Euler=t.MVector3d=t.MVector2d=t.Vector3d=t.Vector2d=t.MPoint3d=t.MPoint2d=t.Point3d=t.Point2d=t.Num=t.rpSolve=t.legendreGaussIntegration=t.Tolerance=t.Axis3d=t.Axis2d=void 0;var n=r(1348),i=mr(n),o=r(562),A=mr(o),a=r(87),s=mr(a),u=r(150),c=mr(u),l=r(118),g=r(70),f=r(372),h=r(41),p=mr(h),d=r(373),I=r(109),y=mr(I),C=r(167),E=mr(C),B=r(444),v=mr(B),m=r(774),Q=mr(m),b=mr(r(563)),_=mr(r(775)),S=mr(r(19)),w=mr(r(33)),D=mr(r(56)),R=r(296),M=r(374),x=vr(r(13)),P=mr(r(564)),T=mr(r(776)),F=r(194),O=r(76),L=mr(r(40)),N=mr(r(43)),k=r(777),G=r(778),U=r(445),j=r(297),V=r(779),H=r(446),Y=r(565),K=r(566),q=r(1351),J=r(1352),W=r(1353),z=r(1354),X=r(130),Z=r(151),$=r(780),ee=r(1355),te=r(1356),re=r(1357),ne=r(375),ie=r(298),oe=vr(r(299)),Ae=vr(r(317)),ae=vr(r(788)),se=vr(r(1371)),ue=vr(r(1373)),ce=r(304),le=r(381),ge=r(170),fe=r(306),he=r(790),pe=r(305),de=r(382),Ie=r(383),ye=r(791),Ce=r(580),Ee=r(384),Be=r(307),ve=r(308),me=r(385),Qe=r(309),be=r(311),_e=r(154),Se=r(310),we=r(794),De=r(390),Re=r(389),Me=r(386),xe=r(453),Pe=r(392),Te=r(387),Fe=r(312),Oe=r(454),Le=r(313),Ne=r(314),ke=r(315),Ge=r(393),Ue=r(394),je=r(316),Ve=r(388),He=r(456),Ye=r(395),Ke=r(263),qe=r(396),Je=r(398),We=r(578),ze=r(94),Xe=r(196),Ze=r(195),$e=r(119),et=r(172),tt=r(301),rt=r(95),nt=r(110),it=r(579),ot=r(581),At=r(57),at=r(45),st=r(105),ut=r(121),ct=r(261),lt=r(61),gt=r(131),ft=r(120),ht=r(391),pt=r(77),dt=r(458),It=r(567),yt=r(171),Ct=r(262),Et=r(376),Bt=r(198),vt=r(132),mt=r(379),Qt=r(168),bt=r(169),_t=r(455),St=r(58),wt=r(62),Dt=r(106),Rt=r(318),Mt=r(49),xt=r(197),Pt=r(152),Tt=r(457),Ft=r(319),Ot=r(572),Lt=r(397),Nt=r(199),kt=r(576),Gt=r(1375),Ut=r(26),jt=r(1385),Vt=vr(r(822)),Ht=vr(r(1389)),Yt=vr(r(823)),Kt=vr(r(300)),qt=vr(r(1390)),Jt=vr(r(88)),Wt=vr(r(1393)),zt=vr(r(461)),Xt=vr(r(303)),Zt=vr(r(153)),$t=vr(r(792)),er=vr(r(793)),tr=vr(r(378)),rr=vr(r(1395)),nr=vr(r(219)),ir=vr(r(1396)),or=vr(r(1397)),Ar=vr(r(827)),ar=vr(r(1404)),sr=vr(r(577)),ur=vr(r(321)),cr=vr(r(462)),lr=vr(r(218)),gr=r(1405),fr=vr(gr),hr=r(1406),pr=vr(hr),dr=vr(r(1407)),Ir=vr(r(1409)),yr=r(1410),Cr=vr(yr),Er=r(380),Br=r(399);function vr(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function mr(e){return e&&e.__esModule?e:{default:e}}var Qr=Object.assign({},Ae,ae),br=Object.assign({},Qr,se);t.Axis2d=i.default,t.Axis3d=A.default,t.Tolerance=x,t.legendreGaussIntegration=d.legendreGaussIntegration,t.rpSolve=M.rpSolve,t.Num=S.default,t.Point2d=w.default,t.Point3d=D.default,t.MPoint2d=v.default,t.MPoint3d=Q.default,t.Vector2d=L.default,t.Vector3d=N.default,t.MVector2d=b.default,t.MVector3d=_.default,t.Euler=f.Euler,t.EulerOrder=f.EulerOrder,t.Interval=p.default,t.Quaternion=R.Quaternion,t.Matrix3=y.default,t.Matrix4=E.default,t.UV=O.UV,t.BBox2d=s.default,t.BBox3d=c.default,t.CCS2d=l.CCS2d,t.CCS3d=g.CCS3d,t.Transform2d=P.default,t.Transform3d=T.default,t.TriangledMesh=F.TriangledMesh,t.SurfacePoint=Er.SurfacePoint,t.RectMeshNode=Er.RectMeshNode,t.Curve2d=tt.Curve2d,t.BoundedCurve2d=Ze.BoundedCurve2d,t.Line2d=At.Line2d,t.LineSeg2d=at.LineSeg2d,t.NurbsCurve2d=st.NurbsCurve2d,t.PolylineCurve2d=ut.PolylineCurve2d,t.Ray2d=ct.Ray2d,t.Circle2d=$e.Circle2d,t.Arc2d=ze.Arc2d,t.BezierCurve2d=Xe.BezierCurve2d,t.Ellipse2d=rt.Ellipse2d,t.EllipticalArc2d=nt.EllipticalArc2d,t.GeomFace2d=it.GeomFace2d,t.GeomLoop2d=ot.GeomLoop2d,t.Curve3d=Et.Curve3d,t.BezierCurve3d=gt.BezierCurve3d,t.BoundedCurve3d=ft.BoundedCurve3d,t.CompositeCurve2d=et.CompositeCurve2d,t.CompositeCurve3d=dt.CompositeCurve3d,t.Line3d=St.Line3d,t.Ray3d=Pt.Ray3d,t.LineSeg3d=wt.LineSeg3d,t.PolylineCurve3d=xt.PolylineCurve3d,t.NurbsCurve3d=Dt.NurbsCurve3d,t.ConicCurve3d=It.ConicCurve3d,t.Circle3d=pt.Circle3d,t.Ellipse3d=Qt.Ellipse3d,t.CurveOnSurface=Ct.CurveOnSurface,t.Curve3dOnSurfaces=Bt.Curve3dOnSurfaces,t.Arc3d=lt.Arc3d,t.EllipticalArc3d=bt.EllipticalArc3d,t.Surface=Ot.Surface,t.ElementarySurface=mt.ElementarySurface,t.Plane=Mt.Plane,t.CylindricalSurface=vt.CylindricalSurface,t.ConicalSurface=yt.ConicalSurface,t.NurbsSurface=Rt.NurbsSurface,t.BoundedSurface=ht.BoundedSurface,t.TrimmedSurface=kt.TrimmedSurface,t.RectTrimmedSurface=Tt.RectTrimmedSurface,t.RevolveSurface=Ft.RevolveSurface,t.GeneralTrimmedSurface=_t.GeneralTrimmedSurface,t.ToroidalSurface=Nt.ToroidalSurface,t.SurfaceOfLinearExtrusion=Lt.SurfaceOfLinearExtrusion,t.CurveIntersect=Kt,t.Curve2dIntersect=Jt,t.CurveSurfaceIntersect=qt,t.SurfaceIntersect=Wt,t.PtInLoop=nr,t.LoopUtils=ir,t.CurveOverlap=sr,t.Curve2dOverlap=ur,t.LoopArea=Xt,t.LoopCCW=Zt,t.LoopInLoop=er,t.LoopNormal=tr,t.LoopSimplify=rr,t.DetectLoop=zt,t.FacesBoolean=Vt,t.CurveDistance=Ht,t.LineArcDistance=Yt,t.PathRectify=cr,t.Path2dOffset=Ar,t.Path3dOffset=ar,t.ClipperOffset=or,t.LoopCentroid=$t,t.SurfaceUVUtils=lr,t.TriangulatePlane=dr,t.TriangulateDevelopable=fr,t.TriangulateNurbs=pr,t.TriangulateRevSurface=Cr,t.TriangulatePolygon=Ir,t.simplifyPolygonsByHorizontal=Br.simplifyPolygonsByHorizontal,t.addRect=Br.addRect,t.clipping=Br.clipping,t.simplifyPolygons=Br.simplifyPolygons,t.Triangulate=Ir,t.triangulateOnRevSurface=yr.triangulateOnRevSurface,t.triangulateOnDevelopable=gr.triangulateOnDevelopable,t.triangulateOnNurbs=hr.triangulateOnNurbs,t.BBox2dData=k.BBox2dData,t.BBox3dData=G.BBox3dData,t.BezierCurve3dData=be.BezierCurve3dData,t.Matrix3Data=Y.Matrix3Data,t.Matrix4Data=K.Matrix4Data,t.EulerData=V.EulerData,t.QuaternionData=$.QuaternionData,t.Transform2dData=ee.Transform2dData,t.Transform3dData=te.Transform3dData,t.TriangledMeshData=re.TriangledMeshData,t.CCS2dData=U.CCS2dData,t.CCS3dData=j.CCS3dData,t.IntervalData=H.IntervalData,t.MPoint2dData=q.MPoint2dData,t.MPoint3dData=J.MPoint3dData,t.MVector2dData=W.MVector2dData,t.MVector3dData=z.MVector3dData,t.Point2dData=X.Point2dData,t.Point3dData=Z.Point3dData,t.Vector2dData=ne.Vector2dData,t.Vector3dData=ie.Vector3dData,t.Arc2dData=ce.Arc2dData,t.BezierCurve2dData=le.BezierCurve2dData,t.BoundedCurve2dData=ge.BoundedCurve2dData,t.Circle2dData=fe.Circle2dData,t.Curve2dData=pe.Curve2dData,t.CurveOnSurfaceData=Re.CurveOnSurfaceData,t.Curve3dOnSurfacesData=xe.Curve3dOnSurfacesData,t.Line2dData=Ee.Line2dData,t.LineSeg2dData=Be.LineSeg2dData,t.Ray2dData=me.Ray2dData,t.GeomFace2dData=ye.GeomFace2dData,t.GeomLoop2dData=Ce.GeomLoop2dData,t.Arc3dData=Qe.Arc3dData,t.BoundedCurve3dData=_e.BoundedCurve3dData,t.Circle3dData=Se.Circle3dData,t.CompositeCurve3dData=we.CompositeCurve3dData,t.ConicalSurfaceData=De.ConicalSurfaceData,t.Curve3dData=Me.Curve3dData,t.CylindricalSurfaceData=Pe.CylindricalSurfaceData,t.RevolveSurfaceData=Ye.RevolveSurfaceData,t.Ellipse2dData=de.Ellipse2dData,t.EllipticalArc2dData=Ie.EllipticalArc2dData,t.EllipticalArc3dData=Fe.EllipticalArc3dData,t.Ellipse3dData=Te.Ellipse3dData,t.Line3dData=Le.Line3dData,t.LineSeg3dData=Ne.LineSeg3dData,t.PlaneData=Ue.PlaneData,t.Ray3dData=Ve.Ray3dData,t.SurfaceData=Ke.SurfaceData,t.ToroidalSurfaceData=Je.ToroidalSurfaceData,t.CurveToData=oe,t.SurfaceToData=ue,t.DataConverter=br,t.CurveDataConverter=Qr,t.SurfaceDataConverter=se,t.NurbsCurve3dData=ke.NurbsCurve3dData,t.NurbsSurfaceData=Ge.NurbsSurfaceData,t.TrimmedSurfaceData=We.TrimmedSurfaceData,t.RectTrimmedSurfaceData=He.RectTrimmedSurfaceData,t.GeneralTrimmedSurfaceData=Oe.GeneralTrimmedSurfaceData,t.PolylineCurve2dData=ve.PolylineCurve2dData,t.PolylineCurve3dData=je.PolylineCurve3dData,t.SurfaceOfLinearExtrusionData=qe.SurfaceOfLinearExtrusionData,t.CompositeCurve2dData=he.CompositeCurve2dData,t.Translator=Ut.Translator,t.TranslatorWithContext=jt.TranslatorWithContext,t.ProtocolTranslators=Gt.ProtocolTranslators},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}
2
2
  /*! *****************************************************************************
3
3
  Copyright (c) Microsoft Corporation.
4
4
 
@@ -63,7 +63,7 @@ e.exports=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.
63
63
  Version 1.9.0
64
64
  https://localforage.github.io/localForage
65
65
  (c) 2013-2017 Mozilla, Apache License 2.0
66
- */A=function(){return function e(t,r,n){function i(A,a){if(!r[A]){if(!t[A]){if(o)return o(A,!0);var s=new Error("Cannot find module '"+A+"'");throw s.code="MODULE_NOT_FOUND",s}var u=r[A]={exports:{}};t[A][0].call(u.exports,(function(e){var r=t[A][1][e];return i(r||e)}),u,u.exports,e,t,r,n)}return r[A].exports}for(var o=!1,A=0;A<n.length;A++)i(n[A]);return i}({1:[function(e,t,n){(function(e){"use strict";var r,n,i=e.MutationObserver||e.WebKitMutationObserver;if(i){var o=0,A=new i(c),a=e.document.createTextNode("");A.observe(a,{characterData:!0}),r=function(){a.data=o=++o%2}}else if(e.setImmediate||void 0===e.MessageChannel)r="document"in e&&"onreadystatechange"in e.document.createElement("script")?function(){var t=e.document.createElement("script");t.onreadystatechange=function(){c(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},e.document.documentElement.appendChild(t)}:function(){setTimeout(c,0)};else{var s=new e.MessageChannel;s.port1.onmessage=c,r=function(){s.port2.postMessage(0)}}var u=[];function c(){var e,t;n=!0;for(var r=u.length;r;){for(t=u,u=[],e=-1;++e<r;)t[e]();r=u.length}n=!1}t.exports=function(e){1!==u.push(e)||n||r()}}).call(this,void 0!==r?r:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],2:[function(e,t,r){"use strict";var n=e(1);function i(){}var o={},A=["REJECTED"],s=["FULFILLED"],u=["PENDING"];function c(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=u,this.queue=[],this.outcome=void 0,e!==i&&h(this,e)}function l(e,t,r){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof r&&(this.onRejected=r,this.callRejected=this.otherCallRejected)}function g(e,t,r){n((function(){var n;try{n=t(r)}catch(t){return o.reject(e,t)}n===e?o.reject(e,new TypeError("Cannot resolve promise with itself")):o.resolve(e,n)}))}function f(e){var t=e&&e.then;if(e&&("object"===a(e)||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function h(e,t){var r=!1;function n(t){r||(r=!0,o.reject(e,t))}function i(t){r||(r=!0,o.resolve(e,t))}var A=p((function(){t(i,n)}));"error"===A.status&&n(A.value)}function p(e,t){var r={};try{r.value=e(t),r.status="success"}catch(e){r.status="error",r.value=e}return r}t.exports=c,c.prototype.catch=function(e){return this.then(null,e)},c.prototype.then=function(e,t){if("function"!=typeof e&&this.state===s||"function"!=typeof t&&this.state===A)return this;var r=new this.constructor(i);return this.state!==u?g(r,this.state===s?e:t,this.outcome):this.queue.push(new l(r,e,t)),r},l.prototype.callFulfilled=function(e){o.resolve(this.promise,e)},l.prototype.otherCallFulfilled=function(e){g(this.promise,this.onFulfilled,e)},l.prototype.callRejected=function(e){o.reject(this.promise,e)},l.prototype.otherCallRejected=function(e){g(this.promise,this.onRejected,e)},o.resolve=function(e,t){var r=p(f,t);if("error"===r.status)return o.reject(e,r.value);var n=r.value;if(n)h(e,n);else{e.state=s,e.outcome=t;for(var i=-1,A=e.queue.length;++i<A;)e.queue[i].callFulfilled(t)}return e},o.reject=function(e,t){e.state=A,e.outcome=t;for(var r=-1,n=e.queue.length;++r<n;)e.queue[r].callRejected(t);return e},c.resolve=function(e){return e instanceof this?e:o.resolve(new this(i),e)},c.reject=function(e){var t=new this(i);return o.reject(t,e)},c.all=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var r=e.length,n=!1;if(!r)return this.resolve([]);for(var A=new Array(r),a=0,s=-1,u=new this(i);++s<r;)c(e[s],s);return u;function c(e,i){t.resolve(e).then((function(e){A[i]=e,++a!==r||n||(n=!0,o.resolve(u,A))}),(function(e){n||(n=!0,o.reject(u,e))}))}},c.race=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var r=e.length,n=!1;if(!r)return this.resolve([]);for(var A,a=-1,s=new this(i);++a<r;)A=e[a],t.resolve(A).then((function(e){n||(n=!0,o.resolve(s,e))}),(function(e){n||(n=!0,o.reject(s,e))}));return s}},{1:1}],3:[function(e,t,n){(function(t){"use strict";"function"!=typeof t.Promise&&(t.Promise=e(2))}).call(this,void 0!==r?r:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{2:2}],4:[function(e,t,r){"use strict";var n="function"==typeof Symbol&&"symbol"===a(Symbol.iterator)?function(e){return a(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":a(e)},i=function(){try{if("undefined"!=typeof indexedDB)return indexedDB;if("undefined"!=typeof webkitIndexedDB)return webkitIndexedDB;if("undefined"!=typeof mozIndexedDB)return mozIndexedDB;if("undefined"!=typeof OIndexedDB)return OIndexedDB;if("undefined"!=typeof msIndexedDB)return msIndexedDB}catch(e){return}}();function o(e,t){e=e||[],t=t||{};try{return new Blob(e,t)}catch(i){if("TypeError"!==i.name)throw i;for(var r=new("undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder?MozBlobBuilder:WebKitBlobBuilder),n=0;n<e.length;n+=1)r.append(e[n]);return r.getBlob(t.type)}}"undefined"==typeof Promise&&e(3);var A=Promise;function s(e,t){t&&e.then((function(e){t(null,e)}),(function(e){t(e)}))}function u(e,t,r){"function"==typeof t&&e.then(t),"function"==typeof r&&e.catch(r)}function c(e){return"string"!=typeof e&&(console.warn(e+" used as a key, but it is not a string."),e=String(e)),e}function l(){if(arguments.length&&"function"==typeof arguments[arguments.length-1])return arguments[arguments.length-1]}var g=void 0,f={},h=Object.prototype.toString;function p(e){return"boolean"==typeof g?A.resolve(g):function(e){return new A((function(t){var r=e.transaction("local-forage-detect-blob-support","readwrite"),n=o([""]);r.objectStore("local-forage-detect-blob-support").put(n,"key"),r.onabort=function(e){e.preventDefault(),e.stopPropagation(),t(!1)},r.oncomplete=function(){var e=navigator.userAgent.match(/Chrome\/(\d+)/),r=navigator.userAgent.match(/Edge\//);t(r||!e||parseInt(e[1],10)>=43)}})).catch((function(){return!1}))}(e).then((function(e){return g=e}))}function d(e){var t=f[e.name],r={};r.promise=new A((function(e,t){r.resolve=e,r.reject=t})),t.deferredOperations.push(r),t.dbReady?t.dbReady=t.dbReady.then((function(){return r.promise})):t.dbReady=r.promise}function I(e){var t=f[e.name].deferredOperations.pop();if(t)return t.resolve(),t.promise}function y(e,t){var r=f[e.name].deferredOperations.pop();if(r)return r.reject(t),r.promise}function C(e,t){return new A((function(r,n){if(f[e.name]=f[e.name]||{forages:[],db:null,dbReady:null,deferredOperations:[]},e.db){if(!t)return r(e.db);d(e),e.db.close()}var o=[e.name];t&&o.push(e.version);var A=i.open.apply(i,o);t&&(A.onupgradeneeded=function(t){var r=A.result;try{r.createObjectStore(e.storeName),t.oldVersion<=1&&r.createObjectStore("local-forage-detect-blob-support")}catch(r){if("ConstraintError"!==r.name)throw r;console.warn('The database "'+e.name+'" has been upgraded from version '+t.oldVersion+" to version "+t.newVersion+', but the storage "'+e.storeName+'" already exists.')}}),A.onerror=function(e){e.preventDefault(),n(A.error)},A.onsuccess=function(){r(A.result),I(e)}}))}function E(e){return C(e,!1)}function B(e){return C(e,!0)}function v(e,t){if(!e.db)return!0;var r=!e.db.objectStoreNames.contains(e.storeName),n=e.version<e.db.version,i=e.version>e.db.version;if(n&&(e.version!==t&&console.warn('The database "'+e.name+"\" can't be downgraded from version "+e.db.version+" to version "+e.version+"."),e.version=e.db.version),i||r){if(r){var o=e.db.version+1;o>e.version&&(e.version=o)}return!0}return!1}function m(e){return o([function(e){for(var t=e.length,r=new ArrayBuffer(t),n=new Uint8Array(r),i=0;i<t;i++)n[i]=e.charCodeAt(i);return r}(atob(e.data))],{type:e.type})}function Q(e){return e&&e.__local_forage_encoded_blob}function b(e){var t=this,r=t._initReady().then((function(){var e=f[t._dbInfo.name];if(e&&e.dbReady)return e.dbReady}));return u(r,e,e),r}function _(e,t,r,n){void 0===n&&(n=1);try{var i=e.db.transaction(e.storeName,t);r(null,i)}catch(i){if(n>0&&(!e.db||"InvalidStateError"===i.name||"NotFoundError"===i.name))return A.resolve().then((function(){if(!e.db||"NotFoundError"===i.name&&!e.db.objectStoreNames.contains(e.storeName)&&e.version<=e.db.version)return e.db&&(e.version=e.db.version+1),B(e)})).then((function(){return function(e){d(e);for(var t=f[e.name],r=t.forages,n=0;n<r.length;n++){var i=r[n];i._dbInfo.db&&(i._dbInfo.db.close(),i._dbInfo.db=null)}return e.db=null,E(e).then((function(t){return e.db=t,v(e)?B(e):t})).then((function(n){e.db=t.db=n;for(var i=0;i<r.length;i++)r[i]._dbInfo.db=n})).catch((function(t){throw y(e,t),t}))}(e).then((function(){_(e,t,r,n-1)}))})).catch(r);r(i)}}var S={_driver:"asyncStorage",_initStorage:function(e){var t=this,r={db:null};if(e)for(var n in e)r[n]=e[n];var i=f[r.name];i||(i={forages:[],db:null,dbReady:null,deferredOperations:[]},f[r.name]=i),i.forages.push(t),t._initReady||(t._initReady=t.ready,t.ready=b);var o=[];function a(){return A.resolve()}for(var s=0;s<i.forages.length;s++){var u=i.forages[s];u!==t&&o.push(u._initReady().catch(a))}var c=i.forages.slice(0);return A.all(o).then((function(){return r.db=i.db,E(r)})).then((function(e){return r.db=e,v(r,t._defaultConfig.version)?B(r):e})).then((function(e){r.db=i.db=e,t._dbInfo=r;for(var n=0;n<c.length;n++){var o=c[n];o!==t&&(o._dbInfo.db=r.db,o._dbInfo.version=r.version)}}))},_support:function(){try{if(!i||!i.open)return!1;var e="undefined"!=typeof openDatabase&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),t="function"==typeof fetch&&-1!==fetch.toString().indexOf("[native code");return(!e||t)&&"undefined"!=typeof indexedDB&&"undefined"!=typeof IDBKeyRange}catch(e){return!1}}(),iterate:function(e,t){var r=this,n=new A((function(t,n){r.ready().then((function(){_(r._dbInfo,"readonly",(function(i,o){if(i)return n(i);try{var A=o.objectStore(r._dbInfo.storeName).openCursor(),a=1;A.onsuccess=function(){var r=A.result;if(r){var n=r.value;Q(n)&&(n=m(n));var i=e(n,r.key,a++);void 0!==i?t(i):r.continue()}else t()},A.onerror=function(){n(A.error)}}catch(e){n(e)}}))})).catch(n)}));return s(n,t),n},getItem:function(e,t){var r=this;e=c(e);var n=new A((function(t,n){r.ready().then((function(){_(r._dbInfo,"readonly",(function(i,o){if(i)return n(i);try{var A=o.objectStore(r._dbInfo.storeName).get(e);A.onsuccess=function(){var e=A.result;void 0===e&&(e=null),Q(e)&&(e=m(e)),t(e)},A.onerror=function(){n(A.error)}}catch(e){n(e)}}))})).catch(n)}));return s(n,t),n},setItem:function(e,t,r){var n=this;e=c(e);var i=new A((function(r,i){var o;n.ready().then((function(){return o=n._dbInfo,"[object Blob]"===h.call(t)?p(o.db).then((function(e){return e?t:(r=t,new A((function(e,t){var n=new FileReader;n.onerror=t,n.onloadend=function(t){var n=btoa(t.target.result||"");e({__local_forage_encoded_blob:!0,data:n,type:r.type})},n.readAsBinaryString(r)})));var r})):t})).then((function(t){_(n._dbInfo,"readwrite",(function(o,A){if(o)return i(o);try{var a=A.objectStore(n._dbInfo.storeName);null===t&&(t=void 0);var s=a.put(t,e);A.oncomplete=function(){void 0===t&&(t=null),r(t)},A.onabort=A.onerror=function(){var e=s.error?s.error:s.transaction.error;i(e)}}catch(e){i(e)}}))})).catch(i)}));return s(i,r),i},removeItem:function(e,t){var r=this;e=c(e);var n=new A((function(t,n){r.ready().then((function(){_(r._dbInfo,"readwrite",(function(i,o){if(i)return n(i);try{var A=o.objectStore(r._dbInfo.storeName).delete(e);o.oncomplete=function(){t()},o.onerror=function(){n(A.error)},o.onabort=function(){var e=A.error?A.error:A.transaction.error;n(e)}}catch(e){n(e)}}))})).catch(n)}));return s(n,t),n},clear:function(e){var t=this,r=new A((function(e,r){t.ready().then((function(){_(t._dbInfo,"readwrite",(function(n,i){if(n)return r(n);try{var o=i.objectStore(t._dbInfo.storeName).clear();i.oncomplete=function(){e()},i.onabort=i.onerror=function(){var e=o.error?o.error:o.transaction.error;r(e)}}catch(e){r(e)}}))})).catch(r)}));return s(r,e),r},length:function(e){var t=this,r=new A((function(e,r){t.ready().then((function(){_(t._dbInfo,"readonly",(function(n,i){if(n)return r(n);try{var o=i.objectStore(t._dbInfo.storeName).count();o.onsuccess=function(){e(o.result)},o.onerror=function(){r(o.error)}}catch(e){r(e)}}))})).catch(r)}));return s(r,e),r},key:function(e,t){var r=this,n=new A((function(t,n){e<0?t(null):r.ready().then((function(){_(r._dbInfo,"readonly",(function(i,o){if(i)return n(i);try{var A=o.objectStore(r._dbInfo.storeName),a=!1,s=A.openKeyCursor();s.onsuccess=function(){var r=s.result;r?0===e||a?t(r.key):(a=!0,r.advance(e)):t(null)},s.onerror=function(){n(s.error)}}catch(e){n(e)}}))})).catch(n)}));return s(n,t),n},keys:function(e){var t=this,r=new A((function(e,r){t.ready().then((function(){_(t._dbInfo,"readonly",(function(n,i){if(n)return r(n);try{var o=i.objectStore(t._dbInfo.storeName).openKeyCursor(),A=[];o.onsuccess=function(){var t=o.result;t?(A.push(t.key),t.continue()):e(A)},o.onerror=function(){r(o.error)}}catch(e){r(e)}}))})).catch(r)}));return s(r,e),r},dropInstance:function(e,t){t=l.apply(this,arguments);var r=this.config();(e="function"!=typeof e&&e||{}).name||(e.name=e.name||r.name,e.storeName=e.storeName||r.storeName);var n,o=this;if(e.name){var a=e.name===r.name&&o._dbInfo.db,u=a?A.resolve(o._dbInfo.db):E(e).then((function(t){var r=f[e.name],n=r.forages;r.db=t;for(var i=0;i<n.length;i++)n[i]._dbInfo.db=t;return t}));n=e.storeName?u.then((function(t){if(t.objectStoreNames.contains(e.storeName)){var r=t.version+1;d(e);var n=f[e.name],o=n.forages;t.close();for(var a=0;a<o.length;a++){var s=o[a];s._dbInfo.db=null,s._dbInfo.version=r}return new A((function(t,n){var o=i.open(e.name,r);o.onerror=function(e){o.result.close(),n(e)},o.onupgradeneeded=function(){o.result.deleteObjectStore(e.storeName)},o.onsuccess=function(){var e=o.result;e.close(),t(e)}})).then((function(e){n.db=e;for(var t=0;t<o.length;t++){var r=o[t];r._dbInfo.db=e,I(r._dbInfo)}})).catch((function(t){throw(y(e,t)||A.resolve()).catch((function(){})),t}))}})):u.then((function(t){d(e);var r=f[e.name],n=r.forages;t.close();for(var o=0;o<n.length;o++)n[o]._dbInfo.db=null;return new A((function(t,r){var n=i.deleteDatabase(e.name);n.onerror=n.onblocked=function(e){var t=n.result;t&&t.close(),r(e)},n.onsuccess=function(){var e=n.result;e&&e.close(),t(e)}})).then((function(e){r.db=e;for(var t=0;t<n.length;t++)I(n[t]._dbInfo)})).catch((function(t){throw(y(e,t)||A.resolve()).catch((function(){})),t}))}))}else n=A.reject("Invalid arguments");return s(n,t),n}},w="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",D=/^~~local_forage_type~([^~]+)~/,R="__lfsc__:".length,M=R+"arbf".length,x=Object.prototype.toString;function P(e){var t,r,n,i,o,A=.75*e.length,a=e.length,s=0;"="===e[e.length-1]&&(A--,"="===e[e.length-2]&&A--);var u=new ArrayBuffer(A),c=new Uint8Array(u);for(t=0;t<a;t+=4)r=w.indexOf(e[t]),n=w.indexOf(e[t+1]),i=w.indexOf(e[t+2]),o=w.indexOf(e[t+3]),c[s++]=r<<2|n>>4,c[s++]=(15&n)<<4|i>>2,c[s++]=(3&i)<<6|63&o;return u}function T(e){var t,r=new Uint8Array(e),n="";for(t=0;t<r.length;t+=3)n+=w[r[t]>>2],n+=w[(3&r[t])<<4|r[t+1]>>4],n+=w[(15&r[t+1])<<2|r[t+2]>>6],n+=w[63&r[t+2]];return r.length%3==2?n=n.substring(0,n.length-1)+"=":r.length%3==1&&(n=n.substring(0,n.length-2)+"=="),n}var F={serialize:function(e,t){var r="";if(e&&(r=x.call(e)),e&&("[object ArrayBuffer]"===r||e.buffer&&"[object ArrayBuffer]"===x.call(e.buffer))){var n,i="__lfsc__:";e instanceof ArrayBuffer?(n=e,i+="arbf"):(n=e.buffer,"[object Int8Array]"===r?i+="si08":"[object Uint8Array]"===r?i+="ui08":"[object Uint8ClampedArray]"===r?i+="uic8":"[object Int16Array]"===r?i+="si16":"[object Uint16Array]"===r?i+="ur16":"[object Int32Array]"===r?i+="si32":"[object Uint32Array]"===r?i+="ui32":"[object Float32Array]"===r?i+="fl32":"[object Float64Array]"===r?i+="fl64":t(new Error("Failed to get type for BinaryArray"))),t(i+T(n))}else if("[object Blob]"===r){var o=new FileReader;o.onload=function(){var r="~~local_forage_type~"+e.type+"~"+T(this.result);t("__lfsc__:blob"+r)},o.readAsArrayBuffer(e)}else try{t(JSON.stringify(e))}catch(r){console.error("Couldn't convert value into a JSON string: ",e),t(null,r)}},deserialize:function(e){if("__lfsc__:"!==e.substring(0,R))return JSON.parse(e);var t,r=e.substring(M),n=e.substring(R,M);if("blob"===n&&D.test(r)){var i=r.match(D);t=i[1],r=r.substring(i[0].length)}var A=P(r);switch(n){case"arbf":return A;case"blob":return o([A],{type:t});case"si08":return new Int8Array(A);case"ui08":return new Uint8Array(A);case"uic8":return new Uint8ClampedArray(A);case"si16":return new Int16Array(A);case"ur16":return new Uint16Array(A);case"si32":return new Int32Array(A);case"ui32":return new Uint32Array(A);case"fl32":return new Float32Array(A);case"fl64":return new Float64Array(A);default:throw new Error("Unkown type: "+n)}},stringToBuffer:P,bufferToString:T};function O(e,t,r,n){e.executeSql("CREATE TABLE IF NOT EXISTS "+t.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],r,n)}function L(e,t,r,n,i,o){e.executeSql(r,n,i,(function(e,A){A.code===A.SYNTAX_ERR?e.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[t.storeName],(function(e,a){a.rows.length?o(e,A):O(e,t,(function(){e.executeSql(r,n,i,o)}),o)}),o):o(e,A)}),o)}function N(e,t,r,n){var i=this;e=c(e);var o=new A((function(o,A){i.ready().then((function(){void 0===t&&(t=null);var a=t,s=i._dbInfo;s.serializer.serialize(t,(function(t,u){u?A(u):s.db.transaction((function(r){L(r,s,"INSERT OR REPLACE INTO "+s.storeName+" (key, value) VALUES (?, ?)",[e,t],(function(){o(a)}),(function(e,t){A(t)}))}),(function(t){if(t.code===t.QUOTA_ERR){if(n>0)return void o(N.apply(i,[e,a,r,n-1]));A(t)}}))}))})).catch(A)}));return s(o,r),o}function k(e){return new A((function(t,r){e.transaction((function(n){n.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],(function(r,n){for(var i=[],o=0;o<n.rows.length;o++)i.push(n.rows.item(o).name);t({db:e,storeNames:i})}),(function(e,t){r(t)}))}),(function(e){r(e)}))}))}var G={_driver:"webSQLStorage",_initStorage:function(e){var t=this,r={db:null};if(e)for(var n in e)r[n]="string"!=typeof e[n]?e[n].toString():e[n];var i=new A((function(e,n){try{r.db=openDatabase(r.name,String(r.version),r.description,r.size)}catch(e){return n(e)}r.db.transaction((function(i){O(i,r,(function(){t._dbInfo=r,e()}),(function(e,t){n(t)}))}),n)}));return r.serializer=F,i},_support:"function"==typeof openDatabase,iterate:function(e,t){var r=this,n=new A((function(t,n){r.ready().then((function(){var i=r._dbInfo;i.db.transaction((function(r){L(r,i,"SELECT * FROM "+i.storeName,[],(function(r,n){for(var o=n.rows,A=o.length,a=0;a<A;a++){var s=o.item(a),u=s.value;if(u&&(u=i.serializer.deserialize(u)),void 0!==(u=e(u,s.key,a+1)))return void t(u)}t()}),(function(e,t){n(t)}))}))})).catch(n)}));return s(n,t),n},getItem:function(e,t){var r=this;e=c(e);var n=new A((function(t,n){r.ready().then((function(){var i=r._dbInfo;i.db.transaction((function(r){L(r,i,"SELECT * FROM "+i.storeName+" WHERE key = ? LIMIT 1",[e],(function(e,r){var n=r.rows.length?r.rows.item(0).value:null;n&&(n=i.serializer.deserialize(n)),t(n)}),(function(e,t){n(t)}))}))})).catch(n)}));return s(n,t),n},setItem:function(e,t,r){return N.apply(this,[e,t,r,1])},removeItem:function(e,t){var r=this;e=c(e);var n=new A((function(t,n){r.ready().then((function(){var i=r._dbInfo;i.db.transaction((function(r){L(r,i,"DELETE FROM "+i.storeName+" WHERE key = ?",[e],(function(){t()}),(function(e,t){n(t)}))}))})).catch(n)}));return s(n,t),n},clear:function(e){var t=this,r=new A((function(e,r){t.ready().then((function(){var n=t._dbInfo;n.db.transaction((function(t){L(t,n,"DELETE FROM "+n.storeName,[],(function(){e()}),(function(e,t){r(t)}))}))})).catch(r)}));return s(r,e),r},length:function(e){var t=this,r=new A((function(e,r){t.ready().then((function(){var n=t._dbInfo;n.db.transaction((function(t){L(t,n,"SELECT COUNT(key) as c FROM "+n.storeName,[],(function(t,r){var n=r.rows.item(0).c;e(n)}),(function(e,t){r(t)}))}))})).catch(r)}));return s(r,e),r},key:function(e,t){var r=this,n=new A((function(t,n){r.ready().then((function(){var i=r._dbInfo;i.db.transaction((function(r){L(r,i,"SELECT key FROM "+i.storeName+" WHERE id = ? LIMIT 1",[e+1],(function(e,r){var n=r.rows.length?r.rows.item(0).key:null;t(n)}),(function(e,t){n(t)}))}))})).catch(n)}));return s(n,t),n},keys:function(e){var t=this,r=new A((function(e,r){t.ready().then((function(){var n=t._dbInfo;n.db.transaction((function(t){L(t,n,"SELECT key FROM "+n.storeName,[],(function(t,r){for(var n=[],i=0;i<r.rows.length;i++)n.push(r.rows.item(i).key);e(n)}),(function(e,t){r(t)}))}))})).catch(r)}));return s(r,e),r},dropInstance:function(e,t){t=l.apply(this,arguments);var r=this.config();(e="function"!=typeof e&&e||{}).name||(e.name=e.name||r.name,e.storeName=e.storeName||r.storeName);var n,i=this;return s(n=e.name?new A((function(t){var n;n=e.name===r.name?i._dbInfo.db:openDatabase(e.name,"","",0),e.storeName?t({db:n,storeNames:[e.storeName]}):t(k(n))})).then((function(e){return new A((function(t,r){e.db.transaction((function(n){function i(e){return new A((function(t,r){n.executeSql("DROP TABLE IF EXISTS "+e,[],(function(){t()}),(function(e,t){r(t)}))}))}for(var o=[],a=0,s=e.storeNames.length;a<s;a++)o.push(i(e.storeNames[a]));A.all(o).then((function(){t()})).catch((function(e){r(e)}))}),(function(e){r(e)}))}))})):A.reject("Invalid arguments"),t),n}};function U(e,t){var r=e.name+"/";return e.storeName!==t.storeName&&(r+=e.storeName+"/"),r}function j(){return!function(){try{return localStorage.setItem("_localforage_support_test",!0),localStorage.removeItem("_localforage_support_test"),!1}catch(e){return!0}}()||localStorage.length>0}var V={_driver:"localStorageWrapper",_initStorage:function(e){var t={};if(e)for(var r in e)t[r]=e[r];return t.keyPrefix=U(e,this._defaultConfig),j()?(this._dbInfo=t,t.serializer=F,A.resolve()):A.reject()},_support:function(){try{return"undefined"!=typeof localStorage&&"setItem"in localStorage&&!!localStorage.setItem}catch(e){return!1}}(),iterate:function(e,t){var r=this,n=r.ready().then((function(){for(var t=r._dbInfo,n=t.keyPrefix,i=n.length,o=localStorage.length,A=1,a=0;a<o;a++){var s=localStorage.key(a);if(0===s.indexOf(n)){var u=localStorage.getItem(s);if(u&&(u=t.serializer.deserialize(u)),void 0!==(u=e(u,s.substring(i),A++)))return u}}}));return s(n,t),n},getItem:function(e,t){var r=this;e=c(e);var n=r.ready().then((function(){var t=r._dbInfo,n=localStorage.getItem(t.keyPrefix+e);return n&&(n=t.serializer.deserialize(n)),n}));return s(n,t),n},setItem:function(e,t,r){var n=this;e=c(e);var i=n.ready().then((function(){void 0===t&&(t=null);var r=t;return new A((function(i,o){var A=n._dbInfo;A.serializer.serialize(t,(function(t,n){if(n)o(n);else try{localStorage.setItem(A.keyPrefix+e,t),i(r)}catch(e){"QuotaExceededError"!==e.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==e.name||o(e),o(e)}}))}))}));return s(i,r),i},removeItem:function(e,t){var r=this;e=c(e);var n=r.ready().then((function(){var t=r._dbInfo;localStorage.removeItem(t.keyPrefix+e)}));return s(n,t),n},clear:function(e){var t=this,r=t.ready().then((function(){for(var e=t._dbInfo.keyPrefix,r=localStorage.length-1;r>=0;r--){var n=localStorage.key(r);0===n.indexOf(e)&&localStorage.removeItem(n)}}));return s(r,e),r},length:function(e){var t=this.keys().then((function(e){return e.length}));return s(t,e),t},key:function(e,t){var r=this,n=r.ready().then((function(){var t,n=r._dbInfo;try{t=localStorage.key(e)}catch(e){t=null}return t&&(t=t.substring(n.keyPrefix.length)),t}));return s(n,t),n},keys:function(e){var t=this,r=t.ready().then((function(){for(var e=t._dbInfo,r=localStorage.length,n=[],i=0;i<r;i++){var o=localStorage.key(i);0===o.indexOf(e.keyPrefix)&&n.push(o.substring(e.keyPrefix.length))}return n}));return s(r,e),r},dropInstance:function(e,t){if(t=l.apply(this,arguments),!(e="function"!=typeof e&&e||{}).name){var r=this.config();e.name=e.name||r.name,e.storeName=e.storeName||r.storeName}var n,i=this;return s(n=e.name?new A((function(t){e.storeName?t(U(e,i._defaultConfig)):t(e.name+"/")})).then((function(e){for(var t=localStorage.length-1;t>=0;t--){var r=localStorage.key(t);0===r.indexOf(e)&&localStorage.removeItem(r)}})):A.reject("Invalid arguments"),t),n}},H=function(e,t){for(var r,n,i=e.length,o=0;o<i;){if((r=e[o])===(n=t)||"number"==typeof r&&"number"==typeof n&&isNaN(r)&&isNaN(n))return!0;o++}return!1},Y=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},K={},q={},J={INDEXEDDB:S,WEBSQL:G,LOCALSTORAGE:V},W=[J.INDEXEDDB._driver,J.WEBSQL._driver,J.LOCALSTORAGE._driver],z=["dropInstance"],X=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(z),Z={description:"",driver:W.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function $(e,t){e[t]=function(){var r=arguments;return e.ready().then((function(){return e[t].apply(e,r)}))}}function ee(){for(var e=1;e<arguments.length;e++){var t=arguments[e];if(t)for(var r in t)t.hasOwnProperty(r)&&(Y(t[r])?arguments[0][r]=t[r].slice():arguments[0][r]=t[r])}return arguments[0]}var te=new(function(){function e(t){for(var r in function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),J)if(J.hasOwnProperty(r)){var n=J[r],i=n._driver;this[r]=i,K[i]||this.defineDriver(n)}this._defaultConfig=ee({},Z),this._config=ee({},this._defaultConfig,t),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch((function(){}))}return e.prototype.config=function(e){if("object"===(void 0===e?"undefined":n(e))){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var t in e){if("storeName"===t&&(e[t]=e[t].replace(/\W/g,"_")),"version"===t&&"number"!=typeof e[t])return new Error("Database version must be a number.");this._config[t]=e[t]}return!("driver"in e)||!e.driver||this.setDriver(this._config.driver)}return"string"==typeof e?this._config[e]:this._config},e.prototype.defineDriver=function(e,t,r){var n=new A((function(t,r){try{var n=e._driver,i=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!e._driver)return void r(i);for(var o=X.concat("_initStorage"),a=0,u=o.length;a<u;a++){var c=o[a];if((!H(z,c)||e[c])&&"function"!=typeof e[c])return void r(i)}!function(){for(var t=function(e){return function(){var t=new Error("Method "+e+" is not implemented by the current driver"),r=A.reject(t);return s(r,arguments[arguments.length-1]),r}},r=0,n=z.length;r<n;r++){var i=z[r];e[i]||(e[i]=t(i))}}();var l=function(r){K[n]&&console.info("Redefining LocalForage driver: "+n),K[n]=e,q[n]=r,t()};"_support"in e?e._support&&"function"==typeof e._support?e._support().then(l,r):l(!!e._support):l(!0)}catch(e){r(e)}}));return u(n,t,r),n},e.prototype.driver=function(){return this._driver||null},e.prototype.getDriver=function(e,t,r){var n=K[e]?A.resolve(K[e]):A.reject(new Error("Driver not found."));return u(n,t,r),n},e.prototype.getSerializer=function(e){var t=A.resolve(F);return u(t,e),t},e.prototype.ready=function(e){var t=this,r=t._driverSet.then((function(){return null===t._ready&&(t._ready=t._initDriver()),t._ready}));return u(r,e,e),r},e.prototype.setDriver=function(e,t,r){var n=this;Y(e)||(e=[e]);var i=this._getSupportedDrivers(e);function o(){n._config.driver=n.driver()}function a(e){return n._extend(e),o(),n._ready=n._initStorage(n._config),n._ready}var s=null!==this._driverSet?this._driverSet.catch((function(){return A.resolve()})):A.resolve();return this._driverSet=s.then((function(){var e=i[0];return n._dbInfo=null,n._ready=null,n.getDriver(e).then((function(e){n._driver=e._driver,o(),n._wrapLibraryMethodsWithReady(),n._initDriver=function(e){return function(){var t=0;return function r(){for(;t<e.length;){var i=e[t];return t++,n._dbInfo=null,n._ready=null,n.getDriver(i).then(a).catch(r)}o();var s=new Error("No available storage method found.");return n._driverSet=A.reject(s),n._driverSet}()}}(i)}))})).catch((function(){o();var e=new Error("No available storage method found.");return n._driverSet=A.reject(e),n._driverSet})),u(this._driverSet,t,r),this._driverSet},e.prototype.supports=function(e){return!!q[e]},e.prototype._extend=function(e){ee(this,e)},e.prototype._getSupportedDrivers=function(e){for(var t=[],r=0,n=e.length;r<n;r++){var i=e[r];this.supports(i)&&t.push(i)}return t},e.prototype._wrapLibraryMethodsWithReady=function(){for(var e=0,t=X.length;e<t;e++)$(this,X[e])},e.prototype.createInstance=function(t){return new e(t)},e}());t.exports=te},{3:3}]},{},[4])(4)},"object"===a(t)&&void 0!==e?e.exports=A():(i=[],void 0===(o="function"==typeof(n=A)?n.apply(t,i):n)||(e.exports=o))}).call(this,r(144))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=function(e){};t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(4),i=r(137),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.start=function(){t.stop(),t.autoSaveTimer=window.setInterval((function(){t.state.dirty&&(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV||t.mergeState({autoSaveSignalCount:t.state.autoSaveSignalCount+1}))}),18e4)},t.stop=function(){t.autoSaveTimer&&(clearInterval(t.autoSaveTimer),t.autoSaveTimer=void 0)},t}return(0,n.__extends)(t,e),t.prototype.initState=function(){this.updateState({autoSaveSignalCount:0,dirty:!1})},t.prototype.markDirty=function(e){this.mergeState({dirty:e})},t}(i.default);t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.logDocumentLoad=function(e,t){(0,n.sendKTrackerEvent)("toolLoad",{type:e,errorMsg:t})};var n=r(933)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ModelUpdateType",{enumerable:!0,get:function(){return i.ModelUpdateType}}),t.default=t.MultiBackupItem=void 0;var n=r(4),i=r(291),o=r(1863),A=r(658),a=r(2),s=r(1002);function u(e,t){var r=new Map;return e.forEach((function(e,n){r.set(n,t(e,n))})),r}var c=function(e){function t(t){var r=e.call(this,t)||this;return r.multiData=u(t,(function(e){return{data:new e.BackupItemImpl(e.model),BackupItemImpl:e.BackupItemImpl}})),r}return(0,n.__extends)(t,e),t.prototype.toModel=function(){return u(this.multiData,(function(e){return{model:e.data.toModel(),BackupItemImpl:e.BackupItemImpl}}))},t}(i.BackupItem);function l(e,t,r){var i=r.value;return(0,n.__assign)((0,n.__assign)({},r),{value:function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];if(this.started)i.apply(this,e);else if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV)throw new Error("method "+t+" can only be called after app started.")}})}t.MultiBackupItem=c;var g=function(e){function t(r){var n=e.call(this,{getModel:function(){return u(n.documentSources,(function(e){var t=e.getModel();if(!t)throw new Error("MultiDocumentManager: getModel() return undefined for: "+e.key);return{model:t,BackupItemImpl:e.BackupItemImpl}}))},onUpdateModel:function(e,t){n.mapEachPrioritySync((function(r){r.forEach((function(r){var n=e.get(r.key);if(!n)throw new Error('No backup model for "'+r.key+"\", perhaps it's been added after this backup triggered.");r.onUpdateModel(n.model,t)}))}))},onUpdateState:r.onUpdateState,maxBackupStep:r.maxBackupStep,useHybridStorage:r.useHybridStorage})||this;return n.started=!1,n.cancelLoadToken=o.CancelToken.source(),n.id="kafDocument"+t.instanceCount++,n.monitoredRequestedKeySet=new Set,n.monitorSourceFetch=function(e,t,r){var i=e+r;return n.monitoredRequestedKeySet.has(i)?t:(n.monitoredRequestedKeySet.add(i),n.reportSource(e,t,r))},n.onModelChange=r.onModelChange||a.noop,n.onPause=r.onPause||a.noop,n.onToggleAutoBackup=r.onToggleAutoBackup||a.noop,n.onResume=r.onResume||a.noop,n}return(0,n.__extends)(t,e),Object.defineProperty(t.prototype,"documentSources",{get:function(){return this.internalDocumentSources||(this.internalDocumentSources=new Map),this.internalDocumentSources},enumerable:!0,configurable:!0}),t.prototype.getBackupItemImpl=function(){return c},t.prototype.setId=function(e){this.id=e},t.prototype.getId=function(){return this.id},t.prototype.onModelChanges=function(e){this.started&&(this.requestCommit(),this.onModelChange())},t.prototype.toggleAutoBackup=function(t){e.prototype.toggleAutoBackup.call(this,t),this.onToggleAutoBackup(t)},t.prototype.commit=function(){e.prototype.commit.call(this)},t.prototype.onLoadSessionStart=function(){var e=(0,s.createDocumentLoadReporter)(),t=e.reportSource,r=e.statisticsPromise,n=e.getStatistics;(0,e.setTotal)(this.documentSources.size),this.loadStatisticsPromise=r,this.getStatisticsSync=n,this.reportSource=t,this.monitoredRequestedKeySet.clear()},t.prototype.createFetchDocumentPromises=function(e,r){var n=this,i=this.getDocumentsSortedByPriority(t.getDocFetchPriority),o=new Map;return i.reduce((function(t,i){return t.then((function(){var t=[];return i.documents.forEach((function(i){if(void 0!==i.fetch){var A=n.monitorSourceFetch(i.key,i.fetch({isInitialLoad:e,reloadInfo:r}),"fetch");t.push(A),o.set(i.key,A)}})),Promise.all(t)}))}),Promise.resolve()),o},t.prototype.openDocuments=function(){var e=this;this.onLoadSessionStart();var t=this.createFetchDocumentPromises(!0);return this.mapEachPriority((function(r){return Promise.all(r.map((function(r){return(t.get(r.key)||Promise.resolve()).then((function(t){return e.monitorSourceFetch(r.key,r.open(t),"open")}))})))}))},t.prototype.loadUntilCancel=function(e,t){var r=this;return this.cancelLoadToken=o.CancelToken.source(),Promise.race([e,this.cancelLoadToken.token.promise]).then((function(e){if((0,A.isCancel)(e))return e;t&&t(),r.requestCommit(),r.commit()}))},t.prototype.start=function(){var e=this;if(this.started)throw new Error("Cannot start twice");return this.loadUntilCancel(this.openDocuments(),(function(){e.started=!0,e.documentSources.forEach((function(e){e.updateListeners&&e.updateListeners(!0,e.onDocumentChange),e.afterInit&&e.afterInit(e.onDocumentChange)})),e.toggleAutoBackup(!0)}))},t.prototype.reloadDocuments=function(e){var t=this;this.onLoadSessionStart();var r={data:e},n=this.createFetchDocumentPromises(!1,r);return this.mapEachPriority((function(e){return Promise.all(e.map((function(e){var i=e.reload;return i?(n.get(e.key)||Promise.resolve()).then((function(n){return t.monitorSourceFetch(e.key,i(r,n),"open")})):Promise.resolve()})))}))},t.prototype.reload=function(e){return this.clearBackupHistory(),this.pause(),this.loadUntilCancel(this.reloadDocuments(e),this.resume.bind(this))},t.prototype.pause=function(){this.toggleAutoBackup(!1),this.onPause(),this.started=!1},t.prototype.resume=function(){this.started=!0,this.onResume(),this.toggleAutoBackup(!0)},t.prototype.beforeDispose=function(){this.documentSources.forEach((function(e){e.updateListeners&&e.updateListeners(!1,a.noop),e.beforeDispose&&e.beforeDispose()})),this.toggleAutoBackup(!1),this.cancelLoadToken.cancel("DocumentManager has been disposed"),this.started=!1},t.prototype.getLoadStatistics=function(e){return void 0===e&&(e=!0),e?(this.loadStatisticsPromise||console.error("Please wail until the document load completed"),this.loadStatisticsPromise):this.getStatisticsSync()},t.prototype.beforeSaveDocument=function(e){if(!this.started)return!1;var t=!0;return this.documentSources.forEach((function(r){r.beforeSaveDocument&&(r.beforeSaveDocument(e)||(t=!1))})),t},t.prototype.saveDocument=function(e,t){var r=this.generateActionId(),i={actionId:r};return t&&(i=(0,n.__assign)((0,n.__assign)({},t),{actionId:r})),this.mapEachPriority((function(t){return Promise.all(t.map((function(t){return t.saveDocument(e,i)})))}))},t.prototype.clearDocument=function(e,t){this.mapEachPrioritySync((function(r){r.forEach((function(r){t&&!t(r)||r.clearDocument({data:e})}))}))},t.prototype.addDocumentSource=function(e){var t=this;if(this.started)throw new Error("MultiDocumentManager: currently don't support to dynamicly add/remove document source after app started.");if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&(e.updateListeners&&console.warn("[Deprecated]:updateListeners,请在 afterInit 方法内监听数据变化,在 beforeDispose 内移除监听"),!e.updateListeners&&!e.afterInit))throw Error("updateListeners 和 afterInit 请至少实现一个");var r=e.key;if(this.documentSources.get(r))throw new Error("MultiDocumentManager: duplicate document source key: "+e.key);this.documentSources.set(r,(0,n.__assign)((0,n.__assign)({},e),{onDocumentChange:function(){return t.onModelChanges(r)}}))},t.prototype.getDocumentsSortedByPriority=function(e){var t,r,n,i={};return t=this.documentSources,r=function(t,r){var n=e(t);i[n]||(i[n]=[]),i[n].push(t)},n=[],t.forEach((function(e,t){n.push(r(e,t))})),Object.keys(i).map((function(e){var t=parseFloat(e);return{priority:t,documents:i[t]}})).sort((function(e,t){return t.priority-e.priority}))},t.prototype.mapEachPriority=function(e){return this.getDocumentsSortedByPriority(t.getDocPriority).reduce((function(t,r){return t=t.then((function(){return e(r.documents,r.priority)}))}),Promise.resolve())},t.prototype.mapEachPrioritySync=function(e){this.getDocumentsSortedByPriority(t.getDocPriority).forEach((function(t){e(t.documents,t.priority)}))},t.prototype.generateActionId=function(){return Date.now()+"-"+this.id},t.instanceCount=0,t.getDocFetchPriority=function(e){return e.fetchPriority||0},t.getDocPriority=function(e){return e.priority||0},(0,n.__decorate)([l],t.prototype,"toggleAutoBackup",null),(0,n.__decorate)([l],t.prototype,"commit",null),t}(i.default);t.default=g},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1864),i=function(){function e(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){return t=e}));var r=this;e((function(e){r.reason||(r.reason=new n.Cancel(e),t(r.reason))}))}return e.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},e.source=function(){var t=function(){};return{token:new e((function(e){return t=e})),cancel:t}},e}();t.CancelToken=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){this.message=e}return e.prototype.__CANCEL__=function(){},e.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},e}();t.Cancel=n},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.scoped=function(e){return function(t,r,o){return(0,i.__assign)((0,i.__assign)({},o),{value:function(){for(var t,r,i=this,A=[],a=0;a<arguments.length;a++)A[a]=arguments[a];var s=A.find((function(e){var t;return!0===(null===(t=e)||void 0===t?void 0:t.isScope)}));if(!s||!s.valid)return Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING?void(s?s.valid||console.warn("Scope is not valid!"):console.warn("No scope found!")):null===(t=o.value)||void 0===t?void 0:t.apply(this,A);var u=function(){s.push((function(){e.apply(i,A)}))};try{var c=null===(r=o.value)||void 0===r?void 0:r.apply(this,A);return c&&("object"===n(c)||"function"==typeof c)&&(c instanceof Promise||"function"==typeof c.then)?c.then(u):u(),c}catch(e){throw e}}})}},t.ScopeGroup=void 0;var i=r(4);var o=function(){function e(e,t,r,n){this.parent=e,this.onScopeDispose=t,this.pushChange=r,this.isValid=n,this.isScope=!0,this.disposed=!1}return Object.defineProperty(e.prototype,"valid",{get:function(){return!this.disposed&&this.isValid(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"alive",{get:function(){return!this.disposed},enumerable:!0,configurable:!0}),e.prototype.push=function(e){this.valid?this.pushChange(this,e):console.warn("Scope is not valid!")},e.prototype.dispose=function(){this.disposed||(this.disposed=!0,this.onScopeDispose(this))},e}(),A=function(){function e(){var e=this;this.changeStack=[],this.lockedScope=new Set,this.onScopeDispose=function(t){e.sequenceRestore(t)},this.pushChange=function(t,r){e.changeStack.push({scope:t,restore:r})},this.isScopeValid=function(t){for(var r=-1,n=e.changeStack.length-1;n>0;n--)if(e.changeStack[n].scope===t){r=n;break}return!e.lockedScope.has(t)&&(-1===r||r===e.changeStack.length-1)}}return e.prototype.sequenceRestore=function(e){for(var t,r,n=[];this.changeStack.length;){var o=this.changeStack[this.changeStack.length-1];if(o.scope.alive)break;this.changeStack.pop(),n.push(o)}try{for(var A=(0,i.__values)(n),a=A.next();!a.done;a=A.next()){a.value.restore()}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=A.return)&&r.call(A)}finally{if(t)throw t.error}}},e.prototype.lock=function(e){e.parent===this&&this.lockedScope.add(e)},e.prototype.unLock=function(e){this.lockedScope.delete(e)},e.prototype.createScope=function(){return new o(this,this.onScopeDispose,this.pushChange,this.isScopeValid)},e.prototype.dispose=function(){for(;this.changeStack.length;){this.changeStack.pop().restore()}[].forEach((function(e){return e.alive&&e.dispose()}))},e}();t.ScopeGroup=A},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scopedState=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return Object.defineProperty(t.prototype,A,{value:e,writable:!1,enumerable:!1,configurable:!1}),(0,o.scopedObject)({diff:s,getter:c,restore:u})(t)}};var n=r(4),i=r(2),o=r(1035),A=Symbol("scoped_property");var a,s=(a=new Set,function(e,t){var r={};return Object.keys(e).forEach((function(e){a.add(e)})),Object.keys(t).forEach((function(e){a.add(e)})),a.forEach((function(n){e[n]!==t[n]&&(r[n]={from:e[n],to:t[n]})})),a.clear(),r});function u(e){var t=(0,n.__assign)({},this.state);Object.keys(e).forEach((function(r){var n=e[r];Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING&&n.to!==t[r]&&console.error("Scoped state "+r+" changed outside current scope!"),t[r]=n.from})),this.state=t}function c(){var e=this[A];return function(e,t){return t&&t.length?(0,i.pick)(e,t):(0,n.__assign)({},e)}(this.state,e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"drawPolygonWithHole",{enumerable:!0,get:function(){return n.drawPolygonWithHole}}),Object.defineProperty(t,"drawBox",{enumerable:!0,get:function(){return n.drawBox}}),Object.defineProperty(t,"drawPolyline",{enumerable:!0,get:function(){return n.drawPolyline}}),Object.defineProperty(t,"drawLine",{enumerable:!0,get:function(){return n.drawLine}}),Object.defineProperty(t,"drawDashLine",{enumerable:!0,get:function(){return n.drawDashLine}}),Object.defineProperty(t,"drawPolygon",{enumerable:!0,get:function(){return n.drawPolygon}}),Object.defineProperty(t,"drawPolyDashLine",{enumerable:!0,get:function(){return n.drawPolyDashLine}}),Object.defineProperty(t,"drawSector",{enumerable:!0,get:function(){return n.drawSector}}),Object.defineProperty(t,"drawRect",{enumerable:!0,get:function(){return n.drawRect}});var n=r(990)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"generatePopMesh",{enumerable:!0,get:function(){return n.generatePopMesh}}),Object.defineProperty(t,"updateMaterials",{enumerable:!0,get:function(){return n.updateMaterials}}),Object.defineProperty(t,"updateTransform",{enumerable:!0,get:function(){return n.updateTransform}}),Object.defineProperty(t,"loadComponent",{enumerable:!0,get:function(){return n.loadComponent}});var n=r(1036)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ContainerType2D",{enumerable:!0,get:function(){return n.ContainerType2D}});var n=r(229)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"SelectControls2D",{enumerable:!0,get:function(){return n.SelectControls2D}}),Object.defineProperty(t,"Mode",{enumerable:!0,get:function(){return n.Mode}});var n=r(1871)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"SelectControls2D",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"Mode",{enumerable:!0,get:function(){return n.Mode}});var n=r(1011)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"pureWithCustomizedCompare",{enumerable:!0,get:function(){return n.pureWithCustomizedCompare}}),Object.defineProperty(t,"pureWithPickKeys",{enumerable:!0,get:function(){return n.pureWithPickKeys}}),Object.defineProperty(t,"pureWithOmitKeys",{enumerable:!0,get:function(){return n.pureWithOmitKeys}});var n=r(1873)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pureWithCustomizedCompare=function e(t){void 0===t&&(t={});return function(r){return r.prototype.shouldComponentUpdate&&(0,i.devError)("Warning: Shouldn't use "+e.name+" for "+r.name+': It has customized "shouldComponentUpdate"(or is a pureComponent)'),r.prototype.shouldComponentUpdate=function(e,r){return!(i=this.props,A=e,a=t,s=Object.keys(i),u=Object.keys(A),s.length===u.length&&s.every((function(e){return(a[e]||o)(i[e],A[e])}))&&(0,n.default)(this.state,r));var i,A,a,s,u},r}},t.pureWithPickKeys=function e(t){return function(r){return r.prototype.shouldComponentUpdate&&(0,i.devError)("Warning: Shouldn't use "+e.name+" for "+r.name+': It has customized "shouldComponentUpdate"(or is a pureComponent)'),r.prototype.shouldComponentUpdate=function(e,r){return!function(e,t,r){return r.every((function(r){return o(e[r],t[r])}))}(this.props,e,t)||!(0,n.default)(this.state,r)},r}},t.pureWithOmitKeys=function e(t){var r=t.reduce((function(e,t){return e[t]=!0,e}),{});return function(t){return t.prototype.shouldComponentUpdate&&(0,i.devError)("Warning: Shouldn't use "+e.name+" for "+t.name+': It has customized "shouldComponentUpdate"(or is a pureComponent)'),t.prototype.shouldComponentUpdate=function(e,t){return!function(e,t,r){var n=Object.keys(e).filter((function(e){return!r[e]})),i=Object.keys(t).filter((function(e){return!r[e]}));return n.length===i.length&&n.every((function(r){return o(e[r],t[r])}))}(this.props,e,r)||!(0,n.default)(this.state,t)},t}};var n=r(264),i=r(186);function o(e,t){return e===t}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.__expectedPublicAPIs__=void 0;t.__expectedPublicAPIs__=""},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"RenderSystem2D",{enumerable:!0,get:function(){return n.RenderSystem2D}}),Object.defineProperty(t,"RenderSystem3D",{enumerable:!0,get:function(){return n.RenderSystem3D}}),Object.defineProperty(t,"InferenceSystem2D",{enumerable:!0,get:function(){return i.InferenceSystem2D}}),Object.defineProperty(t,"InferenceSystem3D",{enumerable:!0,get:function(){return i.InferenceSystem3D}}),Object.defineProperty(t,"EntityListSystem",{enumerable:!0,get:function(){return o.EntityListSystem}}),Object.defineProperty(t,"VisibleEntityListSystem",{enumerable:!0,get:function(){return A.default}});var n=r(229),i=r(415),o=r(183),A=r(204)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"SelectionFeature",{enumerable:!0,get:function(){return n.SelectionFeature}}),Object.defineProperty(t,"HintFeature",{enumerable:!0,get:function(){return i.HintFeature}}),Object.defineProperty(t,"WithObjectEventListenersFeature",{enumerable:!0,get:function(){return o.Feature}});var n=r(412),i=r(669),o=r(971)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"DocumentEvents",{enumerable:!0,get:function(){return n.DocumentEvents}}),Object.defineProperty(t,"combine",{enumerable:!0,get:function(){return n.combine}}),Object.defineProperty(t,"Language",{enumerable:!0,get:function(){return n.Language}}),Object.defineProperty(t,"EVENT_STOPPED",{enumerable:!0,get:function(){return n.EVENT_STOPPED}}),Object.defineProperty(t,"InteractionEventType",{enumerable:!0,get:function(){return n.InteractionEventType}});var n=r(1037)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(4),i=r(512),o=r(1882),A=r(691),a=r(692),s=function(){function e(){}return e.prototype.setPrecision=function(e){this.precisionMap=e},e.prototype.setGlobalUnit=function(e){var t=this.getGlobalUnitInfoMap(e);t&&(this.currentGlobalUnitInfoMap=t)},e.prototype.setGlobalLengthUnit=function(e){var t=this.getGlobalLengthUnitInfo(e);t&&(this.currentGlobalUnitInfoMap=(0,n.__assign)((0,n.__assign)({},this.currentGlobalUnitInfoMap),{length:t}))},e.prototype.setGlobalAreaUnit=function(e){var t=this.getGlobalAreaUnitInfo(e);t&&(this.currentGlobalUnitInfoMap=(0,n.__assign)((0,n.__assign)({},this.currentGlobalUnitInfoMap),{area:t}))},e.prototype.getDisplayText=function(e,t,r,n,o){var A;if(void 0===r&&(r=!1),o){if(o.customUnitInfo){if((0,a.getQuantityTypeForUnit)(o.customUnitInfo.unitType)!==t){if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getDisplayText(): customUnitInfo.unitType and quantityType do not match.");return""}A=(0,a.getUnitInstance)(o.customUnitInfo.unitType),n=o.customUnitInfo.precision}if(o.customBaseUnit){if((0,a.getQuantityTypeForUnit)(o.customBaseUnit)!==t){if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getDisplayText(): customBaseUnit and quantityType do not match.");return""}var s=(0,a.getDefaultBaseUnitForQuantity)(t);if(!s)return"";e=(0,a.convertBetweenUnits)(e,o.customBaseUnit,s)}}if(!A){var u=this.getGlobalUnitInfo(t),c=void 0;if(u){if(c=u.precision,this.precisionMap){var l=this.precisionMap.tool_length_and_precision,g=this.precisionMap.tool_area_and_precision;switch(t){case"length":l&&l.unit&&i.factorMap[l.unit]===u.unit.factor&&void 0!==l.precision&&(c=l.precision);break;case"area":g&&g.unit&&i.factorMap[g.unit]===u.unit.factor&&void 0!==g.precision&&(c=g.precision)}}A=u.unit,n=void 0===n?c:n}}if(A&&n)return A.getDisplayText(e,r,n);if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getDisplayText(): illegal input.");return""},e.prototype.getValueFromDisplayText=function(e,t,r,n){var i;if(void 0===r&&(r=!1),n&&n.customUnit){if((0,a.getQuantityTypeForUnit)(n.customUnit)!==t){if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getValueFromDisplayText(): customUnit and quantityType do not match.");return 0}i=(0,a.getUnitInstance)(n.customUnit)}if(!i){var o=this.getGlobalUnitInfo(t);o&&(i=o.unit)}if(i){var A=i.getValueFromDisplayText(e,r);if(n&&n.customBaseUnit){if((0,a.getQuantityTypeForUnit)(n.customBaseUnit)!==t){if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getValueFromDisplayText(): customBaseUnit and quantityType do not match.");return 0}var s=(0,a.getDefaultBaseUnitForQuantity)(t);s&&(A=(0,a.convertBetweenUnits)(A,s,n.customBaseUnit))}return A}if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getDisplayText(): 'currentGlobalUnitInfoMap' is not defined or illegal 'quantityType'");return 0},e.prototype.getGlobalUnitInfo=function(e){if(this.currentGlobalUnitInfoMap)return this.currentGlobalUnitInfoMap[e]},e.prototype.getGlobalUnitInfoMap=function(e){var t;switch(e){case A.GlobalUnitType.mm:t=o.globalUnitInfoMaps.metricSystem.millimeter;break;case A.GlobalUnitType.m:t=o.globalUnitInfoMaps.metricSystem.meter;break;case A.GlobalUnitType.ft:t=o.globalUnitInfoMaps.imperialSystem.foot;break;default:if(String(e).match(/^1\d{2}$/)){var r=this.getGlobalLengthUnitInfo(Number(String(e)[1])),n=this.getGlobalAreaUnitInfo(Number(String(e)[2]));r&&n&&(t={length:r,area:n})}else if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getGlobalUnitInfoMap(): illegal globalUnitType")}return t},e.prototype.getGlobalLengthUnitInfo=function(e){var t;switch(e){case i.LengthUnitType.mm:t=o.globalLengthUnitInfoMaps.metricSystem.millimeter;break;case i.LengthUnitType.m:t=o.globalLengthUnitInfoMaps.metricSystem.meter;break;case i.LengthUnitType.ft:t=o.globalLengthUnitInfoMaps.imperialSystem.foot;break;case i.LengthUnitType.in:t=o.globalLengthUnitInfoMaps.imperialSystem.inch;break;default:if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getGlobalLengthUnitInfo(): illegal globalLengthUnitType")}return t},e.prototype.getGlobalAreaUnitInfo=function(e){var t;switch(e){case i.AreaUnitType.sqMm:t=o.globalAreaUnitInfoMaps.metricSystem.millimeter;break;case i.AreaUnitType.sqM:t=o.globalAreaUnitInfoMaps.metricSystem.meter;break;case i.AreaUnitType.sqFt:t=o.globalAreaUnitInfoMaps.imperialSystem.foot;break;case i.AreaUnitType.mats:t=o.globalAreaUnitInfoMaps.JapaneseUnitSystem.mats;break;case i.AreaUnitType.tsubo:t=o.globalAreaUnitInfoMaps.JapaneseUnitSystem.tsubo;break;default:if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getGlobalAreaUnitInfo(): illegal globalAreaUnitType")}return t},e}();t.default=s},function(e,t,r){"use strict";var n=r(205);Object.defineProperty(t,"__esModule",{value:!0}),t.tsubo=t.mats=t.squareMillimeter=t.squareMeter=t.squareFoot=t.footAndInch=t.inch=t.millimeter=t.meter=void 0;var i=n(r(1880)),o=r(513),A=n(r(1881)),a=new i.default("m",o.FACTORS.m2mm,o.regexMap.number,o.regexMap.meterText);t.meter=a;var s=new i.default("mm",o.FACTORS.mm2mm,o.regexMap.number,o.regexMap.millimeterText);t.millimeter=s;var u=new i.default("''",o.FACTORS.inch2mm,o.regexMap.number,o.regexMap.inchText);t.inch=u;var c=new A.default;t.footAndInch=c;var l=new i.default("ft²",o.FACTORS.sqft2sqmm,o.regexMap.number,o.regexMap.squareFootText);t.squareFoot=l;var g=new i.default("m²",o.FACTORS.sqm2sqmm,o.regexMap.number,o.regexMap.squareMeterText);t.squareMeter=g;var f=new i.default("mm²",o.FACTORS.sqmm2sqmm,o.regexMap.number,o.regexMap.squareMillimeterText);t.squareMillimeter=f;var h=new i.default("mats",o.FACTORS.mats2sqmm,o.regexMap.number,o.regexMap.matsText);t.mats=h;var p=new i.default("tsubo",o.FACTORS.tsubo2sqmm,o.regexMap.number,o.regexMap.tsuboText);t.tsubo=p},function(e,t,r){"use strict";var n=r(205);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(r(73)),o=n(r(74)),A=r(1038),a=function(){function e(t,r,n,o){(0,i.default)(this,e),this.name=t,this.factor=r,this.regexWithoutUnit=n,this.regexWithUnit=o}return(0,o.default)(e,[{key:"getDisplayText",value:function(e,t,r){return t?"".concat((0,A.numberPrecisionOperationAndRound)(e/this.factor,r)).concat(this.name):"".concat((0,A.numberPrecisionOperationAndRound)(e/this.factor,r))}},{key:"getValueFromDisplayText",value:function(e,t){return t?this.getValueFromFirstNumber(this.regexWithUnit,e):this.getValueFromFirstNumber(this.regexWithoutUnit,e)}},{key:"getValueFromFirstNumber",value:function(e,t){var r=(0,A.testStringAndExtractNumbers)(e,t);return void 0!==r[0]?r[0]*this.factor:(console.warn("".concat(this.constructor.name,".getValueFromText(): illegal input.")),0)}}]),e}();t.default=a},function(e,t,r){"use strict";var n=r(205);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(r(73)),o=n(r(74)),A=r(513),a=r(1038),s=function(){function e(){(0,i.default)(this,e),this.factor=0}return(0,o.default)(e,[{key:"getDisplayText",value:function(e,t,r){return this.getFootAndInchText(e)}},{key:"getValueFromDisplayText",value:function(e,t){return this.getValueFromFootAndInchText(e)}},{key:"getFootAndInchText",value:function(e){var t=(0,a.numberPrecisionOperationAndRound)(e/A.FACTORS.inch2mm,0),r=Math.floor(t/A.FACTORS.foot2inch),n=t-r*A.FACTORS.foot2inch;return"".concat(r,"'").concat(n,"''")}},{key:"getValueFromFootAndInchText",value:function(e){var t,r;return A.regexMap.number.test(e)||A.regexMap.inchText.test(e)?(t=e.match(A.regexMap.numberInString))&&(r=Number(t[0])):A.regexMap.footAndInchText.test(e)&&(t=e.match(A.regexMap.numberInString))&&(r=Number(t[0])*A.FACTORS.foot2inch,2===t.length&&(r+=Number(t[1]))),void 0!==r?r*A.FACTORS.inch2mm:(console.warn("".concat(this.constructor.name,".getValueFromText(): illegal input.")),0)}}]),e}();t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.globalLengthUnitInfoMaps=t.globalAreaUnitInfoMaps=t.globalUnitInfoMaps=void 0;var n=r(512),i={metricSystem:{meter:{length:{precision:.001,unit:n.meter},area:{precision:.01,unit:n.squareMeter}},millimeter:{length:{precision:1,unit:n.millimeter},area:{precision:.01,unit:n.squareMeter}}},imperialSystem:{foot:{length:{precision:1,unit:n.footAndInch},area:{precision:1,unit:n.squareFoot}}}};t.globalUnitInfoMaps=i;var o={metricSystem:{meter:{precision:.01,unit:n.squareMeter},millimeter:{precision:.01,unit:n.squareMillimeter}},imperialSystem:{foot:{precision:.01,unit:n.squareFoot}},JapaneseUnitSystem:{mats:{precision:.01,unit:n.mats},tsubo:{precision:.01,unit:n.tsubo}}};t.globalAreaUnitInfoMaps=o;var A={metricSystem:{meter:{precision:.001,unit:n.meter},millimeter:{precision:1,unit:n.millimeter}},imperialSystem:{foot:{precision:1,unit:n.footAndInch},inch:{precision:.01,unit:n.inch}}};t.globalLengthUnitInfoMaps=A},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"TransactionDocument",{enumerable:!0,get:function(){return n.TransactionDocument}}),Object.defineProperty(t,"InferenceSystem2D",{enumerable:!0,get:function(){return i.InferenceSystem2D}}),Object.defineProperty(t,"flatEntitiesCreator",{enumerable:!0,get:function(){return o.flatEntitiesCreator}}),Object.defineProperty(t,"HighlightSystem2D",{enumerable:!0,get:function(){return A.HighlightSystem2D}}),Object.defineProperty(t,"HighlightSystem3D",{enumerable:!0,get:function(){return A.HighlightSystem3D}});var n=r(1884),i=r(415),o=r(1888),A=r(499)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"TransactionDocument",{enumerable:!0,get:function(){return n.default}});var n=r(1885)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(1886),i=r(1887),o=function(){function e(e){var t=this;this.undoStack=[],this.redoStack=[],this.status=i.TransactionDocumentStatus.None,this.onDocumentChange=function(e,r,n){t.status!==i.TransactionDocumentStatus.Aborting&&t.activeTransaction.record(e,r,n),t.status===i.TransactionDocumentStatus.None&&t.onBackupRecord&&t.onBackupRecord(e,r,n)},this.updateDocument=e.updateDocument,this.onBackupRecord=e.onBackupRecord,this.maxBackupStep=e.maxBackupStep||25,this.openTransaction()}return e.prototype.setMaxBackupStep=function(e){if(e<1)throw Error("MaxBackupStep must not smaller than 1");this.maxBackupStep=e,this.undoStack.length>=this.maxBackupStep&&this.undoStack.splice(0,this.undoStack.length-this.maxBackupStep)},e.prototype.openTransaction=function(){this.redoStack.length=0,this.activeTransaction=this.createTransaction()},e.prototype.commitTransaction=function(){this.undoStack.length>=this.maxBackupStep&&this.undoStack.splice(0,this.undoStack.length-(this.maxBackupStep+1)),this.undoStack.push(this.activeTransaction),this.openTransaction()},e.prototype.abortTransaction=function(){this.status=i.TransactionDocumentStatus.Aborting,this.activeTransaction.recover(),this.status=i.TransactionDocumentStatus.None,this.activeTransaction=this.createTransaction()},e.prototype.undo=function(){return 0!==this.undoStack.length&&(this.activeTransaction=this.createTransaction(),this.status=i.TransactionDocumentStatus.Undoing,this.undoStack.pop().recover(),this.status=i.TransactionDocumentStatus.None,this.redoStack.push(this.activeTransaction),this.activeTransaction=this.createTransaction(),!0)},e.prototype.redo=function(){return 0!==this.redoStack.length&&(this.activeTransaction=this.createTransaction(),this.status=i.TransactionDocumentStatus.Redoing,this.redoStack.pop().recover(),this.status=i.TransactionDocumentStatus.None,this.undoStack.push(this.activeTransaction),this.activeTransaction=this.createTransaction(),!0)},e.prototype.createTransaction=function(){return new n.default(this.updateDocument)},e}();t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=function(){function e(e){this.updateDocument=e,this.records=new Map}return e.prototype.record=function(e,t,r){var n=this.records.get(e);n||(n=new Map,this.records.set(e,n)),n.has(t)||n.set(t,r)},e.prototype.recover=function(){var e=this;this.records.forEach((function(t,r){t.forEach((function(t,n){e.updateDocument(r,n,t)}))}))},e.prototype.isEmpty=function(){return 0===this.records.size},e}();t.default=n},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionDocumentStatus=void 0,t.TransactionDocumentStatus=n,function(e){e[e.None=0]="None",e[e.Undoing=1]="Undoing",e[e.Redoing=2]="Redoing",e[e.Aborting=3]="Aborting"}(n||(t.TransactionDocumentStatus=n={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.flatEntitiesCreator=function(e){var t=[],r=[];return function(n){var i=t,o=r;if(n!==i){for(var A=[],a=i.length,s=n.length,u=0;u<a&&u<s;u++){if(i[u]!==(f=n[u]))break;A.push(o[u])}if(u===a)for(;u<s;u++)A.push(e(n[u]));else{for(var c=new Map,l=u;l<a;l++)c.set(i[l],o[l]);for(var g=u;g<s;g++){var f=n[g],h=c.get(f);void 0===h?A.push(e(f)):A.push(h)}}return t=n,r=A,Object({DEPLOY_VERSION:1,APP_VERSION:1}).ENABLE_DEV_CHECK&&(Object.freeze(t),Object.freeze(r)),A}return r}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"perf",{enumerable:!0,get:function(){return n.perf}});var n=r(232)},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.KAFApp=void 0;var n=r(4),i=r(211),o=r(143),A=r(1039),a=r(1043),s=r(232),u=r(492),c=r(137),l=r(11),g=r(91);function f(e){var t=document.getElementById(e);return t||((t=document.createElement("div")).id=e,t.style.position="absolute",t.style.top="0",t.style.width="100%",t.style.height="100%",document.body.appendChild(t)),t}var h={fpsDetectorEnabled:!0},p=function(){function t(){this.appNodeId="kaf-app-"+t.AppCount++,this.pluginManager=new i.PluginManager,this.started=!1,this.registerPlugin(A.AppServicePlugin)}return t.prototype.registerPlugin=function(e){if(this.started)throw new Error("KAFApp.registerPlugin: cannot register plugin after App is started.");return this.pluginManager.registerPlugin(e),this},t.prototype.getPlugin=function(e){return this.pluginManager.getPlugin(e)},t.prototype.start=function(t){var r=this;if(this.started)throw new Error("KAFApp.start: App is already started.");t=(0,n.__assign)((0,n.__assign)({},h),t),this.started=!0;var i=(0,s.measurePluginLoadTiming)(this.pluginManager);this.pluginManager.loadAll(),i();var p=this.pluginManager.getPlugin(A.AppServicePlugin);this.fpsDetector=new s.FpsDetector(p.logger),this.fpsDataMerger=new s.FpsDataMerger({onMerged:function(e){return p.logger.fpsMerged(e)}}),p.stateManager.toolbox[u.setAppIdSymbol](this.appNodeId),p.stateManager.document[u.setAppIdSymbol](this.appNodeId),t.fpsDetectorEnabled?this.keepLoggingFps():this.fpsDetector.dispose(),(e.env.IS_PERF||Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)&&(window.kafProfiler=(0,a.profiler)(),window.kafDebuger=(0,a.debugManager)()),(0,o.config)({onError:p.logger.error}),p.stateManager.document.start(),p.stateManager.document.getLoadStatistics().then((function(e){(0,s.setDocumentsTiming)(e,r.appNodeId)}));var d,I,y=p.getLayout();d=y&&l.createElement(y,null),I={logger:p.logger,fpsDetector:this.fpsDetector,fpsDataMerger:this.fpsDataMerger,kafCoreState:p.stateManager,nodeId:this.appNodeId},g.render(l.createElement(c.RootStateContext.Provider,{value:{rootState:I.kafCoreState}},l.createElement(A.App,{logger:I.logger,fpsDetector:I.fpsDetector,fpsDataMerger:I.fpsDataMerger,appNodeId:I.nodeId},d)),f(I.nodeId)),Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&(__dev.kafApp=this)},t.prototype.dispose=function(){var e,t;this.pluginManager.unloadAll(),e={nodeId:this.appNodeId},t=f(e.nodeId),g.unmountComponentAtNode(t),t.remove(),this.fpsDetector.dispose(),this.started=!1},t.prototype.getAppNodeId=function(){return this.appNodeId},t.prototype.keepLoggingFps=function(){var e=this;this.fpsDetector.on("frame",(function(t,r){r&&e.fpsDataMerger.add(t.duration)})),(0,s.initPerf)()},t.AppCount=0,t}();t.KAFApp=p}).call(this,r(86))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.MountedViews=void 0;var n=r(4),i=r(137),o=r(2),A=r(11),a=r(91),s=r(510),u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.placeholder=document.createElement("span"),t.viewKeyMap=new WeakMap,t}return(0,n.__extends)(t,e),t.prototype.render=function(){var e=this,t=this.props.mountedViews.map((function(t,r){return A.createElement(s.ViewMountOrderContext.Provider,{key:e.getViewKey(t),value:r},A.createElement(t,null))})).reverse();return a.createPortal(t,this.placeholder)},t.prototype.componentWillUnmount=function(){this.placeholder=void 0},t.prototype.getViewKey=function(e){var t=this.viewKeyMap.get(e);return void 0===t&&(t=(0,o.uniqueId)("mounted-view-"),this.viewKeyMap.set(e,t)),t},t}(A.PureComponent);t.MountedViews=u;var c=(0,i.connect)((function(e){return{root:e}}),(function(e){return{mountedViews:e.root.__INTERNAL__mountedAppViews}}),u);t.default=c},function(e,t,r){},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AppServicePlugin=void 0;var n=r(4),i=r(211),o=r(1041),A=r(689),a=r(671),s=r(676),u=r(274),c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rootState=new A.default,t.logger=new s.Logger,t.enableConflictSessionCheck=function(e,r){t.getSessionManager().prepareSession(e,r)},t}return(0,n.__extends)(t,e),Object.defineProperty(t.prototype,"stateManager",{get:function(){return this.rootState},enumerable:!0,configurable:!0}),t.prototype.onInitialize=function(){var e=this;this.rootState=new A.default,this.rootState.initState(),this.kaf2AppService=this.dependencies.get(a.AppServicePlugin),this.rootState[A.RootState_setKaf2](this.kaf2AppService.state),this.rootState.toolbox.provideToolContext(u.ToolContextInternal,(function(){return{rootState:e.rootState}})),Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&(__dev.kaf=this)},t.prototype.onDispose=function(){this.rootState.dispose(),this.getSessionManager().stopSessionChecking(),this.layout=void 0},t.prototype.setLayout=function(e){if(this.layout)throw new Error("Layout cannot be set twice.");this.layout=e},t.prototype.getLayout=function(){return this.layout},t.prototype.addDocumentSource=function(e){this.rootState.document.addDocumentSource(e)},t.prototype.mountView=function(e){this.rootState.__INTERNAL__addMountedAppView(e)},t.prototype.getSessionManager=function(){var e=this;return this.sessionManager||(this.sessionManager=new o.default((function(t){t?e.rootState.document.autoSave.start():e.rootState.document.autoSave.stop()}))),this.sessionManager},t.prototype.registerEntityDocument=function(e){this.kaf2AppService.registerDocument(e)},t.dependencies=[a.AppServicePlugin],t}(i.BasePlugin);t.AppServicePlugin=c},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(344),i=r(4),o=r(228),A=r(1037),a=r(682),s=r(11),u=r(232),c=r(1044),l=r(1045);r(1895);var g,f={"./DebugComponent.module.scss":{"debug-root":"ui-debug-root_47b7b","debug-button":"ui-debug-button_73a33","debug-setting":"ui-debug-setting_bb0cc","debug-setting-row":"ui-debug-setting-row_94ade","debug-setting-row-title":"ui-debug-setting-row-title_6b6be","debug-setting-row-content":"ui-debug-setting-row-content_fc85a","debug-setting-item":"ui-debug-setting-item_6ac86","debug-setting-item-label":"ui-debug-setting-item-label_9289f","profile-wrapper":"ui-profile-wrapper_f26ef","profile-visible":"ui-profile-visible_b5bbc"}};g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,i.__extends)(t,e),t.prototype.render=function(){return null},t}(a.default);var h=null;try{h=localStorage.getItem("__kafPerfEnabled__")}catch(e){if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV)throw e}if("1"===h||null===h&&(e.env.IS_PERF||Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV)){g=function(e){function t(t){var r=e.call(this,t)||this;return r.switchProfile=function(e){var t=e.target.checked;r.setState({showProfile:t}),t||r.cleanRenderProfile()},r.switchDebug=function(e){var t=e.target.checked;r.setState({showDebug:t})},r.switchLanguage=function(e){var t=e.target.checked,r=window,n=t?A.Language.EN_US:A.Language.ZH_CN;try{r.kafDebuger.set("lang",n,!0),r.localStorage["local-language"]=n}catch(e){}window.location.reload()},r.switchAxis=function(e){var t=e.target.checked;r.setState({showAxis:t}),window.kafDebuger.set("axis3d",t)},r.onKey=function(e){e&&192==e.keyCode&&r.recordCurrentState()},r.state=r.state||{},r.state.showProfile=!1,r.state.showDebug=!0,r.state.showAxis=!1,r}return(0,i.__extends)(t,e),t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.initPixi(),document.body.addEventListener("keydown",this.onKey,!1)},t.prototype.render=function(){var e=this,t=this.state.showDebug;return s.createElement("div",{className:"ui-debug-root_47b7b",style:{display:t?"block":"none"}},this.renderDebugButton(),s.createElement("div",{ref:function(t){return e.elProfiler=t},className:(0,n.default)("profile-wrapper "+(this.state.showProfile?"profile-visible":""),f)}))},t.prototype.renderDebugButton=function(){return s.createElement("div",{className:"ui-debug-button_73a33"},s.createElement(u.Stats,null),this.renderSettingPanel())},t.prototype.renderSettingPanel=function(){var e=this.state.views,t="";try{t=window.localStorage["local-language"]}catch(e){}return s.createElement("div",{className:"ui-debug-setting_bb0cc"},s.createElement("div",{className:"ui-debug-setting-row_94ade"},s.createElement("div",{className:"ui-debug-setting-row-title_6b6be"},"基本"),s.createElement("div",{className:"ui-debug-setting-row-content_fc85a"},s.createElement("div",{className:"ui-debug-setting-item_6ac86"},s.createElement("input",{type:"checkbox",checked:this.state.showProfile,onChange:this.switchProfile}),s.createElement("span",{className:"ui-debug-setting-item-label_9289f"},"性能(旧)")),s.createElement("div",{className:"ui-debug-setting-item_6ac86"},s.createElement("input",{type:"checkbox",checked:this.state.showDebug,onChange:this.switchDebug}),s.createElement("span",{className:"ui-debug-setting-item-label_9289f"},"调试")),s.createElement("div",{className:"ui-debug-setting-item_6ac86"},s.createElement("input",{type:"checkbox",checked:t===A.Language.EN_US,onChange:this.switchLanguage}),s.createElement("span",{className:"ui-debug-setting-item-label_9289f"},"英文")),this.renderAxisSwitch())),s.createElement("div",{className:"ui-debug-setting-row_94ade"},s.createElement("div",{className:"ui-debug-setting-row-title_6b6be"},"性能"),s.createElement("div",{className:"ui-debug-setting-row-content_fc85a"},s.createElement("div",{className:"ui-debug-setting-item_6ac86"},s.createElement(u.Timing,null)),s.createElement("div",{className:"ui-debug-setting-item_6ac86"},s.createElement(u.Profiling,null)))),e.map((function(e,t){return s.createElement("div",{key:e.key,className:"ui-debug-setting-row_94ade"},e.content)})))},t.prototype.renderAxisSwitch=function(){return Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV?s.createElement("div",{className:"ui-debug-setting-item_6ac86"},s.createElement("input",{type:"checkbox",checked:this.state.showAxis,onChange:this.switchAxis}),s.createElement("span",{className:"ui-debug-setting-item-label_9289f"},"坐标系")):null},t.prototype.renderProfile=function(){var e="",t=this.recordState||this.dumpProfile(),r=t.normalCosts,n=t.normalCounts,i=t.totalValues;e="时间统计\n\n",r.sort((function(e,t){return t.time-e.time})),r.forEach((function(t){e+=t.key+" "+t.time+" "+t.count+"\n"})),this.pxCostsText.text=e,e="计数统计\n\n",n.forEach((function(t){e+=t.key+" "+t.count+"\n"})),this.pxCountsText.text=e,e="全局计数\n\n",i.forEach((function(t){e+=t.key+" "+t.count+"\n"})),this.pxInfoText.text=e},t.prototype.cleanRenderProfile=function(){this.pxCostsText.text="",this.pxCountsText.text="",this.pxInfoText.text=""},t.prototype.dumpProfile=function(){var e,t,r,n,i=(0,l.profiler)().dump(),o=Object.values(i.costs);e=[];for(var A=0,a=o.length;A<a;++A)n=o[A],(0,c.isCrcp)(n.key)||e.push(n);var s=Object.values(i.counts).sort((function(e,t){return t.count-e.count}));t=[];for(A=0,a=s.length;A<a;++A)n=s[A],(0,c.isCrcp)(n.key)||t.push(n);var u=i.totals;return(r=Object.keys(u).map((function(e){return{key:e,count:u[e]}}))).sort((function(e,t){return t.count-e.count})),{normalCosts:e.length<50?e:e.slice(0,50),normalCounts:t.length<50?t:t.slice(0,50),totalValues:r.length<50?r:r.slice(0,50),datas:i.datas}},t.prototype.recordCurrentState=function(){this.recordState?this.recordState=void 0:(this.recordState=this.dumpProfile(),window.__pd=this.recordState.datas[this.recordState.datas.length-1])},t.prototype.initPixi=function(){var e=this;if(this.elProfiler){this.pxApp=new o.Application(3e3,1200,{backgroundColor:0});var t=this.pxApp;this.elProfiler.appendChild(t.view);var r=function(e,r){void 0===r&&(r=5);var n=new o.Text("",{fontSize:20,fill:65280,align:"left"});return n.x=e,n.y=r,t.stage.addChild(n),n};this.pxCostsText=r(500),this.pxCountsText=r(1e3),this.pxInfoText=r(1500);var n=Date.now();t.ticker.add((function(){Date.now()-n<1e3||(n=Date.now(),e.state.showProfile&&e.renderProfile())}))}},t}(a.default)}var p=g;t.default=p}).call(this,r(86))},function(e,t,r){},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"DisplayInfoMesh",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"DisplayInfoDrawable",{enumerable:!0,get:function(){return i.default}});var n=r(1897),i=r(1904)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(4),i=r(139),o=r(83),A=r(1046),a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.meshBuilder=new A.DisplayInfoMeshBuilder((function(){return t.props}),(function(){return t.state.loadingStatus}),(function(e){return t.setState({loadingStatus:e})}),(function(e,r){return t.onMeshCreated(e,r)}),(function(){return t.notifyWorldUpdate()})),t.componentInstances=t.meshBuilder.componentInstances,t.state={},t}return(0,n.__extends)(t,e),t.prototype.onMeshCreated=function(e,t){},t.prototype.buildMesh=function(){var e=this.meshBuilder.createMesh();return e.visible=void 0===this.props.visible||this.props.visible,e},t.prototype.componentDidUpdate=function(t,r){e.prototype.componentDidUpdate.call(this,t,r),this.meshBuilder.updateMesh(this.mesh);var n=this.props.visible;this.mesh.visible=void 0===n||n},t.prototype.componentWillUnmount=function(){this.meshBuilder.disposeMesh(),e.prototype.componentWillUnmount.call(this)},t=(0,n.__decorate)([i.default],t)}(o.default);t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1899);t.toPopBufferComponent=n.toPopBufferComponent,t.PopBufferComponent=n.PopBufferComponent;var i=r(1047);t.toPopBufferMtl=i.toPopBufferMtl,t.PopBufferMtl=i.PopBufferMtl},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(44),i=r(1047),o=function(){function e(){this.doubleSided=!1}return e.prototype.getId=function(){return this.id},e.prototype.setId=function(e){return this.id=e,this},e.prototype.getMesh=function(){return this.mesh},e.prototype.setMesh=function(e){return this.mesh=e,this},e.prototype.getTransform=function(){return this.transform},e.prototype.setTransform=function(e){return this.transform=e,this},e.prototype.getMtl=function(){return this.mtl},e.prototype.setMtl=function(e){return this.mtl=e,this},e.prototype.getDoubleSided=function(){return this.doubleSided},e.prototype.setDoubleSided=function(e){return void 0===e&&(e=!1),this.doubleSided=e,this},e}();t.PopBufferComponent=o,t.toPopBufferComponent=function(e){var t=new o;return t.setId(e.id).setMesh(e.mesh).setDoubleSided(e.doubleSided),e.transform&&t.setTransform((new n.default).fromString(e.transform)),t.setMtl(e.mtl.filter((function(e){return!!e})).map(i.toPopBufferMtl)),t}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(6),i=r(12),o=function(){function e(e){this.props=e}return e.prototype.create=function(){var t=this.props,r=t.color,i=t.opacity,o=e.NORMAL_BOX;this.opacity=i,this.material=new n.MeshBasicMaterial({color:r,transparent:!0,opacity:i||1});var A=new n.Mesh(o,this.material);return this.applyTransform(A,this.props),A.setAttribute("shadowCaster",!1),i&&i<1&&(A.setAttribute("outline-color-marked",!0),A.setAttribute("transparent-line-faded",!0)),A},e.prototype.update=function(t){var r=this.props,n=r.opacity,i=r.color;t.geometry=e.NORMAL_BOX,this.material.setValues({color:i,opacity:n}),this.opacity!==n&&(this.opacity=n,this.updateMeshAttributeFromOpacity(t,n)),this.applyTransform(t,this.props)},e.prototype.dispose=function(){},e.prototype.applyTransform=function(e,t){var r=t.position,n=t.rotation,o=t.scale,A=void 0===o?i.SCALE_ONE:o,a=t.size;e.position.set(r.x,r.y,r.z),e.scale.set(A.x*a.x,A.y*a.y,A.z*a.z),e.rotation.set(n.x,n.y,n.z)},e.prototype.updateMeshAttributeFromOpacity=function(e,t){t&&t<1?(e.setAttribute("outline-color-marked",!0),e.setAttribute("transparent-line-faded",!0)):(e.setAttribute("outline-color-marked",!1),e.setAttribute("transparent-line-faded",!1))},e.NORMAL_BOX=new n.BoxGeometry(1,1,1),e}();t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(1902),i=function(){function e(e){this.props=e}return e.prototype.create=function(){var e=(0,n.createMesh)(this.props);return(0,n.applyTransform)(e,this.props),e},e.prototype.update=function(e){(0,n.applyTransform)(e,this.props)},e.prototype.dispose=function(){},e}();t.default=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createMesh=u,t.applyTransform=c,t.default=void 0;var n=r(4),i=r(6),o=r(98),A=r(5),a=r(227),s=r(83);function u(e){var t=e.size,r=new i.BoxBufferGeometry(t.x,t.y,t.z),n=new i.EdgesBufferGeometry(r,1),o=new i.LineBasicMaterial({color:16722688,depthTest:!1});return new i.LineSegments(n,o)}function c(e,t){var r=t.position,n=t.pivot,i=t.scale,s=t.rotation;e.position.copy((0,a.vector3ToThree)(A.default.add(r,n||new A.default))),e.scale.copy((0,a.vector3ToThree)(i)),e.rotation.copy((0,a.eulerToThree)((new o.default).setFromVector3(s))),e.renderOrder=1}var l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,n.__extends)(t,e),t.prototype.buildMesh=function(){var e=u(this.props);return c(e,this.props),e},t.prototype.componentDidUpdate=function(t,r){e.prototype.componentDidUpdate.call(this,t,r),c(this.mesh,this.props)},t}(s.default);t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PromiseQueue=void 0;var n=function(){function e(e){var t=this;this.isCanceled=!1,this.hasSuccess=!1,this.hasFailure=!1,this.promise=Promise.all(e.map((function(e){return e.then((function(){t.hasSuccess=!0}),(function(){t.hasFailure=!0}))}))).then((function(){return{hasSuccess:t.hasSuccess,hasFailure:t.hasFailure,isCanceled:t.isCanceled}}))}return e.prototype.setCanceled=function(){this.isCanceled=!0},e}();t.PromiseQueue=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(4),i=r(34),o=r(1046),A=r(2),a=function(){function e(e){this.props=e}return e.prototype.create=function(e){var t=this;return this.meshBuilder=new o.DisplayInfoMeshBuilder((function(){return t.props}),(function(){return t.loadingStatus}),(function(e){return t.loadingStatus=e}),A.noop,e),this.meshBuilder.createMesh()},e.prototype.update=function(e){this.meshBuilder.updateMesh(e)},e.prototype.dispose=function(e){this.meshBuilder.disposeMesh()},(0,n.__decorate)([i.observable],e.prototype,"loadingStatus",void 0),e}();t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(4),i=r(137),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.lastHandledSignalCount=0,t}return(0,n.__extends)(t,e),t.prototype.componentWillMount=function(){this.lastHandledSignalCount=this.props.autoSaveSignalCount,this.props.rootState.document.autoSave.start()},t.prototype.componentWillReceiveProps=function(e){e.autoSaveSignalCount!==this.lastHandledSignalCount&&(this.props.rootState.document.saveDocument(!0),this.lastHandledSignalCount=e.autoSaveSignalCount)},t.prototype.render=function(){return null},t}(r(11).Component),A=(0,i.connect)((function(e){return{autoSave:e.document.autoSave}}),(function(e){return{autoSaveSignalCount:e.autoSave.autoSaveSignalCount}}),o);t.default=A},function(e,t){},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1058);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var i=r(1908);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})}));var o=r(1909);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})}))},function(module,exports,__webpack_require__){"use strict";(function(module){Object.defineProperty(exports,"__esModule",{value:!0}),exports.createReactContext=exports.PureComponent=exports.Component=void 0;var React=_interopRequireWildcard(__webpack_require__(11)),_async=__webpack_require__(1058),enterModule;function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _getRequireWildcardCache=function(){return e},e}function _interopRequireWildcard(e){if(e&&e.__esModule)return e;if(null===e||"object"!==_typeof(e)&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=n?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(r,i,o):r[i]=e[i]}return r.default=e,t&&t.set(e,r),r}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper(e){var t=_isNativeReflectConstruct();return function(){var r,n=_getPrototypeOf(e);if(t){var i=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _possibleConstructorReturn(this,r)}}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof(t)&&"function"!=typeof t?_assertThisInitialized(e):t}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}enterModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).enterModule,enterModule&&enterModule(module);var BaseComponent=function(_React$Component){_inherits(BaseComponent,_React$Component);var _super=_createSuper(BaseComponent);function BaseComponent(){return _classCallCheck(this,BaseComponent),_super.apply(this,arguments)}return _createClass(BaseComponent,[{key:"componentDidMount",value:function(){this.initAsync()}},{key:"componentWillUnmount",value:function(){this.releaseAsync()}},{key:"initAsync",value:function(){}},{key:"releaseAsync",value:function(){}},{key:"cancelAllAsync",value:function(){}},{key:"asyncLatest",value:function(e){}},{key:"asyncEvery",value:function(e){}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),BaseComponent}(React.Component),BasePureComponent=function(_React$PureComponent){_inherits(BasePureComponent,_React$PureComponent);var _super2=_createSuper(BasePureComponent);function BasePureComponent(){return _classCallCheck(this,BasePureComponent),_super2.apply(this,arguments)}return _createClass(BasePureComponent,[{key:"componentDidMount",value:function(){this.initAsync()}},{key:"componentWillUnmount",value:function(){this.releaseAsync()}},{key:"initAsync",value:function(){}},{key:"releaseAsync",value:function(){}},{key:"cancelAllAsync",value:function(){}},{key:"asyncLatest",value:function(e){}},{key:"asyncEvery",value:function(e){}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),BasePureComponent}(React.PureComponent),Component=function(e){_inherits(r,e);var t=_createSuper(r);function r(){return _classCallCheck(this,r),t.apply(this,arguments)}return r}(BaseComponent);exports.Component=Component;var PureComponent=function(e){_inherits(r,e);var t=_createSuper(r);function r(){return _classCallCheck(this,r),t.apply(this,arguments)}return r}(BasePureComponent);exports.PureComponent=PureComponent,_async.context.extend(Component),_async.context.extend(PureComponent);var createReactContext=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.asyncContext||(0,_async.createAsyncContext)(),r=function(e){_inherits(r,e);var t=_createSuper(r);function r(){return _classCallCheck(this,r),t.apply(this,arguments)}return r}(BaseComponent),n=function(e){_inherits(r,e);var t=_createSuper(r);function r(){return _classCallCheck(this,r),t.apply(this,arguments)}return r}(BasePureComponent);return t.extend(r),t.extend(n),{Component:r,PureComponent:n}},reactHotLoader,leaveModule;exports.createReactContext=createReactContext,reactHotLoader=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).default,reactHotLoader&&(reactHotLoader.register(BaseComponent,"BaseComponent","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/common/react.js"),reactHotLoader.register(BasePureComponent,"BasePureComponent","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/common/react.js"),reactHotLoader.register(Component,"Component","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/common/react.js"),reactHotLoader.register(PureComponent,"PureComponent","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/common/react.js"),reactHotLoader.register(createReactContext,"createReactContext","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/common/react.js")),leaveModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).leaveModule,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(24)(module))},function(module,exports,__webpack_require__){"use strict";(function(module){Object.defineProperty(exports,"__esModule",{value:!0}),exports.SingletonRef=void 0;var _util=__webpack_require__(79),enterModule;function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}enterModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).enterModule,enterModule&&enterModule(module);var SingletonRef=function(){function SingletonRef(e){var t=this;_classCallCheck(this,SingletonRef),this.instance=function(){return t.value||t.preValue},this.preInstance=function(){return t.preValue},e&&(this.noPreInstance=!0)}return _createClass(SingletonRef,[{key:"set",value:function(e){if(this.value)throw new Error("CUSTOM: Singleton exception while set!");this.value=e}},{key:"unset",value:function(e){this.value!==e&&_util.Util.asyncThrow(new Error("CUSTOM: Singleton exception while unset!")),this.noPreInstance||(this.preValue=this.value),this.value=void 0}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),SingletonRef}(),reactHotLoader,leaveModule;exports.SingletonRef=SingletonRef,reactHotLoader=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).default,reactHotLoader&&reactHotLoader.register(SingletonRef,"SingletonRef","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/common/Singleton.js"),leaveModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).leaveModule,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(24)(module))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(323);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var i=r(1911);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})}));var o=r(1053);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})}));var A=r(694);Object.keys(A).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return A[e]}})}));var a=r(1054);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}})}));var s=r(1055);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}})}));var u=r(693);Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}})}));var c=r(1056);Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}})}));var l=r(1057);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}})}))},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.tde=void 0;var n,i=r(323),o=r(694);(n=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:r(7)).enterModule)&&n(e);var A={desc:"dummy",module:function(){return this},defineCase:function(){return this}};function a(e,t){try{return i.tci.enabled?o.TestDesign.create(e,t):A}catch(e){return A}}var s,u,c={design:a};t.tde=c,(s=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:r(7)).default)&&(s.register(A,"DUMMY_DESIGN","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/testing/tde.js"),s.register(a,"design","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/testing/tde.js"),s.register(c,"tde","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/testing/tde.js")),(u=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:r(7)).leaveModule)&&u(e)}).call(this,r(24)(e))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1913);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var i=r(1914);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})}));var o=r(1059);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})}));var A=r(1060);Object.keys(A).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return A[e]}})}));var a=r(1915);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}})}))},function(module,exports,__webpack_require__){"use strict";(function(module){var enterModule;function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}Object.defineProperty(exports,"__esModule",{value:!0}),exports.Service=void 0,enterModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).enterModule,enterModule&&enterModule(module);var Service=function(){function Service(){_classCallCheck(this,Service)}return _createClass(Service,[{key:"getId",value:function(){return this.id}},{key:"onAdd",value:function(e,t){if(!this.center||this.center!==e){if(!e||!t)throw new Error("CUSTOM: Registe a invalid service!");if("string"!=typeof t&&!(this instanceof t))throw new Error("CUSTOM: Registe a service whose decl is not compatible with impl!");this.center&&this.center.rem(this.id),this.center=e,this.id=t}}},{key:"onRem",value:function(e,t){this.center===e&&(this.center=void 0,this.id=void 0)}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),Service}(),reactHotLoader,leaveModule;exports.Service=Service,reactHotLoader=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).default,reactHotLoader&&reactHotLoader.register(Service,"Service","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/Service.js"),leaveModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).leaveModule,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(24)(module))},function(module,exports,__webpack_require__){"use strict";(function(module){Object.defineProperty(exports,"__esModule",{value:!0}),exports.ServiceApplication=exports.DynamicServiceApplication=void 0;var _PluginApplication2=__webpack_require__(695),_util=__webpack_require__(79),enterModule;function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper(e){var t=_isNativeReflectConstruct();return function(){var r,n=_getPrototypeOf(e);if(t){var i=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _possibleConstructorReturn(this,r)}}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof(t)&&"function"!=typeof t?_assertThisInitialized(e):t}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}enterModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).enterModule,enterModule&&enterModule(module);var DynamicServiceApplication=function(_PluginApplication){_inherits(DynamicServiceApplication,_PluginApplication);var _super=_createSuper(DynamicServiceApplication);function DynamicServiceApplication(e,t,r){var n;return _classCallCheck(this,DynamicServiceApplication),(n=_super.call(this,t,r||e.getPlugin())).framework=e,n}return _createClass(DynamicServiceApplication,[{key:"prevInit",value:function(){}},{key:"postInit",value:function(){}},{key:"injectInitAOP",value:function(){_util.Util.aspect(this,"init",(function(e,t){return function(){e.prevInit(),t.apply(e,arguments),e.postInit(),e.framework.setAppInited(e)}}))}},{key:"injectRunAOP",value:function(){_util.Util.aspect(this,"run",(function(e,t){return function(){t.apply(e,arguments),e.framework.setAppRunning(e)}}))}},{key:"injectExitAOP",value:function(){_util.Util.aspect(this,"exit",(function(e,t){return function(){t.apply(e,arguments),e.framework.setAppExited(e)}}))}},{key:"injectInitAXRAOP",value:function(){_util.Util.aspect(this,"initAXR",(function(e,t){return function(){t.apply(e,arguments),e.initServices()}}))}},{key:"injectReleaseAXRAOP",value:function(){_util.Util.aspect(this,"releaseAXR",(function(e,t){return function(){e.releaseServices(),t.apply(e,arguments)}}))}},{key:"initServices",value:function(){this.framework.serviceCenter.addByProvider(this.constructor)}},{key:"releaseServices",value:function(){this.framework.serviceCenter.remByProvider(this.constructor)}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),DynamicServiceApplication}(_PluginApplication2.PluginApplication);exports.DynamicServiceApplication=DynamicServiceApplication;var ServiceApplication=function(_DynamicServiceApplic){_inherits(ServiceApplication,_DynamicServiceApplic);var _super2=_createSuper(ServiceApplication);function ServiceApplication(e,t){return _classCallCheck(this,ServiceApplication),_super2.call(this,e,t)}return _createClass(ServiceApplication,[{key:"injectInitAOP",value:function(){_util.Util.aspect(this,"postInit",(function(e,t){return function(){t.apply(e,arguments),e.framework.setAppInited(e)}}))}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),ServiceApplication}(DynamicServiceApplication),reactHotLoader,leaveModule;exports.ServiceApplication=ServiceApplication,reactHotLoader=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).default,reactHotLoader&&(reactHotLoader.register(DynamicServiceApplication,"DynamicServiceApplication","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceApplication.js"),reactHotLoader.register(ServiceApplication,"ServiceApplication","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceApplication.js")),leaveModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).leaveModule,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(24)(module))},function(module,exports,__webpack_require__){"use strict";(function(module){Object.defineProperty(exports,"__esModule",{value:!0}),exports.ServiceContainerApplication=exports.ContainerStaticContext=exports.EDynamicPolicy=exports.EAppOrder=void 0;var _PluginApplication2=__webpack_require__(695),_util=__webpack_require__(79),_ServiceFramework=__webpack_require__(1060),enterModule,EAppOrder;function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper(e){var t=_isNativeReflectConstruct();return function(){var r,n=_getPrototypeOf(e);if(t){var i=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _possibleConstructorReturn(this,r)}}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof(t)&&"function"!=typeof t?_assertThisInitialized(e):t}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}enterModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).enterModule,enterModule&&enterModule(module),exports.EAppOrder=EAppOrder,function(e){e[e.LOW=1]="LOW",e[e.NORMAL=500]="NORMAL",e[e.HIGH=1e3]="HIGH"}(EAppOrder||(exports.EAppOrder=EAppOrder={}));var defaultRegisteOptions=function(){return{order:EAppOrder.NORMAL,dependencies:[]}},EDynamicPolicy;exports.EDynamicPolicy=EDynamicPolicy,function(e){e[e.DEFAULT=1]="DEFAULT",e[e.DELAY=2]="DELAY",e[e.DEFFERED=3]="DEFFERED"}(EDynamicPolicy||(exports.EDynamicPolicy=EDynamicPolicy={}));var defaultRegisteDynamicOptions=function(){return{policy:EDynamicPolicy.DEFAULT,delay:0,dependencies:[]}},ContainerStaticContext=function(){function ContainerStaticContext(){_classCallCheck(this,ContainerStaticContext),this.appDescs=[],this.dynamicAppDescs=[],this.serviceDescs=new Map}return _createClass(ContainerStaticContext,[{key:"addDependentPlugins",value:function(e){var t=void 0;this.pluginClass?t=this.pluginClass.dependencies:(this.tempDeps||(this.tempDeps=[]),t=this.tempDeps),e.forEach((function(e){t.includes(e)||t.push(e)}))}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}},{key:"pluginClass",get:function(){return this._pluginClass},set:function(e){if(this._pluginClass)throw new Error("CUSTOM: Plugin of container application has been set");if(this._pluginClass=e,this.tempDeps){var t=this._pluginClass.dependencies;this.tempDeps.forEach((function(e){t.includes(e)||t.push(e)})),this.tempDeps=void 0}}}]),ContainerStaticContext}();exports.ContainerStaticContext=ContainerStaticContext;var containerStaticContexts=new Map;function getContainerStaticContext(e){var t=containerStaticContexts.get(e);return t||(t=new ContainerStaticContext,containerStaticContexts.set(e,t)),t}function generateContainerAnnotations(e){var t=getContainerStaticContext(e);return{registe:function(e,r){if(t.appDescs.findIndex((function(t){return t.create===e}))>=0)throw new Error("CUSTOM: ServiceApplication registe twice!");return r=r?Object.assign(defaultRegisteOptions(),r):defaultRegisteOptions(),t.appDescs.push({create:e,options:r}),t.addDependentPlugins(r.dependencies||[]),function(e){}},registeDynamic:function(e,r,n){if(t.dynamicAppDescs.findIndex((function(t){return t.id===e}))>=0)throw new Error("CUSTOM: DynamicServiceApplication registe twice!");return n=n?Object.assign(defaultRegisteDynamicOptions(),n):defaultRegisteDynamicOptions(),t.dynamicAppDescs.push({create:r,id:e,options:n}),t.addDependentPlugins(n.dependencies||[]),function(e){}},service:function(e,r){if(!e||!r)throw new Error("CUSTOM: decl or provider of service is invalid!");return function(n){var i=t.serviceDescs.get(r);if(i||(i=[],t.serviceDescs.set(r,i)),i.some((function(t){return t.id===e})))throw new Error("CUSTOM: id of service conflict!");i.push({id:e,impl:n})}}}}var ServiceContainerApplication=function(_PluginApplication){_inherits(ServiceContainerApplication,_PluginApplication);var _super=_createSuper(ServiceContainerApplication);function ServiceContainerApplication(e,t){var r;_classCallCheck(this,ServiceContainerApplication),(r=_super.call(this,e,t)).apps=[];var n=r.getStaticContext();if(!(n.pluginClass&&t instanceof n.pluginClass))throw new Error("CUSTOM: Plugin of container application is invalid");return r}return _createClass(ServiceContainerApplication,[{key:"getStaticContext",value:function(){return getContainerStaticContext(this.constructor)}},{key:"prevInit",value:function(){}},{key:"postInit",value:function(){}},{key:"initApps",value:function(){var e=this,t=this.getStaticContext().appDescs;t.sort((function(e,t){return t.options.order-e.options.order})),t.forEach((function(t){_util.Util.safeExec((function(){e.apps.push(t.create(e.framework))}),!0)})),this.apps.forEach((function(e){_util.Util.safeExec((function(){e.prevInit()}),!0)})),this.apps.forEach((function(e){_util.Util.safeExec((function(){e.init()}),!0)})),this.apps.forEach((function(e){_util.Util.safeExec((function(){e.postInit()}),!0)}))}},{key:"runApps",value:function(){this.apps.forEach((function(e){_util.Util.safeExec((function(){e.run()}),!0)}))}},{key:"exitApps",value:function(){this.apps.slice().reverse().forEach((function(e){_util.Util.safeExec((function(){e.exit()}),!0)})),this.apps=[]}},{key:"tryStartDynamicApplications",value:function(){var e=this;Promise.resolve().then((function(){e.getStaticContext().dynamicAppDescs.forEach((function(t){_util.Util.safeExec((function(){t.options.policy===EDynamicPolicy.DEFFERED?e.framework.startDynamicApp(t.id):t.options.policy===EDynamicPolicy.DELAY&&setTimeout((function(){e.framework.startDynamicApp(t.id)}),t.options.delay)}),!0)}))}))}},{key:"initFramework",value:function(){var e=this.options.coreClass&&this.options.coreClass.ServiceFramework||_ServiceFramework.ServiceFramework;this.framework=new e(this),this.framework.init()}},{key:"releaseFramework",value:function(){this.framework&&this.framework.release()}},{key:"initServices",value:function(){this.framework.serviceCenter.addByProvider(this.constructor)}},{key:"releaseServices",value:function(){this.framework&&this.framework.serviceCenter.remByProvider(this.constructor)}},{key:"injectInitAOP",value:function(){_util.Util.aspect(this,"init",(function(e,t){return function(){e.prevInit(),t.apply(e,arguments),e.initApps(),e.postInit(),e.framework.setAppInited(e)}}))}},{key:"injectRunAOP",value:function(){_util.Util.aspect(this,"run",(function(e,t){return function(){t.apply(e,arguments),e.runApps(),e.framework.setAppRunning(e),e.tryStartDynamicApplications()}}))}},{key:"injectExitAOP",value:function(){_util.Util.aspect(this,"exit",(function(e,t){return function(){e.framework.setAppExited(e),e.exitApps(),t.apply(e,arguments)}}))}},{key:"injectInitAXRAOP",value:function(){_util.Util.aspect(this,"initAXR",(function(e,t){return function(){e.initFramework(),t.apply(e,arguments),e.initServices()}}))}},{key:"injectReleaseAXRAOP",value:function(){_util.Util.aspect(this,"releaseAXR",(function(e,t){return function(){e.releaseServices(),t.apply(e,arguments),e.releaseFramework()}}))}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}],[{key:"setPluginClass",value:function(e){getContainerStaticContext(this).pluginClass=e}},{key:"generateAnnotations",value:function(){return generateContainerAnnotations(this)}}]),ServiceContainerApplication}(_PluginApplication2.PluginApplication),reactHotLoader,leaveModule;exports.ServiceContainerApplication=ServiceContainerApplication,reactHotLoader=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).default,reactHotLoader&&(reactHotLoader.register(EAppOrder,"EAppOrder","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceContainerApplication.js"),reactHotLoader.register(defaultRegisteOptions,"defaultRegisteOptions","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceContainerApplication.js"),reactHotLoader.register(EDynamicPolicy,"EDynamicPolicy","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceContainerApplication.js"),reactHotLoader.register(defaultRegisteDynamicOptions,"defaultRegisteDynamicOptions","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceContainerApplication.js"),reactHotLoader.register(ContainerStaticContext,"ContainerStaticContext","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceContainerApplication.js"),reactHotLoader.register(containerStaticContexts,"containerStaticContexts","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceContainerApplication.js"),reactHotLoader.register(getContainerStaticContext,"getContainerStaticContext","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceContainerApplication.js"),reactHotLoader.register(generateContainerAnnotations,"generateContainerAnnotations","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceContainerApplication.js"),reactHotLoader.register(ServiceContainerApplication,"ServiceContainerApplication","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceContainerApplication.js")),leaveModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).leaveModule,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(24)(module))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1061);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var i=r(1917);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})}));var o=r(1062);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})}));var A=r(1063);Object.keys(A).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return A[e]}})}));var a=r(1918);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}})}))},function(module,exports,__webpack_require__){"use strict";(function(module){Object.defineProperty(exports,"__esModule",{value:!0}),exports.Monitor=void 0;var _AXR2=__webpack_require__(832),_Collector=__webpack_require__(419),_IdleWorker=__webpack_require__(1061),_PerfLog=__webpack_require__(1062),_TimeLog=__webpack_require__(1063),enterModule;function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}function _get(e,t,r){return(_get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=_superPropBase(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function _superPropBase(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_getPrototypeOf(e)););return e}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper(e){var t=_isNativeReflectConstruct();return function(){var r,n=_getPrototypeOf(e);if(t){var i=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _possibleConstructorReturn(this,r)}}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof(t)&&"function"!=typeof t?_assertThisInitialized(e):t}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function defaultSendLog(e,t){console.log(e,t)}enterModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).enterModule,enterModule&&enterModule(module);var Monitor=function(_AXR){_inherits(Monitor,_AXR);var _super=_createSuper(Monitor);function Monitor(){var e;return _classCallCheck(this,Monitor),(e=_super.apply(this,arguments)).perfLog=e.partialCreator.create(_PerfLog.PerfLog),e.idleWorker=e.partialCreator.create(_IdleWorker.IdleWorker),e.timeLog=e.partialCreator.create(_TimeLog.TimeLog),e}return _createClass(Monitor,[{key:"module",value:function(){return"monitor"}},{key:"init",value:function(){_get(_getPrototypeOf(Monitor.prototype),"init",this).call(this),this.collector||(this.collector=Monitor.getDefaultCollector()),this.sendLog||(this.sendLog=defaultSendLog)}},{key:"addConfig",value:function(e){var t=this,r=e.sendLog,n=e.collector,i=e.timeLogConfig,o=e.perfLogConfig;r&&(this.sendLog=r),n&&(this.collector=n),i&&this.timeLog.addConfig(i),o&&o.forEach((function(e){return t.perfLog.addConfig(e)}))}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}],[{key:"getDefaultCollector",value:function(){return Monitor.collector||(Monitor.collector=new _Collector.Collector,Monitor.collector.init()),Monitor.collector}}]),Monitor}(_AXR2.AXR),reactHotLoader,leaveModule;exports.Monitor=Monitor,reactHotLoader=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).default,reactHotLoader&&(reactHotLoader.register(defaultSendLog,"defaultSendLog","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/monitor/Monitor.js"),reactHotLoader.register(Monitor,"Monitor","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/monitor/Monitor.js")),leaveModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).leaveModule,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(24)(module))},function(module,exports,__webpack_require__){"use strict";(function(module){var enterModule;function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}Object.defineProperty(exports,"__esModule",{value:!0}),exports.BehaviorsLog=exports.BehaviorsLogCore=void 0,enterModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).enterModule,enterModule&&enterModule(module);var BehaviorsLogCore=function(){function BehaviorsLogCore(e){_classCallCheck(this,BehaviorsLogCore),this.toolName=e.toolName,this.designId=e.designId,this.userId=e.userId,this.levelId=e.levelId,this.toolVersion=e.toolVersion,this.errorHandler=e.errorHandler}return _createClass(BehaviorsLogCore,[{key:"valueParser",value:function(e){return"function"==typeof e?e():e}},{key:"log",value:function(e){var t=e.toolName,r=e.type,n=e.toolVersion,i=e.description,o=e.userId,A=e.designId,a=e.levelId;BehaviorsLog.log({type:r,description:i,toolName:t||this.valueParser(this.toolName),toolVersion:n||this.valueParser(this.toolVersion),userId:o||this.valueParser(this.userId),designId:A||this.valueParser(this.designId),levelId:a||this.valueParser(this.levelId),errorHandler:this.errorHandler})}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),BehaviorsLogCore}();exports.BehaviorsLogCore=BehaviorsLogCore;var BehaviorsLog=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"create",value:function(e){return new BehaviorsLogCore(e)}},{key:"log",value:function(e){var t=e.toolName,r=e.type,n=e.toolVersion,i=e.description,o=e.userId,A=e.designId,a=e.levelId,s=e.errorHandler;try{fetch("https://actionstat.kujiale.com/api/toolbehaviors/".concat(r,"/log"),{method:"POST",body:JSON.stringify({description:i,toolName:t,toolVersion:n,ua:null===navigator||void 0===navigator?void 0:navigator.userAgent,userId:o,designId:A,levelId:a,behavior:r}),headers:{"content-type":"application/json"}})}catch(e){"function"==typeof s&&s(e)}}}]),e}(),reactHotLoader,leaveModule;exports.BehaviorsLog=BehaviorsLog,reactHotLoader=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).default,reactHotLoader&&(reactHotLoader.register(BehaviorsLogCore,"BehaviorsLogCore","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/monitor/BehaviorsLog.js"),reactHotLoader.register(BehaviorsLog,"BehaviorsLog","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/monitor/BehaviorsLog.js")),leaveModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).leaveModule,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(24)(module))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2),i=function(){function e(){var e;this.min=0,this.max=4294967295,this.existedIdMap=((e={})[this.min]=!0,e[this.max]=!0,e)}return e.prototype.onIdOccupied=function(e){this.existedIdMap[e]=!0;var t=this.min,r=this.max;e>=t&&e<=r&&(e-t>r-e?this.max=e:this.min=e)},e.prototype.findNewIdRange=function(){for(var e=Object.keys(this.existedIdMap).map((function(e){return Number(e)})).filter((function(e){return e>=0&&e<=4294967295})).sort((function(e,t){return e-t})),t=0,r=0,n=0,i=1;i<e.length;i++){var o=e[i-1],A=e[i];A-o>t&&(t=A-o,r=o,n=A)}if(r+1>=n)throw"No available id for ObjectIndex";this.min=r,this.max=n},e.prototype.getId=function(){var e=this.min+1;return e>=this.max&&(this.findNewIdRange(),e=this.min+1),this.onIdOccupied(e),e.toString()},e.prototype.markId=function(e){var t=Number(e);n.isInteger(t)&&this.onIdOccupied(t)},e}();t.UniqueIndexGenerator=i,t.uniqueIndexGenerator=new i;var o=function(){function e(){}return Object.defineProperty(e.prototype,"id",{get:function(){return this.getId()},enumerable:!0,configurable:!0}),e.prototype.getId=function(){return void 0===this._id&&(this._id=t.uniqueIndexGenerator.getId()),this._id},e.prototype.setId=function(e){return this._id=e,t.uniqueIndexGenerator.markId(e),this},e}();t.default=o},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(o=i.key,A=void 0,A=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!==n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"===n(A)?A:String(A)),i)}var o,A}function A(e,t){return(A=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function a(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&A(e,t)}(u,e);var t,r,n=(t=u,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=s(t);if(r){var i=s(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return a(this,e)});function u(){var e;return i(this,u),(e=n.apply(this,arguments)).$version=0,e}return function(e,t,r){t&&o(e.prototype,t);r&&o(e,r);Object.defineProperty(e,"prototype",{writable:!1})}(u,[{key:"compareVersion",value:function(e){return this.$version===e.getVersion(this.getId())}},{key:"exportVersion",value:function(e){e.setVersion(this.getId(),this.revisionId,this.$version,this.getVersionType())}},{key:"hasVersion",value:function(e){return e.has(this.getId())}},{key:"getVersionType",value:function(){return this.constructor}},{key:"getVersion",value:function(){return this.$version}}]),u}(e)}},function(e,t,r){"use strict";var n,i;Object.defineProperty(t,"__esModule",{value:!0}),t.Axis3=t.Axis2=t.ALL_AXIS3=t.ALL_AXIS2=void 0,t.Axis2=n,function(e){e[e.X=0]="X",e[e.Y=1]="Y"}(n||(t.Axis2=n={})),t.Axis3=i,function(e){e[e.X=0]="X",e[e.Y=1]="Y",e[e.Z=2]="Z"}(i||(t.Axis3=i={}));var o=[i.X,i.Y,i.Z];t.ALL_AXIS3=o;var A=[n.X,n.Y];t.ALL_AXIS2=A},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,function(e){e.PROFILE_ID="vProfileId",e.OFFSET="offset",e.HANDLE_POSITION="handlePosition",e.HANDLE_ROTATION="handleRotate",e.OPEN_DIRECTION="openDirection",e.COVER_TYPE="coverType",e.LEFT_COVER="lCover",e.RIGHT_COVER="rCover",e.UP_COVER="uCover",e.DOWN_COVER="dCover",e.LEFT_COVER_TYPE="lCoverType",e.RIGHT_COVER_TYPE="rCoverType",e.UP_COVER_TYPE="uCoverType",e.DOWN_COVER_TYPE="dCoverType",e.FRONT_EXTENSION="QY",e.BACK_EXTENSION="HY",e.LEFT_SLOT_DEPTH="leftSlotDepth",e.RIGHT_SLOT_DEPTH="rightSlotDepth",e.TOP_SLOT_DEPTH="topSlotDepth",e.BOTTOM_SLOT_DEPTH="bottomSlotDepth",e.HAS_LEFT_SLOT="hasLeftSlot",e.HAS_RIGHT_SLOT="hasRightSlot",e.HAS_TOP_SLOT="hasTopSlot",e.HAS_BOTTOM_SLOT="hasBottomSlot",e.INDENT="indent",e.CRACK="crack",e.LEFT_CRACK="lCrack",e.RIGHT_CRACK="rCrack",e.UP_CRACK="uCrack",e.DOWN_CRACK="dCrack",e.LOCATION="location",e.DOOR_TYPE="doorType",e.JUNCTION="junction",e.HAS_SLOT="hasSlot",e.SLOT_DEPTH="slotDepth",e.FAN_NUMBER="num",e.DOOR_WIDTH="doorWidth",e.CROSS_TYPE="crossTypeId",e.FIRST_DOOR_TYPE="firstDoorTypeId",e.ANGLE_DEGREE="angleDegree",e.TEXTURE_ANGLE_DEGREE="textureAngleDegree",e.TEXTURE_PAVING_STYLE="texturePavingStyle",e.SECTION_TEXTURE_ANGLE_DEGREE="sectionTextureAngleDegree",e.SPLIT_DOOR_POSITIONS="positions",e.MATERIAL_ID="materialId",e.WINDOW_BGID="windowBgId",e.TOP_RAIL_BGID="topRailBgId",e.BOTTOM_RAIL_BGID="bottomRailBgId",e.LEFT_RAIL_BGID="leftRailBgId",e.RIGHT_RAIL_BGID="rightRailBgId",e.FIRST_WINDOW_POSITION="firstWindowPosition",e.SINGLE_WINDOW_PLACE="singleWindowPlace",e.SLIDING_WINDOW_TYPE="slidingWindowType",e.CELL_POSITION="cellPosition",e.GAUZE_BGID="gauzeBgId",e.UNITED_MATERIAL="unitedMaterialBrandGoodId",e.SLIDING_DOOR_SERIES="slidingDoorSeries",e.FIT="fit",e.PLACE_TYPE="placeType",e.MOLDING_PANEL_SIZE="size",e.MOLDING_TZ="TZ",e.MOLDING_TZT="TZT",e.FAUCET_CONNECTOR_PATH="faucetConnectorPath",e.FAUCET_CONNECTOR_OTHER_PATH="faucetConnectorOtherPath",e.MOLDING_LX="LX",e.MOLDING_LY="LY",e.MOLDING_LZ="LZ",e.COUNTERTOP_HOLES="countertopHoles",e.MOLDING_TYPE="moldingType",e.MOLDING_FRONT_PROFILE_ID="frontprofiledataid",e.MOLDING_BACK_PROFILE_ID="backprofiledataid",e.MOLDING_WRAP_EDGE="wrapEdge",e.MOLDING_PROFILE_ID="profiledataid",e.MOLDING_HOLE_PROFILE_ID="holeprofiledataid",e.MOLDING_HOLE_PATH_PROFILE_ID="profiledataid",e.MOLDING_EXTRUSION_HEIGHT="extrusionHeight",e.MOLDING_UNDERBOARDING_HEIGHT="underboardingHeight",e.MOLDING_FRONT_PROFILE_HEIGHT="frontProfileScaleHeight",e.MOLDING_BACK_PROFILE_HEIGHT="backProfileScaleHeight",e.MOLDING_PROFILE_HEIGHT="profileScaleHeight",e.PROCESS_RULE_ID="processRuleId",e.HEAD_INDENT="headIndent",e.TAIL_INDENT="tailIndent",e.HEAD_INSTALL_ANGLE="headInstallAngle",e.TAIL_INSTALL_ANGLE="tailInstallAngle",e.SPEC_FRONT_WATER_RETAINER="specFrontWaterRetainer",e.SKETCH_BACK_WATER_RETAINER="sketchBWRPaths",e.MOLDING_PROFILE_FRONT_OFFSET="profileFrontOffset",e.MOLDING_PROFILE_BACK_OFFSET="profileBackOffset",e.MOLDING_PROFILE_LEFT_OFFSET="profileLeftOffset",e.MOLDING_PROFILE_RIGHT_OFFSET="profileRightOffset",e.SIZE_CONTAIN_WATER_RETAINER="sizeContainWaterRetainer",e.HEIGHT_OFFSET="heightOffset",e.INSTALL_MODE="installMode",e.VERTICAL_INSTALL_MODE="verticalMoldingInstallMode",e.SIDE_SKIRT_INPUTS="sideSkirtInputs",e.MOLDING_HEIGHT="moldingHeight",e.MOLDING_HEIGHT_ZERO="moldingHeightZero",e.MOLDING_BASE_TYPE="moldingBaseType",e.MODE="mode",e.ALIGN_MODE="alignMode",e.MOLDING_MODE="mode",e.SKETCH_PATH="paramCornerPath",e.PATH="path",e.COUNT="count",e.ORIGINAL_MOLDING_AREA="originalMoldingArea",e.ORIGINAL_BOTTOM_MOLDING_AREAS="originalBottomMoldingAreas",e.MOLDING_AREA="moldingArea",e.MOLDING_PATH="moldingPath",e.HOLE_RELATIONS="holeRelations",e.CUT_POINTS="cutPoints",e.CORNER_CUT_POINTS="cornerCutPoints",e.CUT_MOLDING_PATH="cutMoldingPath",e.MOLDING_VERSION="moldingVersion",e.DIRECTION_X="directionx",e.NORMAL="normal",e.START="start",e.LEFT_INDENTATION_LENGTH="leftIndentationLength",e.RIGHT_INDENTATION_LENGTH="rightIndentationLength",e.CONNECTION_LINES="connectionLines",e.CONNECT_MODELS="connectedParamModels",e.OVER_SIDE_LEFT="overSideLeft",e.OVER_SIDE_RIGHT="overSideRight",e.OVER_SIDE_BOTTOM="overSideBottom",e.OVER_SIDE_TOP="overSideTop",e.OVER_SIDE_INSET="overSideInset",e.TRIM_LEFT="trimLeft",e.TRIM_RIGHT="trimRight",e.TRIM_BOTTOM="trimBottom",e.TRIM_TOP="trimTop",e.WIDTH="W",e.DEPTH="D",e.HEIGHT="H",e.OFF_GROUND="offGround",e.MATERIAL_BRAND_GOOD_ID="materialBrandGoodId",e.MATERIAL_BRAND_GOOD_ID_B="materialBrandGoodIdB",e.MATERIAL_BRAND_GOOD_ID_GLASS="materialBrandGoodIdGlass",e.MATERIAL_BRAND_GOOD_ID_BOTTOM_GLASS="materialBrandGoodIdBottomGlass",e.MATERIAL_BRAND_GOOD_ID_GAUZE="materialBrandGoodIdGauze",e.MATERIAL_BRAND_GOOD_ID_ALBAR="materialBrandGoodIdAlBar",e.MATERIAL_BRAND_GOOD_ID_LINE="materialBrandGoodIdLine",e.LV_LOCK_MATERIAL="SJCZ",e.LV_HANDEL_MATERIAL="CZ",e.FIXED_GLASS_CRAFTS="crafts",e.DW_PRODUCE="produce",e.DW_FITTING="dwFitting",e.SIMPLE_CONNECTORS="simpleConnectors",e.ROTATE_Z="rotateZ",e.FAUCET_POSITION="position",e.FAUCET_ROTATE="rotate",e.TEXTURE_SIZE="textureSize",e.TEXTURE_OFFSET="textureOffset",e.WIDTH_1="W1",e.WIDTH_2="W2",e.WIDTH_3="W3",e.WALL_THICKNESS_1="wallThickness1",e.WALL_THICKNESS_2="wallThickness2",e.WALL_THICKNESS_3="wallThickness3",e.OUTSIDE_1="outside1",e.OUTSIDE_2="outside2",e.OUTSIDE_3="outside3",e.WINDOW_OPEN_DIRECTION="windowOpenDirection",e.DOOR_OPEN_DIRECTION="doorOpenDirection",e.PUSH_OR_PULL="pushOrPull",e.INSTALL_POSITION="installPosition",e.INSTALL_POSITION_OFFSET="installPositionOffset",e.INSTALL_SURFACE="installSurface",e.INSTALL_ROTATE="installRotate",e.INSTALL_DEPTH="depthOffset",e.MARGIN="margin",e.RELATIVE_POSITION="relativePosition",e.OUT_POLYGONS="outpolygons",e.PLANK_PATH="plankPath",e.BRUSH_MATERIAL_BGID="brushMaterialBgId",e.BOTTOM_BRUSH_MATERIAL_BGID="bottomBrushMaterialBgId",e.MOLDING_EXPORT="export",e.JOINT_TYPE="jointtype",e.START_ROTATE="startRotate",e.START_ROTATE_AXIS="startRotateAxis",e.END_ROTATE="endRotate",e.END_ROTATE_AXIS="endRotateAxis",e.BORDER_ALIGNMENT="borderAlignment",e.SERIES="series",e.HOLE="hole",e.LINKED_HOLE="linkedHole",e.REGION3D="region3d",e.SEGMENTATION_DATA="segmentationData",e.BKX1="BKX1",e.BKX2="BKX2",e.BKX3="BKX3",e.BKY1="BKY1",e.BKY2="BKY2",e.BKY3="BKY3",e.BKY4="BKY4",e.BKNZHX="BKNZHX",e.BKNZHY="BKNZHY",e.BKWZHX="BKWZHX",e.BKWZHY="BKWZHY",e.BKBSX="BKBSX",e.BKBSY="BKBSY",e.BKSSX="BKSSX",e.BKSSY="BKSSY",e.HTX1="HTX1",e.HTX2="HTX2",e.STX1="STX1",e.STX2="STX2",e.BSX1="BSX1",e.BSX2="BSX2",e.BSY1="BSY1",e.BSY2="BSY2",e.SSX1="SSX1",e.SSX2="SSX2",e.SSY1="SSY1",e.SSY2="SSY2",e.ZHX1="ZHX1",e.ZHX2="ZHX2",e.ZHY1="ZHY1",e.ZHY2="ZHY2",e.ZHY3="ZHY3",e.ZHBSX="ZHBSX",e.ZHBSY="ZHBSY",e.ZHSSX="ZHSSX",e.ZHSSY="ZHSSY",e.ZHFHX="ZHFHX",e.ZHFHY="ZHFHY",e.YTX1="YTX1",e.YTX2="YTX2",e.YTY1="ZHY1",e.PZHX="PZHX",e.PZHY="PZHY",e.BLADES_POSITION="bladesPosition",e.BSNWKQ="BSNWKQ",e.BSKCFX="BSKCFX",e.SSNWKQ="SSNWKQ",e.SSKCFX="SSKCFX",e.DSGX="DSGX",e.DSGY="DSGY",e.ESGX1="ESGX1",e.ESGX2="ESGX2",e.ESGY1="ESGY1",e.ESGY2="ESGY2",e.SSGX1="SSGX1",e.SSGX2="SSGX2",e.SSGX3="SSGX3",e.SSGY1="SSGY1",e.SSGY2="SSGY2",e.SSGY3="SSGY3",e.DXGX="DXGX",e.EXGX1="EXGX1",e.EXGX2="EXGX2",e.SXGX1="SXGX1",e.SXGX2="SXGX2",e.SXGX3="SXGX3",e.GG="GG",e.TXX="TXX",e.TXY="TXY",e.TXY2="TXY2",e.SWDJ="SWDJ",e.DJGD="DJGD",e.ZL_TCK_X="ZL_TCK_X",e.ZL_TCK_Y="ZL_TCK_Y",e.FL_TCK_X="FL_TCK_X",e.TCK_TCBSK_X="TCK_TCBSK_X",e.TCK_TCBSK_Y="TCK_TCBSK_Y",e.TCBSK_BL_X="TCBSK_BL_X",e.TCBSK_BL_Y="TCBSK_BL_Y",e.HEIGHT_1="H1",e.HEIGHT_2="H2",e.CTCS_QD="CTCS_QD",e.CTCS_MBTS="CTCS_MBTS",e.DESIGN="design",e.WINDOW_RATIO="windowRatio",e.CRACK_WIDTH="crackWidth",e.WINDOW_FRAME_RAIL_BGID="windowFrameRailBgId",e.GAUZE_FRAME_RAIL_BGID="gauzeFrameRailBgId",e.TOP_PROFILE_BGID="topProfileBgId",e.BOTTOM_PROFILE_BGID="bottomProfileBgId",e.LEFT_PROFILE_BGID="leftProfileBgId",e.RIGHT_PROFILE_BGID="rightProfileBgId",e.WINDOW_PUSH_OR_PULL="windowPushOrPull",e.GAUZE_PUSH_OR_PULL="gauzePushOrPull",e.BEND_PROPERTIES="bendProperties",e.MOVABLE_FAN_WIDTH="movableFanWidth",e.IMPORT_BRAND_GOOD_ID="importBrandGoodId",e.PLATE_SPECIFIC="plateSpecific",e.LINE_PARAMS="lineParams",e.WALLPAVING_DIRECTION="wallPavingDirection",e.WALL_ID="wallId",e.QZJX="QZJX",e.QYJX="QYJX",e.QTJX="QTJX",e.QDJX="QDJX",e.HZJX="HZJX",e.HYJX="HYJX",e.HTJX="HTJX",e.HDJX="HDJX",e.HOLE_RELATION="holeRelation",e.QS="QS",e.HS="HS",e.LEFT_WIDTH="leftWidth",e.RIGHT_WIDTH="rightWidth",e.QBH="QBH",e.QBK="QBK",e.QCZJ="QCZJ",e.YCZJ="YCZJ",e.HCZJ="HCZJ",e.ZCZJ="ZCZJ",e.QGTCS="QGTCS",e.CLIENT_INFO="clientInfo",e.CUTTING_TYPE="cuttingType",e.CUTTING_INFO="cuttingInfo",e.BJHD="BJHD",e.NSYW="NSYW",e.EMBED="embed",e.QJJ="wallCornerAngle",e.WRAPPER_TYPE="wrapperType",e.AZ="installationMethod",e.COVER="cover",e.LIGHT_TYPE="lightType",e.LIGHT_POSITION="lightPosition",e.LIGHT_WIDTH="lightWidth",e.NON_HORIZONAL_COUNTERTOP_NEW_DOUBLE_SIDE_BLOCK_TYPE="verticalCountertopBlockType",e.NON_HORIZONAL_COUNTERTOP_DOUBLE_SIDE_WIDTH="bothSidesVisibleWidth",e.NON_HORIZONAL_COUNTERTOP_TYPE="verticalCountertopType",e.IS_STRETCH="isStretch",e.MATERIAL_PART="paramMeshInstance",e.COUNTERTOP_BUCKLE="buckleBlockInput",e.FASTENER_INPUT="fastenerInput"}(n||(n={}));var i=n;t.default=i},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.AssemblyType=void 0,t.AssemblyType=n,function(e){e[e.Cabinet=0]="Cabinet",e[e.Wardrobe=1]="Wardrobe"}(n||(t.AssemblyType=n={}))},function(e,t,r){"use strict";var n;function i(e,t){var r=n;delete r[r[e]],r[e]=t,r[t]=e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.setParamAssemblyType=function(e){i("PARAM_ASSEMBLY",e)},t.setParamEntityType=function(e){i("PARAM_ENTITY",e)},t.setParamFurnitureType=function(e){i("PARAM_FURNITURE",e)},t.setParamVirtualType=function(e){i("PARAM_VIRTUAL",e)},function(e){e[e.PARAM_ENTITY=1]="PARAM_ENTITY",e[e.PARAM_FURNITURE=2]="PARAM_FURNITURE",e[e.PARAM_PRIMITIVE=3]="PARAM_PRIMITIVE",e[e.PARAM_VIRTUAL=4]="PARAM_VIRTUAL",e[e.PARAM_ASSEMBLY=5]="PARAM_ASSEMBLY"}(n||(n={}));var o=n;t.default=o},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,function(e){e[e.DEFAULT=-1]="DEFAULT",e[e.VALUE=0]="VALUE",e[e.FORMULA=1]="FORMULA"}(n||(n={}));var i=n;t.default=i},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,function(e){e[e.DOOR_HOLE=0]="DOOR_HOLE",e[e.FACE_PARAMMODEL=1]="FACE_PARAMMODEL",e[e.DIVISION_PARAMMODEL=2]="DIVISION_PARAMMODEL",e[e.NEW_DOOR_HOLE=3]="NEW_DOOR_HOLE",e[e.DRAWING_HOLE=5]="DRAWING_HOLE"}(n||(n={}));var i=n;t.default=i},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,function(e){e[e.FRONT_END=0]="FRONT_END",e[e.EDITOR=1]="EDITOR"}(n||(n={}));var i=n;t.default=i},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,function(e){e[e.UNDEFIND=-1]="UNDEFIND",e[e.SPACE=0]="SPACE",e[e.CENTER=1]="CENTER",e[e.LEFT_FRONT_DOWN=2]="LEFT_FRONT_DOWN",e[e.LEFT_BACK_DOWN=3]="LEFT_BACK_DOWN"}(n||(n={}));var i=n;t.default=i},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,function(e){e[e.DEFAULT=0]="DEFAULT",e[e.LENGTH=1]="LENGTH",e[e.AREA=2]="AREA",e[e.NUMBER=3]="NUMBER"}(n||(n={}));var i=n;t.default=i},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Face=t.ALL_AROUND_FACE3=t.ALL_AROUND_FACE2=void 0,t.Face=n,function(e){e.LEFT="left",e.RIGHT="right",e.BOTTOM="bottom",e.TOP="top",e.BACK="back",e.FRONT="front"}(n||(t.Face=n={}));var i=[n.LEFT,n.RIGHT,n.TOP,n.BOTTOM,n.FRONT,n.BACK];t.ALL_AROUND_FACE3=i;var o=[n.LEFT,n.RIGHT,n.TOP,n.BOTTOM];t.ALL_AROUND_FACE2=o},function(e,t,r){"use strict";var n,i,o,A,a,s,u,c,l,g,f,h,p;Object.defineProperty(t,"__esModule",{value:!0}),t.SwingOpenDirection=t.PushDirecton=t.PlaceType=t.OpenDirection=t.LocationType=t.InstallType=t.InstallSurfaceType=t.HandrailInstallType=t.GridOpenDirection=t.DoorType=t.DoorOpenDirection=t.CoverType=t.BorderAlignment=void 0,t.getEnumIndex=function(e){return Object.keys(e).map((function(e){return parseInt(e,10)})).filter((function(e){return!isNaN(e)}))},t.getEnumNames=function(e){return Object.keys(e).filter((function(e){return isNaN(parseInt(e,10))}))},t.InstallSurfaceType=n,function(e){e[e.LEFT=0]="LEFT",e[e.RIGHT=1]="RIGHT"}(n||(t.InstallSurfaceType=n={})),t.DoorOpenDirection=i,function(e){e[e.LEFT=0]="LEFT",e[e.RIGHT=1]="RIGHT",e[e.TOP=2]="TOP",e[e.BOTTOM=3]="BOTTOM",e[e.NONE=4]="NONE"}(i||(t.DoorOpenDirection=i={})),t.CoverType=o,function(e){e[e.INSIDE=0]="INSIDE",e[e.HALF_COVER=1]="HALF_COVER",e[e.FULL_COVER=2]="FULL_COVER"}(o||(t.CoverType=o={})),t.SwingOpenDirection=A,function(e){e[e.LEFT=0]="LEFT",e[e.RIGHT=1]="RIGHT",e[e.TOP=2]="TOP",e[e.BOTTOM=3]="BOTTOM",e[e.INCLOSEIN=4]="INCLOSEIN",e[e.NONE=5]="NONE",e[e.LEFT_TOP=6]="LEFT_TOP",e[e.LEFT_BOTTOM=7]="LEFT_BOTTOM",e[e.RIGHT_TOP=8]="RIGHT_TOP",e[e.RIGHT_BOTTOM=9]="RIGHT_BOTTOM"}(A||(t.SwingOpenDirection=A={})),t.GridOpenDirection=a,function(e){e[e.LEFT=0]="LEFT",e[e.RIGHT=1]="RIGHT",e[e.NONE=2]="NONE"}(a||(t.GridOpenDirection=a={})),t.PushDirecton=s,function(e){e[e.PUSH=0]="PUSH",e[e.PULL=1]="PULL"}(s||(t.PushDirecton=s={})),t.DoorType=u,function(e){e[e.DOOR=0]="DOOR",e[e.DRAWER_PANEL=1]="DRAWER_PANEL"}(u||(t.DoorType=u={})),t.OpenDirection=c,function(e){e[e.LEFT=0]="LEFT",e[e.RIGHT=1]="RIGHT",e[e.TOP=2]="TOP",e[e.BOTTOM=3]="BOTTOM",e[e.NONE=4]="NONE"}(c||(t.OpenDirection=c={})),t.LocationType=l,function(e){e[e.ABOVE_BOARD=0]="ABOVE_BOARD",e[e.BELOW_BOARD=1]="BELOW_BOARD",e[e.HANGING=2]="HANGING",e[e.UPON_FLOOR=3]="UPON_FLOOR",e[e.UPON_MODEL=4]="UPON_MODEL"}(l||(t.LocationType=l={})),t.PlaceType=g,function(e){e[e.LOCATION=0]="LOCATION",e[e.FIT=1]="FIT"}(g||(t.PlaceType=g={})),t.BorderAlignment=f,function(e){e[e.OUTER=1]="OUTER",e[e.CENTER=2]="CENTER",e[e.INNER=3]="INNER",e[e.OUTERHANG=4]="OUTERHANG",e[e.INNERHANG=5]="INNERHANG"}(f||(t.BorderAlignment=f={})),t.InstallType=h,function(e){e[e.OUTER_HANG=0]="OUTER_HANG",e[e.INNER_HANG=1]="INNER_HANG"}(h||(t.InstallType=h={})),t.HandrailInstallType=p,function(e){e[e.INNER_FRAME=0]="INNER_FRAME",e[e.OUTER_FRAME=1]="OUTER_FRAME"}(p||(t.HandrailInstallType=p={}))},function(e,t,r){"use strict";var n,i;Object.defineProperty(t,"__esModule",{value:!0}),t.IntersectType=t.IntersectArea=void 0,t.IntersectArea=n,function(e){e.BOX="box",e.MESH="mesh"}(n||(t.IntersectArea=n={})),t.IntersectType=i,function(e){e.STATIC="static",e.DYNAMIC="dynamic"}(i||(t.IntersectType=i={}))},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.EVersionType=void 0,t.EVersionType=n,function(e){e.Root="Root",e.Child="Child",e.Accessory="Accessory",e.Template="Template",e.Ref="Ref",e.Custom="Custom",e.Design="Design"}(n||(t.EVersionType=n={}))},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,function(e){e[e.ORIGIN=0]="ORIGIN",e[e.CENTER=1]="CENTER",e[e.LEFT_BACK_BOTTOM=2]="LEFT_BACK_BOTTOM",e[e.LEFT_BACK_TOP=3]="LEFT_BACK_TOP",e[e.LEFT_FRONT_BOTTOM=4]="LEFT_FRONT_BOTTOM",e[e.LEFT_FRONT_TOP=5]="LEFT_FRONT_TOP",e[e.RIGHT_BACK_BOTTOM=6]="RIGHT_BACK_BOTTOM",e[e.RIGHT_BACK_TOP=7]="RIGHT_BACK_TOP",e[e.RIGHT_FRONT_BOTTOM=8]="RIGHT_FRONT_BOTTOM",e[e.RIGHT_FRONT_TOP=9]="RIGHT_FRONT_TOP",e[e.BACK_CENTER=10]="BACK_CENTER",e[e.FRONT_CENTER=11]="FRONT_CENTER"}(n||(n={}));var i=n;t.default=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TOLERANCE=t.SIZE_TOLERANCE=t.SIN_THETA_ZERO_TOLERANCE=t.RADIANS_TOLERANCE=t.NUMBER_TOLERANCE=t.DISTANCE_TOLERANCE=t.DEGREES_TOLERANCE=void 0;var n=r(3);t.NUMBER_TOLERANCE=1e-6;t.SIZE_TOLERANCE=.1;t.DISTANCE_TOLERANCE=1;t.DEGREES_TOLERANCE=1;var i=Math.PI/180;t.RADIANS_TOLERANCE=i;var o=Math.sin(i);t.SIN_THETA_ZERO_TOLERANCE=o;var A=new n.Tolerance.Tolerance(Math.cos(i),1,1e-6);t.TOLERANCE=A},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PhysicalModel=void 0;var n=r(3),i=r(322),o=v(r(188)),A=v(r(141)),a=v(r(361)),s=v(r(68)),u=v(r(98)),c=v(r(207)),l=v(r(530)),g=v(r(44)),f=v(r(113)),h=v(r(16)),p=v(r(5)),d=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==w(e)&&"function"!=typeof e)return{default:e};var r=B(t);if(r&&r.has(e))return r.get(e);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var A=i?Object.getOwnPropertyDescriptor(e,o):null;A&&(A.get||A.set)?Object.defineProperty(n,o,A):n[o]=e[o]}n.default=e,r&&r.set(e,n);return n}(r(99)),I=r(349),y=r(698),C=r(1071),E=r(1939);function B(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(B=function(e){return e?r:t})(e)}function v(e){return e&&e.__esModule?e:{default:e}}function m(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(i=n.key,o=void 0,o=function(e,t){if("object"!==w(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==w(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(i,"string"),"symbol"===w(o)?o:String(o)),n)}var i,o}function Q(e,t){return(Q=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function b(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=S(e);if(t){var i=S(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _(this,r)}}function _(e,t){if(t&&("object"===w(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function S(e){return(S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function w(e){return(w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var D,R,M,x,P,T,F,O,L,N,k,G=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":w(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},U=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":w(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},j=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Q(e,t)}(A,e);var t,r,i,o=b(A);function A(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,A),(e=o.call(this)).position=new p.default(0,0,0),e.rotation=new p.default(0,0,0),e.scale=new p.default(1,1,1),e.size=new p.default(1,1,1),e.translation=new p.default,e.center=new p.default,e}return t=A,(r=[{key:"getBoundingBox2",value:function(){return this.getBox2().getBoundingBox()}},{key:"getBoundingBox3",value:function(){return this.getBox3().getBoundingBox()}},{key:"getPolygon",value:function(){return this.getBox2().getPolygon()}},{key:"getBox2",value:function(){return this.box2||(this.box2=new a.default(new h.default(this.getScaledSize()),new h.default(this.getPosition()),this.getRotation().z)),this.box2}},{key:"getBox3",value:function(){return this.box3||(this.box3=new s.default(this.getScaledSize(),this.getPosition(),this.getRotation())),this.box3}},{key:"getMatrix4",value:function(){return this.matrix4||(this.matrix4=(new g.default).compose(this.getPosition(),(new u.default).setFromVector3(this.getRotation()),this.getScale())),this.matrix4}},{key:"setMatrix4",value:function(e){var t=new p.default,r=new u.default(0,0,0),n=new p.default;e.decompose(t,r,n),this.position=t,this.rotation=(new p.default).setXYZ(r),this.scale=n}},{key:"getConcatenatedMatrix",value:function(){return this.getMatrix4()}},{key:"getConcatenatedBox3",value:function(){return this.getBox3()}},{key:"getMatrix3",value:function(){return this.matrix3||(this.matrix3=(new l.default).compose(new h.default(this.getPosition()),this.getRotation().z,new h.default(this.getScale()))),this.matrix3}},{key:"getTop",value:function(){return this.position.z+this.getScaledSize().z/2}},{key:"getBottom",value:function(){return this.position.z-this.getScaledSize().z/2}},{key:"getHeightRange",value:function(){return new c.default(this.getBottom(),this.getTop())}},{key:"getScaledSize",value:function(){return p.default.mul(this.getSize(),this.getScale())}},{key:"getScale",value:function(){return this.scale}},{key:"setScale",value:function(e){if((0,C.equalsNumber3)(this.scale,e))return this;var t=Object.assign(Object.assign({},this.scale),e),r=(0,C.checkNotZero)(t.x),n=(0,C.checkNotZero)(t.y),i=(0,C.checkNotZero)(t.z),o=(0,C.hackScaleValue)(r),A=(0,C.hackScaleValue)(n),a=(0,C.hackScaleValue)(i);return this.scale=new p.default(o,A,a),o===r&&A===n&&a===i||I.LOGGER.logError(new Error("illegal setScale ".concat(this.getId(),",error val is x:").concat(r,",y:").concat(n,",z:").concat(i))),this}},{key:"getSize",value:function(){return this.size}},{key:"setSize",value:function(e){if((0,C.equalsNumber3)(this.size,e))return this;var t=Object.assign(Object.assign({},this.size),e),r=t.x,n=t.y,i=t.z;return this.size=new p.default((0,C.hackSizeValue)(r),(0,C.hackSizeValue)(n),(0,C.hackSizeValue)(i)),this}},{key:"getRotation",value:function(){return this.rotation}},{key:"setRotation",value:function(e){return(0,C.equalsNumber3)(this.rotation,e)||(this.rotation=new p.default(Object.assign(Object.assign({},this.rotation),e))),this}},{key:"getPosition",value:function(){return this.position}},{key:"setPosition",value:function(e){if((0,C.equalsNumber3)(this.position,e))return this;var t=e.x,r=e.y,n=e.z;return void 0!==t&&(0,y.checkNumberAndLog)(t,"setPositionX"),void 0!==r&&(0,y.checkNumberAndLog)(r,"setPositionY"),void 0!==n&&(0,y.checkNumberAndLog)(n,"setPositionZ"),this.position=new p.default(Object.assign(Object.assign({},this.position),e)),this}},{key:"getTranslation",value:function(){return this.translation}},{key:"setTranslation",value:function(e){return this.translation=e,this}},{key:"getCenter",value:function(){return this.center}},{key:"setCenter",value:function(e){return this.center=e,this}},{key:"isSizeNaN",value:function(){return isNaN(this.size.x)||isNaN(this.size.y)||isNaN(this.size.z)}},{key:"isScaled",value:function(){return!this.scale.nearEquals(p.default.ONE)}},{key:"localToGlobal",value:function(e){var t=this.getConcatenatedMatrix(),r=e.clone();return r.applyMatrix4(t),r}},{key:"globalToLocal",value:function(e){var t=(new g.default).getInverse(this.getConcatenatedMatrix()),r=e.clone();return r.applyMatrix4(t),r}},{key:"globalToLocal2d",value:function(e){var t=e.clone(),r=new p.default(t.x,t.y,0),i=this.globalToLocal(r);return new n.Point2d(i.x,i.y)}},{key:"localToGlobal2d",value:function(e){var t=e.clone(),r=new p.default(t.x,t.y,0),i=this.localToGlobal(r);return new n.Point2d(i.x,i.y)}},{key:"afterSet",value:function(e,t,r){t===E.ModelPropertyType.Physical&&(this.matrix3=void 0,this.matrix4=void 0,this.box3=void 0,this.box2=void 0)}}])&&m(t.prototype,r),i&&m(t,i),Object.defineProperty(t,"prototype",{writable:!1}),A}(d.default);t.PhysicalModel=j,G([(0,d.property)(p.default.isEqual,E.ModelPropertyType.Physical),U("design:type","function"==typeof(D=void 0!==p.default&&p.default)?D:Object)],j.prototype,"position",void 0),G([(0,d.property)(p.default.isEqual,E.ModelPropertyType.Physical),U("design:type","function"==typeof(R=void 0!==p.default&&p.default)?R:Object)],j.prototype,"rotation",void 0),G([(0,d.property)(p.default.isEqual,E.ModelPropertyType.Physical),U("design:type","function"==typeof(M=void 0!==p.default&&p.default)?M:Object)],j.prototype,"scale",void 0),G([(0,d.property)(p.default.isEqual,E.ModelPropertyType.Physical),U("design:type","function"==typeof(x=void 0!==p.default&&p.default)?x:Object)],j.prototype,"size",void 0),G([(0,d.property)(p.default.isEqual),U("design:type","function"==typeof(P=void 0!==p.default&&p.default)?P:Object)],j.prototype,"translation",void 0),G([(0,d.property)(p.default.isEqual),U("design:type","function"==typeof(T=void 0!==p.default&&p.default)?T:Object)],j.prototype,"center",void 0),G([i.returnImmutable,U("design:type",Function),U("design:paramtypes",[]),U("design:returntype","function"==typeof(F=void 0!==o.default&&o.default)?F:Object)],j.prototype,"getBoundingBox2",null),G([i.returnImmutable,U("design:type",Function),U("design:paramtypes",[]),U("design:returntype","function"==typeof(O=void 0!==A.default&&A.default)?O:Object)],j.prototype,"getBoundingBox3",null),G([i.returnImmutable,U("design:type",Function),U("design:paramtypes",[]),U("design:returntype","function"==typeof(L=void 0!==f.default&&f.default)?L:Object)],j.prototype,"getPolygon",null),G([i.returnImmutable,U("design:type",Function),U("design:paramtypes",[]),U("design:returntype",void 0)],j.prototype,"getBox2",null),G([i.returnImmutable,U("design:type",Function),U("design:paramtypes",[]),U("design:returntype",void 0)],j.prototype,"getBox3",null),G([i.returnImmutable,U("design:type",Function),U("design:paramtypes",[]),U("design:returntype","function"==typeof(N=void 0!==p.default&&p.default)?N:Object)],j.prototype,"getScale",null),G([i.returnImmutable,U("design:type",Function),U("design:paramtypes",[]),U("design:returntype",void 0)],j.prototype,"getSize",null),G([i.returnImmutable,U("design:type",Function),U("design:paramtypes",[]),U("design:returntype","function"==typeof(k=void 0!==p.default&&p.default)?k:Object)],j.prototype,"getRotation",null),G([i.returnImmutable,U("design:type",Function),U("design:paramtypes",[]),U("design:returntype",void 0)],j.prototype,"getPosition",null),G([i.returnImmutable,U("design:type",Function),U("design:paramtypes",[]),U("design:returntype",void 0)],j.prototype,"getTranslation",null)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkNumberAndLog=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(void 0===e)return void n.LOGGER.logError(new Error("".concat(t," undefined number: ").concat(e)));if(!Number.isFinite(e))return void n.LOGGER.logError(new Error("".concat(t," Infinity number: ").concat(e)));if("string"==typeof e)return void n.LOGGER.logError(new Error("".concat(t," string number: ").concat(e)));if(isNaN(e))return void n.LOGGER.logError(new Error("".concat(t," NaN number: ").concat(e)))};var n=r(349)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkParam=c,t.checkParamAndLog=function(e,t,r){c(e,t)&&s(e,t,r)},t.checkParsedValue=l,t.checkParsedValueAndLog=function(e,t,r){l(e,t)&&s(e,t,r)},t.setOnCheckParamErrorCallBack=function(e){u=e};var n,i=r(2),o=r(10),A=r(349),a=(n=r(1069))&&n.__esModule?n:{default:n};function s(e,t,r){var n=r.action,i=r.oldValue,o=r.paramName;A.LOGGER.logError(new Error("action: ".concat(n," invalid ").concat(e," type value, paramName: ").concat(o,", value: ").concat(JSON.stringify(t),", ").concat(t,", oldValue: ").concat(i))),u(o,e,t,n)}var u=i.noop;function c(e,t){var r=!1;try{switch(e){case o.ParamType.FLOAT:var n=(0,a.default)(e,t);("number"!=typeof n||isNaN(n))&&(r=!0);break;case o.ParamType.INT:var A=(0,a.default)(e,t);("number"!=typeof A||isNaN(A))&&(r=!0),(0,i.isInteger)(A)&&!t.includes(".")||(r=!0);break;case o.ParamType.MATERIAL:case o.ParamType.SHAPE:var s=Number(t);(0,i.isInteger)(s)||(r=!0);break;case o.ParamType.BOOLEAN:"true"!==t&&"false"!==t&&(r=!0);break;case o.ParamType.STYLE:var u=(0,a.default)(e,t);"bgId"in u&&"versionId"in u||(r=!0),"number"==typeof u.bgId&&"number"==typeof u.versionId||(r=!0)}}catch(e){r=!0}return r}function l(e,t){var r=!1;try{switch(e){case o.ParamType.FLOAT:("number"!=typeof t||isNaN(t))&&(r=!0);break;case o.ParamType.INT:("number"!=typeof t||isNaN(t))&&(r=!0),(0,i.isInteger)(t)||(r=!0);break;case o.ParamType.MATERIAL:case o.ParamType.SHAPE:(0,i.isInteger)(Number(t))||(r=!0);break;case o.ParamType.BOOLEAN:"boolean"!=typeof t&&(r=!0);break;case o.ParamType.STYLE:"bgId"in t&&"versionId"in t||(r=!0),"number"==typeof t.bgId&&"number"==typeof t.versionId||(r=!0);break;case o.ParamType.STRING:"string"!=typeof t&&(r=!0)}}catch(e){r=!0}return r}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModelPropertyType=void 0;var n={Physical:Symbol("Physical"),Hole:Symbol("Hole"),NEED_CHANGED_EVENT:Symbol("NEED_CHANGED_EVENT")};t.ModelPropertyType=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParamBizProperty=void 0;var n=r(1941);function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(o=n.key,A=void 0,A=function(e,t){if("object"!==i(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"===i(A)?A:String(A)),n)}var o,A}var A=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.data=t,this.paramKey=t.key,this.namespace=t.namespace,this.name=t.name,this.value=t.value,this.valueType=t.valueType}var t,r,i;return t=e,(r=[{key:"getParsedValue",value:function(){switch(this.valueType){case n.ParamBizValueType.boolean:case n.ParamBizValueType.int:case n.ParamBizValueType.float:return JSON.parse(this.value);default:return this.value}}},{key:"getName",value:function(){return this.name}},{key:"getValue",value:function(){return this.value}},{key:"getParamKey",value:function(){return this.paramKey}},{key:"getData",value:function(){return this.data}}])&&o(t.prototype,r),i&&o(t,i),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.ParamBizProperty=A},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ParamBizValueType=void 0,t.ParamBizValueType=n,function(e){e.boolean="boolean",e.float="float",e.int="int"}(n||(t.ParamBizValueType=n={}))},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.RevitArc3Data=void 0,t.parseShape3=function(e){var t=new u.default,r=[],n=!0;if(e.curves.forEach((function(e){if("RevitLine3D"===e.type){var t=e;r.push(new s.default(p(t.start),p(t.end)))}else if("RevitArc3D"===e.type){var o=e,A=new i.default(p(o.position),p(o.xDirection),p(o.yDirection));r.push(new a.default(A,h(o.center),o.radius,o.startAngle,o.arcAngle)),Number.isFinite(o.startAngle)||(n=!1)}})),!n)return t;return t.setRevitCurves(r)},t.parseVector2=h,t.parseVector3=p;var i=c(r(242)),o=c(r(16)),A=c(r(5)),a=c(r(700)),s=c(r(517)),u=c(r(1077));function c(e){return e&&e.__esModule?e:{default:e}}function l(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(o=i.key,A=void 0,A=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!==n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"===n(A)?A:String(A)),i)}var o,A}function g(e,t,r){return t&&l(e.prototype,t),r&&l(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}var f=g((function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.type=""}));function h(e){return e?new o.default(e):void 0}function p(e){return e?new A.default(e):void 0}t.RevitArc3Data=f},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(723),i=r(78),o=r(112),A=r(340),a=r(102),s=r(16),u=function(){function e(e,t,r,n){this.center=e,this.radius=t,this.startAngle=r,this.arcAngle=n}return e.prototype.getAngleAtT=function(e){return this.startAngle+e*this.arcAngle},e.prototype.getPointAtT=function(e){return this.getPointByAngle(this.getAngleAtT(e))},e.prototype.getLengthAtT=function(e){var t=this.arcAngle;return this.radius*(Math.abs(t)*e)},e.prototype.getTByLength=function(e){var t=this.arcAngle;return e/this.radius/Math.abs(t)},e.prototype.getAngleByPoint=function(e){var t=this.getCircle().getAngle(e),r=this.getTByAngle(t);return this.getAngleAtT(r)},e.prototype.getTByAngle=function(e){var t=this.startAngle,r=this.arcAngle,n=A.default.normalize(e),i=A.default.normalize(t),o=A.default.normalize(t+r),a=!this.isClockwise(),s=i>o;if(s&&a||!s&&!a){var u=A.default.normalize(n-i);return u>Math.abs(r)&&(u=A.TWO_PI-u),u/Math.abs(r)}return(n-i)/r},e.prototype.getPointByAngle=function(e){var t=this.center,r=this.radius;return s.default.add(t,new s.default(r*Math.cos(e),r*Math.sin(e)))},e.prototype.isAngleInArc=function(e){var t=this.startAngle,r=this.arcAngle,n=A.default.normalize(e),i=A.default.normalize(t),o=A.default.normalize(t+r),a=Math.min(i,o),s=Math.max(i,o),u=r>0,c=i<o;return u&&c||!u&&!c?n>=a&&n<=s:n<=a||n>=s},e.prototype.getApproximatePoints=function(e){void 0===e&&(e=.3);var t=[],r=[new s.default(0,1)];if(0===this.radius||0===this.arcAngle)return t;for(;0!==r.length;){var n=r.pop(),i=.5*(n.x+n.y),A=new o.default(this.getPointAtT(n.x),this.getPointAtT(n.y)).signedDistanceFromPoint(this.getPointAtT(i));Math.abs(A)<e?t.push(this.getPointAtT(n.x)):r.push(new s.default(i,n.y),new s.default(n.x,i))}return t.push(this.getPointAtT(1)),t},e.prototype.getPointsByIncrement=function(e){if(e<=0)throw new Error("Increment must be greater than zero: "+e);var t,r=[];for(t=0;t<=1;t+=e)r.push(this.getPointAtT(t));return a.default.isEqual(t,1,.5*e)||r.push(this.getPointAtT(1)),r},e.prototype.getNearestPoint=function(e){var t=this.center,r=s.default.sub(e,t).angle();if(!this.isAngleInArc(r)){var n=this.getPointAtT(0),i=this.getPointAtT(1);return e.distance(n)<e.distance(i)?n:i}return this.getPointByAngle(r)},e.prototype.getPointSide=function(e){var t=this.center,r=this.radius,n=this.arcAngle,i=e.distance(t),o=-1;return a.default.isEqual(i,r)?o=0:i<r&&(o=1),0===(o*=Math.sign(n))?"ON_CURVE":o>0?"ON_LEFT":"ON_RIGHT"},e.prototype.getDistance=function(e,t){return void 0===t&&(t=!0),Math.abs(this.getSignedDistance(e,t))},e.prototype.getSignedDistance=function(e,t){var r;if(void 0===t&&(t=!0),t)r=this.getNearestPoint(e);else{var n=this.getAngleByPoint(e);r=this.getCircle().getPoint(n)}var i=e.distance(r);return"ON_LEFT"===this.getPointSide(e)?-i:i},e.prototype.isPointOnArcCurveInclusive=function(e,t){if(void 0===t&&(t=i.NUMBER_TOLERANCE),!this.getCircle().isPointOnCircle(e,t))return!1;var r=s.default.sub(e,this.center).angle();return this.isAngleInArc(r)},e.prototype.isPointOnArcCurveExclusive=function(e,t){return void 0===t&&(t=i.NUMBER_TOLERANCE),this.isPointOnArcCurveInclusive(e,t)&&!this.isPointOnArcEnds(e,t)},e.prototype.isPointOnArcEnds=function(e,t){return void 0===t&&(t=i.NUMBER_TOLERANCE),this.getPointAtT(0).nearEquals(e,t)||this.getPointAtT(1).nearEquals(e,t)},e.prototype.isClockwise=function(){return this.arcAngle<0},e.prototype.getBulge=function(){return Math.tan(this.arcAngle/4)},e.prototype.getCircle=function(){return new n.default(this.center,this.radius)},e.prototype.clone=function(){return new e(this.center.clone(),this.radius,this.startAngle,this.arcAngle)},e.fromChordAndBulge=function(t,r){var n=t.start,i=t.length(),o=t.getCenter(),a=Math.sign(r),u=a*r,c=4*Math.atan(u),l=i/2/Math.tan(c/2),g=t.getVector().rotate(a*A.HALF_PI).normalize(),f=s.default.add(o,g.mul(l)),h=s.default.sub(n,f);return new e(f,h.length(),h.angle(),a*c)},e}();t.default=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeShape3=function(e){return{curves:e.getRevitCurves().map((function(e){if(e instanceof o.default)return{start:a(e.getStartPoint()),end:a(e.getEndPoint()),type:"RevitLine3D"};if(e instanceof i.default){var t=e.getRectFace();return{center:(r=e.getCenter(),(0,n.pick)(r,"x","y")),radius:e.getRadius(),startAngle:e.getStartAngle(),arcAngle:e.getArcAngle(),position:a(t.origin),xDirection:a(t.directionU),yDirection:a(t.directionV),type:"RevitArc3D"}}var r}))}};var n=r(2),i=A(r(700)),o=A(r(517));function A(e){return e&&e.__esModule?e:{default:e}}function a(e){return(0,n.pick)(e,"x","y","z")}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FRACTION_DIGITS=void 0,t.formatParamValue=function(e,t){switch(e){case i.default.FLOAT:return function(e){return e+""}(t);case i.default.FLOAT2:return function(e){return e.x+","+e.y}(t);case i.default.FLOAT3:return A(t);case i.default.FLOAT3_BUFFER:return function(e){var t=e.length,r=t?A(e[--t]):"";for(;t;)r=A(e[--t])+";"+r;return r}(t);case i.default.INT:return function(e){return e.toFixed()}(t);case i.default.BOOLEAN:return function(e){return e+""}(t);case i.default.FIT:case i.default.STYLE:return function(e){return JSON.stringify(e)}(t);case i.default.BOOLEAN_LIST:return function(e){return parseInt((0,o.reverseStr)(e),2).toString()}(t);default:return t}};var n,i=(n=r(514))&&n.__esModule?n:{default:n},o=r(1070);function A(e){return e.x+","+e.y+","+e.z}t.FRACTION_DIGITS=1},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i=r(21),o=r(2),A=(n=r(514))&&n.__esModule?n:{default:n},a=r(350);function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,A,a=[],s=!0,u=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=o.call(r)).done)&&(a.push(n.value),a.length!==t);s=!0);}catch(e){u=!0,i=e}finally{try{if(!s&&null!=r.return&&(A=r.return(),Object(A)!==A))return}finally{if(u)throw i}}return a}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return c(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(i=n.key,o=void 0,o=function(e,t){if("object"!==s(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(i,"string"),"symbol"===s(o)?o:String(o)),n)}var i,o}var g=new(function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.logParamsStore={},this.saveLog=(0,o.debounce)((function(){i.Util.safeExec((function(){var e=Object.values(t.logParamsStore);if(e.length){var r=function(e){var t="",r=[];return e.forEach((function(e){r.push(e.modelId+(e.rootModelId?">"+e.rootModelId:"")),t+="".concat(e.modelName," ").concat(e.rootModelName?">"+e.rootModelName:""," 参数变化 {"),Object.entries(e.paramStore).forEach((function(e){var r=u(e,2),n=r[0],i=r[1],o=i.preVal,A=i.nextVal;t+="".concat(n,": ").concat(o," to ").concat(A,"; ")})),t+="}"})),{logContent:t,modelIds:r}}(e),n=r.modelIds,o=r.logContent;(0,i.getLocalLogger)().add({module:"params",logLevel:i.LocalLogLevel.Info,entityIds:n,type:i.LogType.Data,content:o})}t.logParamsStore={}}),!1)}),200)}var t,r,n;return t=e,(r=[{key:"isEqual",value:function(e,t,r){return e.type!==A.default.FLOAT&&e.type!==A.default.INT||t.type!==A.default.FLOAT&&t.type!==A.default.INT||isNaN(Number(e.value))||isNaN(Number(t.value))?(0,a.compareParamData)(e,t):Math.abs(Number(e.value)-Number(t.value))<r}},{key:"collectParams",value:function(e,t,r){var n=this;i.Util.safeExec((function(){if(r&&!n.isEqual(e,t,.1)){var i=r.getId(),o=r.getRoot(),A=t.name;n.logParamsStore[i]||(n.logParamsStore[i]={modelId:i,modelName:r.getName(),rootModelId:o!==r?o.getId():void 0,rootModelName:o!==r?o.getName():void 0,paramStore:{}}),n.logParamsStore[i].paramStore[A]||(n.logParamsStore[i].paramStore[A]={preVal:e.value,nextVal:t.value}),n.logParamsStore[i].paramStore[A]&&(n.logParamsStore[i].paramStore[A].nextVal=t.value)}}),!1)}}])&&l(t.prototype,r),n&&l(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}());t.default=g},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.COMMON_OVERRIDE_ATTR_KEY=void 0,t.delCommonOverrideData=function(e,t,r){var o=u(e)||{},a=o[t];if(!a)return;return(0,n.remove)(a,(function(e){return Object.entries(r).every((function(t){var r=A(t,2),n=r[0];return r[1]===e[n]}))})),0===Object.keys(o).length||Object.values(o).every((function(e){return 0===e.length}))?(0,i.del)(e,"commonOverrideAttr"):(0,i.set)(e,"commonOverrideAttr",JSON.stringify(o))},t.getCommonOverrideData=u,t.setCommonOverrideData=function(e,t){var r=u(e);if(!r)return(0,i.set)(e,"commonOverrideAttr",JSON.stringify(t));var a=Object.assign({},r);function s(e,t){var r=o(e);return r.reverse(),(0,n.uniqBy)(r,(function(e){return JSON.stringify(t.map((function(t){return e[t]})))})).reverse()}return Object.entries(t).forEach((function(e){var t,r=A(e,2),n=r[0],i=r[1];a[n]?(t=a[n]).push.apply(t,o(i)):a[n]=i})),Object.entries(a).forEach((function(e){var t=A(e,2),r=t[0],n=t[1];"modelAttr"===r?a[r]=s(n,["attrName","setBizType"]):"modelParamAttr"===r&&(a[r]=s(n,["attrName","attrName","setBizType"]))})),(0,i.set)(e,"commonOverrideAttr",JSON.stringify(a))};var n=r(2),i=r(1948);function o(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||a(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function A(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,A,a=[],s=!0,u=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=o.call(r)).done)&&(a.push(n.value),a.length!==t);s=!0);}catch(e){u=!0,i=e}finally{try{if(!s&&null!=r.return&&(A=r.return(),Object(A)!==A))return}finally{if(u)throw i}}return a}}(e,t)||a(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function u(e,t){var r=(0,i.get)(e,"commonOverrideAttr");if(r)try{var n=JSON.parse(r);return t?Object.entries(n).reduce((function(e,r){var n=A(r,2),i=n[0],o=n[1];return e[i]=o.filter((function(e){return e.setBizType===t})),e}),{}):n}catch(e){}}t.COMMON_OVERRIDE_ATTR_KEY="commonOverrideAttr"},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!==n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===n(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,A,a=[],s=!0,u=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=o.call(r)).done)&&(a.push(n.value),a.length!==t);s=!0);}catch(e){u=!0,i=e}finally{try{if(!s&&null!=r.return&&(A=r.return(),Object(A)!==A))return}finally{if(u)throw i}}return a}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return A(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return A(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}Object.defineProperty(t,"__esModule",{value:!0}),t.del=function(e,t){var r=o(s(e,t),3),n=r[0],A=r[1],u=r[2];if(n)return A.splice(u,1),e.mergeBizProperties(i({},a,JSON.stringify(A))),!0},t.get=function(e,t){var r=o(s(e,t),1)[0];return r&&r.data},t.set=function(e,t,r){var n=o(s(e,t),2),A=n[0],u=n[1];A?A.data=r:u&&u.push({bizType:t,data:r});e.mergeBizProperties(i({},a,JSON.stringify(u||[{bizType:t,data:r}])))};var a="com.neican.extpoint.build.afterbuildbypmd";function s(e,t){var r=e.getBizProperties();if(r){var n;try{n=JSON.parse(r[a])}catch(e){}if(Array.isArray(n)){for(var i,o=n.length;o;)if((i=n[--o])&&i.bizType===t)return[i,n,o];return[void 0,n]}return[void 0,void 0]}return[]}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.computeWireGeometry=function(e,t){for(var r,n,o=e?e.coordinates:[],A=e?e.coordinatesIndex:[],a=t||new i.default,s=0;s<A.length-1;s+=2)r=3*A[s],n=3*A[s+1],a.vertices.push(o[r],o[r+1],o[r+2],o[n],o[n+1],o[n+2]);return a};var n,i=(n=r(1086))&&n.__esModule?n:{default:n}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ZoneDivisionType=void 0,t.parseZoneDivisionData=function(e){return function e(t){var r=Object.assign(Object.assign({},t),{size:new o.default(t.size.x,t.size.y,t.size.z),position:new o.default(t.position.x,t.position.y,t.position.z)});return t.zoneDivisions&&t.zoneDivisions.length&&(r.zoneDivisions=t.zoneDivisions.map((function(t){return e(t)}))),r}(e)};var n,i,o=(n=r(5))&&n.__esModule?n:{default:n};t.ZoneDivisionType=i,function(e){e.X="X",e.Y="Y",e.Z="Z"}(i||(t.ZoneDivisionType=i={}))},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(o=i.key,A=void 0,A=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!==n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"===n(A)?A:String(A)),i)}var o,A}var o;Object.defineProperty(t,"__esModule",{value:!0}),t.SourceObjectType=t.ParameterAssignment=void 0,t.SourceObjectType=o,function(e){e[e.MODEL=0]="MODEL",e[e.DRAIN_HOLE=1]="DRAIN_HOLE",e[e.FAUCET_HOLE=2]="FAUCET_HOLE",e[e.AUX_HOLE=3]="AUX_HOLE"}(o||(t.SourceObjectType=o={}));var A=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r,n;return t=e,(r=[{key:"getModel",value:function(){return this.model}},{key:"setModel",value:function(e){return this.model=e,this}},{key:"getName",value:function(){return this.name}},{key:"setName",value:function(e){return this.name=e,this}},{key:"getCategory",value:function(){return this.category}},{key:"setCategory",value:function(e){return this.category=e,this}},{key:"getSourceObjectType",value:function(){return this.sourceObjectType}},{key:"setSourceObjectType",value:function(e){return this.sourceObjectType=e,this}},{key:"getSize",value:function(){return this.size}},{key:"setSize",value:function(e){return this.size=e,this}},{key:"getPosition",value:function(){return this.position}},{key:"setPosition",value:function(e){return this.position=e,this}},{key:"getRotate",value:function(){return this.rotate}},{key:"setRotate",value:function(e){return this.rotate=e,this}}])&&i(t.prototype,r),n&&i(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.ParameterAssignment=A},function(e,t,r){"use strict";function n(e,t,r){if(e===t)return!0;if(e&&t&&e.length===t.length){for(var n=0,i=e.length;n<i;n++)if(r?!r(e[n],t[n]):e[n]!==t[n])return!1;return!0}return!1}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i={equalsArray:n,equalsArrayBuffer:function(e,t){return e===t||!(!e||!t)&&n(new Float64Array(e),new Float64Array(t))},equalsBox3:function(e,t){return e===t||!(!e||!t)&&(e.getPosition().equals(t.getPosition())&&e.getSize().equals(t.getSize())&&e.getRotation().equals(t.getRotation()))},diffArray:function(e,t,r){t=t||[];var n=void 0,i=void 0,o=void 0,A=void 0;if(0===(e=e||[]).length)n=[],i=[],o=[],A=t.slice();else if(0===t.length)n=e.slice(),i=[],o=[],A=[];else{n=[],i=[],o=[],A=[];for(var a=void 0,s=void 0,u=void 0,c=0,l=Math.min(e.length,t.length);c<l;++c)if((s=e[c])!==(a=t[c])){if(r?r(s)!==r(a):s.id!==a.id){0!==c&&(e=e.slice(c),t=t.slice(c));break}i.push(s),o.push(a)}if(c===l){if(c<e.length)for(;c<e.length;)n.push(e[c]),++c;else if(c<t.length)for(;c<t.length;)A.push(t[c]),++c}else{for(var g={},f={},h=0,p=e.length;h<p;++h)s=e[h],g[u=r?r(s):s.id]=e[h];for(var d=0,I=t.length;d<I;++d)a=t[d],s=g[u=r?r(a):a.id],f[u]=a,s?s!==a&&(i.push(s),o.push(a)):A.push(a);for(var y=0,C=e.length;y<C;++y)s=e[y],(a=f[u=r?r(s):s.id])||n.push(s)}}return{removed:n,updatedOld:i,updatedNew:o,added:A}}};t.default=i},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0});var i={CoreCustomContext:!0,CoreParamModelAssemblyBackup:!0,CoreParamModelBackup:!0};Object.defineProperty(t,"CoreCustomContext",{enumerable:!0,get:function(){return A.default}}),Object.defineProperty(t,"CoreParamModelAssemblyBackup",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"CoreParamModelBackup",{enumerable:!0,get:function(){return u.default}});var o=r(1954);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}));var A=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var r=l(t);if(r&&r.has(e))return r.get(e);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var A in e)if("default"!==A&&Object.prototype.hasOwnProperty.call(e,A)){var a=o?Object.getOwnPropertyDescriptor(e,A):null;a&&(a.get||a.set)?Object.defineProperty(i,A,a):i[A]=e[A]}i.default=e,r&&r.set(e,i);return i}(r(208));Object.keys(A).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===A[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return A[e]}}))}));var a=r(1959);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}));var s=c(r(704)),u=c(r(705));function c(e){return e&&e.__esModule?e:{default:e}}function l(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(l=function(e){return e?r:t})(e)}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0});var i={DoorHoleData:!0,InnerFrameData:!0,MeshData:!0,ParamData:!0,ParamModelData:!0,ParamModelGroupData:!0,BaseParamModelData:!0};Object.defineProperty(t,"BaseParamModelData",{enumerable:!0,get:function(){return B.default}}),Object.defineProperty(t,"DoorHoleData",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"InnerFrameData",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"MeshData",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(t,"ParamData",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(t,"ParamModelData",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"ParamModelGroupData",{enumerable:!0,get:function(){return I.default}});var o=r(1955);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}));var A=r(1073);Object.keys(A).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===A[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return A[e]}}))}));var a=m(r(1075));Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}));var s=r(1078);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===s[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}}))}));var u=m(r(1079));Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===u[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}}))}));var c=r(1956);Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===c[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}}))}));var l=r(1957);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===l[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}}))}));var g=m(r(1081));Object.keys(g).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===g[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return g[e]}}))}));var f=m(r(350));Object.keys(f).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===f[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return f[e]}}))}));var h=r(1088);Object.keys(h).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===h[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return h[e]}}))}));var p=r(1089);Object.keys(p).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===p[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return p[e]}}))}));var d=m(r(703));Object.keys(d).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===d[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return d[e]}}))}));var I=m(r(702));Object.keys(I).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===I[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return I[e]}}))}));var y=r(1958);Object.keys(y).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===y[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return y[e]}}))}));var C=r(1082);Object.keys(C).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===C[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return C[e]}}))}));var E,B=(E=r(1072))&&E.__esModule?E:{default:E};function v(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(v=function(e){return e?r:t})(e)}function m(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var r=v(t);if(r&&r.has(e))return r.get(e);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var A in e)if("default"!==A&&Object.prototype.hasOwnProperty.call(e,A)){var a=o?Object.getOwnPropertyDescriptor(e,A):null;a&&(a.get||a.set)?Object.defineProperty(i,A,a):i[A]=e[A]}return i.default=e,r&&r.set(e,i),i}},function(e,t,r){},function(e,t,r){},function(e,t,r){},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(o=i.key,A=void 0,A=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!==n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"===n(A)?A:String(A)),i)}var o,A}function o(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}Object.defineProperty(t,"__esModule",{value:!0}),t.RuleLimitData=void 0;var A=o((function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}));t.RuleLimitData=A},function(e,t,r){},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0});var i={InnerFrame:!0,DoorHole:!0,FitRule:!0,IntersectBox:!0,ParamPackage:!0,AutoGenerateConfig:!0,NamedValue:!0,ParamModelAttached:!0,IParamModelAttachedPartialPb:!0};Object.defineProperty(t,"AutoGenerateConfig",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(t,"DoorHole",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"FitRule",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"IParamModelAttachedPartialPb",{enumerable:!0,get:function(){return I.IParamModelAttachedPartialPb}}),Object.defineProperty(t,"InnerFrame",{enumerable:!0,get:function(){return A.default}}),Object.defineProperty(t,"IntersectBox",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"NamedValue",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"ParamModelAttached",{enumerable:!0,get:function(){return I.default}}),Object.defineProperty(t,"ParamPackage",{enumerable:!0,get:function(){return g.default}});var o=r(1961);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}));var A=E(r(1080));Object.keys(A).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===A[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return A[e]}}))}));var a=r(1074);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}));var s=E(r(699));Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===s[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}}))}));var u=E(r(516));Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===u[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}}))}));var c=r(1962);Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===c[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}}))}));var l=E(r(1085));Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===l[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}}))}));var g=E(r(518));Object.keys(g).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===g[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return g[e]}}))}));var f=r(519);Object.keys(f).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===f[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return f[e]}}))}));var h=r(1083);Object.keys(h).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===h[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return h[e]}}))}));var p=y(r(1084)),d=y(r(1963)),I=E(r(428));function y(e){return e&&e.__esModule?e:{default:e}}function C(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(C=function(e){return e?r:t})(e)}function E(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var r=C(t);if(r&&r.has(e))return r.get(e);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var A in e)if("default"!==A&&Object.prototype.hasOwnProperty.call(e,A)){var a=o?Object.getOwnPropertyDescriptor(e,A):null;a&&(a.get||a.set)?Object.defineProperty(i,A,a):i[A]=e[A]}return i.default=e,r&&r.set(e,i),i}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"RevitArc3",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"RevitCurve3",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"RevitLine3",{enumerable:!0,get:function(){return A.default}}),Object.defineProperty(t,"RevitShape3",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"deltaTransformPoint",{enumerable:!0,get:function(){return o.deltaTransformPoint}});var i=u(r(700)),o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var r=s(t);if(r&&r.has(e))return r.get(e);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var A in e)if("default"!==A&&Object.prototype.hasOwnProperty.call(e,A)){var a=o?Object.getOwnPropertyDescriptor(e,A):null;a&&(a.get||a.set)?Object.defineProperty(i,A,a):i[A]=e[A]}i.default=e,r&&r.set(e,i);return i}(r(1076)),A=u(r(517)),a=u(r(1077));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(s=function(e){return e?r:t})(e)}function u(e){return e&&e.__esModule?e:{default:e}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GeoReferenceType=t.GeoReferencePointData=t.GeoReferenceFaceData=t.GeoReferenceExtrusionData=t.GeoReferenceCurveData=t.GRPSurfaceData=t.GRPExtrusionData=t.GRPCurveData=t.BaseGeoReferenceData=void 0,t.parseGeoReferenceData=function(e){var t,r=Object.assign(Object.assign({},e),{value:JSON.parse(e.value)});switch(r.type){case C.CCS3D:t=(0,n.deserialize)(_,r);break;case C.CURVES:t=(0,n.deserialize)(S,r);break;case C.FACE:t=(0,n.deserialize)(w,r);break;case C.EXTRUSION:t=(0,n.deserialize)(D,r);break;default:t=(0,n.deserialize)(b,r)}return t},t.transformLocalGRPToWorldGRP=function(e,t){e instanceof _?e.value=function(e,t){var r=e.toCCS();return r.transform(t),new i.CCS3dData(r)}(e.value,t):e instanceof S?e.value=R(e.value,t):e instanceof w?e.value=function(e,t){var r,n=e.surface.toSurface();n.transform(t),r=n instanceof i.Plane?new i.PlaneData(n):n instanceof i.CylindricalSurface?new i.CylindricalSurfaceData(n):n instanceof i.SurfaceOfLinearExtrusion?new i.SurfaceOfLinearExtrusionData(n):new i.SurfaceData(n);return e.surface=r,e.outLoop=R(e.outLoop,t),e.innerLoops=e.innerLoops.map((function(e){return R(e,t)})),e}(e.value,t):e instanceof D&&(e.value=function(e,t){var r=e.matrix.toMatrix();return r.premultiply(t),e.matrix=new i.Matrix4Data(r),e}(e.value,t));return e};var n=r(17),i=r(3);function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&A(e,t)}function A(e,t){return(A=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function a(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=u(e);if(t){var i=u(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return s(this,r)}}function s(e,t){if(t&&("object"===f(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(i=n.key,o=void 0,o=function(e,t){if("object"!==f(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==f(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(i,"string"),"symbol"===f(o)?o:String(o)),n)}var i,o}function l(e,t,r){return t&&c(e.prototype,t),r&&c(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function g(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var h,p,d,I,y,C,E=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":f(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},B=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":f(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};t.GeoReferenceType=C,function(e){e.CCS3D="CCS3D",e.CURVES="CURVES",e.FACE="FACE",e.EXTRUSION="EXTRUSION"}(C||(t.GeoReferenceType=C={}));var v=l((function e(){g(this,e)}));t.GRPCurveData=v,E([(0,n.JsonProperty)({class:i.BoundedCurve3dData,converter:i.DataConverter.BoundedCurve3dDatasConverter}),B("design:type",Array)],v.prototype,"curves",void 0);var m=l((function e(){g(this,e)}));t.GRPSurfaceData=m,E([(0,n.JsonProperty)({converter:i.DataConverter.SurfaceDataConverter}),B("design:type","function"==typeof(h=void 0!==i.SurfaceData&&i.SurfaceData)?h:Object)],m.prototype,"surface",void 0),E([(0,n.JsonProperty)(),B("design:type",v)],m.prototype,"outLoop",void 0),E([(0,n.JsonProperty)({class:v,default:[]}),B("design:type",Array)],m.prototype,"innerLoops",void 0);var Q=l((function e(){g(this,e)}));t.GRPExtrusionData=Q,E([(0,n.JsonProperty)(),B("design:type","function"==typeof(p=void 0!==i.Matrix4Data&&i.Matrix4Data)?p:Object)],Q.prototype,"matrix",void 0),E([(0,n.JsonProperty)(),B("design:type",Number)],Q.prototype,"distance",void 0),E([(0,n.JsonProperty)(),B("design:type","function"==typeof(d=void 0!==i.GeomFace2dData&&i.GeomFace2dData)?d:Object)],Q.prototype,"face",void 0);var b=l((function e(){g(this,e)}));t.BaseGeoReferenceData=b,E([(0,n.JsonProperty)({default:""}),B("design:type",String)],b.prototype,"id",void 0),E([(0,n.JsonProperty)({default:""}),B("design:type",String)],b.prototype,"name",void 0),E([(0,n.JsonProperty)(),B("design:type",String)],b.prototype,"type",void 0),E([(0,n.JsonProperty)(),B("design:type",String)],b.prototype,"businessType",void 0),E([(0,n.JsonProperty)({default:new Map}),B("design:type","function"==typeof(I="undefined"!=typeof Map&&Map)?I:Object)],b.prototype,"data",void 0);var _=function(e){o(r,e);var t=a(r);function r(){return g(this,r),t.apply(this,arguments)}return l(r)}(b);t.GeoReferencePointData=_,E([(0,n.JsonProperty)(),B("design:type","function"==typeof(y=void 0!==i.CCS3dData&&i.CCS3dData)?y:Object)],_.prototype,"value",void 0);var S=function(e){o(r,e);var t=a(r);function r(){return g(this,r),t.apply(this,arguments)}return l(r)}(b);t.GeoReferenceCurveData=S,E([(0,n.JsonProperty)({class:v}),B("design:type",v)],S.prototype,"value",void 0);var w=function(e){o(r,e);var t=a(r);function r(){return g(this,r),t.apply(this,arguments)}return l(r)}(b);t.GeoReferenceFaceData=w,E([(0,n.JsonProperty)(),B("design:type",m)],w.prototype,"value",void 0);var D=function(e){o(r,e);var t=a(r);function r(){return g(this,r),t.apply(this,arguments)}return l(r)}(b);function R(e,t){return e.curves=e.curves.map((function(e){var r=e.toCurve();return r.transform(t),r instanceof i.Arc3d?new i.Arc3dData(r):r instanceof i.LineSeg3d?new i.LineSeg3dData(r):new i.BoundedCurve3dData(r)})),e}t.GeoReferenceExtrusionData=D,E([(0,n.JsonProperty)(),B("design:type",Q)],D.prototype,"value",void 0)},function(e,t,r){},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isCoreParamModel=function(e){return e instanceof n.default},t.isCoreParamModelAssembly=function(e){return e instanceof i.default};var n=o(r(107)),i=o(r(421));function o(e){return e&&e.__esModule?e:{default:e}}},function(e,t,r){"use strict";e.exports=function(){}},function(e,t,r){"use strict";var n=r(1967),i=Math.abs,o=Math.floor;e.exports=function(e){return isNaN(e)?0:0!==(e=Number(e))&&isFinite(e)?n(e)*o(i(e)):e}},function(e,t,r){"use strict";e.exports=r(1968)()?Math.sign:r(1969)},function(e,t,r){"use strict";e.exports=function(){var e=Math.sign;return"function"==typeof e&&(1===e(10)&&-1===e(-20))}},function(e,t,r){"use strict";e.exports=function(e){return e=Number(e),isNaN(e)||0===e?e:e>0?1:-1}},function(e,t,r){"use strict";var n=r(234),i=r(520),o=r(279),A=r(1972),a=r(1091);e.exports=function e(t){var r,s,u;if(n(t),(r=Object(arguments[1])).async&&r.promise)throw new Error("Options 'async' and 'promise' cannot be used together");return hasOwnProperty.call(t,"__memoized__")&&!r.force?t:(s=a(r.length,t.length,r.async&&o.async),u=A(t,s,r),i(o,(function(e,t){r[t]&&e(r[t],u,r)})),e.__profiler__&&e.__profiler__(u),u.updateEnv(),u.memoized)}},function(e,t,r){"use strict";var n=r(234),i=r(351),o=Function.prototype.bind,A=Function.prototype.call,a=Object.keys,s=Object.prototype.propertyIsEnumerable;e.exports=function(e,t){return function(r,u){var c,l=arguments[2],g=arguments[3];return r=Object(i(r)),n(u),c=a(r),g&&c.sort("function"==typeof g?o.call(g,r):void 0),"function"!=typeof e&&(e=c[e]),A.call(e,c,(function(e,n){return s.call(r,e)?A.call(u,l,r[e],e,r,n):t}))}}},function(e,t,r){"use strict";var n=r(1973),i=r(1093),o=r(280),A=r(1987).methods,a=r(1988),s=r(2004),u=Function.prototype.apply,c=Function.prototype.call,l=Object.create,g=Object.defineProperties,f=A.on,h=A.emit;e.exports=function(e,t,r){var A,p,d,I,y,C,E,B,v,m,Q,b,_,S,w,D=l(null);return p=!1!==t?t:isNaN(e.length)?1:e.length,r.normalizer&&(m=s(r.normalizer),d=m.get,I=m.set,y=m.delete,C=m.clear),null!=r.resolvers&&(w=a(r.resolvers)),S=d?i((function(t){var r,i,o=arguments;if(w&&(o=w(o)),null!==(r=d(o))&&hasOwnProperty.call(D,r))return Q&&A.emit("get",r,o,this),D[r];if(i=1===o.length?c.call(e,this,o[0]):u.call(e,this,o),null===r){if(null!==(r=d(o)))throw n("Circular invocation","CIRCULAR_INVOCATION");r=I(o)}else if(hasOwnProperty.call(D,r))throw n("Circular invocation","CIRCULAR_INVOCATION");return D[r]=i,b&&A.emit("set",r,null,i),i}),p):0===t?function(){var t;if(hasOwnProperty.call(D,"data"))return Q&&A.emit("get","data",arguments,this),D.data;if(t=arguments.length?u.call(e,this,arguments):c.call(e,this),hasOwnProperty.call(D,"data"))throw n("Circular invocation","CIRCULAR_INVOCATION");return D.data=t,b&&A.emit("set","data",null,t),t}:function(t){var r,i,o=arguments;if(w&&(o=w(arguments)),i=String(o[0]),hasOwnProperty.call(D,i))return Q&&A.emit("get",i,o,this),D[i];if(r=1===o.length?c.call(e,this,o[0]):u.call(e,this,o),hasOwnProperty.call(D,i))throw n("Circular invocation","CIRCULAR_INVOCATION");return D[i]=r,b&&A.emit("set",i,null,r),r},A={original:e,memoized:S,profileName:r.profileName,get:function(e){return w&&(e=w(e)),d?d(e):String(e[0])},has:function(e){return hasOwnProperty.call(D,e)},delete:function(e){var t;hasOwnProperty.call(D,e)&&(y&&y(e),t=D[e],delete D[e],_&&A.emit("delete",e,t))},clear:function(){var e=D;C&&C(),D=l(null),A.emit("clear",e)},on:function(e,t){return"get"===e?Q=!0:"set"===e?b=!0:"delete"===e&&(_=!0),f.call(this,e,t)},emit:h,updateEnv:function(){e=A.original}},E=d?i((function(e){var t,r=arguments;w&&(r=w(r)),null!==(t=d(r))&&A.delete(t)}),p):0===t?function(){return A.delete("data")}:function(e){return w&&(e=w(arguments)[0]),A.delete(e)},B=i((function(){var e,r=arguments;return 0===t?D.data:(w&&(r=w(r)),e=d?d(r):String(r[0]),D[e])})),v=i((function(){var e,r=arguments;return 0===t?A.has("data"):(w&&(r=w(r)),null!==(e=d?d(r):String(r[0]))&&A.has(e))})),g(S,{__memoized__:o(!0),delete:o(E),clear:o(A.clear),_get:o(B),_has:o(v)}),A}},function(e,t,r){"use strict";var n=r(1092),i=r(1979),o=r(277),A=Error.captureStackTrace;e.exports=function(t){var r=new Error(t),a=arguments[1],s=arguments[2];return o(s)||i(a)&&(s=a,a=null),o(s)&&n(r,s),o(a)&&(r.code=a),A&&A(r,e.exports),r}},function(e,t,r){"use strict";e.exports=function(){var e,t=Object.assign;return"function"==typeof t&&(t(e={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),e.foo+e.bar+e.trzy==="razdwatrzy")}},function(e,t,r){"use strict";var n=r(1976),i=r(351),o=Math.max;e.exports=function(e,t){var r,A,a,s=o(arguments.length,2);for(e=Object(i(e)),a=function(n){try{e[n]=t[n]}catch(e){r||(r=e)}},A=1;A<s;++A)n(t=arguments[A]).forEach(a);if(void 0!==r)throw r;return e}},function(e,t,r){"use strict";e.exports=r(1977)()?Object.keys:r(1978)},function(e,t,r){"use strict";e.exports=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}},function(e,t,r){"use strict";var n=r(277),i=Object.keys;e.exports=function(e){return i(n(e)?Object(e):e)}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=r(277),o={function:!0,object:!0};e.exports=function(e){return i(e)&&o[n(e)]||!1}},function(e,t,r){"use strict";var n=r(1981),i=/^\s*class[\s{/}]/,o=Function.prototype.toString;e.exports=function(e){return!!n(e)&&!i.test(o.call(e))}},function(e,t,r){"use strict";var n=r(1982);e.exports=function(e){if("function"!=typeof e)return!1;if(!hasOwnProperty.call(e,"length"))return!1;try{if("number"!=typeof e.length)return!1;if("function"!=typeof e.call)return!1;if("function"!=typeof e.apply)return!1}catch(e){return!1}return!n(e)}},function(e,t,r){"use strict";var n=r(1983);e.exports=function(e){if(!n(e))return!1;try{return!!e.constructor&&e.constructor.prototype===e}catch(e){return!1}}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=r(1095),o={object:!0,function:!0,undefined:!0};e.exports=function(e){return!!i(e)&&hasOwnProperty.call(o,n(e))}},function(e,t,r){"use strict";e.exports=r(1985)()?String.prototype.contains:r(1986)},function(e,t,r){"use strict";var n="razdwatrzy";e.exports=function(){return"function"==typeof n.contains&&(!0===n.contains("dwa")&&!1===n.contains("foo"))}},function(e,t,r){"use strict";var n=String.prototype.indexOf;e.exports=function(e){return n.call(this,e,arguments[1])>-1}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i,o,A,a,s,u,c,l=r(280),g=r(234),f=Function.prototype.apply,h=Function.prototype.call,p=Object.create,d=Object.defineProperty,I=Object.defineProperties,y=Object.prototype.hasOwnProperty,C={configurable:!0,enumerable:!1,writable:!0};o=function(e,t){var r,n;return g(t),n=this,i.call(this,e,r=function(){A.call(n,e,r),f.call(t,this,arguments)}),r.__eeOnceListener__=t,this},s={on:i=function(e,t){var r;return g(t),y.call(this,"__ee__")?r=this.__ee__:(r=C.value=p(null),d(this,"__ee__",C),C.value=null),r[e]?"object"===n(r[e])?r[e].push(t):r[e]=[r[e],t]:r[e]=t,this},once:o,off:A=function(e,t){var r,i,o,A;if(g(t),!y.call(this,"__ee__"))return this;if(!(r=this.__ee__)[e])return this;if("object"===n(i=r[e]))for(A=0;o=i[A];++A)o!==t&&o.__eeOnceListener__!==t||(2===i.length?r[e]=i[A?0:1]:i.splice(A,1));else i!==t&&i.__eeOnceListener__!==t||delete r[e];return this},emit:a=function(e){var t,r,i,o,A;if(y.call(this,"__ee__")&&(o=this.__ee__[e]))if("object"===n(o)){for(r=arguments.length,A=new Array(r-1),t=1;t<r;++t)A[t-1]=arguments[t];for(o=o.slice(),t=0;i=o[t];++t)f.call(i,this,A)}else switch(arguments.length){case 1:h.call(o,this);break;case 2:h.call(o,this,arguments[1]);break;case 3:h.call(o,this,arguments[1],arguments[2]);break;default:for(r=arguments.length,A=new Array(r-1),t=1;t<r;++t)A[t-1]=arguments[t];f.call(o,this,A)}}},u={on:l(i),once:l(o),off:l(A),emit:l(a)},c=I({},u),e.exports=t=function(e){return null==e?p(c):I(Object(e),u)},t.methods=s},function(e,t,r){"use strict";var n,i=r(1989),o=r(277),A=r(234),a=Array.prototype.slice;n=function(e){return this.map((function(t,r){return t?t(e[r]):e[r]})).concat(a.call(e,this.length))},e.exports=function(e){return(e=i(e)).forEach((function(e){o(e)&&A(e)})),n.bind(e)}},function(e,t,r){"use strict";var n=r(706),i=Array.isArray;e.exports=function(e){return i(e)?e:n(e)}},function(e,t,r){"use strict";e.exports=function(){var e,t,r=Array.from;return"function"==typeof r&&(t=r(e=["raz","dwa"]),Boolean(t&&t!==e&&"dwa"===t[1]))}},function(e,t,r){"use strict";var n=r(1992).iterator,i=r(2001),o=r(2002),A=r(278),a=r(234),s=r(351),u=r(277),c=r(2003),l=Array.isArray,g=Function.prototype.call,f={configurable:!0,enumerable:!0,writable:!0,value:null},h=Object.defineProperty;e.exports=function(e){var t,r,p,d,I,y,C,E,B,v,m=arguments[1],Q=arguments[2];if(e=Object(s(e)),u(m)&&a(m),this&&this!==Array&&o(this))t=this;else{if(!m){if(i(e))return 1!==(I=e.length)?Array.apply(null,e):((d=new Array(1))[0]=e[0],d);if(l(e)){for(d=new Array(I=e.length),r=0;r<I;++r)d[r]=e[r];return d}}d=[]}if(!l(e))if(void 0!==(B=e[n])){for(C=a(B).call(e),t&&(d=new t),E=C.next(),r=0;!E.done;)v=m?g.call(m,Q,E.value,r):E.value,t?(f.value=v,h(d,r,f)):d[r]=v,E=C.next(),++r;I=r}else if(c(e)){for(I=e.length,t&&(d=new t),r=0,p=0;r<I;++r)v=e[r],r+1<I&&(y=v.charCodeAt(0))>=55296&&y<=56319&&(v+=e[++r]),v=m?g.call(m,Q,v,p):v,t?(f.value=v,h(d,p,f)):d[p]=v,++p;I=p}if(void 0===I)for(I=A(e.length),t&&(d=new t(I)),r=0;r<I;++r)v=m?g.call(m,Q,e[r],r):e[r],t?(f.value=v,h(d,r,f)):d[r]=v;return t&&(f.value=null,d.length=I),d}},function(e,t,r){"use strict";e.exports=r(1993)()?r(521).Symbol:r(1996)},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=r(521),o={object:!0,symbol:!0};e.exports=function(){var e,t=i.Symbol;if("function"!=typeof t)return!1;e=t("test symbol");try{String(e)}catch(e){return!1}return!!o[n(t.iterator)]&&(!!o[n(t.toPrimitive)]&&!!o[n(t.toStringTag)])}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e.exports=function(){return"object"===("undefined"==typeof globalThis?"undefined":n(globalThis))&&(!!globalThis&&globalThis.Array===Array)}},function(e,t){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var n=function(){if("object"===("undefined"==typeof self?"undefined":r(self))&&self)return self;if("object"===("undefined"==typeof window?"undefined":r(window))&&window)return window;throw new Error("Unable to resolve global `this`")};e.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch(e){return n()}try{return __global__||n()}finally{delete Object.prototype.__global__}}()},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i,o,A,a=r(280),s=r(1096),u=r(521).Symbol,c=r(1998),l=r(1999),g=r(2e3),f=Object.create,h=Object.defineProperties,p=Object.defineProperty;if("function"==typeof u)try{String(u()),A=!0}catch(e){}else u=null;o=function(e){if(this instanceof o)throw new TypeError("Symbol is not a constructor");return i(e)},e.exports=i=function e(t){var r;if(this instanceof e)throw new TypeError("Symbol is not a constructor");return A?u(t):(r=f(o.prototype),t=void 0===t?"":String(t),h(r,{__description__:a("",t),__name__:a("",c(t))}))},l(i),g(i),h(o.prototype,{constructor:a(i),toString:a("",(function(){return this.__name__}))}),h(i.prototype,{toString:a((function(){return"Symbol ("+s(this).__description__+")"})),valueOf:a((function(){return s(this)}))}),p(i.prototype,i.toPrimitive,a("",(function(){var e=s(this);return"symbol"===n(e)?e:e.toString()}))),p(i.prototype,i.toStringTag,a("c","Symbol")),p(o.prototype,i.toStringTag,a("c",i.prototype[i.toStringTag])),p(o.prototype,i.toPrimitive,a("c",i.prototype[i.toPrimitive]))},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e.exports=function(e){return!!e&&("symbol"===n(e)||!!e.constructor&&("Symbol"===e.constructor.name&&"Symbol"===e[e.constructor.toStringTag]))}},function(e,t,r){"use strict";var n=r(280),i=Object.create,o=Object.defineProperty,A=Object.prototype,a=i(null);e.exports=function(e){for(var t,r,i=0;a[e+(i||"")];)++i;return a[e+=i||""]=!0,o(A,t="@@"+e,n.gs(null,(function(e){r||(r=!0,o(this,t,n(e)),r=!1)}))),t}},function(e,t,r){"use strict";var n=r(280),i=r(521).Symbol;e.exports=function(e){return Object.defineProperties(e,{hasInstance:n("",i&&i.hasInstance||e("hasInstance")),isConcatSpreadable:n("",i&&i.isConcatSpreadable||e("isConcatSpreadable")),iterator:n("",i&&i.iterator||e("iterator")),match:n("",i&&i.match||e("match")),replace:n("",i&&i.replace||e("replace")),search:n("",i&&i.search||e("search")),species:n("",i&&i.species||e("species")),split:n("",i&&i.split||e("split")),toPrimitive:n("",i&&i.toPrimitive||e("toPrimitive")),toStringTag:n("",i&&i.toStringTag||e("toStringTag")),unscopables:n("",i&&i.unscopables||e("unscopables"))})}},function(e,t,r){"use strict";var n=r(280),i=r(1096),o=Object.create(null);e.exports=function(e){return Object.defineProperties(e,{for:n((function(t){return o[t]?o[t]:o[t]=e(String(t))})),keyFor:n((function(e){var t;for(t in i(e),o)if(o[t]===e)return t}))})}},function(e,t,r){"use strict";var n=Object.prototype.toString,i=n.call(function(){return arguments}());e.exports=function(e){return n.call(e)===i}},function(e,t,r){"use strict";var n=Object.prototype.toString,i=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);e.exports=function(e){return"function"==typeof e&&i(n.call(e))}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=Object.prototype.toString,o=i.call("");e.exports=function(e){return"string"==typeof e||e&&"object"===n(e)&&(e instanceof String||i.call(e)===o)||!1}},function(e,t,r){"use strict";var n=r(234);e.exports=function(e){var t;return"function"==typeof e?{set:e,get:e}:(t={get:n(e.get)},void 0!==e.set?(t.set=n(e.set),e.delete&&(t.delete=n(e.delete)),e.clear&&(t.clear=n(e.clear)),t):(t.set=t.get,t))}},function(e,t,r){"use strict";e.exports=function(e){var t,r,n=e.length;if(!n)return"";for(t=String(e[r=0]);--n;)t+=""+e[++r];return t}},function(e,t,r){"use strict";e.exports=function(e){return e?function(t){for(var r=String(t[0]),n=0,i=e;--i;)r+=""+t[++n];return r}:function(){return""}}},function(e,t,r){"use strict";var n=r(707),i=Object.create;e.exports=function(){var e=0,t=[],r=i(null);return{get:function(e){var r,i=0,o=t,A=e.length;if(0===A)return o[A]||null;if(o=o[A]){for(;i<A-1;){if(-1===(r=n.call(o[0],e[i])))return null;o=o[1][r],++i}return-1===(r=n.call(o[0],e[i]))?null:o[1][r]||null}return null},set:function(i){var o,A=0,a=t,s=i.length;if(0===s)a[s]=++e;else{for(a[s]||(a[s]=[[],[]]),a=a[s];A<s-1;)-1===(o=n.call(a[0],i[A]))&&(o=a[0].push(i[A])-1,a[1].push([[],[]])),a=a[1][o],++A;-1===(o=n.call(a[0],i[A]))&&(o=a[0].push(i[A])-1),a[1][o]=++e}return r[e]=i,e},delete:function(e){var i,o=0,A=t,a=r[e],s=a.length,u=[];if(0===s)delete A[s];else if(A=A[s]){for(;o<s-1;){if(-1===(i=n.call(A[0],a[o])))return;u.push(A,i),A=A[1][i],++o}if(-1===(i=n.call(A[0],a[o])))return;for(e=A[1][i],A[0].splice(i,1),A[1].splice(i,1);!A[0].length&&u.length;)i=u.pop(),(A=u.pop())[0].splice(i,1),A[1].splice(i,1)}delete r[e]},clear:function(){t=[],r=i(null)}}}},function(e,t,r){"use strict";e.exports=r(2009)()?Number.isNaN:r(2010)},function(e,t,r){"use strict";e.exports=function(){var e=Number.isNaN;return"function"==typeof e&&(!e({})&&e(NaN)&&!e(34))}},function(e,t,r){"use strict";e.exports=function(e){return e!=e}},function(e,t,r){"use strict";var n=r(707);e.exports=function(){var e=0,t=[],r=[];return{get:function(e){var i=n.call(t,e[0]);return-1===i?null:r[i]},set:function(n){return t.push(n[0]),r.push(++e),e},delete:function(e){var i=n.call(r,e);-1!==i&&(t.splice(i,1),r.splice(i,1))},clear:function(){t=[],r=[]}}}},function(e,t,r){"use strict";var n=r(707),i=Object.create;e.exports=function(e){var t=0,r=[[],[]],o=i(null);return{get:function(t){for(var i,o=0,A=r;o<e-1;){if(-1===(i=n.call(A[0],t[o])))return null;A=A[1][i],++o}return-1===(i=n.call(A[0],t[o]))?null:A[1][i]||null},set:function(i){for(var A,a=0,s=r;a<e-1;)-1===(A=n.call(s[0],i[a]))&&(A=s[0].push(i[a])-1,s[1].push([[],[]])),s=s[1][A],++a;return-1===(A=n.call(s[0],i[a]))&&(A=s[0].push(i[a])-1),s[1][A]=++t,o[t]=i,t},delete:function(t){for(var i,A=0,a=r,s=[],u=o[t];A<e-1;){if(-1===(i=n.call(a[0],u[A])))return;s.push(a,i),a=a[1][i],++A}if(-1!==(i=n.call(a[0],u[A]))){for(t=a[1][i],a[0].splice(i,1),a[1].splice(i,1);!a[0].length&&s.length;)i=s.pop(),(a=s.pop())[0].splice(i,1),a[1].splice(i,1);delete o[t]}},clear:function(){r=[[],[]],o=i(null)}}}},function(e,t,r){"use strict";var n=r(706),i=r(1097),o=r(1094),A=r(1093),a=r(708),s=Array.prototype.slice,u=Function.prototype.apply,c=Object.create;r(279).async=function(e,t){var r,l,g,f=c(null),h=c(null),p=t.memoized,d=t.original;t.memoized=A((function(e){var t=arguments,n=t[t.length-1];return"function"==typeof n&&(r=n,t=s.call(t,0,-1)),p.apply(l=this,g=t)}),p);try{o(t.memoized,p)}catch(e){}t.on("get",(function(e){var n,i,o;if(r){if(f[e])return"function"==typeof f[e]?f[e]=[f[e],r]:f[e].push(r),void(r=null);n=r,i=l,o=g,r=l=g=null,a((function(){var A;hasOwnProperty.call(h,e)?(A=h[e],t.emit("getasync",e,o,i),u.call(n,A.context,A.args)):(r=n,l=i,g=o,p.apply(i,o))}))}})),t.original=function(){var e,i,o,A;return r?(e=n(arguments),i=function e(r){var i,o,s=e.id;if(null!=s){if(delete e.id,i=f[s],delete f[s],i)return o=n(arguments),t.has(s)&&(r?t.delete(s):(h[s]={context:this,args:o},t.emit("setasync",s,"function"==typeof i?1:i.length))),"function"==typeof i?A=u.call(i,this,o):i.forEach((function(e){A=u.call(e,this,o)}),this),A}else a(u.bind(e,this,arguments))},o=r,r=l=g=null,e.push(i),A=u.call(d,this,e),i.cb=o,r=i,A):u.call(d,this,arguments)},t.on("set",(function(e){r?(f[e]?"function"==typeof f[e]?f[e]=[f[e],r.cb]:f[e].push(r.cb):f[e]=r.cb,delete r.cb,r.id=e,r=null):t.delete(e)})),t.on("delete",(function(e){var r;hasOwnProperty.call(f,e)||h[e]&&(r=h[e],delete h[e],t.emit("deleteasync",e,s.call(r.args,1)))})),t.on("clear",(function(){var e=h;h=c(null),t.emit("clearasync",i(e,(function(e){return s.call(e.args,1)})))}))}},function(e,t,r){(function(e){var n=void 0!==e&&e||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function o(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new o(i.call(setTimeout,n,arguments),clearTimeout)},t.setInterval=function(){return new o(i.call(setInterval,n,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(n,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},r(772),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,r(144))},function(e,t,r){"use strict";var n=r(1097),i=r(2016),o=r(2017),A=r(2019),a=r(1099),s=r(708),u=Object.create,c=i("then","then:finally","done","done:finally");r(279).promise=function(e,t){var r=u(null),i=u(null),l=u(null);if(!0===e)e=null;else if(e=o(e),!c[e])throw new TypeError("'"+A(e)+"' is not valid promise mode");t.on("set",(function(n,o,A){var u=!1;if(!a(A))return i[n]=A,void t.emit("setasync",n,1);r[n]=1,l[n]=A;var c=function(e){var o=r[n];if(u)throw new Error("Memoizee error: Detected unordered then|done & finally resolution, which in turn makes proper detection of success/failure impossible (when in 'done:finally' mode)\nConsider to rely on 'then' or 'done' mode instead.");o&&(delete r[n],i[n]=e,t.emit("setasync",n,o))},g=function(){u=!0,r[n]&&(delete r[n],delete l[n],t.delete(n))},f=e;if(f||(f="then"),"then"===f){var h=function(){s(g)};"function"==typeof(A=A.then((function(e){s(c.bind(this,e))}),h)).finally&&A.finally(h)}else if("done"===f){if("function"!=typeof A.done)throw new Error("Memoizee error: Retrieved promise does not implement 'done' in 'done' mode");A.done(c,g)}else if("done:finally"===f){if("function"!=typeof A.done)throw new Error("Memoizee error: Retrieved promise does not implement 'done' in 'done:finally' mode");if("function"!=typeof A.finally)throw new Error("Memoizee error: Retrieved promise does not implement 'finally' in 'done:finally' mode");A.done(c),A.finally(g)}})),t.on("get",(function(e,n,i){var o;if(r[e])++r[e];else{o=l[e];var A=function(){t.emit("getasync",e,n,i)};a(o)?"function"==typeof o.done?o.done(A):o.then((function(){s(A)})):A()}})),t.on("delete",(function(e){if(delete l[e],r[e])delete r[e];else if(hasOwnProperty.call(i,e)){var n=i[e];delete i[e],t.emit("deleteasync",e,[n])}})),t.on("clear",(function(){var e=i;i=u(null),r=u(null),l=u(null),t.emit("clearasync",n(e,(function(e){return[e]})))}))}},function(e,t,r){"use strict";var n=Array.prototype.forEach,i=Object.create;e.exports=function(e){var t=i(null);return n.call(arguments,(function(e){t[e]=!0})),t}},function(e,t,r){"use strict";var n=r(351),i=r(2018);e.exports=function(e){return i(n(e))}},function(e,t,r){"use strict";var n=r(1098);e.exports=function(e){try{return e&&n(e.toString)?e.toString():String(e)}catch(e){throw new TypeError("Passed argument cannot be stringifed")}}},function(e,t,r){"use strict";var n=r(2020),i=/[\n\r\u2028\u2029]/g;e.exports=function(e){var t=n(e);return t.length>100&&(t=t.slice(0,99)+"…"),t=t.replace(i,(function(e){return JSON.stringify(e).slice(1,-1)}))}},function(e,t,r){"use strict";var n=r(1098);e.exports=function(e){try{return e&&n(e.toString)?e.toString():String(e)}catch(e){return"<Non-coercible to string value>"}}},function(e,t,r){"use strict";var n=r(234),i=r(520),o=r(279),A=Function.prototype.apply;o.dispose=function(e,t,r){var a;if(n(e),r.async&&o.async||r.promise&&o.promise)return t.on("deleteasync",a=function(t,r){A.call(e,null,r)}),void t.on("clearasync",(function(e){i(e,(function(e,t){a(t,e)}))}));t.on("delete",a=function(t,r){e(r)}),t.on("clear",(function(e){i(e,(function(e,t){a(t,e)}))}))}},function(e,t,r){"use strict";var n=r(706),i=r(520),o=r(708),A=r(1099),a=r(2023),s=r(279),u=Function.prototype,c=Math.max,l=Math.min,g=Object.create;s.maxAge=function(e,t,r){var f,h,p,d;(e=a(e))&&(f=g(null),h=r.async&&s.async||r.promise&&s.promise?"async":"",t.on("set"+h,(function(r){f[r]=setTimeout((function(){t.delete(r)}),e),"function"==typeof f[r].unref&&f[r].unref(),d&&(d[r]&&"nextTick"!==d[r]&&clearTimeout(d[r]),d[r]=setTimeout((function(){delete d[r]}),p),"function"==typeof d[r].unref&&d[r].unref())})),t.on("delete"+h,(function(e){clearTimeout(f[e]),delete f[e],d&&("nextTick"!==d[e]&&clearTimeout(d[e]),delete d[e])})),r.preFetch&&(p=!0===r.preFetch||isNaN(r.preFetch)?.333:c(l(Number(r.preFetch),1),0))&&(d={},p=(1-p)*e,t.on("get"+h,(function(e,i,a){d[e]||(d[e]="nextTick",o((function(){var o;"nextTick"===d[e]&&(delete d[e],t.delete(e),r.async&&(i=n(i)).push(u),o=t.memoized.apply(a,i),r.promise&&A(o)&&("function"==typeof o.done?o.done(u,u):o.then(u,u)))})))}))),t.on("clear"+h,(function(){i(f,(function(e){clearTimeout(e)})),f={},d&&(i(d,(function(e){"nextTick"!==e&&clearTimeout(e)})),d={})})))}},function(e,t,r){"use strict";var n=r(278),i=r(2024);e.exports=function(e){if((e=n(e))>i)throw new TypeError(e+" exceeds maximum possible timeout");return e}},function(e,t,r){"use strict";e.exports=2147483647},function(e,t,r){"use strict";var n=r(278),i=r(2026),o=r(279);o.max=function(e,t,r){var A,a,s;(e=n(e))&&(a=i(e),A=r.async&&o.async||r.promise&&o.promise?"async":"",t.on("set"+A,s=function(e){void 0!==(e=a.hit(e))&&t.delete(e)}),t.on("get"+A,s),t.on("delete"+A,a.delete),t.on("clear"+A,a.clear))}},function(e,t,r){"use strict";var n=r(278),i=Object.create,o=Object.prototype.hasOwnProperty;e.exports=function(e){var t,r=0,A=1,a=i(null),s=i(null),u=0;return e=n(e),{hit:function(n){var i=s[n],c=++u;if(a[c]=n,s[n]=c,!i){if(++r<=e)return;return n=a[A],t(n),n}if(delete a[i],A===i)for(;!o.call(a,++A););},delete:t=function(e){var t=s[e];if(t&&(delete a[t],delete s[e],--r,A===t)){if(!r)return u=0,void(A=1);for(;!o.call(a,++A););}},clear:function(){r=0,A=1,a=i(null),s=i(null),u=0}}}},function(e,t,r){"use strict";var n=r(280),i=r(279),o=Object.create,A=Object.defineProperties;i.refCounter=function(e,t,r){var a,s;a=o(null),s=r.async&&i.async||r.promise&&i.promise?"async":"",t.on("set"+s,(function(e,t){a[e]=t||1})),t.on("get"+s,(function(e){++a[e]})),t.on("delete"+s,(function(e){delete a[e]})),t.on("clear"+s,(function(){a={}})),A(t.memoized,{deleteRef:n((function(){var e=t.get(arguments);return null===e?null:a[e]?!--a[e]&&(t.delete(e),!0):null})),getRefCount:n((function(){var e=t.get(arguments);return null===e?0:a[e]?a[e]:0}))})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionContext=t.START_ID=void 0;var n=r(349),i=r(288),o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var r=A(t);if(r&&r.has(e))return r.get(e);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var s=i?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(n,o,s):n[o]=e[o]}n.default=e,r&&r.set(e,n);return n}(r(2029));function A(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(A=function(e){return e?r:t})(e)}function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(i=n.key,o=void 0,o=function(e,t){if("object"!==a(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(i,"string"),"symbol"===a(o)?o:String(o)),n)}var i,o}t.START_ID="-1";var u=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.maxBackupStep=25,this.getCurrentId=function(){return t.undoStack.length>0?t.undoStack[t.undoStack.length-1].getId():"-1"},this.invalidUseCounter=0,this.undoStack=[],this.redoStack=[],this.status=o.TransactionStatus.None,this.cachedRecorder=new o.default,this.createRecorder()}var t,r,A;return t=e,(r=[{key:"setMaxBackupStep",value:function(e){if(e<1)throw Error("MaxBackupStep must not smaller than 1");this.maxBackupStep=e,this.undoStack.length>=this.maxBackupStep&&this.undoStack.splice(0,this.undoStack.length-this.maxBackupStep)}},{key:"createRecorder",value:function(){return this.activeRecorder=new o.default,this.activeRecorder}},{key:"record",value:function(e,t,r){this.status!==o.TransactionStatus.Rollback&&this.activeRecorder.record(e,t,r)}},{key:"getStatus",value:function(){return this.status}},{key:"openRecorder",value:function(){this.clearRedoStack(),this.status=o.TransactionStatus.Open,this.createRecorder()}},{key:"getMergedRecorder",value:function(){var e=new o.default;return this.useCachedRecorder&&this.cachedRecorder.mergeTo(e),this.undoStack.forEach((function(t){return t.mergeTo(e)})),e}},{key:"mergeRecorder",value:function(){!this.activeRecorder.isEmpty()&&this.undoStack.length>0&&this.activeRecorder.mergeTo(this.undoStack[this.undoStack.length-1]),this.createRecorder(),this.console("mergeTransaction")}},{key:"commitRecorder",value:function(e){var t=this;if(this.undoStack.length>=this.maxBackupStep){var r=this.undoStack.splice(0,this.undoStack.length-this.maxBackupStep+1);this.useCachedRecorder&&r.forEach((function(e){return e.mergeTo(t.cachedRecorder)}))}e&&e.mergeTo(this.activeRecorder),this.activeRecorder.isEmpty()||this.undoStack.push(this.activeRecorder),this.openRecorder(),this.console("commitTransaction")}},{key:"isActiveRecorderEmpty",value:function(){return this.activeRecorder.isEmpty()}},{key:"revert",value:function(){this.status=o.TransactionStatus.Rollback,this.activeRecorder.recover(),this.status=o.TransactionStatus.None,this.createRecorder(),this.console("revert")}},{key:"undo",value:function(){if(0===this.undoStack.length)return!1;this.createRecorder(),this.status=o.TransactionStatus.Undo;var e=this.undoStack.pop();return e.recover(),this.status=o.TransactionStatus.None,this.activeRecorder.setId(e.getId()),this.redoStack.push(this.activeRecorder),this.createRecorder(),this.console("undo"),!0}},{key:"redo",value:function(){if(0===this.redoStack.length)return!1;this.createRecorder(),this.status=o.TransactionStatus.Redo;var e=this.redoStack.pop();return e.recover(),this.status=o.TransactionStatus.None,this.activeRecorder.setId(e.getId()),this.undoStack.push(this.activeRecorder),this.createRecorder(),this.console("redo"),!0}},{key:"console",value:function(e){(0,i.devLog)({type:e,undoStack:this.undoStack,redo:this.redoStack})}},{key:"clearRedoStack",value:function(){this.redoStack.length=0}},{key:"clear",value:function(){this.redoStack.length=0,this.undoStack.length=0,this.createRecorder()}},{key:"empty",value:function(){return 0===this.redoStack.length&&0===this.undoStack.length}},{key:"undoToRecorder",value:function(e){var t=0;if("-1"===e)t=this.undoStack.length;else{var r=this.undoStack.findIndex((function(t){return t.getId()===e}));r>-1&&(t=this.undoStack.length-r-1)}if(0===t)return!1;for(var i=0;i<t;i++)if(!this.undo())return n.LOGGER.logError(new Error("Transaction undoToRecorder error")),!1;return!0}},{key:"redoToRecorder",value:function(e){var t=0,r=this.redoStack.findIndex((function(t){return t.getId()===e}));if(r>-1&&(t=this.redoStack.length-r),0===t)return!1;for(var i=0;i<t;i++)if(!this.redo())return n.LOGGER.logError(new Error("Transaction redoToRecorder error ".concat(e))),!1;return!0}},{key:"getActiveRecorderId",value:function(){return this.activeRecorder.getId()}},{key:"setActiveRecorder",value:function(e){var t=this;this.invalidUseCounter>0&&n.LOGGER.logError(new Error("invalid use setActiveRecorder"));var r=this.undoStack.find((function(t){return t.getId()===e})),i=this.activeRecorder;return r&&(this.activeRecorder=r),this.invalidUseCounter++,function(){t.invalidUseCounter--,t.activeRecorder=i}}}])&&s(t.prototype,r),A&&s(t,A),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.TransactionContext=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.TransactionStatus=void 0;var n,i=(n=r(532))&&n.__esModule?n:{default:n},o=r(2030);function A(e,t){return(A=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function a(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=u(e);if(t){var i=u(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return s(this,r)}}function s(e,t){if(t&&("object"===c(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(i=n.key,o=void 0,o=function(e,t){if("object"!==c(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(i,"string"),"symbol"===c(o)?o:String(o)),n)}var i,o}function f(e,t,r){return t&&g(e.prototype,t),r&&g(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}var h,p=function(){function e(){l(this,e),this.records=new Map,this.updater={update:function(e,t,r){e[t]=r}}}return f(e,[{key:"record",value:function(e,t,r){var n=this.records.get(e);n||(n=new Map,this.records.set(e,n)),n.has(t)||n.set(t,r)}},{key:"recover",value:function(){var e=this;this.records.forEach((function(t,r){t.forEach((function(t,n){var i=t.update||e.updater.update;r.applyRecover&&!r.applyRecover()||i(r,n,t.preValue)}))}))}},{key:"isEmpty",value:function(){return 0===this.records.size}},{key:"mergeTo",value:function(e){this.records.forEach((function(t,r){t.forEach((function(t,n){e.record(r,n,t)}))}))}}]),e}();t.TransactionStatus=h,function(e){e[e.None=0]="None",e[e.Open=1]="Open",e[e.Undo=2]="Undo",e[e.Redo=3]="Redo",e[e.Rollback=4]="Rollback"}(h||(t.TransactionStatus=h={}));var d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&A(e,t)}(r,e);var t=a(r);function r(){return l(this,r),t.apply(this,arguments)}return f(r)}((0,i.default)(p,(0,o.numericId)()));t.default=d},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.numericId=function(){var e=1;return function(){return(e++).toString()}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1101),i=r(1102),o=r(1103),A=r(2032),a=r(1104),s=r(1105),u=r(1106),c=r(1107),l=r(1108);t.BrepDataTranslators={EDGE_DATA:new n.EdgeDataTranslator,EDGE2_DATA:new i.Edge2DataTranslator,FACE_DATA:new o.FaceDataTranslator,HALF_EDGE_DATA:new a.HalfEdgeDataTranslator,LOOP_DATA:new s.LoopDataTranslator,META_DATA:new u.MetaDataTranslator,SHELL_DATA:new c.ShellDataTranslator,VERTEX_DATA:new l.VertexDataTranslator,GENERAL_DATA:new A.GeneralDataTranslator,GENERAL_DATA_LIST:new A.GeneralDataListTranslator}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==n(t)&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=r(3),u=r(67),c=r(711),l=r(422),g=r(353),f=r(284),h=r(354),p=r(239),d=r(522),I=r(423),y=r(1101),C=r(1102),E=r(1103),B=r(1104),v=r(1105),m=r(1106),Q=r(1107),b=r(1108),_=function(e){function t(){return o(this,t),A(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),i(t,[{key:"realTo",value:function(e){var t=new u.brep.PBGeneralData;if(e instanceof I.VertexData)t.vertexData=(new b.VertexDataTranslator).to(e);else if(e instanceof f.HalfEdgeData)t.halfEdgeData=(new B.HalfEdgeDataTranslator).to(e);else if(e instanceof l.Edge2Data)t.edge2Data=(new C.Edge2DataTranslator).to(e);else if(e instanceof h.LoopData)t.loopData=(new v.LoopDataTranslator).to(e);else if(e instanceof c.EdgeData)t.edgeData=(new y.EdgeDataTranslator).to(e);else if(e instanceof g.FaceData)t.faceData=(new E.FaceDataTranslator).to(e);else if(e instanceof d.ShellData)t.shellData=(new Q.ShellDataTranslator).to(e);else{if(!(e instanceof p.MetaData))throw"not supported";t.metaData=(new m.MetaDataTranslator).to(e)}return t}},{key:"realFrom",value:function(e){if(e.vertexData)return(new b.VertexDataTranslator).from(e.vertexData);if(e.halfEdgeData)return(new B.HalfEdgeDataTranslator).from(e.halfEdgeData);if(e.edge2Data)return(new C.Edge2DataTranslator).from(e.edge2Data);if(e.loopData)return(new v.LoopDataTranslator).from(e.loopData);if(e.edgeData)return(new y.EdgeDataTranslator).from(e.edgeData);if(e.faceData)return(new E.FaceDataTranslator).from(e.faceData);if(e.shellData)return(new Q.ShellDataTranslator).from(e.shellData);if(e.metaData)return(new m.MetaDataTranslator).from(e.metaData);throw"not supported"}}]),t}(s.Translator);t.GeneralDataTranslator=_;var S=function(e){function t(){return o(this,t),A(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),i(t,[{key:"realTo",value:function(e){var t=new u.brep.PBGeneralDataList;return t.generalDatas=(new _).toList(e),t}},{key:"realFrom",value:function(e){return(new _).fromList(e.generalDatas)}}]),t}(s.Translator);t.GeneralDataListTranslator=S},function(e,t,r){"use strict";var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var i=r(711),o=r(422),A=r(353),a=r(284),s=r(354),u=r(239),c=r(522),l=r(423),g=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return n(e,null,[{key:"readMetaData",value:function(e){var t=new u.MetaData(void 0,void 0);return Object.assign(t,e),t}},{key:"readShellData",value:function(e){var t=new c.ShellData(void 0);return Object.assign(t,e),t}},{key:"readFaceData",value:function(e){var t=new A.FaceData(void 0);return Object.assign(t,e),t}},{key:"readLoopData",value:function(e){var t=new s.LoopData(void 0);return Object.assign(t,e),t}},{key:"readEdgeData",value:function(e){var t=new i.EdgeData(void 0);return Object.assign(t,e),t}},{key:"readEdge2Data",value:function(e){var t=new o.Edge2Data(void 0);return Object.assign(t,e),t}},{key:"readHalfEdgeData",value:function(e){var t=new a.HalfEdgeData(void 0);return Object.assign(t,e),t}},{key:"readVertexData",value:function(e){var t=new l.VertexData(void 0);return Object.assign(t,e),t}}]),e}();t.Json=g},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(239);function i(e){var t=e.metaData;return t?t.version:void 0}function o(e){var t=e.metaData;return t?t.toolVersion:void 0}function A(e){for(var t=new Map,r=0,n=e.length;r<n;r++){var i=e[r];t.set(i.refId,i)}return t}t.migrateBrepData=function(e){return function(e){var t=i(e);if(t&&n.MetaData.versionCompare(t,"1.9.0")>=0)return e;for(var r=A(e.hedgeData),a=e.edge2Data,s=0,u=a.length;s<u;s++){var c=a[s],l=c.halfEdgeIds;if(!(l.length<=0)){for(var g=void 0,f=0,h=l.length;f<h&&!(g=r.get(l[f]));f++);if(g){c.vertexAId=g.vertexAId,c.vertexBId=g.vertexBId;for(var p=0,d=l.length;p<d;p++){var I=l[p];if(I!==g.refId){var y=r.get(I);y&&(y.vertexAId!==c.vertexAId?y.reversed=!0:y.reversed=!1)}}}}}for(var C=e.edgeData,E=0,B=C.length;E<B;E++){var v=C[E],m=v.halfEdge1Id,Q=v.halfEdge2Id,b=void 0;if(null!=m&&(b=r.get(m)),b||null==Q||(b=r.get(Q)),b&&(v.vertexAId=b.vertexAId,v.vertexBId=b.vertexBId,b.reversed=!1,null!=Q&&Q!==b.refId)){var _=r.get(Q);_.vertexAId!==v.vertexAId?_.reversed=!0:_.reversed=!1}}var S=o(e);return e.metaData=new n.MetaData("1.9.0",S),e}(function(e){var t=i(e);if(t&&n.MetaData.versionCompare(t,"1.8.9")>=0)return e;for(var r=A(e.faceData),a=A(e.loopData),s=A(e.hedgeData),u=e.originMetaData,c=o(e),l=new n.MetaData("1.8.9",c),g=e.shellData,f=e.vertexData,h=[],p=[],d=[],I=[],y=[],C=0,E=g.length;C<E;C++)for(var B=g[C].faceIds,v=0,m=B.length;v<m;v++){var Q=B[v],b=r.get(Q);b&&h.push(b)}for(var _=0,S=h.length;_<S;_++){var w=h[_],D=w.outerLoopId,R=a.get(D);if(R){p.push(R);var M=w.innerLoopIds;if(M)for(var x=0,P=M.length;x<P;x++){var T=M[x],F=a.get(T);F&&p.push(F)}}}for(var O=0,L=p.length;O<L;O++)for(var N=p[O].halfEdgeIds,k=0,G=N.length;k<G;k++){var U=N[k],j=s.get(U);j&&d.push(j)}for(var V=new Set,H=0,Y=d.length;H<Y;H++){var K=d[H];V.add(K.refId)}for(var q=new Map,J=0,W=e.edgeData.length;J<W;J++){var z=e.edgeData[J],X=z.halfEdge1Id;if(V.has(X)){var Z=q.get(X);Z&&Z!==z?z.halfEdge1Id=void 0:q.set(X,z)}else z.halfEdge1Id=void 0;var $=z.halfEdge2Id;if(V.has($)){var ee=q.get($);ee&&ee!==z?z.halfEdge2Id=void 0:q.set($,z)}else z.halfEdge2Id=void 0;(z.halfEdge1Id||z.halfEdge2Id)&&I.push(z)}for(var te=0,re=e.edge2Data.length;te<re;te++){for(var ne=e.edge2Data[te],ie=[],oe=ne.halfEdgeIds,Ae=0,ae=oe.length;Ae<ae;Ae++){var se=oe[Ae];if(V.has(se)){var ue=q.get(se);ue&&ue!==ne||(q.set(se,ne),ie.push(se))}}ie.length>0&&(ne.halfEdgeIds=ie,y.push(ne))}return{originMetaData:u,metaData:l,shellData:g,faceData:h,loopData:p,edgeData:I,edge2Data:y,hedgeData:d,vertexData:f}}(function(e){for(var t=e,r=void 0,n=void 0,i=[],o=[],A=[],a=[],s=[],u=[],c=[],l=0,g=t.length;l<g;l++){var f=t[l];switch(f.tp){case"M":r=f,n=f;break;case"S":i.push(f);break;case"F":o.push(f);break;case"L":A.push(f);break;case"E":a.push(f);break;case"E2":s.push(f);break;case"H":u.push(f);break;case"V":c.push(f)}}return{metaData:r,originMetaData:n,shellData:i,faceData:o,loopData:A,edgeData:a,edge2Data:s,hedgeData:u,vertexData:c}}(e)))},t.getMetaVersion=i,t.getMetaToolVersion=o,t.getOriginMetaVersion=function(e){var t=e.originMetaData;return t?t.version:void 0}},function(e,t,r){"use strict";var n=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var r=[],n=!0,i=!1,o=void 0;try{for(var A,a=e[Symbol.iterator]();!(n=(A=a.next()).done)&&(r.push(A.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{!n&&a.return&&a.return()}finally{if(i)throw o}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};Object.defineProperty(t,"__esModule",{value:!0});var i=r(3),o=r(239),A=r(1109);function a(e){var t=e.getEdges(),r=!0,n=!1,o=void 0;try{for(var A,a=t[Symbol.iterator]();!(r=(A=a.next()).done);r=!0){var s=A.value;if(s.curve instanceof i.Circle3d){var u=s.curve,c=s.vertexA,l=s.vertexB,g=u.getParam(c.point),f=u.getParam(l.point);i.Num.isBigger(g,f)&&s.swapVertices()}}}catch(e){n=!0,o=e}finally{try{!r&&a.return&&a.return()}finally{if(n)throw o}}}function s(e){!function(e){for(var t=function(e){var t=e.getVertices(),r=new Map,i=[],o=!0,A=!1,a=void 0;try{for(var s,u=t[Symbol.iterator]();!(o=(s=u.next()).done);o=!0){var c=s.value,l=!1,g=!0,f=!1,h=void 0;try{for(var p,d=r[Symbol.iterator]();!(g=(p=d.next()).done);g=!0){var I=n(p.value,2),y=I[0],C=I[1];if(c.point.isEqual(y.point)){C.push(c),l=!0;break}}}catch(e){f=!0,h=e}finally{try{!g&&d.return&&d.return()}finally{if(f)throw h}}l||r.set(c,[c])}}catch(e){A=!0,a=e}finally{try{!o&&u.return&&u.return()}finally{if(A)throw a}}var E=!0,B=!1,v=void 0;try{for(var m,Q=r[Symbol.iterator]();!(E=(m=Q.next()).done);E=!0){var b=n(m.value,2);(C=b[1]).length>1&&i.push(C)}}catch(e){B=!0,v=e}finally{try{!E&&Q.return&&Q.return()}finally{if(B)throw v}}return i}(e),r=new Map,i=0,o=t.length;i<o;i++)for(var A=t[i],a=A[0],s=1,u=A.length;s<u;s++)r.set(A[s],a);if(r.size<=0)return;var c=e.getEdges(),l=!0,g=!1,f=void 0;try{for(var h,p=c[Symbol.iterator]();!(l=(h=p.next()).done);l=!0){var d=h.value,I=d.vertexA,y=d.vertexB;r.has(I)&&(d.vertexA=r.get(I)),r.has(y)&&(d.vertexB=r.get(y))}}catch(e){g=!0,f=e}finally{try{!l&&p.return&&p.return()}finally{if(g)throw f}}}(e);for(var t=function(e){for(var t=[],r=e.faces,n=0,i=r.length;n<i;n++)for(var o=r[n].getLoops(),A=0,a=o.length;A<a;A++)for(var s=o[A].halfEdges,u=0,c=s.length;u<c;u++){var l=s[u];l.vertexA===l.vertexB&&t.push(l)}return t}(e),r=0,i=t.length;r<i;r++){u(t[r])}}function u(e){var t=e.loop;t.removeHalfEdge(e),t.halfEdges.length<=0&&A.quickPurgeLoop(t);var r=e.edge;r.removeHalfEdge(e),r.halfEdges.length<=0&&r.dispose()}t.postMigrateShells=function(e,t){!function(e,t){if(t&&o.MetaData.versionCompare(t,"1.9.0")>=0)return;(function(e){for(var t=0,r=e.length;t<r;t++){a(e[t])}})(e),function(e){for(var t=0,r=e.length;t<r;t++){s(e[t])}}(e)}(e,t),function(e,t){if(t&&o.MetaData.versionCompare(t,"1.10.0")>=0)return;!function(e){for(var t=0,r=e.length;t<r;t++)for(var n=e[t].faces,o=0,A=n.length;o<A;o++){var a=n[o],s=a.surface,u=!0;s&&s instanceof i.CylindricalSurface&&a.outerLoop&&(u=a.outerLoop.isCCW(s)),a.setOuterLoop(a.outerLoop,u)}}(e)}(e,t)}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(e,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==n(t)&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.x=e,i.y=r,i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(r(241).MIxBaseGeom);t.MIxVector2d=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(67),i=r(2038),o=r(523),A=r(160),a=r(285),s=r(715),u=r(1117);function c(e){for(var t=[],r=[],n=0,i=e.length;n<i;n++){var o=e[n];if(o instanceof A.Shell){if(o.faces.length<=0)continue;r.push(a.MIxShell.create(o))}t.push(u.topoObjToMIxEntity(o))}return s.BrepValidatorManager.validateShellsTopo(r,!0),t}t.toPBBrep=function(e){var t=e.map((function(e){return e.rawObject()})),r=o.extractIndependentTopoObjs(t);return s.BrepValidatorManager.validateShellsTopo(r.shells.map((function(e){return a.MIxShell.create(e)})),!0),i.ProtoSerializer.toPBBrep(t)},t.toBytes=function(e){var t=this.toPBBrep(e);return n.brep.PBBrep.encode(t).finish()},t.shellsToPBBrep=function(e){return s.BrepValidatorManager.validateShellsTopo(e,!0),i.ProtoSerializer.shellsToPBBrep(e.map((function(e){return e.rawObject()})))},t.shellsToBytes=function(e){var t=this.shellsToPBBrep(e);return n.brep.PBBrep.encode(t).finish()},t.fromPBBrep=function(e){return c(i.ProtoSerializer.fromPBBrep(e))},t.fromBytes=function(e){return c(i.ProtoSerializer.fromBytes(e))},t.shellsFromPBBrep=function(e){var t=i.ProtoSerializer.shellsFromPBBrep(e).map((function(e){return a.MIxShell.create(e)}));return s.BrepValidatorManager.validateShellsTopo(t,!0),t},t.shellsFromBytes=function(e){var t=i.ProtoSerializer.shellsFromBytes(e).map((function(e){return a.MIxShell.create(e)}));return s.BrepValidatorManager.validateShellsTopo(t,!0),t}},function(e,t,r){"use strict";var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function i(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0});var o=r(3),A=r(67),a=r(239),s=r(2039),u=r(2047),c=r(2048),l=r(160),g=r(2049),f=r(709),h=r(523),p=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return n(e,null,[{key:"toPBBrep",value:function(e,t){t=t||new a.MetaData;var r=c.SerializeContext.buildContextByTopoObjs(e);return this._toPBBrepImpl(r,t)}},{key:"toBytes",value:function(e,t){var r=this.toPBBrep(e,t);return A.brep.PBBrep.encode(r).finish()}},{key:"shellsToPBBrep",value:function(e,t){t=t||new a.MetaData;var r=c.SerializeContext.buildContextByShells(e);return this._toPBBrepImpl(r,t)}},{key:"shellsToBytes",value:function(e,t){var r=this.shellsToPBBrep(e);return A.brep.PBBrep.encode(r).finish()}},{key:"fromPBBrep",value:function(e){var t=new u.DeserializeContext,r=this.getMetaData(e),n=g.ProtoMigrate.migratePBBrep(e);t.curves=o.ProtocolTranslators.CURVE3D.fromList(n.curves),t.surfaces=o.ProtocolTranslators.SURFACE.fromList(n.surfaces),t.vertices=s.BrepTranslators.VERTEX.fromList(n.vertices,t),t.edges=s.BrepTranslators.EDGE.fromList(n.edges,t),t.faces=s.BrepTranslators.FACE.fromList(n.faces,t),t.shells=s.BrepTranslators.SHELL.fromList(n.shells,t);var A={shells:t.shells,faces:t.faces,edges:t.edges,vertices:t.vertices,loops:[],halfEdges:[]},a=h.extractIndependentTopoObjs2(A);f.postProcessTopoObjects(a,r?r.version:void 0);var c=[];return c.push.apply(c,i(a.shells)),c.push.apply(c,i(a.faces)),c.push.apply(c,i(a.loops)),c.push.apply(c,i(a.halfEdges)),c.push.apply(c,i(a.edges)),c.push.apply(c,i(a.vertices)),c}},{key:"fromBytes",value:function(e){try{var t=A.brep.PBBrep.decode(e);return this.fromPBBrep(t)}catch(e){return[]}}},{key:"shellsFromPBBrep",value:function(e){for(var t=this.fromPBBrep(e),r=[],n=0,i=t.length;n<i;n++){var o=t[n];o instanceof l.Shell&&r.push(o)}return r}},{key:"shellsFromBytes",value:function(e){try{var t=A.brep.PBBrep.decode(e);return this.shellsFromPBBrep(t)}catch(e){return[]}}},{key:"getMetaData",value:function(e){var t=e.metaData;if(t)return s.BrepTranslators.META.from(t)}},{key:"_toPBBrepImpl",value:function(e,t){var r=new A.brep.PBBrep;return r.metaData=s.BrepTranslators.META.to(t),r.curves=o.ProtocolTranslators.CURVE3D.toList(e.curves),r.surfaces=o.ProtocolTranslators.SURFACE.toList(e.surfaces),r.vertices=s.BrepTranslators.VERTEX.toList(e.vertices,e),r.edges=s.BrepTranslators.EDGE.toList(e.edges,e),r.faces=s.BrepTranslators.FACE.toList(e.faces,e),r.shells=s.BrepTranslators.SHELL.toList(e.shells,e),r}}]),e}();t.ProtoSerializer=p},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2040),i=r(2041),o=r(2042),A=r(2043),a=r(2046);t.BrepTranslators={META:new n.MetaTranslator,VERTEX:new i.VertexTranslator,EDGE:new o.EdgeTranslator,FACE:new A.FaceTranslator,SHELL:new a.ShellTranslator}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==n(t)&&"function"!=typeof t?e:t}Object.defineProperty(t,"__esModule",{value:!0});var a=r(3),s=r(239),u=r(67),c=function(e){function t(){return o(this,t),A(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"realTo",value:function(e){var t=new u.brep.PBMeta;return e.version&&e.version.length>0&&(t.version=e.version),t.toolVersion=e.toolVersion,t}},{key:"realFrom",value:function(e){var t=new s.MetaData;return e.version&&e.version.length>0&&(t.version=e.version),e.toolVersion&&e.toolVersion.length>0&&(t.toolVersion=e.toolVersion),t}}]),t}(a.Translator);t.MetaTranslator=c},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==n(t)&&"function"!=typeof t?e:t}Object.defineProperty(t,"__esModule",{value:!0});var a=r(67),s=r(282),u=r(358),c=r(3),l=function(e){function t(){return o(this,t),A(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"realTo",value:function(e){var t=new a.brep.PBVertex;return t.base=u.toPBTopoObjBase(e),t.position=c.ProtocolTranslators.POINT3D.to(e.point),t}},{key:"realFrom",value:function(e){var t=new s.Vertex(null);return e.base&&u.fromPBTopoObjBase(e.base,t),e.position&&(t.point=c.ProtocolTranslators.POINT3D.from(e.position)),t}}]),t}(c.TranslatorWithContext);t.VertexTranslator=l},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==n(t)&&"function"!=typeof t?e:t}Object.defineProperty(t,"__esModule",{value:!0});var a=r(3),s=r(67),u=r(235),c=r(358),l=function(e){function t(){return o(this,t),A(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"realTo",value:function(e,t){var r=new s.brep.PBEdge;r.base=c.toPBTopoObjBase(e),r.crvIndex=t.getEdgeCurveIndex(e);var n=e.vertexA;n&&(r.vAIndex=t.getVertexIndex(n));var i=e.vertexB;return i&&(r.vBIndex=t.getVertexIndex(i)),r}},{key:"realFrom",value:function(e,t){var r=new u.Edge(null,null,null);if(e.base&&c.fromPBTopoObjBase(e.base,r),e.vAIndex){var n=t.getVertex(e.vAIndex);n&&(r.vertexA=n)}if(e.vBIndex){var i=t.getVertex(e.vBIndex);i&&(r.vertexB=i)}var o=t.getCurve3d(e.crvIndex||0);return o?r.curve=o:r.vertexA&&r.vertexB&&(r.curve=a.Line3d.fromSegment(r.vertexA.point,r.vertexB.point)),r}}]),t}(a.TranslatorWithContext);t.EdgeTranslator=l},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==n(t)&&"function"!=typeof t?e:t}Object.defineProperty(t,"__esModule",{value:!0});var a=r(3),s=r(67),u=r(237),c=r(2044),l=r(358),g=function(e){function t(){return o(this,t),A(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"realTo",value:function(e,r){var n=new s.brep.PBFace;n.base=l.toPBTopoObjBase(e),n.srfIndex=r.getFaceSurfaceIndex(e),n.sameDir=e.sameDir,e.outerLoop&&(n.outerLoop=t._loopTranslator.to(e.outerLoop,r));var i=e.innerLoops;return i&&i.length>0&&(n.innerLoops=t._loopTranslator.toList(i,r)),n}},{key:"realFrom",value:function(e,r){var n=new u.Face(null);if(e.base&&l.fromPBTopoObjBase(e.base,n),e.srfIndex){var i=r.getSurface(e.srfIndex);i&&(n.surface=i)}var o=e.sameDir||!1;if(e.outerLoop){var A=t._loopTranslator.from(e.outerLoop,r);n.setOuterLoop(A,o)}if(e.innerLoops)for(var a=t._loopTranslator.fromList(e.innerLoops,r),s=0,c=a.length;s<c;s++)n.addInnerLoop(a[s]);return n}}]),t}(a.TranslatorWithContext);g._loopTranslator=new c.LoopTranslator,t.FaceTranslator=g},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==n(t)&&"function"!=typeof t?e:t}Object.defineProperty(t,"__esModule",{value:!0});var a=r(3),s=r(67),u=r(283),c=r(2045),l=r(358),g=function(e){function t(){return o(this,t),A(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"realTo",value:function(e,r){var n=new s.brep.PBLoop;return n.base=l.toPBTopoObjBase(e),n.halfEdges=t._heTranslator.toList(e.halfEdges,r),n}},{key:"realFrom",value:function(e,r){var n=new u.Loop;if(e.base&&l.fromPBTopoObjBase(e.base,n),e.halfEdges){var i=t._heTranslator.fromList(e.halfEdges,r);n.buildLoop(i)}return n}}]),t}(a.TranslatorWithContext);g._heTranslator=new c.HalfEdgeTranslator,t.LoopTranslator=g},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==n(t)&&"function"!=typeof t?e:t}Object.defineProperty(t,"__esModule",{value:!0});var a=r(3),s=r(67),u=r(238),c=r(358),l=function(e){function t(){return o(this,t),A(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"realTo",value:function(e,t){var r=new s.brep.PBHalfEdge;r.base=c.toPBTopoObjBase(e);var n=e.edge;return n&&(r.edgeIndex=t.getEdgeIndex(n)),r.reversed=e.reversed,r}},{key:"realFrom",value:function(e,t){var r=new u.HalfEdge(null);if(e.base&&c.fromPBTopoObjBase(e.base,r),e.edgeIndex){var n=t.getEdge(e.edgeIndex);n&&n.addHalfEdge(r)}return e.reversed&&(r.reversed=e.reversed),r}}]),t}(a.TranslatorWithContext);t.HalfEdgeTranslator=l},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==n(t)&&"function"!=typeof t?e:t}Object.defineProperty(t,"__esModule",{value:!0});var a=r(3),s=r(67),u=r(160),c=r(358),l=function(e){function t(){return o(this,t),A(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"realTo",value:function(e,t){var r=new s.brep.PBShell;r.base=c.toPBTopoObjBase(e);for(var n=e.faces,i=new Array(n.length),o=0,A=n.length;o<A;o++)i[o]=t.getFaceIndex(n[o]);return r.faceIndices=i,r}},{key:"realFrom",value:function(e,t){var r=new u.Shell;e.base&&c.fromPBTopoObjBase(e.base,r);var n=e.faceIndices;if(n)for(var i=0,o=n.length;i<o;i++){var A=t.getFace(n[i]);A&&r.addFace(A)}return r}}]),t}(a.TranslatorWithContext);t.ShellTranslator=l},function(e,t,r){"use strict";var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._curves=[],this._surfaces=[],this._vertices=[],this._edges=[],this._faces=[],this._shells=[]}return n(e,[{key:"getCurve3d",value:function(e){if(!(e<=0))return this._curves.length>=e?this._curves[e-1]:void 0}},{key:"getSurface",value:function(e){if(!(e<=0))return this._surfaces.length>=e?this._surfaces[e-1]:void 0}},{key:"getVertex",value:function(e){if(!(e<=0))return this._vertices.length>=e?this._vertices[e-1]:void 0}},{key:"getEdge",value:function(e){if(!(e<=0))return this._edges.length>=e?this._edges[e-1]:void 0}},{key:"getFace",value:function(e){if(!(e<=0))return this._faces.length>=e?this._faces[e-1]:void 0}},{key:"getShell",value:function(e){if(!(e<=0))return this._shells.length>=e?this._shells[e-1]:void 0}},{key:"curves",get:function(){return this._curves},set:function(e){this._curves=e}},{key:"surfaces",get:function(){return this._surfaces},set:function(e){this._surfaces=e}},{key:"vertices",get:function(){return this._vertices},set:function(e){this._vertices=e}},{key:"edges",get:function(){return this._edges},set:function(e){this._edges=e}},{key:"faces",get:function(){return this._faces},set:function(e){this._faces=e}},{key:"shells",get:function(){return this._shells},set:function(e){this._shells=e}}]),e}();t.DeserializeContext=i},function(e,t,r){"use strict";var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var i=r(3),o=r(282),A=r(235),a=r(237),s=r(160),u=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._curves=[],this._surfaces=[],this._vertices=[],this._edges=[],this._faces=[],this._shells=[]}return n(e,[{key:"getEdgeCurveIndex",value:function(t){return e.getCurveIndex(t)}},{key:"getFaceSurfaceIndex",value:function(t){return e.getSurfaceIndex(t)}},{key:"getVertexIndex",value:function(t){return e.getSelfIndex(t)}},{key:"getEdgeIndex",value:function(t){return e.getSelfIndex(t)}},{key:"getFaceIndex",value:function(t){return e.getSelfIndex(t)}},{key:"getShellIndex",value:function(t){return e.getSelfIndex(t)}},{key:"addVertex",value:function(t){var r=e.getOrCreateTempMap(t);r[e.SELF_IDX]||(this._vertices.push(t),r[e.SELF_IDX]=this._vertices.length)}},{key:"addEdgeAndCurve",value:function(t){var r=e.getOrCreateTempMap(t);if(!r[e.SELF_IDX]){this._edges.push(t),r[e.SELF_IDX]=this._edges.length;var n=t.curve;!n||n instanceof i.Line3d||(this._curves.push(n),r[e.CRV_IDX]=this._curves.length)}}},{key:"addFaceAndSurface",value:function(t){var r=e.getOrCreateTempMap(t);if(!r[e.SELF_IDX]){this._faces.push(t),r[e.SELF_IDX]=this._faces.length;var n=t.surface;n&&(this._surfaces.push(n),r[e.SURF_IDX]=this._surfaces.length)}}},{key:"addShell",value:function(t){var r=e.getOrCreateTempMap(t);r[e.SURF_IDX]||(this._shells.push(t),r[e.SURF_IDX]=this._shells.length)}},{key:"curves",get:function(){return this._curves}},{key:"surfaces",get:function(){return this._surfaces}},{key:"vertices",get:function(){return this._vertices}},{key:"edges",get:function(){return this._edges}},{key:"faces",get:function(){return this._faces}},{key:"shells",get:function(){return this._shells}}],[{key:"buildContextByShells",value:function(t){for(var r=new e,n=0,i=t.length;n<i;n++){var o=t[n];this.clearTempMap(o);var A=o.faces;this.clearTempMaps(A);var a=o.getEdgesAndVertices(),s=a.edges;this.clearTempMaps(s);var u=a.vertices;this.clearTempMaps(u),r.addShell(o);for(var c=0,l=A.length;c<l;c++)r.addFaceAndSurface(A[c]);for(var g=0,f=s.length;g<f;g++)r.addEdgeAndCurve(s[g]);for(var h=0,p=u.length;h<p;h++)r.addVertex(u[h])}return r}},{key:"buildContextByTopoObjs",value:function(t){for(var r=[],n=[],i=[],u=[],c=0,l=t.length;c<l;c++){var g=t[c];if(g instanceof a.Face){n.push(g);var f=g.getEdges(),h=!0,p=!1,d=void 0;try{for(var I,y=f[Symbol.iterator]();!(h=(I=y.next()).done);h=!0){var C=I.value;i.push(C)}}catch(e){p=!0,d=e}finally{try{!h&&y.return&&y.return()}finally{if(p)throw d}}var E=g.getVertices(),B=!0,v=!1,m=void 0;try{for(var Q,b=E[Symbol.iterator]();!(B=(Q=b.next()).done);B=!0){var _=Q.value;u.push(_)}}catch(e){v=!0,m=e}finally{try{!B&&b.return&&b.return()}finally{if(v)throw m}}}else if(g instanceof A.Edge)i.push(g),g.vertexA&&u.push(g.vertexA),g.vertexB&&u.push(g.vertexB);else if(g instanceof o.Vertex)u.push(g);else if(g instanceof s.Shell){r.push(g);for(var S=g.faces,w=0,D=S.length;w<D;w++)n.push(S[w]);for(var R=g.getEdgesAndVertices(),M=R.edges,x=R.vertices,P=0,T=M.length;P<T;P++)i.push(M[P]);for(var F=0,O=x.length;F<O;F++)u.push(x[F])}}this.clearTempMaps(r),this.clearTempMaps(n),this.clearTempMaps(i),this.clearTempMaps(u);for(var L=new e,N=0,k=r.length;N<k;N++)L.addShell(r[N]);for(var G=0,U=n.length;G<U;G++)L.addFaceAndSurface(n[G]);for(var j=0,V=i.length;j<V;j++)L.addEdgeAndCurve(i[j]);for(var H=0,Y=u.length;H<Y;H++)L.addVertex(u[H]);return L}},{key:"getOrCreateTempMap",value:function(e){var t=e.temp;return t||(t=new Object,e.temp=t),t}},{key:"clearTempMaps",value:function(e){for(var t=0,r=e.length;t<r;t++)this.clearTempMap(e[t])}},{key:"clearTempMap",value:function(e){var t=e.temp;t&&(delete t[this.SELF_IDX],delete t[this.CRV_IDX],delete t[this.SURF_IDX])}},{key:"getSelfIndex",value:function(e){var t=e.temp;return t&&t[this.SELF_IDX]||0}},{key:"getCurveIndex",value:function(e){var t=e.temp;return t&&t[this.CRV_IDX]||0}},{key:"getSurfaceIndex",value:function(e){var t=e.temp;return t&&t[this.SURF_IDX]||0}}]),e}();u.SELF_IDX="$PB_SELF_IDX",u.CRV_IDX="$PB_CRV_IDX",u.SURF_IDX="$PB_SURF_IDX",t.SerializeContext=u},function(e,t,r){"use strict";var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return n(e,null,[{key:"migratePBBrep",value:function(e){return e}}]),e}();t.ProtoMigrate=i},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==n(t)&&"function"!=typeof t?e:t}function A(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var s=r(3),u=r(353),c=r(284),l=r(354),g=r(710),f=r(238),h=r(283),p=r(424),d=r(1109),I=function(){function e(){a(this,e),this.errors=[]}return i(e,[{key:"hasError",value:function(){return this.errors.length>0}},{key:"errorMessage",value:function(){for(var e="",t=0,r=this.errors.length;t<r;t++){var n=this.errors[t];e+="Error:{desc:"+n.message()+"; context:"+n.context()+"}\n"}return e}},{key:"tryToFix",value:function(){for(var e=0,t=this.errors.length;e<t;e++){var r=this.errors[e];r.isAmendable?r.amend():r.operation()}}},{key:"validateShell",value:function(e){for(var t=e.faces,r=0,n=t.length;r<n;r++){var i=t[r];i.shell!==e&&this.addError(new C(i,e)),this.validateFace(i)}var o=e.getVertices(),A=!0,a=!1,s=void 0;try{for(var u,c=o[Symbol.iterator]();!(A=(u=c.next()).done);A=!0)for(var l=u.value.getLeadOutHalfEdges(),g=0,f=l.length;g<f;g++){var h=l[g];h.isAdopted()||this.addError(new M(h))}}catch(e){a=!0,s=e}finally{try{!A&&c.return&&c.return()}finally{if(a)throw s}}}},{key:"validateFace",value:function(e){e!==e.outerLoop.face&&this.addError(new v(e.outerLoop,e)),this.validateLoop(e.outerLoop);for(var t=e.innerLoops,r=0,n=t.length;r<n;r++){var i=t[r];e!==i.face&&this.addError(new v(i,e))}this.validateInnerLoops(t,e)}},{key:"validateLoop",value:function(e){var t=e.halfEdges,r=t.length;if(0!==r)for(var n=0;n<r;n++){var i=(n+1)%r,o=t[n],A=t[i];if(o.loop!==e&&this.addError(new m(e,o)),!s.Num.isEqual(o.getBoundedCurve().length,0)||o.edge&&o.edge.degenerated||this.addError(new x(o)),o.vertexB!==A.vertexA&&this.addError(new E(e,o,A)),o.next!==A&&this.addError(new Q(o,A)),A.prev!==o&&this.addError(new b(A,o)),o.edge&&-1!==o.edge.halfEdges.indexOf(o))for(var a=o.siblings(),u=0,c=a.length;u<c;u++){var l=a[u];null!==l&&(o.edge!==l.edge&&this.addError(new D(o,l)),l.vertexB!==o.vertexA&&l.vertexB!==o.vertexB&&this.addError(new S(o,l)),l.vertexA!==o.vertexA&&l.vertexA!==o.vertexB&&this.addError(new _(o,l)))}else this.addError(new w(o))}else this.addError(new B(e))}},{key:"validateInnerLoops",value:function(e,t){for(var r=0,n=e.length;r<n;r++){var i=e[r];this.validateLoop(i)}if(t.surface instanceof s.Plane)for(var o=t.outerLoop.halfEdges.map((function(e){return e.getBoundedCurve()})),A=t.innerLoops.map((function(e){return e.halfEdges.map((function(e){return e.getBoundedCurve()}))})),a=t.surface.faceToUV({contour:o,holes:A}),u=new s.GeomLoop2d(a.contour),c=0;c<a.holes.length;c++){var l=new s.GeomLoop2d(a.holes[c]);u.containsLoop(l,!0)||this.addError(new R(e[c],t))}}},{key:"addError",value:function(e){this.errors.push(e)}}],[{key:"validateToConsole",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=new e;if(n.validateShell(t),0===n.errors.length)return p.consoleLogInDev("BREP is Valid."),!0;for(var i=n.errors,o=0,A=i.length;o<A;o++){var a=i[o];p.consoleLogInDev(a.message())}return r&&n.tryToFix(),!1}}]),e}();t.BREPValidator=I;var y=function(){function e(){a(this,e),this.isAmendable=!1}return i(e,[{key:"message",value:function(){throw"not implemented"}},{key:"amend",value:function(){throw"not implemented"}},{key:"operation",value:function(){throw"not implemented"}},{key:"context",value:function(){throw"not implemented"}}]),e}(),C=function(e){function t(e,r){a(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.isAmendable=!0,n.face=e,n.shell=r,n}return A(t,e),i(t,[{key:"message",value:function(){return"face refers to a shell it doesn't belong to"}},{key:"amend",value:function(){this.face.shell=this.shell}},{key:"operation",value:function(){d.quickPurgeFace(this.face)}},{key:"context",value:function(){try{var e=new Map;u.FaceData.extractTopo(e,this.face);var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),E=function(e){function t(e,r,n){a(this,t);var i=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.isAmendable=!1,i.loop=e,i.halfEdge1=r,i.halfEdge2=n,i}return A(t,e),i(t,[{key:"message",value:function(){return"starting point of the following half edge should identically the same as ending of a half edge"}},{key:"amend",value:function(){throw"not implemented"}},{key:"operation",value:function(){d.quickPurgeLoop(this.loop)}},{key:"context",value:function(){try{var e=new Map;l.LoopData.extractTopo(e,this.loop);var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),B=function(e){function t(e){a(this,t);var r=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.loop=e,r}return A(t,e),i(t,[{key:"message",value:function(){return"loop has no half edge"}},{key:"amend",value:function(){throw"not implemented"}},{key:"operation",value:function(){d.quickPurgeLoop(this.loop)}},{key:"context",value:function(){try{var e=new Map;l.LoopData.extractTopo(e,this.loop);var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),v=function(e){function t(e,r){a(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.isAmendable=!0,n.loop=e,n.face=r,n}return A(t,e),i(t,[{key:"message",value:function(){return"loop refers to different face it belongs to"}},{key:"amend",value:function(){var e=this.face.outerLoop===this.loop,t=this.loop.face,r=!!t&&t.outerLoop===this.loop,n=!!t&&t.innerLoops.indexOf(this.loop)>=0;if(r||n){var i=this.loop.halfEdges.map((function(e){return new f.HalfEdge(e.edge,e.reversed)})),o=new h.Loop(i);e?this.face.setOuterLoop(o):(this.face.removeInnerLoop(this.loop),this.face.addInnerLoop(o));for(var A=0,a=i.length;A<a;A++)g.IdAssigner.assignToHalfEdge(i[A]);this.loop.face=t}else this.loop.face=this.face}},{key:"operation",value:function(){d.quickPurgeLoop(this.loop)}},{key:"context",value:function(){try{var e=new Map;u.FaceData.extractTopo(e,this.face),this.loop.face?u.FaceData.extractTopo(e,this.loop.face):l.LoopData.extractTopo(e,this.loop);var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),m=function(e){function t(e,r){a(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.isAmendable=!0,n.loop=e,n.halfEdge=r,n}return A(t,e),i(t,[{key:"message",value:function(){return"half edge refers to different loop it belongs to"}},{key:"amend",value:function(){this.halfEdge.loop=this.loop}},{key:"operation",value:function(){d.quickPurgeHalfEdge(this.halfEdge)}},{key:"context",value:function(){try{var e=new Map;l.LoopData.extractTopo(e,this.loop),c.HalfEdgeData.extractTopo(e,this.halfEdge);var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),Q=function(e){function t(e,r){a(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.isAmendable=!1,n.halfEdge=e,n.nextHalfEdge=r,n}return A(t,e),i(t,[{key:"message",value:function(){return"half edge's next pointer doesn't refer to real next half edge"}},{key:"amend",value:function(){throw"not implemented"}},{key:"operation",value:function(){d.quickPurgeLoop(this.halfEdge.loop)}},{key:"context",value:function(){try{var e=new Map;this.halfEdge.loop?l.LoopData.extractTopo(e,this.halfEdge.loop):(c.HalfEdgeData.extractTopo(e,this.halfEdge),c.HalfEdgeData.extractTopo(e,this.nextHalfEdge));var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),b=function(e){function t(e,r){a(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.isAmendable=!1,n.halfEdge=e,n.prevHalfEdge=r,n}return A(t,e),i(t,[{key:"message",value:function(){return"half edge's prev pointer doesn't refer to prior half edge"}},{key:"amend",value:function(){throw"not implemented"}},{key:"operation",value:function(){d.quickPurgeLoop(this.halfEdge.loop)}},{key:"context",value:function(){try{var e=new Map;this.halfEdge.loop?l.LoopData.extractTopo(e,this.halfEdge.loop):(c.HalfEdgeData.extractTopo(e,this.prevHalfEdge),c.HalfEdgeData.extractTopo(e,this.halfEdge));var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),_=function(e){function t(e,r){a(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.isAmendable=!1,n.halfEdge=e,n.sibling=r,n}return A(t,e),i(t,[{key:"message",value:function(){return"a sibling has incorrect start vertex"}},{key:"amend",value:function(){throw"not implemented"}},{key:"operation",value:function(){d.quickPurgeHalfEdge(this.sibling)}},{key:"context",value:function(){try{var e=new Map;c.HalfEdgeData.extractTopo(e,this.halfEdge),c.HalfEdgeData.extractTopo(e,this.sibling);var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),S=function(e){function t(e,r){a(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.isAmendable=!1,n.halfEdge=e,n.sibling=r,n}return A(t,e),i(t,[{key:"message",value:function(){return"a sibling has incorrect end vertex"}},{key:"amend",value:function(){throw"not implemented"}},{key:"operation",value:function(){d.quickPurgeHalfEdge(this.sibling)}},{key:"context",value:function(){try{var e=new Map;c.HalfEdgeData.extractTopo(e,this.halfEdge),c.HalfEdgeData.extractTopo(e,this.sibling);var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),w=function(e){function t(e){a(this,t);var r=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.isAmendable=!1,r.halfEdge=e,r}return A(t,e),i(t,[{key:"message",value:function(){return"half edge doesn't correctly refer to an edge"}},{key:"amend",value:function(){throw"not implemented"}},{key:"operation",value:function(){d.quickPurgeHalfEdge(this.halfEdge)}},{key:"context",value:function(){try{var e=new Map;c.HalfEdgeData.extractTopo(e,this.halfEdge);var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),D=function(e){function t(e,r){a(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.isAmendable=!0,n.halfEdge=e,n.sibling=r,n}return A(t,e),i(t,[{key:"message",value:function(){return"edge of sibling doesn't match to the half edge's edge"}},{key:"amend",value:function(){this.sibling.edge=this.halfEdge.edge}},{key:"operation",value:function(){d.quickPurgeHalfEdge(this.sibling)}},{key:"context",value:function(){try{var e=new Map;c.HalfEdgeData.extractTopo(e,this.halfEdge),c.HalfEdgeData.extractTopo(e,this.sibling);var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),R=function(e){function t(e,r){a(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.isAmendable=!1,n.innerLoop=e,n.face=r,n}return A(t,e),i(t,[{key:"message",value:function(){return"inner loop is outside of face's outer loop"}},{key:"amend",value:function(){throw"not implemented"}},{key:"operation",value:function(){d.quickPurgeLoop(this.innerLoop)}},{key:"context",value:function(){try{var e=new Map;this.innerLoop.face&&u.FaceData.extractTopo(e,this.innerLoop.face),l.LoopData.extractTopo(e,this.innerLoop);var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),M=function(e){function t(e){a(this,t);var r=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.isAmendable=!1,r.halfEdge=e,r}return A(t,e),i(t,[{key:"message",value:function(){return"half edge doesn't refer to any loop"}},{key:"amend",value:function(){throw"not implemented"}},{key:"operation",value:function(){d.quickPurgeHalfEdge(this.halfEdge)}},{key:"context",value:function(){try{var e=new Map;c.HalfEdgeData.extractTopo(e,this.halfEdge);var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),x=function(e){function t(e){a(this,t);var r=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.isAmendable=!1,r.halfEdge=e,r}return A(t,e),i(t,[{key:"message",value:function(){return"half edge with zero length"}},{key:"amend",value:function(){throw"not implemented"}},{key:"operation",value:function(){d.quickPurgeHalfEdge(this.halfEdge)}},{key:"context",value:function(){try{var e=new Map;c.HalfEdgeData.extractTopo(e,this.halfEdge);var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y)},function(e,t,r){"use strict";var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return n(e,null,[{key:"changeErrorHandler",value:function(t){e.errorHandler=t}},{key:"changeModelDataHandler",value:function(t){e.dataHandler=t}},{key:"onErrorOccurred",value:function(t,r){if(e.errorHandler){var n="geom-modeling-kernel:";r&&r.trim().length>0&&(n=n+"("+r.trim()+")"),e.errorHandler(t,n)}}},{key:"uploadErrorModelData",value:function(t,r){e.dataHandler&&e.dataHandler(t,r)}}]),e}();t.ErrorManager=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2053),i=r(357),o=r(285),A=r(1116);t.polygonizeShell=function(e,t,r){var a=n.Polygonize.polygonizeShell(e.rawObject(),t,r),s=o.MIxShell.create(a.shell),u=new Map;a.faceMap.forEach((function(e,t){var r=i.MIxFace.create(t),n=[];e.forEach((function(e){n.push(i.MIxFace.create(e))})),u.set(r,n)}));var c=new Map;return a.edgeMap.forEach((function(e,t){var r=A.MIxEdge.create(t),n=[];e.forEach((function(e){n.push(A.MIxEdge.create(e))})),c.set(r,n)})),{shell:s,faceMap:u,edgeMap:c}},t.polygonizeFace=function(e,t,r){var o=n.Polygonize.polygonizeFace(e.rawObject(),t,r),a=[];o.faces.forEach((function(e){a.push(i.MIxFace.create(e))}));var s=new Map;return o.edgeMap.forEach((function(e,t){var r=A.MIxEdge.create(t),n=[];e.forEach((function(e){n.push(A.MIxEdge.create(e))})),s.set(r,n)})),{faces:a,edgeMap:s}}},function(e,t,r){"use strict";var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var i=r(3),o=r(235),A=r(237),a=r(238),s=r(283),u=r(160),c=r(282),l=r(710),g=r(716),f=r(2054),h=r(2056),p=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return n(e,null,[{key:"polygonizeShell",value:function(t,r,n){var o=r||e.defaultNormTol,A=n||i.Tolerance.Tolerance.global,a=[],s=[],c=!0,g=!1,f=void 0;try{for(var h,p=t.faces[Symbol.iterator]();!(c=(h=p.next()).done);c=!0){var d=h.value;a.push(d);var I=e.polygonMeshOnFace(d,!1,o,A);if(I.isEmpty())return{shell:new u.Shell,faceMap:new Map,edgeMap:new Map};s.push(I)}}catch(e){g=!0,f=e}finally{try{!c&&p.return&&p.return()}finally{if(g)throw f}}var y=e.getResultMapByShell(t,s);e.mergeCoplanarFaceOnFaceList(y,A),e.mergeCollinearEdgeOnFace(y,A);var C=e.getEdgesFromShell(t),E=e.reversedMapInfo({faces:a,edges:C},y),B=new u.Shell;return E.faceList.forEach((function(e){B.addFace(e)})),l.IdAssigner.assignToShell(B),{shell:B,faceMap:E.faceMap,edgeMap:E.edgeMap}}},{key:"polygonizeFace",value:function(t,r,n){var o=r||e.defaultNormTol,A=n||i.Tolerance.Tolerance.global,a=e.polygonMeshOnFace(t,!0,o,A);if(a.isEmpty())return{faces:[],edgeMap:new Map};var s=e.getResultMapByFace(t,a);e.mergeCoplanarFaceOnFaceList(s,A),e.mergeCollinearEdgeOnFace(s,A);var u=e.getEdgesFromFace(t),c=e.reversedMapInfo({faces:[t],edges:u},s);return{faces:c.faceList,edgeMap:c.edgeMap}}},{key:"polygonMeshOnFace",value:function(t,r,n,o){o=o||i.Tolerance.Tolerance.global;var A=n;i.Num.isInRange(n,0,1,!0,!0,o.numTol)||(A=e.defaultNormTol);var a=t.outerLoop.halfEdges.map((function(e){return e.getBoundedCurve()})),s=t.innerLoops.map((function(e){return e.halfEdges.map((function(e){return e.getBoundedCurve()}))}));if(null===t.surface)return new g.PolygonMesh;var u=[];return u.push(t.outerLoop.halfEdges.map((function(e){return e.edge.degenerated}))),u.push.apply(u,function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}(t.innerLoops.map((function(e){return e.halfEdges.map((function(e){return e.edge.degenerated}))})))),r?f.PolygonMeshOnSurface.polygonMeshOnSingleSurface3d(a,s,u,t.surface,t.sameDir,A,o):f.PolygonMeshOnSurface.polygonMeshOnSurface3d(a,s,u,t.surface,t.sameDir,A,o)}},{key:"getResultMapByFace",value:function(t,r){if(t.surface instanceof i.Plane)return e.makeFaceByPolygonMeshWithPlane(r);var n=new u.Shell;return n.addFace(t),this.getResultMapByShell(n,[r])}},{key:"getResultMapByShell",value:function(t,r){var n=e.buildVertexIndex(t),i=new Array,o=[],A=e.buildEdgeIndex(t,i,o),a=h.PolygonMeshUtil.mergePolygonMesh(r,i,n,A,o);return a.pgm.isEmpty()?{faceIndexMap:new Map,edgeIndexMap:new Map}:e.makeFacesByPolygonMesh(a)}},{key:"buildVertexIndex",value:function(e){var t=[],r=e.getVertices(),n=0,i=new Map,o=!0,A=!1,a=void 0;try{for(var s,u=r[Symbol.iterator]();!(o=(s=u.next()).done);o=!0){var c=s.value;i.set(c,n++)}}catch(e){A=!0,a=e}finally{try{!o&&u.return&&u.return()}finally{if(A)throw a}}return e.faces.forEach((function(e){var r=e.getHalfEdges(),n=[];r.forEach((function(e){n.push(i.get(e.vertexA))})),t.push(n)})),t}},{key:"buildEdgeIndex",value:function(e,t,r){for(var n=Array.from(e.getEdges()),i=new Map,o=0,A=n.length;o<A;++o)i.set(n[o],o),t.push(n[o].getBoundedCurve());var a=e.faces,s=[];return a.forEach((function(e){var t=e.getHalfEdges(),n=[],o=[];t.forEach((function(e){var t=i.get(e.edge);n.push({index:t,isReversed:e.reversed}),o.push(e.reversed)})),s.push(n),r.push(o)})),s}},{key:"makeFaceByPolygonMeshWithPlane",value:function(t){if(!t.onPlane)return{faceIndexMap:new Map,edgeIndexMap:new Map};if(0===t.coords.length||1!==t.mSurfaces.length||1!==t.isSameDir.length||t.boundedIndices.length<1||t.boundedIndices.length!==t.boundedEdgePos.length)return{faceIndexMap:new Map,edgeIndexMap:new Map};var r=[];t.coords.forEach((function(e){r.push(new c.Vertex(e))})),e.setSoftTagWithVertex(t.boundedIndices,r);var n=new A.Face(t.mSurfaces[0]),i=t.coordIndices,o=e.makeLoopByVertexAndIndex(r,i[0]);n.setOuterLoop(o,t.isSameDir[0]);for(var a=1,s=i.length;a<s;++a){var u=e.makeLoopByVertexAndIndex(r,i[a]);if(null===u)return{faceIndexMap:new Map,edgeIndexMap:new Map};n.addInnerLoop(u)}var l=new Map;return l.set(n,0),{faceIndexMap:l,edgeIndexMap:e.setSoftTagWithEdge(t.boundedIndices,r)}}},{key:"makeFacesByPolygonMesh",value:function(t){var r=t.pgm.coords.length,n=t.pgm.coordIndices.length;if(0===r||0===n||t.pgm.markLoop.length!==n||t.pgm.isSameDir.length!==t.pgm.mSurfaces.length)return{faceIndexMap:new Map,edgeIndexMap:new Map};var i=[];t.pgm.coords.forEach((function(e){i.push(new c.Vertex(e))})),e.setSoftTagWithVertex(t.pgm.boundedIndices,i);for(var o=new Set,a=t.pgm.mSurfaces,s=t.pgm.coordIndices,u=new Map,l=0,g=0,f=0,h=s.length;f<h;f++){var p=t.pgm.markLoop[f];if(f>t.range[g]&&g++,-1!==p){var d=new A.Face(a[l]),I=e.makeLoopByVertexAndIndex(i,s[f]);for(d.setOuterLoop(I),f++;f<h&&1===t.pgm.markLoop[f];){var y=e.makeLoopByVertexAndIndex(i,s[f]);if(null===y)return{faceIndexMap:new Map,edgeIndexMap:new Map};d.addInnerLoop(y),f++}o.add(d),u.set(d,g),f--}else{var C=e.makeLoopByVertexAndIndex(i,s[f]);if(null!==C&&null!==a[l]){var E=new A.Face(a[l]);E.setOuterLoop(C),o.add(E),u.set(E,g)}}l++}return{faceIndexMap:u,edgeIndexMap:e.setSoftTagWithEdge(t.pgm.boundedIndices,i)}}},{key:"setSoftTagWithVertex",value:function(e,t){var r=!0,n=!1,i=void 0;try{for(var o,A=e[Symbol.iterator]();!(r=(o=A.next()).done);r=!0)for(var a=o.value,s=1,u=a.length;s<u;++s)0!==s&&s!==u-1&&(t[a[s]].isSoft=!0)}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}}},{key:"setSoftTagWithEdge",value:function(t,r){var n=new Map,i=r.length,o=0,A=!0,a=!1,s=void 0;try{for(var u,c=t[Symbol.iterator]();!(A=(u=c.next()).done);A=!0){for(var l=u.value,g=1,f=l.length;g<f;++g){var h=l[g],p=l[g-1];if(h<i&&h>=0&&p<i&&p>=0){var d=e.setSoftOnEdgeByVertex(r[l[g]],r[l[g-1]]);d&&n.set(d,{bcIndex:o,posIndex:g})}}o++}}catch(e){a=!0,s=e}finally{try{!A&&c.return&&c.return()}finally{if(a)throw s}}return n}},{key:"setSoftOnEdgeByVertex",value:function(e,t){var r=e.edges,n=!0,i=!1,o=void 0;try{for(var A,a=r[Symbol.iterator]();!(n=(A=a.next()).done);n=!0){var s=A.value;if(s.vertexA===e&&s.vertexB===t||s.vertexB===e&&s.vertexA===t)return s.isSoft=!1,s}}catch(e){i=!0,o=e}finally{try{!n&&a.return&&a.return()}finally{if(i)throw o}}}},{key:"makeLoopByVertexAndIndex",value:function(t,r){var n=r.length;if(n<1)return null;for(var i=[],o=r[n-1],A=t[o],u=0,c=n;u<c;++u){var l=r[u],g=t[l],f=e.makeEdgeByVertex(A,g);A.point.isEqual(g.point)&&(f.degenerated=!0),i.push(new a.HalfEdge(f,f.vertexA!==A)),A=g,o=l}return new s.Loop(i)}},{key:"makeUniqueEdgeByVertex",value:function(e,t){var r=new o.Edge(i.Line3d.fromSegment(e.point,t.point),e,t);return r.isSoft=!0,r}},{key:"makeEdgeByVertex",value:function(t,r){var n=t.edges,i=!0,o=!1,A=void 0;try{for(var a,s=n[Symbol.iterator]();!(i=(a=s.next()).done);i=!0){var u=a.value;if(u.vertexA===t&&u.vertexB===r||u.vertexB===t&&u.vertexA===r)return u}}catch(e){o=!0,A=e}finally{try{!i&&s.return&&s.return()}finally{if(o)throw A}}var c=r.edges,l=!0,g=!1,f=void 0;try{for(var h,p=c[Symbol.iterator]();!(l=(h=p.next()).done);l=!0){var d=h.value;if(d.vertexA===t&&d.vertexB===r||d.vertexB===t&&d.vertexA===r)return d}}catch(e){g=!0,f=e}finally{try{!l&&p.return&&p.return()}finally{if(g)throw f}}return e.makeUniqueEdgeByVertex(t,r)}},{key:"mergeCoplanarFaceOnFaceList",value:function(t,r){var n=new Set;t.faceIndexMap.forEach((function(e,t){t.getEdges().forEach((function(e){n.add(e)}))}));var i=!0,o=!1,A=void 0;try{for(var a,s=n[Symbol.iterator]();!(i=(a=s.next()).done);i=!0){var u=a.value,c=u.halfEdges;if(u.isSoft&&2===c.length){var l=e.mergeFaceWithHalfEdge(c[0],c[1],r);if(null!==l){var g=c[0].loop.face,f=c[1].loop.face,h=t.faceIndexMap.get(g),p=t.faceIndexMap.get(f);void 0!==h&&void 0!==p&&(t.faceIndexMap.delete(g),t.faceIndexMap.delete(f),t.faceIndexMap.set(l,h),t.edgeIndexMap.delete(u))}}}}catch(e){o=!0,A=e}finally{try{!i&&s.return&&s.return()}finally{if(o)throw A}}}},{key:"mergeFaceWithHalfEdge",value:function(t,r,n){if(null===t.loop||null===t.loop.face||null===r.loop||null===r.loop.face)return null;var o=t.loop.face,a=r.loop.face;if(null===o||null===a)return null;var u=o.surface,c=a.surface;if(!(u instanceof i.Plane&&c instanceof i.Plane&&t.reversed!==r.reversed))return null;if(u.normal.isSameDirection(c.normal,n)){var l=o.outerLoop,g=a.outerLoop,f=e.findHalfEdgePosInLoop(l,t),h=e.findHalfEdgePosInLoop(g,r);if(-1===f||-1===h)return null;for(var p=l.halfEdges,d=g.halfEdges,I=p.length,y=d.length,C=[],E=f+1,B=f+I;E<B;++E)C.push(p[E%I]);for(var v=h+1,m=h+y;v<m;++v)C.push(d[v%y]);var Q=new A.Face(u);Q.setOuterLoop(new s.Loop(C),o.sameDir);var b=t.edge;return t.vertexA.removeEdge(b),r.vertexA.removeEdge(b),Q}return null}},{key:"findHalfEdgePosInLoop",value:function(e,t){for(var r=e.halfEdges,n=-1,i=0,o=r.length;i<o;++i)if(r[i]===t){n=i;break}return n}},{key:"mergeCollinearEdgeOnFace",value:function(t,r){var n=new Set;t.faceIndexMap.forEach((function(e,t){t.getVertices().forEach((function(e){n.add(e)}))})),n.forEach((function(n){e.judgeValidityForVertexByEdges(n,r)&&e.removeVertex(t,n)}))}},{key:"judgeValidityForVertexByEdges",value:function(e,t){var r=e.edges;if(2===r.length){var n=r[0],o=r[1],A=!0,a=!1,s=void 0;try{for(var u,c=n.halfEdges[Symbol.iterator]();!(A=(u=c.next()).done);A=!0){if(0!==u.value.loop.face.innerLoops.length)return!1}}catch(e){a=!0,s=e}finally{try{!A&&c.return&&c.return()}finally{if(a)throw s}}var l=!0,g=!1,f=void 0;try{for(var h,p=o.halfEdges[Symbol.iterator]();!(l=(h=p.next()).done);l=!0){if(0!==h.value.loop.face.innerLoops.length)return!1}}catch(e){g=!0,f=e}finally{try{!l&&p.return&&p.return()}finally{if(g)throw f}}if(n.isSoft===o.isSoft&&n.curve instanceof i.Line3d&&o.curve instanceof i.Line3d){var d=n.curve,I=o.curve;if(d.direction.isParallel(I.direction,t))return!0}}return!1}},{key:"removeVertex",value:function(t,r){var n=r.getLeadInHalfEdges(),i=r.getLeadOutHalfEdges();if(2===n.length||2===i.length){var o=i[0],A=i[1],s=n[0],u=n[1],c=o.edge,l=A.edge,g=o.vertexB,f=A.vertexB,h=e.makeEdgeByVertex(g,f);h.isSoft=c.isSoft;var p=new a.HalfEdge(h,!0);e.updateFaceWithHF(t.faceIndexMap,p,o,s,u),p=new a.HalfEdge(h,!1),e.updateFaceWithHF(t.faceIndexMap,p,A,s,u),r.removeEdge(c),r.removeEdge(l),g.removeEdge(c),f.removeEdge(l);var d=t.edgeIndexMap.get(c),I=t.edgeIndexMap.get(l);d&&I&&d.bcIndex===I.bcIndex&&(t.edgeIndexMap.delete(c),t.edgeIndexMap.delete(l),d.posIndex>I.posIndex?t.edgeIndexMap.set(h,I):t.edgeIndexMap.set(h,d))}}},{key:"updateFaceWithHF",value:function(e,t,r,n,i){var o=new Array;o.push(t);for(var a=r.next;null!==a&&a!==n&&a!==i;)o.push(a),a=a.next;var u=new s.Loop(o),c=r.loop.face,l=new A.Face(c.surface);l.setOuterLoop(u,c.sameDir);var g=e.get(c);void 0!==g&&(e.delete(c),e.set(l,g))}},{key:"getEdgesFromShell",value:function(e){return Array.from(e.getEdges())}},{key:"getEdgesFromFace",value:function(e){var t=[];return e.outerLoop.halfEdges.map((function(e){return t.push(e.edge)})),e.innerLoops.map((function(e){return e.halfEdges.map((function(e){return t.push(e.edge)}))})),t}},{key:"reversedMapInfo",value:function(e,t){var r=new Map,n=e.edges,i=!0,o=!1,A=void 0;try{for(var a,s=n[Symbol.iterator]();!(i=(a=s.next()).done);i=!0){var u=a.value;r.set(u,[])}}catch(e){o=!0,A=e}finally{try{!i&&s.return&&s.return()}finally{if(o)throw A}}t.edgeIndexMap.forEach((function(e,t){var i=n[e.bcIndex],o=r.get(i);o&&o.push({edge:t,order:e.posIndex})}));var c=new Map;r.forEach((function(e,t){e.sort((function(e,t){return e.order-t.order}));var r=[];e.forEach((function(e){r.push(e.edge)})),c.set(t,r)}));var l=[],g=new Map,f=e.faces;return f.forEach((function(e){g.set(e,new Array)})),t.faceIndexMap.forEach((function(e,t){var r=f[e],n=g.get(r);n&&n.push(t),l.push(t)})),{faceList:l,faceMap:g,edgeMap:c}}}]),e}();p.defaultNormTol=1-Math.cos(Math.PI/9),t.Polygonize=p},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(e){return n(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":n(e)},o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function A(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0});var a=r(3),s=r(716),u=r(2055),c=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return o(e,null,[{key:"polygonMeshOnSingleSurface3d",value:function(t,r,n,i,o,A,s){var u=e.polygonMeshOnSurface3d(t,r,n,i,o,A,s);return null===u||i instanceof a.Plane||u.planarMesh(),u}},{key:"polygonMeshOnSurface3d",value:function(t,r,n,i,o,A,s){return i instanceof a.Plane?e.polygonMeshOnPlane(t,r,i,o,A):e.polygonMeshOnNonPlane(t,r,n,i,o,A,s)}},{key:"polygonMeshOnPlane",value:function(e,t,r,n,i){var o=[],A=[];return e.forEach((function(e){var t=u.PolygonOnUVFace.tessBoundedCurve3d(e,i);o.push(t)})),t.forEach((function(e){var t=[];e.forEach((function(e){var r=u.PolygonOnUVFace.tessBoundedCurve3d(e,i);t.push(r)})),A.push(t)})),s.PolygonMesh.makePolygonMeshByLoops(o,A,r,n)}},{key:"polygonMeshOnNonPlane",value:function(t,r,n,i,o,A,c){var l=e.getOrderUVBoundedCurve(i,t,r,c),g=void 0;g=i instanceof a.NurbsSurface?e.calculateUVOffset(i,l.uvContour,c):[0,0];var f=u.PolygonOnUVFace.tessUVDomain(i,l.uvContour,g[0],g[1],A),h=u.PolygonOnUVFace.getUVPolygons(l.uvContour,l.uvHole,g,f,c);if(0===h.length||0===h[0].length)return new s.PolygonMesh;var p=u.PolygonOnUVFace.getRectMesh(i,f),d=e.getEndpointOfUVBoundedCurve(l.uvContour,l.uvHole,g),I=e.getPointsByDegenerateEdge(n,t,r),y=[],C=[],E=e.getPolygonByRectMesh(h,p,i,o,d,C,y,I,c);return 0===E.length?new s.PolygonMesh:s.PolygonMesh.makePolygonMeshByPolygon(E,C,y,o)}},{key:"getOrderUVBoundedCurve",value:function(e,t,r,n){var i={contour:t,holes:r},o=e.faceToUV(i,n).mapping,A=[],a=!0,s=!1,u=void 0;try{for(var c,l=t[Symbol.iterator]();!(a=(c=l.next()).done);a=!0){var g=c.value;A.push(o.get(g))}}catch(e){s=!0,u=e}finally{try{!a&&l.return&&l.return()}finally{if(s)throw u}}var f=[],h=!0,p=!1,d=void 0;try{for(var I,y=r[Symbol.iterator]();!(h=(I=y.next()).done);h=!0){var C=I.value,E=[],B=!0,v=!1,m=void 0;try{for(var Q,b=C[Symbol.iterator]();!(B=(Q=b.next()).done);B=!0){var _=Q.value;E.push(o.get(_))}}catch(e){v=!0,m=e}finally{try{!B&&b.return&&b.return()}finally{if(v)throw m}}f.push(E)}}catch(e){p=!0,d=e}finally{try{!h&&y.return&&y.return()}finally{if(p)throw d}}return{uvContour:A,uvHole:f}}},{key:"getEndpointOfUVBoundedCurve",value:function(e,t,r){var n=[],i=[];i.push(e),null!==t&&i.push.apply(i,A(t));var o=!0,a=!1,s=void 0;try{for(var u,c=i[Symbol.iterator]();!(o=(u=c.next()).done);o=!0){var l=u.value,g=[],f=!0,h=!1,p=void 0;try{for(var d,I=l[Symbol.iterator]();!(f=(d=I.next()).done);f=!0){var y=d.value.startPoint;g.push({x:y.x+r[0],y:y.y+r[1]})}}catch(e){h=!0,p=e}finally{try{!f&&I.return&&I.return()}finally{if(h)throw p}}n.push(g)}}catch(e){a=!0,s=e}finally{try{!o&&c.return&&c.return()}finally{if(a)throw s}}return n}},{key:"getPointsByDegenerateEdge",value:function(e,t,r){for(var n=[],i=0,o=e.length;i<o;++i)for(var A=e[i],a=0,s=A.length;a<s;++a)A[a]&&(0==i?n.push(t[a].startPoint):n.push(r[i-1][a].startPoint));return n}},{key:"calculateUVOffset",value:function(t,r,n){n=n||a.Tolerance.Tolerance.global;var i=t.isUPeriodic(n),o=t.isVPeriodic(n);if(!i&&!o||0===r.length)return[0,0];var A=0,s=0,u=!0,c=!1,l=void 0;try{for(var g,f=r[Symbol.iterator]();!(u=(g=f.next()).done);u=!0){var h=g.value;A+=h.startPoint.x,s+=h.startPoint.y}}catch(e){c=!0,l=e}finally{try{!u&&f.return&&f.return()}finally{if(c)throw l}}A/=r.length,s/=r.length;var p=t.domainU,d=t.domainV,I=p.end-p.start,y=d.end-d.start;return[e.calculateOffset(p.start,p.end,I,A)*I,e.calculateOffset(d.start,d.end,y,s)*y]}},{key:"calculateOffset",value:function(e,t,r,n){for(var i=0;n>t;)n-=r,i--;for(;n<e;)n+=r,i++;return i}},{key:"getPolygonByRectMesh",value:function(t,r,n,i,o,s,u,c,l){for(var g=[],f=[],h=new Map,p=new Map,d=a.simplifyPolygonsByHorizontal(t,!0),I=a.simplifyPolygonsByHorizontal(d,!1),y=0,C=r.length;y<C;++y){var E=r[y];a.addRect(I,E,g,f,h,p)}var B=[],v=e.dealWithInnerPolygons(g,B),m=e.dealWithIntersectPolygons(f,B,t),Q=[],b=new Map;e.mergeInnerPolygons(Q,s,v,b,n,i,B);var _=new Map,S=[];o.forEach((function(e){return S.push.apply(S,A(e))}));var w=Q.length,D=!0,R=!1,M=void 0;try{for(var x,P=m[Symbol.iterator]();!(D=(x=P.next()).done);D=!0){var T=x.value;e.mergeIntersectPolygons(Q,s,T,b,n,i,B[w],S,_,c,l),w++}}catch(e){R=!0,M=e}finally{try{!D&&P.return&&P.return()}finally{if(R)throw M}}if(_.size!==S.length)return[];var F=e.getBoundedEndpointOnPolygon(o,_);return 0===F.length?[]:(u.push.apply(u,A(F)),Q)}},{key:"getBoundedEndpointOnPolygon",value:function(e,t){var r=[],n=!0,i=!1,o=void 0;try{for(var A,s=e[Symbol.iterator]();!(n=(A=s.next()).done);n=!0){var u=A.value;if(0===u.length)break;var c=u[0],l=t.get(c);if(!l)break;for(var g=1,f=u.length;g<f;++g){var h=u[g],p=t.get(h);if(!p)return[];a.Num.isEqual(c.x,h.x)&&a.Num.isEqual(c.y,h.y)||(r.push(l),r.push(p)),l=p,c=h}var d=u[0],I=t.get(d);if(!I)return[];a.Num.isEqual(c.x,d.x)&&a.Num.isEqual(c.y,d.y)||(r.push(l),r.push(I))}}catch(e){i=!0,o=e}finally{try{!n&&s.return&&s.return()}finally{if(i)throw o}}return r}},{key:"dealWithInnerPolygons",value:function(t,r){var n=new Map,o=[],A=!0,a=!1,s=void 0;try{for(var u,c=function(){var t=u.value,i=e.makePlaneByRectMeshNode(t);if(null===i)return{v:[]};r.push(i);var A=[];t.corners.forEach((function(t){var r=e.getPolyPtBySurfPtMapPolyPt(n,t);A.push(r)})),o.push(A)},l=t[Symbol.iterator]();!(A=(u=l.next()).done);A=!0){var g=c();if("object"===(void 0===g?"undefined":i(g)))return g.v}}catch(e){a=!0,s=e}finally{try{!A&&l.return&&l.return()}finally{if(a)throw s}}return o}},{key:"dealWithIntersectPolygons",value:function(t,r,n){for(var o=[],A=function(i,A){var s=t[i],u=e.makePlaneByRectMeshNode(s);if(null===u)return{v:[]};r.push(u);var c=[];s.corners.forEach((function(e){c.push({x:e.uv[0],y:e.uv[1]})}));for(var l=a.simplifyPolygons(a.clipping(n,c)),g=0,f=l.length;g<f;++g){var h=l[g].length;if(h>0){var p=l[g][0],d=l[g][h-1];a.Num.isEqual(p.x,d.x)&&a.Num.isEqual(p.y,d.y)&&l[g].pop()}}for(var I=[],y=0;y<4;++y){var C=s.getAllCorners(y),E=!0,B=!1,v=void 0;try{for(var m,Q=function(){var e=m.value;s.corners.some((function(t){return t===e}))||I.push({x:e.uv[0],y:e.uv[1],id:e.id})},b=C[Symbol.iterator]();!(E=(m=b.next()).done);E=!0)Q()}catch(e){B=!0,v=e}finally{try{!E&&b.return&&b.return()}finally{if(B)throw v}}}var _=a.Tolerance.Tolerance.global;if(I.length){var S=!0,w=!1,D=void 0;try{for(var R,M=I[Symbol.iterator]();!(S=(R=M.next()).done);S=!0){var x=R.value,P=new a.Point2d(x.x,x.y),T=!0,F=!1,O=void 0;try{for(var L,N=l[Symbol.iterator]();!(T=(L=N.next()).done);T=!0)for(var k=L.value,G=0,U=k.length;G<U;++G){var j=new a.LineSeg2d(new a.Point2d(k[G].x,k[G].y),new a.Point2d(k[(G+1)%U].x,k[(G+1)%U].y));if((j.direction.isParallel(new a.Vector2d(1,0),_)||j.direction.isParallel(new a.Vector2d(0,1),_))&&j.isPointOnCurve(P,_)){k.splice(G+1,0,x);break}}}catch(e){F=!0,O=e}finally{try{!T&&N.return&&N.return()}finally{if(F)throw O}}}}catch(e){w=!0,D=e}finally{try{!S&&M.return&&M.return()}finally{if(w)throw D}}}o.push(l)},s=0,u=t.length;s<u;++s){var c=A(s);if("object"===(void 0===c?"undefined":i(c)))return c.v}return o}},{key:"mergeInnerPolygons",value:function(e,t,r,n,i,o,A){var s=0,u=!0,c=!1,l=void 0;try{for(var g,f=function(){var r=g.value,u=A[s++],c=[];r.forEach((function(e){var t=n.get(e);if(!t){var r=new a.UV(e.x,e.y);t=i.getPoint(r),n.set(e,t)}c.push(t)})),0!==c.length&&(o||c.reverse(),e.push(c),t.push(u))},h=r[Symbol.iterator]();!(u=(g=h.next()).done);u=!0)f()}catch(e){c=!0,l=e}finally{try{!u&&h.return&&h.return()}finally{if(c)throw l}}}},{key:"mergeIntersectPolygons",value:function(t,r,n,i,o,A,s,u,c,l,g){var f=!0,h=!1,p=void 0;try{for(var d,I=function(){var n=d.value,f=new Set;if(n.forEach((function(t){var r=e.findPointInMap(i,t);if(null===r){var n=new a.UV(t.x,t.y);r=o.getPoint(n),i.set(t,r)}var A=!0,s=!1,h=void 0;try{for(var p,d=l[Symbol.iterator]();!(A=(p=d.next()).done);A=!0){var I=p.value;I.isEqual(r,g.distTol)&&(r=I)}}catch(e){s=!0,h=e}finally{try{!A&&d.return&&d.return()}finally{if(s)throw h}}f.add(r),e.matchBoundedEndpoint(u,c,t,r)})),0!==f.size){var h=Array.from(f);A||h.reverse(),t.push(h),r.push(s)}},y=n[Symbol.iterator]();!(f=(d=y.next()).done);f=!0)I()}catch(e){h=!0,p=e}finally{try{!f&&y.return&&y.return()}finally{if(h)throw p}}}},{key:"matchBoundedEndpoint",value:function(e,t,r,n){var i=!0,o=!1,A=void 0;try{for(var s,u=e[Symbol.iterator]();!(i=(s=u.next()).done);i=!0){var c=s.value;if(a.Num.isEqual(c.x,r.x)&&a.Num.isEqual(c.y,r.y)){t.set(c,n);break}}}catch(e){o=!0,A=e}finally{try{!i&&u.return&&u.return()}finally{if(o)throw A}}}},{key:"findPointInMap",value:function(e,t){var r=t.x,n=t.y,i=!0,o=!1,A=void 0;try{for(var s,u=e.entries()[Symbol.iterator]();!(i=(s=u.next()).done);i=!0){var c=s.value;if(a.Num.isEqual(r,c[0].x)&&a.Num.isEqual(n,c[0].y))return c[1]}}catch(e){o=!0,A=e}finally{try{!i&&u.return&&u.return()}finally{if(o)throw A}}return null}},{key:"makePlaneByRectMeshNode",value:function(e){if(e.corners.length<4)return null;var t=new a.Point3d(e.corners[0].point),r=new a.Point3d(e.corners[1].point),n=new a.Point3d(e.corners[2].point),i=void 0;return t.isEqual(r)?(i=new a.Point3d(e.corners[3].point),a.Plane.makePlaneByTreePoints(t,n,i)):t.isEqual(n)?(i=new a.Point3d(e.corners[3].point),a.Plane.makePlaneByTreePoints(r,n,i)):r.isEqual(n)?(i=new a.Point3d(e.corners[3].point),a.Plane.makePlaneByTreePoints(t,r,i)):a.Plane.makePlaneByTreePoints(t,r,n)}},{key:"getPolyPtBySurfPtMapPolyPt",value:function(e,t){var r=e.get(t);return r||(r={x:t.uv[0],y:t.uv[1]},e.set(t,r)),r}}]),e}();t.PolygonMeshOnSurface=c},function(e,t,r){"use strict";var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function i(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0});var o=r(3),A=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return n(e,null,[{key:"getUVPolygons",value:function(e,t,r,n,A){var a=this,s=this.makeCrosswordLine(n);if(0===s.length)return[];var u=[];u.push(e),null!==t&&u.push.apply(u,i(t));for(var c=[],l=function(e,t){var n=[];u[e].forEach((function(e){var t=a.boundedCurveIntersectIsoLine(e,s,A);t.splice(t.length-1,1),n.push.apply(n,i(t))})),o.LoopCCW.isPolygonCCW2D(n)!==(0===e)&&n.reverse();var l=new Array;n.forEach((function(e){l.push({x:e.x+r[0],y:e.y+r[1]})})),c.push(l)},g=0,f=u.length;g<f;g++)l(g);return c}},{key:"makeCrosswordLine",value:function(e){if(2!==e.length)return[];for(var t=e[0],r=e[1],n=[],i=1,A=t.length;i<A-1;i++)n.push(new o.Line2d(new o.Point2d(t[i],0),o.Vector2d.yAxis));for(var a=[],s=1,u=r.length;s<u-1;s++)a.push(new o.Line2d(new o.Point2d(0,r[s]),o.Vector2d.xAxis));return[n,a]}},{key:"boundedCurveIntersectIsoLine",value:function(e,t,r){var n=new Array,A=e.getBounding(),a=A.min,s=A.max;t[0].forEach((function(t){var A=t.p0.x;if(o.Num.isInRange(A,a.x,s.x,!0,!0,r.distTol)){var u=e.intersectCurve(t);n.push.apply(n,i(u))}})),t[1].forEach((function(t){var A=t.p0.y;if(o.Num.isInRange(A,a.y,s.y,!0,!0,r.distTol)){var u=e.intersectCurve(t);n.push.apply(n,i(u))}})),n.push({point:e.startPoint,param1:e.domain.start,param2:0,isOverlap:!1}),n.push({point:e.endPoint,param1:e.domain.end,param2:0,isOverlap:!1}),n.sort((function(e,t){return e.param1<t.param1?-1:e.param1>t.param1?1:0})),this.filterRepeatData(n,r);var u=[];return n.forEach((function(e){u.push(e.point)})),u}},{key:"tessUVDomain",value:function(e,t,r,n,i){var A=i,a=this.getUVBox(t,r,n),s=void 0;if(e instanceof o.ConicalSurface||e instanceof o.CylindricalSurface)s=this.adaptiveDomainOfCylinderCone(e,a[0],a[1],A);else if(e instanceof o.SurfaceOfLinearExtrusion)s=this.adaptiveDomainOfLinearExtrusion(e,a[1],A);else if(e instanceof o.RevolveSurface)s=this.adaptiveDomainOfRevolve(e,a[0],a[1],A);else if(e instanceof o.ToroidalSurface)s=this.adaptiveDomainOfToroidal(a[0],a[1],A);else{if(!(e instanceof o.NurbsSurface))throw"not implement";s=this.adaptiveDomainOfNurbs(e,a[0],a[1],A)}return s}},{key:"adaptiveDomainOfCylinderCone",value:function(t,r,n,i){var A=void 0;if(A=(o.ConicalSurface,t.radius),o.Num.isEqual(A,0))return[];var a=new o.Arc3d(new o.Circle3d(t.ccs,A),r.start,r.end).tessCurveAdaptiveByNormalTol(r.start,r.end,i),s=a.length,u=new Array,c=!0,l=!1,g=void 0;try{for(var f,h=a[Symbol.iterator]();!(c=(f=h.next()).done);c=!0){var p=f.value;u.push(p.t)}}catch(e){l=!0,g=e}finally{try{!c&&h.return&&h.return()}finally{if(l)throw g}}var d=r.length*A,I=n.length,y=Math.floor(I/d*s);return y=Math.min(y>0?y:1,e.maxDiscreteSeg),[u,this.splitDomain(n,n.length/y)]}},{key:"adaptiveDomainOfLinearExtrusion",value:function(t,r,n){for(var i=t.baseCurve,o=i.getApproximatePtInfosByNormalTol(n),A=o.length,a=new Array,s=0;s<A;++s)a.push(o[s].t);var u=i.length,c=t.height,l=Math.floor(c/u*A);return l=l>0?l:1,l=Math.min(l>0?l:1,e.maxDiscreteSeg),[a,this.splitDomain(r,r.length/l)]}},{key:"adaptiveDomainOfRevolve",value:function(t,r,n,i){var A=t.baseCurve,a=A.domain.middle,s=new o.LineSeg2d(new o.Point2d(r.start,a),new o.Point2d(r.end,a)),u=t.uvCurveTo3d(s),c=u.tessCurveAdaptiveByNormalTol(r.start,r.end,i).length,l=this.splitDomain(r,r.length/c),g=A.tessCurveAdaptiveByNormalTol(n.start,n.end,i),f=[],h=g.length,p=Math.floor(A.length/u.length*c)+1;if(p=Math.min(p,e.maxDiscreteSeg),h<c/2&&h<p)f=this.splitDomain(n,n.length/p);else for(var d=0;d<h;++d)f.push(g[d].t);return[l,f]}},{key:"adaptiveDomainOfToroidal",value:function(e,t,r){var n=new o.Circle3d(new o.CCS3d,1),i=new o.Arc3d(n,e.start,e.end).tessCurveAdaptiveByNormalTol(e.start,e.end,r).length,A=this.splitDomain(e,e.length/i),a=new o.Arc3d(n,t.start,t.end).tessCurveAdaptiveByNormalTol(t.start,t.end,r).length;return[A,this.splitDomain(t,t.length/a)]}},{key:"splitDomain",value:function(e,t){for(var r=e.start,n=e.end,i=e.length,o=Math.ceil(i/t),A=i/o,a=new Array,s=0;s<o;++s)a.push(r+s*A);return a.push(n),a}},{key:"adaptiveDomainOfNurbs",value:function(e,t,r,n){var i=t.end,o=t.start,A=r.end,a=r.start,s=[];e.degreeU>1&&e.isoCurve((A+a)/2,!0).tessCurveAdaptiveByNormalTol(o,i,n).forEach((function(e){s.push(e.t)}));var u=e.controlPoints.length*e.degreeU;if(s.length<u){s.splice(0,s.length);for(var c=(i-o)/(u-1),l=0;l<u;l++)s.push(o+c*l)}var g=[];e.degreeV>1&&e.isoCurve((i+o)/2,!1).tessCurveAdaptiveByNormalTol(a,A,n).forEach((function(e){g.push(e.t)}));var f=e.controlPoints[0].length*e.degreeV;if(g.length<f){g.splice(0,g.length);for(var h=(A-a)/(f-1),p=0;p<f;p++)g.push(a+h*p)}return[s,g]}},{key:"getRectMesh",value:function(e,t){for(var r=t[0].length-1,n=t[1].length-1,i=new Array(r*n),A=[],a=0;a<n+1;a++){for(var s=new Array,u=0;u<r+1;u++){var c=t[0][u],l=t[1][a],g=new o.UV(c,l),f=e.tangentUWithLen(g),h=e.tangentVWithLen(g),p=e.getPoint(g),d=f.cross(h).normalized();s.push(new o.SurfacePoint([p.x,p.y,p.z],[d.x,d.y,d.z],[g.u,g.v],-1,o.Num.isZero(d.length)))}A.push(s)}for(var I=0;I<n;I++)for(var y=0;y<r;y++){var C=[A[n-I-1][y],A[n-I-1][y+1],A[n-I][y+1],A[n-I][y]];i[I*r+y]=new o.RectMeshNode(e,C)}return i}},{key:"getUVBox",value:function(e,t,r){var n=new o.BBox2d,i=!0,A=!1,a=void 0;try{for(var s,u=e[Symbol.iterator]();!(i=(s=u.next()).done);i=!0){var c=s.value;n.merge(c.getBounding())}}catch(e){A=!0,a=e}finally{try{!i&&u.return&&u.return()}finally{if(A)throw a}}var l=n.min,g=n.max,f=l.x+t,h=l.y+r,p=g.x+t,d=g.y+r;return[new o.Interval(f,p),new o.Interval(h,d)]}},{key:"filterRepeatData",value:function(e,t){if(!(e.length<2))for(var r=e[0].param1,n=0,i=1,A=e.length;i<A-n;i++)o.Num.isEqual(e[i].param1,r,t.distTol)?(e.splice(i,1),n++,i--):r=e[i].param1}},{key:"tessBoundedCurve3d",value:function(e,t){var r=e.domain,n=e.tessCurveAdaptiveByNormalTol(r.start,r.end,t);if(n.length<2)return[e.startPoint,e.endPoint];var i=[];return n.forEach((function(e){i.push(e.point)})),i}}]),e}();A.maxDiscreteSeg=100,t.PolygonOnUVFace=A},function(e,t,r){"use strict";var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function i(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0});var o=r(3),A=r(716),a=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return n(e,null,[{key:"mergePolygonMesh",value:function(t,r,n,i,o){if(!e.validPolygonMeshList(t,n,i))return{pgm:new A.PolygonMesh,range:[]};e.buildCommonPtPosLst(n).forEach((function(r){e.mergeCommonPointForPolygonMeshes(t,r)}));for(var a=e.buildCommonEdgePosList(i),s=0,u=a.length;s<u;s++)a[s].length<2||e.mergeCommonEdgeByPolygonMesh(t,a[s],r[s],o);return e.mergePolygonMeshWithComInfo(t,a)}},{key:"mergeCommonPointForPolygonMeshes",value:function(t,r){if(!(r.length<2)){var n=[];r.forEach((function(e){var r=e[0],i=e[1];if(!(r<0||r>=t.length)){var o=t[r];if(!(null===o||i<0||i>=o.boundedEdgePos.length)){var A=o.boundedEdgePos[i];if(null!==A&&0!==A.length){var a=A[0].x;if(!(a<0||a>=o.mSurfaces.length))if(null!==o.mSurfaces[a]){var s=o.boundedIndices[i][0];n.push([r,s])}}}}})),e.updateCommonPtPos(t,n)}}},{key:"updateCommonPtPos",value:function(e,t){for(var r=t[0],n=e[r[0]].coords[r[1]],i=1,o=t.length;i<o;i++){var A=t[i];e[A[0]].coords.splice(A[1],1,n)}}},{key:"buildCommonPtPosLst",value:function(e){for(var t=e.length,r=new Map,n=0;n<t;++n)for(var o=e[n],A=0,a=o.length;A<a;++A){var s=o[A],u=r.get(s),c=[n,A];if(u){var l=[];l.push.apply(l,i(u)),l.push(c),r.set(s,l)}else r.set(s,[c])}var g=[];return r.forEach((function(e,t){g.push(e)})),g}},{key:"buildCommonEdgePosList",value:function(e){for(var t=new Map,r=0,n=e.length;r<n;++r)for(var i=e[r],o=0,A=i.length;o<A;++o){var a=i[o],s=t.get(a.index);if(s)s.push({faceI:r,edgeI:o,isReversed:i[o].isReversed});else{var u=[];u.push({faceI:r,edgeI:o,isReversed:i[o].isReversed}),t.set(a.index,u)}}var c=[];return t.forEach((function(e,t){c.push(e)})),c}},{key:"mergeCommonEdgeByPolygonMesh",value:function(t,r,n,o){var A=r.length;if(e.validCommonEdgeData(t,r,o)){for(var a=[],s=[],u=0;u<A;++u){var c=r[u],l=t[c.faceI],g=[].concat(i(l.boundedIndices[c.edgeI])),f=[].concat(i(l.boundedEdgePos[c.edgeI]));o[c.faceI][c.edgeI]&&(g.reverse(),f.reverse());for(var h=g.length,p=[],d=1;d<h-1;d++){var I=l.coords[g[d]],y=n.getParam(I);p.push(y),s.push(y)}a.push(p)}s=s.sort((function(e,t){return e-t}));e.uniqueDataForList(s,.001);var C=[];s.forEach((function(e){C.push({p:e,pt:n.getPoint(e)})}));var E=0,B=!0,v=!1,m=void 0;try{for(var Q,b=a[Symbol.iterator]();!(B=(Q=b.next()).done);B=!0){var _=Q.value,S=e.splitParamPtListByParams(C,_,.001),w=r[E];t[w.faceI].insertPtsByPtsList(w.edgeI,S,o[w.faceI][w.edgeI]),E++}}catch(e){v=!0,m=e}finally{try{!B&&b.return&&b.return()}finally{if(v)throw m}}}}},{key:"splitParamPtListByParams",value:function(e,t,r){var n=[],i=e.length,A=0,a=!0,s=!1,u=void 0;try{for(var c,l=t[Symbol.iterator]();!(a=(c=l.next()).done);a=!0)for(var g=c.value,f=[],h=A;h<i;++h)if(f.push(e[h].pt),o.Num.isBiggerOrEqual(e[h].p,g,r)){n.push(f),A=h+1;break}}catch(e){s=!0,u=e}finally{try{!a&&l.return&&l.return()}finally{if(s)throw u}}for(var p=[],d=A;d<i;++d)p.push(e[d].pt);return n.push(p),n}},{key:"uniqueDataForList",value:function(e,t){if(!(e.length<2))for(var r=e[0],n=0,i=1,A=e.length;i<A-n;i++)o.Num.isEqual(e[i],r,t)?(e.splice(i,1),n++,i--):r=e[i]}},{key:"validCommonEdgeData",value:function(e,t,r){if(t.length<2)return!1;var n=null,i=null,o=!0,A=!1,a=void 0;try{for(var s,u=t[Symbol.iterator]();!(o=(s=u.next()).done);o=!0){var c=s.value,l=c.faceI,g=c.edgeI;if(l<0||l>=e.length)return!1;if(g<0||g>=e[l].boundedIndices.length)return!1;var f=e[c.faceI],h=f.boundedIndices[g],p=f.boundedEdgePos[g],d=h.length;if(d<2||d!==p.length+1)return!1;var I=f.coords[h[0]],y=f.coords[h[d-1]];if(null===n)r[l][g]?(n=y,i=I):(n=I,i=y);else if(r[l][g]){if(n!==y||i!==I)return!1}else if(n!==I||i!==y)return!1}}catch(e){A=!0,a=e}finally{try{!o&&u.return&&u.return()}finally{if(A)throw a}}return!0}},{key:"validPolygonMeshList",value:function(e,t,r){if(t.length!==e.length)return!1;for(var n=0,i=e.length;n<i;++n){var o=e[n];if(r[n].length!==o.boundedIndices.length)return!1}return!0}},{key:"mergePolygonMeshWithComInfo",value:function(e,t){for(var r=new A.PolygonMesh,n=[],o=new Map,a=new Map,s=0,u=t.length;s<u;++s)for(var c=1,l=t[s].length;c<l;++c){var g=a.get(t[s][c].faceI);if(g)g.add(t[s][c].edgeI);else{var f=new Set;f.add(t[s][c].edgeI),a.set(t[s][c].faceI,f)}}var h=0,p=0,d=!0,I=!1,y=void 0;try{for(var C,E=e[Symbol.iterator]();!(d=(C=E.next()).done);d=!0){var B,v,m,Q=C.value;Q.postTreatment();var b=new Map,_=Q.coords,S=0,w=!0,D=!1,R=void 0;try{for(var M,x=_[Symbol.iterator]();!(w=(M=x.next()).done);w=!0){var P=M.value,T=o.get(P);if(void 0===T)b.set(S++,h),void 0===o.get(P)&&o.set(P,h++),r.coords.push(P);else b.set(S++,T)}}catch(e){D=!0,R=e}finally{try{!w&&x.return&&x.return()}finally{if(D)throw R}}var F=Q.coordIndices,O=!0,L=!1,N=void 0;try{for(var k,G=F[Symbol.iterator]();!(O=(k=G.next()).done);O=!0){var U=k.value,j=[],V=!0,H=!1,Y=void 0;try{for(var K,q=U[Symbol.iterator]();!(V=(K=q.next()).done);V=!0){var J=K.value;j.push(b.get(J))}}catch(e){H=!0,Y=e}finally{try{!V&&q.return&&q.return()}finally{if(H)throw Y}}r.coordIndices.push(j)}}catch(e){L=!0,N=e}finally{try{!O&&G.return&&G.return()}finally{if(L)throw N}}(B=r.mSurfaces).push.apply(B,i(Q.mSurfaces)),(v=r.isSameDir).push.apply(v,i(Q.isSameDir)),(m=r.markLoop).push.apply(m,i(Q.markLoop)),n.push(r.coordIndices.length-1);for(var W=a.get(p),z=0,X=Q.boundedIndices.length;z<X;++z)if(!W||!W.has(z)){var Z=[],$=!0,ee=!1,te=void 0;try{for(var re,ne=Q.boundedIndices[z][Symbol.iterator]();!($=(re=ne.next()).done);$=!0){var ie=re.value;Z.push(b.get(ie))}}catch(e){ee=!0,te=e}finally{try{!$&&ne.return&&ne.return()}finally{if(ee)throw te}}r.boundedIndices.push(Z)}p++}}catch(e){I=!0,y=e}finally{try{!d&&E.return&&E.return()}finally{if(I)throw y}}return{pgm:r,range:n}}}]),e}();t.PolygonMeshUtil=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(3),i=r(2058),o=r(2059),A=r(2060),a=r(2063);t.triangulate=function(e,t){if(e.surface instanceof n.Plane)return A.triangulateOnPlane(e,e.surface,t);if(e.surface instanceof n.CylindricalSurface||e.surface instanceof n.ConicalSurface||e.surface instanceof n.SurfaceOfLinearExtrusion)return i.triangulateOnCylinderCone(e,e.surface,t);if(e.surface instanceof n.NurbsSurface)return o.triangulateOnNurbsSurface(e,e.surface,t);if(e.surface instanceof n.ToroidalSurface)return a.triangulateOnRevolveSurface(e,e.surface,t);if(e.surface instanceof n.RevolveSurface)return a.triangulateOnRevolveSurface(e,e.surface,t);throw"unsupported"}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(3),i=r(528);t.triangulateOnCylinderCone=function(e,t,r){var o=e.outerLoop.halfEdges.map((function(e){return e.getBoundedCurve()})),A=e.innerLoops.map((function(e){return e.halfEdges.map((function(e){return e.getBoundedCurve()}))}));return i.Mesh.fromTriangledMesh(n.TriangulateDevelopable.triangulateOnDevelopable3d(o,A,t,e.sameDir,r))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(3),i=r(528);t.triangulateOnNurbsSurface=function(e,t,r){var o=e.outerLoop.halfEdges.map((function(e){return e.getBoundedCurve()})),A=e.innerLoops.map((function(e){return e.halfEdges.map((function(e){return e.getBoundedCurve()}))}));return i.Mesh.fromTriangledMesh(n.TriangulateNurbs.triangulateOnNurbsSurface3d(o,A,t,e.sameDir,r))}},function(e,t,r){"use strict";function n(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0});var i=r(3),o=r(2061),A=r(528),a=r(2062);function s(e,t,r){var o=e.getApproximatePoints(t);if(!e.edge.isSoft||!r)return{points:o};var A=c(e.edge);if(!A)return{points:o};for(var a=l(e.vertexA),s=l(e.vertexB),g=new Map,f=[].concat(n(A),n(a),n(s)),h=0,p=f.length;h<p;h++){var d=f[h];if(!g.has(d)){var I=d.surface;if(I instanceof i.Plane){var y=d.sameDir?I.ccs.dz:I.ccs.dz.reversed();g.set(d,y)}}}for(var C=new Array(o.length),E=0,B=o.length;E<B;E++){var v=o[E];0===E&&a.length>0?C[E]=u(a,v,g):E===B-1&&s.length>0?C[E]=u(s,v,g):C[E]=u(A,v,g)}return{points:o,normals:C}}function u(e,t,r){for(var n=void 0,i=0,o=e.length;i<o;i++){var A=e[i],a=r.get(A);a||(a=A.sameDir?A.surface.getNormalOfPoint(t):A.surface.getNormalOfPoint(t).reversed()),n=n?n.added(a):a}return n?n.normalized():void 0}function c(e){for(var t=[],r=e.halfEdges,n=0,i=r.length;n<i;n++){var o=r[n],A=o.loop?o.loop.face:void 0;A&&t.push(A)}if(2===t.length)return t}function l(e){for(var t=new Set,r=e.edges,n=0,i=r.length;n<i;n++){var o=r[n];if(!o.isSoft)return[];var A=c(o);if(!A)return[];for(var a=0,s=A.length;a<s;a++)t.add(A[a])}return Array.from(t)}t.triangulateOnPlane=function(e,t,r){var n=new A.Mesh,i=[],u=0;r=r||{};for(var l=e.sameDir?t.normal:t.normal.reversed(),g=e.getLoops(),f=0,h=g.length;f<h;f++){var p=[],d=g[f].halfEdges,I=0,y=d[0].edge,C=d[d.length-1].edge;y.isSoft&&c(y)||!C.isSoft||!c(C)||(I=d.length-1);for(var E=!1,B=0,v=d.length;B<v;B++){for(var m=s(d[(B+I)%v],r.crvRatioTol,r.needNormal),Q=m.points,b=m.normals,_=E?1:0,S=b&&B!==v-1?Q.length:Q.length-1;_<S;_++){var w=Q[_];p.push(new o.LibtessVertex(w,u++)),o.addVertexNormalUVBy3d(w,n,t,e.sameDir,r.needUV,r.needNormal,void 0,b?b[_]:l)}E=!!b}i.push(p)}for(var D=a.gluTessTriangulate(i,o.toData(e.sameDir?t.normal.toPoint3d():t.normal.reversed().toPoint3d())),R=0;R<D.length;R+=3){var M=o.getOrCreateVertexIndexBy3d(D[R],n,t,e.sameDir,r.needUV,r.needNormal),x=o.getOrCreateVertexIndexBy3d(D[R+1],n,t,e.sameDir,r.needUV,r.needNormal),P=o.getOrCreateVertexIndexBy3d(D[R+2],n,t,e.sameDir,r.needUV,r.needNormal);n.addTriangle([M,x,P])}return r.needUV&&(n.uvIndices=n.triangleIndices),r.needNormal&&(n.normalIndices=n.triangleIndices),n}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0});var i=r(3),o=function(e){function t(e,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==n(t)&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.push(e.x),i.push(e.y),i.push(e.z?e.z:0),i.index=r,i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,Array),t}();function A(e){return[e.x,e.y,e.z]}t.LibtessVertex=o,t.toData=A,t.getOrCreateVertexIndex=function(e,t,r,n,o,a){if(e.hasOwnProperty("index"))return e.index;var s=new i.UV(e[0],e[1]),u=A(r.getPoint(s));if(t.addVertex(u),o&&t.addUv([s.u,s.v]),a){var c=n?r.getNormal(s):r.getNormal(s).reversed();t.addNormal([c.x,c.y,c.z])}return t.vertices.length-1},t.getOrCreateVertexIndexBy3d=function(e,t,r,n,o,A){if(e.hasOwnProperty("index"))return e.index;t.addVertex(e);var a=void 0;if(o&&(a=r.getParam(new i.Point3d(e[0],e[1],e[2])),t.addUv([a.u,a.v])),A){a||(a=r.getParam(new i.Point3d(e[0],e[1],e[2])));var s=n?r.getNormal(a):r.getNormal(a).reversed();t.addNormal([s.x,s.y,s.z])}return t.vertices.length-1},t.addVertexNormalUV=function(e,t,r,n,i,o,a,s){var u=a||r.getPoint(e);if(t.addVertex(A(u)),i&&t.addUv([e.u,e.v]),o){var c=s;c||(c=n?r.getNormal(e):r.getNormal(e).reversed()),t.addNormal([c.x,c.y,c.z])}},t.addVertexNormalUVBy3d=function(e,t,r,n,i,o,a,s){t.addVertex(A(e));var u=a;if(i&&(u=u||r.getParam(e),t.addUv([u.u,u.v])),o){var c=s;if(!c){var l=r.getNormal(u||r.getParam(e));c=n?l:l.reversed()}t.addNormal([c.x,c.y,c.z])}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(424),i=r(589);function o(e){e!==i.primitiveType.GL_TRIANGLES&&n.consoleLogInDev("expected TRIANGLES but got type: "+e)}function A(e){n.consoleLogInDev("error callback"),n.consoleLogInDev("error number: "+e)}t.gluTessTriangulate=function(e,t){var r=function(){var e=new i.GluTesselator;return e.gluTessCallback(i.gluEnum.GLU_TESS_VERTEX_DATA,(function(e,t){t.push(e)})),e.gluTessCallback(i.gluEnum.GLU_TESS_BEGIN,o),e.gluTessCallback(i.gluEnum.GLU_TESS_ERROR,A),e.gluTessCallback(i.gluEnum.GLU_TESS_COMBINE,(function(e,t,r){return[e[0],e[1],e[2]]})),e.gluTessCallback(i.gluEnum.GLU_TESS_EDGE_FLAG,(function(e){})),e}();r.gluTessNormal(t[0],t[1],t[2]);var n=[];r.gluTessBeginPolygon(n);var a=!0,s=!1,u=void 0;try{for(var c,l=e[Symbol.iterator]();!(a=(c=l.next()).done);a=!0){var g=c.value;r.gluTessBeginContour();var f=!0,h=!1,p=void 0;try{for(var d,I=g[Symbol.iterator]();!(f=(d=I.next()).done);f=!0){var y=d.value;r.gluTessVertex(y,y)}}catch(e){h=!0,p=e}finally{try{!f&&I.return&&I.return()}finally{if(h)throw p}}r.gluTessEndContour()}}catch(e){s=!0,u=e}finally{try{!a&&l.return&&l.return()}finally{if(s)throw u}}return r.gluTessEndPolygon(),n}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(3),i=r(528);t.triangulateOnRevolveSurface=function(e,t,r){var o=e.outerLoop.halfEdges.map((function(e){return e.getBoundedCurve()})),A=e.innerLoops.map((function(e){return e.halfEdges.map((function(e){return e.getBoundedCurve()}))}));return i.Mesh.fromTriangledMesh(n.TriangulateRevSurface.triangulateOnRevolveSurface3d(o,A,t,e.sameDir,r))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2065);t.diffMIxShells=function(e,t){return n.diffShells(e.map((function(e){return e.rawObject()})),t.map((function(e){return e.rawObject()})))},t.diffMIxShell=function(e,t){return n.diffShell(e.rawObject(),t.rawObject())},t.diffMIxFace=function(e,t){return n.diffFace(e.rawObject(),t.rawObject())},t.diffMIxLoop=function(e,t){return n.diffLoop(e.rawObject(),t.rawObject())},t.diffMIxHalfEdge=function(e,t){return n.diffHalfEdge(e.rawObject(),t.rawObject())},t.diffMIxEdge=function(e,t){return n.diffEdge(e.rawObject(),t.rawObject())},t.diffMIxVertex=function(e,t){return n.diffVertex(e.rawObject(),t.rawObject())}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(e){return n(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":n(e)};Object.defineProperty(t,"__esModule",{value:!0});var o=r(3);function A(e,t){if(e.faces.length!==t.faces.length)return console.error("Different in faces num "+e.faces.length+" : "+t.faces.length),!1;var r=!0,n=!1,o=void 0;try{for(var A,s=function(){var e=A.value;return t.faces.some((function(t){return a(e,t)}))?"continue":(console.error("Different in face."),{v:!1})},u=e.faces[Symbol.iterator]();!(r=(A=u.next()).done);r=!0){var c=s();switch(c){case"continue":continue;default:if("object"===(void 0===c?"undefined":i(c)))return c.v}}}catch(e){n=!0,o=e}finally{try{!r&&u.return&&u.return()}finally{if(n)throw o}}return e.getEdges().size===t.getEdges().size||(console.error("Different in shell's edge number."),!1)}function a(e,t){if(e.getLoops().length!==t.getLoops().length)return!1;if(!s(e.outerLoop,t.outerLoop))return!1;if(e.innerLoops.length!==t.innerLoops.length)return!1;var r=!0,n=!1,o=void 0;try{for(var A,a=function(){var e=A.value;return t.innerLoops.some((function(t){return s(e,t)}))?"continue":{v:!1}},u=e.innerLoops[Symbol.iterator]();!(r=(A=u.next()).done);r=!0){var c=a();switch(c){case"continue":continue;default:if("object"===(void 0===c?"undefined":i(c)))return c.v}}}catch(e){n=!0,o=e}finally{try{!r&&u.return&&u.return()}finally{if(n)throw o}}return!0}function s(e,t){if(e.halfEdges.length!==t.halfEdges.length)return!1;var r=0,n=0,i=-1;for(r=0;r<e.halfEdges.length;r++){var A=e.halfEdges[r].getBoundedCurve();if(A){if(-1===i)for(n=0;n<t.halfEdges.length;n++){var a=t.halfEdges[n].getBoundedCurve();if(a&&(o.CurveOverlap.areCurvesTotallyOverlap(A,a)&&A.startPoint.isEqual(a.startPoint))){i=n;break}}if(-1===i)return!1;var s=t.halfEdges[(i+r)%t.halfEdges.length].getBoundedCurve();if(!A.isEqual(s)&&!o.CurveOverlap.areCurvesTotallyOverlap(A,s))return console.error("Different in loop."),!1}}return!0}t.diffShells=function(e,t){if(e.length!==t.length)return console.error("Shells num not equals "+e.length+" : "+t.length),!1;for(var r=new Set,n=0,i=e.length;n<i;n++){for(var o=e[n],a=!1,s=0,u=t.length;s<u;s++){if(!r.has(s))if(A(o,t[s])){r.add(s),a=!0;break}}if(!a)return!1}return!0},t.diffShell=A,t.diffFace=a,t.diffLoop=s,t.diffHalfEdge=function(e,t){var r=e.getBoundedCurve(),n=t.getBoundedCurve();return!(!o.CurveOverlap.areCurvesTotallyOverlap(r,n)||!r.startPoint.isEqual(n.startPoint))||(console.error("Different in half edge."),!1)},t.diffEdge=function(e,t){var r=e.getBoundedCurve(),n=t.getBoundedCurve();return!!o.CurveOverlap.areCurvesTotallyOverlap(r,n)||(console.error("Different in edge."),!1)},t.diffVertex=function(e,t){var r=e.point,n=t.point;return!!r.isEqual(n)||(console.error("Different in vertex"),!1)}},function(e,t,r){"use strict";var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var i=r(2067),o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return n(e,[{key:"toKey",value:function(){return i.idToKey(this.id)}},{key:"equals",value:function(e){return this.id.equals(e.id)}}],[{key:"fromKey",value:function(t){var r=new e;return r.id=i.idFromKey(t),r}},{key:"extractShellKey",value:function(e){return i.extractShellKey(e)}}]),e}();t.MIxName=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(236);t.idToKey=function(e){if(e.type===n.TopoObjectType.kShell)return e.uuid;if(e.type===n.TopoObjectType.kFace){var t=e;return t.shellId.uuid+":"+t.index}if(e.type===n.TopoObjectType.kEdge){var r=e,i="",o="",A=!0,a=!1,s=void 0;try{for(var u,c=r.halfEdgeIds[Symbol.iterator]();!(A=(u=c.next()).done);A=!0){var l=u.value;null!=l.faceId?(i=l.faceId.shellId.uuid+":",o=o+"("+l.faceId.index+":"+l.index+")"):o=o+"(-1:"+l.index+")"}}catch(e){a=!0,s=e}finally{try{!A&&c.return&&c.return()}finally{if(a)throw s}}return i+o}if(e.type===n.TopoObjectType.kHalfEdge){var g=e;return g.faceId.shellId.uuid+":"+g.faceId.index+":"+g.index}return""},t.idFromKey=function(e){var t=void 0,r=e.split(":");if(e.endsWith(")")){var i=r[0],o=new n.ShellId(i),A=e.split("("),a=[],s=!0,u=!1,c=void 0;try{for(var l,g=A[Symbol.iterator]();!(s=(l=g.next()).done);s=!0){var f=l.value.replace(")","").split(":");if(""!==f[1]){var h=new n.FaceId(o,parseInt(f[0],void 0)),p=new n.HalfEdgeId(h,parseInt(f[1],void 0));a.push(p)}}}catch(e){u=!0,c=e}finally{try{!s&&g.return&&g.return()}finally{if(u)throw c}}t=new n.EdgeId(a)}else if(1===r.length)t=new n.ShellId(r[0]);else if(2===r.length){var d=parseInt(r[1],void 0);t=new n.FaceId(new n.ShellId(r[0]),d)}else{var I=parseInt(r[1],void 0),y=parseInt(r[2],void 0);t=new n.HalfEdgeId(new n.FaceId(new n.ShellId(r[0]),I),y)}return t},t.extractShellKey=function(e){var t=e.split(":");if(t.length>0)return t[0]}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0});var i={interceptors:!0,RequestClient:!0,parseCDN:!0,RequestClientParam:!0};Object.defineProperty(t,"RequestClient",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"parseCDN",{enumerable:!0,get:function(){return s.parseCDN}}),Object.defineProperty(t,"RequestClientParam",{enumerable:!0,get:function(){return u.RequestClientParam}}),t.interceptors=void 0;var o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var t=g();if(t&&t.has(e))return t.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var A=i?Object.getOwnPropertyDescriptor(e,o):null;A&&(A.get||A.set)?Object.defineProperty(r,o,A):r[o]=e[o]}r.default=e,t&&t.set(e,r);return r}(r(31));t.interceptors=o;var A,a=(A=r(2070))&&A.__esModule?A:{default:A},s=r(1119),u=r(1120),c=r(2071);Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}}))}));var l=r(2073);function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}}))}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.retry=i,t.default=function(e,t){if(t){var r=e[t];return void(r&&(e[t]=i(r)))}return function(t,r){var o,A,a;(0,n.isBoolean)(e)?(A=t[r],o=e):e.axios?(A=e.axios,o=e.isOss,a=e.isCoohom):A=e,A&&(t[r]=i(A,o,a))}};var n=r(2);function i(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return e.defaults.retry=!0,e.defaults.retryTimes=t?5:1,e.defaults.retryDelay=1e3,e.defaults.__retryCount=0,e.interceptors.request.use((function(e){return e.retry&&e.__retryCount&&(e.headers["x-retry"]=e.__retryCount),e})),e.interceptors.response.use(void 0,(function(t){var n=t.config;return n&&n.retry?(n.__retryCount=n.__retryCount||0,n.retryTimes=n.retryTimes||0,n.__retryCount>=n.retryTimes?Promise.reject(t):(n.__retryCount+=1,r&&n.url&&n.url.startsWith("/gateway")&&(n.url=n.url.replace("/gateway","")),new Promise((function(e){setTimeout((function(){e()}),n.retryDelay||0)})).then((function(){return e(n)})))):Promise.reject(t)})),e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(r(1)),i=o(r(660));function o(e){return e&&e.__esModule?e:{default:e}}function A(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return a(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,s=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){s=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(s)throw o}}}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var u=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))},c=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.request=function(){var e;return(e=t.client).request.apply(e,arguments)},this.get=function(){var e;return(e=t.client).get.apply(e,arguments)},this.delete=function(){var e;return(e=t.client).delete.apply(e,arguments)},this.post=function(){var e;return(e=t.client).post.apply(e,arguments)},this.put=function(){var e;return(e=t.client).put.apply(e,arguments)},this.encryptedRequest=function(){var e;return(e=t.encryptedClient).request.apply(e,arguments)},this.encryptedGet=function(){var e;return(e=t.encryptedClient).get.apply(e,arguments)},this.encryptedDelete=function(){var e;return(e=t.encryptedClient).delete.apply(e,arguments)},this.encryptedPost=function(){var e;return(e=t.encryptedClient).post.apply(e,arguments)},this.encryptedPut=function(){var e;return(e=t.encryptedClient).put.apply(e,arguments)},this.gzipRequest=function(){var e,r;return i.default.wasmLoaded?(e=t.gzippedEncryptClient).request.apply(e,arguments):(r=t.encryptedClient).request.apply(r,arguments)},this.gzipGet=function(){var e,r;return i.default.wasmLoaded?(e=t.gzippedEncryptClient).get.apply(e,arguments):(r=t.encryptedClient).get.apply(r,arguments)},this.ossGzipGet=function(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return u(t,void 0,void 0,n.default.mark((function e(){var t,o,A;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return A=function(){return u(this,void 0,void 0,n.default.mark((function e(){var t;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i.default.wasmLoaded||!(o<20)){e.next=7;break}return t=new Promise((function(e){setTimeout((function(){e()}),1e3)})),o++,e.next=5,t;case 5:return e.next=7,A();case 7:case"end":return e.stop()}}),e)})))},o=0,e.next=4,A();case 4:return e.abrupt("return",(t=this.ossGzippedEncryptClient).get.apply(t,r));case 5:case"end":return e.stop()}}),e,this)})))},this.ossDegradedGzipGet=function(){var e,r;return i.default.wasmLoaded?(e=t.ossDegradedGzippedEncryptClient).get.apply(e,arguments):(r=t.ossDegradedEncryptedClient).get.apply(r,arguments)},this.pbGzipGet=function(){var e,r;return i.default.wasmLoaded?(e=t.pbGzippedEncryptClient).get.apply(e,arguments):(r=t.pbEncryptedClient).get.apply(r,arguments)},this.gzipDelete=function(){var e,r;return i.default.wasmLoaded?(e=t.gzippedEncryptClient).delete.apply(e,arguments):(r=t.encryptedClient).delete.apply(r,arguments)},this.gzipPost=function(){var e,r;return i.default.wasmLoaded?(e=t.gzippedEncryptClient).post.apply(e,arguments):(r=t.encryptedClient).post.apply(r,arguments)},this.pbGzipPost=function(){var e,r;return i.default.wasmLoaded?(e=t.pbGzippedEncryptClient).post.apply(e,arguments):(r=t.pbEncryptedClient).post.apply(r,arguments)},this.gzipPut=function(){var e,r;return i.default.wasmLoaded?(e=t.gzippedEncryptClient).put.apply(e,arguments):(r=t.encryptedClient).put.apply(r,arguments)}}var t,r,o;return t=e,(r=[{key:"addClientInterceptors",value:function(e){var t,r=A(e);try{for(r.s();!(t=r.n()).done;){var n=t.value;n.request&&(this.client.interceptors.request.use(n.request.beforeSend),this.encryptedClient.interceptors.request.use(n.request.beforeSend),this.gzippedEncryptClient.interceptors.request.use(n.request.beforeSend)),n.response&&(this.client.interceptors.response.use(n.response.afterReceive),this.encryptedClient.interceptors.response.use(n.response.afterReceive),this.gzippedEncryptClient.interceptors.response.use(n.response.afterReceive))}}catch(e){r.e(e)}finally{r.f()}}}])&&s(t.prototype,r),o&&s(t,o),e}();t.default=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"doTaskPolling",{enumerable:!0,get:function(){return n.doTaskPolling}});var n=r(2072)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.doTaskPolling=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6e4,r=arguments.length>2?arguments[2]:void 0;return new Promise((function(n,A){var a=r;(function(e){return o(this,void 0,void 0,i.default.mark((function t(){var r,o;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.taskPromise,o=e.createStatusOptions,t.abrupt("return",r.then((function(e){return o(e,{resolve:n,reject:A})})));case 2:case"end":return t.stop()}}),t)})))})(e).then((function(e){void 0!==e&&function e(t){return o(this,void 0,void 0,i.default.mark((function r(){var o,s,u,c,l,g,f;return i.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:f=function(){setTimeout((function(){return e(t)}),l)},o=t.url,s=t.params,u=void 0===s?{}:s,c=t.interval,l=void 0===c?3e3:c,g=t.handlePolling,a(o,{params:u}).then((function(e){return g(e.data,{resolve:n,reject:A,next:f})}));case 3:case"end":return r.stop()}}),r)})))}(e)})).catch((function(e){return A(e)})),setTimeout((function(){return A("Time out")}),t)}))};var n,i=(n=r(1))&&n.__esModule?n:{default:n};var o=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))}},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ResponseCode=void 0,t.ResponseCode=n,function(e){e.success="0",e.error="-1"}(n||(t.ResponseCode=n={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttachedService=void 0;var n,i=(n=r(1))&&n.__esModule?n:{default:n},o=r(47),A=r(359),a=r(2075),s=r(2076),u=r(2080),c=r(2082);function l(e){return function(e){if(Array.isArray(e))return g(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return g(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return g(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function f(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var h=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))},p=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._config=new A.ServiceConfig,this._resourceService=new s.ResourceDataService(this._config),this._paramModelGetAttachedService=new a.ParamModelGetAttachedService(this._config,this._resourceService),this._paramModelUpdateAttachedService=new c.ParamModelUpdateAttachedService(this._config,this._paramModelGetAttachedService),this._paramModelAssemblyUpdateAttachedService=new u.ParamModelAssemblyUpdateAttachedService(this._config,this._paramModelUpdateAttachedService),this._config[A.__INTERNAL__setHelper]({modelHandler:this._paramModelUpdateAttachedService.modelHandler,getAttachedsByData:this._paramModelGetAttachedService.getAttachedsByData,getRequestClient:this._config[A.__INTERNAL__getRequestClient]})}var t,r,n;return t=e,(r=[{key:"updateAttacheds",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return h(this,void 0,void 0,i.default.mark((function r(){var n,A,a,s;return i.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return this.beforeAttached(),n=new Set,A=new Set,e.forEach((function(e){e instanceof o.CoreParamModel?n.add(e.getRootOrAccessory()):e instanceof o.CoreParamModelAssembly&&A.add(e)})),a=[],n.size&&a.push(this._paramModelUpdateAttachedService.updateModelAttacheds(l(n),t)),A.size&&a.push(this._paramModelAssemblyUpdateAttachedService.updateAssemblyAttacheds(l(A),t)),r.next=9,Promise.all(a);case 9:return s=r.sent,this.afterAttached(),r.abrupt("return",s);case 12:case"end":return r.stop()}}),r,this)})))}},{key:"beforeAttached",value:function(){}},{key:"afterAttached",value:function(){}},{key:"updateModelAttacheds",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return h(this,void 0,void 0,i.default.mark((function r(){return i.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",this.updateAttacheds(e,t));case 1:case"end":return r.stop()}}),r,this)})))}},{key:"updateAssemblyAttacheds",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return h(this,void 0,void 0,i.default.mark((function r(){return i.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",this.updateAttacheds(e,t));case 1:case"end":return r.stop()}}),r,this)})))}},{key:"config",get:function(){return this._config}},{key:"paramModelGetAttachedService",get:function(){return this._paramModelGetAttachedService}},{key:"paramModelUpdateAttachedService",get:function(){return this._paramModelUpdateAttachedService}}])&&f(t.prototype,r),n&&f(t,n),e}();t.AttachedService=p},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParamModelGetAttachedService=void 0;var n=h(r(1)),i=h(r(701)),o=h(r(208)),A=r(1121),a=r(951),s=r(2),u=h(r(125)),c=r(718),l=r(717),g=r(1122),f=r(359);function h(e){return e&&e.__esModule?e:{default:e}}function p(e){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function I(e){return function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return y(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return y(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var C=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))};function E(e,t){if(e.length<=0)return[];var r=e.map((function(e){return{model:e,nodeNumber:B(e)}})).sort((function(e,t){return e.nodeNumber-t.nodeNumber}));if(r[0].nodeNumber>=t)return r.map((function(e){return[e.model]}));for(var n=[],i=[],o=0,A=0,a=r.length;A<a;A++){var s=r[A];o+s.nodeNumber<=t?(o+=s.nodeNumber,i.push(s.model)):(n.push(i),i=[s.model],o=s.nodeNumber)}return i.length>0&&n.push(i),n}function B(e){return e.children.reduce((function(e,t){return e+B(t)}),1)}function v(e){var t=[],r=[];return e.forEach((function(e){t.push.apply(t,I(e.rebuildModels)),r.push.apply(r,I(e.failedModels))})),{rebuildModels:t,failedModels:r}}var m=function(){function e(t,r){var i=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.resourceService=r,this.getAttachedsByModel=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.map((function(e){var t=e.serialize(void 0,!0,!0);return{id:e.getId(),data:t,matrix:e.getConcatenatedMatrix()}}));return i.getAttachedsByData(r.map((function(e){return e.data})),t).then((function(e){return Object.assign(Object.assign({},e),{requestModels:r})}))},this.getAttachedsByData=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return C(i,void 0,void 0,n.default.mark((function r(){var i,A,a,s,u,c,l,g,f,h,p,d,y,B=this;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.getAttachSwitch();case 2:return i=r.sent,A=i.isNew,a=i.nodeLimit,s=new o.default,A?(c=E(e,a),u=c.map((function(e){return B.requestAttacheds({paramModelDatas:e,context:s,params:t})}))):u=e.map((function(e){return B.requestAttacheds({paramModelDatas:[e],context:s,params:t})})),r.next=8,u.reduce((function(e,t){return C(B,void 0,void 0,n.default.mark((function r(){var i,o,A;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,t;case 2:return i=r.sent,r.next=5,e;case 5:return(o=r.sent).attachedModels.push(i.attachedModels),i.paramModelTasks.length>0&&(A=o.paramModelTasks).push.apply(A,I(i.paramModelTasks)),r.abrupt("return",o);case 9:case"end":return r.stop()}}),r)})))}),Promise.resolve({attachedModels:[],paramModelTasks:[]}));case 8:return l=r.sent,g=l.attachedModels,f=l.paramModelTasks,r.next=13,this.processParamModelTasks(f,s);case 13:return h=r.sent,p=h.result,d=h.errorParamModelIds,y=d.reduce((function(t,r){var n=e.find((function(e){return e.id===r}));return n&&t.push(n),t}),[]),r.abrupt("return",Object.assign(Object.assign({},v([].concat(I(g),I(p),[{rebuildModels:[],failedModels:y}]))),{requestModels:e,context:s}));case 18:case"end":return r.stop()}}),r,this)})))},this.rawRequestAttacheds=function(e){return C(i,void 0,void 0,n.default.mark((function t(){var r,i,o,A,a,u,g,h,p,d,y,C,E=this;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.paramModelDatas,i=e.context,o=e.params,A=e.isRetry,a=void 0!==A&&A,t.next=3,this.config[f.__INTERNAL__getParamModelBackEndParam](r,o);case 3:if(u=t.sent,g=r.map((function(e){return Object.assign({id:e.id,paramModelData:e,retryCount:a?1:void 0,calWireFrames:!0,needCustomFaceData:!1,needResourceData:!1},u)})),t.prev=5,!l.COMMON_ENV.PARAM_MODEL_MICRO_TASK_ENABLE){t.next=12;break}return t.next=9,this.requestAttachedV4NonPb(g);case 9:h=t.sent,t.next=15;break;case 12:return t.next=14,this.originalRequestAttacheds(g);case 14:h=t.sent;case 15:return p=(0,s.map)(h.parammodelIdToTaskId||{},(function(e,t){return{taskId:e,paramModelId:t}})),t.next=18,this.applyAttachedResource(h,i);case 18:if(d=t.sent,y=(d.errorMessages||[]).reduce((function(e,t){if(t.errCode===c.PARAM_MODEL_TOO_BIG_ERROR)return e;var n=r.find((function(e){return e.id===t.paramModelId}));return n&&e.push(n),e}),[]),a||!(y.length>0)){t.next=23;break}return C={attachedModels:{rebuildModels:(0,s.uniqBy)(d.models,"id")||[],failedModels:[]},paramModelTasks:[]},t.abrupt("return",Promise.all([C].concat(I(y.map((function(e){return E.retryRequestAttacheds({paramModelDatas:[e],context:i,params:o,isRetry:!0})}))))).then((function(e){return{attachedModels:v((0,s.map)(e,"attachedModels")),paramModelTasks:[]}})));case 23:return t.abrupt("return",{attachedModels:{rebuildModels:(0,s.uniqBy)(d.models,"id")||[],failedModels:y},paramModelTasks:p});case 26:return t.prev=26,t.t0=t.catch(5),t.abrupt("return",{attachedModels:{rebuildModels:[],failedModels:r},paramModelTasks:[]});case 29:case"end":return t.stop()}}),t,this,[[5,26]])})))},this.requestAttacheds=(0,a.queue)({concurrency:c.concurrency})(this.rawRequestAttacheds),this.retryRequestAttacheds=(0,a.queue)({concurrency:c.concurrency})(this.rawRequestAttacheds),this.getAttachSwitch=(0,u.default)((function(){return i.config[f.__INTERNAL__getRequestClient]().get("/dcs-model/api/attach/switch").then((function(e){return e.data}),(function(){return{nodeLimit:1,isNew:!1}}))}),Object.assign({promise:!0},c.memoizeValues))}var t,r,h;return t=e,(r=[{key:"processParamModelTasks",value:function(e,t){return C(this,void 0,void 0,n.default.mark((function r(){var i,o,A,a,u;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return u=function(e){return C(this,void 0,void 0,n.default.mark((function r(){var c,g,f,h,p,d=this;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return c=(0,s.chunk)(e,l.COMMON_ENV.PARAM_MODEL_MICRO_TASK_CHUNK_SIZE),r.next=3,c.reduce((function(e,r){return C(d,void 0,void 0,n.default.mark((function i(){var A,u,c,l;return n.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,a.requestAttachedTasksNonPb(r);case 3:return u=n.sent,n.next=6,a.applyAttachedResource(u,t);case 6:return c=n.sent,n.next=9,e;case 9:l=n.sent,(A=l.paramModelTasks).push.apply(A,I((0,s.map)(u.parammodelIdToTaskId||{},(function(e,t){return{taskId:e,paramModelId:t}})))),l.attachedModels.push({rebuildModels:(0,s.uniqBy)(c.models,"id")||[],failedModels:[]}),n.next=18;break;case 14:return n.prev=14,n.t0=n.catch(0),o.push.apply(o,I((0,s.map)(r,"paramModelId"))),n.abrupt("return",e);case 18:return n.abrupt("return",e);case 19:case"end":return n.stop()}}),i,null,[[0,14]])})))}),Promise.resolve({attachedModels:[],paramModelTasks:[]}));case 3:if(g=r.sent,f=g.attachedModels,h=g.paramModelTasks,i.push.apply(i,I(f)),!(A<l.COMMON_ENV.PARAM_MODEL_MICRO_TASK_RETRY_COUNT&&h.length>0)){r.next=16;break}return A++,p=new Promise((function(e){setTimeout((function(){e()}),l.COMMON_ENV.PARAM_MODEL_MICRO_TASK_RETRY_DELAY||0)})),r.next=12,p;case 12:return r.next=14,u(h);case 14:r.next=17;break;case 16:o.push.apply(o,I((0,s.map)(h,"paramModelId")));case 17:case"end":return r.stop()}}),r)})))},i=[],o=[],A=0,a=this,r.next=7,u(e);case 7:return r.abrupt("return",{result:i,errorParamModelIds:o});case 8:case"end":return r.stop()}}),r,this)})))}},{key:"originalRequestAttacheds",value:function(e){return C(this,void 0,void 0,n.default.mark((function t(){var r;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.config[f.__INTERNAL__getRequestClient]().gzipPost("/dcs-model/api/c/parammodel",e);case 2:return r=t.sent,t.abrupt("return",r.data);case 4:case"end":return t.stop()}}),t,this)})))}},{key:"requestAttachedV4NonPb",value:function(e){return C(this,void 0,void 0,n.default.mark((function t(){var r,i,o;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.config[f.__INTERNAL__getRequestClient]().pbGzipPost("/dcs-model/api/c/parammodel/v4/plain",{requestData:e},{extra:{isRequestBodyJson:!0}});case 2:return r=t.sent,i=r.data,o=A.dcs_model_attach.PBParamModelResponseDataV3.decode(i).toJSON(),(0,g.removeKeys)(o,["FULL_NAME"]),t.abrupt("return",o);case 7:case"end":return t.stop()}}),t,this)})))}},{key:"requestAttachedTasksNonPb",value:function(e){return C(this,void 0,void 0,n.default.mark((function t(){var r,i;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.config[f.__INTERNAL__getRequestClient]().pbGzipPost("/dcs-model-task/api/site/parammodel/result/plain",A.dcs_model_attach.PBParamModelTaskQueryRequests.create({requests:e}));case 2:return r=t.sent,i=A.dcs_model_attach.PBParamModelResponseDataV3.decode(r.data).toJSON(),(0,g.removeKeys)(i,["FULL_NAME"]),t.abrupt("return",i);case 6:case"end":return t.stop()}}),t,this)})))}},{key:"applyAttachedResource",value:function(e,t){return C(this,void 0,void 0,n.default.mark((function r(){var i;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.resourceService.updateParamModelDataWithResource(e);case 2:return i=r.sent,t.addCustomResources(i),r.abrupt("return",i);case 5:case"end":return r.stop()}}),r,this)})))}},{key:"createParams",value:function(e,t){return C(this,void 0,void 0,n.default.mark((function r(){var o,A,a;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,o=e.getRootOrAccessory(),A=o.serialize(void 0,!0,!0),a={paramModelData:A,variableParams:[t]},r.next=6,this.config[f.__INTERNAL__getRequestClient]().gzipPost("/dcs-model/api/c/parammodeldata/param/update",a).then((function(e){for(var r=e.data,n=function(e){var n=r.children.find((function(r){return r.id===t.paramModelPath[e]}));if(!n)return{v:void 0};r=n},o=1;o<t.paramModelPath.length;o++){var A=n(o);if("object"===p(A))return A.v}var a=(r.params||[]).find((function(e){var r;return e.name===(null===(r=t.paramOperates[0])||void 0===r?void 0:r.param.name)}));if(a)return new i.default(a)}));case 6:return r.abrupt("return",r.sent);case 9:return r.prev=9,r.t0=r.catch(0),r.abrupt("return",void 0);case 12:case"end":return r.stop()}}),r,this,[[0,9]])})))}}])&&d(t.prototype,r),h&&d(t,h),e}();t.ParamModelGetAttachedService=m},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResourceDataService=void 0;var n=A(r(1)),i=A(r(2077)),o=r(359);function A(e){return e&&e.__esModule?e:{default:e}}function a(e){return function(e){if(Array.isArray(e))return l(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||c(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function u(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=c(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function c(e,t){if(e){if("string"==typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(e,t):void 0}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var g,f=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))};!function(e){e.Array="Array",e.Object="Object"}(g||(g={}));var h=new i.default({maxAge:36e5,max:200}),p=function(e,t,r){var n,i=u(e.keys());try{for(i.s();!(n=i.n()).done;){var o=n.value;if(o.split("_")[0]===t)if(o.split("_")[1].split(",").includes(r.toString())&&e.get(o))return o}}catch(e){i.e(e)}finally{i.f()}return""},d=function(e,t){return function(r,i,o){return f(void 0,void 0,void 0,n.default.mark((function A(){var a,s,c,l,f,d;return n.default.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:a=o===g.Array?[]:{},c=r.sort(),l=u(c),A.prev=3,d=n.default.mark((function r(){var o,A,u,l,g;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return o=f.value,A=p(h,i,o),u=void 0,A?(s=A,u=h.get(s)):(s="".concat(i,"_").concat(c.toString()),u=e(c),h.set(s,u)),r.prev=4,r.next=7,u;case 7:l=r.sent,Array.isArray(a)&&t?(g=l.find((function(e){return e[t.dataItemFilterField]===o})))&&a.push(g):l[o]&&(a[o]=l[o]),r.next=14;break;case 11:r.prev=11,r.t0=r.catch(4),h.del(s);case 14:case"end":return r.stop()}}),r,null,[[4,11]])})),l.s();case 6:if((f=l.n()).done){A.next=10;break}return A.delegateYield(d(),"t0",8);case 8:A.next=6;break;case 10:A.next=15;break;case 12:A.prev=12,A.t1=A.catch(3),l.e(A.t1);case 15:return A.prev=15,l.f(),A.finish(15);case 18:return A.abrupt("return",a);case 19:case"end":return A.stop()}}),A,null,[[3,12,15,18]])})))}},I=function(){function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.getSpecificProductData=function(e){return function(t){return f(r,void 0,void 0,n.default.mark((function r(){var i,A=this;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(t.length){r.next=2;break}return r.abrupt("return",[]);case 2:return r.next=4,d((function(t){return f(A,void 0,void 0,n.default.mark((function r(){var i,A;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,this.config[o.__INTERNAL__getRequestClient]().gzipPost("/dcs-resource/api/c/productdata/bgid",{bgIds:t});case 3:return i=r.sent,A=i.data,r.abrupt("return",null==A?void 0:A.d[e]);case 8:return r.prev=8,r.t0=r.catch(0),r.abrupt("return",[]);case 11:case"end":return r.stop()}}),r,this,[[0,8]])})))}),{dataItemFilterField:"brandGoodId"})(t,e,g.Array);case 4:return i=r.sent,r.abrupt("return",i);case 6:case"end":return r.stop()}}),r)})))}},this.resourceObtainList=[{targetField:"hardwares",idField:"hardwareBgIds",handler:this.getSpecificProductData("hardwares"),dataType:g.Array},{targetField:"textures",idField:"textureBgIds",handler:this.getSpecificProductData("textures"),dataType:g.Array},{targetField:"virtualModels",idField:"virtualModelBgIds",handler:this.getSpecificProductData("virtualModels"),dataType:g.Array},{targetField:"paramModelProducts",idField:"paramModelBgIds",handler:this.getSpecificProductData("paramModelProducts"),dataType:g.Array},{targetField:"moldings",idField:"moldingBgIds",handler:this.getSpecificProductData("moldings"),dataType:g.Array},{targetField:"paramPackages",idField:"obsParamPackageIds",handler:d((function(e){return f(r,void 0,void 0,n.default.mark((function t(){var r,i;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.length){t.next=2;break}return t.abrupt("return",[]);case 2:return t.prev=2,t.next=5,this.config[o.__INTERNAL__getRequestClient]().gzipPost("/dcs-resource/api/c/parampackage",{obsParamPackageIds:e});case 5:return r=t.sent,i=r.data,t.abrupt("return",null==i?void 0:i.d);case 10:return t.prev=10,t.t0=t.catch(2),t.abrupt("return",[]);case 13:case"end":return t.stop()}}),t,this,[[2,10]])})))}),{dataItemFilterField:"id"}),dataType:g.Array},{targetField:"displayInfoMap",idField:"hardwareBgIds",handler:d((function(e){return f(r,void 0,void 0,n.default.mark((function t(){var r,i;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.length){t.next=2;break}return t.abrupt("return",{});case 2:return t.prev=2,t.next=5,this.config[o.__INTERNAL__getRequestClient]().gzipPost("/dcs-resource/api/c/displayinfo",{bgIds:e});case 5:return r=t.sent,i=r.data,t.abrupt("return",null==i?void 0:i.d);case 10:return t.prev=10,t.t0=t.catch(2),t.abrupt("return",{});case 13:case"end":return t.stop()}}),t,this,[[2,10]])})))})),dataType:g.Object},{targetField:"displayInfoMap",idField:"textureBgIds",handler:d((function(e){return f(r,void 0,void 0,n.default.mark((function t(){var r,i;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.length){t.next=2;break}return t.abrupt("return",{});case 2:return t.prev=2,t.next=5,this.config[o.__INTERNAL__getRequestClient]().gzipPost("/dcs-resource/api/c/displaymaterial",{bgIds:e});case 5:return r=t.sent,i=r.data,t.abrupt("return",null==i?void 0:i.d);case 10:return t.prev=10,t.t0=t.catch(2),t.abrupt("return",{});case 13:case"end":return t.stop()}}),t,this,[[2,10]])})))})),dataType:g.Object},{targetField:"fitRules",idField:"obsRuleIds",handler:d((function(e){return f(r,void 0,void 0,n.default.mark((function t(){var r,i;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.length){t.next=2;break}return t.abrupt("return",[]);case 2:return t.prev=2,t.next=5,this.config[o.__INTERNAL__getRequestClient]().gzipPost("/dcs-resource/api/c/fitrule",{obsRuleIds:e});case 5:return r=t.sent,i=r.data,t.abrupt("return",null==i?void 0:i.d);case 10:return t.prev=10,t.t0=t.catch(2),t.abrupt("return",[]);case 13:case"end":return t.stop()}}),t,this,[[2,10]])})))}),{dataItemFilterField:"obsRuleId"}),dataType:g.Array}]}var t,r,i;return t=e,(r=[{key:"updateParamModelDataWithResource",value:function(e){return f(this,void 0,void 0,n.default.mark((function t(){var r,i=this;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=Object.assign({},e),t.next=3,Promise.all(this.resourceObtainList.map((function(e){return f(i,void 0,void 0,n.default.mark((function t(){var i,o,A,s,u,c;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=e.targetField,o=e.idField,A=e.handler,s=e.dataType,!(u=r[o]||[]).length){t.next=7;break}return t.next=5,A(u,i,s);case 5:c=t.sent,s===g.Array?r[i]=r[i]?[].concat(a(r[i]),a(c)):c:r[i]=r[i]?Object.assign(Object.assign({},r[i]),c):c;case 7:case"end":return t.stop()}}),t)})))})));case 3:return t.abrupt("return",r);case 4:case"end":return t.stop()}}),t,this)})))}}])&&s(t.prototype,r),i&&s(t,i),e}();t.ResourceDataService=I},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var o=r(2078),A=Symbol("max"),a=Symbol("length"),s=Symbol("lengthCalculator"),u=Symbol("allowStale"),c=Symbol("maxAge"),l=Symbol("dispose"),g=Symbol("noDisposeOnSet"),f=Symbol("lruList"),h=Symbol("cache"),p=Symbol("updateAgeOnGet"),d=function(){return 1},I=function(){function e(t){if(n(this,e),"number"==typeof t&&(t={max:t}),t||(t={}),t.max&&("number"!=typeof t.max||t.max<0))throw new TypeError("max must be a non-negative number");this[A]=t.max||1/0;var r=t.length||d;if(this[s]="function"!=typeof r?d:r,this[u]=t.stale||!1,t.maxAge&&"number"!=typeof t.maxAge)throw new TypeError("maxAge must be a number");this[c]=t.maxAge||0,this[l]=t.dispose,this[g]=t.noDisposeOnSet||!1,this[p]=t.updateAgeOnGet||!1,this.reset()}var t,r,I;return t=e,(r=[{key:"max",get:function(){return this[A]},set:function(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[A]=e||1/0,E(this)}},{key:"allowStale",get:function(){return this[u]},set:function(e){this[u]=!!e}},{key:"maxAge",get:function(){return this[c]},set:function(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[c]=e,E(this)}},{key:"lengthCalculator",get:function(){return this[s]},set:function(e){var t=this;"function"!=typeof e&&(e=d),e!==this[s]&&(this[s]=e,this[a]=0,this[f].forEach((function(e){e.length=t[s](e.value,e.key),t[a]+=e.length}))),E(this)}},{key:"length",get:function(){return this[a]}},{key:"itemCount",get:function(){return this[f].length}},{key:"rforEach",value:function(e,t){t=t||this;for(var r=this[f].tail;null!==r;){var n=r.prev;m(this,e,r,t),r=n}}},{key:"forEach",value:function(e,t){t=t||this;for(var r=this[f].head;null!==r;){var n=r.next;m(this,e,r,t),r=n}}},{key:"keys",value:function(){return this[f].toArray().map((function(e){return e.key}))}},{key:"values",value:function(){return this[f].toArray().map((function(e){return e.value}))}},{key:"reset",value:function(){var e=this;this[l]&&this[f]&&this[f].length&&this[f].forEach((function(t){return e[l](t.key,t.value)})),this[h]=new Map,this[f]=new o,this[a]=0}},{key:"dump",value:function(){var e=this;return this[f].map((function(t){return!C(e,t)&&{k:t.key,v:t.value,e:t.now+(t.maxAge||0)}})).toArray().filter((function(e){return e}))}},{key:"dumpLru",value:function(){return this[f]}},{key:"set",value:function(e,t,r){if((r=r||this[c])&&"number"!=typeof r)throw new TypeError("maxAge must be a number");var n=r?Date.now():0,i=this[s](t,e);if(this[h].has(e)){if(i>this[A])return B(this,this[h].get(e)),!1;var o=this[h].get(e).value;return this[l]&&(this[g]||this[l](e,o.value)),o.now=n,o.maxAge=r,o.value=t,this[a]+=i-o.length,o.length=i,this.get(e),E(this),!0}var u=new v(e,t,i,n,r);return u.length>this[A]?(this[l]&&this[l](e,t),!1):(this[a]+=u.length,this[f].unshift(u),this[h].set(e,this[f].head),E(this),!0)}},{key:"has",value:function(e){if(!this[h].has(e))return!1;var t=this[h].get(e).value;return!C(this,t)}},{key:"get",value:function(e){return y(this,e,!0)}},{key:"peek",value:function(e){return y(this,e,!1)}},{key:"pop",value:function(){var e=this[f].tail;return e?(B(this,e),e.value):null}},{key:"del",value:function(e){B(this,this[h].get(e))}},{key:"load",value:function(e){this.reset();for(var t=Date.now(),r=e.length-1;r>=0;r--){var n=e[r],i=n.e||0;if(0===i)this.set(n.k,n.v);else{var o=i-t;o>0&&this.set(n.k,n.v,o)}}}},{key:"prune",value:function(){var e=this;this[h].forEach((function(t,r){return y(e,r,!1)}))}}])&&i(t.prototype,r),I&&i(t,I),e}(),y=function(e,t,r){var n=e[h].get(t);if(n){var i=n.value;if(C(e,i)){if(B(e,n),!e[u])return}else r&&(e[p]&&(n.value.now=Date.now()),e[f].unshiftNode(n));return i.value}},C=function(e,t){if(!t||!t.maxAge&&!e[c])return!1;var r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[c]&&r>e[c]},E=function(e){if(e[a]>e[A])for(var t=e[f].tail;e[a]>e[A]&&null!==t;){var r=t.prev;B(e,t),t=r}},B=function(e,t){if(t){var r=t.value;e[l]&&e[l](r.key,r.value),e[a]-=r.length,e[h].delete(r.key),e[f].removeNode(t)}},v=function e(t,r,i,o,A){n(this,e),this.key=t,this.value=r,this.length=i,this.now=o,this.maxAge=A||0},m=function(e,t,r,n){var i=r.value;C(e,i)&&(B(e,r),e[u]||(i=void 0)),i&&t.call(n,i.value,i.key,e)};e.exports=I},function(e,t,r){"use strict";function n(e){var t=this;if(t instanceof n||(t=new n),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var r=0,i=arguments.length;r<i;r++)t.push(arguments[r]);return t}function i(e,t,r){var n=t===e.head?new a(r,null,t,e):new a(r,t,t.next,e);return null===n.next&&(e.tail=n),null===n.prev&&(e.head=n),e.length++,n}function o(e,t){e.tail=new a(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function A(e,t){e.head=new a(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function a(e,t,r,n){if(!(this instanceof a))return new a(e,t,r,n);this.list=n,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}e.exports=n,n.Node=a,n.create=n,n.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,r=e.prev;return t&&(t.prev=r),r&&(r.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=r),e.list.length--,e.next=null,e.prev=null,e.list=null,t},n.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},n.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},n.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)o(this,arguments[e]);return this.length},n.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)A(this,arguments[e]);return this.length},n.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},n.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},n.prototype.forEach=function(e,t){t=t||this;for(var r=this.head,n=0;null!==r;n++)e.call(t,r.value,n,this),r=r.next},n.prototype.forEachReverse=function(e,t){t=t||this;for(var r=this.tail,n=this.length-1;null!==r;n--)e.call(t,r.value,n,this),r=r.prev},n.prototype.get=function(e){for(var t=0,r=this.head;null!==r&&t<e;t++)r=r.next;if(t===e&&null!==r)return r.value},n.prototype.getReverse=function(e){for(var t=0,r=this.tail;null!==r&&t<e;t++)r=r.prev;if(t===e&&null!==r)return r.value},n.prototype.map=function(e,t){t=t||this;for(var r=new n,i=this.head;null!==i;)r.push(e.call(t,i.value,this)),i=i.next;return r},n.prototype.mapReverse=function(e,t){t=t||this;for(var r=new n,i=this.tail;null!==i;)r.push(e.call(t,i.value,this)),i=i.prev;return r},n.prototype.reduce=function(e,t){var r,n=this.head;if(arguments.length>1)r=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");n=this.head.next,r=this.head.value}for(var i=0;null!==n;i++)r=e(r,n.value,i),n=n.next;return r},n.prototype.reduceReverse=function(e,t){var r,n=this.tail;if(arguments.length>1)r=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");n=this.tail.prev,r=this.tail.value}for(var i=this.length-1;null!==n;i--)r=e(r,n.value,i),n=n.prev;return r},n.prototype.toArray=function(){for(var e=new Array(this.length),t=0,r=this.head;null!==r;t++)e[t]=r.value,r=r.next;return e},n.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,r=this.tail;null!==r;t++)e[t]=r.value,r=r.prev;return e},n.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new n;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=0,o=this.head;null!==o&&i<e;i++)o=o.next;for(;null!==o&&i<t;i++,o=o.next)r.push(o.value);return r},n.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new n;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=this.length,o=this.tail;null!==o&&i>t;i--)o=o.prev;for(;null!==o&&i>e;i--,o=o.prev)r.push(o.value);return r},n.prototype.splice=function(e,t){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var r=0,n=this.head;null!==n&&r<e;r++)n=n.next;var o=[];for(r=0;n&&r<t;r++)o.push(n.value),n=this.removeNode(n);null===n&&(n=this.tail),n!==this.head&&n!==this.tail&&(n=n.prev);for(r=0;r<(arguments.length<=2?0:arguments.length-2);r++)n=i(this,n,r+2<2||arguments.length<=r+2?void 0:arguments[r+2]);return o},n.prototype.reverse=function(){for(var e=this.head,t=this.tail,r=e;null!==r;r=r.prev){var n=r.prev;r.prev=r.next,r.next=n}return this.head=t,this.tail=e,this};try{r(2079)(n)}catch(e){}},function(e,t,r){"use strict";r.r(t),function(e){var t=r(1),n=r.n(t);e.exports=function(e){e.prototype[Symbol.iterator]=n.a.mark((function e(){var t;return n.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this.head;case 1:if(!t){e.next=7;break}return e.next=4,t.value;case 4:t=t.next,e.next=1;break;case 7:case"end":return e.stop()}}),e,this)}))}}.call(this,r(835)(e))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParamModelAssemblyUpdateAttachedService=void 0;var n,i=(n=r(208))&&n.__esModule?n:{default:n},o=r(243),A=r(2),a=r(359),s=r(2081);function u(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return c(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var g=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.paramModelService=r}var t,r,n;return t=e,(r=[{key:"updateAssemblyAttacheds",value:function(e,t){var r=this,n=Object.assign(Object.assign({},this.config[a.__INTERNAL__getDefaultParams]()),t),i=this.config[a.__INTERNAL__chunkParamAssemblyModels](e,n).map((function(e){return r.updateAssemblyAttachedsInternal(e.models,Object.assign(Object.assign({},n),e.params))}));return Promise.all(i)}},{key:"updateAssemblyAttachedsInternal",value:function(e,t){var r=[],n=[];e.forEach((function(e){e.isTemplateAssembly()?r.push(e):n.push(e)}));var i=[];return n.length>0&&i.push(this.updateInstanceAttacheds(n,t)),r.length>0&&i.push(this.updateTemplateAttacheds(r,t)),Promise.all(i)}},{key:"updateInstanceAttacheds",value:function(e,t){var r=(0,A.flatMap)(e,(function(e){return e.getParamModels()}));return this.paramModelService.updateModelAttacheds(r,t)}},{key:"updateTemplateAttacheds",value:function(e,t){var r=this,n=t.excludeAccessories,i=e.map((function(e){return r.updateTemplateAttached(e,t)}));if(!n){var a=(0,A.flatMap)(e,(function(e){return o.ParamModelUtils.collectAccessories(e.getParamModels())}));a.length>0&&i.push(this.paramModelService.updateModelAttacheds(a,t))}return Promise.all(i)}},{key:"updateTemplateAttached",value:function(e,t){var r=t.applyTransform,n=e.serialize(void 0,!1,{includeAccessory:!1,isRootWorldMatrix:!0});return(0,s.getTemplateAttachedByData)(n,t,this.config).then((function(t){var n=new i.default;n.addCustomResources(t);var o=e.getPosition().clone(),A=e.getRotation().clone(),a=t.assemblyDatas[0];if(a)e.parse(a,n,{isRootWorldMatrix:!0});else{e.applyResource(n,!0);var s,c=e.getMatrix4(),l=u(e.getParamModels());try{for(l.s();!(s=l.n()).done;){var g=s.value;g.setMatrix4(c.clone().multiply(g.getMatrix4()))}}catch(e){l.e(e)}finally{l.f()}}("function"==typeof r?r(e.getId()):r)||e.updateTransform(o,A),e.setHasAttached(!0),e.getParamModels().forEach((function(e){return e.setHasAttached(!0)}))}))}}])&&l(t.prototype,r),n&&l(t,n),e}();t.ParamModelAssemblyUpdateAttachedService=g},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTemplateAttachedByData=function(e,t,r){return A(this,void 0,void 0,i.default.mark((function n(){var A,a,s;return i.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,r[o.__INTERNAL__getParamModelAssemblyBackEndParam]([e],t);case 2:return A=n.sent,a=[Object.assign({id:e.id,assemblyData:e,calWireFrames:!0},A)],n.next=6,r[o.__INTERNAL__getRequestClient]().gzipPost("/dcs-model/api/c/assemblymodel",a);case 6:return s=n.sent,n.abrupt("return",s.data);case 8:case"end":return n.stop()}}),n)})))};var n,i=(n=r(1))&&n.__esModule?n:{default:n},o=r(359);var A=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParamModelUpdateAttachedService=void 0;var n=r(243),i=r(359),o=r(2083);function A(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var a=function(){function e(t,r){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.getAttached=r,this.modelHandler=function(e,t){var r=t.applyTransform;return n.getAttached.getAttachedsByModel(e,t).then((function(t){return n.applyAttached(e,t,r)}))},this.applyAttached=function(e,t,r){var n=t.rebuildModels,i=t.failedModels,A=t.context,a=t.requestModels;e.forEach((function(e){if(e.setHasAttached(!0),i.find((function(t){return t.id===e.id})))e.setLegal(!1);else{var t=e.getMatrix4(),s=e.getPosition().clone(),u=e.getRotation().clone(),c=n.find((function(t){return t.id===e.id}));c?e.parse(c,A):e.applyResource(A,!0);var l=a?a.find((function(t){return t.id===e.id})).matrix:void 0,g=e.getMatrix4();(0,o.handleTransform)(e,{applyTransform:r,position:s,rotation:u,matrix:t,requestMatrix:l,responseMatrix:g})}}))}}var t,r,a;return t=e,(r=[{key:"updateModelAttacheds",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Object.assign(Object.assign({},this.config[i.__INTERNAL__getDefaultParams]()),r),o=this.config[i.__INTERNAL__chunkParamModels](e,n),A=o.map((function(e){return t.updateAttachedsInternal(e.models,Object.assign(Object.assign({},n),e.params))}));return Promise.all(A)}},{key:"updateAttachedsInternal",value:function(e,t){return t.excludeAccessories||(e=n.ParamModelUtils.flattenModels(e)),this.modelHandlerWrapper(e,t)}},{key:"modelHandlerWrapper",value:function(e,t){var r=this,n=new Map,o=this.config[i.__INTERNAL__getParamModelHandlers]();e.forEach((function(e){var t=o.find((function(t){return t.filter(e)})),i=t?t.attachHandler:r.modelHandler,A=n.get(i);void 0===A&&(A=[],n.set(i,A)),A.push(e)}));var A=[];return n.forEach((function(e,r){return A.push(r(e,t))})),Promise.all(A)}}])&&A(t.prototype,r),a&&A(t,a),e}();t.ParamModelUpdateAttachedService=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.handleTransform=function(e,t){var r=t.applyTransform,o=t.position,A=t.rotation,a=t.matrix,s=t.requestMatrix,u=t.responseMatrix;if("function"==typeof r?r(e.getId()):r){if(!a||!s||!u)return;if(!n.default.equals(s,a)){var c=(new i.default).getInverse(s).premultiply(a);e.setMatrix4(u.clone().premultiply(c))}}else{if(!o||!A)return;e.setPosition(o),e.setRotation(A)}};var n=o(r(114)),i=o(r(44));function o(e){return e&&e.__esModule?e:{default:e}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(108);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var i=r(2085);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})}));var o=r(2090);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParamModelDataService=void 0;var n=p(r(1)),i=r(47),o=r(10),A=r(1121),a=p(r(5)),s=p(r(125)),u=r(2086),c=r(1123),l=r(718),g=r(717),f=r(1122),h=r(108);function p(e){return e&&e.__esModule?e:{default:e}}function d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var I=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))},y=function(){function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.noCacheGetParamModelDataByBrandGoodId=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return I(r,void 0,void 0,n.default.mark((function r(){var i,o,a,s;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!g.COMMON_ENV.PARAM_MODEL_DATA_PB_ENABLE){r.next=18;break}return i=u.util.toJSONOptions.defaults||!0,u.util.toJSONOptions.defaults=!0,r.prev=3,r.next=6,this.config.requestClient.pbGzipGet("/dcs-model/api/c/parammodeldata/".concat(e,"/v2?cache=").concat(t));case 6:return o=r.sent,a=A.dcs_model.PBParamModelViewData.decode(o.data).toJSON(),(0,f.removeKeys)(a,["FULL_NAME"]),r.abrupt("return",a);case 12:return r.prev=12,r.t0=r.catch(3),r.abrupt("return",Promise.reject(r.t0));case 15:return r.prev=15,u.util.toJSONOptions.defaults=i,r.finish(15);case 18:return r.next=20,this.config.requestClient.gzipGet("/dcs-model/api/c/parammodeldata/".concat(e,"?cache=").concat(t));case 20:return s=r.sent,r.abrupt("return",s.data);case 22:case"end":return r.stop()}}),r,this,[[3,12,15,18]])})))},this.getParamModelDataByBrandGoodId=(0,s.default)((function(e){return r.noCacheGetParamModelDataByBrandGoodId(e,!0)}),Object.assign({promise:!0},l.memoizeValues))}var t,r,p;return t=e,(r=[{key:"getParamModelByProduct",value:function(e){return I(this,void 0,void 0,n.default.mark((function t(){var r,o;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getParamModelDataByBrandGoodId(e.brandGoodId);case 2:return r=t.sent,o=(new this.config.paramModelConstructor).parse(r.paramModelData,(new i.CoreCustomContext).addProduct(e)),(0,h.attach)(o,(0,h.toAttachedMap)(r)),o.setSize(this.calcSizeByProduct(o,e)),o.assignUniqueId(),(0,c.updatePositionByOffGround)(o,0),t.abrupt("return",o);case 9:case"end":return t.stop()}}),t,this)})))}},{key:"calcSizeByProduct",value:function(e,t){var r=t.size;return new a.default(r&&r.x||e.getParsedValue(o.ParamName.WIDTH),r&&r.y||e.getParsedValue(o.ParamName.DEPTH),r&&r.z||e.getParsedValue(o.ParamName.HEIGHT))}}])&&d(t.prototype,r),p&&d(t,p),e}();t.ParamModelDataService=y},function(e,t){},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.computeInferBoundingBox=u,t.computeInferBoxHeight=function(e){var t=u(e).boundingBox;return Math.abs(t.max.z-t.min.z)};var n=s(r(420)),i=s(r(141)),o=s(r(98)),A=s(r(44)),a=s(r(5));function s(e){return e&&e.__esModule?e:{default:e}}function u(e){var t=e.getPosition().clone(),r=e.getRotation().clone(),s=e.getBox3(),u=n.default.reorderToBackend(r).z,c=(new A.default).compose(t.clone().negate(),(new o.default).setFromVector3(new a.default(0,0,-u))),l=s.getPoints().map((function(e){return e.clone().applyMatrix4(c)}));return{boundingBox:(new i.default).setFromPoints(l),position:t,rotationZ:u}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isModelTop=function(e){return!(e instanceof n.CoreParamModel)||e.isRoot()&&!e.getAssembly()};var n=r(47)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateTransform=function(e,t){var r=t.position,n=t.rotation,a=t.scale;if(e instanceof i.CoreParamModel)r&&e.setPosition(r),n&&e.setRotation(n),a&&e.setScale(a);else{var s=new o.default(Object.assign(Object.assign({},(0,A.pick)(e.getPosition(),"x","y","z")),r)),u=new o.default(Object.assign(Object.assign({},(0,A.pick)(e.getRotation(),"x","y","z")),n)),c=new o.default(Object.assign(Object.assign({},(0,A.pick)(e.getScale(),"x","y","z")),a));e.updateTransform(s,u,c)}};var n,i=r(47),o=(n=r(5))&&n.__esModule?n:{default:n},A=r(2)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParamModelAssemblyDataService=void 0;var n,i=r(47),o=r(1089),A=r(519),a=(n=r(125))&&n.__esModule?n:{default:n},s=r(1123),u=r(718),c=r(108);function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var g=function(){function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.getAssemblyDataByBrandGoodId=(0,a.default)((function(e,t){return r.config.requestClient.gzipGet("/dcs-model/api/c/assemblydata",{params:{bgid:e,assemblycollectiondataid:t}}).then((function(e){return e.data}))}),Object.assign({promise:!0},u.memoizeValues))}var t,r,n;return t=e,(r=[{key:"getAssemblyByProduct",value:function(e,t){return this.getAssemblyDataByBrandGoodId(t.brandGoodId,t.assemblyCollectionDataId).then((function(r){var n,a=r.assemblyData;(0,A.isAssemblyCollectionProduct)(t)?(a.collectBrandGoodId||(a=Object.assign(Object.assign({},a),{collectBrandGoodId:t.brandGoodId})),n=t.assembly):n=!0;var u=(0,o.parseAssembly)(a,new i.CoreCustomContext,n,e.paramModelAssemblyConstructor);return(0,c.attach)(u,(0,c.toAttachedMap)(r)),(0,s.updatePositionByOffGround)(u,0),u.assignUniqueId()}))}}])&&l(t.prototype,r),n&&l(t,n),e}();t.ParamModelAssemblyDataService=g},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n={response:{afterReceive:function(e){if(e.headers&&e.headers.hasOwnProperty("x-qunhe-bizcode")){var t={errorCodeData:e.data,response:e};return Promise.reject(t)}return e}}};t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t){this.point=e,this.offset=t};t.default=n},function(e,t,r){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}};Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e){this.lengths=e,this.intersections=[]}return e.prototype.addIntersection=function(e){this.intersections.push(e)},e.prototype.getPoints=function(){return this.intersections.map((function(e){return e.point}))},e.prototype.getPointsInside=function(e){var t,r,i=[];try{for(var o=n(this.intersections),A=o.next();!A.done;A=o.next()){var a=A.value;a.offset.x>-e&&a.offset.x<this.lengths.x+e&&a.offset.y>-e&&a.offset.y<this.lengths.y+e&&i.push(a.point)}}catch(e){t={error:e}}finally{try{A&&!A.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return i},e}();t.default=i},function(e,t,r){},function(e,t,r){"use strict";r.r(t),r.d(t,"FittingDesignService",(function(){return Wm})),r.d(t,"IntersectedService",(function(){return wQ})),r.d(t,"CustomModelService",(function(){return NQ})),r.d(t,"FittingHintService",(function(){return KQ})),r.d(t,"FittingModelService",(function(){return ib})),r.d(t,"ECameraMode",(function(){return rb})),r.d(t,"ECameraMoveDirection",(function(){return nb})),r.d(t,"ModelCameraService",(function(){return gb})),r.d(t,"ModelHintService",(function(){return Eb})),r.d(t,"ModelService",(function(){return Tb})),r.d(t,"ESelectedType",(function(){return jb})),r.d(t,"ESetSelectType",(function(){return Vb})),r.d(t,"ModelViewerSelectionService",(function(){return Kb})),r.d(t,"ModelViewerSelectionV2Service",(function(){return r_})),r.d(t,"ModelViewerService",(function(){return g_})),r.d(t,"PlankPathService",(function(){return T_})),r.d(t,"ModelValidateService",(function(){return V_})),r.d(t,"SceneService",(function(){return X_})),r.d(t,"Application",(function(){return KS})),r.d(t,"EIntersectedCreatedType",(function(){return h})),r.d(t,"EIntersectedType",(function(){return g})),r.d(t,"EFittingType",(function(){return l})),r.d(t,"EIntersectedInfoType",(function(){return f})),r.d(t,"ELanguage",(function(){return Ue})),r.d(t,"FITTING_PARAM_GEOMETRY_COLOR_KEY",(function(){return Ke})),r.d(t,"FITTING_PARAM_GEOMETRY_OPACITY_KEY",(function(){return qe})),r.d(t,"CUSTOM_MODEL_CATEGORY_FILTER",(function(){return Je})),r.d(t,"EPointType",(function(){return E})),r.d(t,"ELineType",(function(){return B})),r.d(t,"EDesignMode",(function(){return Ve})),r.d(t,"ETriggerType",(function(){return He})),r.d(t,"EModelType",(function(){return Ye})),r.d(t,"KEYBOARD_KEY",(function(){return Xe})),r.d(t,"EIntersectModelType",(function(){return d})),r.d(t,"EProductDirection",(function(){return I})),r.d(t,"EPlankPathType",(function(){return We})),r.d(t,"EElementType",(function(){return ze})),r.d(t,"EToolType",(function(){return kf}));r(734),r(1346);var n,i,o,A,a=r(1),s=r.n(a),u=r(3);function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}
66
+ */A=function(){return function e(t,r,n){function i(A,a){if(!r[A]){if(!t[A]){if(o)return o(A,!0);var s=new Error("Cannot find module '"+A+"'");throw s.code="MODULE_NOT_FOUND",s}var u=r[A]={exports:{}};t[A][0].call(u.exports,(function(e){var r=t[A][1][e];return i(r||e)}),u,u.exports,e,t,r,n)}return r[A].exports}for(var o=!1,A=0;A<n.length;A++)i(n[A]);return i}({1:[function(e,t,n){(function(e){"use strict";var r,n,i=e.MutationObserver||e.WebKitMutationObserver;if(i){var o=0,A=new i(c),a=e.document.createTextNode("");A.observe(a,{characterData:!0}),r=function(){a.data=o=++o%2}}else if(e.setImmediate||void 0===e.MessageChannel)r="document"in e&&"onreadystatechange"in e.document.createElement("script")?function(){var t=e.document.createElement("script");t.onreadystatechange=function(){c(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},e.document.documentElement.appendChild(t)}:function(){setTimeout(c,0)};else{var s=new e.MessageChannel;s.port1.onmessage=c,r=function(){s.port2.postMessage(0)}}var u=[];function c(){var e,t;n=!0;for(var r=u.length;r;){for(t=u,u=[],e=-1;++e<r;)t[e]();r=u.length}n=!1}t.exports=function(e){1!==u.push(e)||n||r()}}).call(this,void 0!==r?r:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],2:[function(e,t,r){"use strict";var n=e(1);function i(){}var o={},A=["REJECTED"],s=["FULFILLED"],u=["PENDING"];function c(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=u,this.queue=[],this.outcome=void 0,e!==i&&h(this,e)}function l(e,t,r){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof r&&(this.onRejected=r,this.callRejected=this.otherCallRejected)}function g(e,t,r){n((function(){var n;try{n=t(r)}catch(t){return o.reject(e,t)}n===e?o.reject(e,new TypeError("Cannot resolve promise with itself")):o.resolve(e,n)}))}function f(e){var t=e&&e.then;if(e&&("object"===a(e)||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function h(e,t){var r=!1;function n(t){r||(r=!0,o.reject(e,t))}function i(t){r||(r=!0,o.resolve(e,t))}var A=p((function(){t(i,n)}));"error"===A.status&&n(A.value)}function p(e,t){var r={};try{r.value=e(t),r.status="success"}catch(e){r.status="error",r.value=e}return r}t.exports=c,c.prototype.catch=function(e){return this.then(null,e)},c.prototype.then=function(e,t){if("function"!=typeof e&&this.state===s||"function"!=typeof t&&this.state===A)return this;var r=new this.constructor(i);return this.state!==u?g(r,this.state===s?e:t,this.outcome):this.queue.push(new l(r,e,t)),r},l.prototype.callFulfilled=function(e){o.resolve(this.promise,e)},l.prototype.otherCallFulfilled=function(e){g(this.promise,this.onFulfilled,e)},l.prototype.callRejected=function(e){o.reject(this.promise,e)},l.prototype.otherCallRejected=function(e){g(this.promise,this.onRejected,e)},o.resolve=function(e,t){var r=p(f,t);if("error"===r.status)return o.reject(e,r.value);var n=r.value;if(n)h(e,n);else{e.state=s,e.outcome=t;for(var i=-1,A=e.queue.length;++i<A;)e.queue[i].callFulfilled(t)}return e},o.reject=function(e,t){e.state=A,e.outcome=t;for(var r=-1,n=e.queue.length;++r<n;)e.queue[r].callRejected(t);return e},c.resolve=function(e){return e instanceof this?e:o.resolve(new this(i),e)},c.reject=function(e){var t=new this(i);return o.reject(t,e)},c.all=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var r=e.length,n=!1;if(!r)return this.resolve([]);for(var A=new Array(r),a=0,s=-1,u=new this(i);++s<r;)c(e[s],s);return u;function c(e,i){t.resolve(e).then((function(e){A[i]=e,++a!==r||n||(n=!0,o.resolve(u,A))}),(function(e){n||(n=!0,o.reject(u,e))}))}},c.race=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var r=e.length,n=!1;if(!r)return this.resolve([]);for(var A,a=-1,s=new this(i);++a<r;)A=e[a],t.resolve(A).then((function(e){n||(n=!0,o.resolve(s,e))}),(function(e){n||(n=!0,o.reject(s,e))}));return s}},{1:1}],3:[function(e,t,n){(function(t){"use strict";"function"!=typeof t.Promise&&(t.Promise=e(2))}).call(this,void 0!==r?r:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{2:2}],4:[function(e,t,r){"use strict";var n="function"==typeof Symbol&&"symbol"===a(Symbol.iterator)?function(e){return a(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":a(e)},i=function(){try{if("undefined"!=typeof indexedDB)return indexedDB;if("undefined"!=typeof webkitIndexedDB)return webkitIndexedDB;if("undefined"!=typeof mozIndexedDB)return mozIndexedDB;if("undefined"!=typeof OIndexedDB)return OIndexedDB;if("undefined"!=typeof msIndexedDB)return msIndexedDB}catch(e){return}}();function o(e,t){e=e||[],t=t||{};try{return new Blob(e,t)}catch(i){if("TypeError"!==i.name)throw i;for(var r=new("undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder?MozBlobBuilder:WebKitBlobBuilder),n=0;n<e.length;n+=1)r.append(e[n]);return r.getBlob(t.type)}}"undefined"==typeof Promise&&e(3);var A=Promise;function s(e,t){t&&e.then((function(e){t(null,e)}),(function(e){t(e)}))}function u(e,t,r){"function"==typeof t&&e.then(t),"function"==typeof r&&e.catch(r)}function c(e){return"string"!=typeof e&&(console.warn(e+" used as a key, but it is not a string."),e=String(e)),e}function l(){if(arguments.length&&"function"==typeof arguments[arguments.length-1])return arguments[arguments.length-1]}var g=void 0,f={},h=Object.prototype.toString;function p(e){return"boolean"==typeof g?A.resolve(g):function(e){return new A((function(t){var r=e.transaction("local-forage-detect-blob-support","readwrite"),n=o([""]);r.objectStore("local-forage-detect-blob-support").put(n,"key"),r.onabort=function(e){e.preventDefault(),e.stopPropagation(),t(!1)},r.oncomplete=function(){var e=navigator.userAgent.match(/Chrome\/(\d+)/),r=navigator.userAgent.match(/Edge\//);t(r||!e||parseInt(e[1],10)>=43)}})).catch((function(){return!1}))}(e).then((function(e){return g=e}))}function d(e){var t=f[e.name],r={};r.promise=new A((function(e,t){r.resolve=e,r.reject=t})),t.deferredOperations.push(r),t.dbReady?t.dbReady=t.dbReady.then((function(){return r.promise})):t.dbReady=r.promise}function I(e){var t=f[e.name].deferredOperations.pop();if(t)return t.resolve(),t.promise}function y(e,t){var r=f[e.name].deferredOperations.pop();if(r)return r.reject(t),r.promise}function C(e,t){return new A((function(r,n){if(f[e.name]=f[e.name]||{forages:[],db:null,dbReady:null,deferredOperations:[]},e.db){if(!t)return r(e.db);d(e),e.db.close()}var o=[e.name];t&&o.push(e.version);var A=i.open.apply(i,o);t&&(A.onupgradeneeded=function(t){var r=A.result;try{r.createObjectStore(e.storeName),t.oldVersion<=1&&r.createObjectStore("local-forage-detect-blob-support")}catch(r){if("ConstraintError"!==r.name)throw r;console.warn('The database "'+e.name+'" has been upgraded from version '+t.oldVersion+" to version "+t.newVersion+', but the storage "'+e.storeName+'" already exists.')}}),A.onerror=function(e){e.preventDefault(),n(A.error)},A.onsuccess=function(){r(A.result),I(e)}}))}function E(e){return C(e,!1)}function B(e){return C(e,!0)}function v(e,t){if(!e.db)return!0;var r=!e.db.objectStoreNames.contains(e.storeName),n=e.version<e.db.version,i=e.version>e.db.version;if(n&&(e.version!==t&&console.warn('The database "'+e.name+"\" can't be downgraded from version "+e.db.version+" to version "+e.version+"."),e.version=e.db.version),i||r){if(r){var o=e.db.version+1;o>e.version&&(e.version=o)}return!0}return!1}function m(e){return o([function(e){for(var t=e.length,r=new ArrayBuffer(t),n=new Uint8Array(r),i=0;i<t;i++)n[i]=e.charCodeAt(i);return r}(atob(e.data))],{type:e.type})}function Q(e){return e&&e.__local_forage_encoded_blob}function b(e){var t=this,r=t._initReady().then((function(){var e=f[t._dbInfo.name];if(e&&e.dbReady)return e.dbReady}));return u(r,e,e),r}function _(e,t,r,n){void 0===n&&(n=1);try{var i=e.db.transaction(e.storeName,t);r(null,i)}catch(i){if(n>0&&(!e.db||"InvalidStateError"===i.name||"NotFoundError"===i.name))return A.resolve().then((function(){if(!e.db||"NotFoundError"===i.name&&!e.db.objectStoreNames.contains(e.storeName)&&e.version<=e.db.version)return e.db&&(e.version=e.db.version+1),B(e)})).then((function(){return function(e){d(e);for(var t=f[e.name],r=t.forages,n=0;n<r.length;n++){var i=r[n];i._dbInfo.db&&(i._dbInfo.db.close(),i._dbInfo.db=null)}return e.db=null,E(e).then((function(t){return e.db=t,v(e)?B(e):t})).then((function(n){e.db=t.db=n;for(var i=0;i<r.length;i++)r[i]._dbInfo.db=n})).catch((function(t){throw y(e,t),t}))}(e).then((function(){_(e,t,r,n-1)}))})).catch(r);r(i)}}var S={_driver:"asyncStorage",_initStorage:function(e){var t=this,r={db:null};if(e)for(var n in e)r[n]=e[n];var i=f[r.name];i||(i={forages:[],db:null,dbReady:null,deferredOperations:[]},f[r.name]=i),i.forages.push(t),t._initReady||(t._initReady=t.ready,t.ready=b);var o=[];function a(){return A.resolve()}for(var s=0;s<i.forages.length;s++){var u=i.forages[s];u!==t&&o.push(u._initReady().catch(a))}var c=i.forages.slice(0);return A.all(o).then((function(){return r.db=i.db,E(r)})).then((function(e){return r.db=e,v(r,t._defaultConfig.version)?B(r):e})).then((function(e){r.db=i.db=e,t._dbInfo=r;for(var n=0;n<c.length;n++){var o=c[n];o!==t&&(o._dbInfo.db=r.db,o._dbInfo.version=r.version)}}))},_support:function(){try{if(!i||!i.open)return!1;var e="undefined"!=typeof openDatabase&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),t="function"==typeof fetch&&-1!==fetch.toString().indexOf("[native code");return(!e||t)&&"undefined"!=typeof indexedDB&&"undefined"!=typeof IDBKeyRange}catch(e){return!1}}(),iterate:function(e,t){var r=this,n=new A((function(t,n){r.ready().then((function(){_(r._dbInfo,"readonly",(function(i,o){if(i)return n(i);try{var A=o.objectStore(r._dbInfo.storeName).openCursor(),a=1;A.onsuccess=function(){var r=A.result;if(r){var n=r.value;Q(n)&&(n=m(n));var i=e(n,r.key,a++);void 0!==i?t(i):r.continue()}else t()},A.onerror=function(){n(A.error)}}catch(e){n(e)}}))})).catch(n)}));return s(n,t),n},getItem:function(e,t){var r=this;e=c(e);var n=new A((function(t,n){r.ready().then((function(){_(r._dbInfo,"readonly",(function(i,o){if(i)return n(i);try{var A=o.objectStore(r._dbInfo.storeName).get(e);A.onsuccess=function(){var e=A.result;void 0===e&&(e=null),Q(e)&&(e=m(e)),t(e)},A.onerror=function(){n(A.error)}}catch(e){n(e)}}))})).catch(n)}));return s(n,t),n},setItem:function(e,t,r){var n=this;e=c(e);var i=new A((function(r,i){var o;n.ready().then((function(){return o=n._dbInfo,"[object Blob]"===h.call(t)?p(o.db).then((function(e){return e?t:(r=t,new A((function(e,t){var n=new FileReader;n.onerror=t,n.onloadend=function(t){var n=btoa(t.target.result||"");e({__local_forage_encoded_blob:!0,data:n,type:r.type})},n.readAsBinaryString(r)})));var r})):t})).then((function(t){_(n._dbInfo,"readwrite",(function(o,A){if(o)return i(o);try{var a=A.objectStore(n._dbInfo.storeName);null===t&&(t=void 0);var s=a.put(t,e);A.oncomplete=function(){void 0===t&&(t=null),r(t)},A.onabort=A.onerror=function(){var e=s.error?s.error:s.transaction.error;i(e)}}catch(e){i(e)}}))})).catch(i)}));return s(i,r),i},removeItem:function(e,t){var r=this;e=c(e);var n=new A((function(t,n){r.ready().then((function(){_(r._dbInfo,"readwrite",(function(i,o){if(i)return n(i);try{var A=o.objectStore(r._dbInfo.storeName).delete(e);o.oncomplete=function(){t()},o.onerror=function(){n(A.error)},o.onabort=function(){var e=A.error?A.error:A.transaction.error;n(e)}}catch(e){n(e)}}))})).catch(n)}));return s(n,t),n},clear:function(e){var t=this,r=new A((function(e,r){t.ready().then((function(){_(t._dbInfo,"readwrite",(function(n,i){if(n)return r(n);try{var o=i.objectStore(t._dbInfo.storeName).clear();i.oncomplete=function(){e()},i.onabort=i.onerror=function(){var e=o.error?o.error:o.transaction.error;r(e)}}catch(e){r(e)}}))})).catch(r)}));return s(r,e),r},length:function(e){var t=this,r=new A((function(e,r){t.ready().then((function(){_(t._dbInfo,"readonly",(function(n,i){if(n)return r(n);try{var o=i.objectStore(t._dbInfo.storeName).count();o.onsuccess=function(){e(o.result)},o.onerror=function(){r(o.error)}}catch(e){r(e)}}))})).catch(r)}));return s(r,e),r},key:function(e,t){var r=this,n=new A((function(t,n){e<0?t(null):r.ready().then((function(){_(r._dbInfo,"readonly",(function(i,o){if(i)return n(i);try{var A=o.objectStore(r._dbInfo.storeName),a=!1,s=A.openKeyCursor();s.onsuccess=function(){var r=s.result;r?0===e||a?t(r.key):(a=!0,r.advance(e)):t(null)},s.onerror=function(){n(s.error)}}catch(e){n(e)}}))})).catch(n)}));return s(n,t),n},keys:function(e){var t=this,r=new A((function(e,r){t.ready().then((function(){_(t._dbInfo,"readonly",(function(n,i){if(n)return r(n);try{var o=i.objectStore(t._dbInfo.storeName).openKeyCursor(),A=[];o.onsuccess=function(){var t=o.result;t?(A.push(t.key),t.continue()):e(A)},o.onerror=function(){r(o.error)}}catch(e){r(e)}}))})).catch(r)}));return s(r,e),r},dropInstance:function(e,t){t=l.apply(this,arguments);var r=this.config();(e="function"!=typeof e&&e||{}).name||(e.name=e.name||r.name,e.storeName=e.storeName||r.storeName);var n,o=this;if(e.name){var a=e.name===r.name&&o._dbInfo.db,u=a?A.resolve(o._dbInfo.db):E(e).then((function(t){var r=f[e.name],n=r.forages;r.db=t;for(var i=0;i<n.length;i++)n[i]._dbInfo.db=t;return t}));n=e.storeName?u.then((function(t){if(t.objectStoreNames.contains(e.storeName)){var r=t.version+1;d(e);var n=f[e.name],o=n.forages;t.close();for(var a=0;a<o.length;a++){var s=o[a];s._dbInfo.db=null,s._dbInfo.version=r}return new A((function(t,n){var o=i.open(e.name,r);o.onerror=function(e){o.result.close(),n(e)},o.onupgradeneeded=function(){o.result.deleteObjectStore(e.storeName)},o.onsuccess=function(){var e=o.result;e.close(),t(e)}})).then((function(e){n.db=e;for(var t=0;t<o.length;t++){var r=o[t];r._dbInfo.db=e,I(r._dbInfo)}})).catch((function(t){throw(y(e,t)||A.resolve()).catch((function(){})),t}))}})):u.then((function(t){d(e);var r=f[e.name],n=r.forages;t.close();for(var o=0;o<n.length;o++)n[o]._dbInfo.db=null;return new A((function(t,r){var n=i.deleteDatabase(e.name);n.onerror=n.onblocked=function(e){var t=n.result;t&&t.close(),r(e)},n.onsuccess=function(){var e=n.result;e&&e.close(),t(e)}})).then((function(e){r.db=e;for(var t=0;t<n.length;t++)I(n[t]._dbInfo)})).catch((function(t){throw(y(e,t)||A.resolve()).catch((function(){})),t}))}))}else n=A.reject("Invalid arguments");return s(n,t),n}},w="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",D=/^~~local_forage_type~([^~]+)~/,R="__lfsc__:".length,M=R+"arbf".length,x=Object.prototype.toString;function P(e){var t,r,n,i,o,A=.75*e.length,a=e.length,s=0;"="===e[e.length-1]&&(A--,"="===e[e.length-2]&&A--);var u=new ArrayBuffer(A),c=new Uint8Array(u);for(t=0;t<a;t+=4)r=w.indexOf(e[t]),n=w.indexOf(e[t+1]),i=w.indexOf(e[t+2]),o=w.indexOf(e[t+3]),c[s++]=r<<2|n>>4,c[s++]=(15&n)<<4|i>>2,c[s++]=(3&i)<<6|63&o;return u}function T(e){var t,r=new Uint8Array(e),n="";for(t=0;t<r.length;t+=3)n+=w[r[t]>>2],n+=w[(3&r[t])<<4|r[t+1]>>4],n+=w[(15&r[t+1])<<2|r[t+2]>>6],n+=w[63&r[t+2]];return r.length%3==2?n=n.substring(0,n.length-1)+"=":r.length%3==1&&(n=n.substring(0,n.length-2)+"=="),n}var F={serialize:function(e,t){var r="";if(e&&(r=x.call(e)),e&&("[object ArrayBuffer]"===r||e.buffer&&"[object ArrayBuffer]"===x.call(e.buffer))){var n,i="__lfsc__:";e instanceof ArrayBuffer?(n=e,i+="arbf"):(n=e.buffer,"[object Int8Array]"===r?i+="si08":"[object Uint8Array]"===r?i+="ui08":"[object Uint8ClampedArray]"===r?i+="uic8":"[object Int16Array]"===r?i+="si16":"[object Uint16Array]"===r?i+="ur16":"[object Int32Array]"===r?i+="si32":"[object Uint32Array]"===r?i+="ui32":"[object Float32Array]"===r?i+="fl32":"[object Float64Array]"===r?i+="fl64":t(new Error("Failed to get type for BinaryArray"))),t(i+T(n))}else if("[object Blob]"===r){var o=new FileReader;o.onload=function(){var r="~~local_forage_type~"+e.type+"~"+T(this.result);t("__lfsc__:blob"+r)},o.readAsArrayBuffer(e)}else try{t(JSON.stringify(e))}catch(r){console.error("Couldn't convert value into a JSON string: ",e),t(null,r)}},deserialize:function(e){if("__lfsc__:"!==e.substring(0,R))return JSON.parse(e);var t,r=e.substring(M),n=e.substring(R,M);if("blob"===n&&D.test(r)){var i=r.match(D);t=i[1],r=r.substring(i[0].length)}var A=P(r);switch(n){case"arbf":return A;case"blob":return o([A],{type:t});case"si08":return new Int8Array(A);case"ui08":return new Uint8Array(A);case"uic8":return new Uint8ClampedArray(A);case"si16":return new Int16Array(A);case"ur16":return new Uint16Array(A);case"si32":return new Int32Array(A);case"ui32":return new Uint32Array(A);case"fl32":return new Float32Array(A);case"fl64":return new Float64Array(A);default:throw new Error("Unkown type: "+n)}},stringToBuffer:P,bufferToString:T};function O(e,t,r,n){e.executeSql("CREATE TABLE IF NOT EXISTS "+t.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],r,n)}function L(e,t,r,n,i,o){e.executeSql(r,n,i,(function(e,A){A.code===A.SYNTAX_ERR?e.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[t.storeName],(function(e,a){a.rows.length?o(e,A):O(e,t,(function(){e.executeSql(r,n,i,o)}),o)}),o):o(e,A)}),o)}function N(e,t,r,n){var i=this;e=c(e);var o=new A((function(o,A){i.ready().then((function(){void 0===t&&(t=null);var a=t,s=i._dbInfo;s.serializer.serialize(t,(function(t,u){u?A(u):s.db.transaction((function(r){L(r,s,"INSERT OR REPLACE INTO "+s.storeName+" (key, value) VALUES (?, ?)",[e,t],(function(){o(a)}),(function(e,t){A(t)}))}),(function(t){if(t.code===t.QUOTA_ERR){if(n>0)return void o(N.apply(i,[e,a,r,n-1]));A(t)}}))}))})).catch(A)}));return s(o,r),o}function k(e){return new A((function(t,r){e.transaction((function(n){n.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],(function(r,n){for(var i=[],o=0;o<n.rows.length;o++)i.push(n.rows.item(o).name);t({db:e,storeNames:i})}),(function(e,t){r(t)}))}),(function(e){r(e)}))}))}var G={_driver:"webSQLStorage",_initStorage:function(e){var t=this,r={db:null};if(e)for(var n in e)r[n]="string"!=typeof e[n]?e[n].toString():e[n];var i=new A((function(e,n){try{r.db=openDatabase(r.name,String(r.version),r.description,r.size)}catch(e){return n(e)}r.db.transaction((function(i){O(i,r,(function(){t._dbInfo=r,e()}),(function(e,t){n(t)}))}),n)}));return r.serializer=F,i},_support:"function"==typeof openDatabase,iterate:function(e,t){var r=this,n=new A((function(t,n){r.ready().then((function(){var i=r._dbInfo;i.db.transaction((function(r){L(r,i,"SELECT * FROM "+i.storeName,[],(function(r,n){for(var o=n.rows,A=o.length,a=0;a<A;a++){var s=o.item(a),u=s.value;if(u&&(u=i.serializer.deserialize(u)),void 0!==(u=e(u,s.key,a+1)))return void t(u)}t()}),(function(e,t){n(t)}))}))})).catch(n)}));return s(n,t),n},getItem:function(e,t){var r=this;e=c(e);var n=new A((function(t,n){r.ready().then((function(){var i=r._dbInfo;i.db.transaction((function(r){L(r,i,"SELECT * FROM "+i.storeName+" WHERE key = ? LIMIT 1",[e],(function(e,r){var n=r.rows.length?r.rows.item(0).value:null;n&&(n=i.serializer.deserialize(n)),t(n)}),(function(e,t){n(t)}))}))})).catch(n)}));return s(n,t),n},setItem:function(e,t,r){return N.apply(this,[e,t,r,1])},removeItem:function(e,t){var r=this;e=c(e);var n=new A((function(t,n){r.ready().then((function(){var i=r._dbInfo;i.db.transaction((function(r){L(r,i,"DELETE FROM "+i.storeName+" WHERE key = ?",[e],(function(){t()}),(function(e,t){n(t)}))}))})).catch(n)}));return s(n,t),n},clear:function(e){var t=this,r=new A((function(e,r){t.ready().then((function(){var n=t._dbInfo;n.db.transaction((function(t){L(t,n,"DELETE FROM "+n.storeName,[],(function(){e()}),(function(e,t){r(t)}))}))})).catch(r)}));return s(r,e),r},length:function(e){var t=this,r=new A((function(e,r){t.ready().then((function(){var n=t._dbInfo;n.db.transaction((function(t){L(t,n,"SELECT COUNT(key) as c FROM "+n.storeName,[],(function(t,r){var n=r.rows.item(0).c;e(n)}),(function(e,t){r(t)}))}))})).catch(r)}));return s(r,e),r},key:function(e,t){var r=this,n=new A((function(t,n){r.ready().then((function(){var i=r._dbInfo;i.db.transaction((function(r){L(r,i,"SELECT key FROM "+i.storeName+" WHERE id = ? LIMIT 1",[e+1],(function(e,r){var n=r.rows.length?r.rows.item(0).key:null;t(n)}),(function(e,t){n(t)}))}))})).catch(n)}));return s(n,t),n},keys:function(e){var t=this,r=new A((function(e,r){t.ready().then((function(){var n=t._dbInfo;n.db.transaction((function(t){L(t,n,"SELECT key FROM "+n.storeName,[],(function(t,r){for(var n=[],i=0;i<r.rows.length;i++)n.push(r.rows.item(i).key);e(n)}),(function(e,t){r(t)}))}))})).catch(r)}));return s(r,e),r},dropInstance:function(e,t){t=l.apply(this,arguments);var r=this.config();(e="function"!=typeof e&&e||{}).name||(e.name=e.name||r.name,e.storeName=e.storeName||r.storeName);var n,i=this;return s(n=e.name?new A((function(t){var n;n=e.name===r.name?i._dbInfo.db:openDatabase(e.name,"","",0),e.storeName?t({db:n,storeNames:[e.storeName]}):t(k(n))})).then((function(e){return new A((function(t,r){e.db.transaction((function(n){function i(e){return new A((function(t,r){n.executeSql("DROP TABLE IF EXISTS "+e,[],(function(){t()}),(function(e,t){r(t)}))}))}for(var o=[],a=0,s=e.storeNames.length;a<s;a++)o.push(i(e.storeNames[a]));A.all(o).then((function(){t()})).catch((function(e){r(e)}))}),(function(e){r(e)}))}))})):A.reject("Invalid arguments"),t),n}};function U(e,t){var r=e.name+"/";return e.storeName!==t.storeName&&(r+=e.storeName+"/"),r}function j(){return!function(){try{return localStorage.setItem("_localforage_support_test",!0),localStorage.removeItem("_localforage_support_test"),!1}catch(e){return!0}}()||localStorage.length>0}var V={_driver:"localStorageWrapper",_initStorage:function(e){var t={};if(e)for(var r in e)t[r]=e[r];return t.keyPrefix=U(e,this._defaultConfig),j()?(this._dbInfo=t,t.serializer=F,A.resolve()):A.reject()},_support:function(){try{return"undefined"!=typeof localStorage&&"setItem"in localStorage&&!!localStorage.setItem}catch(e){return!1}}(),iterate:function(e,t){var r=this,n=r.ready().then((function(){for(var t=r._dbInfo,n=t.keyPrefix,i=n.length,o=localStorage.length,A=1,a=0;a<o;a++){var s=localStorage.key(a);if(0===s.indexOf(n)){var u=localStorage.getItem(s);if(u&&(u=t.serializer.deserialize(u)),void 0!==(u=e(u,s.substring(i),A++)))return u}}}));return s(n,t),n},getItem:function(e,t){var r=this;e=c(e);var n=r.ready().then((function(){var t=r._dbInfo,n=localStorage.getItem(t.keyPrefix+e);return n&&(n=t.serializer.deserialize(n)),n}));return s(n,t),n},setItem:function(e,t,r){var n=this;e=c(e);var i=n.ready().then((function(){void 0===t&&(t=null);var r=t;return new A((function(i,o){var A=n._dbInfo;A.serializer.serialize(t,(function(t,n){if(n)o(n);else try{localStorage.setItem(A.keyPrefix+e,t),i(r)}catch(e){"QuotaExceededError"!==e.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==e.name||o(e),o(e)}}))}))}));return s(i,r),i},removeItem:function(e,t){var r=this;e=c(e);var n=r.ready().then((function(){var t=r._dbInfo;localStorage.removeItem(t.keyPrefix+e)}));return s(n,t),n},clear:function(e){var t=this,r=t.ready().then((function(){for(var e=t._dbInfo.keyPrefix,r=localStorage.length-1;r>=0;r--){var n=localStorage.key(r);0===n.indexOf(e)&&localStorage.removeItem(n)}}));return s(r,e),r},length:function(e){var t=this.keys().then((function(e){return e.length}));return s(t,e),t},key:function(e,t){var r=this,n=r.ready().then((function(){var t,n=r._dbInfo;try{t=localStorage.key(e)}catch(e){t=null}return t&&(t=t.substring(n.keyPrefix.length)),t}));return s(n,t),n},keys:function(e){var t=this,r=t.ready().then((function(){for(var e=t._dbInfo,r=localStorage.length,n=[],i=0;i<r;i++){var o=localStorage.key(i);0===o.indexOf(e.keyPrefix)&&n.push(o.substring(e.keyPrefix.length))}return n}));return s(r,e),r},dropInstance:function(e,t){if(t=l.apply(this,arguments),!(e="function"!=typeof e&&e||{}).name){var r=this.config();e.name=e.name||r.name,e.storeName=e.storeName||r.storeName}var n,i=this;return s(n=e.name?new A((function(t){e.storeName?t(U(e,i._defaultConfig)):t(e.name+"/")})).then((function(e){for(var t=localStorage.length-1;t>=0;t--){var r=localStorage.key(t);0===r.indexOf(e)&&localStorage.removeItem(r)}})):A.reject("Invalid arguments"),t),n}},H=function(e,t){for(var r,n,i=e.length,o=0;o<i;){if((r=e[o])===(n=t)||"number"==typeof r&&"number"==typeof n&&isNaN(r)&&isNaN(n))return!0;o++}return!1},Y=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},K={},q={},J={INDEXEDDB:S,WEBSQL:G,LOCALSTORAGE:V},W=[J.INDEXEDDB._driver,J.WEBSQL._driver,J.LOCALSTORAGE._driver],z=["dropInstance"],X=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(z),Z={description:"",driver:W.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function $(e,t){e[t]=function(){var r=arguments;return e.ready().then((function(){return e[t].apply(e,r)}))}}function ee(){for(var e=1;e<arguments.length;e++){var t=arguments[e];if(t)for(var r in t)t.hasOwnProperty(r)&&(Y(t[r])?arguments[0][r]=t[r].slice():arguments[0][r]=t[r])}return arguments[0]}var te=new(function(){function e(t){for(var r in function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),J)if(J.hasOwnProperty(r)){var n=J[r],i=n._driver;this[r]=i,K[i]||this.defineDriver(n)}this._defaultConfig=ee({},Z),this._config=ee({},this._defaultConfig,t),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch((function(){}))}return e.prototype.config=function(e){if("object"===(void 0===e?"undefined":n(e))){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var t in e){if("storeName"===t&&(e[t]=e[t].replace(/\W/g,"_")),"version"===t&&"number"!=typeof e[t])return new Error("Database version must be a number.");this._config[t]=e[t]}return!("driver"in e)||!e.driver||this.setDriver(this._config.driver)}return"string"==typeof e?this._config[e]:this._config},e.prototype.defineDriver=function(e,t,r){var n=new A((function(t,r){try{var n=e._driver,i=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!e._driver)return void r(i);for(var o=X.concat("_initStorage"),a=0,u=o.length;a<u;a++){var c=o[a];if((!H(z,c)||e[c])&&"function"!=typeof e[c])return void r(i)}!function(){for(var t=function(e){return function(){var t=new Error("Method "+e+" is not implemented by the current driver"),r=A.reject(t);return s(r,arguments[arguments.length-1]),r}},r=0,n=z.length;r<n;r++){var i=z[r];e[i]||(e[i]=t(i))}}();var l=function(r){K[n]&&console.info("Redefining LocalForage driver: "+n),K[n]=e,q[n]=r,t()};"_support"in e?e._support&&"function"==typeof e._support?e._support().then(l,r):l(!!e._support):l(!0)}catch(e){r(e)}}));return u(n,t,r),n},e.prototype.driver=function(){return this._driver||null},e.prototype.getDriver=function(e,t,r){var n=K[e]?A.resolve(K[e]):A.reject(new Error("Driver not found."));return u(n,t,r),n},e.prototype.getSerializer=function(e){var t=A.resolve(F);return u(t,e),t},e.prototype.ready=function(e){var t=this,r=t._driverSet.then((function(){return null===t._ready&&(t._ready=t._initDriver()),t._ready}));return u(r,e,e),r},e.prototype.setDriver=function(e,t,r){var n=this;Y(e)||(e=[e]);var i=this._getSupportedDrivers(e);function o(){n._config.driver=n.driver()}function a(e){return n._extend(e),o(),n._ready=n._initStorage(n._config),n._ready}var s=null!==this._driverSet?this._driverSet.catch((function(){return A.resolve()})):A.resolve();return this._driverSet=s.then((function(){var e=i[0];return n._dbInfo=null,n._ready=null,n.getDriver(e).then((function(e){n._driver=e._driver,o(),n._wrapLibraryMethodsWithReady(),n._initDriver=function(e){return function(){var t=0;return function r(){for(;t<e.length;){var i=e[t];return t++,n._dbInfo=null,n._ready=null,n.getDriver(i).then(a).catch(r)}o();var s=new Error("No available storage method found.");return n._driverSet=A.reject(s),n._driverSet}()}}(i)}))})).catch((function(){o();var e=new Error("No available storage method found.");return n._driverSet=A.reject(e),n._driverSet})),u(this._driverSet,t,r),this._driverSet},e.prototype.supports=function(e){return!!q[e]},e.prototype._extend=function(e){ee(this,e)},e.prototype._getSupportedDrivers=function(e){for(var t=[],r=0,n=e.length;r<n;r++){var i=e[r];this.supports(i)&&t.push(i)}return t},e.prototype._wrapLibraryMethodsWithReady=function(){for(var e=0,t=X.length;e<t;e++)$(this,X[e])},e.prototype.createInstance=function(t){return new e(t)},e}());t.exports=te},{3:3}]},{},[4])(4)},"object"===a(t)&&void 0!==e?e.exports=A():(i=[],void 0===(o="function"==typeof(n=A)?n.apply(t,i):n)||(e.exports=o))}).call(this,r(144))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=function(e){};t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(4),i=r(137),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.start=function(){t.stop(),t.autoSaveTimer=window.setInterval((function(){t.state.dirty&&(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV||t.mergeState({autoSaveSignalCount:t.state.autoSaveSignalCount+1}))}),18e4)},t.stop=function(){t.autoSaveTimer&&(clearInterval(t.autoSaveTimer),t.autoSaveTimer=void 0)},t}return(0,n.__extends)(t,e),t.prototype.initState=function(){this.updateState({autoSaveSignalCount:0,dirty:!1})},t.prototype.markDirty=function(e){this.mergeState({dirty:e})},t}(i.default);t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.logDocumentLoad=function(e,t){(0,n.sendKTrackerEvent)("toolLoad",{type:e,errorMsg:t})};var n=r(933)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ModelUpdateType",{enumerable:!0,get:function(){return i.ModelUpdateType}}),t.default=t.MultiBackupItem=void 0;var n=r(4),i=r(291),o=r(1863),A=r(658),a=r(2),s=r(1002);function u(e,t){var r=new Map;return e.forEach((function(e,n){r.set(n,t(e,n))})),r}var c=function(e){function t(t){var r=e.call(this,t)||this;return r.multiData=u(t,(function(e){return{data:new e.BackupItemImpl(e.model),BackupItemImpl:e.BackupItemImpl}})),r}return(0,n.__extends)(t,e),t.prototype.toModel=function(){return u(this.multiData,(function(e){return{model:e.data.toModel(),BackupItemImpl:e.BackupItemImpl}}))},t}(i.BackupItem);function l(e,t,r){var i=r.value;return(0,n.__assign)((0,n.__assign)({},r),{value:function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];if(this.started)i.apply(this,e);else if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV)throw new Error("method "+t+" can only be called after app started.")}})}t.MultiBackupItem=c;var g=function(e){function t(r){var n=e.call(this,{getModel:function(){return u(n.documentSources,(function(e){var t=e.getModel();if(!t)throw new Error("MultiDocumentManager: getModel() return undefined for: "+e.key);return{model:t,BackupItemImpl:e.BackupItemImpl}}))},onUpdateModel:function(e,t){n.mapEachPrioritySync((function(r){r.forEach((function(r){var n=e.get(r.key);if(!n)throw new Error('No backup model for "'+r.key+"\", perhaps it's been added after this backup triggered.");r.onUpdateModel(n.model,t)}))}))},onUpdateState:r.onUpdateState,maxBackupStep:r.maxBackupStep,useHybridStorage:r.useHybridStorage})||this;return n.started=!1,n.cancelLoadToken=o.CancelToken.source(),n.id="kafDocument"+t.instanceCount++,n.monitoredRequestedKeySet=new Set,n.monitorSourceFetch=function(e,t,r){var i=e+r;return n.monitoredRequestedKeySet.has(i)?t:(n.monitoredRequestedKeySet.add(i),n.reportSource(e,t,r))},n.onModelChange=r.onModelChange||a.noop,n.onPause=r.onPause||a.noop,n.onToggleAutoBackup=r.onToggleAutoBackup||a.noop,n.onResume=r.onResume||a.noop,n}return(0,n.__extends)(t,e),Object.defineProperty(t.prototype,"documentSources",{get:function(){return this.internalDocumentSources||(this.internalDocumentSources=new Map),this.internalDocumentSources},enumerable:!0,configurable:!0}),t.prototype.getBackupItemImpl=function(){return c},t.prototype.setId=function(e){this.id=e},t.prototype.getId=function(){return this.id},t.prototype.onModelChanges=function(e){this.started&&(this.requestCommit(),this.onModelChange())},t.prototype.toggleAutoBackup=function(t){e.prototype.toggleAutoBackup.call(this,t),this.onToggleAutoBackup(t)},t.prototype.commit=function(){e.prototype.commit.call(this)},t.prototype.onLoadSessionStart=function(){var e=(0,s.createDocumentLoadReporter)(),t=e.reportSource,r=e.statisticsPromise,n=e.getStatistics;(0,e.setTotal)(this.documentSources.size),this.loadStatisticsPromise=r,this.getStatisticsSync=n,this.reportSource=t,this.monitoredRequestedKeySet.clear()},t.prototype.createFetchDocumentPromises=function(e,r){var n=this,i=this.getDocumentsSortedByPriority(t.getDocFetchPriority),o=new Map;return i.reduce((function(t,i){return t.then((function(){var t=[];return i.documents.forEach((function(i){if(void 0!==i.fetch){var A=n.monitorSourceFetch(i.key,i.fetch({isInitialLoad:e,reloadInfo:r}),"fetch");t.push(A),o.set(i.key,A)}})),Promise.all(t)}))}),Promise.resolve()),o},t.prototype.openDocuments=function(){var e=this;this.onLoadSessionStart();var t=this.createFetchDocumentPromises(!0);return this.mapEachPriority((function(r){return Promise.all(r.map((function(r){return(t.get(r.key)||Promise.resolve()).then((function(t){return e.monitorSourceFetch(r.key,r.open(t),"open")}))})))}))},t.prototype.loadUntilCancel=function(e,t){var r=this;return this.cancelLoadToken=o.CancelToken.source(),Promise.race([e,this.cancelLoadToken.token.promise]).then((function(e){if((0,A.isCancel)(e))return e;t&&t(),r.requestCommit(),r.commit()}))},t.prototype.start=function(){var e=this;if(this.started)throw new Error("Cannot start twice");return this.loadUntilCancel(this.openDocuments(),(function(){e.started=!0,e.documentSources.forEach((function(e){e.updateListeners&&e.updateListeners(!0,e.onDocumentChange),e.afterInit&&e.afterInit(e.onDocumentChange)})),e.toggleAutoBackup(!0)}))},t.prototype.reloadDocuments=function(e){var t=this;this.onLoadSessionStart();var r={data:e},n=this.createFetchDocumentPromises(!1,r);return this.mapEachPriority((function(e){return Promise.all(e.map((function(e){var i=e.reload;return i?(n.get(e.key)||Promise.resolve()).then((function(n){return t.monitorSourceFetch(e.key,i(r,n),"open")})):Promise.resolve()})))}))},t.prototype.reload=function(e){return this.clearBackupHistory(),this.pause(),this.loadUntilCancel(this.reloadDocuments(e),this.resume.bind(this))},t.prototype.pause=function(){this.toggleAutoBackup(!1),this.onPause(),this.started=!1},t.prototype.resume=function(){this.started=!0,this.onResume(),this.toggleAutoBackup(!0)},t.prototype.beforeDispose=function(){this.documentSources.forEach((function(e){e.updateListeners&&e.updateListeners(!1,a.noop),e.beforeDispose&&e.beforeDispose()})),this.toggleAutoBackup(!1),this.cancelLoadToken.cancel("DocumentManager has been disposed"),this.started=!1},t.prototype.getLoadStatistics=function(e){return void 0===e&&(e=!0),e?(this.loadStatisticsPromise||console.error("Please wail until the document load completed"),this.loadStatisticsPromise):this.getStatisticsSync()},t.prototype.beforeSaveDocument=function(e){if(!this.started)return!1;var t=!0;return this.documentSources.forEach((function(r){r.beforeSaveDocument&&(r.beforeSaveDocument(e)||(t=!1))})),t},t.prototype.saveDocument=function(e,t){var r=this.generateActionId(),i={actionId:r};return t&&(i=(0,n.__assign)((0,n.__assign)({},t),{actionId:r})),this.mapEachPriority((function(t){return Promise.all(t.map((function(t){return t.saveDocument(e,i)})))}))},t.prototype.clearDocument=function(e,t){this.mapEachPrioritySync((function(r){r.forEach((function(r){t&&!t(r)||r.clearDocument({data:e})}))}))},t.prototype.addDocumentSource=function(e){var t=this;if(this.started)throw new Error("MultiDocumentManager: currently don't support to dynamicly add/remove document source after app started.");if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&(e.updateListeners&&console.warn("[Deprecated]:updateListeners,请在 afterInit 方法内监听数据变化,在 beforeDispose 内移除监听"),!e.updateListeners&&!e.afterInit))throw Error("updateListeners 和 afterInit 请至少实现一个");var r=e.key;if(this.documentSources.get(r))throw new Error("MultiDocumentManager: duplicate document source key: "+e.key);this.documentSources.set(r,(0,n.__assign)((0,n.__assign)({},e),{onDocumentChange:function(){return t.onModelChanges(r)}}))},t.prototype.getDocumentsSortedByPriority=function(e){var t,r,n,i={};return t=this.documentSources,r=function(t,r){var n=e(t);i[n]||(i[n]=[]),i[n].push(t)},n=[],t.forEach((function(e,t){n.push(r(e,t))})),Object.keys(i).map((function(e){var t=parseFloat(e);return{priority:t,documents:i[t]}})).sort((function(e,t){return t.priority-e.priority}))},t.prototype.mapEachPriority=function(e){return this.getDocumentsSortedByPriority(t.getDocPriority).reduce((function(t,r){return t=t.then((function(){return e(r.documents,r.priority)}))}),Promise.resolve())},t.prototype.mapEachPrioritySync=function(e){this.getDocumentsSortedByPriority(t.getDocPriority).forEach((function(t){e(t.documents,t.priority)}))},t.prototype.generateActionId=function(){return Date.now()+"-"+this.id},t.instanceCount=0,t.getDocFetchPriority=function(e){return e.fetchPriority||0},t.getDocPriority=function(e){return e.priority||0},(0,n.__decorate)([l],t.prototype,"toggleAutoBackup",null),(0,n.__decorate)([l],t.prototype,"commit",null),t}(i.default);t.default=g},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1864),i=function(){function e(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){return t=e}));var r=this;e((function(e){r.reason||(r.reason=new n.Cancel(e),t(r.reason))}))}return e.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},e.source=function(){var t=function(){};return{token:new e((function(e){return t=e})),cancel:t}},e}();t.CancelToken=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){this.message=e}return e.prototype.__CANCEL__=function(){},e.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},e}();t.Cancel=n},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.scoped=function(e){return function(t,r,o){return(0,i.__assign)((0,i.__assign)({},o),{value:function(){for(var t,r,i=this,A=[],a=0;a<arguments.length;a++)A[a]=arguments[a];var s=A.find((function(e){var t;return!0===(null===(t=e)||void 0===t?void 0:t.isScope)}));if(!s||!s.valid)return Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING?void(s?s.valid||console.warn("Scope is not valid!"):console.warn("No scope found!")):null===(t=o.value)||void 0===t?void 0:t.apply(this,A);var u=function(){s.push((function(){e.apply(i,A)}))};try{var c=null===(r=o.value)||void 0===r?void 0:r.apply(this,A);return c&&("object"===n(c)||"function"==typeof c)&&(c instanceof Promise||"function"==typeof c.then)?c.then(u):u(),c}catch(e){throw e}}})}},t.ScopeGroup=void 0;var i=r(4);var o=function(){function e(e,t,r,n){this.parent=e,this.onScopeDispose=t,this.pushChange=r,this.isValid=n,this.isScope=!0,this.disposed=!1}return Object.defineProperty(e.prototype,"valid",{get:function(){return!this.disposed&&this.isValid(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"alive",{get:function(){return!this.disposed},enumerable:!0,configurable:!0}),e.prototype.push=function(e){this.valid?this.pushChange(this,e):console.warn("Scope is not valid!")},e.prototype.dispose=function(){this.disposed||(this.disposed=!0,this.onScopeDispose(this))},e}(),A=function(){function e(){var e=this;this.changeStack=[],this.lockedScope=new Set,this.onScopeDispose=function(t){e.sequenceRestore(t)},this.pushChange=function(t,r){e.changeStack.push({scope:t,restore:r})},this.isScopeValid=function(t){for(var r=-1,n=e.changeStack.length-1;n>0;n--)if(e.changeStack[n].scope===t){r=n;break}return!e.lockedScope.has(t)&&(-1===r||r===e.changeStack.length-1)}}return e.prototype.sequenceRestore=function(e){for(var t,r,n=[];this.changeStack.length;){var o=this.changeStack[this.changeStack.length-1];if(o.scope.alive)break;this.changeStack.pop(),n.push(o)}try{for(var A=(0,i.__values)(n),a=A.next();!a.done;a=A.next()){a.value.restore()}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=A.return)&&r.call(A)}finally{if(t)throw t.error}}},e.prototype.lock=function(e){e.parent===this&&this.lockedScope.add(e)},e.prototype.unLock=function(e){this.lockedScope.delete(e)},e.prototype.createScope=function(){return new o(this,this.onScopeDispose,this.pushChange,this.isScopeValid)},e.prototype.dispose=function(){for(;this.changeStack.length;){this.changeStack.pop().restore()}[].forEach((function(e){return e.alive&&e.dispose()}))},e}();t.ScopeGroup=A},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scopedState=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return Object.defineProperty(t.prototype,A,{value:e,writable:!1,enumerable:!1,configurable:!1}),(0,o.scopedObject)({diff:s,getter:c,restore:u})(t)}};var n=r(4),i=r(2),o=r(1035),A=Symbol("scoped_property");var a,s=(a=new Set,function(e,t){var r={};return Object.keys(e).forEach((function(e){a.add(e)})),Object.keys(t).forEach((function(e){a.add(e)})),a.forEach((function(n){e[n]!==t[n]&&(r[n]={from:e[n],to:t[n]})})),a.clear(),r});function u(e){var t=(0,n.__assign)({},this.state);Object.keys(e).forEach((function(r){var n=e[r];Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING&&n.to!==t[r]&&console.error("Scoped state "+r+" changed outside current scope!"),t[r]=n.from})),this.state=t}function c(){var e=this[A];return function(e,t){return t&&t.length?(0,i.pick)(e,t):(0,n.__assign)({},e)}(this.state,e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"drawPolygonWithHole",{enumerable:!0,get:function(){return n.drawPolygonWithHole}}),Object.defineProperty(t,"drawBox",{enumerable:!0,get:function(){return n.drawBox}}),Object.defineProperty(t,"drawPolyline",{enumerable:!0,get:function(){return n.drawPolyline}}),Object.defineProperty(t,"drawLine",{enumerable:!0,get:function(){return n.drawLine}}),Object.defineProperty(t,"drawDashLine",{enumerable:!0,get:function(){return n.drawDashLine}}),Object.defineProperty(t,"drawPolygon",{enumerable:!0,get:function(){return n.drawPolygon}}),Object.defineProperty(t,"drawPolyDashLine",{enumerable:!0,get:function(){return n.drawPolyDashLine}}),Object.defineProperty(t,"drawSector",{enumerable:!0,get:function(){return n.drawSector}}),Object.defineProperty(t,"drawRect",{enumerable:!0,get:function(){return n.drawRect}});var n=r(990)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"generatePopMesh",{enumerable:!0,get:function(){return n.generatePopMesh}}),Object.defineProperty(t,"updateMaterials",{enumerable:!0,get:function(){return n.updateMaterials}}),Object.defineProperty(t,"updateTransform",{enumerable:!0,get:function(){return n.updateTransform}}),Object.defineProperty(t,"loadComponent",{enumerable:!0,get:function(){return n.loadComponent}});var n=r(1036)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ContainerType2D",{enumerable:!0,get:function(){return n.ContainerType2D}});var n=r(229)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"SelectControls2D",{enumerable:!0,get:function(){return n.SelectControls2D}}),Object.defineProperty(t,"Mode",{enumerable:!0,get:function(){return n.Mode}});var n=r(1871)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"SelectControls2D",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"Mode",{enumerable:!0,get:function(){return n.Mode}});var n=r(1011)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"pureWithCustomizedCompare",{enumerable:!0,get:function(){return n.pureWithCustomizedCompare}}),Object.defineProperty(t,"pureWithPickKeys",{enumerable:!0,get:function(){return n.pureWithPickKeys}}),Object.defineProperty(t,"pureWithOmitKeys",{enumerable:!0,get:function(){return n.pureWithOmitKeys}});var n=r(1873)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pureWithCustomizedCompare=function e(t){void 0===t&&(t={});return function(r){return r.prototype.shouldComponentUpdate&&(0,i.devError)("Warning: Shouldn't use "+e.name+" for "+r.name+': It has customized "shouldComponentUpdate"(or is a pureComponent)'),r.prototype.shouldComponentUpdate=function(e,r){return!(i=this.props,A=e,a=t,s=Object.keys(i),u=Object.keys(A),s.length===u.length&&s.every((function(e){return(a[e]||o)(i[e],A[e])}))&&(0,n.default)(this.state,r));var i,A,a,s,u},r}},t.pureWithPickKeys=function e(t){return function(r){return r.prototype.shouldComponentUpdate&&(0,i.devError)("Warning: Shouldn't use "+e.name+" for "+r.name+': It has customized "shouldComponentUpdate"(or is a pureComponent)'),r.prototype.shouldComponentUpdate=function(e,r){return!function(e,t,r){return r.every((function(r){return o(e[r],t[r])}))}(this.props,e,t)||!(0,n.default)(this.state,r)},r}},t.pureWithOmitKeys=function e(t){var r=t.reduce((function(e,t){return e[t]=!0,e}),{});return function(t){return t.prototype.shouldComponentUpdate&&(0,i.devError)("Warning: Shouldn't use "+e.name+" for "+t.name+': It has customized "shouldComponentUpdate"(or is a pureComponent)'),t.prototype.shouldComponentUpdate=function(e,t){return!function(e,t,r){var n=Object.keys(e).filter((function(e){return!r[e]})),i=Object.keys(t).filter((function(e){return!r[e]}));return n.length===i.length&&n.every((function(r){return o(e[r],t[r])}))}(this.props,e,r)||!(0,n.default)(this.state,t)},t}};var n=r(264),i=r(186);function o(e,t){return e===t}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.__expectedPublicAPIs__=void 0;t.__expectedPublicAPIs__=""},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"RenderSystem2D",{enumerable:!0,get:function(){return n.RenderSystem2D}}),Object.defineProperty(t,"RenderSystem3D",{enumerable:!0,get:function(){return n.RenderSystem3D}}),Object.defineProperty(t,"InferenceSystem2D",{enumerable:!0,get:function(){return i.InferenceSystem2D}}),Object.defineProperty(t,"InferenceSystem3D",{enumerable:!0,get:function(){return i.InferenceSystem3D}}),Object.defineProperty(t,"EntityListSystem",{enumerable:!0,get:function(){return o.EntityListSystem}}),Object.defineProperty(t,"VisibleEntityListSystem",{enumerable:!0,get:function(){return A.default}});var n=r(229),i=r(415),o=r(183),A=r(204)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"SelectionFeature",{enumerable:!0,get:function(){return n.SelectionFeature}}),Object.defineProperty(t,"HintFeature",{enumerable:!0,get:function(){return i.HintFeature}}),Object.defineProperty(t,"WithObjectEventListenersFeature",{enumerable:!0,get:function(){return o.Feature}});var n=r(412),i=r(669),o=r(971)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"DocumentEvents",{enumerable:!0,get:function(){return n.DocumentEvents}}),Object.defineProperty(t,"combine",{enumerable:!0,get:function(){return n.combine}}),Object.defineProperty(t,"Language",{enumerable:!0,get:function(){return n.Language}}),Object.defineProperty(t,"EVENT_STOPPED",{enumerable:!0,get:function(){return n.EVENT_STOPPED}}),Object.defineProperty(t,"InteractionEventType",{enumerable:!0,get:function(){return n.InteractionEventType}});var n=r(1037)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(4),i=r(512),o=r(1882),A=r(691),a=r(692),s=function(){function e(){}return e.prototype.setPrecision=function(e){this.precisionMap=e},e.prototype.setGlobalUnit=function(e){var t=this.getGlobalUnitInfoMap(e);t&&(this.currentGlobalUnitInfoMap=t)},e.prototype.setGlobalLengthUnit=function(e){var t=this.getGlobalLengthUnitInfo(e);t&&(this.currentGlobalUnitInfoMap=(0,n.__assign)((0,n.__assign)({},this.currentGlobalUnitInfoMap),{length:t}))},e.prototype.setGlobalAreaUnit=function(e){var t=this.getGlobalAreaUnitInfo(e);t&&(this.currentGlobalUnitInfoMap=(0,n.__assign)((0,n.__assign)({},this.currentGlobalUnitInfoMap),{area:t}))},e.prototype.getDisplayText=function(e,t,r,n,o){var A;if(void 0===r&&(r=!1),o){if(o.customUnitInfo){if((0,a.getQuantityTypeForUnit)(o.customUnitInfo.unitType)!==t){if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getDisplayText(): customUnitInfo.unitType and quantityType do not match.");return""}A=(0,a.getUnitInstance)(o.customUnitInfo.unitType),n=o.customUnitInfo.precision}if(o.customBaseUnit){if((0,a.getQuantityTypeForUnit)(o.customBaseUnit)!==t){if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getDisplayText(): customBaseUnit and quantityType do not match.");return""}var s=(0,a.getDefaultBaseUnitForQuantity)(t);if(!s)return"";e=(0,a.convertBetweenUnits)(e,o.customBaseUnit,s)}}if(!A){var u=this.getGlobalUnitInfo(t),c=void 0;if(u){if(c=u.precision,this.precisionMap){var l=this.precisionMap.tool_length_and_precision,g=this.precisionMap.tool_area_and_precision;switch(t){case"length":l&&l.unit&&i.factorMap[l.unit]===u.unit.factor&&void 0!==l.precision&&(c=l.precision);break;case"area":g&&g.unit&&i.factorMap[g.unit]===u.unit.factor&&void 0!==g.precision&&(c=g.precision)}}A=u.unit,n=void 0===n?c:n}}if(A&&n)return A.getDisplayText(e,r,n);if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getDisplayText(): illegal input.");return""},e.prototype.getValueFromDisplayText=function(e,t,r,n){var i;if(void 0===r&&(r=!1),n&&n.customUnit){if((0,a.getQuantityTypeForUnit)(n.customUnit)!==t){if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getValueFromDisplayText(): customUnit and quantityType do not match.");return 0}i=(0,a.getUnitInstance)(n.customUnit)}if(!i){var o=this.getGlobalUnitInfo(t);o&&(i=o.unit)}if(i){var A=i.getValueFromDisplayText(e,r);if(n&&n.customBaseUnit){if((0,a.getQuantityTypeForUnit)(n.customBaseUnit)!==t){if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getValueFromDisplayText(): customBaseUnit and quantityType do not match.");return 0}var s=(0,a.getDefaultBaseUnitForQuantity)(t);s&&(A=(0,a.convertBetweenUnits)(A,s,n.customBaseUnit))}return A}if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getDisplayText(): 'currentGlobalUnitInfoMap' is not defined or illegal 'quantityType'");return 0},e.prototype.getGlobalUnitInfo=function(e){if(this.currentGlobalUnitInfoMap)return this.currentGlobalUnitInfoMap[e]},e.prototype.getGlobalUnitInfoMap=function(e){var t;switch(e){case A.GlobalUnitType.mm:t=o.globalUnitInfoMaps.metricSystem.millimeter;break;case A.GlobalUnitType.m:t=o.globalUnitInfoMaps.metricSystem.meter;break;case A.GlobalUnitType.ft:t=o.globalUnitInfoMaps.imperialSystem.foot;break;default:if(String(e).match(/^1\d{2}$/)){var r=this.getGlobalLengthUnitInfo(Number(String(e)[1])),n=this.getGlobalAreaUnitInfo(Number(String(e)[2]));r&&n&&(t={length:r,area:n})}else if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getGlobalUnitInfoMap(): illegal globalUnitType")}return t},e.prototype.getGlobalLengthUnitInfo=function(e){var t;switch(e){case i.LengthUnitType.mm:t=o.globalLengthUnitInfoMaps.metricSystem.millimeter;break;case i.LengthUnitType.m:t=o.globalLengthUnitInfoMaps.metricSystem.meter;break;case i.LengthUnitType.ft:t=o.globalLengthUnitInfoMaps.imperialSystem.foot;break;case i.LengthUnitType.in:t=o.globalLengthUnitInfoMaps.imperialSystem.inch;break;default:if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getGlobalLengthUnitInfo(): illegal globalLengthUnitType")}return t},e.prototype.getGlobalAreaUnitInfo=function(e){var t;switch(e){case i.AreaUnitType.sqMm:t=o.globalAreaUnitInfoMaps.metricSystem.millimeter;break;case i.AreaUnitType.sqM:t=o.globalAreaUnitInfoMaps.metricSystem.meter;break;case i.AreaUnitType.sqFt:t=o.globalAreaUnitInfoMaps.imperialSystem.foot;break;case i.AreaUnitType.mats:t=o.globalAreaUnitInfoMaps.JapaneseUnitSystem.mats;break;case i.AreaUnitType.tsubo:t=o.globalAreaUnitInfoMaps.JapaneseUnitSystem.tsubo;break;default:if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)throw new Error("UnitSystem.getGlobalAreaUnitInfo(): illegal globalAreaUnitType")}return t},e}();t.default=s},function(e,t,r){"use strict";var n=r(205);Object.defineProperty(t,"__esModule",{value:!0}),t.tsubo=t.mats=t.squareMillimeter=t.squareMeter=t.squareFoot=t.footAndInch=t.inch=t.millimeter=t.meter=void 0;var i=n(r(1880)),o=r(513),A=n(r(1881)),a=new i.default("m",o.FACTORS.m2mm,o.regexMap.number,o.regexMap.meterText);t.meter=a;var s=new i.default("mm",o.FACTORS.mm2mm,o.regexMap.number,o.regexMap.millimeterText);t.millimeter=s;var u=new i.default("''",o.FACTORS.inch2mm,o.regexMap.number,o.regexMap.inchText);t.inch=u;var c=new A.default;t.footAndInch=c;var l=new i.default("ft²",o.FACTORS.sqft2sqmm,o.regexMap.number,o.regexMap.squareFootText);t.squareFoot=l;var g=new i.default("m²",o.FACTORS.sqm2sqmm,o.regexMap.number,o.regexMap.squareMeterText);t.squareMeter=g;var f=new i.default("mm²",o.FACTORS.sqmm2sqmm,o.regexMap.number,o.regexMap.squareMillimeterText);t.squareMillimeter=f;var h=new i.default("mats",o.FACTORS.mats2sqmm,o.regexMap.number,o.regexMap.matsText);t.mats=h;var p=new i.default("tsubo",o.FACTORS.tsubo2sqmm,o.regexMap.number,o.regexMap.tsuboText);t.tsubo=p},function(e,t,r){"use strict";var n=r(205);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(r(73)),o=n(r(74)),A=r(1038),a=function(){function e(t,r,n,o){(0,i.default)(this,e),this.name=t,this.factor=r,this.regexWithoutUnit=n,this.regexWithUnit=o}return(0,o.default)(e,[{key:"getDisplayText",value:function(e,t,r){return t?"".concat((0,A.numberPrecisionOperationAndRound)(e/this.factor,r)).concat(this.name):"".concat((0,A.numberPrecisionOperationAndRound)(e/this.factor,r))}},{key:"getValueFromDisplayText",value:function(e,t){return t?this.getValueFromFirstNumber(this.regexWithUnit,e):this.getValueFromFirstNumber(this.regexWithoutUnit,e)}},{key:"getValueFromFirstNumber",value:function(e,t){var r=(0,A.testStringAndExtractNumbers)(e,t);return void 0!==r[0]?r[0]*this.factor:(console.warn("".concat(this.constructor.name,".getValueFromText(): illegal input.")),0)}}]),e}();t.default=a},function(e,t,r){"use strict";var n=r(205);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(r(73)),o=n(r(74)),A=r(513),a=r(1038),s=function(){function e(){(0,i.default)(this,e),this.factor=0}return(0,o.default)(e,[{key:"getDisplayText",value:function(e,t,r){return this.getFootAndInchText(e)}},{key:"getValueFromDisplayText",value:function(e,t){return this.getValueFromFootAndInchText(e)}},{key:"getFootAndInchText",value:function(e){var t=(0,a.numberPrecisionOperationAndRound)(e/A.FACTORS.inch2mm,0),r=Math.floor(t/A.FACTORS.foot2inch),n=t-r*A.FACTORS.foot2inch;return"".concat(r,"'").concat(n,"''")}},{key:"getValueFromFootAndInchText",value:function(e){var t,r;return A.regexMap.number.test(e)||A.regexMap.inchText.test(e)?(t=e.match(A.regexMap.numberInString))&&(r=Number(t[0])):A.regexMap.footAndInchText.test(e)&&(t=e.match(A.regexMap.numberInString))&&(r=Number(t[0])*A.FACTORS.foot2inch,2===t.length&&(r+=Number(t[1]))),void 0!==r?r*A.FACTORS.inch2mm:(console.warn("".concat(this.constructor.name,".getValueFromText(): illegal input.")),0)}}]),e}();t.default=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.globalLengthUnitInfoMaps=t.globalAreaUnitInfoMaps=t.globalUnitInfoMaps=void 0;var n=r(512),i={metricSystem:{meter:{length:{precision:.001,unit:n.meter},area:{precision:.01,unit:n.squareMeter}},millimeter:{length:{precision:1,unit:n.millimeter},area:{precision:.01,unit:n.squareMeter}}},imperialSystem:{foot:{length:{precision:1,unit:n.footAndInch},area:{precision:1,unit:n.squareFoot}}}};t.globalUnitInfoMaps=i;var o={metricSystem:{meter:{precision:.01,unit:n.squareMeter},millimeter:{precision:.01,unit:n.squareMillimeter}},imperialSystem:{foot:{precision:.01,unit:n.squareFoot}},JapaneseUnitSystem:{mats:{precision:.01,unit:n.mats},tsubo:{precision:.01,unit:n.tsubo}}};t.globalAreaUnitInfoMaps=o;var A={metricSystem:{meter:{precision:.001,unit:n.meter},millimeter:{precision:1,unit:n.millimeter}},imperialSystem:{foot:{precision:1,unit:n.footAndInch},inch:{precision:.01,unit:n.inch}}};t.globalLengthUnitInfoMaps=A},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"TransactionDocument",{enumerable:!0,get:function(){return n.TransactionDocument}}),Object.defineProperty(t,"InferenceSystem2D",{enumerable:!0,get:function(){return i.InferenceSystem2D}}),Object.defineProperty(t,"flatEntitiesCreator",{enumerable:!0,get:function(){return o.flatEntitiesCreator}}),Object.defineProperty(t,"HighlightSystem2D",{enumerable:!0,get:function(){return A.HighlightSystem2D}}),Object.defineProperty(t,"HighlightSystem3D",{enumerable:!0,get:function(){return A.HighlightSystem3D}});var n=r(1884),i=r(415),o=r(1888),A=r(499)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"TransactionDocument",{enumerable:!0,get:function(){return n.default}});var n=r(1885)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(1886),i=r(1887),o=function(){function e(e){var t=this;this.undoStack=[],this.redoStack=[],this.status=i.TransactionDocumentStatus.None,this.onDocumentChange=function(e,r,n){t.status!==i.TransactionDocumentStatus.Aborting&&t.activeTransaction.record(e,r,n),t.status===i.TransactionDocumentStatus.None&&t.onBackupRecord&&t.onBackupRecord(e,r,n)},this.updateDocument=e.updateDocument,this.onBackupRecord=e.onBackupRecord,this.maxBackupStep=e.maxBackupStep||25,this.openTransaction()}return e.prototype.setMaxBackupStep=function(e){if(e<1)throw Error("MaxBackupStep must not smaller than 1");this.maxBackupStep=e,this.undoStack.length>=this.maxBackupStep&&this.undoStack.splice(0,this.undoStack.length-this.maxBackupStep)},e.prototype.openTransaction=function(){this.redoStack.length=0,this.activeTransaction=this.createTransaction()},e.prototype.commitTransaction=function(){this.undoStack.length>=this.maxBackupStep&&this.undoStack.splice(0,this.undoStack.length-(this.maxBackupStep+1)),this.undoStack.push(this.activeTransaction),this.openTransaction()},e.prototype.abortTransaction=function(){this.status=i.TransactionDocumentStatus.Aborting,this.activeTransaction.recover(),this.status=i.TransactionDocumentStatus.None,this.activeTransaction=this.createTransaction()},e.prototype.undo=function(){return 0!==this.undoStack.length&&(this.activeTransaction=this.createTransaction(),this.status=i.TransactionDocumentStatus.Undoing,this.undoStack.pop().recover(),this.status=i.TransactionDocumentStatus.None,this.redoStack.push(this.activeTransaction),this.activeTransaction=this.createTransaction(),!0)},e.prototype.redo=function(){return 0!==this.redoStack.length&&(this.activeTransaction=this.createTransaction(),this.status=i.TransactionDocumentStatus.Redoing,this.redoStack.pop().recover(),this.status=i.TransactionDocumentStatus.None,this.undoStack.push(this.activeTransaction),this.activeTransaction=this.createTransaction(),!0)},e.prototype.createTransaction=function(){return new n.default(this.updateDocument)},e}();t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=function(){function e(e){this.updateDocument=e,this.records=new Map}return e.prototype.record=function(e,t,r){var n=this.records.get(e);n||(n=new Map,this.records.set(e,n)),n.has(t)||n.set(t,r)},e.prototype.recover=function(){var e=this;this.records.forEach((function(t,r){t.forEach((function(t,n){e.updateDocument(r,n,t)}))}))},e.prototype.isEmpty=function(){return 0===this.records.size},e}();t.default=n},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionDocumentStatus=void 0,t.TransactionDocumentStatus=n,function(e){e[e.None=0]="None",e[e.Undoing=1]="Undoing",e[e.Redoing=2]="Redoing",e[e.Aborting=3]="Aborting"}(n||(t.TransactionDocumentStatus=n={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.flatEntitiesCreator=function(e){var t=[],r=[];return function(n){var i=t,o=r;if(n!==i){for(var A=[],a=i.length,s=n.length,u=0;u<a&&u<s;u++){if(i[u]!==(f=n[u]))break;A.push(o[u])}if(u===a)for(;u<s;u++)A.push(e(n[u]));else{for(var c=new Map,l=u;l<a;l++)c.set(i[l],o[l]);for(var g=u;g<s;g++){var f=n[g],h=c.get(f);void 0===h?A.push(e(f)):A.push(h)}}return t=n,r=A,Object({DEPLOY_VERSION:1,APP_VERSION:1}).ENABLE_DEV_CHECK&&(Object.freeze(t),Object.freeze(r)),A}return r}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"perf",{enumerable:!0,get:function(){return n.perf}});var n=r(232)},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.KAFApp=void 0;var n=r(4),i=r(211),o=r(143),A=r(1039),a=r(1043),s=r(232),u=r(492),c=r(137),l=r(11),g=r(91);function f(e){var t=document.getElementById(e);return t||((t=document.createElement("div")).id=e,t.style.position="absolute",t.style.top="0",t.style.width="100%",t.style.height="100%",document.body.appendChild(t)),t}var h={fpsDetectorEnabled:!0},p=function(){function t(){this.appNodeId="kaf-app-"+t.AppCount++,this.pluginManager=new i.PluginManager,this.started=!1,this.registerPlugin(A.AppServicePlugin)}return t.prototype.registerPlugin=function(e){if(this.started)throw new Error("KAFApp.registerPlugin: cannot register plugin after App is started.");return this.pluginManager.registerPlugin(e),this},t.prototype.getPlugin=function(e){return this.pluginManager.getPlugin(e)},t.prototype.start=function(t){var r=this;if(this.started)throw new Error("KAFApp.start: App is already started.");t=(0,n.__assign)((0,n.__assign)({},h),t),this.started=!0;var i=(0,s.measurePluginLoadTiming)(this.pluginManager);this.pluginManager.loadAll(),i();var p=this.pluginManager.getPlugin(A.AppServicePlugin);this.fpsDetector=new s.FpsDetector(p.logger),this.fpsDataMerger=new s.FpsDataMerger({onMerged:function(e){return p.logger.fpsMerged(e)}}),p.stateManager.toolbox[u.setAppIdSymbol](this.appNodeId),p.stateManager.document[u.setAppIdSymbol](this.appNodeId),t.fpsDetectorEnabled?this.keepLoggingFps():this.fpsDetector.dispose(),(e.env.IS_PERF||Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING)&&(window.kafProfiler=(0,a.profiler)(),window.kafDebuger=(0,a.debugManager)()),(0,o.config)({onError:p.logger.error}),p.stateManager.document.start(),p.stateManager.document.getLoadStatistics().then((function(e){(0,s.setDocumentsTiming)(e,r.appNodeId)}));var d,I,y=p.getLayout();d=y&&l.createElement(y,null),I={logger:p.logger,fpsDetector:this.fpsDetector,fpsDataMerger:this.fpsDataMerger,kafCoreState:p.stateManager,nodeId:this.appNodeId},g.render(l.createElement(c.RootStateContext.Provider,{value:{rootState:I.kafCoreState}},l.createElement(A.App,{logger:I.logger,fpsDetector:I.fpsDetector,fpsDataMerger:I.fpsDataMerger,appNodeId:I.nodeId},d)),f(I.nodeId)),Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&(__dev.kafApp=this)},t.prototype.dispose=function(){var e,t;this.pluginManager.unloadAll(),e={nodeId:this.appNodeId},t=f(e.nodeId),g.unmountComponentAtNode(t),t.remove(),this.fpsDetector.dispose(),this.started=!1},t.prototype.getAppNodeId=function(){return this.appNodeId},t.prototype.keepLoggingFps=function(){var e=this;this.fpsDetector.on("frame",(function(t,r){r&&e.fpsDataMerger.add(t.duration)})),(0,s.initPerf)()},t.AppCount=0,t}();t.KAFApp=p}).call(this,r(86))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.MountedViews=void 0;var n=r(4),i=r(137),o=r(2),A=r(11),a=r(91),s=r(510),u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.placeholder=document.createElement("span"),t.viewKeyMap=new WeakMap,t}return(0,n.__extends)(t,e),t.prototype.render=function(){var e=this,t=this.props.mountedViews.map((function(t,r){return A.createElement(s.ViewMountOrderContext.Provider,{key:e.getViewKey(t),value:r},A.createElement(t,null))})).reverse();return a.createPortal(t,this.placeholder)},t.prototype.componentWillUnmount=function(){this.placeholder=void 0},t.prototype.getViewKey=function(e){var t=this.viewKeyMap.get(e);return void 0===t&&(t=(0,o.uniqueId)("mounted-view-"),this.viewKeyMap.set(e,t)),t},t}(A.PureComponent);t.MountedViews=u;var c=(0,i.connect)((function(e){return{root:e}}),(function(e){return{mountedViews:e.root.__INTERNAL__mountedAppViews}}),u);t.default=c},function(e,t,r){},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AppServicePlugin=void 0;var n=r(4),i=r(211),o=r(1041),A=r(689),a=r(671),s=r(676),u=r(274),c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rootState=new A.default,t.logger=new s.Logger,t.enableConflictSessionCheck=function(e,r){t.getSessionManager().prepareSession(e,r)},t}return(0,n.__extends)(t,e),Object.defineProperty(t.prototype,"stateManager",{get:function(){return this.rootState},enumerable:!0,configurable:!0}),t.prototype.onInitialize=function(){var e=this;this.rootState=new A.default,this.rootState.initState(),this.kaf2AppService=this.dependencies.get(a.AppServicePlugin),this.rootState[A.RootState_setKaf2](this.kaf2AppService.state),this.rootState.toolbox.provideToolContext(u.ToolContextInternal,(function(){return{rootState:e.rootState}})),Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&(__dev.kaf=this)},t.prototype.onDispose=function(){this.rootState.dispose(),this.getSessionManager().stopSessionChecking(),this.layout=void 0},t.prototype.setLayout=function(e){if(this.layout)throw new Error("Layout cannot be set twice.");this.layout=e},t.prototype.getLayout=function(){return this.layout},t.prototype.addDocumentSource=function(e){this.rootState.document.addDocumentSource(e)},t.prototype.mountView=function(e){this.rootState.__INTERNAL__addMountedAppView(e)},t.prototype.getSessionManager=function(){var e=this;return this.sessionManager||(this.sessionManager=new o.default((function(t){t?e.rootState.document.autoSave.start():e.rootState.document.autoSave.stop()}))),this.sessionManager},t.prototype.registerEntityDocument=function(e){this.kaf2AppService.registerDocument(e)},t.dependencies=[a.AppServicePlugin],t}(i.BasePlugin);t.AppServicePlugin=c},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(344),i=r(4),o=r(228),A=r(1037),a=r(682),s=r(11),u=r(232),c=r(1044),l=r(1045);r(1895);var g,f={"./DebugComponent.module.scss":{"debug-root":"ui-debug-root_47b7b","debug-button":"ui-debug-button_73a33","debug-setting":"ui-debug-setting_bb0cc","debug-setting-row":"ui-debug-setting-row_94ade","debug-setting-row-title":"ui-debug-setting-row-title_6b6be","debug-setting-row-content":"ui-debug-setting-row-content_fc85a","debug-setting-item":"ui-debug-setting-item_6ac86","debug-setting-item-label":"ui-debug-setting-item-label_9289f","profile-wrapper":"ui-profile-wrapper_f26ef","profile-visible":"ui-profile-visible_b5bbc"}};g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,i.__extends)(t,e),t.prototype.render=function(){return null},t}(a.default);var h=null;try{h=localStorage.getItem("__kafPerfEnabled__")}catch(e){if(Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV)throw e}if("1"===h||null===h&&(e.env.IS_PERF||Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV)){g=function(e){function t(t){var r=e.call(this,t)||this;return r.switchProfile=function(e){var t=e.target.checked;r.setState({showProfile:t}),t||r.cleanRenderProfile()},r.switchDebug=function(e){var t=e.target.checked;r.setState({showDebug:t})},r.switchLanguage=function(e){var t=e.target.checked,r=window,n=t?A.Language.EN_US:A.Language.ZH_CN;try{r.kafDebuger.set("lang",n,!0),r.localStorage["local-language"]=n}catch(e){}window.location.reload()},r.switchAxis=function(e){var t=e.target.checked;r.setState({showAxis:t}),window.kafDebuger.set("axis3d",t)},r.onKey=function(e){e&&192==e.keyCode&&r.recordCurrentState()},r.state=r.state||{},r.state.showProfile=!1,r.state.showDebug=!0,r.state.showAxis=!1,r}return(0,i.__extends)(t,e),t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this),this.initPixi(),document.body.addEventListener("keydown",this.onKey,!1)},t.prototype.render=function(){var e=this,t=this.state.showDebug;return s.createElement("div",{className:"ui-debug-root_47b7b",style:{display:t?"block":"none"}},this.renderDebugButton(),s.createElement("div",{ref:function(t){return e.elProfiler=t},className:(0,n.default)("profile-wrapper "+(this.state.showProfile?"profile-visible":""),f)}))},t.prototype.renderDebugButton=function(){return s.createElement("div",{className:"ui-debug-button_73a33"},s.createElement(u.Stats,null),this.renderSettingPanel())},t.prototype.renderSettingPanel=function(){var e=this.state.views,t="";try{t=window.localStorage["local-language"]}catch(e){}return s.createElement("div",{className:"ui-debug-setting_bb0cc"},s.createElement("div",{className:"ui-debug-setting-row_94ade"},s.createElement("div",{className:"ui-debug-setting-row-title_6b6be"},"基本"),s.createElement("div",{className:"ui-debug-setting-row-content_fc85a"},s.createElement("div",{className:"ui-debug-setting-item_6ac86"},s.createElement("input",{type:"checkbox",checked:this.state.showProfile,onChange:this.switchProfile}),s.createElement("span",{className:"ui-debug-setting-item-label_9289f"},"性能(旧)")),s.createElement("div",{className:"ui-debug-setting-item_6ac86"},s.createElement("input",{type:"checkbox",checked:this.state.showDebug,onChange:this.switchDebug}),s.createElement("span",{className:"ui-debug-setting-item-label_9289f"},"调试")),s.createElement("div",{className:"ui-debug-setting-item_6ac86"},s.createElement("input",{type:"checkbox",checked:t===A.Language.EN_US,onChange:this.switchLanguage}),s.createElement("span",{className:"ui-debug-setting-item-label_9289f"},"英文")),this.renderAxisSwitch())),s.createElement("div",{className:"ui-debug-setting-row_94ade"},s.createElement("div",{className:"ui-debug-setting-row-title_6b6be"},"性能"),s.createElement("div",{className:"ui-debug-setting-row-content_fc85a"},s.createElement("div",{className:"ui-debug-setting-item_6ac86"},s.createElement(u.Timing,null)),s.createElement("div",{className:"ui-debug-setting-item_6ac86"},s.createElement(u.Profiling,null)))),e.map((function(e,t){return s.createElement("div",{key:e.key,className:"ui-debug-setting-row_94ade"},e.content)})))},t.prototype.renderAxisSwitch=function(){return Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV?s.createElement("div",{className:"ui-debug-setting-item_6ac86"},s.createElement("input",{type:"checkbox",checked:this.state.showAxis,onChange:this.switchAxis}),s.createElement("span",{className:"ui-debug-setting-item-label_9289f"},"坐标系")):null},t.prototype.renderProfile=function(){var e="",t=this.recordState||this.dumpProfile(),r=t.normalCosts,n=t.normalCounts,i=t.totalValues;e="时间统计\n\n",r.sort((function(e,t){return t.time-e.time})),r.forEach((function(t){e+=t.key+" "+t.time+" "+t.count+"\n"})),this.pxCostsText.text=e,e="计数统计\n\n",n.forEach((function(t){e+=t.key+" "+t.count+"\n"})),this.pxCountsText.text=e,e="全局计数\n\n",i.forEach((function(t){e+=t.key+" "+t.count+"\n"})),this.pxInfoText.text=e},t.prototype.cleanRenderProfile=function(){this.pxCostsText.text="",this.pxCountsText.text="",this.pxInfoText.text=""},t.prototype.dumpProfile=function(){var e,t,r,n,i=(0,l.profiler)().dump(),o=Object.values(i.costs);e=[];for(var A=0,a=o.length;A<a;++A)n=o[A],(0,c.isCrcp)(n.key)||e.push(n);var s=Object.values(i.counts).sort((function(e,t){return t.count-e.count}));t=[];for(A=0,a=s.length;A<a;++A)n=s[A],(0,c.isCrcp)(n.key)||t.push(n);var u=i.totals;return(r=Object.keys(u).map((function(e){return{key:e,count:u[e]}}))).sort((function(e,t){return t.count-e.count})),{normalCosts:e.length<50?e:e.slice(0,50),normalCounts:t.length<50?t:t.slice(0,50),totalValues:r.length<50?r:r.slice(0,50),datas:i.datas}},t.prototype.recordCurrentState=function(){this.recordState?this.recordState=void 0:(this.recordState=this.dumpProfile(),window.__pd=this.recordState.datas[this.recordState.datas.length-1])},t.prototype.initPixi=function(){var e=this;if(this.elProfiler){this.pxApp=new o.Application(3e3,1200,{backgroundColor:0});var t=this.pxApp;this.elProfiler.appendChild(t.view);var r=function(e,r){void 0===r&&(r=5);var n=new o.Text("",{fontSize:20,fill:65280,align:"left"});return n.x=e,n.y=r,t.stage.addChild(n),n};this.pxCostsText=r(500),this.pxCountsText=r(1e3),this.pxInfoText=r(1500);var n=Date.now();t.ticker.add((function(){Date.now()-n<1e3||(n=Date.now(),e.state.showProfile&&e.renderProfile())}))}},t}(a.default)}var p=g;t.default=p}).call(this,r(86))},function(e,t,r){},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"DisplayInfoMesh",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"DisplayInfoDrawable",{enumerable:!0,get:function(){return i.default}});var n=r(1897),i=r(1904)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(4),i=r(139),o=r(83),A=r(1046),a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.meshBuilder=new A.DisplayInfoMeshBuilder((function(){return t.props}),(function(){return t.state.loadingStatus}),(function(e){return t.setState({loadingStatus:e})}),(function(e,r){return t.onMeshCreated(e,r)}),(function(){return t.notifyWorldUpdate()})),t.componentInstances=t.meshBuilder.componentInstances,t.state={},t}return(0,n.__extends)(t,e),t.prototype.onMeshCreated=function(e,t){},t.prototype.buildMesh=function(){var e=this.meshBuilder.createMesh();return e.visible=void 0===this.props.visible||this.props.visible,e},t.prototype.componentDidUpdate=function(t,r){e.prototype.componentDidUpdate.call(this,t,r),this.meshBuilder.updateMesh(this.mesh);var n=this.props.visible;this.mesh.visible=void 0===n||n},t.prototype.componentWillUnmount=function(){this.meshBuilder.disposeMesh(),e.prototype.componentWillUnmount.call(this)},t=(0,n.__decorate)([i.default],t)}(o.default);t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1899);t.toPopBufferComponent=n.toPopBufferComponent,t.PopBufferComponent=n.PopBufferComponent;var i=r(1047);t.toPopBufferMtl=i.toPopBufferMtl,t.PopBufferMtl=i.PopBufferMtl},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(44),i=r(1047),o=function(){function e(){this.doubleSided=!1}return e.prototype.getId=function(){return this.id},e.prototype.setId=function(e){return this.id=e,this},e.prototype.getMesh=function(){return this.mesh},e.prototype.setMesh=function(e){return this.mesh=e,this},e.prototype.getTransform=function(){return this.transform},e.prototype.setTransform=function(e){return this.transform=e,this},e.prototype.getMtl=function(){return this.mtl},e.prototype.setMtl=function(e){return this.mtl=e,this},e.prototype.getDoubleSided=function(){return this.doubleSided},e.prototype.setDoubleSided=function(e){return void 0===e&&(e=!1),this.doubleSided=e,this},e}();t.PopBufferComponent=o,t.toPopBufferComponent=function(e){var t=new o;return t.setId(e.id).setMesh(e.mesh).setDoubleSided(e.doubleSided),e.transform&&t.setTransform((new n.default).fromString(e.transform)),t.setMtl(e.mtl.filter((function(e){return!!e})).map(i.toPopBufferMtl)),t}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(6),i=r(12),o=function(){function e(e){this.props=e}return e.prototype.create=function(){var t=this.props,r=t.color,i=t.opacity,o=e.NORMAL_BOX;this.opacity=i,this.material=new n.MeshBasicMaterial({color:r,transparent:!0,opacity:i||1});var A=new n.Mesh(o,this.material);return this.applyTransform(A,this.props),A.setAttribute("shadowCaster",!1),i&&i<1&&(A.setAttribute("outline-color-marked",!0),A.setAttribute("transparent-line-faded",!0)),A},e.prototype.update=function(t){var r=this.props,n=r.opacity,i=r.color;t.geometry=e.NORMAL_BOX,this.material.setValues({color:i,opacity:n}),this.opacity!==n&&(this.opacity=n,this.updateMeshAttributeFromOpacity(t,n)),this.applyTransform(t,this.props)},e.prototype.dispose=function(){},e.prototype.applyTransform=function(e,t){var r=t.position,n=t.rotation,o=t.scale,A=void 0===o?i.SCALE_ONE:o,a=t.size;e.position.set(r.x,r.y,r.z),e.scale.set(A.x*a.x,A.y*a.y,A.z*a.z),e.rotation.set(n.x,n.y,n.z)},e.prototype.updateMeshAttributeFromOpacity=function(e,t){t&&t<1?(e.setAttribute("outline-color-marked",!0),e.setAttribute("transparent-line-faded",!0)):(e.setAttribute("outline-color-marked",!1),e.setAttribute("transparent-line-faded",!1))},e.NORMAL_BOX=new n.BoxGeometry(1,1,1),e}();t.default=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(1902),i=function(){function e(e){this.props=e}return e.prototype.create=function(){var e=(0,n.createMesh)(this.props);return(0,n.applyTransform)(e,this.props),e},e.prototype.update=function(e){(0,n.applyTransform)(e,this.props)},e.prototype.dispose=function(){},e}();t.default=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createMesh=u,t.applyTransform=c,t.default=void 0;var n=r(4),i=r(6),o=r(98),A=r(5),a=r(227),s=r(83);function u(e){var t=e.size,r=new i.BoxBufferGeometry(t.x,t.y,t.z),n=new i.EdgesBufferGeometry(r,1),o=new i.LineBasicMaterial({color:16722688,depthTest:!1});return new i.LineSegments(n,o)}function c(e,t){var r=t.position,n=t.pivot,i=t.scale,s=t.rotation;e.position.copy((0,a.vector3ToThree)(A.default.add(r,n||new A.default))),e.scale.copy((0,a.vector3ToThree)(i)),e.rotation.copy((0,a.eulerToThree)((new o.default).setFromVector3(s))),e.renderOrder=1}var l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,n.__extends)(t,e),t.prototype.buildMesh=function(){var e=u(this.props);return c(e,this.props),e},t.prototype.componentDidUpdate=function(t,r){e.prototype.componentDidUpdate.call(this,t,r),c(this.mesh,this.props)},t}(s.default);t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PromiseQueue=void 0;var n=function(){function e(e){var t=this;this.isCanceled=!1,this.hasSuccess=!1,this.hasFailure=!1,this.promise=Promise.all(e.map((function(e){return e.then((function(){t.hasSuccess=!0}),(function(){t.hasFailure=!0}))}))).then((function(){return{hasSuccess:t.hasSuccess,hasFailure:t.hasFailure,isCanceled:t.isCanceled}}))}return e.prototype.setCanceled=function(){this.isCanceled=!0},e}();t.PromiseQueue=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(4),i=r(34),o=r(1046),A=r(2),a=function(){function e(e){this.props=e}return e.prototype.create=function(e){var t=this;return this.meshBuilder=new o.DisplayInfoMeshBuilder((function(){return t.props}),(function(){return t.loadingStatus}),(function(e){return t.loadingStatus=e}),A.noop,e),this.meshBuilder.createMesh()},e.prototype.update=function(e){this.meshBuilder.updateMesh(e)},e.prototype.dispose=function(e){this.meshBuilder.disposeMesh()},(0,n.__decorate)([i.observable],e.prototype,"loadingStatus",void 0),e}();t.default=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(4),i=r(137),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.lastHandledSignalCount=0,t}return(0,n.__extends)(t,e),t.prototype.componentWillMount=function(){this.lastHandledSignalCount=this.props.autoSaveSignalCount,this.props.rootState.document.autoSave.start()},t.prototype.componentWillReceiveProps=function(e){e.autoSaveSignalCount!==this.lastHandledSignalCount&&(this.props.rootState.document.saveDocument(!0),this.lastHandledSignalCount=e.autoSaveSignalCount)},t.prototype.render=function(){return null},t}(r(11).Component),A=(0,i.connect)((function(e){return{autoSave:e.document.autoSave}}),(function(e){return{autoSaveSignalCount:e.autoSave.autoSaveSignalCount}}),o);t.default=A},function(e,t){},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1058);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var i=r(1908);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})}));var o=r(1909);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})}))},function(module,exports,__webpack_require__){"use strict";(function(module){Object.defineProperty(exports,"__esModule",{value:!0}),exports.createReactContext=exports.PureComponent=exports.Component=void 0;var React=_interopRequireWildcard(__webpack_require__(11)),_async=__webpack_require__(1058),enterModule;function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _getRequireWildcardCache=function(){return e},e}function _interopRequireWildcard(e){if(e&&e.__esModule)return e;if(null===e||"object"!==_typeof(e)&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=n?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(r,i,o):r[i]=e[i]}return r.default=e,t&&t.set(e,r),r}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper(e){var t=_isNativeReflectConstruct();return function(){var r,n=_getPrototypeOf(e);if(t){var i=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _possibleConstructorReturn(this,r)}}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof(t)&&"function"!=typeof t?_assertThisInitialized(e):t}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}enterModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).enterModule,enterModule&&enterModule(module);var BaseComponent=function(_React$Component){_inherits(BaseComponent,_React$Component);var _super=_createSuper(BaseComponent);function BaseComponent(){return _classCallCheck(this,BaseComponent),_super.apply(this,arguments)}return _createClass(BaseComponent,[{key:"componentDidMount",value:function(){this.initAsync()}},{key:"componentWillUnmount",value:function(){this.releaseAsync()}},{key:"initAsync",value:function(){}},{key:"releaseAsync",value:function(){}},{key:"cancelAllAsync",value:function(){}},{key:"asyncLatest",value:function(e){}},{key:"asyncEvery",value:function(e){}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),BaseComponent}(React.Component),BasePureComponent=function(_React$PureComponent){_inherits(BasePureComponent,_React$PureComponent);var _super2=_createSuper(BasePureComponent);function BasePureComponent(){return _classCallCheck(this,BasePureComponent),_super2.apply(this,arguments)}return _createClass(BasePureComponent,[{key:"componentDidMount",value:function(){this.initAsync()}},{key:"componentWillUnmount",value:function(){this.releaseAsync()}},{key:"initAsync",value:function(){}},{key:"releaseAsync",value:function(){}},{key:"cancelAllAsync",value:function(){}},{key:"asyncLatest",value:function(e){}},{key:"asyncEvery",value:function(e){}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),BasePureComponent}(React.PureComponent),Component=function(e){_inherits(r,e);var t=_createSuper(r);function r(){return _classCallCheck(this,r),t.apply(this,arguments)}return r}(BaseComponent);exports.Component=Component;var PureComponent=function(e){_inherits(r,e);var t=_createSuper(r);function r(){return _classCallCheck(this,r),t.apply(this,arguments)}return r}(BasePureComponent);exports.PureComponent=PureComponent,_async.context.extend(Component),_async.context.extend(PureComponent);var createReactContext=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.asyncContext||(0,_async.createAsyncContext)(),r=function(e){_inherits(r,e);var t=_createSuper(r);function r(){return _classCallCheck(this,r),t.apply(this,arguments)}return r}(BaseComponent),n=function(e){_inherits(r,e);var t=_createSuper(r);function r(){return _classCallCheck(this,r),t.apply(this,arguments)}return r}(BasePureComponent);return t.extend(r),t.extend(n),{Component:r,PureComponent:n}},reactHotLoader,leaveModule;exports.createReactContext=createReactContext,reactHotLoader=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).default,reactHotLoader&&(reactHotLoader.register(BaseComponent,"BaseComponent","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/common/react.js"),reactHotLoader.register(BasePureComponent,"BasePureComponent","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/common/react.js"),reactHotLoader.register(Component,"Component","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/common/react.js"),reactHotLoader.register(PureComponent,"PureComponent","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/common/react.js"),reactHotLoader.register(createReactContext,"createReactContext","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/common/react.js")),leaveModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).leaveModule,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(24)(module))},function(module,exports,__webpack_require__){"use strict";(function(module){Object.defineProperty(exports,"__esModule",{value:!0}),exports.SingletonRef=void 0;var _util=__webpack_require__(79),enterModule;function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}enterModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).enterModule,enterModule&&enterModule(module);var SingletonRef=function(){function SingletonRef(e){var t=this;_classCallCheck(this,SingletonRef),this.instance=function(){return t.value||t.preValue},this.preInstance=function(){return t.preValue},e&&(this.noPreInstance=!0)}return _createClass(SingletonRef,[{key:"set",value:function(e){if(this.value)throw new Error("CUSTOM: Singleton exception while set!");this.value=e}},{key:"unset",value:function(e){this.value!==e&&_util.Util.asyncThrow(new Error("CUSTOM: Singleton exception while unset!")),this.noPreInstance||(this.preValue=this.value),this.value=void 0}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),SingletonRef}(),reactHotLoader,leaveModule;exports.SingletonRef=SingletonRef,reactHotLoader=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).default,reactHotLoader&&reactHotLoader.register(SingletonRef,"SingletonRef","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/common/Singleton.js"),leaveModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).leaveModule,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(24)(module))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(323);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var i=r(1911);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})}));var o=r(1053);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})}));var A=r(694);Object.keys(A).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return A[e]}})}));var a=r(1054);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}})}));var s=r(1055);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}})}));var u=r(693);Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}})}));var c=r(1056);Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}})}));var l=r(1057);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}})}))},function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.tde=void 0;var n,i=r(323),o=r(694);(n=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:r(7)).enterModule)&&n(e);var A={desc:"dummy",module:function(){return this},defineCase:function(){return this}};function a(e,t){try{return i.tci.enabled?o.TestDesign.create(e,t):A}catch(e){return A}}var s,u,c={design:a};t.tde=c,(s=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:r(7)).default)&&(s.register(A,"DUMMY_DESIGN","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/testing/tde.js"),s.register(a,"design","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/testing/tde.js"),s.register(c,"tde","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/testing/tde.js")),(u=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:r(7)).leaveModule)&&u(e)}).call(this,r(24)(e))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1913);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var i=r(1914);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})}));var o=r(1059);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})}));var A=r(1060);Object.keys(A).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return A[e]}})}));var a=r(1915);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}})}))},function(module,exports,__webpack_require__){"use strict";(function(module){var enterModule;function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}Object.defineProperty(exports,"__esModule",{value:!0}),exports.Service=void 0,enterModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).enterModule,enterModule&&enterModule(module);var Service=function(){function Service(){_classCallCheck(this,Service)}return _createClass(Service,[{key:"getId",value:function(){return this.id}},{key:"onAdd",value:function(e,t){if(!this.center||this.center!==e){if(!e||!t)throw new Error("CUSTOM: Registe a invalid service!");if("string"!=typeof t&&!(this instanceof t))throw new Error("CUSTOM: Registe a service whose decl is not compatible with impl!");this.center&&this.center.rem(this.id),this.center=e,this.id=t}}},{key:"onRem",value:function(e,t){this.center===e&&(this.center=void 0,this.id=void 0)}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),Service}(),reactHotLoader,leaveModule;exports.Service=Service,reactHotLoader=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).default,reactHotLoader&&reactHotLoader.register(Service,"Service","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/Service.js"),leaveModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).leaveModule,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(24)(module))},function(module,exports,__webpack_require__){"use strict";(function(module){Object.defineProperty(exports,"__esModule",{value:!0}),exports.ServiceApplication=exports.DynamicServiceApplication=void 0;var _PluginApplication2=__webpack_require__(695),_util=__webpack_require__(79),enterModule;function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper(e){var t=_isNativeReflectConstruct();return function(){var r,n=_getPrototypeOf(e);if(t){var i=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _possibleConstructorReturn(this,r)}}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof(t)&&"function"!=typeof t?_assertThisInitialized(e):t}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}enterModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).enterModule,enterModule&&enterModule(module);var DynamicServiceApplication=function(_PluginApplication){_inherits(DynamicServiceApplication,_PluginApplication);var _super=_createSuper(DynamicServiceApplication);function DynamicServiceApplication(e,t,r){var n;return _classCallCheck(this,DynamicServiceApplication),(n=_super.call(this,t,r||e.getPlugin())).framework=e,n}return _createClass(DynamicServiceApplication,[{key:"prevInit",value:function(){}},{key:"postInit",value:function(){}},{key:"injectInitAOP",value:function(){_util.Util.aspect(this,"init",(function(e,t){return function(){e.prevInit(),t.apply(e,arguments),e.postInit(),e.framework.setAppInited(e)}}))}},{key:"injectRunAOP",value:function(){_util.Util.aspect(this,"run",(function(e,t){return function(){t.apply(e,arguments),e.framework.setAppRunning(e)}}))}},{key:"injectExitAOP",value:function(){_util.Util.aspect(this,"exit",(function(e,t){return function(){t.apply(e,arguments),e.framework.setAppExited(e)}}))}},{key:"injectInitAXRAOP",value:function(){_util.Util.aspect(this,"initAXR",(function(e,t){return function(){t.apply(e,arguments),e.initServices()}}))}},{key:"injectReleaseAXRAOP",value:function(){_util.Util.aspect(this,"releaseAXR",(function(e,t){return function(){e.releaseServices(),t.apply(e,arguments)}}))}},{key:"initServices",value:function(){this.framework.serviceCenter.addByProvider(this.constructor)}},{key:"releaseServices",value:function(){this.framework.serviceCenter.remByProvider(this.constructor)}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),DynamicServiceApplication}(_PluginApplication2.PluginApplication);exports.DynamicServiceApplication=DynamicServiceApplication;var ServiceApplication=function(_DynamicServiceApplic){_inherits(ServiceApplication,_DynamicServiceApplic);var _super2=_createSuper(ServiceApplication);function ServiceApplication(e,t){return _classCallCheck(this,ServiceApplication),_super2.call(this,e,t)}return _createClass(ServiceApplication,[{key:"injectInitAOP",value:function(){_util.Util.aspect(this,"postInit",(function(e,t){return function(){t.apply(e,arguments),e.framework.setAppInited(e)}}))}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),ServiceApplication}(DynamicServiceApplication),reactHotLoader,leaveModule;exports.ServiceApplication=ServiceApplication,reactHotLoader=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).default,reactHotLoader&&(reactHotLoader.register(DynamicServiceApplication,"DynamicServiceApplication","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceApplication.js"),reactHotLoader.register(ServiceApplication,"ServiceApplication","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceApplication.js")),leaveModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).leaveModule,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(24)(module))},function(module,exports,__webpack_require__){"use strict";(function(module){Object.defineProperty(exports,"__esModule",{value:!0}),exports.ServiceContainerApplication=exports.ContainerStaticContext=exports.EDynamicPolicy=exports.EAppOrder=void 0;var _PluginApplication2=__webpack_require__(695),_util=__webpack_require__(79),_ServiceFramework=__webpack_require__(1060),enterModule,EAppOrder;function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper(e){var t=_isNativeReflectConstruct();return function(){var r,n=_getPrototypeOf(e);if(t){var i=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _possibleConstructorReturn(this,r)}}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof(t)&&"function"!=typeof t?_assertThisInitialized(e):t}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}enterModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).enterModule,enterModule&&enterModule(module),exports.EAppOrder=EAppOrder,function(e){e[e.LOW=1]="LOW",e[e.NORMAL=500]="NORMAL",e[e.HIGH=1e3]="HIGH"}(EAppOrder||(exports.EAppOrder=EAppOrder={}));var defaultRegisteOptions=function(){return{order:EAppOrder.NORMAL,dependencies:[]}},EDynamicPolicy;exports.EDynamicPolicy=EDynamicPolicy,function(e){e[e.DEFAULT=1]="DEFAULT",e[e.DELAY=2]="DELAY",e[e.DEFFERED=3]="DEFFERED"}(EDynamicPolicy||(exports.EDynamicPolicy=EDynamicPolicy={}));var defaultRegisteDynamicOptions=function(){return{policy:EDynamicPolicy.DEFAULT,delay:0,dependencies:[]}},ContainerStaticContext=function(){function ContainerStaticContext(){_classCallCheck(this,ContainerStaticContext),this.appDescs=[],this.dynamicAppDescs=[],this.serviceDescs=new Map}return _createClass(ContainerStaticContext,[{key:"addDependentPlugins",value:function(e){var t=void 0;this.pluginClass?t=this.pluginClass.dependencies:(this.tempDeps||(this.tempDeps=[]),t=this.tempDeps),e.forEach((function(e){t.includes(e)||t.push(e)}))}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}},{key:"pluginClass",get:function(){return this._pluginClass},set:function(e){if(this._pluginClass)throw new Error("CUSTOM: Plugin of container application has been set");if(this._pluginClass=e,this.tempDeps){var t=this._pluginClass.dependencies;this.tempDeps.forEach((function(e){t.includes(e)||t.push(e)})),this.tempDeps=void 0}}}]),ContainerStaticContext}();exports.ContainerStaticContext=ContainerStaticContext;var containerStaticContexts=new Map;function getContainerStaticContext(e){var t=containerStaticContexts.get(e);return t||(t=new ContainerStaticContext,containerStaticContexts.set(e,t)),t}function generateContainerAnnotations(e){var t=getContainerStaticContext(e);return{registe:function(e,r){if(t.appDescs.findIndex((function(t){return t.create===e}))>=0)throw new Error("CUSTOM: ServiceApplication registe twice!");return r=r?Object.assign(defaultRegisteOptions(),r):defaultRegisteOptions(),t.appDescs.push({create:e,options:r}),t.addDependentPlugins(r.dependencies||[]),function(e){}},registeDynamic:function(e,r,n){if(t.dynamicAppDescs.findIndex((function(t){return t.id===e}))>=0)throw new Error("CUSTOM: DynamicServiceApplication registe twice!");return n=n?Object.assign(defaultRegisteDynamicOptions(),n):defaultRegisteDynamicOptions(),t.dynamicAppDescs.push({create:r,id:e,options:n}),t.addDependentPlugins(n.dependencies||[]),function(e){}},service:function(e,r){if(!e||!r)throw new Error("CUSTOM: decl or provider of service is invalid!");return function(n){var i=t.serviceDescs.get(r);if(i||(i=[],t.serviceDescs.set(r,i)),i.some((function(t){return t.id===e})))throw new Error("CUSTOM: id of service conflict!");i.push({id:e,impl:n})}}}}var ServiceContainerApplication=function(_PluginApplication){_inherits(ServiceContainerApplication,_PluginApplication);var _super=_createSuper(ServiceContainerApplication);function ServiceContainerApplication(e,t){var r;_classCallCheck(this,ServiceContainerApplication),(r=_super.call(this,e,t)).apps=[];var n=r.getStaticContext();if(!(n.pluginClass&&t instanceof n.pluginClass))throw new Error("CUSTOM: Plugin of container application is invalid");return r}return _createClass(ServiceContainerApplication,[{key:"getStaticContext",value:function(){return getContainerStaticContext(this.constructor)}},{key:"prevInit",value:function(){}},{key:"postInit",value:function(){}},{key:"initApps",value:function(){var e=this,t=this.getStaticContext().appDescs;t.sort((function(e,t){return t.options.order-e.options.order})),t.forEach((function(t){_util.Util.safeExec((function(){e.apps.push(t.create(e.framework))}),!0)})),this.apps.forEach((function(e){_util.Util.safeExec((function(){e.prevInit()}),!0)})),this.apps.forEach((function(e){_util.Util.safeExec((function(){e.init()}),!0)})),this.apps.forEach((function(e){_util.Util.safeExec((function(){e.postInit()}),!0)}))}},{key:"runApps",value:function(){this.apps.forEach((function(e){_util.Util.safeExec((function(){e.run()}),!0)}))}},{key:"exitApps",value:function(){this.apps.slice().reverse().forEach((function(e){_util.Util.safeExec((function(){e.exit()}),!0)})),this.apps=[]}},{key:"tryStartDynamicApplications",value:function(){var e=this;Promise.resolve().then((function(){e.getStaticContext().dynamicAppDescs.forEach((function(t){_util.Util.safeExec((function(){t.options.policy===EDynamicPolicy.DEFFERED?e.framework.startDynamicApp(t.id):t.options.policy===EDynamicPolicy.DELAY&&setTimeout((function(){e.framework.startDynamicApp(t.id)}),t.options.delay)}),!0)}))}))}},{key:"initFramework",value:function(){var e=this.options.coreClass&&this.options.coreClass.ServiceFramework||_ServiceFramework.ServiceFramework;this.framework=new e(this),this.framework.init()}},{key:"releaseFramework",value:function(){this.framework&&this.framework.release()}},{key:"initServices",value:function(){this.framework.serviceCenter.addByProvider(this.constructor)}},{key:"releaseServices",value:function(){this.framework&&this.framework.serviceCenter.remByProvider(this.constructor)}},{key:"injectInitAOP",value:function(){_util.Util.aspect(this,"init",(function(e,t){return function(){e.prevInit(),t.apply(e,arguments),e.initApps(),e.postInit(),e.framework.setAppInited(e)}}))}},{key:"injectRunAOP",value:function(){_util.Util.aspect(this,"run",(function(e,t){return function(){t.apply(e,arguments),e.runApps(),e.framework.setAppRunning(e),e.tryStartDynamicApplications()}}))}},{key:"injectExitAOP",value:function(){_util.Util.aspect(this,"exit",(function(e,t){return function(){e.framework.setAppExited(e),e.exitApps(),t.apply(e,arguments)}}))}},{key:"injectInitAXRAOP",value:function(){_util.Util.aspect(this,"initAXR",(function(e,t){return function(){e.initFramework(),t.apply(e,arguments),e.initServices()}}))}},{key:"injectReleaseAXRAOP",value:function(){_util.Util.aspect(this,"releaseAXR",(function(e,t){return function(){e.releaseServices(),t.apply(e,arguments),e.releaseFramework()}}))}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}],[{key:"setPluginClass",value:function(e){getContainerStaticContext(this).pluginClass=e}},{key:"generateAnnotations",value:function(){return generateContainerAnnotations(this)}}]),ServiceContainerApplication}(_PluginApplication2.PluginApplication),reactHotLoader,leaveModule;exports.ServiceContainerApplication=ServiceContainerApplication,reactHotLoader=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).default,reactHotLoader&&(reactHotLoader.register(EAppOrder,"EAppOrder","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceContainerApplication.js"),reactHotLoader.register(defaultRegisteOptions,"defaultRegisteOptions","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceContainerApplication.js"),reactHotLoader.register(EDynamicPolicy,"EDynamicPolicy","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceContainerApplication.js"),reactHotLoader.register(defaultRegisteDynamicOptions,"defaultRegisteDynamicOptions","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceContainerApplication.js"),reactHotLoader.register(ContainerStaticContext,"ContainerStaticContext","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceContainerApplication.js"),reactHotLoader.register(containerStaticContexts,"containerStaticContexts","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceContainerApplication.js"),reactHotLoader.register(getContainerStaticContext,"getContainerStaticContext","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceContainerApplication.js"),reactHotLoader.register(generateContainerAnnotations,"generateContainerAnnotations","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceContainerApplication.js"),reactHotLoader.register(ServiceContainerApplication,"ServiceContainerApplication","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/service/ServiceContainerApplication.js")),leaveModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).leaveModule,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(24)(module))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1061);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var i=r(1917);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})}));var o=r(1062);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})}));var A=r(1063);Object.keys(A).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return A[e]}})}));var a=r(1918);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}})}))},function(module,exports,__webpack_require__){"use strict";(function(module){Object.defineProperty(exports,"__esModule",{value:!0}),exports.Monitor=void 0;var _AXR2=__webpack_require__(832),_Collector=__webpack_require__(419),_IdleWorker=__webpack_require__(1061),_PerfLog=__webpack_require__(1062),_TimeLog=__webpack_require__(1063),enterModule;function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}function _get(e,t,r){return(_get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=_superPropBase(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function _superPropBase(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_getPrototypeOf(e)););return e}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper(e){var t=_isNativeReflectConstruct();return function(){var r,n=_getPrototypeOf(e);if(t){var i=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _possibleConstructorReturn(this,r)}}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof(t)&&"function"!=typeof t?_assertThisInitialized(e):t}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function defaultSendLog(e,t){console.log(e,t)}enterModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).enterModule,enterModule&&enterModule(module);var Monitor=function(_AXR){_inherits(Monitor,_AXR);var _super=_createSuper(Monitor);function Monitor(){var e;return _classCallCheck(this,Monitor),(e=_super.apply(this,arguments)).perfLog=e.partialCreator.create(_PerfLog.PerfLog),e.idleWorker=e.partialCreator.create(_IdleWorker.IdleWorker),e.timeLog=e.partialCreator.create(_TimeLog.TimeLog),e}return _createClass(Monitor,[{key:"module",value:function(){return"monitor"}},{key:"init",value:function(){_get(_getPrototypeOf(Monitor.prototype),"init",this).call(this),this.collector||(this.collector=Monitor.getDefaultCollector()),this.sendLog||(this.sendLog=defaultSendLog)}},{key:"addConfig",value:function(e){var t=this,r=e.sendLog,n=e.collector,i=e.timeLogConfig,o=e.perfLogConfig;r&&(this.sendLog=r),n&&(this.collector=n),i&&this.timeLog.addConfig(i),o&&o.forEach((function(e){return t.perfLog.addConfig(e)}))}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}],[{key:"getDefaultCollector",value:function(){return Monitor.collector||(Monitor.collector=new _Collector.Collector,Monitor.collector.init()),Monitor.collector}}]),Monitor}(_AXR2.AXR),reactHotLoader,leaveModule;exports.Monitor=Monitor,reactHotLoader=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).default,reactHotLoader&&(reactHotLoader.register(defaultSendLog,"defaultSendLog","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/monitor/Monitor.js"),reactHotLoader.register(Monitor,"Monitor","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/monitor/Monitor.js")),leaveModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).leaveModule,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(24)(module))},function(module,exports,__webpack_require__){"use strict";(function(module){var enterModule;function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}Object.defineProperty(exports,"__esModule",{value:!0}),exports.BehaviorsLog=exports.BehaviorsLogCore=void 0,enterModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).enterModule,enterModule&&enterModule(module);var BehaviorsLogCore=function(){function BehaviorsLogCore(e){_classCallCheck(this,BehaviorsLogCore),this.toolName=e.toolName,this.designId=e.designId,this.userId=e.userId,this.levelId=e.levelId,this.toolVersion=e.toolVersion,this.errorHandler=e.errorHandler}return _createClass(BehaviorsLogCore,[{key:"valueParser",value:function(e){return"function"==typeof e?e():e}},{key:"log",value:function(e){var t=e.toolName,r=e.type,n=e.toolVersion,i=e.description,o=e.userId,A=e.designId,a=e.levelId;BehaviorsLog.log({type:r,description:i,toolName:t||this.valueParser(this.toolName),toolVersion:n||this.valueParser(this.toolVersion),userId:o||this.valueParser(this.userId),designId:A||this.valueParser(this.designId),levelId:a||this.valueParser(this.levelId),errorHandler:this.errorHandler})}},{key:"__reactstandin__regenerateByEval",value:function __reactstandin__regenerateByEval(key,code){this[key]=eval(code)}}]),BehaviorsLogCore}();exports.BehaviorsLogCore=BehaviorsLogCore;var BehaviorsLog=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"create",value:function(e){return new BehaviorsLogCore(e)}},{key:"log",value:function(e){var t=e.toolName,r=e.type,n=e.toolVersion,i=e.description,o=e.userId,A=e.designId,a=e.levelId,s=e.errorHandler;try{fetch("https://actionstat.kujiale.com/api/toolbehaviors/".concat(r,"/log"),{method:"POST",body:JSON.stringify({description:i,toolName:t,toolVersion:n,ua:null===navigator||void 0===navigator?void 0:navigator.userAgent,userId:o,designId:A,levelId:a,behavior:r}),headers:{"content-type":"application/json"}})}catch(e){"function"==typeof s&&s(e)}}}]),e}(),reactHotLoader,leaveModule;exports.BehaviorsLog=BehaviorsLog,reactHotLoader=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).default,reactHotLoader&&(reactHotLoader.register(BehaviorsLogCore,"BehaviorsLogCore","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/monitor/BehaviorsLog.js"),reactHotLoader.register(BehaviorsLog,"BehaviorsLog","/tool-frontend/custom/custom-packages/packages/custom-appkit/src/monitor/BehaviorsLog.js")),leaveModule=("undefined"!=typeof reactHotLoaderGlobal?reactHotLoaderGlobal:__webpack_require__(7)).leaveModule,leaveModule&&leaveModule(module)}).call(this,__webpack_require__(24)(module))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2),i=function(){function e(){var e;this.min=0,this.max=4294967295,this.existedIdMap=((e={})[this.min]=!0,e[this.max]=!0,e)}return e.prototype.onIdOccupied=function(e){this.existedIdMap[e]=!0;var t=this.min,r=this.max;e>=t&&e<=r&&(e-t>r-e?this.max=e:this.min=e)},e.prototype.findNewIdRange=function(){for(var e=Object.keys(this.existedIdMap).map((function(e){return Number(e)})).filter((function(e){return e>=0&&e<=4294967295})).sort((function(e,t){return e-t})),t=0,r=0,n=0,i=1;i<e.length;i++){var o=e[i-1],A=e[i];A-o>t&&(t=A-o,r=o,n=A)}if(r+1>=n)throw"No available id for ObjectIndex";this.min=r,this.max=n},e.prototype.getId=function(){var e=this.min+1;return e>=this.max&&(this.findNewIdRange(),e=this.min+1),this.onIdOccupied(e),e.toString()},e.prototype.markId=function(e){var t=Number(e);n.isInteger(t)&&this.onIdOccupied(t)},e}();t.UniqueIndexGenerator=i,t.uniqueIndexGenerator=new i;var o=function(){function e(){}return Object.defineProperty(e.prototype,"id",{get:function(){return this.getId()},enumerable:!0,configurable:!0}),e.prototype.getId=function(){return void 0===this._id&&(this._id=t.uniqueIndexGenerator.getId()),this._id},e.prototype.setId=function(e){return this._id=e,t.uniqueIndexGenerator.markId(e),this},e}();t.default=o},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(o=i.key,A=void 0,A=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!==n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"===n(A)?A:String(A)),i)}var o,A}function A(e,t){return(A=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function a(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&A(e,t)}(u,e);var t,r,n=(t=u,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=s(t);if(r){var i=s(this).constructor;e=Reflect.construct(n,arguments,i)}else e=n.apply(this,arguments);return a(this,e)});function u(){var e;return i(this,u),(e=n.apply(this,arguments)).$version=0,e}return function(e,t,r){t&&o(e.prototype,t);r&&o(e,r);Object.defineProperty(e,"prototype",{writable:!1})}(u,[{key:"compareVersion",value:function(e){return this.$version===e.getVersion(this.getId())}},{key:"exportVersion",value:function(e){e.setVersion(this.getId(),this.revisionId,this.$version,this.getVersionType())}},{key:"hasVersion",value:function(e){return e.has(this.getId())}},{key:"getVersionType",value:function(){return this.constructor}},{key:"getVersion",value:function(){return this.$version}}]),u}(e)}},function(e,t,r){"use strict";var n,i;Object.defineProperty(t,"__esModule",{value:!0}),t.Axis3=t.Axis2=t.ALL_AXIS3=t.ALL_AXIS2=void 0,t.Axis2=n,function(e){e[e.X=0]="X",e[e.Y=1]="Y"}(n||(t.Axis2=n={})),t.Axis3=i,function(e){e[e.X=0]="X",e[e.Y=1]="Y",e[e.Z=2]="Z"}(i||(t.Axis3=i={}));var o=[i.X,i.Y,i.Z];t.ALL_AXIS3=o;var A=[n.X,n.Y];t.ALL_AXIS2=A},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,function(e){e.PROFILE_ID="vProfileId",e.OFFSET="offset",e.HANDLE_POSITION="handlePosition",e.HANDLE_ROTATION="handleRotate",e.OPEN_DIRECTION="openDirection",e.COVER_TYPE="coverType",e.LEFT_COVER="lCover",e.RIGHT_COVER="rCover",e.UP_COVER="uCover",e.DOWN_COVER="dCover",e.LEFT_COVER_TYPE="lCoverType",e.RIGHT_COVER_TYPE="rCoverType",e.UP_COVER_TYPE="uCoverType",e.DOWN_COVER_TYPE="dCoverType",e.FRONT_EXTENSION="QY",e.BACK_EXTENSION="HY",e.LEFT_SLOT_DEPTH="leftSlotDepth",e.RIGHT_SLOT_DEPTH="rightSlotDepth",e.TOP_SLOT_DEPTH="topSlotDepth",e.BOTTOM_SLOT_DEPTH="bottomSlotDepth",e.HAS_LEFT_SLOT="hasLeftSlot",e.HAS_RIGHT_SLOT="hasRightSlot",e.HAS_TOP_SLOT="hasTopSlot",e.HAS_BOTTOM_SLOT="hasBottomSlot",e.INDENT="indent",e.CRACK="crack",e.LEFT_CRACK="lCrack",e.RIGHT_CRACK="rCrack",e.UP_CRACK="uCrack",e.DOWN_CRACK="dCrack",e.LOCATION="location",e.DOOR_TYPE="doorType",e.JUNCTION="junction",e.HAS_SLOT="hasSlot",e.SLOT_DEPTH="slotDepth",e.FAN_NUMBER="num",e.DOOR_WIDTH="doorWidth",e.CROSS_TYPE="crossTypeId",e.FIRST_DOOR_TYPE="firstDoorTypeId",e.ANGLE_DEGREE="angleDegree",e.TEXTURE_ANGLE_DEGREE="textureAngleDegree",e.TEXTURE_PAVING_STYLE="texturePavingStyle",e.SECTION_TEXTURE_ANGLE_DEGREE="sectionTextureAngleDegree",e.SPLIT_DOOR_POSITIONS="positions",e.MATERIAL_ID="materialId",e.WINDOW_BGID="windowBgId",e.TOP_RAIL_BGID="topRailBgId",e.BOTTOM_RAIL_BGID="bottomRailBgId",e.LEFT_RAIL_BGID="leftRailBgId",e.RIGHT_RAIL_BGID="rightRailBgId",e.FIRST_WINDOW_POSITION="firstWindowPosition",e.SINGLE_WINDOW_PLACE="singleWindowPlace",e.SLIDING_WINDOW_TYPE="slidingWindowType",e.CELL_POSITION="cellPosition",e.GAUZE_BGID="gauzeBgId",e.UNITED_MATERIAL="unitedMaterialBrandGoodId",e.SLIDING_DOOR_SERIES="slidingDoorSeries",e.FIT="fit",e.PLACE_TYPE="placeType",e.MOLDING_PANEL_SIZE="size",e.MOLDING_TZ="TZ",e.MOLDING_TZT="TZT",e.FAUCET_CONNECTOR_PATH="faucetConnectorPath",e.FAUCET_CONNECTOR_OTHER_PATH="faucetConnectorOtherPath",e.MOLDING_LX="LX",e.MOLDING_LY="LY",e.MOLDING_LZ="LZ",e.COUNTERTOP_HOLES="countertopHoles",e.MOLDING_TYPE="moldingType",e.MOLDING_FRONT_PROFILE_ID="frontprofiledataid",e.MOLDING_BACK_PROFILE_ID="backprofiledataid",e.MOLDING_WRAP_EDGE="wrapEdge",e.MOLDING_PROFILE_ID="profiledataid",e.MOLDING_HOLE_PROFILE_ID="holeprofiledataid",e.MOLDING_HOLE_PATH_PROFILE_ID="profiledataid",e.MOLDING_EXTRUSION_HEIGHT="extrusionHeight",e.MOLDING_UNDERBOARDING_HEIGHT="underboardingHeight",e.MOLDING_FRONT_PROFILE_HEIGHT="frontProfileScaleHeight",e.MOLDING_BACK_PROFILE_HEIGHT="backProfileScaleHeight",e.MOLDING_PROFILE_HEIGHT="profileScaleHeight",e.PROCESS_RULE_ID="processRuleId",e.HEAD_INDENT="headIndent",e.TAIL_INDENT="tailIndent",e.HEAD_INSTALL_ANGLE="headInstallAngle",e.TAIL_INSTALL_ANGLE="tailInstallAngle",e.SPEC_FRONT_WATER_RETAINER="specFrontWaterRetainer",e.SKETCH_BACK_WATER_RETAINER="sketchBWRPaths",e.MOLDING_PROFILE_FRONT_OFFSET="profileFrontOffset",e.MOLDING_PROFILE_BACK_OFFSET="profileBackOffset",e.MOLDING_PROFILE_LEFT_OFFSET="profileLeftOffset",e.MOLDING_PROFILE_RIGHT_OFFSET="profileRightOffset",e.SIZE_CONTAIN_WATER_RETAINER="sizeContainWaterRetainer",e.HEIGHT_OFFSET="heightOffset",e.INSTALL_MODE="installMode",e.VERTICAL_INSTALL_MODE="verticalMoldingInstallMode",e.SIDE_SKIRT_INPUTS="sideSkirtInputs",e.MOLDING_HEIGHT="moldingHeight",e.MOLDING_HEIGHT_ZERO="moldingHeightZero",e.MOLDING_BASE_TYPE="moldingBaseType",e.MODE="mode",e.ALIGN_MODE="alignMode",e.MOLDING_MODE="mode",e.SKETCH_PATH="paramCornerPath",e.PATH="path",e.COUNT="count",e.ORIGINAL_MOLDING_AREA="originalMoldingArea",e.ORIGINAL_BOTTOM_MOLDING_AREAS="originalBottomMoldingAreas",e.MOLDING_AREA="moldingArea",e.MOLDING_PATH="moldingPath",e.HOLE_RELATIONS="holeRelations",e.CUT_POINTS="cutPoints",e.CORNER_CUT_POINTS="cornerCutPoints",e.CUT_MOLDING_PATH="cutMoldingPath",e.MOLDING_VERSION="moldingVersion",e.DIRECTION_X="directionx",e.NORMAL="normal",e.START="start",e.LEFT_INDENTATION_LENGTH="leftIndentationLength",e.RIGHT_INDENTATION_LENGTH="rightIndentationLength",e.CONNECTION_LINES="connectionLines",e.CONNECT_MODELS="connectedParamModels",e.OVER_SIDE_LEFT="overSideLeft",e.OVER_SIDE_RIGHT="overSideRight",e.OVER_SIDE_BOTTOM="overSideBottom",e.OVER_SIDE_TOP="overSideTop",e.OVER_SIDE_INSET="overSideInset",e.TRIM_LEFT="trimLeft",e.TRIM_RIGHT="trimRight",e.TRIM_BOTTOM="trimBottom",e.TRIM_TOP="trimTop",e.WIDTH="W",e.DEPTH="D",e.HEIGHT="H",e.OFF_GROUND="offGround",e.MATERIAL_BRAND_GOOD_ID="materialBrandGoodId",e.MATERIAL_BRAND_GOOD_ID_B="materialBrandGoodIdB",e.MATERIAL_BRAND_GOOD_ID_GLASS="materialBrandGoodIdGlass",e.MATERIAL_BRAND_GOOD_ID_BOTTOM_GLASS="materialBrandGoodIdBottomGlass",e.MATERIAL_BRAND_GOOD_ID_GAUZE="materialBrandGoodIdGauze",e.MATERIAL_BRAND_GOOD_ID_ALBAR="materialBrandGoodIdAlBar",e.MATERIAL_BRAND_GOOD_ID_LINE="materialBrandGoodIdLine",e.LV_LOCK_MATERIAL="SJCZ",e.LV_HANDEL_MATERIAL="CZ",e.FIXED_GLASS_CRAFTS="crafts",e.DW_PRODUCE="produce",e.DW_FITTING="dwFitting",e.SIMPLE_CONNECTORS="simpleConnectors",e.ROTATE_Z="rotateZ",e.FAUCET_POSITION="position",e.FAUCET_ROTATE="rotate",e.TEXTURE_SIZE="textureSize",e.TEXTURE_OFFSET="textureOffset",e.WIDTH_1="W1",e.WIDTH_2="W2",e.WIDTH_3="W3",e.WALL_THICKNESS_1="wallThickness1",e.WALL_THICKNESS_2="wallThickness2",e.WALL_THICKNESS_3="wallThickness3",e.OUTSIDE_1="outside1",e.OUTSIDE_2="outside2",e.OUTSIDE_3="outside3",e.WINDOW_OPEN_DIRECTION="windowOpenDirection",e.DOOR_OPEN_DIRECTION="doorOpenDirection",e.PUSH_OR_PULL="pushOrPull",e.INSTALL_POSITION="installPosition",e.INSTALL_POSITION_OFFSET="installPositionOffset",e.INSTALL_SURFACE="installSurface",e.INSTALL_ROTATE="installRotate",e.INSTALL_DEPTH="depthOffset",e.MARGIN="margin",e.RELATIVE_POSITION="relativePosition",e.OUT_POLYGONS="outpolygons",e.PLANK_PATH="plankPath",e.BRUSH_MATERIAL_BGID="brushMaterialBgId",e.BOTTOM_BRUSH_MATERIAL_BGID="bottomBrushMaterialBgId",e.MOLDING_EXPORT="export",e.JOINT_TYPE="jointtype",e.START_ROTATE="startRotate",e.START_ROTATE_AXIS="startRotateAxis",e.END_ROTATE="endRotate",e.END_ROTATE_AXIS="endRotateAxis",e.BORDER_ALIGNMENT="borderAlignment",e.SERIES="series",e.HOLE="hole",e.LINKED_HOLE="linkedHole",e.REGION3D="region3d",e.SEGMENTATION_DATA="segmentationData",e.BKX1="BKX1",e.BKX2="BKX2",e.BKX3="BKX3",e.BKY1="BKY1",e.BKY2="BKY2",e.BKY3="BKY3",e.BKY4="BKY4",e.BKNZHX="BKNZHX",e.BKNZHY="BKNZHY",e.BKWZHX="BKWZHX",e.BKWZHY="BKWZHY",e.BKBSX="BKBSX",e.BKBSY="BKBSY",e.BKSSX="BKSSX",e.BKSSY="BKSSY",e.HTX1="HTX1",e.HTX2="HTX2",e.STX1="STX1",e.STX2="STX2",e.BSX1="BSX1",e.BSX2="BSX2",e.BSY1="BSY1",e.BSY2="BSY2",e.SSX1="SSX1",e.SSX2="SSX2",e.SSY1="SSY1",e.SSY2="SSY2",e.ZHX1="ZHX1",e.ZHX2="ZHX2",e.ZHY1="ZHY1",e.ZHY2="ZHY2",e.ZHY3="ZHY3",e.ZHBSX="ZHBSX",e.ZHBSY="ZHBSY",e.ZHSSX="ZHSSX",e.ZHSSY="ZHSSY",e.ZHFHX="ZHFHX",e.ZHFHY="ZHFHY",e.YTX1="YTX1",e.YTX2="YTX2",e.YTY1="ZHY1",e.PZHX="PZHX",e.PZHY="PZHY",e.BLADES_POSITION="bladesPosition",e.BSNWKQ="BSNWKQ",e.BSKCFX="BSKCFX",e.SSNWKQ="SSNWKQ",e.SSKCFX="SSKCFX",e.DSGX="DSGX",e.DSGY="DSGY",e.ESGX1="ESGX1",e.ESGX2="ESGX2",e.ESGY1="ESGY1",e.ESGY2="ESGY2",e.SSGX1="SSGX1",e.SSGX2="SSGX2",e.SSGX3="SSGX3",e.SSGY1="SSGY1",e.SSGY2="SSGY2",e.SSGY3="SSGY3",e.DXGX="DXGX",e.EXGX1="EXGX1",e.EXGX2="EXGX2",e.SXGX1="SXGX1",e.SXGX2="SXGX2",e.SXGX3="SXGX3",e.GG="GG",e.TXX="TXX",e.TXY="TXY",e.TXY2="TXY2",e.SWDJ="SWDJ",e.DJGD="DJGD",e.ZL_TCK_X="ZL_TCK_X",e.ZL_TCK_Y="ZL_TCK_Y",e.FL_TCK_X="FL_TCK_X",e.TCK_TCBSK_X="TCK_TCBSK_X",e.TCK_TCBSK_Y="TCK_TCBSK_Y",e.TCBSK_BL_X="TCBSK_BL_X",e.TCBSK_BL_Y="TCBSK_BL_Y",e.HEIGHT_1="H1",e.HEIGHT_2="H2",e.CTCS_QD="CTCS_QD",e.CTCS_MBTS="CTCS_MBTS",e.DESIGN="design",e.WINDOW_RATIO="windowRatio",e.CRACK_WIDTH="crackWidth",e.WINDOW_FRAME_RAIL_BGID="windowFrameRailBgId",e.GAUZE_FRAME_RAIL_BGID="gauzeFrameRailBgId",e.TOP_PROFILE_BGID="topProfileBgId",e.BOTTOM_PROFILE_BGID="bottomProfileBgId",e.LEFT_PROFILE_BGID="leftProfileBgId",e.RIGHT_PROFILE_BGID="rightProfileBgId",e.WINDOW_PUSH_OR_PULL="windowPushOrPull",e.GAUZE_PUSH_OR_PULL="gauzePushOrPull",e.BEND_PROPERTIES="bendProperties",e.MOVABLE_FAN_WIDTH="movableFanWidth",e.IMPORT_BRAND_GOOD_ID="importBrandGoodId",e.PLATE_SPECIFIC="plateSpecific",e.LINE_PARAMS="lineParams",e.WALLPAVING_DIRECTION="wallPavingDirection",e.WALL_ID="wallId",e.QZJX="QZJX",e.QYJX="QYJX",e.QTJX="QTJX",e.QDJX="QDJX",e.HZJX="HZJX",e.HYJX="HYJX",e.HTJX="HTJX",e.HDJX="HDJX",e.HOLE_RELATION="holeRelation",e.QS="QS",e.HS="HS",e.LEFT_WIDTH="leftWidth",e.RIGHT_WIDTH="rightWidth",e.QBH="QBH",e.QBK="QBK",e.QCZJ="QCZJ",e.YCZJ="YCZJ",e.HCZJ="HCZJ",e.ZCZJ="ZCZJ",e.QGTCS="QGTCS",e.CLIENT_INFO="clientInfo",e.CUTTING_TYPE="cuttingType",e.CUTTING_INFO="cuttingInfo",e.BJHD="BJHD",e.NSYW="NSYW",e.EMBED="embed",e.QJJ="wallCornerAngle",e.WRAPPER_TYPE="wrapperType",e.AZ="installationMethod",e.COVER="cover",e.LIGHT_TYPE="lightType",e.LIGHT_POSITION="lightPosition",e.LIGHT_WIDTH="lightWidth",e.NON_HORIZONAL_COUNTERTOP_NEW_DOUBLE_SIDE_BLOCK_TYPE="verticalCountertopBlockType",e.NON_HORIZONAL_COUNTERTOP_DOUBLE_SIDE_WIDTH="bothSidesVisibleWidth",e.NON_HORIZONAL_COUNTERTOP_TYPE="verticalCountertopType",e.IS_STRETCH="isStretch",e.MATERIAL_PART="paramMeshInstance",e.COUNTERTOP_BUCKLE="buckleBlockInput",e.FASTENER_INPUT="fastenerInput"}(n||(n={}));var i=n;t.default=i},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.AssemblyType=void 0,t.AssemblyType=n,function(e){e[e.Cabinet=0]="Cabinet",e[e.Wardrobe=1]="Wardrobe"}(n||(t.AssemblyType=n={}))},function(e,t,r){"use strict";var n;function i(e,t){var r=n;delete r[r[e]],r[e]=t,r[t]=e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.setParamAssemblyType=function(e){i("PARAM_ASSEMBLY",e)},t.setParamEntityType=function(e){i("PARAM_ENTITY",e)},t.setParamFurnitureType=function(e){i("PARAM_FURNITURE",e)},t.setParamVirtualType=function(e){i("PARAM_VIRTUAL",e)},function(e){e[e.PARAM_ENTITY=1]="PARAM_ENTITY",e[e.PARAM_FURNITURE=2]="PARAM_FURNITURE",e[e.PARAM_PRIMITIVE=3]="PARAM_PRIMITIVE",e[e.PARAM_VIRTUAL=4]="PARAM_VIRTUAL",e[e.PARAM_ASSEMBLY=5]="PARAM_ASSEMBLY"}(n||(n={}));var o=n;t.default=o},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,function(e){e[e.DEFAULT=-1]="DEFAULT",e[e.VALUE=0]="VALUE",e[e.FORMULA=1]="FORMULA"}(n||(n={}));var i=n;t.default=i},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,function(e){e[e.DOOR_HOLE=0]="DOOR_HOLE",e[e.FACE_PARAMMODEL=1]="FACE_PARAMMODEL",e[e.DIVISION_PARAMMODEL=2]="DIVISION_PARAMMODEL",e[e.NEW_DOOR_HOLE=3]="NEW_DOOR_HOLE",e[e.DRAWING_HOLE=5]="DRAWING_HOLE"}(n||(n={}));var i=n;t.default=i},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,function(e){e[e.FRONT_END=0]="FRONT_END",e[e.EDITOR=1]="EDITOR"}(n||(n={}));var i=n;t.default=i},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,function(e){e[e.UNDEFIND=-1]="UNDEFIND",e[e.SPACE=0]="SPACE",e[e.CENTER=1]="CENTER",e[e.LEFT_FRONT_DOWN=2]="LEFT_FRONT_DOWN",e[e.LEFT_BACK_DOWN=3]="LEFT_BACK_DOWN"}(n||(n={}));var i=n;t.default=i},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,function(e){e[e.DEFAULT=0]="DEFAULT",e[e.LENGTH=1]="LENGTH",e[e.AREA=2]="AREA",e[e.NUMBER=3]="NUMBER"}(n||(n={}));var i=n;t.default=i},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Face=t.ALL_AROUND_FACE3=t.ALL_AROUND_FACE2=void 0,t.Face=n,function(e){e.LEFT="left",e.RIGHT="right",e.BOTTOM="bottom",e.TOP="top",e.BACK="back",e.FRONT="front"}(n||(t.Face=n={}));var i=[n.LEFT,n.RIGHT,n.TOP,n.BOTTOM,n.FRONT,n.BACK];t.ALL_AROUND_FACE3=i;var o=[n.LEFT,n.RIGHT,n.TOP,n.BOTTOM];t.ALL_AROUND_FACE2=o},function(e,t,r){"use strict";var n,i,o,A,a,s,u,c,l,g,f,h,p;Object.defineProperty(t,"__esModule",{value:!0}),t.SwingOpenDirection=t.PushDirecton=t.PlaceType=t.OpenDirection=t.LocationType=t.InstallType=t.InstallSurfaceType=t.HandrailInstallType=t.GridOpenDirection=t.DoorType=t.DoorOpenDirection=t.CoverType=t.BorderAlignment=void 0,t.getEnumIndex=function(e){return Object.keys(e).map((function(e){return parseInt(e,10)})).filter((function(e){return!isNaN(e)}))},t.getEnumNames=function(e){return Object.keys(e).filter((function(e){return isNaN(parseInt(e,10))}))},t.InstallSurfaceType=n,function(e){e[e.LEFT=0]="LEFT",e[e.RIGHT=1]="RIGHT"}(n||(t.InstallSurfaceType=n={})),t.DoorOpenDirection=i,function(e){e[e.LEFT=0]="LEFT",e[e.RIGHT=1]="RIGHT",e[e.TOP=2]="TOP",e[e.BOTTOM=3]="BOTTOM",e[e.NONE=4]="NONE"}(i||(t.DoorOpenDirection=i={})),t.CoverType=o,function(e){e[e.INSIDE=0]="INSIDE",e[e.HALF_COVER=1]="HALF_COVER",e[e.FULL_COVER=2]="FULL_COVER"}(o||(t.CoverType=o={})),t.SwingOpenDirection=A,function(e){e[e.LEFT=0]="LEFT",e[e.RIGHT=1]="RIGHT",e[e.TOP=2]="TOP",e[e.BOTTOM=3]="BOTTOM",e[e.INCLOSEIN=4]="INCLOSEIN",e[e.NONE=5]="NONE",e[e.LEFT_TOP=6]="LEFT_TOP",e[e.LEFT_BOTTOM=7]="LEFT_BOTTOM",e[e.RIGHT_TOP=8]="RIGHT_TOP",e[e.RIGHT_BOTTOM=9]="RIGHT_BOTTOM"}(A||(t.SwingOpenDirection=A={})),t.GridOpenDirection=a,function(e){e[e.LEFT=0]="LEFT",e[e.RIGHT=1]="RIGHT",e[e.NONE=2]="NONE"}(a||(t.GridOpenDirection=a={})),t.PushDirecton=s,function(e){e[e.PUSH=0]="PUSH",e[e.PULL=1]="PULL"}(s||(t.PushDirecton=s={})),t.DoorType=u,function(e){e[e.DOOR=0]="DOOR",e[e.DRAWER_PANEL=1]="DRAWER_PANEL"}(u||(t.DoorType=u={})),t.OpenDirection=c,function(e){e[e.LEFT=0]="LEFT",e[e.RIGHT=1]="RIGHT",e[e.TOP=2]="TOP",e[e.BOTTOM=3]="BOTTOM",e[e.NONE=4]="NONE"}(c||(t.OpenDirection=c={})),t.LocationType=l,function(e){e[e.ABOVE_BOARD=0]="ABOVE_BOARD",e[e.BELOW_BOARD=1]="BELOW_BOARD",e[e.HANGING=2]="HANGING",e[e.UPON_FLOOR=3]="UPON_FLOOR",e[e.UPON_MODEL=4]="UPON_MODEL"}(l||(t.LocationType=l={})),t.PlaceType=g,function(e){e[e.LOCATION=0]="LOCATION",e[e.FIT=1]="FIT"}(g||(t.PlaceType=g={})),t.BorderAlignment=f,function(e){e[e.OUTER=1]="OUTER",e[e.CENTER=2]="CENTER",e[e.INNER=3]="INNER",e[e.OUTERHANG=4]="OUTERHANG",e[e.INNERHANG=5]="INNERHANG"}(f||(t.BorderAlignment=f={})),t.InstallType=h,function(e){e[e.OUTER_HANG=0]="OUTER_HANG",e[e.INNER_HANG=1]="INNER_HANG"}(h||(t.InstallType=h={})),t.HandrailInstallType=p,function(e){e[e.INNER_FRAME=0]="INNER_FRAME",e[e.OUTER_FRAME=1]="OUTER_FRAME"}(p||(t.HandrailInstallType=p={}))},function(e,t,r){"use strict";var n,i;Object.defineProperty(t,"__esModule",{value:!0}),t.IntersectType=t.IntersectArea=void 0,t.IntersectArea=n,function(e){e.BOX="box",e.MESH="mesh"}(n||(t.IntersectArea=n={})),t.IntersectType=i,function(e){e.STATIC="static",e.DYNAMIC="dynamic"}(i||(t.IntersectType=i={}))},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.EVersionType=void 0,t.EVersionType=n,function(e){e.Root="Root",e.Child="Child",e.Accessory="Accessory",e.Template="Template",e.Ref="Ref",e.Custom="Custom",e.Design="Design"}(n||(t.EVersionType=n={}))},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,function(e){e[e.ORIGIN=0]="ORIGIN",e[e.CENTER=1]="CENTER",e[e.LEFT_BACK_BOTTOM=2]="LEFT_BACK_BOTTOM",e[e.LEFT_BACK_TOP=3]="LEFT_BACK_TOP",e[e.LEFT_FRONT_BOTTOM=4]="LEFT_FRONT_BOTTOM",e[e.LEFT_FRONT_TOP=5]="LEFT_FRONT_TOP",e[e.RIGHT_BACK_BOTTOM=6]="RIGHT_BACK_BOTTOM",e[e.RIGHT_BACK_TOP=7]="RIGHT_BACK_TOP",e[e.RIGHT_FRONT_BOTTOM=8]="RIGHT_FRONT_BOTTOM",e[e.RIGHT_FRONT_TOP=9]="RIGHT_FRONT_TOP",e[e.BACK_CENTER=10]="BACK_CENTER",e[e.FRONT_CENTER=11]="FRONT_CENTER"}(n||(n={}));var i=n;t.default=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TOLERANCE=t.SIZE_TOLERANCE=t.SIN_THETA_ZERO_TOLERANCE=t.RADIANS_TOLERANCE=t.NUMBER_TOLERANCE=t.DISTANCE_TOLERANCE=t.DEGREES_TOLERANCE=void 0;var n=r(3);t.NUMBER_TOLERANCE=1e-6;t.SIZE_TOLERANCE=.1;t.DISTANCE_TOLERANCE=1;t.DEGREES_TOLERANCE=1;var i=Math.PI/180;t.RADIANS_TOLERANCE=i;var o=Math.sin(i);t.SIN_THETA_ZERO_TOLERANCE=o;var A=new n.Tolerance.Tolerance(Math.cos(i),1,1e-6);t.TOLERANCE=A},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PhysicalModel=void 0;var n=r(3),i=r(322),o=v(r(188)),A=v(r(141)),a=v(r(361)),s=v(r(68)),u=v(r(98)),c=v(r(207)),l=v(r(530)),g=v(r(44)),f=v(r(113)),h=v(r(16)),p=v(r(5)),d=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==w(e)&&"function"!=typeof e)return{default:e};var r=B(t);if(r&&r.has(e))return r.get(e);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var A=i?Object.getOwnPropertyDescriptor(e,o):null;A&&(A.get||A.set)?Object.defineProperty(n,o,A):n[o]=e[o]}n.default=e,r&&r.set(e,n);return n}(r(99)),I=r(349),y=r(698),C=r(1071),E=r(1939);function B(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(B=function(e){return e?r:t})(e)}function v(e){return e&&e.__esModule?e:{default:e}}function m(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(i=n.key,o=void 0,o=function(e,t){if("object"!==w(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==w(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(i,"string"),"symbol"===w(o)?o:String(o)),n)}var i,o}function Q(e,t){return(Q=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function b(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=S(e);if(t){var i=S(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _(this,r)}}function _(e,t){if(t&&("object"===w(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function S(e){return(S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function w(e){return(w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var D,R,M,x,P,T,F,O,L,N,k,G=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":w(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},U=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":w(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},j=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Q(e,t)}(A,e);var t,r,i,o=b(A);function A(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,A),(e=o.call(this)).position=new p.default(0,0,0),e.rotation=new p.default(0,0,0),e.scale=new p.default(1,1,1),e.size=new p.default(1,1,1),e.translation=new p.default,e.center=new p.default,e}return t=A,(r=[{key:"getBoundingBox2",value:function(){return this.getBox2().getBoundingBox()}},{key:"getBoundingBox3",value:function(){return this.getBox3().getBoundingBox()}},{key:"getPolygon",value:function(){return this.getBox2().getPolygon()}},{key:"getBox2",value:function(){return this.box2||(this.box2=new a.default(new h.default(this.getScaledSize()),new h.default(this.getPosition()),this.getRotation().z)),this.box2}},{key:"getBox3",value:function(){return this.box3||(this.box3=new s.default(this.getScaledSize(),this.getPosition(),this.getRotation())),this.box3}},{key:"getMatrix4",value:function(){return this.matrix4||(this.matrix4=(new g.default).compose(this.getPosition(),(new u.default).setFromVector3(this.getRotation()),this.getScale())),this.matrix4}},{key:"setMatrix4",value:function(e){var t=new p.default,r=new u.default(0,0,0),n=new p.default;e.decompose(t,r,n),this.position=t,this.rotation=(new p.default).setXYZ(r),this.scale=n}},{key:"getConcatenatedMatrix",value:function(){return this.getMatrix4()}},{key:"getConcatenatedBox3",value:function(){return this.getBox3()}},{key:"getMatrix3",value:function(){return this.matrix3||(this.matrix3=(new l.default).compose(new h.default(this.getPosition()),this.getRotation().z,new h.default(this.getScale()))),this.matrix3}},{key:"getTop",value:function(){return this.position.z+this.getScaledSize().z/2}},{key:"getBottom",value:function(){return this.position.z-this.getScaledSize().z/2}},{key:"getHeightRange",value:function(){return new c.default(this.getBottom(),this.getTop())}},{key:"getScaledSize",value:function(){return p.default.mul(this.getSize(),this.getScale())}},{key:"getScale",value:function(){return this.scale}},{key:"setScale",value:function(e){if((0,C.equalsNumber3)(this.scale,e))return this;var t=Object.assign(Object.assign({},this.scale),e),r=(0,C.checkNotZero)(t.x),n=(0,C.checkNotZero)(t.y),i=(0,C.checkNotZero)(t.z),o=(0,C.hackScaleValue)(r),A=(0,C.hackScaleValue)(n),a=(0,C.hackScaleValue)(i);return this.scale=new p.default(o,A,a),o===r&&A===n&&a===i||I.LOGGER.logError(new Error("illegal setScale ".concat(this.getId(),",error val is x:").concat(r,",y:").concat(n,",z:").concat(i))),this}},{key:"getSize",value:function(){return this.size}},{key:"setSize",value:function(e){if((0,C.equalsNumber3)(this.size,e))return this;var t=Object.assign(Object.assign({},this.size),e),r=t.x,n=t.y,i=t.z;return this.size=new p.default((0,C.hackSizeValue)(r),(0,C.hackSizeValue)(n),(0,C.hackSizeValue)(i)),this}},{key:"getRotation",value:function(){return this.rotation}},{key:"setRotation",value:function(e){return(0,C.equalsNumber3)(this.rotation,e)||(this.rotation=new p.default(Object.assign(Object.assign({},this.rotation),e))),this}},{key:"getPosition",value:function(){return this.position}},{key:"setPosition",value:function(e){if((0,C.equalsNumber3)(this.position,e))return this;var t=e.x,r=e.y,n=e.z;return void 0!==t&&(0,y.checkNumberAndLog)(t,"setPositionX"),void 0!==r&&(0,y.checkNumberAndLog)(r,"setPositionY"),void 0!==n&&(0,y.checkNumberAndLog)(n,"setPositionZ"),this.position=new p.default(Object.assign(Object.assign({},this.position),e)),this}},{key:"getTranslation",value:function(){return this.translation}},{key:"setTranslation",value:function(e){return this.translation=e,this}},{key:"getCenter",value:function(){return this.center}},{key:"setCenter",value:function(e){return this.center=e,this}},{key:"isSizeNaN",value:function(){return isNaN(this.size.x)||isNaN(this.size.y)||isNaN(this.size.z)}},{key:"isScaled",value:function(){return!this.scale.nearEquals(p.default.ONE)}},{key:"localToGlobal",value:function(e){var t=this.getConcatenatedMatrix(),r=e.clone();return r.applyMatrix4(t),r}},{key:"globalToLocal",value:function(e){var t=(new g.default).getInverse(this.getConcatenatedMatrix()),r=e.clone();return r.applyMatrix4(t),r}},{key:"globalToLocal2d",value:function(e){var t=e.clone(),r=new p.default(t.x,t.y,0),i=this.globalToLocal(r);return new n.Point2d(i.x,i.y)}},{key:"localToGlobal2d",value:function(e){var t=e.clone(),r=new p.default(t.x,t.y,0),i=this.localToGlobal(r);return new n.Point2d(i.x,i.y)}},{key:"afterSet",value:function(e,t,r){t===E.ModelPropertyType.Physical&&(this.matrix3=void 0,this.matrix4=void 0,this.box3=void 0,this.box2=void 0)}}])&&m(t.prototype,r),i&&m(t,i),Object.defineProperty(t,"prototype",{writable:!1}),A}(d.default);t.PhysicalModel=j,G([(0,d.property)(p.default.isEqual,E.ModelPropertyType.Physical),U("design:type","function"==typeof(D=void 0!==p.default&&p.default)?D:Object)],j.prototype,"position",void 0),G([(0,d.property)(p.default.isEqual,E.ModelPropertyType.Physical),U("design:type","function"==typeof(R=void 0!==p.default&&p.default)?R:Object)],j.prototype,"rotation",void 0),G([(0,d.property)(p.default.isEqual,E.ModelPropertyType.Physical),U("design:type","function"==typeof(M=void 0!==p.default&&p.default)?M:Object)],j.prototype,"scale",void 0),G([(0,d.property)(p.default.isEqual,E.ModelPropertyType.Physical),U("design:type","function"==typeof(x=void 0!==p.default&&p.default)?x:Object)],j.prototype,"size",void 0),G([(0,d.property)(p.default.isEqual),U("design:type","function"==typeof(P=void 0!==p.default&&p.default)?P:Object)],j.prototype,"translation",void 0),G([(0,d.property)(p.default.isEqual),U("design:type","function"==typeof(T=void 0!==p.default&&p.default)?T:Object)],j.prototype,"center",void 0),G([i.returnImmutable,U("design:type",Function),U("design:paramtypes",[]),U("design:returntype","function"==typeof(F=void 0!==o.default&&o.default)?F:Object)],j.prototype,"getBoundingBox2",null),G([i.returnImmutable,U("design:type",Function),U("design:paramtypes",[]),U("design:returntype","function"==typeof(O=void 0!==A.default&&A.default)?O:Object)],j.prototype,"getBoundingBox3",null),G([i.returnImmutable,U("design:type",Function),U("design:paramtypes",[]),U("design:returntype","function"==typeof(L=void 0!==f.default&&f.default)?L:Object)],j.prototype,"getPolygon",null),G([i.returnImmutable,U("design:type",Function),U("design:paramtypes",[]),U("design:returntype",void 0)],j.prototype,"getBox2",null),G([i.returnImmutable,U("design:type",Function),U("design:paramtypes",[]),U("design:returntype",void 0)],j.prototype,"getBox3",null),G([i.returnImmutable,U("design:type",Function),U("design:paramtypes",[]),U("design:returntype","function"==typeof(N=void 0!==p.default&&p.default)?N:Object)],j.prototype,"getScale",null),G([i.returnImmutable,U("design:type",Function),U("design:paramtypes",[]),U("design:returntype",void 0)],j.prototype,"getSize",null),G([i.returnImmutable,U("design:type",Function),U("design:paramtypes",[]),U("design:returntype","function"==typeof(k=void 0!==p.default&&p.default)?k:Object)],j.prototype,"getRotation",null),G([i.returnImmutable,U("design:type",Function),U("design:paramtypes",[]),U("design:returntype",void 0)],j.prototype,"getPosition",null),G([i.returnImmutable,U("design:type",Function),U("design:paramtypes",[]),U("design:returntype",void 0)],j.prototype,"getTranslation",null)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkNumberAndLog=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(void 0===e)return void n.LOGGER.logError(new Error("".concat(t," undefined number: ").concat(e)));if(!Number.isFinite(e))return void n.LOGGER.logError(new Error("".concat(t," Infinity number: ").concat(e)));if("string"==typeof e)return void n.LOGGER.logError(new Error("".concat(t," string number: ").concat(e)));if(isNaN(e))return void n.LOGGER.logError(new Error("".concat(t," NaN number: ").concat(e)))};var n=r(349)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkParam=c,t.checkParamAndLog=function(e,t,r){c(e,t)&&s(e,t,r)},t.checkParsedValue=l,t.checkParsedValueAndLog=function(e,t,r){l(e,t)&&s(e,t,r)},t.setOnCheckParamErrorCallBack=function(e){u=e};var n,i=r(2),o=r(10),A=r(349),a=(n=r(1069))&&n.__esModule?n:{default:n};function s(e,t,r){var n=r.action,i=r.oldValue,o=r.paramName;A.LOGGER.logError(new Error("action: ".concat(n," invalid ").concat(e," type value, paramName: ").concat(o,", value: ").concat(JSON.stringify(t),", ").concat(t,", oldValue: ").concat(i))),u(o,e,t,n)}var u=i.noop;function c(e,t){var r=!1;try{switch(e){case o.ParamType.FLOAT:var n=(0,a.default)(e,t);("number"!=typeof n||isNaN(n))&&(r=!0);break;case o.ParamType.INT:var A=(0,a.default)(e,t);("number"!=typeof A||isNaN(A))&&(r=!0),(0,i.isInteger)(A)&&!t.includes(".")||(r=!0);break;case o.ParamType.MATERIAL:case o.ParamType.SHAPE:var s=Number(t);(0,i.isInteger)(s)||(r=!0);break;case o.ParamType.BOOLEAN:"true"!==t&&"false"!==t&&(r=!0);break;case o.ParamType.STYLE:var u=(0,a.default)(e,t);"bgId"in u&&"versionId"in u||(r=!0),"number"==typeof u.bgId&&"number"==typeof u.versionId||(r=!0)}}catch(e){r=!0}return r}function l(e,t){var r=!1;try{switch(e){case o.ParamType.FLOAT:("number"!=typeof t||isNaN(t))&&(r=!0);break;case o.ParamType.INT:("number"!=typeof t||isNaN(t))&&(r=!0),(0,i.isInteger)(t)||(r=!0);break;case o.ParamType.MATERIAL:case o.ParamType.SHAPE:(0,i.isInteger)(Number(t))||(r=!0);break;case o.ParamType.BOOLEAN:"boolean"!=typeof t&&(r=!0);break;case o.ParamType.STYLE:"bgId"in t&&"versionId"in t||(r=!0),"number"==typeof t.bgId&&"number"==typeof t.versionId||(r=!0);break;case o.ParamType.STRING:"string"!=typeof t&&(r=!0)}}catch(e){r=!0}return r}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModelPropertyType=void 0;var n={Physical:Symbol("Physical"),Hole:Symbol("Hole"),NEED_CHANGED_EVENT:Symbol("NEED_CHANGED_EVENT")};t.ModelPropertyType=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParamBizProperty=void 0;var n=r(1941);function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(o=n.key,A=void 0,A=function(e,t){if("object"!==i(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"===i(A)?A:String(A)),n)}var o,A}var A=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.data=t,this.paramKey=t.key,this.namespace=t.namespace,this.name=t.name,this.value=t.value,this.valueType=t.valueType}var t,r,i;return t=e,(r=[{key:"getParsedValue",value:function(){switch(this.valueType){case n.ParamBizValueType.boolean:case n.ParamBizValueType.int:case n.ParamBizValueType.float:return JSON.parse(this.value);default:return this.value}}},{key:"getName",value:function(){return this.name}},{key:"getValue",value:function(){return this.value}},{key:"getParamKey",value:function(){return this.paramKey}},{key:"getData",value:function(){return this.data}}])&&o(t.prototype,r),i&&o(t,i),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.ParamBizProperty=A},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ParamBizValueType=void 0,t.ParamBizValueType=n,function(e){e.boolean="boolean",e.float="float",e.int="int"}(n||(t.ParamBizValueType=n={}))},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.RevitArc3Data=void 0,t.parseShape3=function(e){var t=new u.default,r=[],n=!0;if(e.curves.forEach((function(e){if("RevitLine3D"===e.type){var t=e;r.push(new s.default(p(t.start),p(t.end)))}else if("RevitArc3D"===e.type){var o=e,A=new i.default(p(o.position),p(o.xDirection),p(o.yDirection));r.push(new a.default(A,h(o.center),o.radius,o.startAngle,o.arcAngle)),Number.isFinite(o.startAngle)||(n=!1)}})),!n)return t;return t.setRevitCurves(r)},t.parseVector2=h,t.parseVector3=p;var i=c(r(242)),o=c(r(16)),A=c(r(5)),a=c(r(700)),s=c(r(517)),u=c(r(1077));function c(e){return e&&e.__esModule?e:{default:e}}function l(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(o=i.key,A=void 0,A=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!==n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"===n(A)?A:String(A)),i)}var o,A}function g(e,t,r){return t&&l(e.prototype,t),r&&l(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}var f=g((function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.type=""}));function h(e){return e?new o.default(e):void 0}function p(e){return e?new A.default(e):void 0}t.RevitArc3Data=f},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(723),i=r(78),o=r(112),A=r(340),a=r(102),s=r(16),u=function(){function e(e,t,r,n){this.center=e,this.radius=t,this.startAngle=r,this.arcAngle=n}return e.prototype.getAngleAtT=function(e){return this.startAngle+e*this.arcAngle},e.prototype.getPointAtT=function(e){return this.getPointByAngle(this.getAngleAtT(e))},e.prototype.getLengthAtT=function(e){var t=this.arcAngle;return this.radius*(Math.abs(t)*e)},e.prototype.getTByLength=function(e){var t=this.arcAngle;return e/this.radius/Math.abs(t)},e.prototype.getAngleByPoint=function(e){var t=this.getCircle().getAngle(e),r=this.getTByAngle(t);return this.getAngleAtT(r)},e.prototype.getTByAngle=function(e){var t=this.startAngle,r=this.arcAngle,n=A.default.normalize(e),i=A.default.normalize(t),o=A.default.normalize(t+r),a=!this.isClockwise(),s=i>o;if(s&&a||!s&&!a){var u=A.default.normalize(n-i);return u>Math.abs(r)&&(u=A.TWO_PI-u),u/Math.abs(r)}return(n-i)/r},e.prototype.getPointByAngle=function(e){var t=this.center,r=this.radius;return s.default.add(t,new s.default(r*Math.cos(e),r*Math.sin(e)))},e.prototype.isAngleInArc=function(e){var t=this.startAngle,r=this.arcAngle,n=A.default.normalize(e),i=A.default.normalize(t),o=A.default.normalize(t+r),a=Math.min(i,o),s=Math.max(i,o),u=r>0,c=i<o;return u&&c||!u&&!c?n>=a&&n<=s:n<=a||n>=s},e.prototype.getApproximatePoints=function(e){void 0===e&&(e=.3);var t=[],r=[new s.default(0,1)];if(0===this.radius||0===this.arcAngle)return t;for(;0!==r.length;){var n=r.pop(),i=.5*(n.x+n.y),A=new o.default(this.getPointAtT(n.x),this.getPointAtT(n.y)).signedDistanceFromPoint(this.getPointAtT(i));Math.abs(A)<e?t.push(this.getPointAtT(n.x)):r.push(new s.default(i,n.y),new s.default(n.x,i))}return t.push(this.getPointAtT(1)),t},e.prototype.getPointsByIncrement=function(e){if(e<=0)throw new Error("Increment must be greater than zero: "+e);var t,r=[];for(t=0;t<=1;t+=e)r.push(this.getPointAtT(t));return a.default.isEqual(t,1,.5*e)||r.push(this.getPointAtT(1)),r},e.prototype.getNearestPoint=function(e){var t=this.center,r=s.default.sub(e,t).angle();if(!this.isAngleInArc(r)){var n=this.getPointAtT(0),i=this.getPointAtT(1);return e.distance(n)<e.distance(i)?n:i}return this.getPointByAngle(r)},e.prototype.getPointSide=function(e){var t=this.center,r=this.radius,n=this.arcAngle,i=e.distance(t),o=-1;return a.default.isEqual(i,r)?o=0:i<r&&(o=1),0===(o*=Math.sign(n))?"ON_CURVE":o>0?"ON_LEFT":"ON_RIGHT"},e.prototype.getDistance=function(e,t){return void 0===t&&(t=!0),Math.abs(this.getSignedDistance(e,t))},e.prototype.getSignedDistance=function(e,t){var r;if(void 0===t&&(t=!0),t)r=this.getNearestPoint(e);else{var n=this.getAngleByPoint(e);r=this.getCircle().getPoint(n)}var i=e.distance(r);return"ON_LEFT"===this.getPointSide(e)?-i:i},e.prototype.isPointOnArcCurveInclusive=function(e,t){if(void 0===t&&(t=i.NUMBER_TOLERANCE),!this.getCircle().isPointOnCircle(e,t))return!1;var r=s.default.sub(e,this.center).angle();return this.isAngleInArc(r)},e.prototype.isPointOnArcCurveExclusive=function(e,t){return void 0===t&&(t=i.NUMBER_TOLERANCE),this.isPointOnArcCurveInclusive(e,t)&&!this.isPointOnArcEnds(e,t)},e.prototype.isPointOnArcEnds=function(e,t){return void 0===t&&(t=i.NUMBER_TOLERANCE),this.getPointAtT(0).nearEquals(e,t)||this.getPointAtT(1).nearEquals(e,t)},e.prototype.isClockwise=function(){return this.arcAngle<0},e.prototype.getBulge=function(){return Math.tan(this.arcAngle/4)},e.prototype.getCircle=function(){return new n.default(this.center,this.radius)},e.prototype.clone=function(){return new e(this.center.clone(),this.radius,this.startAngle,this.arcAngle)},e.fromChordAndBulge=function(t,r){var n=t.start,i=t.length(),o=t.getCenter(),a=Math.sign(r),u=a*r,c=4*Math.atan(u),l=i/2/Math.tan(c/2),g=t.getVector().rotate(a*A.HALF_PI).normalize(),f=s.default.add(o,g.mul(l)),h=s.default.sub(n,f);return new e(f,h.length(),h.angle(),a*c)},e}();t.default=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeShape3=function(e){return{curves:e.getRevitCurves().map((function(e){if(e instanceof o.default)return{start:a(e.getStartPoint()),end:a(e.getEndPoint()),type:"RevitLine3D"};if(e instanceof i.default){var t=e.getRectFace();return{center:(r=e.getCenter(),(0,n.pick)(r,"x","y")),radius:e.getRadius(),startAngle:e.getStartAngle(),arcAngle:e.getArcAngle(),position:a(t.origin),xDirection:a(t.directionU),yDirection:a(t.directionV),type:"RevitArc3D"}}var r}))}};var n=r(2),i=A(r(700)),o=A(r(517));function A(e){return e&&e.__esModule?e:{default:e}}function a(e){return(0,n.pick)(e,"x","y","z")}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FRACTION_DIGITS=void 0,t.formatParamValue=function(e,t){switch(e){case i.default.FLOAT:return function(e){return e+""}(t);case i.default.FLOAT2:return function(e){return e.x+","+e.y}(t);case i.default.FLOAT3:return A(t);case i.default.FLOAT3_BUFFER:return function(e){var t=e.length,r=t?A(e[--t]):"";for(;t;)r=A(e[--t])+";"+r;return r}(t);case i.default.INT:return function(e){return e.toFixed()}(t);case i.default.BOOLEAN:return function(e){return e+""}(t);case i.default.FIT:case i.default.STYLE:return function(e){return JSON.stringify(e)}(t);case i.default.BOOLEAN_LIST:return function(e){return parseInt((0,o.reverseStr)(e),2).toString()}(t);default:return t}};var n,i=(n=r(514))&&n.__esModule?n:{default:n},o=r(1070);function A(e){return e.x+","+e.y+","+e.z}t.FRACTION_DIGITS=1},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i=r(21),o=r(2),A=(n=r(514))&&n.__esModule?n:{default:n},a=r(350);function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,A,a=[],s=!0,u=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=o.call(r)).done)&&(a.push(n.value),a.length!==t);s=!0);}catch(e){u=!0,i=e}finally{try{if(!s&&null!=r.return&&(A=r.return(),Object(A)!==A))return}finally{if(u)throw i}}return a}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return c(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(i=n.key,o=void 0,o=function(e,t){if("object"!==s(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(i,"string"),"symbol"===s(o)?o:String(o)),n)}var i,o}var g=new(function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.logParamsStore={},this.saveLog=(0,o.debounce)((function(){i.Util.safeExec((function(){var e=Object.values(t.logParamsStore);if(e.length){var r=function(e){var t="",r=[];return e.forEach((function(e){r.push(e.modelId+(e.rootModelId?">"+e.rootModelId:"")),t+="".concat(e.modelName," ").concat(e.rootModelName?">"+e.rootModelName:""," 参数变化 {"),Object.entries(e.paramStore).forEach((function(e){var r=u(e,2),n=r[0],i=r[1],o=i.preVal,A=i.nextVal;t+="".concat(n,": ").concat(o," to ").concat(A,"; ")})),t+="}"})),{logContent:t,modelIds:r}}(e),n=r.modelIds,o=r.logContent;(0,i.getLocalLogger)().add({module:"params",logLevel:i.LocalLogLevel.Info,entityIds:n,type:i.LogType.Data,content:o})}t.logParamsStore={}}),!1)}),200)}var t,r,n;return t=e,(r=[{key:"isEqual",value:function(e,t,r){return e.type!==A.default.FLOAT&&e.type!==A.default.INT||t.type!==A.default.FLOAT&&t.type!==A.default.INT||isNaN(Number(e.value))||isNaN(Number(t.value))?(0,a.compareParamData)(e,t):Math.abs(Number(e.value)-Number(t.value))<r}},{key:"collectParams",value:function(e,t,r){var n=this;i.Util.safeExec((function(){if(r&&!n.isEqual(e,t,.1)){var i=r.getId(),o=r.getRoot(),A=t.name;n.logParamsStore[i]||(n.logParamsStore[i]={modelId:i,modelName:r.getName(),rootModelId:o!==r?o.getId():void 0,rootModelName:o!==r?o.getName():void 0,paramStore:{}}),n.logParamsStore[i].paramStore[A]||(n.logParamsStore[i].paramStore[A]={preVal:e.value,nextVal:t.value}),n.logParamsStore[i].paramStore[A]&&(n.logParamsStore[i].paramStore[A].nextVal=t.value)}}),!1)}}])&&l(t.prototype,r),n&&l(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}());t.default=g},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.COMMON_OVERRIDE_ATTR_KEY=void 0,t.delCommonOverrideData=function(e,t,r){var o=u(e)||{},a=o[t];if(!a)return;return(0,n.remove)(a,(function(e){return Object.entries(r).every((function(t){var r=A(t,2),n=r[0];return r[1]===e[n]}))})),0===Object.keys(o).length||Object.values(o).every((function(e){return 0===e.length}))?(0,i.del)(e,"commonOverrideAttr"):(0,i.set)(e,"commonOverrideAttr",JSON.stringify(o))},t.getCommonOverrideData=u,t.setCommonOverrideData=function(e,t){var r=u(e);if(!r)return(0,i.set)(e,"commonOverrideAttr",JSON.stringify(t));var a=Object.assign({},r);function s(e,t){var r=o(e);return r.reverse(),(0,n.uniqBy)(r,(function(e){return JSON.stringify(t.map((function(t){return e[t]})))})).reverse()}return Object.entries(t).forEach((function(e){var t,r=A(e,2),n=r[0],i=r[1];a[n]?(t=a[n]).push.apply(t,o(i)):a[n]=i})),Object.entries(a).forEach((function(e){var t=A(e,2),r=t[0],n=t[1];"modelAttr"===r?a[r]=s(n,["attrName","setBizType"]):"modelParamAttr"===r&&(a[r]=s(n,["attrName","attrName","setBizType"]))})),(0,i.set)(e,"commonOverrideAttr",JSON.stringify(a))};var n=r(2),i=r(1948);function o(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||a(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function A(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,A,a=[],s=!0,u=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=o.call(r)).done)&&(a.push(n.value),a.length!==t);s=!0);}catch(e){u=!0,i=e}finally{try{if(!s&&null!=r.return&&(A=r.return(),Object(A)!==A))return}finally{if(u)throw i}}return a}}(e,t)||a(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function u(e,t){var r=(0,i.get)(e,"commonOverrideAttr");if(r)try{var n=JSON.parse(r);return t?Object.entries(n).reduce((function(e,r){var n=A(r,2),i=n[0],o=n[1];return e[i]=o.filter((function(e){return e.setBizType===t})),e}),{}):n}catch(e){}}t.COMMON_OVERRIDE_ATTR_KEY="commonOverrideAttr"},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!==n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===n(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,A,a=[],s=!0,u=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=o.call(r)).done)&&(a.push(n.value),a.length!==t);s=!0);}catch(e){u=!0,i=e}finally{try{if(!s&&null!=r.return&&(A=r.return(),Object(A)!==A))return}finally{if(u)throw i}}return a}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return A(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return A(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}Object.defineProperty(t,"__esModule",{value:!0}),t.del=function(e,t){var r=o(s(e,t),3),n=r[0],A=r[1],u=r[2];if(n)return A.splice(u,1),e.mergeBizProperties(i({},a,JSON.stringify(A))),!0},t.get=function(e,t){var r=o(s(e,t),1)[0];return r&&r.data},t.set=function(e,t,r){var n=o(s(e,t),2),A=n[0],u=n[1];A?A.data=r:u&&u.push({bizType:t,data:r});e.mergeBizProperties(i({},a,JSON.stringify(u||[{bizType:t,data:r}])))};var a="com.neican.extpoint.build.afterbuildbypmd";function s(e,t){var r=e.getBizProperties();if(r){var n;try{n=JSON.parse(r[a])}catch(e){}if(Array.isArray(n)){for(var i,o=n.length;o;)if((i=n[--o])&&i.bizType===t)return[i,n,o];return[void 0,n]}return[void 0,void 0]}return[]}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.computeWireGeometry=function(e,t){for(var r,n,o=e?e.coordinates:[],A=e?e.coordinatesIndex:[],a=t||new i.default,s=0;s<A.length-1;s+=2)r=3*A[s],n=3*A[s+1],a.vertices.push(o[r],o[r+1],o[r+2],o[n],o[n+1],o[n+2]);return a};var n,i=(n=r(1086))&&n.__esModule?n:{default:n}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ZoneDivisionType=void 0,t.parseZoneDivisionData=function(e){return function e(t){var r=Object.assign(Object.assign({},t),{size:new o.default(t.size.x,t.size.y,t.size.z),position:new o.default(t.position.x,t.position.y,t.position.z)});return t.zoneDivisions&&t.zoneDivisions.length&&(r.zoneDivisions=t.zoneDivisions.map((function(t){return e(t)}))),r}(e)};var n,i,o=(n=r(5))&&n.__esModule?n:{default:n};t.ZoneDivisionType=i,function(e){e.X="X",e.Y="Y",e.Z="Z"}(i||(t.ZoneDivisionType=i={}))},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(o=i.key,A=void 0,A=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!==n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"===n(A)?A:String(A)),i)}var o,A}var o;Object.defineProperty(t,"__esModule",{value:!0}),t.SourceObjectType=t.ParameterAssignment=void 0,t.SourceObjectType=o,function(e){e[e.MODEL=0]="MODEL",e[e.DRAIN_HOLE=1]="DRAIN_HOLE",e[e.FAUCET_HOLE=2]="FAUCET_HOLE",e[e.AUX_HOLE=3]="AUX_HOLE"}(o||(t.SourceObjectType=o={}));var A=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r,n;return t=e,(r=[{key:"getModel",value:function(){return this.model}},{key:"setModel",value:function(e){return this.model=e,this}},{key:"getName",value:function(){return this.name}},{key:"setName",value:function(e){return this.name=e,this}},{key:"getCategory",value:function(){return this.category}},{key:"setCategory",value:function(e){return this.category=e,this}},{key:"getSourceObjectType",value:function(){return this.sourceObjectType}},{key:"setSourceObjectType",value:function(e){return this.sourceObjectType=e,this}},{key:"getSize",value:function(){return this.size}},{key:"setSize",value:function(e){return this.size=e,this}},{key:"getPosition",value:function(){return this.position}},{key:"setPosition",value:function(e){return this.position=e,this}},{key:"getRotate",value:function(){return this.rotate}},{key:"setRotate",value:function(e){return this.rotate=e,this}}])&&i(t.prototype,r),n&&i(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.ParameterAssignment=A},function(e,t,r){"use strict";function n(e,t,r){if(e===t)return!0;if(e&&t&&e.length===t.length){for(var n=0,i=e.length;n<i;n++)if(r?!r(e[n],t[n]):e[n]!==t[n])return!1;return!0}return!1}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i={equalsArray:n,equalsArrayBuffer:function(e,t){return e===t||!(!e||!t)&&n(new Float64Array(e),new Float64Array(t))},equalsBox3:function(e,t){return e===t||!(!e||!t)&&(e.getPosition().equals(t.getPosition())&&e.getSize().equals(t.getSize())&&e.getRotation().equals(t.getRotation()))},diffArray:function(e,t,r){t=t||[];var n=void 0,i=void 0,o=void 0,A=void 0;if(0===(e=e||[]).length)n=[],i=[],o=[],A=t.slice();else if(0===t.length)n=e.slice(),i=[],o=[],A=[];else{n=[],i=[],o=[],A=[];for(var a=void 0,s=void 0,u=void 0,c=0,l=Math.min(e.length,t.length);c<l;++c)if((s=e[c])!==(a=t[c])){if(r?r(s)!==r(a):s.id!==a.id){0!==c&&(e=e.slice(c),t=t.slice(c));break}i.push(s),o.push(a)}if(c===l){if(c<e.length)for(;c<e.length;)n.push(e[c]),++c;else if(c<t.length)for(;c<t.length;)A.push(t[c]),++c}else{for(var g={},f={},h=0,p=e.length;h<p;++h)s=e[h],g[u=r?r(s):s.id]=e[h];for(var d=0,I=t.length;d<I;++d)a=t[d],s=g[u=r?r(a):a.id],f[u]=a,s?s!==a&&(i.push(s),o.push(a)):A.push(a);for(var y=0,C=e.length;y<C;++y)s=e[y],(a=f[u=r?r(s):s.id])||n.push(s)}}return{removed:n,updatedOld:i,updatedNew:o,added:A}}};t.default=i},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0});var i={CoreCustomContext:!0,CoreParamModelAssemblyBackup:!0,CoreParamModelBackup:!0};Object.defineProperty(t,"CoreCustomContext",{enumerable:!0,get:function(){return A.default}}),Object.defineProperty(t,"CoreParamModelAssemblyBackup",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"CoreParamModelBackup",{enumerable:!0,get:function(){return u.default}});var o=r(1954);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}));var A=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var r=l(t);if(r&&r.has(e))return r.get(e);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var A in e)if("default"!==A&&Object.prototype.hasOwnProperty.call(e,A)){var a=o?Object.getOwnPropertyDescriptor(e,A):null;a&&(a.get||a.set)?Object.defineProperty(i,A,a):i[A]=e[A]}i.default=e,r&&r.set(e,i);return i}(r(208));Object.keys(A).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===A[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return A[e]}}))}));var a=r(1959);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}));var s=c(r(704)),u=c(r(705));function c(e){return e&&e.__esModule?e:{default:e}}function l(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(l=function(e){return e?r:t})(e)}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0});var i={DoorHoleData:!0,InnerFrameData:!0,MeshData:!0,ParamData:!0,ParamModelData:!0,ParamModelGroupData:!0,BaseParamModelData:!0};Object.defineProperty(t,"BaseParamModelData",{enumerable:!0,get:function(){return B.default}}),Object.defineProperty(t,"DoorHoleData",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"InnerFrameData",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"MeshData",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(t,"ParamData",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(t,"ParamModelData",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"ParamModelGroupData",{enumerable:!0,get:function(){return I.default}});var o=r(1955);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}));var A=r(1073);Object.keys(A).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===A[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return A[e]}}))}));var a=m(r(1075));Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}));var s=r(1078);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===s[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}}))}));var u=m(r(1079));Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===u[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}}))}));var c=r(1956);Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===c[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}}))}));var l=r(1957);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===l[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}}))}));var g=m(r(1081));Object.keys(g).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===g[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return g[e]}}))}));var f=m(r(350));Object.keys(f).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===f[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return f[e]}}))}));var h=r(1088);Object.keys(h).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===h[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return h[e]}}))}));var p=r(1089);Object.keys(p).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===p[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return p[e]}}))}));var d=m(r(703));Object.keys(d).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===d[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return d[e]}}))}));var I=m(r(702));Object.keys(I).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===I[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return I[e]}}))}));var y=r(1958);Object.keys(y).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===y[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return y[e]}}))}));var C=r(1082);Object.keys(C).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===C[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return C[e]}}))}));var E,B=(E=r(1072))&&E.__esModule?E:{default:E};function v(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(v=function(e){return e?r:t})(e)}function m(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var r=v(t);if(r&&r.has(e))return r.get(e);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var A in e)if("default"!==A&&Object.prototype.hasOwnProperty.call(e,A)){var a=o?Object.getOwnPropertyDescriptor(e,A):null;a&&(a.get||a.set)?Object.defineProperty(i,A,a):i[A]=e[A]}return i.default=e,r&&r.set(e,i),i}},function(e,t,r){},function(e,t,r){},function(e,t,r){},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(o=i.key,A=void 0,A=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!==n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"===n(A)?A:String(A)),i)}var o,A}function o(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}Object.defineProperty(t,"__esModule",{value:!0}),t.RuleLimitData=void 0;var A=o((function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}));t.RuleLimitData=A},function(e,t,r){},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0});var i={InnerFrame:!0,DoorHole:!0,FitRule:!0,IntersectBox:!0,ParamPackage:!0,AutoGenerateConfig:!0,NamedValue:!0,ParamModelAttached:!0,IParamModelAttachedPartialPb:!0};Object.defineProperty(t,"AutoGenerateConfig",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(t,"DoorHole",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"FitRule",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"IParamModelAttachedPartialPb",{enumerable:!0,get:function(){return I.IParamModelAttachedPartialPb}}),Object.defineProperty(t,"InnerFrame",{enumerable:!0,get:function(){return A.default}}),Object.defineProperty(t,"IntersectBox",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"NamedValue",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"ParamModelAttached",{enumerable:!0,get:function(){return I.default}}),Object.defineProperty(t,"ParamPackage",{enumerable:!0,get:function(){return g.default}});var o=r(1961);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===o[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}}))}));var A=E(r(1080));Object.keys(A).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===A[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return A[e]}}))}));var a=r(1074);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===a[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}}))}));var s=E(r(699));Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===s[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}}))}));var u=E(r(516));Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===u[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return u[e]}}))}));var c=r(1962);Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===c[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}}))}));var l=E(r(1085));Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===l[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}}))}));var g=E(r(518));Object.keys(g).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===g[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return g[e]}}))}));var f=r(519);Object.keys(f).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===f[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return f[e]}}))}));var h=r(1083);Object.keys(h).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===h[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return h[e]}}))}));var p=y(r(1084)),d=y(r(1963)),I=E(r(428));function y(e){return e&&e.__esModule?e:{default:e}}function C(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(C=function(e){return e?r:t})(e)}function E(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var r=C(t);if(r&&r.has(e))return r.get(e);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var A in e)if("default"!==A&&Object.prototype.hasOwnProperty.call(e,A)){var a=o?Object.getOwnPropertyDescriptor(e,A):null;a&&(a.get||a.set)?Object.defineProperty(i,A,a):i[A]=e[A]}return i.default=e,r&&r.set(e,i),i}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"RevitArc3",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"RevitCurve3",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"RevitLine3",{enumerable:!0,get:function(){return A.default}}),Object.defineProperty(t,"RevitShape3",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"deltaTransformPoint",{enumerable:!0,get:function(){return o.deltaTransformPoint}});var i=u(r(700)),o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var r=s(t);if(r&&r.has(e))return r.get(e);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var A in e)if("default"!==A&&Object.prototype.hasOwnProperty.call(e,A)){var a=o?Object.getOwnPropertyDescriptor(e,A):null;a&&(a.get||a.set)?Object.defineProperty(i,A,a):i[A]=e[A]}i.default=e,r&&r.set(e,i);return i}(r(1076)),A=u(r(517)),a=u(r(1077));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(s=function(e){return e?r:t})(e)}function u(e){return e&&e.__esModule?e:{default:e}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GeoReferenceType=t.GeoReferencePointData=t.GeoReferenceFaceData=t.GeoReferenceExtrusionData=t.GeoReferenceCurveData=t.GRPSurfaceData=t.GRPExtrusionData=t.GRPCurveData=t.BaseGeoReferenceData=void 0,t.parseGeoReferenceData=function(e){var t,r=Object.assign(Object.assign({},e),{value:JSON.parse(e.value)});switch(r.type){case C.CCS3D:t=(0,n.deserialize)(_,r);break;case C.CURVES:t=(0,n.deserialize)(S,r);break;case C.FACE:t=(0,n.deserialize)(w,r);break;case C.EXTRUSION:t=(0,n.deserialize)(D,r);break;default:t=(0,n.deserialize)(b,r)}return t},t.transformLocalGRPToWorldGRP=function(e,t){e instanceof _?e.value=function(e,t){var r=e.toCCS();return r.transform(t),new i.CCS3dData(r)}(e.value,t):e instanceof S?e.value=R(e.value,t):e instanceof w?e.value=function(e,t){var r,n=e.surface.toSurface();n.transform(t),r=n instanceof i.Plane?new i.PlaneData(n):n instanceof i.CylindricalSurface?new i.CylindricalSurfaceData(n):n instanceof i.SurfaceOfLinearExtrusion?new i.SurfaceOfLinearExtrusionData(n):new i.SurfaceData(n);return e.surface=r,e.outLoop=R(e.outLoop,t),e.innerLoops=e.innerLoops.map((function(e){return R(e,t)})),e}(e.value,t):e instanceof D&&(e.value=function(e,t){var r=e.matrix.toMatrix();return r.premultiply(t),e.matrix=new i.Matrix4Data(r),e}(e.value,t));return e};var n=r(17),i=r(3);function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&A(e,t)}function A(e,t){return(A=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function a(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=u(e);if(t){var i=u(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return s(this,r)}}function s(e,t){if(t&&("object"===f(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(i=n.key,o=void 0,o=function(e,t){if("object"!==f(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==f(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(i,"string"),"symbol"===f(o)?o:String(o)),n)}var i,o}function l(e,t,r){return t&&c(e.prototype,t),r&&c(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function g(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var h,p,d,I,y,C,E=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":f(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},B=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":f(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};t.GeoReferenceType=C,function(e){e.CCS3D="CCS3D",e.CURVES="CURVES",e.FACE="FACE",e.EXTRUSION="EXTRUSION"}(C||(t.GeoReferenceType=C={}));var v=l((function e(){g(this,e)}));t.GRPCurveData=v,E([(0,n.JsonProperty)({class:i.BoundedCurve3dData,converter:i.DataConverter.BoundedCurve3dDatasConverter}),B("design:type",Array)],v.prototype,"curves",void 0);var m=l((function e(){g(this,e)}));t.GRPSurfaceData=m,E([(0,n.JsonProperty)({converter:i.DataConverter.SurfaceDataConverter}),B("design:type","function"==typeof(h=void 0!==i.SurfaceData&&i.SurfaceData)?h:Object)],m.prototype,"surface",void 0),E([(0,n.JsonProperty)(),B("design:type",v)],m.prototype,"outLoop",void 0),E([(0,n.JsonProperty)({class:v,default:[]}),B("design:type",Array)],m.prototype,"innerLoops",void 0);var Q=l((function e(){g(this,e)}));t.GRPExtrusionData=Q,E([(0,n.JsonProperty)(),B("design:type","function"==typeof(p=void 0!==i.Matrix4Data&&i.Matrix4Data)?p:Object)],Q.prototype,"matrix",void 0),E([(0,n.JsonProperty)(),B("design:type",Number)],Q.prototype,"distance",void 0),E([(0,n.JsonProperty)(),B("design:type","function"==typeof(d=void 0!==i.GeomFace2dData&&i.GeomFace2dData)?d:Object)],Q.prototype,"face",void 0);var b=l((function e(){g(this,e)}));t.BaseGeoReferenceData=b,E([(0,n.JsonProperty)({default:""}),B("design:type",String)],b.prototype,"id",void 0),E([(0,n.JsonProperty)({default:""}),B("design:type",String)],b.prototype,"name",void 0),E([(0,n.JsonProperty)(),B("design:type",String)],b.prototype,"type",void 0),E([(0,n.JsonProperty)(),B("design:type",String)],b.prototype,"businessType",void 0),E([(0,n.JsonProperty)({default:new Map}),B("design:type","function"==typeof(I="undefined"!=typeof Map&&Map)?I:Object)],b.prototype,"data",void 0);var _=function(e){o(r,e);var t=a(r);function r(){return g(this,r),t.apply(this,arguments)}return l(r)}(b);t.GeoReferencePointData=_,E([(0,n.JsonProperty)(),B("design:type","function"==typeof(y=void 0!==i.CCS3dData&&i.CCS3dData)?y:Object)],_.prototype,"value",void 0);var S=function(e){o(r,e);var t=a(r);function r(){return g(this,r),t.apply(this,arguments)}return l(r)}(b);t.GeoReferenceCurveData=S,E([(0,n.JsonProperty)({class:v}),B("design:type",v)],S.prototype,"value",void 0);var w=function(e){o(r,e);var t=a(r);function r(){return g(this,r),t.apply(this,arguments)}return l(r)}(b);t.GeoReferenceFaceData=w,E([(0,n.JsonProperty)(),B("design:type",m)],w.prototype,"value",void 0);var D=function(e){o(r,e);var t=a(r);function r(){return g(this,r),t.apply(this,arguments)}return l(r)}(b);function R(e,t){return e.curves=e.curves.map((function(e){var r=e.toCurve();return r.transform(t),r instanceof i.Arc3d?new i.Arc3dData(r):r instanceof i.LineSeg3d?new i.LineSeg3dData(r):new i.BoundedCurve3dData(r)})),e}t.GeoReferenceExtrusionData=D,E([(0,n.JsonProperty)(),B("design:type",Q)],D.prototype,"value",void 0)},function(e,t,r){},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isCoreParamModel=function(e){return e instanceof n.default},t.isCoreParamModelAssembly=function(e){return e instanceof i.default};var n=o(r(107)),i=o(r(421));function o(e){return e&&e.__esModule?e:{default:e}}},function(e,t,r){"use strict";e.exports=function(){}},function(e,t,r){"use strict";var n=r(1967),i=Math.abs,o=Math.floor;e.exports=function(e){return isNaN(e)?0:0!==(e=Number(e))&&isFinite(e)?n(e)*o(i(e)):e}},function(e,t,r){"use strict";e.exports=r(1968)()?Math.sign:r(1969)},function(e,t,r){"use strict";e.exports=function(){var e=Math.sign;return"function"==typeof e&&(1===e(10)&&-1===e(-20))}},function(e,t,r){"use strict";e.exports=function(e){return e=Number(e),isNaN(e)||0===e?e:e>0?1:-1}},function(e,t,r){"use strict";var n=r(234),i=r(520),o=r(279),A=r(1972),a=r(1091);e.exports=function e(t){var r,s,u;if(n(t),(r=Object(arguments[1])).async&&r.promise)throw new Error("Options 'async' and 'promise' cannot be used together");return hasOwnProperty.call(t,"__memoized__")&&!r.force?t:(s=a(r.length,t.length,r.async&&o.async),u=A(t,s,r),i(o,(function(e,t){r[t]&&e(r[t],u,r)})),e.__profiler__&&e.__profiler__(u),u.updateEnv(),u.memoized)}},function(e,t,r){"use strict";var n=r(234),i=r(351),o=Function.prototype.bind,A=Function.prototype.call,a=Object.keys,s=Object.prototype.propertyIsEnumerable;e.exports=function(e,t){return function(r,u){var c,l=arguments[2],g=arguments[3];return r=Object(i(r)),n(u),c=a(r),g&&c.sort("function"==typeof g?o.call(g,r):void 0),"function"!=typeof e&&(e=c[e]),A.call(e,c,(function(e,n){return s.call(r,e)?A.call(u,l,r[e],e,r,n):t}))}}},function(e,t,r){"use strict";var n=r(1973),i=r(1093),o=r(280),A=r(1987).methods,a=r(1988),s=r(2004),u=Function.prototype.apply,c=Function.prototype.call,l=Object.create,g=Object.defineProperties,f=A.on,h=A.emit;e.exports=function(e,t,r){var A,p,d,I,y,C,E,B,v,m,Q,b,_,S,w,D=l(null);return p=!1!==t?t:isNaN(e.length)?1:e.length,r.normalizer&&(m=s(r.normalizer),d=m.get,I=m.set,y=m.delete,C=m.clear),null!=r.resolvers&&(w=a(r.resolvers)),S=d?i((function(t){var r,i,o=arguments;if(w&&(o=w(o)),null!==(r=d(o))&&hasOwnProperty.call(D,r))return Q&&A.emit("get",r,o,this),D[r];if(i=1===o.length?c.call(e,this,o[0]):u.call(e,this,o),null===r){if(null!==(r=d(o)))throw n("Circular invocation","CIRCULAR_INVOCATION");r=I(o)}else if(hasOwnProperty.call(D,r))throw n("Circular invocation","CIRCULAR_INVOCATION");return D[r]=i,b&&A.emit("set",r,null,i),i}),p):0===t?function(){var t;if(hasOwnProperty.call(D,"data"))return Q&&A.emit("get","data",arguments,this),D.data;if(t=arguments.length?u.call(e,this,arguments):c.call(e,this),hasOwnProperty.call(D,"data"))throw n("Circular invocation","CIRCULAR_INVOCATION");return D.data=t,b&&A.emit("set","data",null,t),t}:function(t){var r,i,o=arguments;if(w&&(o=w(arguments)),i=String(o[0]),hasOwnProperty.call(D,i))return Q&&A.emit("get",i,o,this),D[i];if(r=1===o.length?c.call(e,this,o[0]):u.call(e,this,o),hasOwnProperty.call(D,i))throw n("Circular invocation","CIRCULAR_INVOCATION");return D[i]=r,b&&A.emit("set",i,null,r),r},A={original:e,memoized:S,profileName:r.profileName,get:function(e){return w&&(e=w(e)),d?d(e):String(e[0])},has:function(e){return hasOwnProperty.call(D,e)},delete:function(e){var t;hasOwnProperty.call(D,e)&&(y&&y(e),t=D[e],delete D[e],_&&A.emit("delete",e,t))},clear:function(){var e=D;C&&C(),D=l(null),A.emit("clear",e)},on:function(e,t){return"get"===e?Q=!0:"set"===e?b=!0:"delete"===e&&(_=!0),f.call(this,e,t)},emit:h,updateEnv:function(){e=A.original}},E=d?i((function(e){var t,r=arguments;w&&(r=w(r)),null!==(t=d(r))&&A.delete(t)}),p):0===t?function(){return A.delete("data")}:function(e){return w&&(e=w(arguments)[0]),A.delete(e)},B=i((function(){var e,r=arguments;return 0===t?D.data:(w&&(r=w(r)),e=d?d(r):String(r[0]),D[e])})),v=i((function(){var e,r=arguments;return 0===t?A.has("data"):(w&&(r=w(r)),null!==(e=d?d(r):String(r[0]))&&A.has(e))})),g(S,{__memoized__:o(!0),delete:o(E),clear:o(A.clear),_get:o(B),_has:o(v)}),A}},function(e,t,r){"use strict";var n=r(1092),i=r(1979),o=r(277),A=Error.captureStackTrace;e.exports=function(t){var r=new Error(t),a=arguments[1],s=arguments[2];return o(s)||i(a)&&(s=a,a=null),o(s)&&n(r,s),o(a)&&(r.code=a),A&&A(r,e.exports),r}},function(e,t,r){"use strict";e.exports=function(){var e,t=Object.assign;return"function"==typeof t&&(t(e={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),e.foo+e.bar+e.trzy==="razdwatrzy")}},function(e,t,r){"use strict";var n=r(1976),i=r(351),o=Math.max;e.exports=function(e,t){var r,A,a,s=o(arguments.length,2);for(e=Object(i(e)),a=function(n){try{e[n]=t[n]}catch(e){r||(r=e)}},A=1;A<s;++A)n(t=arguments[A]).forEach(a);if(void 0!==r)throw r;return e}},function(e,t,r){"use strict";e.exports=r(1977)()?Object.keys:r(1978)},function(e,t,r){"use strict";e.exports=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}},function(e,t,r){"use strict";var n=r(277),i=Object.keys;e.exports=function(e){return i(n(e)?Object(e):e)}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=r(277),o={function:!0,object:!0};e.exports=function(e){return i(e)&&o[n(e)]||!1}},function(e,t,r){"use strict";var n=r(1981),i=/^\s*class[\s{/}]/,o=Function.prototype.toString;e.exports=function(e){return!!n(e)&&!i.test(o.call(e))}},function(e,t,r){"use strict";var n=r(1982);e.exports=function(e){if("function"!=typeof e)return!1;if(!hasOwnProperty.call(e,"length"))return!1;try{if("number"!=typeof e.length)return!1;if("function"!=typeof e.call)return!1;if("function"!=typeof e.apply)return!1}catch(e){return!1}return!n(e)}},function(e,t,r){"use strict";var n=r(1983);e.exports=function(e){if(!n(e))return!1;try{return!!e.constructor&&e.constructor.prototype===e}catch(e){return!1}}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=r(1095),o={object:!0,function:!0,undefined:!0};e.exports=function(e){return!!i(e)&&hasOwnProperty.call(o,n(e))}},function(e,t,r){"use strict";e.exports=r(1985)()?String.prototype.contains:r(1986)},function(e,t,r){"use strict";var n="razdwatrzy";e.exports=function(){return"function"==typeof n.contains&&(!0===n.contains("dwa")&&!1===n.contains("foo"))}},function(e,t,r){"use strict";var n=String.prototype.indexOf;e.exports=function(e){return n.call(this,e,arguments[1])>-1}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i,o,A,a,s,u,c,l=r(280),g=r(234),f=Function.prototype.apply,h=Function.prototype.call,p=Object.create,d=Object.defineProperty,I=Object.defineProperties,y=Object.prototype.hasOwnProperty,C={configurable:!0,enumerable:!1,writable:!0};o=function(e,t){var r,n;return g(t),n=this,i.call(this,e,r=function(){A.call(n,e,r),f.call(t,this,arguments)}),r.__eeOnceListener__=t,this},s={on:i=function(e,t){var r;return g(t),y.call(this,"__ee__")?r=this.__ee__:(r=C.value=p(null),d(this,"__ee__",C),C.value=null),r[e]?"object"===n(r[e])?r[e].push(t):r[e]=[r[e],t]:r[e]=t,this},once:o,off:A=function(e,t){var r,i,o,A;if(g(t),!y.call(this,"__ee__"))return this;if(!(r=this.__ee__)[e])return this;if("object"===n(i=r[e]))for(A=0;o=i[A];++A)o!==t&&o.__eeOnceListener__!==t||(2===i.length?r[e]=i[A?0:1]:i.splice(A,1));else i!==t&&i.__eeOnceListener__!==t||delete r[e];return this},emit:a=function(e){var t,r,i,o,A;if(y.call(this,"__ee__")&&(o=this.__ee__[e]))if("object"===n(o)){for(r=arguments.length,A=new Array(r-1),t=1;t<r;++t)A[t-1]=arguments[t];for(o=o.slice(),t=0;i=o[t];++t)f.call(i,this,A)}else switch(arguments.length){case 1:h.call(o,this);break;case 2:h.call(o,this,arguments[1]);break;case 3:h.call(o,this,arguments[1],arguments[2]);break;default:for(r=arguments.length,A=new Array(r-1),t=1;t<r;++t)A[t-1]=arguments[t];f.call(o,this,A)}}},u={on:l(i),once:l(o),off:l(A),emit:l(a)},c=I({},u),e.exports=t=function(e){return null==e?p(c):I(Object(e),u)},t.methods=s},function(e,t,r){"use strict";var n,i=r(1989),o=r(277),A=r(234),a=Array.prototype.slice;n=function(e){return this.map((function(t,r){return t?t(e[r]):e[r]})).concat(a.call(e,this.length))},e.exports=function(e){return(e=i(e)).forEach((function(e){o(e)&&A(e)})),n.bind(e)}},function(e,t,r){"use strict";var n=r(706),i=Array.isArray;e.exports=function(e){return i(e)?e:n(e)}},function(e,t,r){"use strict";e.exports=function(){var e,t,r=Array.from;return"function"==typeof r&&(t=r(e=["raz","dwa"]),Boolean(t&&t!==e&&"dwa"===t[1]))}},function(e,t,r){"use strict";var n=r(1992).iterator,i=r(2001),o=r(2002),A=r(278),a=r(234),s=r(351),u=r(277),c=r(2003),l=Array.isArray,g=Function.prototype.call,f={configurable:!0,enumerable:!0,writable:!0,value:null},h=Object.defineProperty;e.exports=function(e){var t,r,p,d,I,y,C,E,B,v,m=arguments[1],Q=arguments[2];if(e=Object(s(e)),u(m)&&a(m),this&&this!==Array&&o(this))t=this;else{if(!m){if(i(e))return 1!==(I=e.length)?Array.apply(null,e):((d=new Array(1))[0]=e[0],d);if(l(e)){for(d=new Array(I=e.length),r=0;r<I;++r)d[r]=e[r];return d}}d=[]}if(!l(e))if(void 0!==(B=e[n])){for(C=a(B).call(e),t&&(d=new t),E=C.next(),r=0;!E.done;)v=m?g.call(m,Q,E.value,r):E.value,t?(f.value=v,h(d,r,f)):d[r]=v,E=C.next(),++r;I=r}else if(c(e)){for(I=e.length,t&&(d=new t),r=0,p=0;r<I;++r)v=e[r],r+1<I&&(y=v.charCodeAt(0))>=55296&&y<=56319&&(v+=e[++r]),v=m?g.call(m,Q,v,p):v,t?(f.value=v,h(d,p,f)):d[p]=v,++p;I=p}if(void 0===I)for(I=A(e.length),t&&(d=new t(I)),r=0;r<I;++r)v=m?g.call(m,Q,e[r],r):e[r],t?(f.value=v,h(d,r,f)):d[r]=v;return t&&(f.value=null,d.length=I),d}},function(e,t,r){"use strict";e.exports=r(1993)()?r(521).Symbol:r(1996)},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=r(521),o={object:!0,symbol:!0};e.exports=function(){var e,t=i.Symbol;if("function"!=typeof t)return!1;e=t("test symbol");try{String(e)}catch(e){return!1}return!!o[n(t.iterator)]&&(!!o[n(t.toPrimitive)]&&!!o[n(t.toStringTag)])}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e.exports=function(){return"object"===("undefined"==typeof globalThis?"undefined":n(globalThis))&&(!!globalThis&&globalThis.Array===Array)}},function(e,t){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var n=function(){if("object"===("undefined"==typeof self?"undefined":r(self))&&self)return self;if("object"===("undefined"==typeof window?"undefined":r(window))&&window)return window;throw new Error("Unable to resolve global `this`")};e.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch(e){return n()}try{return __global__||n()}finally{delete Object.prototype.__global__}}()},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i,o,A,a=r(280),s=r(1096),u=r(521).Symbol,c=r(1998),l=r(1999),g=r(2e3),f=Object.create,h=Object.defineProperties,p=Object.defineProperty;if("function"==typeof u)try{String(u()),A=!0}catch(e){}else u=null;o=function(e){if(this instanceof o)throw new TypeError("Symbol is not a constructor");return i(e)},e.exports=i=function e(t){var r;if(this instanceof e)throw new TypeError("Symbol is not a constructor");return A?u(t):(r=f(o.prototype),t=void 0===t?"":String(t),h(r,{__description__:a("",t),__name__:a("",c(t))}))},l(i),g(i),h(o.prototype,{constructor:a(i),toString:a("",(function(){return this.__name__}))}),h(i.prototype,{toString:a((function(){return"Symbol ("+s(this).__description__+")"})),valueOf:a((function(){return s(this)}))}),p(i.prototype,i.toPrimitive,a("",(function(){var e=s(this);return"symbol"===n(e)?e:e.toString()}))),p(i.prototype,i.toStringTag,a("c","Symbol")),p(o.prototype,i.toStringTag,a("c",i.prototype[i.toStringTag])),p(o.prototype,i.toPrimitive,a("c",i.prototype[i.toPrimitive]))},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e.exports=function(e){return!!e&&("symbol"===n(e)||!!e.constructor&&("Symbol"===e.constructor.name&&"Symbol"===e[e.constructor.toStringTag]))}},function(e,t,r){"use strict";var n=r(280),i=Object.create,o=Object.defineProperty,A=Object.prototype,a=i(null);e.exports=function(e){for(var t,r,i=0;a[e+(i||"")];)++i;return a[e+=i||""]=!0,o(A,t="@@"+e,n.gs(null,(function(e){r||(r=!0,o(this,t,n(e)),r=!1)}))),t}},function(e,t,r){"use strict";var n=r(280),i=r(521).Symbol;e.exports=function(e){return Object.defineProperties(e,{hasInstance:n("",i&&i.hasInstance||e("hasInstance")),isConcatSpreadable:n("",i&&i.isConcatSpreadable||e("isConcatSpreadable")),iterator:n("",i&&i.iterator||e("iterator")),match:n("",i&&i.match||e("match")),replace:n("",i&&i.replace||e("replace")),search:n("",i&&i.search||e("search")),species:n("",i&&i.species||e("species")),split:n("",i&&i.split||e("split")),toPrimitive:n("",i&&i.toPrimitive||e("toPrimitive")),toStringTag:n("",i&&i.toStringTag||e("toStringTag")),unscopables:n("",i&&i.unscopables||e("unscopables"))})}},function(e,t,r){"use strict";var n=r(280),i=r(1096),o=Object.create(null);e.exports=function(e){return Object.defineProperties(e,{for:n((function(t){return o[t]?o[t]:o[t]=e(String(t))})),keyFor:n((function(e){var t;for(t in i(e),o)if(o[t]===e)return t}))})}},function(e,t,r){"use strict";var n=Object.prototype.toString,i=n.call(function(){return arguments}());e.exports=function(e){return n.call(e)===i}},function(e,t,r){"use strict";var n=Object.prototype.toString,i=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);e.exports=function(e){return"function"==typeof e&&i(n.call(e))}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=Object.prototype.toString,o=i.call("");e.exports=function(e){return"string"==typeof e||e&&"object"===n(e)&&(e instanceof String||i.call(e)===o)||!1}},function(e,t,r){"use strict";var n=r(234);e.exports=function(e){var t;return"function"==typeof e?{set:e,get:e}:(t={get:n(e.get)},void 0!==e.set?(t.set=n(e.set),e.delete&&(t.delete=n(e.delete)),e.clear&&(t.clear=n(e.clear)),t):(t.set=t.get,t))}},function(e,t,r){"use strict";e.exports=function(e){var t,r,n=e.length;if(!n)return"";for(t=String(e[r=0]);--n;)t+=""+e[++r];return t}},function(e,t,r){"use strict";e.exports=function(e){return e?function(t){for(var r=String(t[0]),n=0,i=e;--i;)r+=""+t[++n];return r}:function(){return""}}},function(e,t,r){"use strict";var n=r(707),i=Object.create;e.exports=function(){var e=0,t=[],r=i(null);return{get:function(e){var r,i=0,o=t,A=e.length;if(0===A)return o[A]||null;if(o=o[A]){for(;i<A-1;){if(-1===(r=n.call(o[0],e[i])))return null;o=o[1][r],++i}return-1===(r=n.call(o[0],e[i]))?null:o[1][r]||null}return null},set:function(i){var o,A=0,a=t,s=i.length;if(0===s)a[s]=++e;else{for(a[s]||(a[s]=[[],[]]),a=a[s];A<s-1;)-1===(o=n.call(a[0],i[A]))&&(o=a[0].push(i[A])-1,a[1].push([[],[]])),a=a[1][o],++A;-1===(o=n.call(a[0],i[A]))&&(o=a[0].push(i[A])-1),a[1][o]=++e}return r[e]=i,e},delete:function(e){var i,o=0,A=t,a=r[e],s=a.length,u=[];if(0===s)delete A[s];else if(A=A[s]){for(;o<s-1;){if(-1===(i=n.call(A[0],a[o])))return;u.push(A,i),A=A[1][i],++o}if(-1===(i=n.call(A[0],a[o])))return;for(e=A[1][i],A[0].splice(i,1),A[1].splice(i,1);!A[0].length&&u.length;)i=u.pop(),(A=u.pop())[0].splice(i,1),A[1].splice(i,1)}delete r[e]},clear:function(){t=[],r=i(null)}}}},function(e,t,r){"use strict";e.exports=r(2009)()?Number.isNaN:r(2010)},function(e,t,r){"use strict";e.exports=function(){var e=Number.isNaN;return"function"==typeof e&&(!e({})&&e(NaN)&&!e(34))}},function(e,t,r){"use strict";e.exports=function(e){return e!=e}},function(e,t,r){"use strict";var n=r(707);e.exports=function(){var e=0,t=[],r=[];return{get:function(e){var i=n.call(t,e[0]);return-1===i?null:r[i]},set:function(n){return t.push(n[0]),r.push(++e),e},delete:function(e){var i=n.call(r,e);-1!==i&&(t.splice(i,1),r.splice(i,1))},clear:function(){t=[],r=[]}}}},function(e,t,r){"use strict";var n=r(707),i=Object.create;e.exports=function(e){var t=0,r=[[],[]],o=i(null);return{get:function(t){for(var i,o=0,A=r;o<e-1;){if(-1===(i=n.call(A[0],t[o])))return null;A=A[1][i],++o}return-1===(i=n.call(A[0],t[o]))?null:A[1][i]||null},set:function(i){for(var A,a=0,s=r;a<e-1;)-1===(A=n.call(s[0],i[a]))&&(A=s[0].push(i[a])-1,s[1].push([[],[]])),s=s[1][A],++a;return-1===(A=n.call(s[0],i[a]))&&(A=s[0].push(i[a])-1),s[1][A]=++t,o[t]=i,t},delete:function(t){for(var i,A=0,a=r,s=[],u=o[t];A<e-1;){if(-1===(i=n.call(a[0],u[A])))return;s.push(a,i),a=a[1][i],++A}if(-1!==(i=n.call(a[0],u[A]))){for(t=a[1][i],a[0].splice(i,1),a[1].splice(i,1);!a[0].length&&s.length;)i=s.pop(),(a=s.pop())[0].splice(i,1),a[1].splice(i,1);delete o[t]}},clear:function(){r=[[],[]],o=i(null)}}}},function(e,t,r){"use strict";var n=r(706),i=r(1097),o=r(1094),A=r(1093),a=r(708),s=Array.prototype.slice,u=Function.prototype.apply,c=Object.create;r(279).async=function(e,t){var r,l,g,f=c(null),h=c(null),p=t.memoized,d=t.original;t.memoized=A((function(e){var t=arguments,n=t[t.length-1];return"function"==typeof n&&(r=n,t=s.call(t,0,-1)),p.apply(l=this,g=t)}),p);try{o(t.memoized,p)}catch(e){}t.on("get",(function(e){var n,i,o;if(r){if(f[e])return"function"==typeof f[e]?f[e]=[f[e],r]:f[e].push(r),void(r=null);n=r,i=l,o=g,r=l=g=null,a((function(){var A;hasOwnProperty.call(h,e)?(A=h[e],t.emit("getasync",e,o,i),u.call(n,A.context,A.args)):(r=n,l=i,g=o,p.apply(i,o))}))}})),t.original=function(){var e,i,o,A;return r?(e=n(arguments),i=function e(r){var i,o,s=e.id;if(null!=s){if(delete e.id,i=f[s],delete f[s],i)return o=n(arguments),t.has(s)&&(r?t.delete(s):(h[s]={context:this,args:o},t.emit("setasync",s,"function"==typeof i?1:i.length))),"function"==typeof i?A=u.call(i,this,o):i.forEach((function(e){A=u.call(e,this,o)}),this),A}else a(u.bind(e,this,arguments))},o=r,r=l=g=null,e.push(i),A=u.call(d,this,e),i.cb=o,r=i,A):u.call(d,this,arguments)},t.on("set",(function(e){r?(f[e]?"function"==typeof f[e]?f[e]=[f[e],r.cb]:f[e].push(r.cb):f[e]=r.cb,delete r.cb,r.id=e,r=null):t.delete(e)})),t.on("delete",(function(e){var r;hasOwnProperty.call(f,e)||h[e]&&(r=h[e],delete h[e],t.emit("deleteasync",e,s.call(r.args,1)))})),t.on("clear",(function(){var e=h;h=c(null),t.emit("clearasync",i(e,(function(e){return s.call(e.args,1)})))}))}},function(e,t,r){(function(e){var n=void 0!==e&&e||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function o(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new o(i.call(setTimeout,n,arguments),clearTimeout)},t.setInterval=function(){return new o(i.call(setInterval,n,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(n,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},r(772),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,r(144))},function(e,t,r){"use strict";var n=r(1097),i=r(2016),o=r(2017),A=r(2019),a=r(1099),s=r(708),u=Object.create,c=i("then","then:finally","done","done:finally");r(279).promise=function(e,t){var r=u(null),i=u(null),l=u(null);if(!0===e)e=null;else if(e=o(e),!c[e])throw new TypeError("'"+A(e)+"' is not valid promise mode");t.on("set",(function(n,o,A){var u=!1;if(!a(A))return i[n]=A,void t.emit("setasync",n,1);r[n]=1,l[n]=A;var c=function(e){var o=r[n];if(u)throw new Error("Memoizee error: Detected unordered then|done & finally resolution, which in turn makes proper detection of success/failure impossible (when in 'done:finally' mode)\nConsider to rely on 'then' or 'done' mode instead.");o&&(delete r[n],i[n]=e,t.emit("setasync",n,o))},g=function(){u=!0,r[n]&&(delete r[n],delete l[n],t.delete(n))},f=e;if(f||(f="then"),"then"===f){var h=function(){s(g)};"function"==typeof(A=A.then((function(e){s(c.bind(this,e))}),h)).finally&&A.finally(h)}else if("done"===f){if("function"!=typeof A.done)throw new Error("Memoizee error: Retrieved promise does not implement 'done' in 'done' mode");A.done(c,g)}else if("done:finally"===f){if("function"!=typeof A.done)throw new Error("Memoizee error: Retrieved promise does not implement 'done' in 'done:finally' mode");if("function"!=typeof A.finally)throw new Error("Memoizee error: Retrieved promise does not implement 'finally' in 'done:finally' mode");A.done(c),A.finally(g)}})),t.on("get",(function(e,n,i){var o;if(r[e])++r[e];else{o=l[e];var A=function(){t.emit("getasync",e,n,i)};a(o)?"function"==typeof o.done?o.done(A):o.then((function(){s(A)})):A()}})),t.on("delete",(function(e){if(delete l[e],r[e])delete r[e];else if(hasOwnProperty.call(i,e)){var n=i[e];delete i[e],t.emit("deleteasync",e,[n])}})),t.on("clear",(function(){var e=i;i=u(null),r=u(null),l=u(null),t.emit("clearasync",n(e,(function(e){return[e]})))}))}},function(e,t,r){"use strict";var n=Array.prototype.forEach,i=Object.create;e.exports=function(e){var t=i(null);return n.call(arguments,(function(e){t[e]=!0})),t}},function(e,t,r){"use strict";var n=r(351),i=r(2018);e.exports=function(e){return i(n(e))}},function(e,t,r){"use strict";var n=r(1098);e.exports=function(e){try{return e&&n(e.toString)?e.toString():String(e)}catch(e){throw new TypeError("Passed argument cannot be stringifed")}}},function(e,t,r){"use strict";var n=r(2020),i=/[\n\r\u2028\u2029]/g;e.exports=function(e){var t=n(e);return t.length>100&&(t=t.slice(0,99)+"…"),t=t.replace(i,(function(e){return JSON.stringify(e).slice(1,-1)}))}},function(e,t,r){"use strict";var n=r(1098);e.exports=function(e){try{return e&&n(e.toString)?e.toString():String(e)}catch(e){return"<Non-coercible to string value>"}}},function(e,t,r){"use strict";var n=r(234),i=r(520),o=r(279),A=Function.prototype.apply;o.dispose=function(e,t,r){var a;if(n(e),r.async&&o.async||r.promise&&o.promise)return t.on("deleteasync",a=function(t,r){A.call(e,null,r)}),void t.on("clearasync",(function(e){i(e,(function(e,t){a(t,e)}))}));t.on("delete",a=function(t,r){e(r)}),t.on("clear",(function(e){i(e,(function(e,t){a(t,e)}))}))}},function(e,t,r){"use strict";var n=r(706),i=r(520),o=r(708),A=r(1099),a=r(2023),s=r(279),u=Function.prototype,c=Math.max,l=Math.min,g=Object.create;s.maxAge=function(e,t,r){var f,h,p,d;(e=a(e))&&(f=g(null),h=r.async&&s.async||r.promise&&s.promise?"async":"",t.on("set"+h,(function(r){f[r]=setTimeout((function(){t.delete(r)}),e),"function"==typeof f[r].unref&&f[r].unref(),d&&(d[r]&&"nextTick"!==d[r]&&clearTimeout(d[r]),d[r]=setTimeout((function(){delete d[r]}),p),"function"==typeof d[r].unref&&d[r].unref())})),t.on("delete"+h,(function(e){clearTimeout(f[e]),delete f[e],d&&("nextTick"!==d[e]&&clearTimeout(d[e]),delete d[e])})),r.preFetch&&(p=!0===r.preFetch||isNaN(r.preFetch)?.333:c(l(Number(r.preFetch),1),0))&&(d={},p=(1-p)*e,t.on("get"+h,(function(e,i,a){d[e]||(d[e]="nextTick",o((function(){var o;"nextTick"===d[e]&&(delete d[e],t.delete(e),r.async&&(i=n(i)).push(u),o=t.memoized.apply(a,i),r.promise&&A(o)&&("function"==typeof o.done?o.done(u,u):o.then(u,u)))})))}))),t.on("clear"+h,(function(){i(f,(function(e){clearTimeout(e)})),f={},d&&(i(d,(function(e){"nextTick"!==e&&clearTimeout(e)})),d={})})))}},function(e,t,r){"use strict";var n=r(278),i=r(2024);e.exports=function(e){if((e=n(e))>i)throw new TypeError(e+" exceeds maximum possible timeout");return e}},function(e,t,r){"use strict";e.exports=2147483647},function(e,t,r){"use strict";var n=r(278),i=r(2026),o=r(279);o.max=function(e,t,r){var A,a,s;(e=n(e))&&(a=i(e),A=r.async&&o.async||r.promise&&o.promise?"async":"",t.on("set"+A,s=function(e){void 0!==(e=a.hit(e))&&t.delete(e)}),t.on("get"+A,s),t.on("delete"+A,a.delete),t.on("clear"+A,a.clear))}},function(e,t,r){"use strict";var n=r(278),i=Object.create,o=Object.prototype.hasOwnProperty;e.exports=function(e){var t,r=0,A=1,a=i(null),s=i(null),u=0;return e=n(e),{hit:function(n){var i=s[n],c=++u;if(a[c]=n,s[n]=c,!i){if(++r<=e)return;return n=a[A],t(n),n}if(delete a[i],A===i)for(;!o.call(a,++A););},delete:t=function(e){var t=s[e];if(t&&(delete a[t],delete s[e],--r,A===t)){if(!r)return u=0,void(A=1);for(;!o.call(a,++A););}},clear:function(){r=0,A=1,a=i(null),s=i(null),u=0}}}},function(e,t,r){"use strict";var n=r(280),i=r(279),o=Object.create,A=Object.defineProperties;i.refCounter=function(e,t,r){var a,s;a=o(null),s=r.async&&i.async||r.promise&&i.promise?"async":"",t.on("set"+s,(function(e,t){a[e]=t||1})),t.on("get"+s,(function(e){++a[e]})),t.on("delete"+s,(function(e){delete a[e]})),t.on("clear"+s,(function(){a={}})),A(t.memoized,{deleteRef:n((function(){var e=t.get(arguments);return null===e?null:a[e]?!--a[e]&&(t.delete(e),!0):null})),getRefCount:n((function(){var e=t.get(arguments);return null===e?0:a[e]?a[e]:0}))})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionContext=t.START_ID=void 0;var n=r(349),i=r(288),o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var r=A(t);if(r&&r.has(e))return r.get(e);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var s=i?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(n,o,s):n[o]=e[o]}n.default=e,r&&r.set(e,n);return n}(r(2029));function A(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(A=function(e){return e?r:t})(e)}function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(i=n.key,o=void 0,o=function(e,t){if("object"!==a(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(i,"string"),"symbol"===a(o)?o:String(o)),n)}var i,o}t.START_ID="-1";var u=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.maxBackupStep=25,this.getCurrentId=function(){return t.undoStack.length>0?t.undoStack[t.undoStack.length-1].getId():"-1"},this.invalidUseCounter=0,this.undoStack=[],this.redoStack=[],this.status=o.TransactionStatus.None,this.cachedRecorder=new o.default,this.createRecorder()}var t,r,A;return t=e,(r=[{key:"setMaxBackupStep",value:function(e){if(e<1)throw Error("MaxBackupStep must not smaller than 1");this.maxBackupStep=e,this.undoStack.length>=this.maxBackupStep&&this.undoStack.splice(0,this.undoStack.length-this.maxBackupStep)}},{key:"createRecorder",value:function(){return this.activeRecorder=new o.default,this.activeRecorder}},{key:"record",value:function(e,t,r){this.status!==o.TransactionStatus.Rollback&&this.activeRecorder.record(e,t,r)}},{key:"getStatus",value:function(){return this.status}},{key:"openRecorder",value:function(){this.clearRedoStack(),this.status=o.TransactionStatus.Open,this.createRecorder()}},{key:"getMergedRecorder",value:function(){var e=new o.default;return this.useCachedRecorder&&this.cachedRecorder.mergeTo(e),this.undoStack.forEach((function(t){return t.mergeTo(e)})),e}},{key:"mergeRecorder",value:function(){!this.activeRecorder.isEmpty()&&this.undoStack.length>0&&this.activeRecorder.mergeTo(this.undoStack[this.undoStack.length-1]),this.createRecorder(),this.console("mergeTransaction")}},{key:"commitRecorder",value:function(e){var t=this;if(this.undoStack.length>=this.maxBackupStep){var r=this.undoStack.splice(0,this.undoStack.length-this.maxBackupStep+1);this.useCachedRecorder&&r.forEach((function(e){return e.mergeTo(t.cachedRecorder)}))}e&&e.mergeTo(this.activeRecorder),this.activeRecorder.isEmpty()||this.undoStack.push(this.activeRecorder),this.openRecorder(),this.console("commitTransaction")}},{key:"isActiveRecorderEmpty",value:function(){return this.activeRecorder.isEmpty()}},{key:"revert",value:function(){this.status=o.TransactionStatus.Rollback,this.activeRecorder.recover(),this.status=o.TransactionStatus.None,this.createRecorder(),this.console("revert")}},{key:"undo",value:function(){if(0===this.undoStack.length)return!1;this.createRecorder(),this.status=o.TransactionStatus.Undo;var e=this.undoStack.pop();return e.recover(),this.status=o.TransactionStatus.None,this.activeRecorder.setId(e.getId()),this.redoStack.push(this.activeRecorder),this.createRecorder(),this.console("undo"),!0}},{key:"redo",value:function(){if(0===this.redoStack.length)return!1;this.createRecorder(),this.status=o.TransactionStatus.Redo;var e=this.redoStack.pop();return e.recover(),this.status=o.TransactionStatus.None,this.activeRecorder.setId(e.getId()),this.undoStack.push(this.activeRecorder),this.createRecorder(),this.console("redo"),!0}},{key:"console",value:function(e){(0,i.devLog)({type:e,undoStack:this.undoStack,redo:this.redoStack})}},{key:"clearRedoStack",value:function(){this.redoStack.length=0}},{key:"clear",value:function(){this.redoStack.length=0,this.undoStack.length=0,this.createRecorder()}},{key:"empty",value:function(){return 0===this.redoStack.length&&0===this.undoStack.length}},{key:"undoToRecorder",value:function(e){var t=0;if("-1"===e)t=this.undoStack.length;else{var r=this.undoStack.findIndex((function(t){return t.getId()===e}));r>-1&&(t=this.undoStack.length-r-1)}if(0===t)return!1;for(var i=0;i<t;i++)if(!this.undo())return n.LOGGER.logError(new Error("Transaction undoToRecorder error")),!1;return!0}},{key:"redoToRecorder",value:function(e){var t=0,r=this.redoStack.findIndex((function(t){return t.getId()===e}));if(r>-1&&(t=this.redoStack.length-r),0===t)return!1;for(var i=0;i<t;i++)if(!this.redo())return n.LOGGER.logError(new Error("Transaction redoToRecorder error ".concat(e))),!1;return!0}},{key:"getActiveRecorderId",value:function(){return this.activeRecorder.getId()}},{key:"setActiveRecorder",value:function(e){var t=this;this.invalidUseCounter>0&&n.LOGGER.logError(new Error("invalid use setActiveRecorder"));var r=this.undoStack.find((function(t){return t.getId()===e})),i=this.activeRecorder;return r&&(this.activeRecorder=r),this.invalidUseCounter++,function(){t.invalidUseCounter--,t.activeRecorder=i}}}])&&s(t.prototype,r),A&&s(t,A),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.TransactionContext=u},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.TransactionStatus=void 0;var n,i=(n=r(532))&&n.__esModule?n:{default:n},o=r(2030);function A(e,t){return(A=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function a(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=u(e);if(t){var i=u(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return s(this,r)}}function s(e,t){if(t&&("object"===c(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(i=n.key,o=void 0,o=function(e,t){if("object"!==c(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(i,"string"),"symbol"===c(o)?o:String(o)),n)}var i,o}function f(e,t,r){return t&&g(e.prototype,t),r&&g(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}var h,p=function(){function e(){l(this,e),this.records=new Map,this.updater={update:function(e,t,r){e[t]=r}}}return f(e,[{key:"record",value:function(e,t,r){var n=this.records.get(e);n||(n=new Map,this.records.set(e,n)),n.has(t)||n.set(t,r)}},{key:"recover",value:function(){var e=this;this.records.forEach((function(t,r){t.forEach((function(t,n){var i=t.update||e.updater.update;r.applyRecover&&!r.applyRecover()||i(r,n,t.preValue)}))}))}},{key:"isEmpty",value:function(){return 0===this.records.size}},{key:"mergeTo",value:function(e){this.records.forEach((function(t,r){t.forEach((function(t,n){e.record(r,n,t)}))}))}}]),e}();t.TransactionStatus=h,function(e){e[e.None=0]="None",e[e.Open=1]="Open",e[e.Undo=2]="Undo",e[e.Redo=3]="Redo",e[e.Rollback=4]="Rollback"}(h||(t.TransactionStatus=h={}));var d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&A(e,t)}(r,e);var t=a(r);function r(){return l(this,r),t.apply(this,arguments)}return f(r)}((0,i.default)(p,(0,o.numericId)()));t.default=d},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.numericId=function(){var e=1;return function(){return(e++).toString()}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1101),i=r(1102),o=r(1103),A=r(2032),a=r(1104),s=r(1105),u=r(1106),c=r(1107),l=r(1108);t.BrepDataTranslators={EDGE_DATA:new n.EdgeDataTranslator,EDGE2_DATA:new i.Edge2DataTranslator,FACE_DATA:new o.FaceDataTranslator,HALF_EDGE_DATA:new a.HalfEdgeDataTranslator,LOOP_DATA:new s.LoopDataTranslator,META_DATA:new u.MetaDataTranslator,SHELL_DATA:new c.ShellDataTranslator,VERTEX_DATA:new l.VertexDataTranslator,GENERAL_DATA:new A.GeneralDataTranslator,GENERAL_DATA_LIST:new A.GeneralDataListTranslator}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==n(t)&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=r(3),u=r(67),c=r(711),l=r(422),g=r(353),f=r(284),h=r(354),p=r(239),d=r(522),I=r(423),y=r(1101),C=r(1102),E=r(1103),B=r(1104),v=r(1105),m=r(1106),Q=r(1107),b=r(1108),_=function(e){function t(){return o(this,t),A(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),i(t,[{key:"realTo",value:function(e){var t=new u.brep.PBGeneralData;if(e instanceof I.VertexData)t.vertexData=(new b.VertexDataTranslator).to(e);else if(e instanceof f.HalfEdgeData)t.halfEdgeData=(new B.HalfEdgeDataTranslator).to(e);else if(e instanceof l.Edge2Data)t.edge2Data=(new C.Edge2DataTranslator).to(e);else if(e instanceof h.LoopData)t.loopData=(new v.LoopDataTranslator).to(e);else if(e instanceof c.EdgeData)t.edgeData=(new y.EdgeDataTranslator).to(e);else if(e instanceof g.FaceData)t.faceData=(new E.FaceDataTranslator).to(e);else if(e instanceof d.ShellData)t.shellData=(new Q.ShellDataTranslator).to(e);else{if(!(e instanceof p.MetaData))throw"not supported";t.metaData=(new m.MetaDataTranslator).to(e)}return t}},{key:"realFrom",value:function(e){if(e.vertexData)return(new b.VertexDataTranslator).from(e.vertexData);if(e.halfEdgeData)return(new B.HalfEdgeDataTranslator).from(e.halfEdgeData);if(e.edge2Data)return(new C.Edge2DataTranslator).from(e.edge2Data);if(e.loopData)return(new v.LoopDataTranslator).from(e.loopData);if(e.edgeData)return(new y.EdgeDataTranslator).from(e.edgeData);if(e.faceData)return(new E.FaceDataTranslator).from(e.faceData);if(e.shellData)return(new Q.ShellDataTranslator).from(e.shellData);if(e.metaData)return(new m.MetaDataTranslator).from(e.metaData);throw"not supported"}}]),t}(s.Translator);t.GeneralDataTranslator=_;var S=function(e){function t(){return o(this,t),A(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),i(t,[{key:"realTo",value:function(e){var t=new u.brep.PBGeneralDataList;return t.generalDatas=(new _).toList(e),t}},{key:"realFrom",value:function(e){return(new _).fromList(e.generalDatas)}}]),t}(s.Translator);t.GeneralDataListTranslator=S},function(e,t,r){"use strict";var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var i=r(711),o=r(422),A=r(353),a=r(284),s=r(354),u=r(239),c=r(522),l=r(423),g=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return n(e,null,[{key:"readMetaData",value:function(e){var t=new u.MetaData(void 0,void 0);return Object.assign(t,e),t}},{key:"readShellData",value:function(e){var t=new c.ShellData(void 0);return Object.assign(t,e),t}},{key:"readFaceData",value:function(e){var t=new A.FaceData(void 0);return Object.assign(t,e),t}},{key:"readLoopData",value:function(e){var t=new s.LoopData(void 0);return Object.assign(t,e),t}},{key:"readEdgeData",value:function(e){var t=new i.EdgeData(void 0);return Object.assign(t,e),t}},{key:"readEdge2Data",value:function(e){var t=new o.Edge2Data(void 0);return Object.assign(t,e),t}},{key:"readHalfEdgeData",value:function(e){var t=new a.HalfEdgeData(void 0);return Object.assign(t,e),t}},{key:"readVertexData",value:function(e){var t=new l.VertexData(void 0);return Object.assign(t,e),t}}]),e}();t.Json=g},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(239);function i(e){var t=e.metaData;return t?t.version:void 0}function o(e){var t=e.metaData;return t?t.toolVersion:void 0}function A(e){for(var t=new Map,r=0,n=e.length;r<n;r++){var i=e[r];t.set(i.refId,i)}return t}t.migrateBrepData=function(e){return function(e){var t=i(e);if(t&&n.MetaData.versionCompare(t,"1.9.0")>=0)return e;for(var r=A(e.hedgeData),a=e.edge2Data,s=0,u=a.length;s<u;s++){var c=a[s],l=c.halfEdgeIds;if(!(l.length<=0)){for(var g=void 0,f=0,h=l.length;f<h&&!(g=r.get(l[f]));f++);if(g){c.vertexAId=g.vertexAId,c.vertexBId=g.vertexBId;for(var p=0,d=l.length;p<d;p++){var I=l[p];if(I!==g.refId){var y=r.get(I);y&&(y.vertexAId!==c.vertexAId?y.reversed=!0:y.reversed=!1)}}}}}for(var C=e.edgeData,E=0,B=C.length;E<B;E++){var v=C[E],m=v.halfEdge1Id,Q=v.halfEdge2Id,b=void 0;if(null!=m&&(b=r.get(m)),b||null==Q||(b=r.get(Q)),b&&(v.vertexAId=b.vertexAId,v.vertexBId=b.vertexBId,b.reversed=!1,null!=Q&&Q!==b.refId)){var _=r.get(Q);_.vertexAId!==v.vertexAId?_.reversed=!0:_.reversed=!1}}var S=o(e);return e.metaData=new n.MetaData("1.9.0",S),e}(function(e){var t=i(e);if(t&&n.MetaData.versionCompare(t,"1.8.9")>=0)return e;for(var r=A(e.faceData),a=A(e.loopData),s=A(e.hedgeData),u=e.originMetaData,c=o(e),l=new n.MetaData("1.8.9",c),g=e.shellData,f=e.vertexData,h=[],p=[],d=[],I=[],y=[],C=0,E=g.length;C<E;C++)for(var B=g[C].faceIds,v=0,m=B.length;v<m;v++){var Q=B[v],b=r.get(Q);b&&h.push(b)}for(var _=0,S=h.length;_<S;_++){var w=h[_],D=w.outerLoopId,R=a.get(D);if(R){p.push(R);var M=w.innerLoopIds;if(M)for(var x=0,P=M.length;x<P;x++){var T=M[x],F=a.get(T);F&&p.push(F)}}}for(var O=0,L=p.length;O<L;O++)for(var N=p[O].halfEdgeIds,k=0,G=N.length;k<G;k++){var U=N[k],j=s.get(U);j&&d.push(j)}for(var V=new Set,H=0,Y=d.length;H<Y;H++){var K=d[H];V.add(K.refId)}for(var q=new Map,J=0,W=e.edgeData.length;J<W;J++){var z=e.edgeData[J],X=z.halfEdge1Id;if(V.has(X)){var Z=q.get(X);Z&&Z!==z?z.halfEdge1Id=void 0:q.set(X,z)}else z.halfEdge1Id=void 0;var $=z.halfEdge2Id;if(V.has($)){var ee=q.get($);ee&&ee!==z?z.halfEdge2Id=void 0:q.set($,z)}else z.halfEdge2Id=void 0;(z.halfEdge1Id||z.halfEdge2Id)&&I.push(z)}for(var te=0,re=e.edge2Data.length;te<re;te++){for(var ne=e.edge2Data[te],ie=[],oe=ne.halfEdgeIds,Ae=0,ae=oe.length;Ae<ae;Ae++){var se=oe[Ae];if(V.has(se)){var ue=q.get(se);ue&&ue!==ne||(q.set(se,ne),ie.push(se))}}ie.length>0&&(ne.halfEdgeIds=ie,y.push(ne))}return{originMetaData:u,metaData:l,shellData:g,faceData:h,loopData:p,edgeData:I,edge2Data:y,hedgeData:d,vertexData:f}}(function(e){for(var t=e,r=void 0,n=void 0,i=[],o=[],A=[],a=[],s=[],u=[],c=[],l=0,g=t.length;l<g;l++){var f=t[l];switch(f.tp){case"M":r=f,n=f;break;case"S":i.push(f);break;case"F":o.push(f);break;case"L":A.push(f);break;case"E":a.push(f);break;case"E2":s.push(f);break;case"H":u.push(f);break;case"V":c.push(f)}}return{metaData:r,originMetaData:n,shellData:i,faceData:o,loopData:A,edgeData:a,edge2Data:s,hedgeData:u,vertexData:c}}(e)))},t.getMetaVersion=i,t.getMetaToolVersion=o,t.getOriginMetaVersion=function(e){var t=e.originMetaData;return t?t.version:void 0}},function(e,t,r){"use strict";var n=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var r=[],n=!0,i=!1,o=void 0;try{for(var A,a=e[Symbol.iterator]();!(n=(A=a.next()).done)&&(r.push(A.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{!n&&a.return&&a.return()}finally{if(i)throw o}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};Object.defineProperty(t,"__esModule",{value:!0});var i=r(3),o=r(239),A=r(1109);function a(e){var t=e.getEdges(),r=!0,n=!1,o=void 0;try{for(var A,a=t[Symbol.iterator]();!(r=(A=a.next()).done);r=!0){var s=A.value;if(s.curve instanceof i.Circle3d){var u=s.curve,c=s.vertexA,l=s.vertexB,g=u.getParam(c.point),f=u.getParam(l.point);i.Num.isBigger(g,f)&&s.swapVertices()}}}catch(e){n=!0,o=e}finally{try{!r&&a.return&&a.return()}finally{if(n)throw o}}}function s(e){!function(e){for(var t=function(e){var t=e.getVertices(),r=new Map,i=[],o=!0,A=!1,a=void 0;try{for(var s,u=t[Symbol.iterator]();!(o=(s=u.next()).done);o=!0){var c=s.value,l=!1,g=!0,f=!1,h=void 0;try{for(var p,d=r[Symbol.iterator]();!(g=(p=d.next()).done);g=!0){var I=n(p.value,2),y=I[0],C=I[1];if(c.point.isEqual(y.point)){C.push(c),l=!0;break}}}catch(e){f=!0,h=e}finally{try{!g&&d.return&&d.return()}finally{if(f)throw h}}l||r.set(c,[c])}}catch(e){A=!0,a=e}finally{try{!o&&u.return&&u.return()}finally{if(A)throw a}}var E=!0,B=!1,v=void 0;try{for(var m,Q=r[Symbol.iterator]();!(E=(m=Q.next()).done);E=!0){var b=n(m.value,2);(C=b[1]).length>1&&i.push(C)}}catch(e){B=!0,v=e}finally{try{!E&&Q.return&&Q.return()}finally{if(B)throw v}}return i}(e),r=new Map,i=0,o=t.length;i<o;i++)for(var A=t[i],a=A[0],s=1,u=A.length;s<u;s++)r.set(A[s],a);if(r.size<=0)return;var c=e.getEdges(),l=!0,g=!1,f=void 0;try{for(var h,p=c[Symbol.iterator]();!(l=(h=p.next()).done);l=!0){var d=h.value,I=d.vertexA,y=d.vertexB;r.has(I)&&(d.vertexA=r.get(I)),r.has(y)&&(d.vertexB=r.get(y))}}catch(e){g=!0,f=e}finally{try{!l&&p.return&&p.return()}finally{if(g)throw f}}}(e);for(var t=function(e){for(var t=[],r=e.faces,n=0,i=r.length;n<i;n++)for(var o=r[n].getLoops(),A=0,a=o.length;A<a;A++)for(var s=o[A].halfEdges,u=0,c=s.length;u<c;u++){var l=s[u];l.vertexA===l.vertexB&&t.push(l)}return t}(e),r=0,i=t.length;r<i;r++){u(t[r])}}function u(e){var t=e.loop;t.removeHalfEdge(e),t.halfEdges.length<=0&&A.quickPurgeLoop(t);var r=e.edge;r.removeHalfEdge(e),r.halfEdges.length<=0&&r.dispose()}t.postMigrateShells=function(e,t){!function(e,t){if(t&&o.MetaData.versionCompare(t,"1.9.0")>=0)return;(function(e){for(var t=0,r=e.length;t<r;t++){a(e[t])}})(e),function(e){for(var t=0,r=e.length;t<r;t++){s(e[t])}}(e)}(e,t),function(e,t){if(t&&o.MetaData.versionCompare(t,"1.10.0")>=0)return;!function(e){for(var t=0,r=e.length;t<r;t++)for(var n=e[t].faces,o=0,A=n.length;o<A;o++){var a=n[o],s=a.surface,u=!0;s&&s instanceof i.CylindricalSurface&&a.outerLoop&&(u=a.outerLoop.isCCW(s)),a.setOuterLoop(a.outerLoop,u)}}(e)}(e,t)}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(e,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==n(t)&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.x=e,i.y=r,i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(r(241).MIxBaseGeom);t.MIxVector2d=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(67),i=r(2038),o=r(523),A=r(160),a=r(285),s=r(715),u=r(1117);function c(e){for(var t=[],r=[],n=0,i=e.length;n<i;n++){var o=e[n];if(o instanceof A.Shell){if(o.faces.length<=0)continue;r.push(a.MIxShell.create(o))}t.push(u.topoObjToMIxEntity(o))}return s.BrepValidatorManager.validateShellsTopo(r,!0),t}t.toPBBrep=function(e){var t=e.map((function(e){return e.rawObject()})),r=o.extractIndependentTopoObjs(t);return s.BrepValidatorManager.validateShellsTopo(r.shells.map((function(e){return a.MIxShell.create(e)})),!0),i.ProtoSerializer.toPBBrep(t)},t.toBytes=function(e){var t=this.toPBBrep(e);return n.brep.PBBrep.encode(t).finish()},t.shellsToPBBrep=function(e){return s.BrepValidatorManager.validateShellsTopo(e,!0),i.ProtoSerializer.shellsToPBBrep(e.map((function(e){return e.rawObject()})))},t.shellsToBytes=function(e){var t=this.shellsToPBBrep(e);return n.brep.PBBrep.encode(t).finish()},t.fromPBBrep=function(e){return c(i.ProtoSerializer.fromPBBrep(e))},t.fromBytes=function(e){return c(i.ProtoSerializer.fromBytes(e))},t.shellsFromPBBrep=function(e){var t=i.ProtoSerializer.shellsFromPBBrep(e).map((function(e){return a.MIxShell.create(e)}));return s.BrepValidatorManager.validateShellsTopo(t,!0),t},t.shellsFromBytes=function(e){var t=i.ProtoSerializer.shellsFromBytes(e).map((function(e){return a.MIxShell.create(e)}));return s.BrepValidatorManager.validateShellsTopo(t,!0),t}},function(e,t,r){"use strict";var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function i(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0});var o=r(3),A=r(67),a=r(239),s=r(2039),u=r(2047),c=r(2048),l=r(160),g=r(2049),f=r(709),h=r(523),p=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return n(e,null,[{key:"toPBBrep",value:function(e,t){t=t||new a.MetaData;var r=c.SerializeContext.buildContextByTopoObjs(e);return this._toPBBrepImpl(r,t)}},{key:"toBytes",value:function(e,t){var r=this.toPBBrep(e,t);return A.brep.PBBrep.encode(r).finish()}},{key:"shellsToPBBrep",value:function(e,t){t=t||new a.MetaData;var r=c.SerializeContext.buildContextByShells(e);return this._toPBBrepImpl(r,t)}},{key:"shellsToBytes",value:function(e,t){var r=this.shellsToPBBrep(e);return A.brep.PBBrep.encode(r).finish()}},{key:"fromPBBrep",value:function(e){var t=new u.DeserializeContext,r=this.getMetaData(e),n=g.ProtoMigrate.migratePBBrep(e);t.curves=o.ProtocolTranslators.CURVE3D.fromList(n.curves),t.surfaces=o.ProtocolTranslators.SURFACE.fromList(n.surfaces),t.vertices=s.BrepTranslators.VERTEX.fromList(n.vertices,t),t.edges=s.BrepTranslators.EDGE.fromList(n.edges,t),t.faces=s.BrepTranslators.FACE.fromList(n.faces,t),t.shells=s.BrepTranslators.SHELL.fromList(n.shells,t);var A={shells:t.shells,faces:t.faces,edges:t.edges,vertices:t.vertices,loops:[],halfEdges:[]},a=h.extractIndependentTopoObjs2(A);f.postProcessTopoObjects(a,r?r.version:void 0);var c=[];return c.push.apply(c,i(a.shells)),c.push.apply(c,i(a.faces)),c.push.apply(c,i(a.loops)),c.push.apply(c,i(a.halfEdges)),c.push.apply(c,i(a.edges)),c.push.apply(c,i(a.vertices)),c}},{key:"fromBytes",value:function(e){try{var t=A.brep.PBBrep.decode(e);return this.fromPBBrep(t)}catch(e){return[]}}},{key:"shellsFromPBBrep",value:function(e){for(var t=this.fromPBBrep(e),r=[],n=0,i=t.length;n<i;n++){var o=t[n];o instanceof l.Shell&&r.push(o)}return r}},{key:"shellsFromBytes",value:function(e){try{var t=A.brep.PBBrep.decode(e);return this.shellsFromPBBrep(t)}catch(e){return[]}}},{key:"getMetaData",value:function(e){var t=e.metaData;if(t)return s.BrepTranslators.META.from(t)}},{key:"_toPBBrepImpl",value:function(e,t){var r=new A.brep.PBBrep;return r.metaData=s.BrepTranslators.META.to(t),r.curves=o.ProtocolTranslators.CURVE3D.toList(e.curves),r.surfaces=o.ProtocolTranslators.SURFACE.toList(e.surfaces),r.vertices=s.BrepTranslators.VERTEX.toList(e.vertices,e),r.edges=s.BrepTranslators.EDGE.toList(e.edges,e),r.faces=s.BrepTranslators.FACE.toList(e.faces,e),r.shells=s.BrepTranslators.SHELL.toList(e.shells,e),r}}]),e}();t.ProtoSerializer=p},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2040),i=r(2041),o=r(2042),A=r(2043),a=r(2046);t.BrepTranslators={META:new n.MetaTranslator,VERTEX:new i.VertexTranslator,EDGE:new o.EdgeTranslator,FACE:new A.FaceTranslator,SHELL:new a.ShellTranslator}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==n(t)&&"function"!=typeof t?e:t}Object.defineProperty(t,"__esModule",{value:!0});var a=r(3),s=r(239),u=r(67),c=function(e){function t(){return o(this,t),A(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"realTo",value:function(e){var t=new u.brep.PBMeta;return e.version&&e.version.length>0&&(t.version=e.version),t.toolVersion=e.toolVersion,t}},{key:"realFrom",value:function(e){var t=new s.MetaData;return e.version&&e.version.length>0&&(t.version=e.version),e.toolVersion&&e.toolVersion.length>0&&(t.toolVersion=e.toolVersion),t}}]),t}(a.Translator);t.MetaTranslator=c},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==n(t)&&"function"!=typeof t?e:t}Object.defineProperty(t,"__esModule",{value:!0});var a=r(67),s=r(282),u=r(358),c=r(3),l=function(e){function t(){return o(this,t),A(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"realTo",value:function(e){var t=new a.brep.PBVertex;return t.base=u.toPBTopoObjBase(e),t.position=c.ProtocolTranslators.POINT3D.to(e.point),t}},{key:"realFrom",value:function(e){var t=new s.Vertex(null);return e.base&&u.fromPBTopoObjBase(e.base,t),e.position&&(t.point=c.ProtocolTranslators.POINT3D.from(e.position)),t}}]),t}(c.TranslatorWithContext);t.VertexTranslator=l},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==n(t)&&"function"!=typeof t?e:t}Object.defineProperty(t,"__esModule",{value:!0});var a=r(3),s=r(67),u=r(235),c=r(358),l=function(e){function t(){return o(this,t),A(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"realTo",value:function(e,t){var r=new s.brep.PBEdge;r.base=c.toPBTopoObjBase(e),r.crvIndex=t.getEdgeCurveIndex(e);var n=e.vertexA;n&&(r.vAIndex=t.getVertexIndex(n));var i=e.vertexB;return i&&(r.vBIndex=t.getVertexIndex(i)),r}},{key:"realFrom",value:function(e,t){var r=new u.Edge(null,null,null);if(e.base&&c.fromPBTopoObjBase(e.base,r),e.vAIndex){var n=t.getVertex(e.vAIndex);n&&(r.vertexA=n)}if(e.vBIndex){var i=t.getVertex(e.vBIndex);i&&(r.vertexB=i)}var o=t.getCurve3d(e.crvIndex||0);return o?r.curve=o:r.vertexA&&r.vertexB&&(r.curve=a.Line3d.fromSegment(r.vertexA.point,r.vertexB.point)),r}}]),t}(a.TranslatorWithContext);t.EdgeTranslator=l},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==n(t)&&"function"!=typeof t?e:t}Object.defineProperty(t,"__esModule",{value:!0});var a=r(3),s=r(67),u=r(237),c=r(2044),l=r(358),g=function(e){function t(){return o(this,t),A(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"realTo",value:function(e,r){var n=new s.brep.PBFace;n.base=l.toPBTopoObjBase(e),n.srfIndex=r.getFaceSurfaceIndex(e),n.sameDir=e.sameDir,e.outerLoop&&(n.outerLoop=t._loopTranslator.to(e.outerLoop,r));var i=e.innerLoops;return i&&i.length>0&&(n.innerLoops=t._loopTranslator.toList(i,r)),n}},{key:"realFrom",value:function(e,r){var n=new u.Face(null);if(e.base&&l.fromPBTopoObjBase(e.base,n),e.srfIndex){var i=r.getSurface(e.srfIndex);i&&(n.surface=i)}var o=e.sameDir||!1;if(e.outerLoop){var A=t._loopTranslator.from(e.outerLoop,r);n.setOuterLoop(A,o)}if(e.innerLoops)for(var a=t._loopTranslator.fromList(e.innerLoops,r),s=0,c=a.length;s<c;s++)n.addInnerLoop(a[s]);return n}}]),t}(a.TranslatorWithContext);g._loopTranslator=new c.LoopTranslator,t.FaceTranslator=g},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==n(t)&&"function"!=typeof t?e:t}Object.defineProperty(t,"__esModule",{value:!0});var a=r(3),s=r(67),u=r(283),c=r(2045),l=r(358),g=function(e){function t(){return o(this,t),A(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"realTo",value:function(e,r){var n=new s.brep.PBLoop;return n.base=l.toPBTopoObjBase(e),n.halfEdges=t._heTranslator.toList(e.halfEdges,r),n}},{key:"realFrom",value:function(e,r){var n=new u.Loop;if(e.base&&l.fromPBTopoObjBase(e.base,n),e.halfEdges){var i=t._heTranslator.fromList(e.halfEdges,r);n.buildLoop(i)}return n}}]),t}(a.TranslatorWithContext);g._heTranslator=new c.HalfEdgeTranslator,t.LoopTranslator=g},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==n(t)&&"function"!=typeof t?e:t}Object.defineProperty(t,"__esModule",{value:!0});var a=r(3),s=r(67),u=r(238),c=r(358),l=function(e){function t(){return o(this,t),A(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"realTo",value:function(e,t){var r=new s.brep.PBHalfEdge;r.base=c.toPBTopoObjBase(e);var n=e.edge;return n&&(r.edgeIndex=t.getEdgeIndex(n)),r.reversed=e.reversed,r}},{key:"realFrom",value:function(e,t){var r=new u.HalfEdge(null);if(e.base&&c.fromPBTopoObjBase(e.base,r),e.edgeIndex){var n=t.getEdge(e.edgeIndex);n&&n.addHalfEdge(r)}return e.reversed&&(r.reversed=e.reversed),r}}]),t}(a.TranslatorWithContext);t.HalfEdgeTranslator=l},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==n(t)&&"function"!=typeof t?e:t}Object.defineProperty(t,"__esModule",{value:!0});var a=r(3),s=r(67),u=r(160),c=r(358),l=function(e){function t(){return o(this,t),A(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"realTo",value:function(e,t){var r=new s.brep.PBShell;r.base=c.toPBTopoObjBase(e);for(var n=e.faces,i=new Array(n.length),o=0,A=n.length;o<A;o++)i[o]=t.getFaceIndex(n[o]);return r.faceIndices=i,r}},{key:"realFrom",value:function(e,t){var r=new u.Shell;e.base&&c.fromPBTopoObjBase(e.base,r);var n=e.faceIndices;if(n)for(var i=0,o=n.length;i<o;i++){var A=t.getFace(n[i]);A&&r.addFace(A)}return r}}]),t}(a.TranslatorWithContext);t.ShellTranslator=l},function(e,t,r){"use strict";var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._curves=[],this._surfaces=[],this._vertices=[],this._edges=[],this._faces=[],this._shells=[]}return n(e,[{key:"getCurve3d",value:function(e){if(!(e<=0))return this._curves.length>=e?this._curves[e-1]:void 0}},{key:"getSurface",value:function(e){if(!(e<=0))return this._surfaces.length>=e?this._surfaces[e-1]:void 0}},{key:"getVertex",value:function(e){if(!(e<=0))return this._vertices.length>=e?this._vertices[e-1]:void 0}},{key:"getEdge",value:function(e){if(!(e<=0))return this._edges.length>=e?this._edges[e-1]:void 0}},{key:"getFace",value:function(e){if(!(e<=0))return this._faces.length>=e?this._faces[e-1]:void 0}},{key:"getShell",value:function(e){if(!(e<=0))return this._shells.length>=e?this._shells[e-1]:void 0}},{key:"curves",get:function(){return this._curves},set:function(e){this._curves=e}},{key:"surfaces",get:function(){return this._surfaces},set:function(e){this._surfaces=e}},{key:"vertices",get:function(){return this._vertices},set:function(e){this._vertices=e}},{key:"edges",get:function(){return this._edges},set:function(e){this._edges=e}},{key:"faces",get:function(){return this._faces},set:function(e){this._faces=e}},{key:"shells",get:function(){return this._shells},set:function(e){this._shells=e}}]),e}();t.DeserializeContext=i},function(e,t,r){"use strict";var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var i=r(3),o=r(282),A=r(235),a=r(237),s=r(160),u=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._curves=[],this._surfaces=[],this._vertices=[],this._edges=[],this._faces=[],this._shells=[]}return n(e,[{key:"getEdgeCurveIndex",value:function(t){return e.getCurveIndex(t)}},{key:"getFaceSurfaceIndex",value:function(t){return e.getSurfaceIndex(t)}},{key:"getVertexIndex",value:function(t){return e.getSelfIndex(t)}},{key:"getEdgeIndex",value:function(t){return e.getSelfIndex(t)}},{key:"getFaceIndex",value:function(t){return e.getSelfIndex(t)}},{key:"getShellIndex",value:function(t){return e.getSelfIndex(t)}},{key:"addVertex",value:function(t){var r=e.getOrCreateTempMap(t);r[e.SELF_IDX]||(this._vertices.push(t),r[e.SELF_IDX]=this._vertices.length)}},{key:"addEdgeAndCurve",value:function(t){var r=e.getOrCreateTempMap(t);if(!r[e.SELF_IDX]){this._edges.push(t),r[e.SELF_IDX]=this._edges.length;var n=t.curve;!n||n instanceof i.Line3d||(this._curves.push(n),r[e.CRV_IDX]=this._curves.length)}}},{key:"addFaceAndSurface",value:function(t){var r=e.getOrCreateTempMap(t);if(!r[e.SELF_IDX]){this._faces.push(t),r[e.SELF_IDX]=this._faces.length;var n=t.surface;n&&(this._surfaces.push(n),r[e.SURF_IDX]=this._surfaces.length)}}},{key:"addShell",value:function(t){var r=e.getOrCreateTempMap(t);r[e.SURF_IDX]||(this._shells.push(t),r[e.SURF_IDX]=this._shells.length)}},{key:"curves",get:function(){return this._curves}},{key:"surfaces",get:function(){return this._surfaces}},{key:"vertices",get:function(){return this._vertices}},{key:"edges",get:function(){return this._edges}},{key:"faces",get:function(){return this._faces}},{key:"shells",get:function(){return this._shells}}],[{key:"buildContextByShells",value:function(t){for(var r=new e,n=0,i=t.length;n<i;n++){var o=t[n];this.clearTempMap(o);var A=o.faces;this.clearTempMaps(A);var a=o.getEdgesAndVertices(),s=a.edges;this.clearTempMaps(s);var u=a.vertices;this.clearTempMaps(u),r.addShell(o);for(var c=0,l=A.length;c<l;c++)r.addFaceAndSurface(A[c]);for(var g=0,f=s.length;g<f;g++)r.addEdgeAndCurve(s[g]);for(var h=0,p=u.length;h<p;h++)r.addVertex(u[h])}return r}},{key:"buildContextByTopoObjs",value:function(t){for(var r=[],n=[],i=[],u=[],c=0,l=t.length;c<l;c++){var g=t[c];if(g instanceof a.Face){n.push(g);var f=g.getEdges(),h=!0,p=!1,d=void 0;try{for(var I,y=f[Symbol.iterator]();!(h=(I=y.next()).done);h=!0){var C=I.value;i.push(C)}}catch(e){p=!0,d=e}finally{try{!h&&y.return&&y.return()}finally{if(p)throw d}}var E=g.getVertices(),B=!0,v=!1,m=void 0;try{for(var Q,b=E[Symbol.iterator]();!(B=(Q=b.next()).done);B=!0){var _=Q.value;u.push(_)}}catch(e){v=!0,m=e}finally{try{!B&&b.return&&b.return()}finally{if(v)throw m}}}else if(g instanceof A.Edge)i.push(g),g.vertexA&&u.push(g.vertexA),g.vertexB&&u.push(g.vertexB);else if(g instanceof o.Vertex)u.push(g);else if(g instanceof s.Shell){r.push(g);for(var S=g.faces,w=0,D=S.length;w<D;w++)n.push(S[w]);for(var R=g.getEdgesAndVertices(),M=R.edges,x=R.vertices,P=0,T=M.length;P<T;P++)i.push(M[P]);for(var F=0,O=x.length;F<O;F++)u.push(x[F])}}this.clearTempMaps(r),this.clearTempMaps(n),this.clearTempMaps(i),this.clearTempMaps(u);for(var L=new e,N=0,k=r.length;N<k;N++)L.addShell(r[N]);for(var G=0,U=n.length;G<U;G++)L.addFaceAndSurface(n[G]);for(var j=0,V=i.length;j<V;j++)L.addEdgeAndCurve(i[j]);for(var H=0,Y=u.length;H<Y;H++)L.addVertex(u[H]);return L}},{key:"getOrCreateTempMap",value:function(e){var t=e.temp;return t||(t=new Object,e.temp=t),t}},{key:"clearTempMaps",value:function(e){for(var t=0,r=e.length;t<r;t++)this.clearTempMap(e[t])}},{key:"clearTempMap",value:function(e){var t=e.temp;t&&(delete t[this.SELF_IDX],delete t[this.CRV_IDX],delete t[this.SURF_IDX])}},{key:"getSelfIndex",value:function(e){var t=e.temp;return t&&t[this.SELF_IDX]||0}},{key:"getCurveIndex",value:function(e){var t=e.temp;return t&&t[this.CRV_IDX]||0}},{key:"getSurfaceIndex",value:function(e){var t=e.temp;return t&&t[this.SURF_IDX]||0}}]),e}();u.SELF_IDX="$PB_SELF_IDX",u.CRV_IDX="$PB_CRV_IDX",u.SURF_IDX="$PB_SURF_IDX",t.SerializeContext=u},function(e,t,r){"use strict";var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return n(e,null,[{key:"migratePBBrep",value:function(e){return e}}]),e}();t.ProtoMigrate=i},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==n(t)&&"function"!=typeof t?e:t}function A(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var s=r(3),u=r(353),c=r(284),l=r(354),g=r(710),f=r(238),h=r(283),p=r(424),d=r(1109),I=function(){function e(){a(this,e),this.errors=[]}return i(e,[{key:"hasError",value:function(){return this.errors.length>0}},{key:"errorMessage",value:function(){for(var e="",t=0,r=this.errors.length;t<r;t++){var n=this.errors[t];e+="Error:{desc:"+n.message()+"; context:"+n.context()+"}\n"}return e}},{key:"tryToFix",value:function(){for(var e=0,t=this.errors.length;e<t;e++){var r=this.errors[e];r.isAmendable?r.amend():r.operation()}}},{key:"validateShell",value:function(e){for(var t=e.faces,r=0,n=t.length;r<n;r++){var i=t[r];i.shell!==e&&this.addError(new C(i,e)),this.validateFace(i)}var o=e.getVertices(),A=!0,a=!1,s=void 0;try{for(var u,c=o[Symbol.iterator]();!(A=(u=c.next()).done);A=!0)for(var l=u.value.getLeadOutHalfEdges(),g=0,f=l.length;g<f;g++){var h=l[g];h.isAdopted()||this.addError(new M(h))}}catch(e){a=!0,s=e}finally{try{!A&&c.return&&c.return()}finally{if(a)throw s}}}},{key:"validateFace",value:function(e){e!==e.outerLoop.face&&this.addError(new v(e.outerLoop,e)),this.validateLoop(e.outerLoop);for(var t=e.innerLoops,r=0,n=t.length;r<n;r++){var i=t[r];e!==i.face&&this.addError(new v(i,e))}this.validateInnerLoops(t,e)}},{key:"validateLoop",value:function(e){var t=e.halfEdges,r=t.length;if(0!==r)for(var n=0;n<r;n++){var i=(n+1)%r,o=t[n],A=t[i];if(o.loop!==e&&this.addError(new m(e,o)),!s.Num.isEqual(o.getBoundedCurve().length,0)||o.edge&&o.edge.degenerated||this.addError(new x(o)),o.vertexB!==A.vertexA&&this.addError(new E(e,o,A)),o.next!==A&&this.addError(new Q(o,A)),A.prev!==o&&this.addError(new b(A,o)),o.edge&&-1!==o.edge.halfEdges.indexOf(o))for(var a=o.siblings(),u=0,c=a.length;u<c;u++){var l=a[u];null!==l&&(o.edge!==l.edge&&this.addError(new D(o,l)),l.vertexB!==o.vertexA&&l.vertexB!==o.vertexB&&this.addError(new S(o,l)),l.vertexA!==o.vertexA&&l.vertexA!==o.vertexB&&this.addError(new _(o,l)))}else this.addError(new w(o))}else this.addError(new B(e))}},{key:"validateInnerLoops",value:function(e,t){for(var r=0,n=e.length;r<n;r++){var i=e[r];this.validateLoop(i)}if(t.surface instanceof s.Plane)for(var o=t.outerLoop.halfEdges.map((function(e){return e.getBoundedCurve()})),A=t.innerLoops.map((function(e){return e.halfEdges.map((function(e){return e.getBoundedCurve()}))})),a=t.surface.faceToUV({contour:o,holes:A}),u=new s.GeomLoop2d(a.contour),c=0;c<a.holes.length;c++){var l=new s.GeomLoop2d(a.holes[c]);u.containsLoop(l,!0)||this.addError(new R(e[c],t))}}},{key:"addError",value:function(e){this.errors.push(e)}}],[{key:"validateToConsole",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=new e;if(n.validateShell(t),0===n.errors.length)return p.consoleLogInDev("BREP is Valid."),!0;for(var i=n.errors,o=0,A=i.length;o<A;o++){var a=i[o];p.consoleLogInDev(a.message())}return r&&n.tryToFix(),!1}}]),e}();t.BREPValidator=I;var y=function(){function e(){a(this,e),this.isAmendable=!1}return i(e,[{key:"message",value:function(){throw"not implemented"}},{key:"amend",value:function(){throw"not implemented"}},{key:"operation",value:function(){throw"not implemented"}},{key:"context",value:function(){throw"not implemented"}}]),e}(),C=function(e){function t(e,r){a(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.isAmendable=!0,n.face=e,n.shell=r,n}return A(t,e),i(t,[{key:"message",value:function(){return"face refers to a shell it doesn't belong to"}},{key:"amend",value:function(){this.face.shell=this.shell}},{key:"operation",value:function(){d.quickPurgeFace(this.face)}},{key:"context",value:function(){try{var e=new Map;u.FaceData.extractTopo(e,this.face);var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),E=function(e){function t(e,r,n){a(this,t);var i=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.isAmendable=!1,i.loop=e,i.halfEdge1=r,i.halfEdge2=n,i}return A(t,e),i(t,[{key:"message",value:function(){return"starting point of the following half edge should identically the same as ending of a half edge"}},{key:"amend",value:function(){throw"not implemented"}},{key:"operation",value:function(){d.quickPurgeLoop(this.loop)}},{key:"context",value:function(){try{var e=new Map;l.LoopData.extractTopo(e,this.loop);var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),B=function(e){function t(e){a(this,t);var r=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.loop=e,r}return A(t,e),i(t,[{key:"message",value:function(){return"loop has no half edge"}},{key:"amend",value:function(){throw"not implemented"}},{key:"operation",value:function(){d.quickPurgeLoop(this.loop)}},{key:"context",value:function(){try{var e=new Map;l.LoopData.extractTopo(e,this.loop);var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),v=function(e){function t(e,r){a(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.isAmendable=!0,n.loop=e,n.face=r,n}return A(t,e),i(t,[{key:"message",value:function(){return"loop refers to different face it belongs to"}},{key:"amend",value:function(){var e=this.face.outerLoop===this.loop,t=this.loop.face,r=!!t&&t.outerLoop===this.loop,n=!!t&&t.innerLoops.indexOf(this.loop)>=0;if(r||n){var i=this.loop.halfEdges.map((function(e){return new f.HalfEdge(e.edge,e.reversed)})),o=new h.Loop(i);e?this.face.setOuterLoop(o):(this.face.removeInnerLoop(this.loop),this.face.addInnerLoop(o));for(var A=0,a=i.length;A<a;A++)g.IdAssigner.assignToHalfEdge(i[A]);this.loop.face=t}else this.loop.face=this.face}},{key:"operation",value:function(){d.quickPurgeLoop(this.loop)}},{key:"context",value:function(){try{var e=new Map;u.FaceData.extractTopo(e,this.face),this.loop.face?u.FaceData.extractTopo(e,this.loop.face):l.LoopData.extractTopo(e,this.loop);var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),m=function(e){function t(e,r){a(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.isAmendable=!0,n.loop=e,n.halfEdge=r,n}return A(t,e),i(t,[{key:"message",value:function(){return"half edge refers to different loop it belongs to"}},{key:"amend",value:function(){this.halfEdge.loop=this.loop}},{key:"operation",value:function(){d.quickPurgeHalfEdge(this.halfEdge)}},{key:"context",value:function(){try{var e=new Map;l.LoopData.extractTopo(e,this.loop),c.HalfEdgeData.extractTopo(e,this.halfEdge);var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),Q=function(e){function t(e,r){a(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.isAmendable=!1,n.halfEdge=e,n.nextHalfEdge=r,n}return A(t,e),i(t,[{key:"message",value:function(){return"half edge's next pointer doesn't refer to real next half edge"}},{key:"amend",value:function(){throw"not implemented"}},{key:"operation",value:function(){d.quickPurgeLoop(this.halfEdge.loop)}},{key:"context",value:function(){try{var e=new Map;this.halfEdge.loop?l.LoopData.extractTopo(e,this.halfEdge.loop):(c.HalfEdgeData.extractTopo(e,this.halfEdge),c.HalfEdgeData.extractTopo(e,this.nextHalfEdge));var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),b=function(e){function t(e,r){a(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.isAmendable=!1,n.halfEdge=e,n.prevHalfEdge=r,n}return A(t,e),i(t,[{key:"message",value:function(){return"half edge's prev pointer doesn't refer to prior half edge"}},{key:"amend",value:function(){throw"not implemented"}},{key:"operation",value:function(){d.quickPurgeLoop(this.halfEdge.loop)}},{key:"context",value:function(){try{var e=new Map;this.halfEdge.loop?l.LoopData.extractTopo(e,this.halfEdge.loop):(c.HalfEdgeData.extractTopo(e,this.prevHalfEdge),c.HalfEdgeData.extractTopo(e,this.halfEdge));var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),_=function(e){function t(e,r){a(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.isAmendable=!1,n.halfEdge=e,n.sibling=r,n}return A(t,e),i(t,[{key:"message",value:function(){return"a sibling has incorrect start vertex"}},{key:"amend",value:function(){throw"not implemented"}},{key:"operation",value:function(){d.quickPurgeHalfEdge(this.sibling)}},{key:"context",value:function(){try{var e=new Map;c.HalfEdgeData.extractTopo(e,this.halfEdge),c.HalfEdgeData.extractTopo(e,this.sibling);var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),S=function(e){function t(e,r){a(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.isAmendable=!1,n.halfEdge=e,n.sibling=r,n}return A(t,e),i(t,[{key:"message",value:function(){return"a sibling has incorrect end vertex"}},{key:"amend",value:function(){throw"not implemented"}},{key:"operation",value:function(){d.quickPurgeHalfEdge(this.sibling)}},{key:"context",value:function(){try{var e=new Map;c.HalfEdgeData.extractTopo(e,this.halfEdge),c.HalfEdgeData.extractTopo(e,this.sibling);var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),w=function(e){function t(e){a(this,t);var r=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.isAmendable=!1,r.halfEdge=e,r}return A(t,e),i(t,[{key:"message",value:function(){return"half edge doesn't correctly refer to an edge"}},{key:"amend",value:function(){throw"not implemented"}},{key:"operation",value:function(){d.quickPurgeHalfEdge(this.halfEdge)}},{key:"context",value:function(){try{var e=new Map;c.HalfEdgeData.extractTopo(e,this.halfEdge);var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),D=function(e){function t(e,r){a(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.isAmendable=!0,n.halfEdge=e,n.sibling=r,n}return A(t,e),i(t,[{key:"message",value:function(){return"edge of sibling doesn't match to the half edge's edge"}},{key:"amend",value:function(){this.sibling.edge=this.halfEdge.edge}},{key:"operation",value:function(){d.quickPurgeHalfEdge(this.sibling)}},{key:"context",value:function(){try{var e=new Map;c.HalfEdgeData.extractTopo(e,this.halfEdge),c.HalfEdgeData.extractTopo(e,this.sibling);var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),R=function(e){function t(e,r){a(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.isAmendable=!1,n.innerLoop=e,n.face=r,n}return A(t,e),i(t,[{key:"message",value:function(){return"inner loop is outside of face's outer loop"}},{key:"amend",value:function(){throw"not implemented"}},{key:"operation",value:function(){d.quickPurgeLoop(this.innerLoop)}},{key:"context",value:function(){try{var e=new Map;this.innerLoop.face&&u.FaceData.extractTopo(e,this.innerLoop.face),l.LoopData.extractTopo(e,this.innerLoop);var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),M=function(e){function t(e){a(this,t);var r=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.isAmendable=!1,r.halfEdge=e,r}return A(t,e),i(t,[{key:"message",value:function(){return"half edge doesn't refer to any loop"}},{key:"amend",value:function(){throw"not implemented"}},{key:"operation",value:function(){d.quickPurgeHalfEdge(this.halfEdge)}},{key:"context",value:function(){try{var e=new Map;c.HalfEdgeData.extractTopo(e,this.halfEdge);var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y),x=function(e){function t(e){a(this,t);var r=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.isAmendable=!1,r.halfEdge=e,r}return A(t,e),i(t,[{key:"message",value:function(){return"half edge with zero length"}},{key:"amend",value:function(){throw"not implemented"}},{key:"operation",value:function(){d.quickPurgeHalfEdge(this.halfEdge)}},{key:"context",value:function(){try{var e=new Map;c.HalfEdgeData.extractTopo(e,this.halfEdge);var t=new Array,r=!0,n=!1,i=void 0;try{for(var o,A=e.values()[Symbol.iterator]();!(r=(o=A.next()).done);r=!0){var a=o.value;t.push(a)}}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}return JSON.stringify(t)}catch(e){return e.message}}}]),t}(y)},function(e,t,r){"use strict";var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return n(e,null,[{key:"changeErrorHandler",value:function(t){e.errorHandler=t}},{key:"changeModelDataHandler",value:function(t){e.dataHandler=t}},{key:"onErrorOccurred",value:function(t,r){if(e.errorHandler){var n="geom-modeling-kernel:";r&&r.trim().length>0&&(n=n+"("+r.trim()+")"),e.errorHandler(t,n)}}},{key:"uploadErrorModelData",value:function(t,r){e.dataHandler&&e.dataHandler(t,r)}}]),e}();t.ErrorManager=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2053),i=r(357),o=r(285),A=r(1116);t.polygonizeShell=function(e,t,r){var a=n.Polygonize.polygonizeShell(e.rawObject(),t,r),s=o.MIxShell.create(a.shell),u=new Map;a.faceMap.forEach((function(e,t){var r=i.MIxFace.create(t),n=[];e.forEach((function(e){n.push(i.MIxFace.create(e))})),u.set(r,n)}));var c=new Map;return a.edgeMap.forEach((function(e,t){var r=A.MIxEdge.create(t),n=[];e.forEach((function(e){n.push(A.MIxEdge.create(e))})),c.set(r,n)})),{shell:s,faceMap:u,edgeMap:c}},t.polygonizeFace=function(e,t,r){var o=n.Polygonize.polygonizeFace(e.rawObject(),t,r),a=[];o.faces.forEach((function(e){a.push(i.MIxFace.create(e))}));var s=new Map;return o.edgeMap.forEach((function(e,t){var r=A.MIxEdge.create(t),n=[];e.forEach((function(e){n.push(A.MIxEdge.create(e))})),s.set(r,n)})),{faces:a,edgeMap:s}}},function(e,t,r){"use strict";var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var i=r(3),o=r(235),A=r(237),a=r(238),s=r(283),u=r(160),c=r(282),l=r(710),g=r(716),f=r(2054),h=r(2056),p=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return n(e,null,[{key:"polygonizeShell",value:function(t,r,n){var o=r||e.defaultNormTol,A=n||i.Tolerance.Tolerance.global,a=[],s=[],c=!0,g=!1,f=void 0;try{for(var h,p=t.faces[Symbol.iterator]();!(c=(h=p.next()).done);c=!0){var d=h.value;a.push(d);var I=e.polygonMeshOnFace(d,!1,o,A);if(I.isEmpty())return{shell:new u.Shell,faceMap:new Map,edgeMap:new Map};s.push(I)}}catch(e){g=!0,f=e}finally{try{!c&&p.return&&p.return()}finally{if(g)throw f}}var y=e.getResultMapByShell(t,s);e.mergeCoplanarFaceOnFaceList(y,A),e.mergeCollinearEdgeOnFace(y,A);var C=e.getEdgesFromShell(t),E=e.reversedMapInfo({faces:a,edges:C},y),B=new u.Shell;return E.faceList.forEach((function(e){B.addFace(e)})),l.IdAssigner.assignToShell(B),{shell:B,faceMap:E.faceMap,edgeMap:E.edgeMap}}},{key:"polygonizeFace",value:function(t,r,n){var o=r||e.defaultNormTol,A=n||i.Tolerance.Tolerance.global,a=e.polygonMeshOnFace(t,!0,o,A);if(a.isEmpty())return{faces:[],edgeMap:new Map};var s=e.getResultMapByFace(t,a);e.mergeCoplanarFaceOnFaceList(s,A),e.mergeCollinearEdgeOnFace(s,A);var u=e.getEdgesFromFace(t),c=e.reversedMapInfo({faces:[t],edges:u},s);return{faces:c.faceList,edgeMap:c.edgeMap}}},{key:"polygonMeshOnFace",value:function(t,r,n,o){o=o||i.Tolerance.Tolerance.global;var A=n;i.Num.isInRange(n,0,1,!0,!0,o.numTol)||(A=e.defaultNormTol);var a=t.outerLoop.halfEdges.map((function(e){return e.getBoundedCurve()})),s=t.innerLoops.map((function(e){return e.halfEdges.map((function(e){return e.getBoundedCurve()}))}));if(null===t.surface)return new g.PolygonMesh;var u=[];return u.push(t.outerLoop.halfEdges.map((function(e){return e.edge.degenerated}))),u.push.apply(u,function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}(t.innerLoops.map((function(e){return e.halfEdges.map((function(e){return e.edge.degenerated}))})))),r?f.PolygonMeshOnSurface.polygonMeshOnSingleSurface3d(a,s,u,t.surface,t.sameDir,A,o):f.PolygonMeshOnSurface.polygonMeshOnSurface3d(a,s,u,t.surface,t.sameDir,A,o)}},{key:"getResultMapByFace",value:function(t,r){if(t.surface instanceof i.Plane)return e.makeFaceByPolygonMeshWithPlane(r);var n=new u.Shell;return n.addFace(t),this.getResultMapByShell(n,[r])}},{key:"getResultMapByShell",value:function(t,r){var n=e.buildVertexIndex(t),i=new Array,o=[],A=e.buildEdgeIndex(t,i,o),a=h.PolygonMeshUtil.mergePolygonMesh(r,i,n,A,o);return a.pgm.isEmpty()?{faceIndexMap:new Map,edgeIndexMap:new Map}:e.makeFacesByPolygonMesh(a)}},{key:"buildVertexIndex",value:function(e){var t=[],r=e.getVertices(),n=0,i=new Map,o=!0,A=!1,a=void 0;try{for(var s,u=r[Symbol.iterator]();!(o=(s=u.next()).done);o=!0){var c=s.value;i.set(c,n++)}}catch(e){A=!0,a=e}finally{try{!o&&u.return&&u.return()}finally{if(A)throw a}}return e.faces.forEach((function(e){var r=e.getHalfEdges(),n=[];r.forEach((function(e){n.push(i.get(e.vertexA))})),t.push(n)})),t}},{key:"buildEdgeIndex",value:function(e,t,r){for(var n=Array.from(e.getEdges()),i=new Map,o=0,A=n.length;o<A;++o)i.set(n[o],o),t.push(n[o].getBoundedCurve());var a=e.faces,s=[];return a.forEach((function(e){var t=e.getHalfEdges(),n=[],o=[];t.forEach((function(e){var t=i.get(e.edge);n.push({index:t,isReversed:e.reversed}),o.push(e.reversed)})),s.push(n),r.push(o)})),s}},{key:"makeFaceByPolygonMeshWithPlane",value:function(t){if(!t.onPlane)return{faceIndexMap:new Map,edgeIndexMap:new Map};if(0===t.coords.length||1!==t.mSurfaces.length||1!==t.isSameDir.length||t.boundedIndices.length<1||t.boundedIndices.length!==t.boundedEdgePos.length)return{faceIndexMap:new Map,edgeIndexMap:new Map};var r=[];t.coords.forEach((function(e){r.push(new c.Vertex(e))})),e.setSoftTagWithVertex(t.boundedIndices,r);var n=new A.Face(t.mSurfaces[0]),i=t.coordIndices,o=e.makeLoopByVertexAndIndex(r,i[0]);n.setOuterLoop(o,t.isSameDir[0]);for(var a=1,s=i.length;a<s;++a){var u=e.makeLoopByVertexAndIndex(r,i[a]);if(null===u)return{faceIndexMap:new Map,edgeIndexMap:new Map};n.addInnerLoop(u)}var l=new Map;return l.set(n,0),{faceIndexMap:l,edgeIndexMap:e.setSoftTagWithEdge(t.boundedIndices,r)}}},{key:"makeFacesByPolygonMesh",value:function(t){var r=t.pgm.coords.length,n=t.pgm.coordIndices.length;if(0===r||0===n||t.pgm.markLoop.length!==n||t.pgm.isSameDir.length!==t.pgm.mSurfaces.length)return{faceIndexMap:new Map,edgeIndexMap:new Map};var i=[];t.pgm.coords.forEach((function(e){i.push(new c.Vertex(e))})),e.setSoftTagWithVertex(t.pgm.boundedIndices,i);for(var o=new Set,a=t.pgm.mSurfaces,s=t.pgm.coordIndices,u=new Map,l=0,g=0,f=0,h=s.length;f<h;f++){var p=t.pgm.markLoop[f];if(f>t.range[g]&&g++,-1!==p){var d=new A.Face(a[l]),I=e.makeLoopByVertexAndIndex(i,s[f]);for(d.setOuterLoop(I),f++;f<h&&1===t.pgm.markLoop[f];){var y=e.makeLoopByVertexAndIndex(i,s[f]);if(null===y)return{faceIndexMap:new Map,edgeIndexMap:new Map};d.addInnerLoop(y),f++}o.add(d),u.set(d,g),f--}else{var C=e.makeLoopByVertexAndIndex(i,s[f]);if(null!==C&&null!==a[l]){var E=new A.Face(a[l]);E.setOuterLoop(C),o.add(E),u.set(E,g)}}l++}return{faceIndexMap:u,edgeIndexMap:e.setSoftTagWithEdge(t.pgm.boundedIndices,i)}}},{key:"setSoftTagWithVertex",value:function(e,t){var r=!0,n=!1,i=void 0;try{for(var o,A=e[Symbol.iterator]();!(r=(o=A.next()).done);r=!0)for(var a=o.value,s=1,u=a.length;s<u;++s)0!==s&&s!==u-1&&(t[a[s]].isSoft=!0)}catch(e){n=!0,i=e}finally{try{!r&&A.return&&A.return()}finally{if(n)throw i}}}},{key:"setSoftTagWithEdge",value:function(t,r){var n=new Map,i=r.length,o=0,A=!0,a=!1,s=void 0;try{for(var u,c=t[Symbol.iterator]();!(A=(u=c.next()).done);A=!0){for(var l=u.value,g=1,f=l.length;g<f;++g){var h=l[g],p=l[g-1];if(h<i&&h>=0&&p<i&&p>=0){var d=e.setSoftOnEdgeByVertex(r[l[g]],r[l[g-1]]);d&&n.set(d,{bcIndex:o,posIndex:g})}}o++}}catch(e){a=!0,s=e}finally{try{!A&&c.return&&c.return()}finally{if(a)throw s}}return n}},{key:"setSoftOnEdgeByVertex",value:function(e,t){var r=e.edges,n=!0,i=!1,o=void 0;try{for(var A,a=r[Symbol.iterator]();!(n=(A=a.next()).done);n=!0){var s=A.value;if(s.vertexA===e&&s.vertexB===t||s.vertexB===e&&s.vertexA===t)return s.isSoft=!1,s}}catch(e){i=!0,o=e}finally{try{!n&&a.return&&a.return()}finally{if(i)throw o}}}},{key:"makeLoopByVertexAndIndex",value:function(t,r){var n=r.length;if(n<1)return null;for(var i=[],o=r[n-1],A=t[o],u=0,c=n;u<c;++u){var l=r[u],g=t[l],f=e.makeEdgeByVertex(A,g);A.point.isEqual(g.point)&&(f.degenerated=!0),i.push(new a.HalfEdge(f,f.vertexA!==A)),A=g,o=l}return new s.Loop(i)}},{key:"makeUniqueEdgeByVertex",value:function(e,t){var r=new o.Edge(i.Line3d.fromSegment(e.point,t.point),e,t);return r.isSoft=!0,r}},{key:"makeEdgeByVertex",value:function(t,r){var n=t.edges,i=!0,o=!1,A=void 0;try{for(var a,s=n[Symbol.iterator]();!(i=(a=s.next()).done);i=!0){var u=a.value;if(u.vertexA===t&&u.vertexB===r||u.vertexB===t&&u.vertexA===r)return u}}catch(e){o=!0,A=e}finally{try{!i&&s.return&&s.return()}finally{if(o)throw A}}var c=r.edges,l=!0,g=!1,f=void 0;try{for(var h,p=c[Symbol.iterator]();!(l=(h=p.next()).done);l=!0){var d=h.value;if(d.vertexA===t&&d.vertexB===r||d.vertexB===t&&d.vertexA===r)return d}}catch(e){g=!0,f=e}finally{try{!l&&p.return&&p.return()}finally{if(g)throw f}}return e.makeUniqueEdgeByVertex(t,r)}},{key:"mergeCoplanarFaceOnFaceList",value:function(t,r){var n=new Set;t.faceIndexMap.forEach((function(e,t){t.getEdges().forEach((function(e){n.add(e)}))}));var i=!0,o=!1,A=void 0;try{for(var a,s=n[Symbol.iterator]();!(i=(a=s.next()).done);i=!0){var u=a.value,c=u.halfEdges;if(u.isSoft&&2===c.length){var l=e.mergeFaceWithHalfEdge(c[0],c[1],r);if(null!==l){var g=c[0].loop.face,f=c[1].loop.face,h=t.faceIndexMap.get(g),p=t.faceIndexMap.get(f);void 0!==h&&void 0!==p&&(t.faceIndexMap.delete(g),t.faceIndexMap.delete(f),t.faceIndexMap.set(l,h),t.edgeIndexMap.delete(u))}}}}catch(e){o=!0,A=e}finally{try{!i&&s.return&&s.return()}finally{if(o)throw A}}}},{key:"mergeFaceWithHalfEdge",value:function(t,r,n){if(null===t.loop||null===t.loop.face||null===r.loop||null===r.loop.face)return null;var o=t.loop.face,a=r.loop.face;if(null===o||null===a)return null;var u=o.surface,c=a.surface;if(!(u instanceof i.Plane&&c instanceof i.Plane&&t.reversed!==r.reversed))return null;if(u.normal.isSameDirection(c.normal,n)){var l=o.outerLoop,g=a.outerLoop,f=e.findHalfEdgePosInLoop(l,t),h=e.findHalfEdgePosInLoop(g,r);if(-1===f||-1===h)return null;for(var p=l.halfEdges,d=g.halfEdges,I=p.length,y=d.length,C=[],E=f+1,B=f+I;E<B;++E)C.push(p[E%I]);for(var v=h+1,m=h+y;v<m;++v)C.push(d[v%y]);var Q=new A.Face(u);Q.setOuterLoop(new s.Loop(C),o.sameDir);var b=t.edge;return t.vertexA.removeEdge(b),r.vertexA.removeEdge(b),Q}return null}},{key:"findHalfEdgePosInLoop",value:function(e,t){for(var r=e.halfEdges,n=-1,i=0,o=r.length;i<o;++i)if(r[i]===t){n=i;break}return n}},{key:"mergeCollinearEdgeOnFace",value:function(t,r){var n=new Set;t.faceIndexMap.forEach((function(e,t){t.getVertices().forEach((function(e){n.add(e)}))})),n.forEach((function(n){e.judgeValidityForVertexByEdges(n,r)&&e.removeVertex(t,n)}))}},{key:"judgeValidityForVertexByEdges",value:function(e,t){var r=e.edges;if(2===r.length){var n=r[0],o=r[1],A=!0,a=!1,s=void 0;try{for(var u,c=n.halfEdges[Symbol.iterator]();!(A=(u=c.next()).done);A=!0){if(0!==u.value.loop.face.innerLoops.length)return!1}}catch(e){a=!0,s=e}finally{try{!A&&c.return&&c.return()}finally{if(a)throw s}}var l=!0,g=!1,f=void 0;try{for(var h,p=o.halfEdges[Symbol.iterator]();!(l=(h=p.next()).done);l=!0){if(0!==h.value.loop.face.innerLoops.length)return!1}}catch(e){g=!0,f=e}finally{try{!l&&p.return&&p.return()}finally{if(g)throw f}}if(n.isSoft===o.isSoft&&n.curve instanceof i.Line3d&&o.curve instanceof i.Line3d){var d=n.curve,I=o.curve;if(d.direction.isParallel(I.direction,t))return!0}}return!1}},{key:"removeVertex",value:function(t,r){var n=r.getLeadInHalfEdges(),i=r.getLeadOutHalfEdges();if(2===n.length||2===i.length){var o=i[0],A=i[1],s=n[0],u=n[1],c=o.edge,l=A.edge,g=o.vertexB,f=A.vertexB,h=e.makeEdgeByVertex(g,f);h.isSoft=c.isSoft;var p=new a.HalfEdge(h,!0);e.updateFaceWithHF(t.faceIndexMap,p,o,s,u),p=new a.HalfEdge(h,!1),e.updateFaceWithHF(t.faceIndexMap,p,A,s,u),r.removeEdge(c),r.removeEdge(l),g.removeEdge(c),f.removeEdge(l);var d=t.edgeIndexMap.get(c),I=t.edgeIndexMap.get(l);d&&I&&d.bcIndex===I.bcIndex&&(t.edgeIndexMap.delete(c),t.edgeIndexMap.delete(l),d.posIndex>I.posIndex?t.edgeIndexMap.set(h,I):t.edgeIndexMap.set(h,d))}}},{key:"updateFaceWithHF",value:function(e,t,r,n,i){var o=new Array;o.push(t);for(var a=r.next;null!==a&&a!==n&&a!==i;)o.push(a),a=a.next;var u=new s.Loop(o),c=r.loop.face,l=new A.Face(c.surface);l.setOuterLoop(u,c.sameDir);var g=e.get(c);void 0!==g&&(e.delete(c),e.set(l,g))}},{key:"getEdgesFromShell",value:function(e){return Array.from(e.getEdges())}},{key:"getEdgesFromFace",value:function(e){var t=[];return e.outerLoop.halfEdges.map((function(e){return t.push(e.edge)})),e.innerLoops.map((function(e){return e.halfEdges.map((function(e){return t.push(e.edge)}))})),t}},{key:"reversedMapInfo",value:function(e,t){var r=new Map,n=e.edges,i=!0,o=!1,A=void 0;try{for(var a,s=n[Symbol.iterator]();!(i=(a=s.next()).done);i=!0){var u=a.value;r.set(u,[])}}catch(e){o=!0,A=e}finally{try{!i&&s.return&&s.return()}finally{if(o)throw A}}t.edgeIndexMap.forEach((function(e,t){var i=n[e.bcIndex],o=r.get(i);o&&o.push({edge:t,order:e.posIndex})}));var c=new Map;r.forEach((function(e,t){e.sort((function(e,t){return e.order-t.order}));var r=[];e.forEach((function(e){r.push(e.edge)})),c.set(t,r)}));var l=[],g=new Map,f=e.faces;return f.forEach((function(e){g.set(e,new Array)})),t.faceIndexMap.forEach((function(e,t){var r=f[e],n=g.get(r);n&&n.push(t),l.push(t)})),{faceList:l,faceMap:g,edgeMap:c}}}]),e}();p.defaultNormTol=1-Math.cos(Math.PI/9),t.Polygonize=p},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(e){return n(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":n(e)},o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function A(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0});var a=r(3),s=r(716),u=r(2055),c=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return o(e,null,[{key:"polygonMeshOnSingleSurface3d",value:function(t,r,n,i,o,A,s){var u=e.polygonMeshOnSurface3d(t,r,n,i,o,A,s);return null===u||i instanceof a.Plane||u.planarMesh(),u}},{key:"polygonMeshOnSurface3d",value:function(t,r,n,i,o,A,s){return i instanceof a.Plane?e.polygonMeshOnPlane(t,r,i,o,A):e.polygonMeshOnNonPlane(t,r,n,i,o,A,s)}},{key:"polygonMeshOnPlane",value:function(e,t,r,n,i){var o=[],A=[];return e.forEach((function(e){var t=u.PolygonOnUVFace.tessBoundedCurve3d(e,i);o.push(t)})),t.forEach((function(e){var t=[];e.forEach((function(e){var r=u.PolygonOnUVFace.tessBoundedCurve3d(e,i);t.push(r)})),A.push(t)})),s.PolygonMesh.makePolygonMeshByLoops(o,A,r,n)}},{key:"polygonMeshOnNonPlane",value:function(t,r,n,i,o,A,c){var l=e.getOrderUVBoundedCurve(i,t,r,c),g=void 0;g=i instanceof a.NurbsSurface?e.calculateUVOffset(i,l.uvContour,c):[0,0];var f=u.PolygonOnUVFace.tessUVDomain(i,l.uvContour,g[0],g[1],A),h=u.PolygonOnUVFace.getUVPolygons(l.uvContour,l.uvHole,g,f,c);if(0===h.length||0===h[0].length)return new s.PolygonMesh;var p=u.PolygonOnUVFace.getRectMesh(i,f),d=e.getEndpointOfUVBoundedCurve(l.uvContour,l.uvHole,g),I=e.getPointsByDegenerateEdge(n,t,r),y=[],C=[],E=e.getPolygonByRectMesh(h,p,i,o,d,C,y,I,c);return 0===E.length?new s.PolygonMesh:s.PolygonMesh.makePolygonMeshByPolygon(E,C,y,o)}},{key:"getOrderUVBoundedCurve",value:function(e,t,r,n){var i={contour:t,holes:r},o=e.faceToUV(i,n).mapping,A=[],a=!0,s=!1,u=void 0;try{for(var c,l=t[Symbol.iterator]();!(a=(c=l.next()).done);a=!0){var g=c.value;A.push(o.get(g))}}catch(e){s=!0,u=e}finally{try{!a&&l.return&&l.return()}finally{if(s)throw u}}var f=[],h=!0,p=!1,d=void 0;try{for(var I,y=r[Symbol.iterator]();!(h=(I=y.next()).done);h=!0){var C=I.value,E=[],B=!0,v=!1,m=void 0;try{for(var Q,b=C[Symbol.iterator]();!(B=(Q=b.next()).done);B=!0){var _=Q.value;E.push(o.get(_))}}catch(e){v=!0,m=e}finally{try{!B&&b.return&&b.return()}finally{if(v)throw m}}f.push(E)}}catch(e){p=!0,d=e}finally{try{!h&&y.return&&y.return()}finally{if(p)throw d}}return{uvContour:A,uvHole:f}}},{key:"getEndpointOfUVBoundedCurve",value:function(e,t,r){var n=[],i=[];i.push(e),null!==t&&i.push.apply(i,A(t));var o=!0,a=!1,s=void 0;try{for(var u,c=i[Symbol.iterator]();!(o=(u=c.next()).done);o=!0){var l=u.value,g=[],f=!0,h=!1,p=void 0;try{for(var d,I=l[Symbol.iterator]();!(f=(d=I.next()).done);f=!0){var y=d.value.startPoint;g.push({x:y.x+r[0],y:y.y+r[1]})}}catch(e){h=!0,p=e}finally{try{!f&&I.return&&I.return()}finally{if(h)throw p}}n.push(g)}}catch(e){a=!0,s=e}finally{try{!o&&c.return&&c.return()}finally{if(a)throw s}}return n}},{key:"getPointsByDegenerateEdge",value:function(e,t,r){for(var n=[],i=0,o=e.length;i<o;++i)for(var A=e[i],a=0,s=A.length;a<s;++a)A[a]&&(0==i?n.push(t[a].startPoint):n.push(r[i-1][a].startPoint));return n}},{key:"calculateUVOffset",value:function(t,r,n){n=n||a.Tolerance.Tolerance.global;var i=t.isUPeriodic(n),o=t.isVPeriodic(n);if(!i&&!o||0===r.length)return[0,0];var A=0,s=0,u=!0,c=!1,l=void 0;try{for(var g,f=r[Symbol.iterator]();!(u=(g=f.next()).done);u=!0){var h=g.value;A+=h.startPoint.x,s+=h.startPoint.y}}catch(e){c=!0,l=e}finally{try{!u&&f.return&&f.return()}finally{if(c)throw l}}A/=r.length,s/=r.length;var p=t.domainU,d=t.domainV,I=p.end-p.start,y=d.end-d.start;return[e.calculateOffset(p.start,p.end,I,A)*I,e.calculateOffset(d.start,d.end,y,s)*y]}},{key:"calculateOffset",value:function(e,t,r,n){for(var i=0;n>t;)n-=r,i--;for(;n<e;)n+=r,i++;return i}},{key:"getPolygonByRectMesh",value:function(t,r,n,i,o,s,u,c,l){for(var g=[],f=[],h=new Map,p=new Map,d=a.simplifyPolygonsByHorizontal(t,!0),I=a.simplifyPolygonsByHorizontal(d,!1),y=0,C=r.length;y<C;++y){var E=r[y];a.addRect(I,E,g,f,h,p)}var B=[],v=e.dealWithInnerPolygons(g,B),m=e.dealWithIntersectPolygons(f,B,t),Q=[],b=new Map;e.mergeInnerPolygons(Q,s,v,b,n,i,B);var _=new Map,S=[];o.forEach((function(e){return S.push.apply(S,A(e))}));var w=Q.length,D=!0,R=!1,M=void 0;try{for(var x,P=m[Symbol.iterator]();!(D=(x=P.next()).done);D=!0){var T=x.value;e.mergeIntersectPolygons(Q,s,T,b,n,i,B[w],S,_,c,l),w++}}catch(e){R=!0,M=e}finally{try{!D&&P.return&&P.return()}finally{if(R)throw M}}if(_.size!==S.length)return[];var F=e.getBoundedEndpointOnPolygon(o,_);return 0===F.length?[]:(u.push.apply(u,A(F)),Q)}},{key:"getBoundedEndpointOnPolygon",value:function(e,t){var r=[],n=!0,i=!1,o=void 0;try{for(var A,s=e[Symbol.iterator]();!(n=(A=s.next()).done);n=!0){var u=A.value;if(0===u.length)break;var c=u[0],l=t.get(c);if(!l)break;for(var g=1,f=u.length;g<f;++g){var h=u[g],p=t.get(h);if(!p)return[];a.Num.isEqual(c.x,h.x)&&a.Num.isEqual(c.y,h.y)||(r.push(l),r.push(p)),l=p,c=h}var d=u[0],I=t.get(d);if(!I)return[];a.Num.isEqual(c.x,d.x)&&a.Num.isEqual(c.y,d.y)||(r.push(l),r.push(I))}}catch(e){i=!0,o=e}finally{try{!n&&s.return&&s.return()}finally{if(i)throw o}}return r}},{key:"dealWithInnerPolygons",value:function(t,r){var n=new Map,o=[],A=!0,a=!1,s=void 0;try{for(var u,c=function(){var t=u.value,i=e.makePlaneByRectMeshNode(t);if(null===i)return{v:[]};r.push(i);var A=[];t.corners.forEach((function(t){var r=e.getPolyPtBySurfPtMapPolyPt(n,t);A.push(r)})),o.push(A)},l=t[Symbol.iterator]();!(A=(u=l.next()).done);A=!0){var g=c();if("object"===(void 0===g?"undefined":i(g)))return g.v}}catch(e){a=!0,s=e}finally{try{!A&&l.return&&l.return()}finally{if(a)throw s}}return o}},{key:"dealWithIntersectPolygons",value:function(t,r,n){for(var o=[],A=function(i,A){var s=t[i],u=e.makePlaneByRectMeshNode(s);if(null===u)return{v:[]};r.push(u);var c=[];s.corners.forEach((function(e){c.push({x:e.uv[0],y:e.uv[1]})}));for(var l=a.simplifyPolygons(a.clipping(n,c)),g=0,f=l.length;g<f;++g){var h=l[g].length;if(h>0){var p=l[g][0],d=l[g][h-1];a.Num.isEqual(p.x,d.x)&&a.Num.isEqual(p.y,d.y)&&l[g].pop()}}for(var I=[],y=0;y<4;++y){var C=s.getAllCorners(y),E=!0,B=!1,v=void 0;try{for(var m,Q=function(){var e=m.value;s.corners.some((function(t){return t===e}))||I.push({x:e.uv[0],y:e.uv[1],id:e.id})},b=C[Symbol.iterator]();!(E=(m=b.next()).done);E=!0)Q()}catch(e){B=!0,v=e}finally{try{!E&&b.return&&b.return()}finally{if(B)throw v}}}var _=a.Tolerance.Tolerance.global;if(I.length){var S=!0,w=!1,D=void 0;try{for(var R,M=I[Symbol.iterator]();!(S=(R=M.next()).done);S=!0){var x=R.value,P=new a.Point2d(x.x,x.y),T=!0,F=!1,O=void 0;try{for(var L,N=l[Symbol.iterator]();!(T=(L=N.next()).done);T=!0)for(var k=L.value,G=0,U=k.length;G<U;++G){var j=new a.LineSeg2d(new a.Point2d(k[G].x,k[G].y),new a.Point2d(k[(G+1)%U].x,k[(G+1)%U].y));if((j.direction.isParallel(new a.Vector2d(1,0),_)||j.direction.isParallel(new a.Vector2d(0,1),_))&&j.isPointOnCurve(P,_)){k.splice(G+1,0,x);break}}}catch(e){F=!0,O=e}finally{try{!T&&N.return&&N.return()}finally{if(F)throw O}}}}catch(e){w=!0,D=e}finally{try{!S&&M.return&&M.return()}finally{if(w)throw D}}}o.push(l)},s=0,u=t.length;s<u;++s){var c=A(s);if("object"===(void 0===c?"undefined":i(c)))return c.v}return o}},{key:"mergeInnerPolygons",value:function(e,t,r,n,i,o,A){var s=0,u=!0,c=!1,l=void 0;try{for(var g,f=function(){var r=g.value,u=A[s++],c=[];r.forEach((function(e){var t=n.get(e);if(!t){var r=new a.UV(e.x,e.y);t=i.getPoint(r),n.set(e,t)}c.push(t)})),0!==c.length&&(o||c.reverse(),e.push(c),t.push(u))},h=r[Symbol.iterator]();!(u=(g=h.next()).done);u=!0)f()}catch(e){c=!0,l=e}finally{try{!u&&h.return&&h.return()}finally{if(c)throw l}}}},{key:"mergeIntersectPolygons",value:function(t,r,n,i,o,A,s,u,c,l,g){var f=!0,h=!1,p=void 0;try{for(var d,I=function(){var n=d.value,f=new Set;if(n.forEach((function(t){var r=e.findPointInMap(i,t);if(null===r){var n=new a.UV(t.x,t.y);r=o.getPoint(n),i.set(t,r)}var A=!0,s=!1,h=void 0;try{for(var p,d=l[Symbol.iterator]();!(A=(p=d.next()).done);A=!0){var I=p.value;I.isEqual(r,g.distTol)&&(r=I)}}catch(e){s=!0,h=e}finally{try{!A&&d.return&&d.return()}finally{if(s)throw h}}f.add(r),e.matchBoundedEndpoint(u,c,t,r)})),0!==f.size){var h=Array.from(f);A||h.reverse(),t.push(h),r.push(s)}},y=n[Symbol.iterator]();!(f=(d=y.next()).done);f=!0)I()}catch(e){h=!0,p=e}finally{try{!f&&y.return&&y.return()}finally{if(h)throw p}}}},{key:"matchBoundedEndpoint",value:function(e,t,r,n){var i=!0,o=!1,A=void 0;try{for(var s,u=e[Symbol.iterator]();!(i=(s=u.next()).done);i=!0){var c=s.value;if(a.Num.isEqual(c.x,r.x)&&a.Num.isEqual(c.y,r.y)){t.set(c,n);break}}}catch(e){o=!0,A=e}finally{try{!i&&u.return&&u.return()}finally{if(o)throw A}}}},{key:"findPointInMap",value:function(e,t){var r=t.x,n=t.y,i=!0,o=!1,A=void 0;try{for(var s,u=e.entries()[Symbol.iterator]();!(i=(s=u.next()).done);i=!0){var c=s.value;if(a.Num.isEqual(r,c[0].x)&&a.Num.isEqual(n,c[0].y))return c[1]}}catch(e){o=!0,A=e}finally{try{!i&&u.return&&u.return()}finally{if(o)throw A}}return null}},{key:"makePlaneByRectMeshNode",value:function(e){if(e.corners.length<4)return null;var t=new a.Point3d(e.corners[0].point),r=new a.Point3d(e.corners[1].point),n=new a.Point3d(e.corners[2].point),i=void 0;return t.isEqual(r)?(i=new a.Point3d(e.corners[3].point),a.Plane.makePlaneByTreePoints(t,n,i)):t.isEqual(n)?(i=new a.Point3d(e.corners[3].point),a.Plane.makePlaneByTreePoints(r,n,i)):r.isEqual(n)?(i=new a.Point3d(e.corners[3].point),a.Plane.makePlaneByTreePoints(t,r,i)):a.Plane.makePlaneByTreePoints(t,r,n)}},{key:"getPolyPtBySurfPtMapPolyPt",value:function(e,t){var r=e.get(t);return r||(r={x:t.uv[0],y:t.uv[1]},e.set(t,r)),r}}]),e}();t.PolygonMeshOnSurface=c},function(e,t,r){"use strict";var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function i(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0});var o=r(3),A=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return n(e,null,[{key:"getUVPolygons",value:function(e,t,r,n,A){var a=this,s=this.makeCrosswordLine(n);if(0===s.length)return[];var u=[];u.push(e),null!==t&&u.push.apply(u,i(t));for(var c=[],l=function(e,t){var n=[];u[e].forEach((function(e){var t=a.boundedCurveIntersectIsoLine(e,s,A);t.splice(t.length-1,1),n.push.apply(n,i(t))})),o.LoopCCW.isPolygonCCW2D(n)!==(0===e)&&n.reverse();var l=new Array;n.forEach((function(e){l.push({x:e.x+r[0],y:e.y+r[1]})})),c.push(l)},g=0,f=u.length;g<f;g++)l(g);return c}},{key:"makeCrosswordLine",value:function(e){if(2!==e.length)return[];for(var t=e[0],r=e[1],n=[],i=1,A=t.length;i<A-1;i++)n.push(new o.Line2d(new o.Point2d(t[i],0),o.Vector2d.yAxis));for(var a=[],s=1,u=r.length;s<u-1;s++)a.push(new o.Line2d(new o.Point2d(0,r[s]),o.Vector2d.xAxis));return[n,a]}},{key:"boundedCurveIntersectIsoLine",value:function(e,t,r){var n=new Array,A=e.getBounding(),a=A.min,s=A.max;t[0].forEach((function(t){var A=t.p0.x;if(o.Num.isInRange(A,a.x,s.x,!0,!0,r.distTol)){var u=e.intersectCurve(t);n.push.apply(n,i(u))}})),t[1].forEach((function(t){var A=t.p0.y;if(o.Num.isInRange(A,a.y,s.y,!0,!0,r.distTol)){var u=e.intersectCurve(t);n.push.apply(n,i(u))}})),n.push({point:e.startPoint,param1:e.domain.start,param2:0,isOverlap:!1}),n.push({point:e.endPoint,param1:e.domain.end,param2:0,isOverlap:!1}),n.sort((function(e,t){return e.param1<t.param1?-1:e.param1>t.param1?1:0})),this.filterRepeatData(n,r);var u=[];return n.forEach((function(e){u.push(e.point)})),u}},{key:"tessUVDomain",value:function(e,t,r,n,i){var A=i,a=this.getUVBox(t,r,n),s=void 0;if(e instanceof o.ConicalSurface||e instanceof o.CylindricalSurface)s=this.adaptiveDomainOfCylinderCone(e,a[0],a[1],A);else if(e instanceof o.SurfaceOfLinearExtrusion)s=this.adaptiveDomainOfLinearExtrusion(e,a[1],A);else if(e instanceof o.RevolveSurface)s=this.adaptiveDomainOfRevolve(e,a[0],a[1],A);else if(e instanceof o.ToroidalSurface)s=this.adaptiveDomainOfToroidal(a[0],a[1],A);else{if(!(e instanceof o.NurbsSurface))throw"not implement";s=this.adaptiveDomainOfNurbs(e,a[0],a[1],A)}return s}},{key:"adaptiveDomainOfCylinderCone",value:function(t,r,n,i){var A=void 0;if(A=(o.ConicalSurface,t.radius),o.Num.isEqual(A,0))return[];var a=new o.Arc3d(new o.Circle3d(t.ccs,A),r.start,r.end).tessCurveAdaptiveByNormalTol(r.start,r.end,i),s=a.length,u=new Array,c=!0,l=!1,g=void 0;try{for(var f,h=a[Symbol.iterator]();!(c=(f=h.next()).done);c=!0){var p=f.value;u.push(p.t)}}catch(e){l=!0,g=e}finally{try{!c&&h.return&&h.return()}finally{if(l)throw g}}var d=r.length*A,I=n.length,y=Math.floor(I/d*s);return y=Math.min(y>0?y:1,e.maxDiscreteSeg),[u,this.splitDomain(n,n.length/y)]}},{key:"adaptiveDomainOfLinearExtrusion",value:function(t,r,n){for(var i=t.baseCurve,o=i.getApproximatePtInfosByNormalTol(n),A=o.length,a=new Array,s=0;s<A;++s)a.push(o[s].t);var u=i.length,c=t.height,l=Math.floor(c/u*A);return l=l>0?l:1,l=Math.min(l>0?l:1,e.maxDiscreteSeg),[a,this.splitDomain(r,r.length/l)]}},{key:"adaptiveDomainOfRevolve",value:function(t,r,n,i){var A=t.baseCurve,a=A.domain.middle,s=new o.LineSeg2d(new o.Point2d(r.start,a),new o.Point2d(r.end,a)),u=t.uvCurveTo3d(s),c=u.tessCurveAdaptiveByNormalTol(r.start,r.end,i).length,l=this.splitDomain(r,r.length/c),g=A.tessCurveAdaptiveByNormalTol(n.start,n.end,i),f=[],h=g.length,p=Math.floor(A.length/u.length*c)+1;if(p=Math.min(p,e.maxDiscreteSeg),h<c/2&&h<p)f=this.splitDomain(n,n.length/p);else for(var d=0;d<h;++d)f.push(g[d].t);return[l,f]}},{key:"adaptiveDomainOfToroidal",value:function(e,t,r){var n=new o.Circle3d(new o.CCS3d,1),i=new o.Arc3d(n,e.start,e.end).tessCurveAdaptiveByNormalTol(e.start,e.end,r).length,A=this.splitDomain(e,e.length/i),a=new o.Arc3d(n,t.start,t.end).tessCurveAdaptiveByNormalTol(t.start,t.end,r).length;return[A,this.splitDomain(t,t.length/a)]}},{key:"splitDomain",value:function(e,t){for(var r=e.start,n=e.end,i=e.length,o=Math.ceil(i/t),A=i/o,a=new Array,s=0;s<o;++s)a.push(r+s*A);return a.push(n),a}},{key:"adaptiveDomainOfNurbs",value:function(e,t,r,n){var i=t.end,o=t.start,A=r.end,a=r.start,s=[];e.degreeU>1&&e.isoCurve((A+a)/2,!0).tessCurveAdaptiveByNormalTol(o,i,n).forEach((function(e){s.push(e.t)}));var u=e.controlPoints.length*e.degreeU;if(s.length<u){s.splice(0,s.length);for(var c=(i-o)/(u-1),l=0;l<u;l++)s.push(o+c*l)}var g=[];e.degreeV>1&&e.isoCurve((i+o)/2,!1).tessCurveAdaptiveByNormalTol(a,A,n).forEach((function(e){g.push(e.t)}));var f=e.controlPoints[0].length*e.degreeV;if(g.length<f){g.splice(0,g.length);for(var h=(A-a)/(f-1),p=0;p<f;p++)g.push(a+h*p)}return[s,g]}},{key:"getRectMesh",value:function(e,t){for(var r=t[0].length-1,n=t[1].length-1,i=new Array(r*n),A=[],a=0;a<n+1;a++){for(var s=new Array,u=0;u<r+1;u++){var c=t[0][u],l=t[1][a],g=new o.UV(c,l),f=e.tangentUWithLen(g),h=e.tangentVWithLen(g),p=e.getPoint(g),d=f.cross(h).normalized();s.push(new o.SurfacePoint([p.x,p.y,p.z],[d.x,d.y,d.z],[g.u,g.v],-1,o.Num.isZero(d.length)))}A.push(s)}for(var I=0;I<n;I++)for(var y=0;y<r;y++){var C=[A[n-I-1][y],A[n-I-1][y+1],A[n-I][y+1],A[n-I][y]];i[I*r+y]=new o.RectMeshNode(e,C)}return i}},{key:"getUVBox",value:function(e,t,r){var n=new o.BBox2d,i=!0,A=!1,a=void 0;try{for(var s,u=e[Symbol.iterator]();!(i=(s=u.next()).done);i=!0){var c=s.value;n.merge(c.getBounding())}}catch(e){A=!0,a=e}finally{try{!i&&u.return&&u.return()}finally{if(A)throw a}}var l=n.min,g=n.max,f=l.x+t,h=l.y+r,p=g.x+t,d=g.y+r;return[new o.Interval(f,p),new o.Interval(h,d)]}},{key:"filterRepeatData",value:function(e,t){if(!(e.length<2))for(var r=e[0].param1,n=0,i=1,A=e.length;i<A-n;i++)o.Num.isEqual(e[i].param1,r,t.distTol)?(e.splice(i,1),n++,i--):r=e[i].param1}},{key:"tessBoundedCurve3d",value:function(e,t){var r=e.domain,n=e.tessCurveAdaptiveByNormalTol(r.start,r.end,t);if(n.length<2)return[e.startPoint,e.endPoint];var i=[];return n.forEach((function(e){i.push(e.point)})),i}}]),e}();A.maxDiscreteSeg=100,t.PolygonOnUVFace=A},function(e,t,r){"use strict";var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();function i(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0});var o=r(3),A=r(716),a=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return n(e,null,[{key:"mergePolygonMesh",value:function(t,r,n,i,o){if(!e.validPolygonMeshList(t,n,i))return{pgm:new A.PolygonMesh,range:[]};e.buildCommonPtPosLst(n).forEach((function(r){e.mergeCommonPointForPolygonMeshes(t,r)}));for(var a=e.buildCommonEdgePosList(i),s=0,u=a.length;s<u;s++)a[s].length<2||e.mergeCommonEdgeByPolygonMesh(t,a[s],r[s],o);return e.mergePolygonMeshWithComInfo(t,a)}},{key:"mergeCommonPointForPolygonMeshes",value:function(t,r){if(!(r.length<2)){var n=[];r.forEach((function(e){var r=e[0],i=e[1];if(!(r<0||r>=t.length)){var o=t[r];if(!(null===o||i<0||i>=o.boundedEdgePos.length)){var A=o.boundedEdgePos[i];if(null!==A&&0!==A.length){var a=A[0].x;if(!(a<0||a>=o.mSurfaces.length))if(null!==o.mSurfaces[a]){var s=o.boundedIndices[i][0];n.push([r,s])}}}}})),e.updateCommonPtPos(t,n)}}},{key:"updateCommonPtPos",value:function(e,t){for(var r=t[0],n=e[r[0]].coords[r[1]],i=1,o=t.length;i<o;i++){var A=t[i];e[A[0]].coords.splice(A[1],1,n)}}},{key:"buildCommonPtPosLst",value:function(e){for(var t=e.length,r=new Map,n=0;n<t;++n)for(var o=e[n],A=0,a=o.length;A<a;++A){var s=o[A],u=r.get(s),c=[n,A];if(u){var l=[];l.push.apply(l,i(u)),l.push(c),r.set(s,l)}else r.set(s,[c])}var g=[];return r.forEach((function(e,t){g.push(e)})),g}},{key:"buildCommonEdgePosList",value:function(e){for(var t=new Map,r=0,n=e.length;r<n;++r)for(var i=e[r],o=0,A=i.length;o<A;++o){var a=i[o],s=t.get(a.index);if(s)s.push({faceI:r,edgeI:o,isReversed:i[o].isReversed});else{var u=[];u.push({faceI:r,edgeI:o,isReversed:i[o].isReversed}),t.set(a.index,u)}}var c=[];return t.forEach((function(e,t){c.push(e)})),c}},{key:"mergeCommonEdgeByPolygonMesh",value:function(t,r,n,o){var A=r.length;if(e.validCommonEdgeData(t,r,o)){for(var a=[],s=[],u=0;u<A;++u){var c=r[u],l=t[c.faceI],g=[].concat(i(l.boundedIndices[c.edgeI])),f=[].concat(i(l.boundedEdgePos[c.edgeI]));o[c.faceI][c.edgeI]&&(g.reverse(),f.reverse());for(var h=g.length,p=[],d=1;d<h-1;d++){var I=l.coords[g[d]],y=n.getParam(I);p.push(y),s.push(y)}a.push(p)}s=s.sort((function(e,t){return e-t}));e.uniqueDataForList(s,.001);var C=[];s.forEach((function(e){C.push({p:e,pt:n.getPoint(e)})}));var E=0,B=!0,v=!1,m=void 0;try{for(var Q,b=a[Symbol.iterator]();!(B=(Q=b.next()).done);B=!0){var _=Q.value,S=e.splitParamPtListByParams(C,_,.001),w=r[E];t[w.faceI].insertPtsByPtsList(w.edgeI,S,o[w.faceI][w.edgeI]),E++}}catch(e){v=!0,m=e}finally{try{!B&&b.return&&b.return()}finally{if(v)throw m}}}}},{key:"splitParamPtListByParams",value:function(e,t,r){var n=[],i=e.length,A=0,a=!0,s=!1,u=void 0;try{for(var c,l=t[Symbol.iterator]();!(a=(c=l.next()).done);a=!0)for(var g=c.value,f=[],h=A;h<i;++h)if(f.push(e[h].pt),o.Num.isBiggerOrEqual(e[h].p,g,r)){n.push(f),A=h+1;break}}catch(e){s=!0,u=e}finally{try{!a&&l.return&&l.return()}finally{if(s)throw u}}for(var p=[],d=A;d<i;++d)p.push(e[d].pt);return n.push(p),n}},{key:"uniqueDataForList",value:function(e,t){if(!(e.length<2))for(var r=e[0],n=0,i=1,A=e.length;i<A-n;i++)o.Num.isEqual(e[i],r,t)?(e.splice(i,1),n++,i--):r=e[i]}},{key:"validCommonEdgeData",value:function(e,t,r){if(t.length<2)return!1;var n=null,i=null,o=!0,A=!1,a=void 0;try{for(var s,u=t[Symbol.iterator]();!(o=(s=u.next()).done);o=!0){var c=s.value,l=c.faceI,g=c.edgeI;if(l<0||l>=e.length)return!1;if(g<0||g>=e[l].boundedIndices.length)return!1;var f=e[c.faceI],h=f.boundedIndices[g],p=f.boundedEdgePos[g],d=h.length;if(d<2||d!==p.length+1)return!1;var I=f.coords[h[0]],y=f.coords[h[d-1]];if(null===n)r[l][g]?(n=y,i=I):(n=I,i=y);else if(r[l][g]){if(n!==y||i!==I)return!1}else if(n!==I||i!==y)return!1}}catch(e){A=!0,a=e}finally{try{!o&&u.return&&u.return()}finally{if(A)throw a}}return!0}},{key:"validPolygonMeshList",value:function(e,t,r){if(t.length!==e.length)return!1;for(var n=0,i=e.length;n<i;++n){var o=e[n];if(r[n].length!==o.boundedIndices.length)return!1}return!0}},{key:"mergePolygonMeshWithComInfo",value:function(e,t){for(var r=new A.PolygonMesh,n=[],o=new Map,a=new Map,s=0,u=t.length;s<u;++s)for(var c=1,l=t[s].length;c<l;++c){var g=a.get(t[s][c].faceI);if(g)g.add(t[s][c].edgeI);else{var f=new Set;f.add(t[s][c].edgeI),a.set(t[s][c].faceI,f)}}var h=0,p=0,d=!0,I=!1,y=void 0;try{for(var C,E=e[Symbol.iterator]();!(d=(C=E.next()).done);d=!0){var B,v,m,Q=C.value;Q.postTreatment();var b=new Map,_=Q.coords,S=0,w=!0,D=!1,R=void 0;try{for(var M,x=_[Symbol.iterator]();!(w=(M=x.next()).done);w=!0){var P=M.value,T=o.get(P);if(void 0===T)b.set(S++,h),void 0===o.get(P)&&o.set(P,h++),r.coords.push(P);else b.set(S++,T)}}catch(e){D=!0,R=e}finally{try{!w&&x.return&&x.return()}finally{if(D)throw R}}var F=Q.coordIndices,O=!0,L=!1,N=void 0;try{for(var k,G=F[Symbol.iterator]();!(O=(k=G.next()).done);O=!0){var U=k.value,j=[],V=!0,H=!1,Y=void 0;try{for(var K,q=U[Symbol.iterator]();!(V=(K=q.next()).done);V=!0){var J=K.value;j.push(b.get(J))}}catch(e){H=!0,Y=e}finally{try{!V&&q.return&&q.return()}finally{if(H)throw Y}}r.coordIndices.push(j)}}catch(e){L=!0,N=e}finally{try{!O&&G.return&&G.return()}finally{if(L)throw N}}(B=r.mSurfaces).push.apply(B,i(Q.mSurfaces)),(v=r.isSameDir).push.apply(v,i(Q.isSameDir)),(m=r.markLoop).push.apply(m,i(Q.markLoop)),n.push(r.coordIndices.length-1);for(var W=a.get(p),z=0,X=Q.boundedIndices.length;z<X;++z)if(!W||!W.has(z)){var Z=[],$=!0,ee=!1,te=void 0;try{for(var re,ne=Q.boundedIndices[z][Symbol.iterator]();!($=(re=ne.next()).done);$=!0){var ie=re.value;Z.push(b.get(ie))}}catch(e){ee=!0,te=e}finally{try{!$&&ne.return&&ne.return()}finally{if(ee)throw te}}r.boundedIndices.push(Z)}p++}}catch(e){I=!0,y=e}finally{try{!d&&E.return&&E.return()}finally{if(I)throw y}}return{pgm:r,range:n}}}]),e}();t.PolygonMeshUtil=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(3),i=r(2058),o=r(2059),A=r(2060),a=r(2063);t.triangulate=function(e,t){if(e.surface instanceof n.Plane)return A.triangulateOnPlane(e,e.surface,t);if(e.surface instanceof n.CylindricalSurface||e.surface instanceof n.ConicalSurface||e.surface instanceof n.SurfaceOfLinearExtrusion)return i.triangulateOnCylinderCone(e,e.surface,t);if(e.surface instanceof n.NurbsSurface)return o.triangulateOnNurbsSurface(e,e.surface,t);if(e.surface instanceof n.ToroidalSurface)return a.triangulateOnRevolveSurface(e,e.surface,t);if(e.surface instanceof n.RevolveSurface)return a.triangulateOnRevolveSurface(e,e.surface,t);throw"unsupported"}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(3),i=r(528);t.triangulateOnCylinderCone=function(e,t,r){var o=e.outerLoop.halfEdges.map((function(e){return e.getBoundedCurve()})),A=e.innerLoops.map((function(e){return e.halfEdges.map((function(e){return e.getBoundedCurve()}))}));return i.Mesh.fromTriangledMesh(n.TriangulateDevelopable.triangulateOnDevelopable3d(o,A,t,e.sameDir,r))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(3),i=r(528);t.triangulateOnNurbsSurface=function(e,t,r){var o=e.outerLoop.halfEdges.map((function(e){return e.getBoundedCurve()})),A=e.innerLoops.map((function(e){return e.halfEdges.map((function(e){return e.getBoundedCurve()}))}));return i.Mesh.fromTriangledMesh(n.TriangulateNurbs.triangulateOnNurbsSurface3d(o,A,t,e.sameDir,r))}},function(e,t,r){"use strict";function n(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0});var i=r(3),o=r(2061),A=r(528),a=r(2062);function s(e,t,r){var o=e.getApproximatePoints(t);if(!e.edge.isSoft||!r)return{points:o};var A=c(e.edge);if(!A)return{points:o};for(var a=l(e.vertexA),s=l(e.vertexB),g=new Map,f=[].concat(n(A),n(a),n(s)),h=0,p=f.length;h<p;h++){var d=f[h];if(!g.has(d)){var I=d.surface;if(I instanceof i.Plane){var y=d.sameDir?I.ccs.dz:I.ccs.dz.reversed();g.set(d,y)}}}for(var C=new Array(o.length),E=0,B=o.length;E<B;E++){var v=o[E];0===E&&a.length>0?C[E]=u(a,v,g):E===B-1&&s.length>0?C[E]=u(s,v,g):C[E]=u(A,v,g)}return{points:o,normals:C}}function u(e,t,r){for(var n=void 0,i=0,o=e.length;i<o;i++){var A=e[i],a=r.get(A);a||(a=A.sameDir?A.surface.getNormalOfPoint(t):A.surface.getNormalOfPoint(t).reversed()),n=n?n.added(a):a}return n?n.normalized():void 0}function c(e){for(var t=[],r=e.halfEdges,n=0,i=r.length;n<i;n++){var o=r[n],A=o.loop?o.loop.face:void 0;A&&t.push(A)}if(2===t.length)return t}function l(e){for(var t=new Set,r=e.edges,n=0,i=r.length;n<i;n++){var o=r[n];if(!o.isSoft)return[];var A=c(o);if(!A)return[];for(var a=0,s=A.length;a<s;a++)t.add(A[a])}return Array.from(t)}t.triangulateOnPlane=function(e,t,r){var n=new A.Mesh,i=[],u=0;r=r||{};for(var l=e.sameDir?t.normal:t.normal.reversed(),g=e.getLoops(),f=0,h=g.length;f<h;f++){var p=[],d=g[f].halfEdges,I=0,y=d[0].edge,C=d[d.length-1].edge;y.isSoft&&c(y)||!C.isSoft||!c(C)||(I=d.length-1);for(var E=!1,B=0,v=d.length;B<v;B++){for(var m=s(d[(B+I)%v],r.crvRatioTol,r.needNormal),Q=m.points,b=m.normals,_=E?1:0,S=b&&B!==v-1?Q.length:Q.length-1;_<S;_++){var w=Q[_];p.push(new o.LibtessVertex(w,u++)),o.addVertexNormalUVBy3d(w,n,t,e.sameDir,r.needUV,r.needNormal,void 0,b?b[_]:l)}E=!!b}i.push(p)}for(var D=a.gluTessTriangulate(i,o.toData(e.sameDir?t.normal.toPoint3d():t.normal.reversed().toPoint3d())),R=0;R<D.length;R+=3){var M=o.getOrCreateVertexIndexBy3d(D[R],n,t,e.sameDir,r.needUV,r.needNormal),x=o.getOrCreateVertexIndexBy3d(D[R+1],n,t,e.sameDir,r.needUV,r.needNormal),P=o.getOrCreateVertexIndexBy3d(D[R+2],n,t,e.sameDir,r.needUV,r.needNormal);n.addTriangle([M,x,P])}return r.needUV&&(n.uvIndices=n.triangleIndices),r.needNormal&&(n.normalIndices=n.triangleIndices),n}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0});var i=r(3),o=function(e){function t(e,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==n(t)&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.push(e.x),i.push(e.y),i.push(e.z?e.z:0),i.index=r,i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+n(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,Array),t}();function A(e){return[e.x,e.y,e.z]}t.LibtessVertex=o,t.toData=A,t.getOrCreateVertexIndex=function(e,t,r,n,o,a){if(e.hasOwnProperty("index"))return e.index;var s=new i.UV(e[0],e[1]),u=A(r.getPoint(s));if(t.addVertex(u),o&&t.addUv([s.u,s.v]),a){var c=n?r.getNormal(s):r.getNormal(s).reversed();t.addNormal([c.x,c.y,c.z])}return t.vertices.length-1},t.getOrCreateVertexIndexBy3d=function(e,t,r,n,o,A){if(e.hasOwnProperty("index"))return e.index;t.addVertex(e);var a=void 0;if(o&&(a=r.getParam(new i.Point3d(e[0],e[1],e[2])),t.addUv([a.u,a.v])),A){a||(a=r.getParam(new i.Point3d(e[0],e[1],e[2])));var s=n?r.getNormal(a):r.getNormal(a).reversed();t.addNormal([s.x,s.y,s.z])}return t.vertices.length-1},t.addVertexNormalUV=function(e,t,r,n,i,o,a,s){var u=a||r.getPoint(e);if(t.addVertex(A(u)),i&&t.addUv([e.u,e.v]),o){var c=s;c||(c=n?r.getNormal(e):r.getNormal(e).reversed()),t.addNormal([c.x,c.y,c.z])}},t.addVertexNormalUVBy3d=function(e,t,r,n,i,o,a,s){t.addVertex(A(e));var u=a;if(i&&(u=u||r.getParam(e),t.addUv([u.u,u.v])),o){var c=s;if(!c){var l=r.getNormal(u||r.getParam(e));c=n?l:l.reversed()}t.addNormal([c.x,c.y,c.z])}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(424),i=r(589);function o(e){e!==i.primitiveType.GL_TRIANGLES&&n.consoleLogInDev("expected TRIANGLES but got type: "+e)}function A(e){n.consoleLogInDev("error callback"),n.consoleLogInDev("error number: "+e)}t.gluTessTriangulate=function(e,t){var r=function(){var e=new i.GluTesselator;return e.gluTessCallback(i.gluEnum.GLU_TESS_VERTEX_DATA,(function(e,t){t.push(e)})),e.gluTessCallback(i.gluEnum.GLU_TESS_BEGIN,o),e.gluTessCallback(i.gluEnum.GLU_TESS_ERROR,A),e.gluTessCallback(i.gluEnum.GLU_TESS_COMBINE,(function(e,t,r){return[e[0],e[1],e[2]]})),e.gluTessCallback(i.gluEnum.GLU_TESS_EDGE_FLAG,(function(e){})),e}();r.gluTessNormal(t[0],t[1],t[2]);var n=[];r.gluTessBeginPolygon(n);var a=!0,s=!1,u=void 0;try{for(var c,l=e[Symbol.iterator]();!(a=(c=l.next()).done);a=!0){var g=c.value;r.gluTessBeginContour();var f=!0,h=!1,p=void 0;try{for(var d,I=g[Symbol.iterator]();!(f=(d=I.next()).done);f=!0){var y=d.value;r.gluTessVertex(y,y)}}catch(e){h=!0,p=e}finally{try{!f&&I.return&&I.return()}finally{if(h)throw p}}r.gluTessEndContour()}}catch(e){s=!0,u=e}finally{try{!a&&l.return&&l.return()}finally{if(s)throw u}}return r.gluTessEndPolygon(),n}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(3),i=r(528);t.triangulateOnRevolveSurface=function(e,t,r){var o=e.outerLoop.halfEdges.map((function(e){return e.getBoundedCurve()})),A=e.innerLoops.map((function(e){return e.halfEdges.map((function(e){return e.getBoundedCurve()}))}));return i.Mesh.fromTriangledMesh(n.TriangulateRevSurface.triangulateOnRevolveSurface3d(o,A,t,e.sameDir,r))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2065);t.diffMIxShells=function(e,t){return n.diffShells(e.map((function(e){return e.rawObject()})),t.map((function(e){return e.rawObject()})))},t.diffMIxShell=function(e,t){return n.diffShell(e.rawObject(),t.rawObject())},t.diffMIxFace=function(e,t){return n.diffFace(e.rawObject(),t.rawObject())},t.diffMIxLoop=function(e,t){return n.diffLoop(e.rawObject(),t.rawObject())},t.diffMIxHalfEdge=function(e,t){return n.diffHalfEdge(e.rawObject(),t.rawObject())},t.diffMIxEdge=function(e,t){return n.diffEdge(e.rawObject(),t.rawObject())},t.diffMIxVertex=function(e,t){return n.diffVertex(e.rawObject(),t.rawObject())}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(e){return n(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":n(e)};Object.defineProperty(t,"__esModule",{value:!0});var o=r(3);function A(e,t){if(e.faces.length!==t.faces.length)return console.error("Different in faces num "+e.faces.length+" : "+t.faces.length),!1;var r=!0,n=!1,o=void 0;try{for(var A,s=function(){var e=A.value;return t.faces.some((function(t){return a(e,t)}))?"continue":(console.error("Different in face."),{v:!1})},u=e.faces[Symbol.iterator]();!(r=(A=u.next()).done);r=!0){var c=s();switch(c){case"continue":continue;default:if("object"===(void 0===c?"undefined":i(c)))return c.v}}}catch(e){n=!0,o=e}finally{try{!r&&u.return&&u.return()}finally{if(n)throw o}}return e.getEdges().size===t.getEdges().size||(console.error("Different in shell's edge number."),!1)}function a(e,t){if(e.getLoops().length!==t.getLoops().length)return!1;if(!s(e.outerLoop,t.outerLoop))return!1;if(e.innerLoops.length!==t.innerLoops.length)return!1;var r=!0,n=!1,o=void 0;try{for(var A,a=function(){var e=A.value;return t.innerLoops.some((function(t){return s(e,t)}))?"continue":{v:!1}},u=e.innerLoops[Symbol.iterator]();!(r=(A=u.next()).done);r=!0){var c=a();switch(c){case"continue":continue;default:if("object"===(void 0===c?"undefined":i(c)))return c.v}}}catch(e){n=!0,o=e}finally{try{!r&&u.return&&u.return()}finally{if(n)throw o}}return!0}function s(e,t){if(e.halfEdges.length!==t.halfEdges.length)return!1;var r=0,n=0,i=-1;for(r=0;r<e.halfEdges.length;r++){var A=e.halfEdges[r].getBoundedCurve();if(A){if(-1===i)for(n=0;n<t.halfEdges.length;n++){var a=t.halfEdges[n].getBoundedCurve();if(a&&(o.CurveOverlap.areCurvesTotallyOverlap(A,a)&&A.startPoint.isEqual(a.startPoint))){i=n;break}}if(-1===i)return!1;var s=t.halfEdges[(i+r)%t.halfEdges.length].getBoundedCurve();if(!A.isEqual(s)&&!o.CurveOverlap.areCurvesTotallyOverlap(A,s))return console.error("Different in loop."),!1}}return!0}t.diffShells=function(e,t){if(e.length!==t.length)return console.error("Shells num not equals "+e.length+" : "+t.length),!1;for(var r=new Set,n=0,i=e.length;n<i;n++){for(var o=e[n],a=!1,s=0,u=t.length;s<u;s++){if(!r.has(s))if(A(o,t[s])){r.add(s),a=!0;break}}if(!a)return!1}return!0},t.diffShell=A,t.diffFace=a,t.diffLoop=s,t.diffHalfEdge=function(e,t){var r=e.getBoundedCurve(),n=t.getBoundedCurve();return!(!o.CurveOverlap.areCurvesTotallyOverlap(r,n)||!r.startPoint.isEqual(n.startPoint))||(console.error("Different in half edge."),!1)},t.diffEdge=function(e,t){var r=e.getBoundedCurve(),n=t.getBoundedCurve();return!!o.CurveOverlap.areCurvesTotallyOverlap(r,n)||(console.error("Different in edge."),!1)},t.diffVertex=function(e,t){var r=e.point,n=t.point;return!!r.isEqual(n)||(console.error("Different in vertex"),!1)}},function(e,t,r){"use strict";var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var i=r(2067),o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return n(e,[{key:"toKey",value:function(){return i.idToKey(this.id)}},{key:"equals",value:function(e){return this.id.equals(e.id)}}],[{key:"fromKey",value:function(t){var r=new e;return r.id=i.idFromKey(t),r}},{key:"extractShellKey",value:function(e){return i.extractShellKey(e)}}]),e}();t.MIxName=o},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(236);t.idToKey=function(e){if(e.type===n.TopoObjectType.kShell)return e.uuid;if(e.type===n.TopoObjectType.kFace){var t=e;return t.shellId.uuid+":"+t.index}if(e.type===n.TopoObjectType.kEdge){var r=e,i="",o="",A=!0,a=!1,s=void 0;try{for(var u,c=r.halfEdgeIds[Symbol.iterator]();!(A=(u=c.next()).done);A=!0){var l=u.value;null!=l.faceId?(i=l.faceId.shellId.uuid+":",o=o+"("+l.faceId.index+":"+l.index+")"):o=o+"(-1:"+l.index+")"}}catch(e){a=!0,s=e}finally{try{!A&&c.return&&c.return()}finally{if(a)throw s}}return i+o}if(e.type===n.TopoObjectType.kHalfEdge){var g=e;return g.faceId.shellId.uuid+":"+g.faceId.index+":"+g.index}return""},t.idFromKey=function(e){var t=void 0,r=e.split(":");if(e.endsWith(")")){var i=r[0],o=new n.ShellId(i),A=e.split("("),a=[],s=!0,u=!1,c=void 0;try{for(var l,g=A[Symbol.iterator]();!(s=(l=g.next()).done);s=!0){var f=l.value.replace(")","").split(":");if(""!==f[1]){var h=new n.FaceId(o,parseInt(f[0],void 0)),p=new n.HalfEdgeId(h,parseInt(f[1],void 0));a.push(p)}}}catch(e){u=!0,c=e}finally{try{!s&&g.return&&g.return()}finally{if(u)throw c}}t=new n.EdgeId(a)}else if(1===r.length)t=new n.ShellId(r[0]);else if(2===r.length){var d=parseInt(r[1],void 0);t=new n.FaceId(new n.ShellId(r[0]),d)}else{var I=parseInt(r[1],void 0),y=parseInt(r[2],void 0);t=new n.HalfEdgeId(new n.FaceId(new n.ShellId(r[0]),I),y)}return t},t.extractShellKey=function(e){var t=e.split(":");if(t.length>0)return t[0]}},function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0});var i={interceptors:!0,RequestClient:!0,parseCDN:!0,RequestClientParam:!0};Object.defineProperty(t,"RequestClient",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"parseCDN",{enumerable:!0,get:function(){return s.parseCDN}}),Object.defineProperty(t,"RequestClientParam",{enumerable:!0,get:function(){return u.RequestClientParam}}),t.interceptors=void 0;var o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var t=g();if(t&&t.has(e))return t.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var A=i?Object.getOwnPropertyDescriptor(e,o):null;A&&(A.get||A.set)?Object.defineProperty(r,o,A):r[o]=e[o]}r.default=e,t&&t.set(e,r);return r}(r(31));t.interceptors=o;var A,a=(A=r(2070))&&A.__esModule?A:{default:A},s=r(1119),u=r(1120),c=r(2071);Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return c[e]}}))}));var l=r(2073);function g(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return g=function(){return e},e}Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||Object.defineProperty(t,e,{enumerable:!0,get:function(){return l[e]}}))}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.retry=i,t.default=function(e,t){if(t){var r=e[t];return void(r&&(e[t]=i(r)))}return function(t,r){var o,A,a;(0,n.isBoolean)(e)?(A=t[r],o=e):e.axios?(A=e.axios,o=e.isOss,a=e.isCoohom):A=e,A&&(t[r]=i(A,o,a))}};var n=r(2);function i(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return e.defaults.retry=!0,e.defaults.retryTimes=t?5:1,e.defaults.retryDelay=1e3,e.defaults.__retryCount=0,e.interceptors.request.use((function(e){return e.retry&&e.__retryCount&&(e.headers["x-retry"]=e.__retryCount),e})),e.interceptors.response.use(void 0,(function(t){var n=t.config;return n&&n.retry?(n.__retryCount=n.__retryCount||0,n.retryTimes=n.retryTimes||0,n.__retryCount>=n.retryTimes?Promise.reject(t):(n.__retryCount+=1,r&&n.url&&n.url.startsWith("/gateway")&&(n.url=n.url.replace("/gateway","")),new Promise((function(e){setTimeout((function(){e()}),n.retryDelay||0)})).then((function(){return e(n)})))):Promise.reject(t)})),e}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(r(1)),i=o(r(660));function o(e){return e&&e.__esModule?e:{default:e}}function A(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return a(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,s=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){s=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(s)throw o}}}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var u=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))},c=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.request=function(){var e;return(e=t.client).request.apply(e,arguments)},this.get=function(){var e;return(e=t.client).get.apply(e,arguments)},this.delete=function(){var e;return(e=t.client).delete.apply(e,arguments)},this.post=function(){var e;return(e=t.client).post.apply(e,arguments)},this.put=function(){var e;return(e=t.client).put.apply(e,arguments)},this.encryptedRequest=function(){var e;return(e=t.encryptedClient).request.apply(e,arguments)},this.encryptedGet=function(){var e;return(e=t.encryptedClient).get.apply(e,arguments)},this.encryptedDelete=function(){var e;return(e=t.encryptedClient).delete.apply(e,arguments)},this.encryptedPost=function(){var e;return(e=t.encryptedClient).post.apply(e,arguments)},this.encryptedPut=function(){var e;return(e=t.encryptedClient).put.apply(e,arguments)},this.gzipRequest=function(){var e,r;return i.default.wasmLoaded?(e=t.gzippedEncryptClient).request.apply(e,arguments):(r=t.encryptedClient).request.apply(r,arguments)},this.gzipGet=function(){var e,r;return i.default.wasmLoaded?(e=t.gzippedEncryptClient).get.apply(e,arguments):(r=t.encryptedClient).get.apply(r,arguments)},this.ossGzipGet=function(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return u(t,void 0,void 0,n.default.mark((function e(){var t,o,A;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return A=function(){return u(this,void 0,void 0,n.default.mark((function e(){var t;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i.default.wasmLoaded||!(o<20)){e.next=7;break}return t=new Promise((function(e){setTimeout((function(){e()}),1e3)})),o++,e.next=5,t;case 5:return e.next=7,A();case 7:case"end":return e.stop()}}),e)})))},o=0,e.next=4,A();case 4:return e.abrupt("return",(t=this.ossGzippedEncryptClient).get.apply(t,r));case 5:case"end":return e.stop()}}),e,this)})))},this.ossDegradedGzipGet=function(){var e,r;return i.default.wasmLoaded?(e=t.ossDegradedGzippedEncryptClient).get.apply(e,arguments):(r=t.ossDegradedEncryptedClient).get.apply(r,arguments)},this.pbGzipGet=function(){var e,r;return i.default.wasmLoaded?(e=t.pbGzippedEncryptClient).get.apply(e,arguments):(r=t.pbEncryptedClient).get.apply(r,arguments)},this.gzipDelete=function(){var e,r;return i.default.wasmLoaded?(e=t.gzippedEncryptClient).delete.apply(e,arguments):(r=t.encryptedClient).delete.apply(r,arguments)},this.gzipPost=function(){var e,r;return i.default.wasmLoaded?(e=t.gzippedEncryptClient).post.apply(e,arguments):(r=t.encryptedClient).post.apply(r,arguments)},this.pbGzipPost=function(){var e,r;return i.default.wasmLoaded?(e=t.pbGzippedEncryptClient).post.apply(e,arguments):(r=t.pbEncryptedClient).post.apply(r,arguments)},this.gzipPut=function(){var e,r;return i.default.wasmLoaded?(e=t.gzippedEncryptClient).put.apply(e,arguments):(r=t.encryptedClient).put.apply(r,arguments)}}var t,r,o;return t=e,(r=[{key:"addClientInterceptors",value:function(e){var t,r=A(e);try{for(r.s();!(t=r.n()).done;){var n=t.value;n.request&&(this.client.interceptors.request.use(n.request.beforeSend),this.encryptedClient.interceptors.request.use(n.request.beforeSend),this.gzippedEncryptClient.interceptors.request.use(n.request.beforeSend)),n.response&&(this.client.interceptors.response.use(n.response.afterReceive),this.encryptedClient.interceptors.response.use(n.response.afterReceive),this.gzippedEncryptClient.interceptors.response.use(n.response.afterReceive))}}catch(e){r.e(e)}finally{r.f()}}}])&&s(t.prototype,r),o&&s(t,o),e}();t.default=c},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"doTaskPolling",{enumerable:!0,get:function(){return n.doTaskPolling}});var n=r(2072)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.doTaskPolling=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6e4,r=arguments.length>2?arguments[2]:void 0;return new Promise((function(n,A){var a=r;(function(e){return o(this,void 0,void 0,i.default.mark((function t(){var r,o;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.taskPromise,o=e.createStatusOptions,t.abrupt("return",r.then((function(e){return o(e,{resolve:n,reject:A})})));case 2:case"end":return t.stop()}}),t)})))})(e).then((function(e){void 0!==e&&function e(t){return o(this,void 0,void 0,i.default.mark((function r(){var o,s,u,c,l,g,f;return i.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:f=function(){setTimeout((function(){return e(t)}),l)},o=t.url,s=t.params,u=void 0===s?{}:s,c=t.interval,l=void 0===c?3e3:c,g=t.handlePolling,a(o,{params:u}).then((function(e){return g(e.data,{resolve:n,reject:A,next:f})}));case 3:case"end":return r.stop()}}),r)})))}(e)})).catch((function(e){return A(e)})),setTimeout((function(){return A("Time out")}),t)}))};var n,i=(n=r(1))&&n.__esModule?n:{default:n};var o=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))}},function(e,t,r){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.ResponseCode=void 0,t.ResponseCode=n,function(e){e.success="0",e.error="-1"}(n||(t.ResponseCode=n={}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttachedService=void 0;var n,i=(n=r(1))&&n.__esModule?n:{default:n},o=r(47),A=r(359),a=r(2075),s=r(2076),u=r(2080),c=r(2082);function l(e){return function(e){if(Array.isArray(e))return g(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return g(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return g(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function f(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var h=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))},p=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._config=new A.ServiceConfig,this._resourceService=new s.ResourceDataService(this._config),this._paramModelGetAttachedService=new a.ParamModelGetAttachedService(this._config,this._resourceService),this._paramModelUpdateAttachedService=new c.ParamModelUpdateAttachedService(this._config,this._paramModelGetAttachedService),this._paramModelAssemblyUpdateAttachedService=new u.ParamModelAssemblyUpdateAttachedService(this._config,this._paramModelUpdateAttachedService),this._config[A.__INTERNAL__setHelper]({modelHandler:this._paramModelUpdateAttachedService.modelHandler,getAttachedsByData:this._paramModelGetAttachedService.getAttachedsByData,getRequestClient:this._config[A.__INTERNAL__getRequestClient]})}var t,r,n;return t=e,(r=[{key:"updateAttacheds",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return h(this,void 0,void 0,i.default.mark((function r(){var n,A,a,s;return i.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return this.beforeAttached(),n=new Set,A=new Set,e.forEach((function(e){e instanceof o.CoreParamModel?n.add(e.getRootOrAccessory()):e instanceof o.CoreParamModelAssembly&&A.add(e)})),a=[],n.size&&a.push(this._paramModelUpdateAttachedService.updateModelAttacheds(l(n),t)),A.size&&a.push(this._paramModelAssemblyUpdateAttachedService.updateAssemblyAttacheds(l(A),t)),r.next=9,Promise.all(a);case 9:return s=r.sent,this.afterAttached(),r.abrupt("return",s);case 12:case"end":return r.stop()}}),r,this)})))}},{key:"beforeAttached",value:function(){}},{key:"afterAttached",value:function(){}},{key:"updateModelAttacheds",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return h(this,void 0,void 0,i.default.mark((function r(){return i.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",this.updateAttacheds(e,t));case 1:case"end":return r.stop()}}),r,this)})))}},{key:"updateAssemblyAttacheds",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return h(this,void 0,void 0,i.default.mark((function r(){return i.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",this.updateAttacheds(e,t));case 1:case"end":return r.stop()}}),r,this)})))}},{key:"config",get:function(){return this._config}},{key:"paramModelGetAttachedService",get:function(){return this._paramModelGetAttachedService}},{key:"paramModelUpdateAttachedService",get:function(){return this._paramModelUpdateAttachedService}}])&&f(t.prototype,r),n&&f(t,n),e}();t.AttachedService=p},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParamModelGetAttachedService=void 0;var n=h(r(1)),i=h(r(701)),o=h(r(208)),A=r(1121),a=r(951),s=r(2),u=h(r(125)),c=r(718),l=r(717),g=r(1122),f=r(359);function h(e){return e&&e.__esModule?e:{default:e}}function p(e){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function I(e){return function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return y(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return y(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var C=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))};function E(e,t){if(e.length<=0)return[];var r=e.map((function(e){return{model:e,nodeNumber:B(e)}})).sort((function(e,t){return e.nodeNumber-t.nodeNumber}));if(r[0].nodeNumber>=t)return r.map((function(e){return[e.model]}));for(var n=[],i=[],o=0,A=0,a=r.length;A<a;A++){var s=r[A];o+s.nodeNumber<=t?(o+=s.nodeNumber,i.push(s.model)):(n.push(i),i=[s.model],o=s.nodeNumber)}return i.length>0&&n.push(i),n}function B(e){return e.children.reduce((function(e,t){return e+B(t)}),1)}function v(e){var t=[],r=[];return e.forEach((function(e){t.push.apply(t,I(e.rebuildModels)),r.push.apply(r,I(e.failedModels))})),{rebuildModels:t,failedModels:r}}var m=function(){function e(t,r){var i=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.resourceService=r,this.getAttachedsByModel=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.map((function(e){var t=e.serialize(void 0,!0,!0);return{id:e.getId(),data:t,matrix:e.getConcatenatedMatrix()}}));return i.getAttachedsByData(r.map((function(e){return e.data})),t).then((function(e){return Object.assign(Object.assign({},e),{requestModels:r})}))},this.getAttachedsByData=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return C(i,void 0,void 0,n.default.mark((function r(){var i,A,a,s,u,c,l,g,f,h,p,d,y,B=this;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.getAttachSwitch();case 2:return i=r.sent,A=i.isNew,a=i.nodeLimit,s=new o.default,A?(c=E(e,a),u=c.map((function(e){return B.requestAttacheds({paramModelDatas:e,context:s,params:t})}))):u=e.map((function(e){return B.requestAttacheds({paramModelDatas:[e],context:s,params:t})})),r.next=8,u.reduce((function(e,t){return C(B,void 0,void 0,n.default.mark((function r(){var i,o,A;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,t;case 2:return i=r.sent,r.next=5,e;case 5:return(o=r.sent).attachedModels.push(i.attachedModels),i.paramModelTasks.length>0&&(A=o.paramModelTasks).push.apply(A,I(i.paramModelTasks)),r.abrupt("return",o);case 9:case"end":return r.stop()}}),r)})))}),Promise.resolve({attachedModels:[],paramModelTasks:[]}));case 8:return l=r.sent,g=l.attachedModels,f=l.paramModelTasks,r.next=13,this.processParamModelTasks(f,s);case 13:return h=r.sent,p=h.result,d=h.errorParamModelIds,y=d.reduce((function(t,r){var n=e.find((function(e){return e.id===r}));return n&&t.push(n),t}),[]),r.abrupt("return",Object.assign(Object.assign({},v([].concat(I(g),I(p),[{rebuildModels:[],failedModels:y}]))),{requestModels:e,context:s}));case 18:case"end":return r.stop()}}),r,this)})))},this.rawRequestAttacheds=function(e){return C(i,void 0,void 0,n.default.mark((function t(){var r,i,o,A,a,u,g,h,p,d,y,C,E=this;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.paramModelDatas,i=e.context,o=e.params,A=e.isRetry,a=void 0!==A&&A,t.next=3,this.config[f.__INTERNAL__getParamModelBackEndParam](r,o);case 3:if(u=t.sent,g=r.map((function(e){return Object.assign({id:e.id,paramModelData:e,retryCount:a?1:void 0,calWireFrames:!0,needCustomFaceData:!1,needResourceData:!1},u)})),t.prev=5,!l.COMMON_ENV.PARAM_MODEL_MICRO_TASK_ENABLE){t.next=12;break}return t.next=9,this.requestAttachedV4NonPb(g);case 9:h=t.sent,t.next=15;break;case 12:return t.next=14,this.originalRequestAttacheds(g);case 14:h=t.sent;case 15:return p=(0,s.map)(h.parammodelIdToTaskId||{},(function(e,t){return{taskId:e,paramModelId:t}})),t.next=18,this.applyAttachedResource(h,i);case 18:if(d=t.sent,y=(d.errorMessages||[]).reduce((function(e,t){if(t.errCode===c.PARAM_MODEL_TOO_BIG_ERROR)return e;var n=r.find((function(e){return e.id===t.paramModelId}));return n&&e.push(n),e}),[]),a||!(y.length>0)){t.next=23;break}return C={attachedModels:{rebuildModels:(0,s.uniqBy)(d.models,"id")||[],failedModels:[]},paramModelTasks:[]},t.abrupt("return",Promise.all([C].concat(I(y.map((function(e){return E.retryRequestAttacheds({paramModelDatas:[e],context:i,params:o,isRetry:!0})}))))).then((function(e){return{attachedModels:v((0,s.map)(e,"attachedModels")),paramModelTasks:[]}})));case 23:return t.abrupt("return",{attachedModels:{rebuildModels:(0,s.uniqBy)(d.models,"id")||[],failedModels:y},paramModelTasks:p});case 26:return t.prev=26,t.t0=t.catch(5),t.abrupt("return",{attachedModels:{rebuildModels:[],failedModels:r},paramModelTasks:[]});case 29:case"end":return t.stop()}}),t,this,[[5,26]])})))},this.requestAttacheds=(0,a.queue)({concurrency:c.concurrency})(this.rawRequestAttacheds),this.retryRequestAttacheds=(0,a.queue)({concurrency:c.concurrency})(this.rawRequestAttacheds),this.getAttachSwitch=(0,u.default)((function(){return i.config[f.__INTERNAL__getRequestClient]().get("/dcs-model/api/attach/switch").then((function(e){return e.data}),(function(){return{nodeLimit:1,isNew:!1}}))}),Object.assign({promise:!0},c.memoizeValues))}var t,r,h;return t=e,(r=[{key:"processParamModelTasks",value:function(e,t){return C(this,void 0,void 0,n.default.mark((function r(){var i,o,A,a,u;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return u=function(e){return C(this,void 0,void 0,n.default.mark((function r(){var c,g,f,h,p,d=this;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return c=(0,s.chunk)(e,l.COMMON_ENV.PARAM_MODEL_MICRO_TASK_CHUNK_SIZE),r.next=3,c.reduce((function(e,r){return C(d,void 0,void 0,n.default.mark((function i(){var A,u,c,l;return n.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,a.requestAttachedTasksNonPb(r);case 3:return u=n.sent,n.next=6,a.applyAttachedResource(u,t);case 6:return c=n.sent,n.next=9,e;case 9:l=n.sent,(A=l.paramModelTasks).push.apply(A,I((0,s.map)(u.parammodelIdToTaskId||{},(function(e,t){return{taskId:e,paramModelId:t}})))),l.attachedModels.push({rebuildModels:(0,s.uniqBy)(c.models,"id")||[],failedModels:[]}),n.next=18;break;case 14:return n.prev=14,n.t0=n.catch(0),o.push.apply(o,I((0,s.map)(r,"paramModelId"))),n.abrupt("return",e);case 18:return n.abrupt("return",e);case 19:case"end":return n.stop()}}),i,null,[[0,14]])})))}),Promise.resolve({attachedModels:[],paramModelTasks:[]}));case 3:if(g=r.sent,f=g.attachedModels,h=g.paramModelTasks,i.push.apply(i,I(f)),!(A<l.COMMON_ENV.PARAM_MODEL_MICRO_TASK_RETRY_COUNT&&h.length>0)){r.next=16;break}return A++,p=new Promise((function(e){setTimeout((function(){e()}),l.COMMON_ENV.PARAM_MODEL_MICRO_TASK_RETRY_DELAY||0)})),r.next=12,p;case 12:return r.next=14,u(h);case 14:r.next=17;break;case 16:o.push.apply(o,I((0,s.map)(h,"paramModelId")));case 17:case"end":return r.stop()}}),r)})))},i=[],o=[],A=0,a=this,r.next=7,u(e);case 7:return r.abrupt("return",{result:i,errorParamModelIds:o});case 8:case"end":return r.stop()}}),r,this)})))}},{key:"originalRequestAttacheds",value:function(e){return C(this,void 0,void 0,n.default.mark((function t(){var r;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.config[f.__INTERNAL__getRequestClient]().gzipPost("/dcs-model/api/c/parammodel",e);case 2:return r=t.sent,t.abrupt("return",r.data);case 4:case"end":return t.stop()}}),t,this)})))}},{key:"requestAttachedV4NonPb",value:function(e){return C(this,void 0,void 0,n.default.mark((function t(){var r,i,o;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.config[f.__INTERNAL__getRequestClient]().pbGzipPost("/dcs-model/api/c/parammodel/v4/plain",{requestData:e},{extra:{isRequestBodyJson:!0}});case 2:return r=t.sent,i=r.data,o=A.dcs_model_attach.PBParamModelResponseDataV3.decode(i).toJSON(),(0,g.removeKeys)(o,["FULL_NAME"]),t.abrupt("return",o);case 7:case"end":return t.stop()}}),t,this)})))}},{key:"requestAttachedTasksNonPb",value:function(e){return C(this,void 0,void 0,n.default.mark((function t(){var r,i;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.config[f.__INTERNAL__getRequestClient]().pbGzipPost("/dcs-model-task/api/site/parammodel/result/plain",A.dcs_model_attach.PBParamModelTaskQueryRequests.create({requests:e}));case 2:return r=t.sent,i=A.dcs_model_attach.PBParamModelResponseDataV3.decode(r.data).toJSON(),(0,g.removeKeys)(i,["FULL_NAME"]),t.abrupt("return",i);case 6:case"end":return t.stop()}}),t,this)})))}},{key:"applyAttachedResource",value:function(e,t){return C(this,void 0,void 0,n.default.mark((function r(){var i;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.resourceService.updateParamModelDataWithResource(e);case 2:return i=r.sent,t.addCustomResources(i),r.abrupt("return",i);case 5:case"end":return r.stop()}}),r,this)})))}},{key:"createParams",value:function(e,t){return C(this,void 0,void 0,n.default.mark((function r(){var o,A,a;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,o=e.getRootOrAccessory(),A=o.serialize(void 0,!0,!0),a={paramModelData:A,variableParams:[t]},r.next=6,this.config[f.__INTERNAL__getRequestClient]().gzipPost("/dcs-model/api/c/parammodeldata/param/update",a).then((function(e){for(var r=e.data,n=function(e){var n=r.children.find((function(r){return r.id===t.paramModelPath[e]}));if(!n)return{v:void 0};r=n},o=1;o<t.paramModelPath.length;o++){var A=n(o);if("object"===p(A))return A.v}var a=(r.params||[]).find((function(e){var r;return e.name===(null===(r=t.paramOperates[0])||void 0===r?void 0:r.param.name)}));if(a)return new i.default(a)}));case 6:return r.abrupt("return",r.sent);case 9:return r.prev=9,r.t0=r.catch(0),r.abrupt("return",void 0);case 12:case"end":return r.stop()}}),r,this,[[0,9]])})))}}])&&d(t.prototype,r),h&&d(t,h),e}();t.ParamModelGetAttachedService=m},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResourceDataService=void 0;var n=A(r(1)),i=A(r(2077)),o=r(359);function A(e){return e&&e.__esModule?e:{default:e}}function a(e){return function(e){if(Array.isArray(e))return l(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||c(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function u(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=c(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function c(e,t){if(e){if("string"==typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(e,t):void 0}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var g,f=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))};!function(e){e.Array="Array",e.Object="Object"}(g||(g={}));var h=new i.default({maxAge:36e5,max:200}),p=function(e,t,r){var n,i=u(e.keys());try{for(i.s();!(n=i.n()).done;){var o=n.value;if(o.split("_")[0]===t)if(o.split("_")[1].split(",").includes(r.toString())&&e.get(o))return o}}catch(e){i.e(e)}finally{i.f()}return""},d=function(e,t){return function(r,i,o){return f(void 0,void 0,void 0,n.default.mark((function A(){var a,s,c,l,f,d;return n.default.wrap((function(A){for(;;)switch(A.prev=A.next){case 0:a=o===g.Array?[]:{},c=r.sort(),l=u(c),A.prev=3,d=n.default.mark((function r(){var o,A,u,l,g;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return o=f.value,A=p(h,i,o),u=void 0,A?(s=A,u=h.get(s)):(s="".concat(i,"_").concat(c.toString()),u=e(c),h.set(s,u)),r.prev=4,r.next=7,u;case 7:l=r.sent,Array.isArray(a)&&t?(g=l.find((function(e){return e[t.dataItemFilterField]===o})))&&a.push(g):l[o]&&(a[o]=l[o]),r.next=14;break;case 11:r.prev=11,r.t0=r.catch(4),h.del(s);case 14:case"end":return r.stop()}}),r,null,[[4,11]])})),l.s();case 6:if((f=l.n()).done){A.next=10;break}return A.delegateYield(d(),"t0",8);case 8:A.next=6;break;case 10:A.next=15;break;case 12:A.prev=12,A.t1=A.catch(3),l.e(A.t1);case 15:return A.prev=15,l.f(),A.finish(15);case 18:return A.abrupt("return",a);case 19:case"end":return A.stop()}}),A,null,[[3,12,15,18]])})))}},I=function(){function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.getSpecificProductData=function(e){return function(t){return f(r,void 0,void 0,n.default.mark((function r(){var i,A=this;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(t.length){r.next=2;break}return r.abrupt("return",[]);case 2:return r.next=4,d((function(t){return f(A,void 0,void 0,n.default.mark((function r(){var i,A;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,this.config[o.__INTERNAL__getRequestClient]().gzipPost("/dcs-resource/api/c/productdata/bgid",{bgIds:t});case 3:return i=r.sent,A=i.data,r.abrupt("return",null==A?void 0:A.d[e]);case 8:return r.prev=8,r.t0=r.catch(0),r.abrupt("return",[]);case 11:case"end":return r.stop()}}),r,this,[[0,8]])})))}),{dataItemFilterField:"brandGoodId"})(t,e,g.Array);case 4:return i=r.sent,r.abrupt("return",i);case 6:case"end":return r.stop()}}),r)})))}},this.resourceObtainList=[{targetField:"hardwares",idField:"hardwareBgIds",handler:this.getSpecificProductData("hardwares"),dataType:g.Array},{targetField:"textures",idField:"textureBgIds",handler:this.getSpecificProductData("textures"),dataType:g.Array},{targetField:"virtualModels",idField:"virtualModelBgIds",handler:this.getSpecificProductData("virtualModels"),dataType:g.Array},{targetField:"paramModelProducts",idField:"paramModelBgIds",handler:this.getSpecificProductData("paramModelProducts"),dataType:g.Array},{targetField:"moldings",idField:"moldingBgIds",handler:this.getSpecificProductData("moldings"),dataType:g.Array},{targetField:"paramPackages",idField:"obsParamPackageIds",handler:d((function(e){return f(r,void 0,void 0,n.default.mark((function t(){var r,i;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.length){t.next=2;break}return t.abrupt("return",[]);case 2:return t.prev=2,t.next=5,this.config[o.__INTERNAL__getRequestClient]().gzipPost("/dcs-resource/api/c/parampackage",{obsParamPackageIds:e});case 5:return r=t.sent,i=r.data,t.abrupt("return",null==i?void 0:i.d);case 10:return t.prev=10,t.t0=t.catch(2),t.abrupt("return",[]);case 13:case"end":return t.stop()}}),t,this,[[2,10]])})))}),{dataItemFilterField:"id"}),dataType:g.Array},{targetField:"displayInfoMap",idField:"hardwareBgIds",handler:d((function(e){return f(r,void 0,void 0,n.default.mark((function t(){var r,i;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.length){t.next=2;break}return t.abrupt("return",{});case 2:return t.prev=2,t.next=5,this.config[o.__INTERNAL__getRequestClient]().gzipPost("/dcs-resource/api/c/displayinfo",{bgIds:e});case 5:return r=t.sent,i=r.data,t.abrupt("return",null==i?void 0:i.d);case 10:return t.prev=10,t.t0=t.catch(2),t.abrupt("return",{});case 13:case"end":return t.stop()}}),t,this,[[2,10]])})))})),dataType:g.Object},{targetField:"displayInfoMap",idField:"textureBgIds",handler:d((function(e){return f(r,void 0,void 0,n.default.mark((function t(){var r,i;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.length){t.next=2;break}return t.abrupt("return",{});case 2:return t.prev=2,t.next=5,this.config[o.__INTERNAL__getRequestClient]().gzipPost("/dcs-resource/api/c/displaymaterial",{bgIds:e});case 5:return r=t.sent,i=r.data,t.abrupt("return",null==i?void 0:i.d);case 10:return t.prev=10,t.t0=t.catch(2),t.abrupt("return",{});case 13:case"end":return t.stop()}}),t,this,[[2,10]])})))})),dataType:g.Object},{targetField:"fitRules",idField:"obsRuleIds",handler:d((function(e){return f(r,void 0,void 0,n.default.mark((function t(){var r,i;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.length){t.next=2;break}return t.abrupt("return",[]);case 2:return t.prev=2,t.next=5,this.config[o.__INTERNAL__getRequestClient]().gzipPost("/dcs-resource/api/c/fitrule",{obsRuleIds:e});case 5:return r=t.sent,i=r.data,t.abrupt("return",null==i?void 0:i.d);case 10:return t.prev=10,t.t0=t.catch(2),t.abrupt("return",[]);case 13:case"end":return t.stop()}}),t,this,[[2,10]])})))}),{dataItemFilterField:"obsRuleId"}),dataType:g.Array}]}var t,r,i;return t=e,(r=[{key:"updateParamModelDataWithResource",value:function(e){return f(this,void 0,void 0,n.default.mark((function t(){var r,i=this;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=Object.assign({},e),t.next=3,Promise.all(this.resourceObtainList.map((function(e){return f(i,void 0,void 0,n.default.mark((function t(){var i,o,A,s,u,c;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=e.targetField,o=e.idField,A=e.handler,s=e.dataType,!(u=r[o]||[]).length){t.next=7;break}return t.next=5,A(u,i,s);case 5:c=t.sent,s===g.Array?r[i]=r[i]?[].concat(a(r[i]),a(c)):c:r[i]=r[i]?Object.assign(Object.assign({},r[i]),c):c;case 7:case"end":return t.stop()}}),t)})))})));case 3:return t.abrupt("return",r);case 4:case"end":return t.stop()}}),t,this)})))}}])&&s(t.prototype,r),i&&s(t,i),e}();t.ResourceDataService=I},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var o=r(2078),A=Symbol("max"),a=Symbol("length"),s=Symbol("lengthCalculator"),u=Symbol("allowStale"),c=Symbol("maxAge"),l=Symbol("dispose"),g=Symbol("noDisposeOnSet"),f=Symbol("lruList"),h=Symbol("cache"),p=Symbol("updateAgeOnGet"),d=function(){return 1},I=function(){function e(t){if(n(this,e),"number"==typeof t&&(t={max:t}),t||(t={}),t.max&&("number"!=typeof t.max||t.max<0))throw new TypeError("max must be a non-negative number");this[A]=t.max||1/0;var r=t.length||d;if(this[s]="function"!=typeof r?d:r,this[u]=t.stale||!1,t.maxAge&&"number"!=typeof t.maxAge)throw new TypeError("maxAge must be a number");this[c]=t.maxAge||0,this[l]=t.dispose,this[g]=t.noDisposeOnSet||!1,this[p]=t.updateAgeOnGet||!1,this.reset()}var t,r,I;return t=e,(r=[{key:"max",get:function(){return this[A]},set:function(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[A]=e||1/0,E(this)}},{key:"allowStale",get:function(){return this[u]},set:function(e){this[u]=!!e}},{key:"maxAge",get:function(){return this[c]},set:function(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[c]=e,E(this)}},{key:"lengthCalculator",get:function(){return this[s]},set:function(e){var t=this;"function"!=typeof e&&(e=d),e!==this[s]&&(this[s]=e,this[a]=0,this[f].forEach((function(e){e.length=t[s](e.value,e.key),t[a]+=e.length}))),E(this)}},{key:"length",get:function(){return this[a]}},{key:"itemCount",get:function(){return this[f].length}},{key:"rforEach",value:function(e,t){t=t||this;for(var r=this[f].tail;null!==r;){var n=r.prev;m(this,e,r,t),r=n}}},{key:"forEach",value:function(e,t){t=t||this;for(var r=this[f].head;null!==r;){var n=r.next;m(this,e,r,t),r=n}}},{key:"keys",value:function(){return this[f].toArray().map((function(e){return e.key}))}},{key:"values",value:function(){return this[f].toArray().map((function(e){return e.value}))}},{key:"reset",value:function(){var e=this;this[l]&&this[f]&&this[f].length&&this[f].forEach((function(t){return e[l](t.key,t.value)})),this[h]=new Map,this[f]=new o,this[a]=0}},{key:"dump",value:function(){var e=this;return this[f].map((function(t){return!C(e,t)&&{k:t.key,v:t.value,e:t.now+(t.maxAge||0)}})).toArray().filter((function(e){return e}))}},{key:"dumpLru",value:function(){return this[f]}},{key:"set",value:function(e,t,r){if((r=r||this[c])&&"number"!=typeof r)throw new TypeError("maxAge must be a number");var n=r?Date.now():0,i=this[s](t,e);if(this[h].has(e)){if(i>this[A])return B(this,this[h].get(e)),!1;var o=this[h].get(e).value;return this[l]&&(this[g]||this[l](e,o.value)),o.now=n,o.maxAge=r,o.value=t,this[a]+=i-o.length,o.length=i,this.get(e),E(this),!0}var u=new v(e,t,i,n,r);return u.length>this[A]?(this[l]&&this[l](e,t),!1):(this[a]+=u.length,this[f].unshift(u),this[h].set(e,this[f].head),E(this),!0)}},{key:"has",value:function(e){if(!this[h].has(e))return!1;var t=this[h].get(e).value;return!C(this,t)}},{key:"get",value:function(e){return y(this,e,!0)}},{key:"peek",value:function(e){return y(this,e,!1)}},{key:"pop",value:function(){var e=this[f].tail;return e?(B(this,e),e.value):null}},{key:"del",value:function(e){B(this,this[h].get(e))}},{key:"load",value:function(e){this.reset();for(var t=Date.now(),r=e.length-1;r>=0;r--){var n=e[r],i=n.e||0;if(0===i)this.set(n.k,n.v);else{var o=i-t;o>0&&this.set(n.k,n.v,o)}}}},{key:"prune",value:function(){var e=this;this[h].forEach((function(t,r){return y(e,r,!1)}))}}])&&i(t.prototype,r),I&&i(t,I),e}(),y=function(e,t,r){var n=e[h].get(t);if(n){var i=n.value;if(C(e,i)){if(B(e,n),!e[u])return}else r&&(e[p]&&(n.value.now=Date.now()),e[f].unshiftNode(n));return i.value}},C=function(e,t){if(!t||!t.maxAge&&!e[c])return!1;var r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[c]&&r>e[c]},E=function(e){if(e[a]>e[A])for(var t=e[f].tail;e[a]>e[A]&&null!==t;){var r=t.prev;B(e,t),t=r}},B=function(e,t){if(t){var r=t.value;e[l]&&e[l](r.key,r.value),e[a]-=r.length,e[h].delete(r.key),e[f].removeNode(t)}},v=function e(t,r,i,o,A){n(this,e),this.key=t,this.value=r,this.length=i,this.now=o,this.maxAge=A||0},m=function(e,t,r,n){var i=r.value;C(e,i)&&(B(e,r),e[u]||(i=void 0)),i&&t.call(n,i.value,i.key,e)};e.exports=I},function(e,t,r){"use strict";function n(e){var t=this;if(t instanceof n||(t=new n),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var r=0,i=arguments.length;r<i;r++)t.push(arguments[r]);return t}function i(e,t,r){var n=t===e.head?new a(r,null,t,e):new a(r,t,t.next,e);return null===n.next&&(e.tail=n),null===n.prev&&(e.head=n),e.length++,n}function o(e,t){e.tail=new a(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function A(e,t){e.head=new a(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function a(e,t,r,n){if(!(this instanceof a))return new a(e,t,r,n);this.list=n,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}e.exports=n,n.Node=a,n.create=n,n.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,r=e.prev;return t&&(t.prev=r),r&&(r.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=r),e.list.length--,e.next=null,e.prev=null,e.list=null,t},n.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},n.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},n.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)o(this,arguments[e]);return this.length},n.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)A(this,arguments[e]);return this.length},n.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},n.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},n.prototype.forEach=function(e,t){t=t||this;for(var r=this.head,n=0;null!==r;n++)e.call(t,r.value,n,this),r=r.next},n.prototype.forEachReverse=function(e,t){t=t||this;for(var r=this.tail,n=this.length-1;null!==r;n--)e.call(t,r.value,n,this),r=r.prev},n.prototype.get=function(e){for(var t=0,r=this.head;null!==r&&t<e;t++)r=r.next;if(t===e&&null!==r)return r.value},n.prototype.getReverse=function(e){for(var t=0,r=this.tail;null!==r&&t<e;t++)r=r.prev;if(t===e&&null!==r)return r.value},n.prototype.map=function(e,t){t=t||this;for(var r=new n,i=this.head;null!==i;)r.push(e.call(t,i.value,this)),i=i.next;return r},n.prototype.mapReverse=function(e,t){t=t||this;for(var r=new n,i=this.tail;null!==i;)r.push(e.call(t,i.value,this)),i=i.prev;return r},n.prototype.reduce=function(e,t){var r,n=this.head;if(arguments.length>1)r=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");n=this.head.next,r=this.head.value}for(var i=0;null!==n;i++)r=e(r,n.value,i),n=n.next;return r},n.prototype.reduceReverse=function(e,t){var r,n=this.tail;if(arguments.length>1)r=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");n=this.tail.prev,r=this.tail.value}for(var i=this.length-1;null!==n;i--)r=e(r,n.value,i),n=n.prev;return r},n.prototype.toArray=function(){for(var e=new Array(this.length),t=0,r=this.head;null!==r;t++)e[t]=r.value,r=r.next;return e},n.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,r=this.tail;null!==r;t++)e[t]=r.value,r=r.prev;return e},n.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new n;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=0,o=this.head;null!==o&&i<e;i++)o=o.next;for(;null!==o&&i<t;i++,o=o.next)r.push(o.value);return r},n.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new n;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=this.length,o=this.tail;null!==o&&i>t;i--)o=o.prev;for(;null!==o&&i>e;i--,o=o.prev)r.push(o.value);return r},n.prototype.splice=function(e,t){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var r=0,n=this.head;null!==n&&r<e;r++)n=n.next;var o=[];for(r=0;n&&r<t;r++)o.push(n.value),n=this.removeNode(n);null===n&&(n=this.tail),n!==this.head&&n!==this.tail&&(n=n.prev);for(r=0;r<(arguments.length<=2?0:arguments.length-2);r++)n=i(this,n,r+2<2||arguments.length<=r+2?void 0:arguments[r+2]);return o},n.prototype.reverse=function(){for(var e=this.head,t=this.tail,r=e;null!==r;r=r.prev){var n=r.prev;r.prev=r.next,r.next=n}return this.head=t,this.tail=e,this};try{r(2079)(n)}catch(e){}},function(e,t,r){"use strict";r.r(t),function(e){var t=r(1),n=r.n(t);e.exports=function(e){e.prototype[Symbol.iterator]=n.a.mark((function e(){var t;return n.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this.head;case 1:if(!t){e.next=7;break}return e.next=4,t.value;case 4:t=t.next,e.next=1;break;case 7:case"end":return e.stop()}}),e,this)}))}}.call(this,r(835)(e))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParamModelAssemblyUpdateAttachedService=void 0;var n,i=(n=r(208))&&n.__esModule?n:{default:n},o=r(243),A=r(2),a=r(359),s=r(2081);function u(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return c(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var g=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.paramModelService=r}var t,r,n;return t=e,(r=[{key:"updateAssemblyAttacheds",value:function(e,t){var r=this,n=Object.assign(Object.assign({},this.config[a.__INTERNAL__getDefaultParams]()),t),i=this.config[a.__INTERNAL__chunkParamAssemblyModels](e,n).map((function(e){return r.updateAssemblyAttachedsInternal(e.models,Object.assign(Object.assign({},n),e.params))}));return Promise.all(i)}},{key:"updateAssemblyAttachedsInternal",value:function(e,t){var r=[],n=[];e.forEach((function(e){e.isTemplateAssembly()?r.push(e):n.push(e)}));var i=[];return n.length>0&&i.push(this.updateInstanceAttacheds(n,t)),r.length>0&&i.push(this.updateTemplateAttacheds(r,t)),Promise.all(i)}},{key:"updateInstanceAttacheds",value:function(e,t){var r=(0,A.flatMap)(e,(function(e){return e.getParamModels()}));return this.paramModelService.updateModelAttacheds(r,t)}},{key:"updateTemplateAttacheds",value:function(e,t){var r=this,n=t.excludeAccessories,i=e.map((function(e){return r.updateTemplateAttached(e,t)}));if(!n){var a=(0,A.flatMap)(e,(function(e){return o.ParamModelUtils.collectAccessories(e.getParamModels())}));a.length>0&&i.push(this.paramModelService.updateModelAttacheds(a,t))}return Promise.all(i)}},{key:"updateTemplateAttached",value:function(e,t){var r=t.applyTransform,n=e.serialize(void 0,!1,{includeAccessory:!1,isRootWorldMatrix:!0});return(0,s.getTemplateAttachedByData)(n,t,this.config).then((function(t){var n=new i.default;n.addCustomResources(t);var o=e.getPosition().clone(),A=e.getRotation().clone(),a=t.assemblyDatas[0];if(a)e.parse(a,n,{isRootWorldMatrix:!0});else{e.applyResource(n,!0);var s,c=e.getMatrix4(),l=u(e.getParamModels());try{for(l.s();!(s=l.n()).done;){var g=s.value;g.setMatrix4(c.clone().multiply(g.getMatrix4()))}}catch(e){l.e(e)}finally{l.f()}}("function"==typeof r?r(e.getId()):r)||e.updateTransform(o,A),e.setHasAttached(!0),e.getParamModels().forEach((function(e){return e.setHasAttached(!0)}))}))}}])&&l(t.prototype,r),n&&l(t,n),e}();t.ParamModelAssemblyUpdateAttachedService=g},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTemplateAttachedByData=function(e,t,r){return A(this,void 0,void 0,i.default.mark((function n(){var A,a,s;return i.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,r[o.__INTERNAL__getParamModelAssemblyBackEndParam]([e],t);case 2:return A=n.sent,a=[Object.assign({id:e.id,assemblyData:e,calWireFrames:!0},A)],n.next=6,r[o.__INTERNAL__getRequestClient]().gzipPost("/dcs-model/api/c/assemblymodel",a);case 6:return s=n.sent,n.abrupt("return",s.data);case 8:case"end":return n.stop()}}),n)})))};var n,i=(n=r(1))&&n.__esModule?n:{default:n},o=r(359);var A=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParamModelUpdateAttachedService=void 0;var n=r(243),i=r(359),o=r(2083);function A(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var a=function(){function e(t,r){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.getAttached=r,this.modelHandler=function(e,t){var r=t.applyTransform;return n.getAttached.getAttachedsByModel(e,t).then((function(t){return n.applyAttached(e,t,r)}))},this.applyAttached=function(e,t,r){var n=t.rebuildModels,i=t.failedModels,A=t.context,a=t.requestModels;e.forEach((function(e){if(e.setHasAttached(!0),i.find((function(t){return t.id===e.id})))e.setLegal(!1);else{var t=e.getMatrix4(),s=e.getPosition().clone(),u=e.getRotation().clone(),c=n.find((function(t){return t.id===e.id}));c?e.parse(c,A):e.applyResource(A,!0);var l=a?a.find((function(t){return t.id===e.id})).matrix:void 0,g=e.getMatrix4();(0,o.handleTransform)(e,{applyTransform:r,position:s,rotation:u,matrix:t,requestMatrix:l,responseMatrix:g})}}))}}var t,r,a;return t=e,(r=[{key:"updateModelAttacheds",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Object.assign(Object.assign({},this.config[i.__INTERNAL__getDefaultParams]()),r),o=this.config[i.__INTERNAL__chunkParamModels](e,n),A=o.map((function(e){return t.updateAttachedsInternal(e.models,Object.assign(Object.assign({},n),e.params))}));return Promise.all(A)}},{key:"updateAttachedsInternal",value:function(e,t){return t.excludeAccessories||(e=n.ParamModelUtils.flattenModels(e)),this.modelHandlerWrapper(e,t)}},{key:"modelHandlerWrapper",value:function(e,t){var r=this,n=new Map,o=this.config[i.__INTERNAL__getParamModelHandlers]();e.forEach((function(e){var t=o.find((function(t){return t.filter(e)})),i=t?t.attachHandler:r.modelHandler,A=n.get(i);void 0===A&&(A=[],n.set(i,A)),A.push(e)}));var A=[];return n.forEach((function(e,r){return A.push(r(e,t))})),Promise.all(A)}}])&&A(t.prototype,r),a&&A(t,a),e}();t.ParamModelUpdateAttachedService=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.handleTransform=function(e,t){var r=t.applyTransform,o=t.position,A=t.rotation,a=t.matrix,s=t.requestMatrix,u=t.responseMatrix;if("function"==typeof r?r(e.getId()):r){if(!a||!s||!u)return;if(!n.default.equals(s,a)){var c=(new i.default).getInverse(s).premultiply(a);e.setMatrix4(u.clone().premultiply(c))}}else{if(!o||!A)return;e.setPosition(o),e.setRotation(A)}};var n=o(r(114)),i=o(r(44));function o(e){return e&&e.__esModule?e:{default:e}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(108);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return n[e]}})}));var i=r(2085);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})}));var o=r(2090);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})}))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParamModelDataService=void 0;var n=p(r(1)),i=r(47),o=r(10),A=r(1121),a=p(r(5)),s=p(r(125)),u=r(2086),c=r(1123),l=r(718),g=r(717),f=r(1122),h=r(108);function p(e){return e&&e.__esModule?e:{default:e}}function d(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var I=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function A(e){try{s(n.next(e))}catch(e){o(e)}}function a(e){try{s(n.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(A,a)}s((n=n.apply(e,t||[])).next())}))},y=function(){function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.noCacheGetParamModelDataByBrandGoodId=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return I(r,void 0,void 0,n.default.mark((function r(){var i,o,a,s;return n.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!g.COMMON_ENV.PARAM_MODEL_DATA_PB_ENABLE){r.next=18;break}return i=u.util.toJSONOptions.defaults||!0,u.util.toJSONOptions.defaults=!0,r.prev=3,r.next=6,this.config.requestClient.pbGzipGet("/dcs-model/api/c/parammodeldata/".concat(e,"/v2?cache=").concat(t));case 6:return o=r.sent,a=A.dcs_model.PBParamModelViewData.decode(o.data).toJSON(),(0,f.removeKeys)(a,["FULL_NAME"]),r.abrupt("return",a);case 12:return r.prev=12,r.t0=r.catch(3),r.abrupt("return",Promise.reject(r.t0));case 15:return r.prev=15,u.util.toJSONOptions.defaults=i,r.finish(15);case 18:return r.next=20,this.config.requestClient.gzipGet("/dcs-model/api/c/parammodeldata/".concat(e,"?cache=").concat(t));case 20:return s=r.sent,r.abrupt("return",s.data);case 22:case"end":return r.stop()}}),r,this,[[3,12,15,18]])})))},this.getParamModelDataByBrandGoodId=(0,s.default)((function(e){return r.noCacheGetParamModelDataByBrandGoodId(e,!0)}),Object.assign({promise:!0},l.memoizeValues))}var t,r,p;return t=e,(r=[{key:"getParamModelByProduct",value:function(e){return I(this,void 0,void 0,n.default.mark((function t(){var r,o;return n.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getParamModelDataByBrandGoodId(e.brandGoodId);case 2:return r=t.sent,o=(new this.config.paramModelConstructor).parse(r.paramModelData,(new i.CoreCustomContext).addProduct(e)),(0,h.attach)(o,(0,h.toAttachedMap)(r)),o.setSize(this.calcSizeByProduct(o,e)),o.assignUniqueId(),(0,c.updatePositionByOffGround)(o,0),t.abrupt("return",o);case 9:case"end":return t.stop()}}),t,this)})))}},{key:"calcSizeByProduct",value:function(e,t){var r=t.size;return new a.default(r&&r.x||e.getParsedValue(o.ParamName.WIDTH),r&&r.y||e.getParsedValue(o.ParamName.DEPTH),r&&r.z||e.getParsedValue(o.ParamName.HEIGHT))}}])&&d(t.prototype,r),p&&d(t,p),e}();t.ParamModelDataService=y},function(e,t){},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.computeInferBoundingBox=u,t.computeInferBoxHeight=function(e){var t=u(e).boundingBox;return Math.abs(t.max.z-t.min.z)};var n=s(r(420)),i=s(r(141)),o=s(r(98)),A=s(r(44)),a=s(r(5));function s(e){return e&&e.__esModule?e:{default:e}}function u(e){var t=e.getPosition().clone(),r=e.getRotation().clone(),s=e.getBox3(),u=n.default.reorderToBackend(r).z,c=(new A.default).compose(t.clone().negate(),(new o.default).setFromVector3(new a.default(0,0,-u))),l=s.getPoints().map((function(e){return e.clone().applyMatrix4(c)}));return{boundingBox:(new i.default).setFromPoints(l),position:t,rotationZ:u}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isModelTop=function(e){return!(e instanceof n.CoreParamModel)||e.isRoot()&&!e.getAssembly()};var n=r(47)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateTransform=function(e,t){var r=t.position,n=t.rotation,a=t.scale;if(e instanceof i.CoreParamModel)r&&e.setPosition(r),n&&e.setRotation(n),a&&e.setScale(a);else{var s=new o.default(Object.assign(Object.assign({},(0,A.pick)(e.getPosition(),"x","y","z")),r)),u=new o.default(Object.assign(Object.assign({},(0,A.pick)(e.getRotation(),"x","y","z")),n)),c=new o.default(Object.assign(Object.assign({},(0,A.pick)(e.getScale(),"x","y","z")),a));e.updateTransform(s,u,c)}};var n,i=r(47),o=(n=r(5))&&n.__esModule?n:{default:n},A=r(2)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParamModelAssemblyDataService=void 0;var n,i=r(47),o=r(1089),A=r(519),a=(n=r(125))&&n.__esModule?n:{default:n},s=r(1123),u=r(718),c=r(108);function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var g=function(){function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.getAssemblyDataByBrandGoodId=(0,a.default)((function(e,t){return r.config.requestClient.gzipGet("/dcs-model/api/c/assemblydata",{params:{bgid:e,assemblycollectiondataid:t}}).then((function(e){return e.data}))}),Object.assign({promise:!0},u.memoizeValues))}var t,r,n;return t=e,(r=[{key:"getAssemblyByProduct",value:function(e,t){return this.getAssemblyDataByBrandGoodId(t.brandGoodId,t.assemblyCollectionDataId).then((function(r){var n,a=r.assemblyData;(0,A.isAssemblyCollectionProduct)(t)?(a.collectBrandGoodId||(a=Object.assign(Object.assign({},a),{collectBrandGoodId:t.brandGoodId})),n=t.assembly):n=!0;var u=(0,o.parseAssembly)(a,new i.CoreCustomContext,n,e.paramModelAssemblyConstructor);return(0,c.attach)(u,(0,c.toAttachedMap)(r)),(0,s.updatePositionByOffGround)(u,0),u.assignUniqueId()}))}}])&&l(t.prototype,r),n&&l(t,n),e}();t.ParamModelAssemblyDataService=g},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n={response:{afterReceive:function(e){if(e.headers&&e.headers.hasOwnProperty("x-qunhe-bizcode")){var t={errorCodeData:e.data,response:e};return Promise.reject(t)}return e}}};t.default=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t){this.point=e,this.offset=t};t.default=n},function(e,t,r){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}};Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e){this.lengths=e,this.intersections=[]}return e.prototype.addIntersection=function(e){this.intersections.push(e)},e.prototype.getPoints=function(){return this.intersections.map((function(e){return e.point}))},e.prototype.getPointsInside=function(e){var t,r,i=[];try{for(var o=n(this.intersections),A=o.next();!A.done;A=o.next()){var a=A.value;a.offset.x>-e&&a.offset.x<this.lengths.x+e&&a.offset.y>-e&&a.offset.y<this.lengths.y+e&&i.push(a.point)}}catch(e){t={error:e}}finally{try{A&&!A.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return i},e}();t.default=i},function(e,t,r){},function(e,t,r){"use strict";r.r(t),r.d(t,"FittingDesignService",(function(){return $m})),r.d(t,"IntersectedService",(function(){return xQ})),r.d(t,"CustomModelService",(function(){return jQ})),r.d(t,"FittingHintService",(function(){return zQ})),r.d(t,"FittingModelService",(function(){return sb})),r.d(t,"ECameraMode",(function(){return Ab})),r.d(t,"ECameraMoveDirection",(function(){return ab})),r.d(t,"ModelCameraService",(function(){return db})),r.d(t,"ModelHintService",(function(){return Qb})),r.d(t,"ModelService",(function(){return Nb})),r.d(t,"ESelectedType",(function(){return Kb})),r.d(t,"ESetSelectType",(function(){return qb})),r.d(t,"ModelViewerSelectionService",(function(){return zb})),r.d(t,"ModelViewerSelectionV2Service",(function(){return A_})),r.d(t,"ModelViewerService",(function(){return d_})),r.d(t,"PlankPathService",(function(){return N_})),r.d(t,"ModelValidateService",(function(){return q_})),r.d(t,"SceneService",(function(){return tS})),r.d(t,"Application",(function(){return zS})),r.d(t,"EIntersectedCreatedType",(function(){return h})),r.d(t,"EIntersectedType",(function(){return g})),r.d(t,"EFittingType",(function(){return l})),r.d(t,"EIntersectedInfoType",(function(){return f})),r.d(t,"ELanguage",(function(){return Ue})),r.d(t,"FITTING_PARAM_GEOMETRY_COLOR_KEY",(function(){return Ke})),r.d(t,"FITTING_PARAM_GEOMETRY_OPACITY_KEY",(function(){return qe})),r.d(t,"CUSTOM_MODEL_CATEGORY_FILTER",(function(){return Je})),r.d(t,"EPointType",(function(){return E})),r.d(t,"ELineType",(function(){return B})),r.d(t,"EDesignMode",(function(){return Ve})),r.d(t,"ETriggerType",(function(){return He})),r.d(t,"EModelType",(function(){return Ye})),r.d(t,"KEYBOARD_KEY",(function(){return Xe})),r.d(t,"EIntersectModelType",(function(){return d})),r.d(t,"EProductDirection",(function(){return I})),r.d(t,"EPlankPathType",(function(){return We})),r.d(t,"EElementType",(function(){return ze})),r.d(t,"EToolType",(function(){return kf}));r(734),r(1346);var n,i,o,A,a=r(1),s=r.n(a),u=r(3);function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}
67
67
  /*!
68
68
  * @qunhe/custom-apass-api v0.52.73
69
69
  * (c) 2023 yuanlin <yuanlin@qunhemail.com>
@@ -110,7 +110,7 @@ PERFORMANCE OF THIS SOFTWARE.
110
110
  ***************************************************************************** */
111
111
  var Mg=function(e,t){return(Mg=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function xg(e,t){function r(){this.constructor=e}Mg(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var Pg,Tg,Fg=function(){return(Fg=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function Og(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Xc(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A}!function(e){e[e.Local=0]="Local",e[e.OnLine=1]="OnLine"}(Pg||(Pg={})),function(e){e.TOP_BAR="TOP_BAR",e.SM="SM",e.DEFAULT_SM="DEFAULT_SM"}(Tg||(Tg={}));var Lg,Ng,kg,Gg;!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}xg(t,e),t.prototype.getAvailableMiniApp=function(){return Object(zc.API_UNSUPPORT)()},Og([zc.anno.decl.api()],t.prototype,"getAvailableMiniApp"),t=Og([zc.anno.decl({id:"com.custom.miniapp.service.available.app",version:"1.0.0",ACL:_g.PRIVATE})],t)}(zc.ServService);!function(e){e.sense2d="s2d",e.sense3d="s3d"}(Lg||(Lg={})),function(e){e[e.innerSpace=0]="innerSpace",e[e.defineSelf=1]="defineSelf",e[e.specialCut=2]="specialCut",e[e.partitionTools=3]="partitionTools"}(Ng||(Ng={})),function(e){e.RIGHT_FUNCTION_PANEL="RIGHT_FUNCTION_PANEL",e.DIALOG_CENTER="DIALOG_CENTER",e.FULL_SCREEN="FULL_SCREEN",e.DRAGGABLE_PANEL="DRAGGABLE_PANEL"}(kg||(kg={})),function(e){e.LEFT_TOP="LEFT_TOP",e.LEFT_BOTTOM="LEFT_BOTTOM",e.RIGHT_TOP="RIGHT_TOP",e.RIGHT_BOTTOM="RIGHT_BOTTOM",e.DEFINE_SELF="DEFINE_SELF"}(Gg||(Gg={}));var Ug;!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}xg(t,e),t.prototype.loadMode=function(e){return Object(zc.API_UNSUPPORT)()},t.prototype.isOpened=function(){return Object(zc.API_UNSUPPORT)()},t.prototype.close=function(){return Object(zc.API_UNSUPPORT)()},t.prototype.bootstrap=function(e){return Object(zc.API_UNSUPPORT)()},t.prototype.bootstrapDev=function(e){return Object(zc.API_UNSUPPORT)()},Og([zc.anno.decl.api()],t.prototype,"loadMode"),Og([zc.anno.decl.api()],t.prototype,"isOpened"),Og([zc.anno.decl.api()],t.prototype,"close"),Og([zc.anno.decl.event()],t.prototype,"loaded"),Og([zc.anno.decl.api({ACL:_g.PROTECTED})],t.prototype,"bootstrap"),Og([zc.anno.decl.api({ACL:_g.PRIVATE})],t.prototype,"bootstrapDev"),t=Og([zc.anno.decl({id:"com.custom.miniapp.service.bootstrap",version:"1.0.0"})],t)}(zc.ServService);!function(e){e.Undo="undo",e.Redo="redo",e.Clear="clear"}(Ug||(Ug={}));var jg;(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}xg(t,e),t.prototype.handleTopBarIconClick=function(e){return Object(zc.API_UNSUPPORT)()},Og([zc.anno.decl.api()],t.prototype,"handleTopBarIconClick"),t=Og([zc.anno.decl({id:"com.custom.miniapp.topbar.handle",version:"1.0.0"})],t)})(zc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}xg(t,e),t.prototype.getDesignBaseInfo=function(){return Object(zc.API_UNSUPPORT)()},Og([zc.anno.decl.api({ACL:_g.PROTECTED})],t.prototype,"getDesignBaseInfo"),t=Og([zc.anno.decl({id:"com.custom.miniapp.service.design.base.info",version:"1.0.0",ACL:_g.PROTECTED})],t)}(zc.ServService);!function(e){e[e.none=0]="none",e[e.onlyUndo=1]="onlyUndo",e[e.onlyRedo=2]="onlyRedo",e[e.both=3]="both"}(jg||(jg={}));var Vg;(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}xg(t,e),t.prototype.getDocStackState=function(){return Object(zc.API_UNSUPPORT)()},t.prototype.doUndo=function(){return Object(zc.API_UNSUPPORT)()},t.prototype.doRedo=function(){return Object(zc.API_UNSUPPORT)()},Og([zc.anno.decl.event()],t.prototype,"docStackState"),Og([zc.anno.decl.api()],t.prototype,"getDocStackState"),Og([zc.anno.decl.event()],t.prototype,"undo"),Og([zc.anno.decl.api()],t.prototype,"doUndo"),Og([zc.anno.decl.event()],t.prototype,"redo"),Og([zc.anno.decl.api()],t.prototype,"doRedo"),t=Og([zc.anno.decl({id:"com.custom.miniapp.service.action.shortcut",version:"1.0.0"})],t)})(zc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}xg(t,e),t.prototype.confirm=function(e){return Object(zc.API_UNSUPPORT)()},Og([zc.anno.decl.api()],t.prototype,"confirm"),t=Og([zc.anno.decl({id:"com.custom.miniapp.service.dialog",version:"1.0.0"})],t)}(zc.ServService);!function(e){e.ok="ok",e.cancel="cancel",e.close="close"}(Vg||(Vg={}));var Hg;(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}xg(t,e),t.prototype.open=function(e,t){return Object(zc.API_UNSUPPORT)()},t.prototype.close=function(){return Object(zc.API_UNSUPPORT)()},Og([zc.anno.decl.event()],t.prototype,"whenSelected"),Og([zc.anno.decl.api()],t.prototype,"open"),Og([zc.anno.decl.api()],t.prototype,"close"),t=Og([zc.anno.decl({id:"com.custom.miniapp.service.product.select",version:"1.0.0"})],t)})(zc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}xg(t,e),t.prototype.success=function(e){return Object(zc.API_UNSUPPORT)()},t.prototype.error=function(e){return Object(zc.API_UNSUPPORT)()},t.prototype.info=function(e){return Object(zc.API_UNSUPPORT)()},t.prototype.warn=function(e){return Object(zc.API_UNSUPPORT)()},t.prototype.loading=function(e){return Object(zc.API_UNSUPPORT)()},Og([zc.anno.decl.api()],t.prototype,"success"),Og([zc.anno.decl.api()],t.prototype,"error"),Og([zc.anno.decl.api()],t.prototype,"info"),Og([zc.anno.decl.api()],t.prototype,"warn"),Og([zc.anno.decl.api()],t.prototype,"loading"),t=Og([zc.anno.decl({id:"com.custom.miniapp.service.toast",version:"1.0.0"})],t)}(zc.ServService);!function(e){e.LEFT_PANEL="leftPanel",e.BOTTOM_BAR="bottomBar",e.TOP_BAR="topbar",e.RIGHT_SIDE_VIEWER_PANEL="rightSideViewerPanel",e.RIGHT_SIDE_BOTTOM_CONTAINER="rightSideBottomContainer"}(Hg||(Hg={}));var Yg;!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}xg(t,e),t.prototype.hideAllMenuItems=function(){return Object(zc.API_UNSUPPORT)()},t.prototype.showAllMenuItems=function(){return Object(zc.API_UNSUPPORT)()},t.prototype.hidePanel=function(e){return Object(zc.API_UNSUPPORT)()},t.prototype.showPanel=function(e){return Object(zc.API_UNSUPPORT)()},Og([zc.anno.decl.notify()],t.prototype,"hideAllMenuItems"),Og([zc.anno.decl.notify()],t.prototype,"showAllMenuItems"),Og([zc.anno.decl.notify()],t.prototype,"hidePanel"),Og([zc.anno.decl.notify()],t.prototype,"showPanel"),t=Og([zc.anno.decl({id:"com.custom.miniapp.service.ui",version:"1.0.0"})],t)}(zc.ServService);!function(e){e.SCENE_2D="SCENE_2D",e.SCENE_3D="SCENE_3D"}(Yg||(Yg={}));var Kg,qg,Jg,Wg,zg,Xg,Zg,$g;(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}xg(t,e),t.prototype.currentMainView=function(){return Object(zc.API_UNSUPPORT)()},t.prototype.switchMainViewSceneTo=function(e){return Object(zc.API_UNSUPPORT)()},Og([zc.anno.decl.event()],t.prototype,"watchMainViewSense"),Og([zc.anno.decl.api()],t.prototype,"currentMainView"),Og([zc.anno.decl.notify()],t.prototype,"switchMainViewSceneTo"),t=Og([zc.anno.decl({id:"com.custom.miniapp.service.scene",version:"1.0.0"})],t)})(zc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}xg(t,e),t.prototype.getSelected=function(e){return Object(zc.API_UNSUPPORT)()},t.prototype.unSelected=function(){return Object(zc.API_UNSUPPORT)()},t.prototype.select=function(e){return Object(zc.API_UNSUPPORT)()},t.prototype.setSelectAbleByCategories=function(e){return Object(zc.API_UNSUPPORT)()},t.prototype.setSelectedByCategories=function(e){return Object(zc.API_UNSUPPORT)()},Og([zc.anno.decl.event()],t.prototype,"watcher"),Og([zc.anno.decl.api()],t.prototype,"getSelected"),Og([zc.anno.decl.api()],t.prototype,"unSelected"),Og([zc.anno.decl.api()],t.prototype,"select"),Og([zc.anno.decl.api()],t.prototype,"setSelectAbleByCategories"),Og([zc.anno.decl.api()],t.prototype,"setSelectedByCategories"),t=Og([zc.anno.decl({id:"com.custom.miniapp.service.selected.model",version:"1.0.0"})],t)}(zc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}xg(t,e),t.prototype.getParamModelPhotoById=function(e){return Object(zc.API_UNSUPPORT)()},Og([zc.anno.decl.api()],t.prototype,"getParamModelPhotoById"),t=Og([zc.anno.decl({id:"com.custom.miniapp.service.param.model.data.info.service",version:"1.0.0"})],t)}(zc.ServService);!function(e){e[e.TopToBottom=0]="TopToBottom",e[e.LeftToRight=1]="LeftToRight",e[e.FrontToBack=2]="FrontToBack"}(Kg||(Kg={})),function(e){e[e.LeftBack=0]="LeftBack",e[e.LeftFront=1]="LeftFront",e[e.RightBack=2]="RightBack",e[e.RightFront=3]="RightFront",e[e.TopSide=4]="TopSide",e[e.BottomSide=5]="BottomSide",e[e.LeftSide=6]="LeftSide",e[e.RightSide=7]="RightSide"}(qg||(qg={})),function(e){e[e.BackLeftTop=1]="BackLeftTop",e[e.BackLeftBottom=2]="BackLeftBottom",e[e.FrontLeftTop=3]="FrontLeftTop",e[e.FrontLeftBottom=4]="FrontLeftBottom",e[e.BackRightTop=5]="BackRightTop",e[e.BackRightBottom=6]="BackRightBottom",e[e.FrontRightTop=7]="FrontRightTop",e[e.FrontRightBottom=8]="FrontRightBottom",e[e.FrontTopSide=9]="FrontTopSide",e[e.FrontBottomSide=10]="FrontBottomSide",e[e.FrontLeftSide=11]="FrontLeftSide",e[e.FrontRightSide=12]="FrontRightSide",e[e.BackTopSide=13]="BackTopSide",e[e.BackBottomSide=14]="BackBottomSide",e[e.BackLeftSide=15]="BackLeftSide",e[e.BackRightSide=16]="BackRightSide",e[e.BackAll=17]="BackAll",e[e.FrontAll=18]="FrontAll",e[e.Inside=19]="Inside",e[e.OutSide=20]="OutSide",e[e.All=21]="All"}(Jg||(Jg={})),function(e){e[e.drawer=1]="drawer",e[e.pole=2]="pole"}(Wg||(Wg={})),function(e){e[e.INSIDE=0]="INSIDE",e[e.FULL_COVER=1]="FULL_COVER"}(zg||(zg={})),function(e){e.TOP="top",e.BOTTOM="bottom",e.LEFT="left",e.RIGHT="right",e.FRONT="front",e.BACK="back",e.NOFIT="nofit"}(Xg||(Xg={})),function(e){e.FRONT="front",e.BACK="back",e.LEFT="left",e.RIGHT="right",e.TOP="top",e.BOTTOM="bottom",e.FrontBackCenter="frontBackCenter",e.LeftRightCenter="leftRightCenter",e.TopBottomCenter="topBottomCenter"}(Zg||(Zg={})),function(e){e[e.THROUGH=0]="THROUGH",e[e.TOP_FRONT_LEFT=1]="TOP_FRONT_LEFT",e[e.BOTTOM_BACK_RIGHT=2]="BOTTOM_BACK_RIGHT"}($g||($g={}));var ef,tf,rf,nf;(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}xg(t,e),t.prototype.getThemeSetting=function(){return Object(zc.API_UNSUPPORT)()},t.prototype.highlightCornerCut=function(e){return Object(zc.API_UNSUPPORT)()},t.prototype.getEdgeBoards=function(e){return Object(zc.API_UNSUPPORT)()},t.prototype.getStructures=function(e){return Object(zc.API_UNSUPPORT)()},t.prototype.activeWardrobeMsg=function(e){return Object(zc.API_UNSUPPORT)()},t.prototype.cutWardrobeMsg=function(e){return Object(zc.API_UNSUPPORT)()},t.prototype.delOneStructureMsg=function(e){return Object(zc.API_UNSUPPORT)()},t.prototype.onMiniAppOpen=function(){return Object(zc.API_UNSUPPORT)()},t.prototype.getCutCoverOptions=function(){return Object(zc.API_UNSUPPORT)()},t.prototype.hoverBoard=function(e){return Object(zc.API_UNSUPPORT)()},t.prototype.getThroughABTest=function(){return Object(zc.API_UNSUPPORT)()},Og([zc.anno.decl.event()],t.prototype,"watcher"),Og([zc.anno.decl.event()],t.prototype,"watcherTheme"),Og([zc.anno.decl.api()],t.prototype,"getThemeSetting"),Og([zc.anno.decl.api()],t.prototype,"highlightCornerCut"),Og([zc.anno.decl.api()],t.prototype,"getEdgeBoards"),Og([zc.anno.decl.api()],t.prototype,"getStructures"),Og([zc.anno.decl.api()],t.prototype,"activeWardrobeMsg"),Og([zc.anno.decl.api()],t.prototype,"cutWardrobeMsg"),Og([zc.anno.decl.api()],t.prototype,"delOneStructureMsg"),Og([zc.anno.decl.api()],t.prototype,"onMiniAppOpen"),Og([zc.anno.decl.api()],t.prototype,"getCutCoverOptions"),Og([zc.anno.decl.api()],t.prototype,"hoverBoard"),Og([zc.anno.decl.api()],t.prototype,"getThroughABTest"),t=Og([zc.anno.decl({id:"com.custom.miniapp.service.special.cutting.crud",version:"1.0.0",ACL:_g.PRIVATE})],t)})(zc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}xg(t,e),Og([zc.anno.decl.event()],t.prototype,"onRequestReceived"),t=Og([zc.anno.decl({id:"com.custom.miniapp.service.debug",version:"1.0.0",ACL:_g.PRIVATE})],t)}(zc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}xg(t,e),t.prototype.getSelectedWalls=function(){return Object(zc.API_UNSUPPORT)()},t.prototype.unSelected=function(){return Object(zc.API_UNSUPPORT)()},Og([zc.anno.decl.event()],t.prototype,"watcher"),Og([zc.anno.decl.api()],t.prototype,"getSelectedWalls"),Og([zc.anno.decl.api()],t.prototype,"unSelected"),t=Og([zc.anno.decl({id:"com.custom.miniapp.service.select.wall",version:"1.0.0"})],t)}(zc.ServService);!function(e){e[e.LEFT_TO_RIGHT=1]="LEFT_TO_RIGHT",e[e.RIGHT_TO_LEFT=2]="RIGHT_TO_LEFT"}(ef||(ef={})),function(e){e[e.front=1]="front",e[e.back=2]="back"}(tf||(tf={})),function(e){e.FRONT_LEFT="1",e.FRONT_TOP="2",e.FRONT_RIGHT="3",e.FRONT_BOTTOM="4",e.BACK_LEFT="5",e.BACK_TOP="6",e.BACK_RIGHT="7",e.BACK_BOTTOM="8"}(rf||(rf={})),function(e){e[e.PARTITION_STYLE=1]="PARTITION_STYLE",e[e.COLOR_PLATE_STYLE=2]="COLOR_PLATE_STYLE",e[e.COLOR_PLATE_MATERIAL=3]="COLOR_PLATE_MATERIAL",e[e.COLOR_PLATE_THICKNESS=4]="COLOR_PLATE_THICKNESS",e[e.COLOR_PLATE_WIDTH=5]="COLOR_PLATE_WIDTH",e[e.LINE_STYLE=6]="LINE_STYLE",e[e.LINE_MATERIAL=7]="LINE_MATERIAL",e[e.WALL_DIRECTION=8]="WALL_DIRECTION",e[e.LINE_POSITION=9]="LINE_POSITION"}(nf||(nf={}));var of;(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}xg(t,e),t.prototype.getSelectedPartitionWalls=function(){return Object(zc.API_UNSUPPORT)()},t.prototype.generatePartitionWalls=function(e){return Object(zc.API_UNSUPPORT)()},t.prototype.editPartitionWalls=function(e){return Object(zc.API_UNSUPPORT)()},t.prototype.setIWallPavingDirection=function(e){return Object(zc.API_UNSUPPORT)()},t.prototype.setILineSimplePosition=function(e){return Object(zc.API_UNSUPPORT)()},Og([zc.anno.decl.event()],t.prototype,"watcher"),Og([zc.anno.decl.api()],t.prototype,"getSelectedPartitionWalls"),Og([zc.anno.decl.api()],t.prototype,"generatePartitionWalls"),Og([zc.anno.decl.api()],t.prototype,"editPartitionWalls"),Og([zc.anno.decl.api()],t.prototype,"setIWallPavingDirection"),Og([zc.anno.decl.api()],t.prototype,"setILineSimplePosition"),t=Og([zc.anno.decl({id:"com.custom.miniapp.service.partition.model",version:"1.0.0"})],t)})(zc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}xg(t,e),t.prototype.getSelectedPartitionProduct=function(){return Object(zc.API_UNSUPPORT)()},t.prototype.getSelectedLConnectorProduct=function(){return Object(zc.API_UNSUPPORT)()},Og([zc.anno.decl.api()],t.prototype,"getSelectedPartitionProduct"),Og([zc.anno.decl.api()],t.prototype,"getSelectedLConnectorProduct"),t=Og([zc.anno.decl({id:"com.custom.miniapp.service.partition.product",version:"1.0.0"})],t)}(zc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}xg(t,e),t.prototype.undo=function(){return Object(zc.API_UNSUPPORT)()},t.prototype.redo=function(){return Object(zc.API_UNSUPPORT)()},t.prototype.clear=function(){return Object(zc.API_UNSUPPORT)()},Og([zc.anno.decl.api()],t.prototype,"undo"),Og([zc.anno.decl.api()],t.prototype,"redo"),Og([zc.anno.decl.api()],t.prototype,"clear"),t=Og([zc.anno.decl({id:"com.custom.miniapp.service.partition.document",version:"1.0.0"})],t)}(zc.ServService);!function(e){e.style="style",e.material="material"}(of||(of={}));var Af;(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}xg(t,e),t.prototype.getSelectedLConnectors=function(){return Object(zc.API_UNSUPPORT)()},t.prototype.editSelectedLConnectors=function(e){return Object(zc.API_UNSUPPORT)()},t.prototype.unSelected=function(){return Object(zc.API_UNSUPPORT)()},Og([zc.anno.decl.event()],t.prototype,"watcher"),Og([zc.anno.decl.api()],t.prototype,"getSelectedLConnectors"),Og([zc.anno.decl.api()],t.prototype,"editSelectedLConnectors"),Og([zc.anno.decl.api()],t.prototype,"unSelected"),t=Og([zc.anno.decl({id:"com.custom.miniapp.service.select.lconnector",version:"1.0.0"})],t)})(zc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}xg(t,e),t.prototype.getSelectedColumns=function(){return Object(zc.API_UNSUPPORT)()},t.prototype.unSelected=function(){return Object(zc.API_UNSUPPORT)()},Og([zc.anno.decl.event()],t.prototype,"watcher"),Og([zc.anno.decl.api()],t.prototype,"getSelectedColumns"),Og([zc.anno.decl.api()],t.prototype,"unSelected"),t=Og([zc.anno.decl({id:"com.custom.miniapp.service.select.column",version:"1.0.0",ACL:_g.PRIVATE})],t)}(zc.ServService);!function(e){e[e.right=0]="right",e[e.left=1]="left"}(Af||(Af={}));var af;!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}xg(t,e),t.prototype.generateColumnsParamsChanged=function(e){return Object(zc.API_UNSUPPORT)()},t.prototype.generateColumns=function(e){return Object(zc.API_UNSUPPORT)()},Og([zc.anno.decl.api()],t.prototype,"generateColumnsParamsChanged"),Og([zc.anno.decl.api()],t.prototype,"generateColumns"),t=Og([zc.anno.decl({id:"com.custom.miniapp.service.column.generate",version:"1.0.0",ACL:_g.PRIVATE})],t)}(zc.ServService);!function(e){e[e.ALL=0]="ALL",e[e.WALL=1]="WALL",e[e.CELING=2]="CELING",e[e.GROUND=3]="GROUND"}(af||(af={}));var sf,uf,cf;(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}xg(t,e),t.prototype.getSelectedRooms=function(){return Object(zc.API_UNSUPPORT)()},t.prototype.clearSelectedRooms=function(){return Object(zc.API_UNSUPPORT)()},t.prototype.openSelectRoom=function(){return Object(zc.API_UNSUPPORT)()},t.prototype.setOpenLinePanel=function(){return Object(zc.API_UNSUPPORT)()},t.prototype.generateLineFormData=function(e){return Object(zc.API_UNSUPPORT)()},Og([zc.anno.decl.event()],t.prototype,"watcher"),Og([zc.anno.decl.event()],t.prototype,"watcherOpen"),Og([zc.anno.decl.api()],t.prototype,"getSelectedRooms"),Og([zc.anno.decl.api()],t.prototype,"clearSelectedRooms"),Og([zc.anno.decl.api()],t.prototype,"openSelectRoom"),Og([zc.anno.decl.api()],t.prototype,"setOpenLinePanel"),Og([zc.anno.decl.api()],t.prototype,"generateLineFormData"),t=Og([zc.anno.decl({id:"com.custom.miniapp.service.angular.line",version:"1.0.0",ACL:_g.PRIVATE})],t)})(zc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}xg(t,e),t.prototype.getDefaultParam=function(){return Object(zc.API_UNSUPPORT)()},t.prototype.getPartitionVersion=function(){return Object(zc.API_UNSUPPORT)()},Og([zc.anno.decl.api()],t.prototype,"getDefaultParam"),Og([zc.anno.decl.api()],t.prototype,"getPartitionVersion"),t=Og([zc.anno.decl({id:"com.custom.miniapp.service.default.params",version:"1.0.0",ACL:_g.PRIVATE})],t)}(zc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}xg(t,e),t=Og([zc.anno.decl({id:"com.custom.miniapp.service.design.storage.service",version:"1.0.0"})],t)}(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return xg(t,e),t.prototype.getKeys=function(e){return Object(zc.API_UNSUPPORT)()},t.prototype.getItem=function(e){return Object(zc.API_UNSUPPORT)()},t.prototype.getItems=function(e){return Object(zc.API_UNSUPPORT)()},t.prototype.setItem=function(e){return Object(zc.API_UNSUPPORT)()},t.prototype.removeItem=function(e){return Object(zc.API_UNSUPPORT)()},t.prototype.removeItems=function(e){return Object(zc.API_UNSUPPORT)()},Og([zc.anno.decl.api()],t.prototype,"getKeys"),Og([zc.anno.decl.api()],t.prototype,"getItem"),Og([zc.anno.decl.api()],t.prototype,"getItems"),Og([zc.anno.decl.api()],t.prototype,"setItem"),Og([zc.anno.decl.api()],t.prototype,"removeItem"),Og([zc.anno.decl.api()],t.prototype,"removeItems"),t=Og([zc.anno.decl({id:"com.custom.miniapp.service.storage.service",version:"1.0.0"})],t)}(zc.ServService)),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}xg(t,e),t.prototype.getCachedModelJsonDataByModelId=function(e,t){return Object(zc.API_UNSUPPORT)()},t.prototype.getModelJsonDataByModelId=function(e,t){return Object(zc.API_UNSUPPORT)()},Og([zc.anno.decl.api()],t.prototype,"getCachedModelJsonDataByModelId"),Og([zc.anno.decl.api()],t.prototype,"getModelJsonDataByModelId"),t=Og([zc.anno.decl({id:"com.custom.miniapp.service.model.output",version:"1.0.0",ACL:_g.PRIVATE})],t)}(zc.ServService);!function(e){e[e.NONE=0]="NONE",e[e.CIRCLE=1]="CIRCLE",e[e.LINE=2]="LINE",e[e.CUT_CIRCLE=3]="CUT_CIRCLE"}(sf||(sf={})),function(e){e.TRUE="true",e.FALSE="false"}(uf||(uf={})),function(e){e[e.SEGMENT=0]="SEGMENT",e[e.CIRCLE_ARC=1]="CIRCLE_ARC",e[e.ELLIPSE_ARC=3]="ELLIPSE_ARC"}(cf||(cf={}));!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}xg(t,e),t.prototype.getDesignRoomList=function(){return Object(zc.API_UNSUPPORT)()},t.prototype.getDesignSelectedRoom=function(){return Object(zc.API_UNSUPPORT)()},Og([zc.anno.decl.api()],t.prototype,"getDesignRoomList"),Og([zc.anno.decl.api()],t.prototype,"getDesignSelectedRoom"),t=Og([zc.anno.decl({id:"com.custom.miniapp.service.design.floor.room",version:"1.0.0"})],t)}(zc.ServService);var lf,gf,ff=function(e){return e&&"object"===Xc(e)?e.toJSON():e},hf=function(e){return e&&"object"===Xc(e)?Dg.deserialize(JSON.stringify(e)):e},pf={onRetnTransform:{recv:hf,send:ff}},df={onCallTransform:{recv:function(e){return Fg(Fg({},e),{models:e.models.map(hf)})},send:function(e){return Fg(Fg({},e),{models:e.models.map(ff)})}}},If=(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}xg(t,e),t.prototype.newParamModelByCategory=function(e){return Object(zc.API_UNSUPPORT)()},t.prototype.newParamModelByBrandGoodId=function(e){return Object(zc.API_UNSUPPORT)()},t.prototype.getParamModelByModelId=function(e){return Object(zc.API_UNSUPPORT)()},t.prototype.listTopModels=function(e){return Object(zc.API_UNSUPPORT)()},t.prototype.save=function(e){return Object(zc.API_UNSUPPORT)()},t.prototype.remove=function(e){return Object(zc.API_UNSUPPORT)()},Og([zc.anno.decl.api(pf)],t.prototype,"newParamModelByCategory"),Og([zc.anno.decl.api(pf)],t.prototype,"newParamModelByBrandGoodId"),Og([zc.anno.decl.api(pf)],t.prototype,"getParamModelByModelId"),Og([zc.anno.decl.api({onRetnTransform:{recv:function(e){return Array.isArray(e)?{data:e.map(hf)}:Fg(Fg({},e),{data:e.data.map(hf)})},send:function(e){return Array.isArray(e)?e.map(ff):Fg(Fg({},e),{data:e.data.map(ff)})}}})],t.prototype,"listTopModels"),Og([zc.anno.decl.api(df)],t.prototype,"save"),Og([zc.anno.decl.api(df)],t.prototype,"remove"),t=Og([zc.anno.decl({id:"com.custom.design.param-model.service",version:"1.0.0"})],t)}(zc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}xg(t,e),t.prototype.getDesignJson=function(e){throw Object(zc.API_UNSUPPORT)()},Og([zc.anno.decl.api()],t.prototype,"getDesignJson"),t=Og([zc.anno.decl({id:"com.custom.design.export.service",version:"1.0.0"})],t)}(zc.ServService),function(e){return e&&"object"===Xc(e)?Fg(Fg({},e),{parent:e.parent.toJSON()}):e}),yf=function(e){return e&&"object"===Xc(e)?Fg(Fg({},e),{parent:Dg.deserialize(JSON.stringify(e.parent))}):e};(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}xg(t,e),t.prototype.getSelected=function(){throw Object(zc.API_UNSUPPORT)()},Og([zc.anno.decl.event({transform:{recv:yf,send:If}})],t.prototype,"selection"),Og([zc.anno.decl.api({onRetnTransform:{send:If,recv:yf}})],t.prototype,"getSelected"),t=Og([zc.anno.decl({id:"com.custom.inner-space.service",version:"1.0.0"})],t)})(zc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}xg(t,e),t.prototype.current=function(){throw Object(zc.API_UNSUPPORT)()},t.prototype.enter=function(e){throw Object(zc.API_UNSUPPORT)()},t.prototype.exit=function(){throw Object(zc.API_UNSUPPORT)()},Og([zc.anno.decl.api()],t.prototype,"current"),Og([zc.anno.decl.api()],t.prototype,"enter"),Og([zc.anno.decl.api()],t.prototype,"exit"),t=Og([zc.anno.decl({id:"com.custom.mode.service",version:"1.0.0"})],t)}(zc.ServService);!function(e){e.FLOAT="float",e.FLOAT2="float2",e.FLOAT3="float3",e.FLOAT_BUFFER="floatbuf",e.FLOAT2_BUFFER="float2buf",e.FLOAT3_BUFFER="float3buf",e.REFERENCE="reference",e.INT="int",e.INT_BUFFER="intbuf",e.STRING="string",e.SHAPE="shape",e.MATERIAL="material",e.BOOLEAN="boolean",e.BOOLEAN_BUFFER="booleanbuf",e.FIT="fit",e.PATH="paramcornerpath",e.STYLE="style",e.FORMULA_STRING="formulaString",e.BOOLEAN_LIST="booleanlist"}(lf||(lf={})),function(e){e[e.ORIGIN=0]="ORIGIN",e[e.CENTER=1]="CENTER",e[e.LEFT_BACK_BOTTOM=2]="LEFT_BACK_BOTTOM",e[e.LEFT_BACK_TOP=3]="LEFT_BACK_TOP",e[e.LEFT_FRONT_BOTTOM=4]="LEFT_FRONT_BOTTOM",e[e.LEFT_FRONT_TOP=5]="LEFT_FRONT_TOP",e[e.RIGHT_BACK_BOTTOM=6]="RIGHT_BACK_BOTTOM",e[e.RIGHT_BACK_TOP=7]="RIGHT_BACK_TOP",e[e.RIGHT_FRONT_BOTTOM=8]="RIGHT_FRONT_BOTTOM",e[e.RIGHT_FRONT_TOP=9]="RIGHT_FRONT_TOP",e[e.BACK_CENTER=10]="BACK_CENTER",e[e.FRONT_CENTER=11]="FRONT_CENTER"}(gf||(gf={}));String.fromCharCode(1),/Mac|iPod|iPhone|iPad/.test(navigator.platform),new Map;var Cf;!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}xg(t,e),t.prototype.createHandsFree=function(e){return Object(zc.API_UNSUPPORT)()},t.prototype.restoreHandsFree=function(e){return Object(zc.API_UNSUPPORT)()},Og([zc.anno.decl.api()],t.prototype,"createHandsFree"),Og([zc.anno.decl.api()],t.prototype,"restoreHandsFree"),t=Og([zc.anno.decl({id:"com.custom.miniapp.service.hands.free.create",version:"1.0.0",ACL:_g.PRIVATE})],t)}(zc.ServService);!function(e){e.top="top",e.left="left",e.right="right",e.bottom="bottom",e.leftTop="leftTop",e.leftBottom="leftBottom",e.rightTop="rightTop",e.rightBottom="rightBottom"}(Cf||(Cf={}));var Ef;!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}xg(t,e),t.prototype.createWineCell=function(e){return Object(zc.API_UNSUPPORT)()},Og([zc.anno.decl.api()],t.prototype,"createWineCell"),t=Og([zc.anno.decl({id:"com.custom.miniapp.service.inner.space.crud",version:"1.0.0",ACL:_g.PRIVATE})],t)}(zc.ServService);!function(e){e[e.include=0]="include",e[e.exclude=1]="exclude"}(Ef||(Ef={}));(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}xg(t,e),t.prototype.showModelByCateId=function(e){return Object(zc.API_UNSUPPORT)()},Og([zc.anno.decl.api()],t.prototype,"showModelByCateId"),t=Og([zc.anno.decl({id:"com.custom.miniapp.service.model.toggle.visible",version:"1.0.0"})],t)})(zc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}xg(t,e),t.prototype.remove=function(e){return Object(zc.API_UNSUPPORT)()},t.prototype.getParamModelCountByCategory=function(e){return Object(zc.API_UNSUPPORT)()},t.prototype.updateAttacheds=function(e){return Object(zc.API_UNSUPPORT)()},t.prototype.updateAttachedsNew=function(e){return Object(zc.API_UNSUPPORT)()},t.prototype.addAccessoryByBrandGoodId=function(e){return Object(zc.API_UNSUPPORT)()},t.prototype.getParamModelRootList=function(e){return Object(zc.API_UNSUPPORT)()},Og([zc.anno.decl.api()],t.prototype,"remove"),Og([zc.anno.decl.api()],t.prototype,"getParamModelCountByCategory"),Og([zc.anno.decl.api()],t.prototype,"updateAttacheds"),Og([zc.anno.decl.api()],t.prototype,"updateAttachedsNew"),Og([zc.anno.decl.api()],t.prototype,"addAccessoryByBrandGoodId"),Og([zc.anno.decl.api()],t.prototype,"getParamModelRootList"),t=Og([zc.anno.decl({id:"com.custom.miniapp.service.model.crud.service",version:"1.0.0"})],t)}(zc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}xg(t,e),t.prototype.getSelectedInnerSpace=function(){return Object(zc.API_UNSUPPORT)()},t.prototype.unSelected=function(){return Object(zc.API_UNSUPPORT)()},Og([zc.anno.decl.event()],t.prototype,"watcher"),Og([zc.anno.decl.api()],t.prototype,"getSelectedInnerSpace"),Og([zc.anno.decl.api()],t.prototype,"unSelected"),t=Og([zc.anno.decl({id:"com.custom.miniapp.service.inner.space",version:"1.0.0"})],t)}(zc.ServService);var Bf=r(427),vf=r(363),mf=r.n(vf),Qf=r(208),bf=r.n(Qf),_f=r(428),Sf=r.n(_f);function wf(e){return(wf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}
112
112
  /*!
113
- * @qunhe/custom-miniapp-api-core v0.2.12
113
+ * @qunhe/custom-miniapp-api-core v0.2.15
114
114
  * (c) 2023
115
115
  * @license MIT
116
116
  */
@@ -127,9 +127,9 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
127
127
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
128
128
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
129
129
  PERFORMANCE OF THIS SOFTWARE.
130
- ***************************************************************************** */var Df=function(e,t){return(Df=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function Rf(e,t){function r(){this.constructor=e}Df(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function Mf(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":wf(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A}var xf,Pf=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Rf(t,e),t.prototype.request=function(e){return Object(zc.API_UNSUPPORT)()},t.prototype.get=function(e){return Object(zc.API_UNSUPPORT)()},t.prototype.delete=function(e){return Object(zc.API_UNSUPPORT)()},t.prototype.post=function(e){return Object(zc.API_UNSUPPORT)()},t.prototype.put=function(e){return Object(zc.API_UNSUPPORT)()},t.prototype.encryptedRequest=function(e){return Object(zc.API_UNSUPPORT)()},t.prototype.encryptedGet=function(e){return Object(zc.API_UNSUPPORT)()},t.prototype.encryptedDelete=function(e){return Object(zc.API_UNSUPPORT)()},t.prototype.encryptedPost=function(e){return Object(zc.API_UNSUPPORT)()},t.prototype.encryptedPut=function(e){return Object(zc.API_UNSUPPORT)()},t.prototype.gzipRequest=function(e){return Object(zc.API_UNSUPPORT)()},t.prototype.gzipGet=function(e){return Object(zc.API_UNSUPPORT)()},t.prototype.gzipPost=function(e){return Object(zc.API_UNSUPPORT)()},t.prototype.gzipPut=function(e){return Object(zc.API_UNSUPPORT)()},t.prototype.pbGzipGet=function(e){return Object(zc.API_UNSUPPORT)()},t.prototype.pbGzipPost=function(e){return Object(zc.API_UNSUPPORT)()},Mf([zc.anno.decl.api()],t.prototype,"request",null),Mf([zc.anno.decl.api()],t.prototype,"get",null),Mf([zc.anno.decl.api()],t.prototype,"delete",null),Mf([zc.anno.decl.api()],t.prototype,"post",null),Mf([zc.anno.decl.api()],t.prototype,"put",null),Mf([zc.anno.decl.api()],t.prototype,"encryptedRequest",null),Mf([zc.anno.decl.api()],t.prototype,"encryptedGet",null),Mf([zc.anno.decl.api()],t.prototype,"encryptedDelete",null),Mf([zc.anno.decl.api()],t.prototype,"encryptedPost",null),Mf([zc.anno.decl.api()],t.prototype,"encryptedPut",null),Mf([zc.anno.decl.api()],t.prototype,"gzipRequest",null),Mf([zc.anno.decl.api()],t.prototype,"gzipGet",null),Mf([zc.anno.decl.api()],t.prototype,"gzipPost",null),Mf([zc.anno.decl.api()],t.prototype,"gzipPut",null),Mf([zc.anno.decl.api()],t.prototype,"pbGzipGet",null),Mf([zc.anno.decl.api()],t.prototype,"pbGzipPost",null),t=Mf([zc.anno.decl({id:"com.custom.miniapp.inner.service.http.proxy.client",version:"1.0.0",ACL:_g.INNER})],t)}(zc.ServService),Tf=(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Rf(t,e),t.prototype.getAllAvailableService=function(){return Object(zc.API_UNSUPPORT)()},Mf([zc.anno.decl.api()],t.prototype,"getAllAvailableService",null),t=Mf([zc.anno.decl({id:"com.custom.miniapp.inner.service.app.available.service",version:"1.0.0",ACL:_g.INNER})],t)}(zc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Rf(t,e),t.prototype.lockModelBySplit=function(){return Object(zc.API_UNSUPPORT)()},t.prototype.fittingDesignHasChanged=function(){return Object(zc.API_UNSUPPORT)()},Mf([zc.anno.decl.api()],t.prototype,"lockModelBySplit",null),Mf([zc.anno.decl.notify()],t.prototype,"fittingDesignHasChanged",null),t=Mf([zc.anno.decl({id:"com.custom.miniapp.inner.service.lock.model",version:"1.0.0",ACL:_g.INNER})],t)}(zc.ServService)),Ff=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Rf(t,e),t.prototype.getIntersectedById=function(e){return Object(zc.API_UNSUPPORT)()},Mf([zc.anno.decl.api()],t.prototype,"getIntersectedById",null),t=Mf([zc.anno.decl({id:"com.custom.miniapp.inner.service.model.intersected",version:"1.0.0",ACL:_g.INNER})],t)}(zc.ServService);(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Rf(t,e),t.prototype.getPackageInfo=function(){return Object(zc.API_UNSUPPORT)()},Mf([zc.anno.decl.event()],t.prototype,"onRequestReceived",void 0),Mf([zc.anno.decl.api()],t.prototype,"getPackageInfo",null),t=Mf([zc.anno.decl({id:"com.custom.miniapp.service.packageInfo",version:"1.0.0",ACL:_g.PRIVATE})],t)})(zc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Rf(t,e),t.prototype.getFitRule=function(e){return Object(zc.API_UNSUPPORT)()},Mf([zc.anno.decl.event()],t.prototype,"onBorderResultReceived",void 0),Mf([zc.anno.decl.api()],t.prototype,"getFitRule",null),t=Mf([zc.anno.decl({id:"com.custom.miniapp.service.borderResult",version:"1.0.0",ACL:_g.PRIVATE})],t)}(zc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Rf(t,e),t.prototype.getSwitchInfo=function(){return Object(zc.API_UNSUPPORT)()},t.prototype.getSaasConfig=function(){return Object(zc.API_UNSUPPORT)()},t.prototype.getKMSConfig=function(){return Object(zc.API_UNSUPPORT)()},Mf([zc.anno.decl.api()],t.prototype,"getSwitchInfo",null),Mf([zc.anno.decl.api()],t.prototype,"getSaasConfig",null),Mf([zc.anno.decl.api()],t.prototype,"getKMSConfig",null),t=Mf([zc.anno.decl({id:"com.custom.miniapp.service.ConfigInfo",version:"1.0.0",ACL:_g.PRIVATE})],t)}(zc.ServService);!function(e){e[e.info=1]="info",e[e.warning=2]="warning",e[e.error=3]="error"}(xf||(xf={}));!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Rf(t,e),t.prototype.getInternalLog=function(e){return Object(zc.API_UNSUPPORT)()},Mf([zc.anno.decl.api()],t.prototype,"getInternalLog",null),Mf([zc.anno.decl.event()],t.prototype,"floorLevelInfo",void 0),t=Mf([zc.anno.decl({id:"com.custom.miniapp.inner.service.local.log",version:"1.0.0"})],t)}(zc.ServService);var Of,Lf=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Rf(t,e),t.prototype.logApiCalledInfo=function(e){return Object(zc.API_UNSUPPORT)()},t.prototype.logApiError=function(e,t){return Object(zc.API_UNSUPPORT)()},Mf([zc.anno.decl.api()],t.prototype,"logApiCalledInfo",null),Mf([zc.anno.decl.api()],t.prototype,"logApiError",null),t=Mf([zc.anno.decl({id:"com.custom.miniapp.inner.service.track.log",version:"1.0.0",ACL:_g.INNER})],t)}(zc.ServService);!function(e){e.COLLISION="collision",e.INTERSECT="intersect"}(Of||(Of={}));!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Rf(t,e),t.prototype.getSelectedModelMeshInfo=function(e){return Object(zc.API_UNSUPPORT)()},Mf([zc.anno.decl.api()],t.prototype,"getSelectedModelMeshInfo",null),t=Mf([zc.anno.decl({id:"com.custom.miniapp.service.intersect.check",version:"1.0.0",ACL:_g.PRIVATE})],t)}(zc.ServService);function Nf(e){return(Nf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}
130
+ ***************************************************************************** */var Df=function(e,t){return(Df=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function Rf(e,t){function r(){this.constructor=e}Df(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function Mf(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":wf(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A}var xf,Pf=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Rf(t,e),t.prototype.request=function(e){return Object(zc.API_UNSUPPORT)()},t.prototype.get=function(e){return Object(zc.API_UNSUPPORT)()},t.prototype.delete=function(e){return Object(zc.API_UNSUPPORT)()},t.prototype.post=function(e){return Object(zc.API_UNSUPPORT)()},t.prototype.put=function(e){return Object(zc.API_UNSUPPORT)()},t.prototype.encryptedRequest=function(e){return Object(zc.API_UNSUPPORT)()},t.prototype.encryptedGet=function(e){return Object(zc.API_UNSUPPORT)()},t.prototype.encryptedDelete=function(e){return Object(zc.API_UNSUPPORT)()},t.prototype.encryptedPost=function(e){return Object(zc.API_UNSUPPORT)()},t.prototype.encryptedPut=function(e){return Object(zc.API_UNSUPPORT)()},t.prototype.gzipRequest=function(e){return Object(zc.API_UNSUPPORT)()},t.prototype.gzipGet=function(e){return Object(zc.API_UNSUPPORT)()},t.prototype.gzipPost=function(e){return Object(zc.API_UNSUPPORT)()},t.prototype.gzipPut=function(e){return Object(zc.API_UNSUPPORT)()},t.prototype.pbGzipGet=function(e){return Object(zc.API_UNSUPPORT)()},t.prototype.pbGzipPost=function(e){return Object(zc.API_UNSUPPORT)()},Mf([zc.anno.decl.api()],t.prototype,"request",null),Mf([zc.anno.decl.api()],t.prototype,"get",null),Mf([zc.anno.decl.api()],t.prototype,"delete",null),Mf([zc.anno.decl.api()],t.prototype,"post",null),Mf([zc.anno.decl.api()],t.prototype,"put",null),Mf([zc.anno.decl.api()],t.prototype,"encryptedRequest",null),Mf([zc.anno.decl.api()],t.prototype,"encryptedGet",null),Mf([zc.anno.decl.api()],t.prototype,"encryptedDelete",null),Mf([zc.anno.decl.api()],t.prototype,"encryptedPost",null),Mf([zc.anno.decl.api()],t.prototype,"encryptedPut",null),Mf([zc.anno.decl.api()],t.prototype,"gzipRequest",null),Mf([zc.anno.decl.api()],t.prototype,"gzipGet",null),Mf([zc.anno.decl.api()],t.prototype,"gzipPost",null),Mf([zc.anno.decl.api()],t.prototype,"gzipPut",null),Mf([zc.anno.decl.api()],t.prototype,"pbGzipGet",null),Mf([zc.anno.decl.api()],t.prototype,"pbGzipPost",null),t=Mf([zc.anno.decl({id:"com.custom.miniapp.inner.service.http.proxy.client",version:"1.0.0",ACL:_g.INNER})],t)}(zc.ServService),Tf=(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Rf(t,e),t.prototype.getAllAvailableService=function(){return Object(zc.API_UNSUPPORT)()},Mf([zc.anno.decl.api()],t.prototype,"getAllAvailableService",null),t=Mf([zc.anno.decl({id:"com.custom.miniapp.inner.service.app.available.service",version:"1.0.0",ACL:_g.INNER})],t)}(zc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Rf(t,e),t.prototype.lockModelBySplit=function(){return Object(zc.API_UNSUPPORT)()},t.prototype.fittingDesignHasChanged=function(){return Object(zc.API_UNSUPPORT)()},Mf([zc.anno.decl.api()],t.prototype,"lockModelBySplit",null),Mf([zc.anno.decl.notify()],t.prototype,"fittingDesignHasChanged",null),t=Mf([zc.anno.decl({id:"com.custom.miniapp.inner.service.lock.model",version:"1.0.0",ACL:_g.INNER})],t)}(zc.ServService)),Ff=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Rf(t,e),t.prototype.getIntersectedById=function(e){return Object(zc.API_UNSUPPORT)()},Mf([zc.anno.decl.api()],t.prototype,"getIntersectedById",null),t=Mf([zc.anno.decl({id:"com.custom.miniapp.inner.service.model.intersected",version:"1.0.0",ACL:_g.INNER})],t)}(zc.ServService);(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Rf(t,e),t.prototype.getPackageInfo=function(){return Object(zc.API_UNSUPPORT)()},Mf([zc.anno.decl.event()],t.prototype,"onRequestReceived",void 0),Mf([zc.anno.decl.api()],t.prototype,"getPackageInfo",null),t=Mf([zc.anno.decl({id:"com.custom.miniapp.service.packageInfo",version:"1.0.0",ACL:_g.PRIVATE})],t)})(zc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Rf(t,e),t.prototype.getFitRule=function(e){return Object(zc.API_UNSUPPORT)()},Mf([zc.anno.decl.event()],t.prototype,"onBorderResultReceived",void 0),Mf([zc.anno.decl.api()],t.prototype,"getFitRule",null),t=Mf([zc.anno.decl({id:"com.custom.miniapp.service.borderResult",version:"1.0.0",ACL:_g.PRIVATE})],t)}(zc.ServService),function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Rf(t,e),t.prototype.getSwitchInfo=function(){return Object(zc.API_UNSUPPORT)()},t.prototype.getSaasConfig=function(){return Object(zc.API_UNSUPPORT)()},t.prototype.getKMSConfig=function(){return Object(zc.API_UNSUPPORT)()},Mf([zc.anno.decl.api()],t.prototype,"getSwitchInfo",null),Mf([zc.anno.decl.api()],t.prototype,"getSaasConfig",null),Mf([zc.anno.decl.api()],t.prototype,"getKMSConfig",null),t=Mf([zc.anno.decl({id:"com.custom.miniapp.service.ConfigInfo",version:"1.0.0",ACL:_g.PRIVATE})],t)}(zc.ServService);!function(e){e[e.info=1]="info",e[e.warning=2]="warning",e[e.error=3]="error"}(xf||(xf={}));!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Rf(t,e),t.prototype.getInternalLog=function(e){return Object(zc.API_UNSUPPORT)()},Mf([zc.anno.decl.api()],t.prototype,"getInternalLog",null),Mf([zc.anno.decl.event()],t.prototype,"floorLevelInfo",void 0),t=Mf([zc.anno.decl({id:"com.custom.miniapp.inner.service.local.log",version:"1.0.0"})],t)}(zc.ServService);var Of,Lf=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Rf(t,e),t.prototype.logApiCalledInfo=function(e){return Object(zc.API_UNSUPPORT)()},t.prototype.logApiError=function(e){return Object(zc.API_UNSUPPORT)()},t.prototype.log=function(e){return Object(zc.API_UNSUPPORT)()},Mf([zc.anno.decl.notify()],t.prototype,"logApiCalledInfo",null),Mf([zc.anno.decl.notify()],t.prototype,"logApiError",null),Mf([zc.anno.decl.notify()],t.prototype,"log",null),t=Mf([zc.anno.decl({id:"com.custom.miniapp.inner.service.track.log",version:"1.0.0",ACL:_g.INNER})],t)}(zc.ServService);!function(e){e.COLLISION="collision",e.INTERSECT="intersect"}(Of||(Of={}));!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}Rf(t,e),t.prototype.getSelectedModelMeshInfo=function(e){return Object(zc.API_UNSUPPORT)()},Mf([zc.anno.decl.api()],t.prototype,"getSelectedModelMeshInfo",null),t=Mf([zc.anno.decl({id:"com.custom.miniapp.service.intersect.check",version:"1.0.0",ACL:_g.PRIVATE})],t)}(zc.ServService);function Nf(e){return(Nf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}
131
131
  /*!
132
- * @qunhe/custom-miniapp-sdk v0.21.13
132
+ * @qunhe/custom-miniapp-sdk v0.21.16
133
133
  * (c) 2023
134
134
  * @license MIT
135
135
  */
@@ -146,4 +146,4 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
146
146
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
147
147
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
148
148
  PERFORMANCE OF THIS SOFTWARE.
149
- ***************************************************************************** */var kf,Gf=function(e,t){return(Gf=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function Uf(e,t){function r(){this.constructor=e}Gf(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function jf(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Nf(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A}function Vf(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),A=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)A.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return A}function Hf(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Vf(arguments[t]));return e}!function(e){e.CABINET="CABINET",e.WARDROBE="WARDROBE",e.DOOR_WINDOW="DW",e.CABINET_COPY="CABINET_COPY",e.WARDROBE_COPY="WARDROBE_COPY",e.DOOR_WINDOW_COPY="DW_COPY"}(kf||(kf={}));var Yf=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Uf(t,e),t.prototype.getParamModelDataByIds=function(e,t){return Object(zc.API_UNSUPPORT)()},t.prototype.getTopParamModels=function(e){return Object(zc.API_UNSUPPORT)()},jf([zc.anno.decl.api()],t.prototype,"getParamModelDataByIds",null),jf([zc.anno.decl.api()],t.prototype,"getTopParamModels",null),t=jf([zc.anno.decl({id:"com.custom.miniapp.inner.service.model.param.data",version:"1.0.0",ACL:_g.INNER})],t)}(zc.ServService);var Kf,qf,Jf,Wf=function(e,t,r){return e(r={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&r.path)}},r.exports),r.exports}((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.PopBufferMtl=void 0,t.toPopBufferMtl=function(e){var t=e.parameters,r=new A;r.setObjName(e.objName),e.brandGoodId&&r.setBrandGoodId(e.brandGoodId);if(t)for(var i=0,o=t.length;i<o;i++){var a=t[i];switch(a.name){case"diffuseTexture":r.setDiffuseTexture(JSON.parse(a.value).defaultUrl);break;case"diffuseColor":r.setDiffuseColor((new n.default).fromString(a.value));break;case"refractColor":r.setRefractColor((new n.default).fromString(a.value));break;case"transparentType":r.setTransparentType(Number(a.value))}}return r};var r,n=(r=at.a)&&r.__esModule?r:{default:r};function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(o=n.key,A=void 0,A=function(e,t){if("object"!==i(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"===i(A)?A:String(A)),n)}var o,A}var A=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r,n;return t=e,(r=[{key:"getObjName",value:function(){return this.objName}},{key:"setObjName",value:function(e){return this.objName=e,this}},{key:"getBrandGoodId",value:function(){return this.brandGoodId}},{key:"setBrandGoodId",value:function(e){return this.brandGoodId=e,this}},{key:"getDiffuseTexture",value:function(){return this.diffuseTexture}},{key:"setDiffuseTexture",value:function(e){return this.diffuseTexture=e,this}},{key:"getDiffuseColor",value:function(){return this.diffuseColor}},{key:"setDiffuseColor",value:function(e){return this.diffuseColor=e,this}},{key:"getRefractColor",value:function(){return this.refractColor}},{key:"setRefractColor",value:function(e){return this.refractColor=e,this}},{key:"getTransparenType",value:function(){return this.transparentType}},{key:"setTransparentType",value:function(e){return this.transparentType=e,this}}])&&o(t.prototype,r),n&&o(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.PopBufferMtl=A})),zf=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Uf(t,e),t.prototype.toJSON=function(){return{paramPackages:Hf(this.paramPackages.values()),hardwares:Hf(this.products.values()),paramModelAttacheds:Array.from(this.paramModelAttacheds).map((function(e){var t=Vf(e,2);t[0];var r=t[1],n=new Sf.a;return Object(tr.extend)(n,r),n.parsedHoles=[],n.parsedInnerFrames=[],n})),displayInfoMap:Hf(this.displayInfos.values()),wireFrames:Object(tr.fromPairs)(Hf(this.wireGeometrysMap.entries()).map((function(e){return[e[0],e[1].vertices]})))}},t.prototype.serialize=function(){return JSON.stringify(this.toJSON())},t.prototype.unSerialize=function(e){var t=this,r="string"==typeof e?JSON.parse(e):e,n=Object(tr.omit)(r,["wireFrames","paramModelAttacheds"]);r.paramModelAttacheds&&(n.paramModelAttacheds=r.paramModelAttacheds.map((function(e){var t=new Sf.a;if(Object(tr.extend)(t,e),t.meshModels=t.meshModels.map((function(e){var t=e.displayMaterial,r=new mf.a,n=new Qn.a;return Object(tr.extend)(n,e.geometry),r.texture=e.texture,r.displayMaterial=t?Wf.toPopBufferMtl(t):void 0,r.geometry=n,r})),t.furnitureModel){var r=new Bf.FurnitureModel;Object(tr.extend)(r,t.furnitureModel),r.size=new at.a(r.size),r.position=new at.a(r.position),r.rotate=new at.a(r.rotate),r.scale=new at.a(r.scale),t.furnitureModel=r}return t}))),r.wireFrames&&Object(tr.each)(r.wireFrames,(function(e,r){t.addWireGeometrysMap(r,e)})),this.addCustomResources(n)},t}(bf.a);!function(e){e[e.willExit=0]="willExit"}(Kf||(Kf={})),function(e){e[e.exit=0]="exit"}(qf||(qf={})),function(e){e[e.personalLibrary=1]="personalLibrary",e[e.enterpriseLibrary=2]="enterpriseLibrary"}(Jf||(Jf={}));var Xf=r(245),Zf=r.n(Xf),$f=r(287),eh=r.n($f),th=r(1129),rh=r.n(th),nh=r(361),ih=r.n(nh),oh=r(723),Ah=r.n(oh),ah=r(1130),sh=r.n(ah),uh=r(727),ch=r.n(uh),lh=r(728),gh=r.n(lh),fh=r(207),hh=r.n(fh),ph=r(112),dh=r.n(ph),Ih=r(187),yh=r.n(Ih),Ch=r(530),Eh=r.n(Ch),Bh=r(1131),vh=r.n(Bh),mh=r(721),Qh=r.n(mh),bh=r(720),_h=r.n(bh),Sh=r(360),wh=r.n(Sh),Dh=r(242),Rh=r.n(Dh),Mh=r(732),xh=r.n(Mh),Ph=r(719),Th=r.n(Ph),Fh=r(1132),Oh=r.n(Fh),Lh=Object({DEPLOY_VERSION:1,APP_VERSION:1}).ENABLE_DEV_CHECK?[bi.a,fi.a,ih.a,$e.a,Ah.a,tt.a,sh.a,hh.a,dh.a,yh.a,Eh.a,nt.a,pi.a,Ii.a,Ci.a,vh.a,Qh.a,_h.a,ot.a,wh.a,Rh.a,xh.a,Mh.LineIndex,Bi.a,Th.a,Oh.a,Yr.a,at.a,ArrayBuffer,ia.Vector3,eh.a,rh.a,Js.ParamStore,ch.a,gh.a,mf.a,Qn.a,Bf.FurnitureModel,Map,ia.SkyBackground]:[];Object(Xf.inject)({isKnownImmutableInstance:function(e){return Lh.some((function(t){return e instanceof t}))}});Zf.a;var Nh=r(211);function kh(e){return(kh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Gh(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Uh(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function jh(e,t){return(jh=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Vh(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Yh(e);if(t){var i=Yh(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Hh(this,r)}}function Hh(e,t){return!t||"object"!==kh(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Yh(e){return(Yh=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Kh,qh=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&jh(e,t)}(o,e);var t,r,n,i=Vh(o);function o(){var e;return Gh(this,o),(e=i.apply(this,arguments)).rootState=new Wu,e}return t=o,(r=[{key:"stateManager",get:function(){return this.rootState}},{key:"onInitialize",value:function(){var e=new jc(this,this.rootState);e.init(),e.run()}}])&&Uh(t.prototype,r),n&&Uh(t,n),o}(Nh.BasePlugin);qh.dependencies=[Ji.AppServicePlugin];var Jh,Wh,zh,Xh=function(e){if(!Kh)throw new Error("please new Application before call method");return Kh.getCustomMiniAppService(e)},Zh=r(249),$h=r(108),ep=r(429);function tp(e){zh=e}function rp(e){return(rp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function np(e){return function(e){if(Array.isArray(e))return ip(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return ip(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ip(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ip(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function op(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Ap(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function ap(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){Ap(o,n,i,A,a,"next",e)}function a(e){Ap(o,n,i,A,a,"throw",e)}A(void 0)}))}}function sp(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function up(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function cp(e,t){return(cp=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function lp(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=fp(e);if(t){var i=fp(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return gp(this,r)}}function gp(e,t){return!t||"object"!==rp(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function fp(e){return(fp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var hp=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&cp(e,t)}(o,e);var t,r,n,i=lp(o);function o(){var e;return sp(this,o),(e=i.apply(this,arguments)).state={currentCustomData:void 0,designInfo:void 0,hardwarelist:[],casbinModelIdMap:{}},e.lastCurrentCustomDataArgs=[],e.getCurrentBaseDesignInfo=ap(s.a.mark((function t(){var r,n;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(r=e.state.designInfo)){t.next=3;break}return t.abrupt("return",r);case 3:return n=Xh(Zh.MiniAppDesignBaseInfoService),t.next=6,n.getDesignBaseInfo();case 6:return r=t.sent,e.state.designInfo=r,t.abrupt("return",r);case 9:case"end":return t.stop()}}),t)}))),e.getCurrentCustomData=function(){var t=ap(s.a.mark((function t(r){var n,i;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.state.currentCustomData,r){t.next=3;break}return t.abrupt("return",n);case 3:if(i=Object(tr.castArray)(r),!Object(tr.difference)(i,e.lastCurrentCustomDataArgs).length&&n){t.next=11;break}return t.next=8,_m(r);case 8:n=t.sent,t.next=12;break;case 11:return t.abrupt("return",n);case 12:return e.lastCurrentCustomDataArgs=i,e.state.currentCustomData=n,t.abrupt("return",n);case 15:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.loadFittingHardwareToSense=function(){var t=ap(s.a.mark((function t(r){var n,i,o,A,a,u,c,l,g,f,h,p;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=Object(tr.uniq)(Object(tr.flatten)(Object(tr.map)(r.hardware,(function(e){return e.map((function(e){return e.brandGoodId}))})))),e.state.casbinModelIdMap={},n.length){t.next=4;break}return t.abrupt("return");case 4:return i=e.getStateManager().core,o=i.design,A=i.pad,t.next=8,Promise.allSettled(Object(tr.map)(n,function(){var e=ap(s.a.mark((function e(t){var r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Pm(t);case 2:return r=e.sent,e.abrupt("return",[t,r]);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 8:return a=t.sent,t.next=11,Tm(n);case 11:for(p in u=t.sent,c=Object(tr.mapValues)(Object(tr.keyBy)(Object(tr.filter)(a,(function(e){return"fulfilled"===e.status})).map((function(e){return e.value})),(function(e){return e[0]})),(function(e){return e[1]})),l=o.getCustom(),g=[],f={},h=function(e){var t=r.hardware[e],n=A.findModelOrAssemblyModelById(e);if(n){var i=n.getConcatenatedMatrix(),o=n.getSize(),a=(new nt.a).makeTranslation(new at.a(-o.x/2,o.y/2,-o.z/2)),s=i.clone().multiply(a),l=Object(tr.map)(t,(function(e){var t=c[e.brandGoodId],r=u[e.brandGoodId]||{x:0,y:0,z:0};if(t){var i=t.paramModelData,o=op(t,["paramModelData"]),A=e.rotate,a=(new jt).parse(i);Object($h.attach)(a,Object($h.toAttachedMap)(o)),a.setIsAppendHardware(!0),a.setLinkedIds(e.linkedIds),a.setHardwareData(e),a.linkParamModelId=n.id;var l=s.clone().multiply((new nt.a).compose(new at.a(e.position),new tt.a(A.x,A.y,A.z),new at.a(e.scale)).multiply((new nt.a).setPosition(new at.a(r)))),g=li.a.decompose(l),h=g.rotation,p=g.position,d=g.scale,I=new at.a(p);return a.setPosition({x:I.x,y:I.y,z:I.z}),a.setRotation({x:h.x,y:h.y,z:h.z}),a.setScale(d),a.assignUniqueId(),f[e.id]=a.id,a}})).filter((function(e){return!!e}));g.push.apply(g,np(l))}else Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING&&console.warn("当前五金信息找不到对应模型!")},r.hardware)h(p);if(!g.length){t.next=23;break}return t.next=21,Jh.updateAttacheds(g);case 21:l.addParamModels.apply(l,g),e.state.casbinModelIdMap=f;case 23:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e}return t=o,(r=[{key:"module",value:function(){return"baseDesignInfo"}}])&&up(t.prototype,r),n&&up(t,n),o}(qi.AXR);function pp(e){return(pp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function dp(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ip(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function yp(e,t){return(yp=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Cp(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Bp(e);if(t){var i=Bp(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Ep(this,r)}}function Ep(e,t){return!t||"object"!==pp(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Bp(e){return(Bp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var vp,mp,Qp,bp,_p,Sp,wp,Dp,Rp=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&yp(e,t)}(o,e);var t,r,n,i=Cp(o);function o(){var e;return dp(this,o),(e=i.apply(this,arguments)).paramModelConstructor=jt,e}return t=o,(r=[{key:"parseParamModelAssemblies",value:function(e){var t=this;return e.forEach((function(e){var r=(new Xt).parse(e,t,{isRootWorldMatrix:!0});t.addParamModelAssembly(r)})),this}}])&&Ip(t.prototype,r),n&&Ip(t,n),o}(zf),Mp=r(75),xp=Symbol("fitting-data"),Pp=Symbol("groove-fitting-entity"),Tp=Symbol("intersect-data"),Fp=Symbol("param-model-hint-entity"),Op=Symbol("fitting-hint-entity"),Lp=Symbol("plank-outline-hint-entity");!function(e){e.FAIL="fail",e.SUCCESS="success",e.LOADING="loading"}(vp||(vp={})),function(e){e[e.READY=0]="READY",e[e.LOADING=1]="LOADING",e[e.FAILED=2]="FAILED",e[e.INVALID=3]="INVALID",e[e.SUCCESS=4]="SUCCESS"}(mp||(mp={})),function(e){e[e.READY=0]="READY",e[e.RUNNING=1]="RUNNING",e[e.FAILED=2]="FAILED",e[e.SUCCESS=3]="SUCCESS"}(Qp||(Qp={})),function(e){e.SCENE_ID="cp"}(bp||(bp={})),function(e){e[e.theme=1735419]="theme",e[e.sceneBG=15461612]="sceneBG",e[e.outline=0]="outline"}(_p||(_p={})),function(e){e.selectBlank="sb",e.renderModeChange="r",e.doorVisibilityChange="d"}(Sp||(Sp={})),function(e){e[e.opaqueModel=1]="opaqueModel",e[e.translucentModel=.4]="translucentModel",e[e.transparentModel=0]="transparentModel"}(wp||(wp={})),function(e){e.SHADING="0",e.OUTLINE_WITH_SHADING="1",e.TRANSLUCENT="2",e.OUTLINE_AND_TRANSLUCENT="3"}(Dp||(Dp={}));var Np,kp=[];function Gp(e){return(Gp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Up(e){return function(e){if(Array.isArray(e))return jp(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return jp(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return jp(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function jp(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Vp(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function Hp(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){Vp(o,n,i,A,a,"next",e)}function a(e){Vp(o,n,i,A,a,"throw",e)}A(void 0)}))}}function Yp(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Kp(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qp(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Jp(e,t){return(Jp=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Wp(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Xp(e);if(t){var i=Xp(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return zp(this,r)}}function zp(e,t){return!t||"object"!==Gp(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Xp(e){return(Xp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}!function(e){e.design="design",e.series="series"}(Np||(Np={}));var Zp=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Jp(e,t)}(o,e);var t,r,n,i=Wp(o);function o(){var e;return Kp(this,o),(e=i.apply(this,arguments)).state=e.stateCreator.create({main:mp.READY,design:mp.READY,series:mp.READY}),e.$reducerState=e.reducerCreator.create(e.state),e.$actionLoad=e.unitCreator.async((function(t){t.started.latest(s.a.mark((function e(t,r){var n,i,o,A;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Wh.getParamModelDataByBrandGoodId(t);case 2:return n=e.sent,i=n.paramModelData,o=Yp(n,["paramModelData"]),A=(new jt).parse(i),Object($h.attach)(A,Object($h.toAttachedMap)(o)),e.next=9,Jh.updateAttacheds([A]);case 9:return r.core.design.getCustom().addParamModels(A),r.core.fittingDesign.setFittings(kp),e.next=13,Object(Mp.put)(this.$actionLoad.done.message({params:t,result:mp.SUCCESS}));case 13:case"end":return e.stop()}}),e,this)}))),t.done.produce(e.$reducerState,(function(e,t){e.main=t.result}))})),e.$actionAddModelToSense=e.unitCreator.async((function(t){t.started.latest(s.a.mark((function e(t,r){var n,i,o,A,a,u;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.custom,i=t.needAttach,o=n.getParamModels(),A=n.getParamModelAssemblies(),!i){e.next=6;break}return e.next=6,Promise.all(o.map(function(){var e=Hp(s.a.mark((function e(t){var r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Wh.getParamModelDataByBrandGoodId(t.getBrandGoodId());case 2:r=e.sent,Object($h.attach)(t,Object($h.toAttachedMap)(r));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 6:if(r.core.design.setCustom(n),a=o.filter((function(e){return!e.getAssembly()})),!i){e.next=12;break}return u=[].concat(Up(a),Up(A)),e.next=12,Jh.updateAttacheds(u);case 12:return e.next=14,Object(Mp.put)(this.$actionAddModelToSense.done.message({params:{custom:n,needAttach:i},result:mp.SUCCESS}));case 14:case"end":return e.stop()}}),e,this)}))),t.done.produce(e.$reducerState,(function(e,t){e.main=t.result}))})),e.$actionAddParamModelToSense=e.unitCreator.async((function(t){t.started.latest(s.a.mark((function e(t,r){var n,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=t.map((function(e){var t=e.paramModelData,r=Yp(e,["paramModelData"]),n=(new jt).parse(t,new Rp);return Object($h.attach)(n,Object($h.toAttachedMap)(r)),n})),e.next=3,Jh.updateAttacheds(i);case 3:return(n=r.core.design.getCustom()).addParamModels.apply(n,Up(i)),e.next=6,Object(Mp.put)(this.$actionAddParamModelToSense.done.message({params:t,result:mp.SUCCESS}));case 6:case"end":return e.stop()}}),e,this)}))),t.done.produce(e.$reducerState,(function(e,t){e.main=t.result}))})),e.$actionAddParamModelAssemblyToSense=e.unitCreator.async((function(t){t.started.latest(s.a.mark((function e(t,r){var n,i,o,A;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.core.design.getCustom(),i=new Rp,o=t.map((function(e){return(new Xt).parse(e,i)})),A=i.getParamModels(),e.next=6,Promise.all(A.map(function(){var e=Hp(s.a.mark((function e(t){var r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Wh.getParamModelDataByBrandGoodId(t.getBrandGoodId());case 2:r=e.sent,Object($h.attach)(t,Object($h.toAttachedMap)(r));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 6:return e.next=8,Jh.updateAttacheds(Up(o));case 8:return n.addParamModelAssemblies.apply(n,Up(o)),n.addParamModels.apply(n,Up(A)),e.next=12,Object(Mp.put)(this.$actionAddParamModelAssemblyToSense.done.message({params:t,result:mp.SUCCESS}));case 12:case"end":return e.stop()}}),e,this)}))),t.done.produce(e.$reducerState,(function(e,t){e.main=t.result}))})),e}return t=o,(r=[{key:"module",value:function(){return"entry"}}])&&qp(t.prototype,r),n&&qp(t,n),o}(qi.AXR);function $p(e){return($p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ed(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function td(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&rd(e,t)}function rd(e,t){return(rd=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function nd(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=od(e);if(t){var i=od(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return id(this,r)}}function id(e,t){return!t||"object"!==$p(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function od(e){return(od=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}qi.AXR;var Ad=function(e){td(r,e);var t=nd(r);function r(){return ed(this,r),t.apply(this,arguments)}return r}(qi.AXRPartial),ad=(qi.AXRManager,Math.sqrt(2)),sd=Math.PI/6,ud=Math.PI/3+Math.PI;function cd(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ud,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:sd,n=e.getPosition(),i=e.getSize(),o=n.clone(),A=i.length()*ad,a=new at.a(Math.cos(r)*Math.cos(t),Math.cos(r)*Math.sin(t),Math.sin(r)).mul(A).applyMatrix4(e.getMatrix());return{lookAt:o,position:a}}var ld,gd=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5e3,t=arguments.length>1?arguments[1]:void 0;return new Promise((function(r){setTimeout(r,e,t)}))};function fd(e){var t,r,n,i=function(e){return function(){void 0!==n&&(clearTimeout(n),n=void 0);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];e.call.apply(e,[this].concat(r))}};return{promise:new Promise((function(o,A){t=i(o),r=i(A),"number"==typeof e&&(n=setTimeout((function(){n=void 0,r(new Error("defer waiting timeout, ".concat(e,"ms")))}),e))})),resolve:t,reject:r}}function hd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function pd(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?hd(Object(r),!0).forEach((function(t){dd(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hd(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function dd(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Id(e){return e["@type"]===g.THROUGH_SHELL}function yd(e){var t=e.elements;return(new oa.a.Matrix4).set(t[0],t[4],t[8],t[12],t[1],t[5],t[9],t[13],t[2],t[6],t[10],t[14],t[3],t[7],t[11],t[15])}function Cd(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ed(e,t){var r,n=e.getSize(),i=(new nt.a).getInverse(e.getConcatenatedMatrix()),o=t.clone().applyMatrix4(yd(i)),A=o.x,a=o.y,s=o.z,u=(Cd(r={},ld.TOP,Math.abs(s-n.z/2)),Cd(r,ld.LEFT,Math.abs(A+n.x/2)),Cd(r,ld.BACK,Math.abs(a+n.y/2)),Cd(r,ld.RIGHT,Math.abs(A-n.x/2)),Cd(r,ld.FRONT,Math.abs(a-n.y/2)),Cd(r,ld.BOT,Math.abs(s+n.z/2)),r),c=Object.entries(u).reduce((function(e,t){return t[1]<e[1]?t:e}));return c[1]<.01?+c[0]:ld.UNKNOWN}function Bd(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}!function(e){e[e.UNKNOWN=-1]="UNKNOWN",e[e.TOP=0]="TOP",e[e.LEFT=1]="LEFT",e[e.BACK=2]="BACK",e[e.RIGHT=3]="RIGHT",e[e.FRONT=4]="FRONT",e[e.BOT=5]="BOT"}(ld||(ld={}));var vd=function(){var e,t=(e=s.a.mark((function e(t){var r,n,i,o,A,a,u,c,l,g,f;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=YC(),n=r.baseDesignInfo,e.next=3,n.getCurrentBaseDesignInfo();case 3:return i=e.sent,o=i.designId,A=i.levelid,a={modelid:null!=t?t:"",designid:o,levelid:A,toolType:0},u=n.getStateManager().core.design.getCustom(),t||((c=u.getParamModelAssemblies()).length?a.modelid=c[0].id:(l=u.getParamModels().filter((function(e){return!e.isAppendHardware}))).length&&(a.modelid=l[0].id)),e.next=11,n.getCurrentCustomData(null!=t?t:a.modelid);case 11:return g=e.sent,f=g.toolType,a.toolType=f,e.abrupt("return",a);case 15:case"end":return e.stop()}}),e)})),function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){Bd(o,n,i,A,a,"next",e)}function a(e){Bd(o,n,i,A,a,"throw",e)}A(void 0)}))});return function(e){return t.apply(this,arguments)}}(),md=r(243);function Qd(e){return function(e){if(Array.isArray(e))return bd(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return bd(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return bd(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function bd(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _d(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Rp;r.parseParamModels(e.paramModels).parseParamModelGroups(e.paramModelGroups).parseParamModelAssemblies(e.paramModelCombinations);var n=r.getParamModelAssemblies(),i=(t=Qd(r.getParamModels())).concat.apply(t,Qd(n.map((function(e){return e.getParamModels()}))));return i=i.filter((function(e){return!e.isAccessory()})),Object(tr.uniqBy)(md.ParamModelUtils.collectAccessories(i),"id").forEach((function(e){e.toLocalMatrix()})),{paramModels:i,paramModelAssemblies:n}}function Sd(e){return(Sd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function wd(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function Dd(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){wd(o,n,i,A,a,"next",e)}function a(e){wd(o,n,i,A,a,"throw",e)}A(void 0)}))}}function Rd(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Md(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function xd(e,t){return(xd=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Pd(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Fd(e);if(t){var i=Fd(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Td(this,r)}}function Td(e,t){return!t||"object"!==Sd(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Fd(e){return(Fd=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Od(e){return function(e){if(Array.isArray(e))return Ld(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Ld(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ld(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ld(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Nd(e){var t=e.map((function(e){return e.subModels&&e.subModels.length?Nd(e.subModels):[]})).flat();return t.push.apply(t,Od(e)),t}var kd=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&xd(e,t)}(g,e);var t,r,n,i,o,A,a,u,c,l=Pd(g);function g(){var e;return Rd(this,g),(e=l.apply(this,arguments)).state=e.stateCreator.create({loading:vp.FAIL,allSubModels:[],result:void 0,currModelId:""}),e.$reducerState=e.reducerCreator.create(e.state),e.$actionSetModelId=e.unitCreator.sync((function(t){t.produce(e.$reducerState,(function(e,t){e.currModelId!==t&&(e.result=void 0,e.allSubModels=[]),e.currModelId=t}))})),e.$actionLoadParamModelJsonData=e.unitCreator.async((function(t){t.started.every(s.a.mark((function e(t){var r,n,i,o,A,a,u,c,l,g,f,h,p,d,I,y,C;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.modelId,n=t.defer,i=t.hasFitting,o=void 0!==i&&i,A=t.force,a=void 0!==A&&A,u=t.templateId,c=t.timeout,l=this.state.state,g=l.currModelId,f=l.result,h=l.currTemplateId,r){e.next=4;break}throw new Error("not selected model!");case 4:if(p=r===g,d=h===u,I=this.$actionLoadParamModelJsonData,e.prev=7,y=p&&!a&&d?f:void 0,!o||y){e.next=13;break}return e.next=12,Sm(r,u);case 12:y=e.sent;case 13:if(y){e.next=18;break}return dm.delete(r),e.next=17,wm(r,u,c);case 17:y=e.sent;case 18:if(y){e.next=20;break}throw new Error("输入json数据出现异常");case 20:return C=p&&!u?Nd(y.paramModel):this.state.state.allSubModels,p&&YC().scene.$actionToggleSelectModel.dispatch(!0),e.next=24,I.done.dispatch({params:t,result:{ossContent:y,allSubModels:C}});case 24:e.next=31;break;case 26:return e.prev=26,e.t0=e.catch(7),e.next=30,I.failed.dispatch({params:t});case 30:n&&n.reject(e.t0);case 31:case"end":return e.stop()}}),e,this,[[7,26]])}))),t.done.every((function(e){var t=e.params.defer;t&&t.resolve(e.result.ossContent)})),t.started.produce(e.$reducerState,(function(e,t){e.loading=vp.LOADING})),t.done.produce(e.$reducerState,(function(e,t){var r=t.result,n=r.ossContent,i=r.allSubModels,o=t.params,A=o.templateId,a=o.modelId===e.currModelId;e.loading=vp.SUCCESS,e.result=a?n:e.result,e.allSubModels=a?i:e.allSubModels,e.currTemplateId=A})),t.failed.produce(e.$reducerState,(function(e,t){e.loading=vp.FAIL}))})),e}return t=g,(r=[{key:"module",value:function(){return"viewParamModel"}},{key:"viewParamModelById",value:(c=Dd(s.a.mark((function e(t){var r,n,i,o,A,a,u,c=this;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(tr.isArray)(t)?t[0]:t,this.$actionSetModelId.dispatchResolve(r),(n=YC().scene).cameraController.$actionInit.dispatch(),this.resetView(),(i=this.getAxr(fy).fittingDesignSense).initFittingDesign(),function(){var e=Dd(s.a.mark((function e(){var t,n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=fd(),i.$actionLoadFittingDesign.started.dispatch({defer:t,params:{modelid:r}}),e.prev=2,e.next=5,t.promise;case 5:n=e.sent,e.next=11;break;case 8:e.prev=8,e.t0=e.catch(2),Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&console.log(e.t0);case 11:return e.prev=11,e.next=14,c.$actionLoadParamModelJsonData.started.dispatchResolve({modelId:r,hasFitting:!!n});case 14:return e.finish(11);case 15:case"end":return e.stop()}}),e,null,[[2,8,11,15]])})));return function(){return e.apply(this,arguments)}}()(),n.$actionToggleSelectModel.dispatchResolve(!1),e.next=12,this.getAxr(hp).getCurrentCustomData(r);case 12:return o=e.sent,A=new Rp,o.context&&A.unSerialize(o.context),a=_d(o,A),(u=new pt).addParamModels.apply(u,Od(a.paramModels)),u.addParamModelAssemblies.apply(u,Od(a.paramModelAssemblies)),e.next=21,this.getAxr(Zp).$actionAddModelToSense.started.dispatchResolve({custom:u,needAttach:!o.context});case 21:case"end":return e.stop()}}),e,this)}))),function(e){return c.apply(this,arguments)})},{key:"refreshCustomModelData",value:(u=Dd(s.a.mark((function e(){var t,r,n,i,o,A,a;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.getStateManager().core.design.getCustom(),r=t.getParamModels().filter((function(e){return!e.isAppendHardware})),n=t.getParamModelAssemblies(),i=this.state.state.currModelId,(0!==r.length||0!==n.length)&&i){e.next=6;break}throw new Error("No custom model in the scene!");case 6:return t.clearAllParamModels(),e.next=9,_m(this.state.state.currModelId);case 9:return o=e.sent,A=new Rp,o.context&&A.unSerialize(o.context),a=_d(o,A),t.addParamModels.apply(t,Od(a.paramModels)),t.addParamModelAssemblies.apply(t,Od(a.paramModelAssemblies)),e.next=17,this.getAxr(Zp).$actionAddModelToSense.started.dispatchResolve({custom:t,needAttach:!o.context});case 17:case"end":return e.stop()}}),e,this)}))),function(){return u.apply(this,arguments)})},{key:"viewSelectedParamModel",value:(a=Dd(s.a.mark((function e(){var t,r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=Xh(Zh.MiniAppSelectModelService),e.next=3,null==t?void 0:t.getSelected();case 3:if(!(null==(r=e.sent)?void 0:r.length)){e.next=9;break}return e.next=7,this.viewParamModelById(Object(tr.map)(r,"id").filter((function(e){return!!e})));case 7:e.next=10;break;case 9:throw new Error("current not selected any parammodel!");case 10:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"getParamModelJsonData",value:(A=Dd(s.a.mark((function e(t){var r,n,i,o,A,a,u,c,l,g,f,h;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=this.state.state,i=(n=t||{}).timeout,o=void 0===i?5e4:i,A=n.modelId,a=void 0===A?r.currModelId:A,u=n.force,c=void 0!==u&&u,l=n.templateId,c){e.next=14;break}return f=fd(),this.getAxr(fy).fittingDesignSense.$actionLoadFittingDesign.started.dispatch({defer:f,params:{modelid:a}}),e.prev=5,e.next=8,f.promise;case 8:g=e.sent,e.next=14;break;case 11:e.prev=11,e.t0=e.catch(5),console.log(e.t0);case 14:return h=fd(o),this.$actionLoadParamModelJsonData.started.dispatch({defer:h,modelId:a,hasFitting:!!g,force:c,templateId:l,timeout:"number"==typeof o?o/1e3:void 0}),e.abrupt("return",h.promise);case 17:case"end":return e.stop()}}),e,this,[[5,11]])}))),function(e){return A.apply(this,arguments)})},{key:"validateModelStable",value:function(e){var t=this.getStateManager().core.pad.findModelOrAssemblyModelById(e);if(t){for(var r=[t],n={total:0,invalidateTotal:0,validate:!0,invalidateList:[]};r.length;){var i=r.shift();i.getType()===ui.ParamModelType.PARAM_PRIMITIVE&&i.getLegal()?(n.total++,i.getVersionReflectedId()||(n.invalidateTotal++,n.validate=!1,n.invalidateList.push(i.id))):r.push.apply(r,Od(i.getChildNodes()))}return n}}},{key:"getTopModelList",value:(o=Dd(s.a.mark((function e(t){var r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Xh(Yf),e.next=3,r.getTopParamModels(t);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})},{key:"getParamModelPhotoData",value:(i=Dd(s.a.mark((function e(t){var r,n,i,o;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=Object(tr.castArray)(t),n=Xh(Zh.MiniAppParamModelDataInfoService),i=[],o=r.length-1;case 4:if(!(o>=0)){e.next=10;break}return e.next=7,n.getParamModelPhotoById(r[o]).then((function(e){i.push(e)}));case 7:--o,e.next=4;break;case 10:return e.abrupt("return",i);case 11:case"end":return e.stop()}}),e)}))),function(e){return i.apply(this,arguments)})},{key:"resetView",value:function(){var e=this.getStateManager().core,t=e.design.getCustom();t.clearAllParamModels();var r=t.getParamModelAssemblies();r.length&&r.map((function(e){return t.removeParamModelAssembly(e)})),e.fittingDesign.setIntersects([]),e.fittingDesign.setPlankFaceHintModels([]),e.fittingDesign.setFittingHintModels([]),e.fittingDesign.setPlankOutlineHintModels([])}}])&&Md(t.prototype,r),n&&Md(t,n),g}(qi.AXR);function Gd(e){return(Gd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ud(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function jd(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ud(Object(r),!0).forEach((function(t){Vd(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ud(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Vd(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Hd(e){return function(e){if(Array.isArray(e))return Yd(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Yd(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Yd(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Yd(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Kd(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function qd(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){Kd(o,n,i,A,a,"next",e)}function a(e){Kd(o,n,i,A,a,"throw",e)}A(void 0)}))}}function Jd(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Wd(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function zd(e,t,r){return(zd="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=eI(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function Xd(e,t){return(Xd=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Zd(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=eI(e);if(t){var i=eI(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return $d(this,r)}}function $d(e,t){return!t||"object"!==Gd(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function eI(e){return(eI=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var tI={holes:{},grooves:{},hardwares:{},hardwareGrooves:{}},rI=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Xd(e,t)}(o,e);var t,r,n,i=Zd(o);function o(){var e;return Jd(this,o),(e=i.apply(this,arguments)).state=e.stateCreator.create({autoSave:!0,designLoading:vp.FAIL,design:Object(tr.cloneDeep)(tI)}),e.$reducerState=e.reducerCreator.create(e.state),e.$actionInit=e.unitCreator.sync((function(e){e.latest(s.a.mark((function e(t,r){var n,i,o,A,a,u,c;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=this.getAxr(Zp);case 1:return i=n.$actionAddModelToSense.done.messageType(),o=this.$actionRestoreFittingDesign.messageType(),e.next=6,Object(Mp.take)([i,o]);case 6:A=r.core,a=A.fittingDesign,u=A.design,a.setFittings([]),a.setGrooveFittings([]),u.getCustom().getParamModels().forEach((function(e){e.isAppendHardware&&e.dispose()})),c=this.state.state.design,this.fittingAddDataToFittingDesignSense(c),this.getAxr(hp).loadFittingHardwareToSense({hardware:c.hardwares}),e.next=1;break;case 16:case"end":return e.stop()}}),e,this)})))})),e.$actionEnableAutoSave=e.unitCreator.sync((function(t){t.produce(e.$reducerState,(function(e,t){e.autoSave=t}))})),e.initFittingDesign=function(){e.$actionRestoreFittingDesign.dispatch(Object(tr.cloneDeep)(tI))},e.getConnectedFittingDesign=function(){var t=qd(s.a.mark((function t(r){var n,i,o,A,a,u,c,l,g,f,h=arguments;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=h.length>1&&void 0!==h[1]&&h[1],i=e.state.state.design,r){t.next=4;break}return t.abrupt("return",Object(tr.cloneDeep)(i));case 4:if(o={holes:{},grooves:{},hardwares:{},hardwareGrooves:{}},!n){t.next=26;break}A=i.hardwares||{},t.t0=s.a.keys(A);case 8:if((t.t1=t.t0()).done){t.next=18;break}if(c=t.t1.value,!A.hasOwnProperty(c)){t.next=16;break}if(!(l=Object(tr.find)(A[c]||[],(function(e){return e.id===r})))){t.next=16;break}return u=c,a=l,t.abrupt("break",18);case 16:t.next=8;break;case 18:if(a&&u){t.next=20;break}throw new Error("当前五金不存在!");case 20:g=a.linkedIds,f=function(e){return g.includes(e.id)},o.holes[u]=Object(tr.filter)(i.holes[u],f),o.grooves[u]=Object(tr.filter)(i.grooves[u],f),t.next=27;break;case 26:Object(tr.keys)(o).forEach((function(e){i[e]&&i[e][r]&&(o[e][r]=Object(tr.cloneDeep)(i[e][r]))}));case 27:return t.abrupt("return",o);case 28:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.fittingAddDataToFittingDesignSense=function(){var t=qd(s.a.mark((function t(r){var n,i,o,A,a,u,c,g,f,h,p,d;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,gd(1);case 2:n=e.stateManager.core,i=n.fittingDesign,o=n.pad,A=YC().fittingDesign.senseSetting.getSenseSettings(),a=Object(tr.pick)(A,["holeColor","grooveColor","holeOpacity","grooveOpacity"]),u=r.holes,c=void 0===u?{}:u,g=r.grooves,f=void 0===g?{}:g,h=r.hardwareGrooves,p=void 0===h?{}:h,d={findRelativeModel:o.findModelOrAssemblyModelById,transformModel:Ai},i.setFittings([].concat(Hd(Jc(c,jd(jd({},d),{},{type:l.HOLE,defaultConfig:a}))),Hd(Jc(f,jd(jd({},d),{},{type:l.GROOVE,defaultConfig:a}))))),i.setGrooveFittings(Jc(p,jd(jd({},d),{},{type:l.HARDWARE_GROOVE,transformModel:Ki,defaultConfig:a})));case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.appendFittingDataToFittingDesign=function(){var t=qd(s.a.mark((function t(r,n){var i,o,A,a,u,c,l,g,f,h,p;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=e.state.state,A=o.design,a=o.autoSave,u=!r.id||r.id===A.id,c=tI,l=n.timeout,g=n.save,f=void 0===g?a:g,h={id:null!==(i=r.id)&&void 0!==i?i:A.id,holes:jd(jd({},u?A.holes:c.holes),r.holes||{}),grooves:jd(jd({},u?A.grooves:c.grooves),r.grooves||{}),hardwares:jd(jd({},u?A.hardwares:c.hardwares),r.hardwares||{}),hardwareGrooves:jd(jd({},u?A.hardwareGrooves:c.hardwareGrooves),r.hardwareGrooves||{})},Object(tr.pull)(Object(tr.keys)(h),"id").forEach((function(e){var t=h[e];Object(tr.keys)(t).forEach((function(e){0===t[e].length&&delete t[e]}))})),!f){t.next=12;break}return p=fd(l),e.$actionSaveFittingDesign.started.dispatch({defer:p,design:h}),t.abrupt("return",p.promise);case 12:e.$actionRestoreFittingDesign.dispatch(h);case 13:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),e.$actionRestoreFittingDesign=e.unitCreator.sync((function(t){t.produce(e.$reducerState,(function(e,t){e.design=t}))})),e.$actionLoadFittingDesign=e.unitCreator.async((function(e){e.started.every(s.a.mark((function e(t,r){var n,i,o,A;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.$actionLoadFittingDesign,i=t.params,e.next=4,vd(i.modelid);case 4:return o=e.sent,e.prev=5,e.next=8,ym(jd(jd({},i),o));case 8:A=e.sent,n.done.dispatch({params:t,result:{designData:A,modelId:o.modelid}}),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(5),n.failed.dispatch({params:t});case 15:case"end":return e.stop()}}),e,this,[[5,12]])}))),e.done.every((function(e,t){var r=this.$actionRestoreFittingDesign,n=e.result.designData?e.result.designData:Object(tr.cloneDeep)(tI),i=this.getAxr(kd).state.state.currModelId;e.result.modelId===i&&r.dispatch(n);var o=e.params.defer;o&&o.resolve(e.result.designData)})),e.failed.every((function(e,t){var r,n=this.getAxr(kd).state.state.currModelId;(null===(r=e.result)||void 0===r?void 0:r.modelId)===n&&this.initFittingDesign();var i=e.params.defer;i&&i.reject(new Error("load fitting design error"))}))})),e.$actionClearFittingDesign=e.unitCreator.async((function(e){e.started.every(s.a.mark((function e(t,r){var n,i,o,A,a;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.getAxr(kd).state.state.currModelId,i=t.modelId,o=void 0===i?n:i,e.next=4,vd(o);case 4:return A=e.sent,a=this.$actionClearFittingDesign,e.prev=6,e.next=9,mm(A);case 9:a.done.dispatch({params:t,result:void 0}),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(6),a.failed.dispatch({params:t});case 15:case"end":return e.stop()}}),e,this,[[6,12]])}))),e.done.every(s.a.mark((function e(t,r){var n,i,o;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=this.getAxr(kd).state.state.currModelId,(null!==(n=t.params.modelId)&&void 0!==n?n:i)===i&&this.initFittingDesign(),(o=t.params.defer)&&o.resolve();case 5:case"end":return e.stop()}}),e,this)}))),e.failed.every(s.a.mark((function e(t,r){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(n=t.params.defer)&&n.reject(new Error("delete error"));case 2:case"end":return e.stop()}}),e)})))})),e.$actionSaveFittingDesign=e.unitCreator.async((function(e){e.started.every(s.a.mark((function e(t){var r,n,i,o;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.design,n=void 0===r?this.state.state.design:r,e.next=3,vd(n.id);case 3:return i=e.sent,o=this.$actionSaveFittingDesign,e.prev=5,e.next=8,vm(jd(jd({},n),{},{id:i.modelid}),i);case 8:o.done.dispatch({params:t,result:void 0}),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(5),o.failed.dispatch({params:t,result:e.t0});case 14:case"end":return e.stop()}}),e,this,[[5,11]])}))),e.failed.every(s.a.mark((function e(t,r){var n,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(n=t.params.defer)&&(i=t.result||new Error("保存失败"),n.reject(i));case 2:case"end":return e.stop()}}),e)}))),e.done.every(s.a.mark((function e(t,r){var n,i,o;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=t.params.design,i=this.getAxr(kd).state.state.currModelId,!n||n.id&&n.id!==i||this.$actionRestoreFittingDesign.dispatch(n),(o=t.params.defer)&&setTimeout((function(){o.resolve()}));case 5:case"end":return e.stop()}}),e,this)})))})),e}return t=o,(r=[{key:"init",value:function(){zd(eI(o.prototype),"init",this).call(this),this.$actionInit.dispatch()}},{key:"isAutoSaveEnabled",value:function(){return this.state.state.autoSave}}])&&Wd(t.prototype,r),n&&Wd(t,n),o}(Ad);function nI(e){return(nI="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function iI(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function oI(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function AI(e,t){return(AI=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function aI(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=uI(e);if(t){var i=uI(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return sI(this,r)}}function sI(e,t){return!t||"object"!==nI(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function uI(e){return(uI=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var cI=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&AI(e,t)}(o,e);var t,r,n,i=aI(o);function o(){var e;return iI(this,o),(e=i.apply(this,arguments)).state=e.stateCreator.create({option:{}}),e.$reducerState=e.reducerCreator.create(e.state),e.$actionUpdateFittingHintConf=e.unitCreator.sync((function(t){t.latest((function(){e.rerenderToSense()})),t.produce(e.$reducerState,(function(e,t){e.option=t}))})),e}return t=o,(r=[{key:"setFittingHint",value:function(e){this.$actionUpdateFittingHintConf.dispatch(e)}},{key:"clearFittingHint",value:function(e){var t=e?Object(tr.omit)(this.state.state.option,e):{};this.$actionUpdateFittingHintConf.dispatch(t)}},{key:"rerenderToSense",value:function(){var e=this.state.state.option,t=this.stateManager.core,r=t.design,n=t.fittingDesign,i=r.getCustom().getParamModels(),o=n.getFittings(),A=n.getGrooveFittings(),a=Object(tr.map)(e,(function(e,t){var r=i.find((function(e){return e.id===t&&e.isAppendHardware}))||o.find((function(e){return e.id===t}))||A.find((function(e){return e.id===t}));if(r)return new Rr({linkModel:r,hintOutline:e.outline})})).filter((function(e){return!!e}));n.setFittingHintModels(a)}}])&&oI(t.prototype,r),n&&oI(t,n),o}(Ad);function lI(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var gI=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.__changeMap={}}var t,r,n;return t=e,(r=[{key:"getHidden",value:function(){return this.isHidden}},{key:"setHidden",value:function(e){this.__trackUpdateField({field:"isHidden"},this.isHidden,e),this.isHidden=e}},{key:"__trackUpdateField",value:function(e,t,r){this.__changeMap.update=this.__changeMap.update||[];var n=this.__changeMap.update,i=e.field;t===r||n.some((function(e){return e.field===i}))||n.push({field:i})}}])&&lI(t.prototype,r),n&&lI(t,n),e}();function fI(e){var t,r=new gI;if(r.id=e.id,e instanceof jt){if(!e.isAppendHardware)return;t=l.HARDWARE,r.isHidden=e.getInvisible(),r.originalData=e.hardwareData}else r.isHidden=!e.visible,t=e.type,r.originalData=e.fittingData;return r.linkParamModelId=e.linkParamModelId,r.modelType=t,r}function hI(e){return(hI="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function pI(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=II(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function dI(e){return function(e){if(Array.isArray(e))return yI(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||II(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function II(e,t){if(e){if("string"==typeof e)return yI(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?yI(e,t):void 0}}function yI(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function CI(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function EI(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function BI(e,t){return(BI=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function vI(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=QI(e);if(t){var i=QI(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return mI(this,r)}}function mI(e,t){return!t||"object"!==hI(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function QI(e){return(QI=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var bI=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&BI(e,t)}(o,e);var t,r,n,i=vI(o);function o(){return CI(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"getAllFittingModels",value:function(e){var t=new Set;if(e){var r=this.stateManager.core.pad.findModelOrAssemblyModelById(e);if(!r)return[];for(var n=[r];n.length;){var i=n.shift();t.add(i.id),n.push.apply(n,dI((null==i?void 0:i.getChildNodes())||[]))}}var o=this.findHardwareParamModels(this.stateManager.core.design.getCustom().getParamModels()),A=this.stateManager.core.fittingDesign.getFittings(),a=this.stateManager.core.fittingDesign.getGrooveFittings(),s=[].concat(dI(o),dI(A),dI(a));return t.size>0&&(s=s.filter((function(e){return t.has(e.linkParamModelId)}))),s.map((function(e){return fI(e)}))}},{key:"findHardwareParamModels",value:function(e){var t,r=[],n=pI(e);try{for(n.s();!(t=n.n()).done;){var i=t.value;i.isAppendHardware&&r.push(i),r.push.apply(r,dI(this.findHardwareParamModels(i.getChildNodes())))}}catch(e){n.e(e)}finally{n.f()}return r}},{key:"save",value:function(e){var t,r=[],n=[],i=pI(e);try{for(i.s();!(t=i.n()).done;){var o=t.value;o.modelType===l.HARDWARE?r.push(o):n.push(o)}}catch(e){i.e(e)}finally{i.f()}this.saveHardwareFittingModelLite(r),this.saveFittingModelLite(n)}},{key:"saveHardwareFittingModelLite",value:function(e){var t=this.stateManager.core.pad;e.forEach((function(e){var r=t.findModelOrAssemblyModelById(e.id);if(r){var n=e.__changeMap.update;(void 0===n?[]:n).forEach((function(t){"isHidden"===t.field&&r.setInvisible(e.getHidden())})),e.__changeMap.update=[]}})),am().viewer.triggerReducer()}},{key:"saveFittingModelLite",value:function(e){var t=this.stateManager.core.fittingDesign.getFittings(),r=this.stateManager.core.fittingDesign.getGrooveFittings(),n=this.stateManager.core.fittingDesign.getFittingHintModels();e.forEach((function(e){var i;e.modelType===l.HARDWARE_GROOVE?i=r.find((function(t){return t.id===e.id})):e.modelType!==l.HOLE&&e.modelType!==l.GROOVE||(i=t.find((function(t){return t.id===e.id})));var o=n.find((function(t){return t.linkModel.id===e.id}));if(i){var A=e.__changeMap.update;(void 0===A?[]:A).forEach((function(t){"isHidden"===t.field&&(null==i||i.setVisible(!e.getHidden()),null==o||o.setVisible(!e.getHidden()))})),e.__changeMap.update=[]}}))}}])&&EI(t.prototype,r),n&&EI(t,n),o}(Ad);function _I(e){return(_I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function SI(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function wI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function DI(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?wI(Object(r),!0).forEach((function(t){RI(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wI(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function RI(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function MI(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function xI(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function PI(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function TI(e,t){return(TI=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function FI(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=LI(e);if(t){var i=LI(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return OI(this,r)}}function OI(e,t){return!t||"object"!==_I(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function LI(e){return(LI=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var NI=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&TI(e,t)}(a,e);var t,r,n,i,o,A=FI(a);function a(){var e;return xI(this,a),(e=A.apply(this,arguments)).state=e.stateCreator.create({intersectedLoading:vp.FAIL,intersectedResult:void 0,intersectedVisible:!1}),e.$reducerState=e.reducerCreator.create(e.state),e._getParamModelIntersectedCallback=[],e.$actionLoadParamModelIntersectedData=e.unitCreator.async((function(t){t.started.every(s.a.mark((function e(t,r){var n,i,o,A,a,u,c,l,g;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,vd(t.modelId);case 2:return n=e.sent,i=Xh(Ff),o=t.modelId,A=void 0===o?n.modelid:o,a=t.defer,u=MI(t,["modelId","defer"]),c=YC().viewParamModel.state.state.currModelId===A,l=this.$actionLoadParamModelIntersectedData,e.prev=7,e.next=10,i.getIntersectedById(DI({modelId:A},u));case 10:if(g=e.sent,!c){e.next=14;break}return e.next=14,l.done.dispatch({params:t,result:{result:g,modelId:A}});case 14:a&&a.resolve(g),e.next=22;break;case 17:return e.prev=17,e.t0=e.catch(7),e.next=21,l.failed.dispatch({params:t});case 21:a&&a.reject(e.t0);case 22:case"end":return e.stop()}}),e,this,[[7,17]])}))),t.done.every((function(t,r){var n=t.params.defer,i=YC().viewParamModel.state.state.currModelId;n&&n.resolve(t.result.result),t.result.modelId===i&&e.$actionAddIntersectedDataToSense.dispatch(t.result.result)})),t.failed.every((function(t,r){e._getParamModelIntersectedCallback.forEach((function(e){e.reject(new Error("load json error!"))}))})),t.started.produce(e.$reducerState,(function(e,t){e.intersectedLoading=vp.LOADING})),t.done.produce(e.$reducerState,(function(e,t){e.intersectedLoading=vp.SUCCESS,e.intersectedResult=t.result.result})),t.failed.produce(e.$reducerState,(function(e,t){e.intersectedLoading=vp.FAIL}))})),e.$actionAddIntersectedDataToSense=e.unitCreator.sync((function(t){t.every((function(t,r){var n=r.core,i=n.fittingDesign,o=n.pad,A=e.state.state.intersectedVisible,a=e.app.axr.axrs.fittingDesign.senseSetting.getSenseSettings(),s=a.intersectedColor,u=a.intersectedBodyColor,c=a.intersectedThroughColor,l=a.grooveIntersectedColor,f=a.grooveIntersectedBodyColor;i.setIntersects([]);var p=t.option,d=void 0===p?{}:p,I=t.intersectedGroups,y=Object(tr.map)(I,(function(e){var t=!0===d.references?1:0,r=e.intersecteds[t],n=r["@type"],i=e.intersectType;if(void 0!==d.plankFaceIds){var A=Id(r)?null:r.plankFaceId;if(!d.plankFaceIds.includes(A))return!1}var a=o.findModelOrAssemblyModelById(r.linkedModelId);if(a){var p=Pi(e,r,a),I=new Map([[h.BOTH_PLANK,new Map([[g.FACE,s],[g.SHELL,u],[g.THROUGH_SHELL,c]])],[h.PLANK_FURNITURE,new Map([[g.FACE,l],[g.SHELL,f]])]]).get(i).get(n);return p.setViewColor(I),p}})).filter((function(e){return!!e}));i.setIntersects(y),A||r.kaf.invisibleManager.hide("scene3d",Tp,y.map((function(e){return e.id})))}))})),e.$actionToggleShowIntersected=e.unitCreator.sync((function(t){t.latest((function(e,t){var r=t.core.fittingDesign;e?t.kaf.invisibleManager.display("scene3d",Tp,r.getIntersects().map((function(e){return e.id}))):t.kaf.invisibleManager.hide("scene3d",Tp,r.getIntersects().map((function(e){return e.id})))})),t.produce(e.$reducerState,(function(e,t){e.intersectedVisible=t}))})),e.toggleShowIntersectGroupData=function(t){var r=e.state.state.intersectedResult;if(!r)throw new Error("暂无交接数据!");e.$actionAddIntersectedDataToSense.dispatch(DI(DI({},r),{},{option:t}))},e}return t=a,(r=[{key:"getParamModelIntersectedData",value:(i=s.a.mark((function e(t){var r,n,i,o,A,a,u,c,l,g=this;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=YC().viewParamModel.state.state.currModelId,i=(n=t||{}).timeout,o=void 0===i?5e4:i,A=n.modelId,a=void 0===A?r:A,u=MI(n,["timeout","modelId"]),c=fd(o),this.$actionLoadParamModelIntersectedData.started.dispatch(DI(DI({modelId:a},u),{},{defer:c})),this._getParamModelIntersectedCallback.push(c),l=function(){var e=g._getParamModelIntersectedCallback.indexOf(c);g._getParamModelIntersectedCallback.splice(e,1)},e.abrupt("return",c.promise.then((function(e){return l(),e})).catch((function(e){return l(),Promise.reject(e)})));case 7:case"end":return e.stop()}}),e,this)})),o=function(){var e=this,t=arguments;return new Promise((function(r,n){var o=i.apply(e,t);function A(e){SI(o,r,n,A,a,"next",e)}function a(e){SI(o,r,n,A,a,"throw",e)}A(void 0)}))},function(e){return o.apply(this,arguments)})}])&&PI(t.prototype,r),n&&PI(t,n),a}(Ad);function kI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function GI(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?kI(Object(r),!0).forEach((function(t){UI(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kI(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function UI(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function jI(e,t){var r=t.x/2,n=t.y/2,i=t.z/2,o=[{x:-r,y:-n,z:i},{x:r,y:-n,z:i},{x:r,y:n,z:i},{x:-r,y:n,z:i}],A=o.map((function(e){return GI(GI({},e),{},{z:-e.z})}));switch(e){case 0:return o;case 1:return[o[0],A[0],A[3],o[3]];case 2:return[o[0],A[0],A[1],o[1]];case 3:return[o[1],A[1],A[2],o[2]];case 4:return[o[2],A[2],A[3],o[3]];case 5:return A}return[]}function VI(e){return(VI="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function HI(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function YI(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function KI(e,t){return(KI=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function qI(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=WI(e);if(t){var i=WI(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return JI(this,r)}}function JI(e,t){return!t||"object"!==VI(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function WI(e){return(WI=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var zI={outline:{color:"#ff4d4f",opacity:.5},plankFace:{color:"#9318ff",opacity:.5}},XI=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&KI(e,t)}(o,e);var t,r,n,i=qI(o);function o(){var e;return HI(this,o),(e=i.apply(this,arguments)).state=e.stateCreator.create({option:{},defaultConfig:zI}),e.$reducerState=e.reducerCreator.create(e.state),e.$actionUpdateDefaultOption=e.unitCreator.sync((function(t){t.produce(e.$reducerState,(function(e,t){e.defaultConfig=Object(tr.extend)({},e.defaultConfig,t)}))})),e.$actionUpdateHintOption=e.unitCreator.sync((function(t){t.latest((function(){e.rerenderToSense()})),t.produce(e.$reducerState,(function(e,t){e.option=t}))})),e}return t=o,(r=[{key:"setDefaultHintConfig",value:function(e){this.$actionUpdateDefaultOption.dispatch(e)}},{key:"setModelHint",value:function(e){var t=this,r=Object(tr.mapValues)(e,(function(e){return function(e,t){var r={};return Object(tr.isObject)(e.hintOutline)?r.hintOutline=e.hintOutline:!0===e.hintOutline&&(r.hintOutline=t.outline),e.hintPlankFace&&e.hintPlankFace.length&&(r.hintPlankFace=e.hintPlankFace.map((function(e){var r="color"in e?e:t.plankFace,n=r.color,i=r.opacity;return Object(tr.isArray)(e.plankFaceId)?e.plankFaceId.map((function(e){return{color:n,opacity:i,plankFaceId:e}})):{plankFaceId:e.plankFaceId,color:n,opacity:i}})).flat()),r}(e,t.state.state.defaultConfig)}));this.$actionUpdateHintOption.dispatch(r)}},{key:"clearModelHint",value:function(e){var t=e?Object(tr.omit)(this.state.state.option,e):{};this.setModelHint(t)}},{key:"rerenderToSense",value:function(){var e=this.stateManager.core,t=e.fittingDesign,r=e.pad,n=this.state.state.option,i=Object(tr.map)(n,(function(e,t){var n=r.findModelOrAssemblyModelById(t);if(n)return function(e,t){var r={linkModel:t};if(e.hintPlankFace&&e.hintPlankFace.length){var n=t.getSize();r.plankFaces=e.hintPlankFace.map((function(e){var t=ri(e.plankFaceId,at.a).mul(.1),r=jI(e.plankFaceId,n).map((function(e){var r=new at.a(e).add(t);return{x:r.x,y:r.y,z:r.z}}));return GI(GI({},e),{},{points:r})}))}if(e.hintOutline&&(r.hintOutline=e.hintOutline),r.plankFaces||r.hintOutline)return new Kn(r)}(e,n)})).filter((function(e){return!!e}));t.setPlankFaceHintModels(i)}}])&&YI(t.prototype,r),n&&YI(t,n),o}(Ad);function ZI(e){return(ZI="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function $I(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ey(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function ty(e,t){return(ty=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ry(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=iy(e);if(t){var i=iy(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return ny(this,r)}}function ny(e,t){return!t||"object"!==ZI(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function iy(e){return(iy=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var oy=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ty(e,t)}(o,e);var t,r,n,i=ry(o);function o(){var e;return $I(this,o),(e=i.apply(this,arguments)).state=e.stateCreator.create({intersectedColor:16729344,intersectedBodyColor:16711935,intersectedThroughColor:9498256,grooveIntersectedColor:12092939,grooveIntersectedBodyColor:16776960,holeColor:65280,grooveColor:2003199,renderIgnoreCategory:Je,holeOpacity:1,grooveOpacity:1}),e.$reducerState=e.reducerCreator.create(e.state),e.$actionSenseSetting=e.unitCreator.sync((function(t){t.produce(e.$reducerState,(function(e,t){t.renderIgnoreCategory&&(t.renderIgnoreCategory=Object(tr.castArray)(t.renderIgnoreCategory)),Object(tr.extend)(e,t)}))})),e}return t=o,(r=[{key:"getSenseSettings",value:function(){return this.state.state}}])&&ey(t.prototype,r),n&&ey(t,n),o}(Ad);function Ay(e){return(Ay="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ay(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function uy(e,t){return(uy=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function cy(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=gy(e);if(t){var i=gy(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return ly(this,r)}}function ly(e,t){return!t||"object"!==Ay(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function gy(e){return(gy=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var fy=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&uy(e,t)}(o,e);var t,r,n,i=cy(o);function o(){var e;return ay(this,o),(e=i.apply(this,arguments)).fittingDesignSense=e.partialCreator.create(rI),e.intersected=e.partialCreator.create(NI),e.senseSetting=e.partialCreator.create(oy),e.fittingModel=e.partialCreator.create(bI),e.plankFaceHint=e.partialCreator.create(XI),e.fittingHint=e.partialCreator.create(cI),e}return t=o,(r=[{key:"module",value:function(){return"FittingDesign"}}])&&sy(t.prototype,r),n&&sy(t,n),o}(qi.AXR),hy=r(722),py=r.n(hy);function dy(e){return(dy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Iy(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Cy(e,t){return(Cy=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ey(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=vy(e);if(t){var i=vy(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return By(this,r)}}function By(e,t){return!t||"object"!==dy(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function vy(e){return(vy=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var my=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Cy(e,t)}(o,e);var t,r,n,i=Ey(o);function o(){return Iy(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"getHidden",value:function(){return this.isHidden}},{key:"setHidden",value:function(e){this.__trackUpdateField({type:W.ATTRIBUTE,attr:"isHidden"},this.isHidden,e),this.isHidden=e}}])&&yy(t.prototype,r),n&&yy(t,n),o}(De);function Qy(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function by(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Qy(Object(r),!0).forEach((function(t){_y(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qy(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _y(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Sy={x:0,y:0,z:0},wy={x:0,y:0,z:0};function Dy(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Map,n=arguments.length>3?arguments[3]:void 0,i=t.category,o=t.origin,A=new my,a=!(e instanceof jt)||e.isRoot(),s=n||a?e:e.getRoot(),u=s instanceof jt;A.id=s.id,A.isRoot=!u||s.isRoot(),A.isHidden=!!s.getInvisible();var c=$.ASSEMBLY;if(u?c=$.COMMON:e.isTemplateAssembly()&&(c=$.TEMPLATE_ASSEMBLY),A.modelType=c,A.position=A.isRoot?Sy:s.getPosition(),A.rotation=A.isRoot?wy:s.getRotation(),A.size="function"==typeof s.getScaledSize?s.getScaledSize():s.getSize(),A.params=My(s),A.category=i||s.getCategory().categoryId,u){var l=s.getModel();A.productId=null==l?void 0:l.obsBrandGoodId}return n&&(A.root=n),A.isRoot&&(A._origin=o),A.children=(u?s.getChildren():s.getParamModels()).map((function(e){return Dy(e,t,r,n||A)})),A.accessories=(u?s.getAccessories():[]).map((function(e){return Dy(e,t,r,n||A)})),r.set(A.id,A),s!==e&&r.has(e.id)?r.get(e.id):A}function Ry(e,t){var r=e.isRoot?e:e.root;if(!r)return{};var n=r._changeMap,i=t.getUnSafeParamModelFromParamModelLite(r);if(!i)return{};var o=i.getCustom(),A=n.cloned;return A&&(i=i.clone(!1)),i=function e(t,r,n,i){var o=t._changeMap;if(o.cloned&&o.deleted)return;if(o.deleted)return n.dispose(),n;var A=o.update,a=void 0===A?[]:A,s=o.addNodes,u=void 0===s?[]:s,c=i?by({},i):{parentModelLite:t,parentModel:n,rootModelLite:t,rootModel:n};a.forEach((function(e){if(e.type===W.ATTRIBUTE)switch(e.attr){case"position":n.setPosition(t.getPosition());break;case"rotate":n.setRotation(t.getRotation());break;case"isHidden":n.setInvisible(t.getHidden()),function(e){var t=e.getInvisible();YC().entry.getStateManager().core.fittingDesign.getPlankOutlineHintModels().forEach((function(r){r.linkModel.id===e.id&&r.setVisible(!t)}))}(n)}if(e.type===W.STORE){var i=n.getParamStore().getParam(e.attr),o=t.getParam(e.attr);if(i&&o){var A=o.getValue();[ui.ParamType.MATERIAL,ui.ParamType.SHAPE].includes(i.getType())&&(A=r.getUnSafeObsBrandGoodToBrandGoodId(A)),A&&i.setValue(A),o.getPrimitiveOverride()!==i.getPrimitiveOverride()&&i.setPrimitiveOverride(o.getPrimitiveOverride())}}})),u.forEach((function(i){var o=i.type,A=i.linkId,a=(o===Z.CHILD?t.getChild():t.getAccessory()).find((function(e){return e.id===A}));if(a){var s=r.getUnSafeParamModelFromParamModelLite(a);s&&((a._changeMap.cloned||a._origin!==K.SENSE)&&(s=s.clone(!1)),o===Z.CHILD?(s.setIsAppend(!0),s.setAppendType(py.a.CENTER),n.addChild(s)):n.addAccessory(s),e(a,r,s,by(by({},c),{},{parentModel:n,parentModelLite:t})),(a._changeMap.cloned||a._origin!==K.SENSE)&&s.assignUniqueId())}}));var l=function(i){return function(o){if(!u.some((function(e){return e.type===i&&e.linkId===o.id}))){var A=i===Z.ACCESSORY?n.getAccessories():n.getChildren(),a=o._changeMap.originId||o.id,s=A.find((function(e){return e.id===a}));s&&e(o,r,s,by(by({},c),{},{parentModel:n,parentModelLite:t}))}}};return t.getChild().forEach(l(Z.CHILD)),t.getAccessory().forEach(l(Z.ACCESSORY)),n}(r,t,i),A&&i&&i.assignUniqueId(),{create:A,custom:o,model:i}}function My(e){var t=new Map;return e.getParamStore().forEach((function(e,r){t.set(r,function(e){var t=new ye;if(t.data={type:e.getType(),displayName:e.getDisplayName(),name:e.getName(),value:e.getValue(),max:e.getMax(),min:e.getMin(),editable:e.getEditable(),optionValues:e.getOptionValues(),recommendValues:e.getRecommendValues(),primitiveOverride:e.getPrimitiveOverride(),step:e.getStep()},[V.MATERIAL,V.SHAPE].includes(t.getType())){var r=e.getProduct();t.data.value=r?r.obsBrandGoodId:""}return t}(e))})),t}var xy=r(125),Py=r.n(xy),Ty={maxAge:6e5,max:20},Fy=(Dp.SHADING,Dp.OUTLINE_WITH_SHADING,Dp.TRANSLUCENT,Dp.OUTLINE_AND_TRANSLUCENT,[st.ParamModelType.PARAM_ENTITY,st.ParamModelType.PARAM_FURNITURE,st.ParamModelType.PARAM_PRIMITIVE]);function Oy(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ly(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Oy(Object(r),!0).forEach((function(t){Ny(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Oy(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ny(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ky(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function Gy(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){ky(o,n,i,A,a,"next",e)}function a(e){ky(o,n,i,A,a,"throw",e)}A(void 0)}))}}Py()(function(){var e=Gy(s.a.mark((function e(t){var r,n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Rc(),e.next=3,r.gzipPost("/dcs/api/c/products/available",{obsBgIds:t});case 3:return n=e.sent,e.abrupt("return",n.data);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Ly({promise:!0},Ty));function Uy(){return(Uy=Gy(s.a.mark((function e(t){var r,n,i,o,A;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Rc().gzipPost("/dcs-resource/api/c/productdata/obsbgid",{obsBgIds:t});case 2:if(r=e.sent,n=r.data,i=n.c,o=n.m,A=n.d,"0"!==i){e.next=11;break}return e.abrupt("return",A);case 11:throw new Error(i+o);case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function jy(){return(jy=Gy(s.a.mark((function e(t){var r,n,i,o,A;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Rc().gzipPost("/dcs-resource/api/c/productdata/bgid",{bgIds:t});case 2:if(r=e.sent,n=r.data,i=n.c,o=n.m,A=n.d,"0"!==i){e.next=11;break}return e.abrupt("return",A);case 11:throw new Error(i+o);case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Vy=Py()((function(e){return Uy.apply(this,arguments)}),Ly(Ly({},Ty),{},{promise:!0})),Hy=Py()((function(e){return jy.apply(this,arguments)}),Ly(Ly({},Ty),{},{promise:!0}));function Yy(e){return function(e){if(Array.isArray(e))return Ky(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Ky(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ky(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ky(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function qy(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function Jy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var Wy=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.cached=new Map}var t,r,n,i,o;return t=e,(r=[{key:"setProduct",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"__global__",r=this.cached.get(t);r||(r=new Map,this.cached.set(t,r)),r.set(e.brandGoodId,e.obsBrandGoodId),r.set(e.obsBrandGoodId,e.brandGoodId)}},{key:"getToggledBrandGood",value:function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"__global__";return null===(t=this.cached.get(r))||void 0===t?void 0:t.get(e)}},{key:"removeCachedModel",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"__global__";this.cached.delete(e)}},{key:"safeGetToggleBrandGood",value:(i=s.a.mark((function e(t){var r,n,i,o,A,a,u=this,c=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=c.length>1&&void 0!==c[1]?c[1]:"__global__",n=Object(tr.castArray)(t),i=[],o=[],A=new Map,n.forEach((function(e){var t=u.getToggledBrandGood(e,r);t?A.set(e,t):/^[0-9]$/.test(e.toString())?o.push(e):i.push(e)})),a=function(e){return[].concat(Yy(e.hardwares||[]),Yy(e.textures||[]),Yy(e.virtualModels||[]),Yy(e.paramModelProducts||[]),Yy(e.moldings||[]))},!i.length){e.next=12;break}return e.next=10,Vy(i).then(a);case 10:e.sent.forEach((function(e){u.setProduct(e,r)}));case 12:if(!o.length){e.next=17;break}return e.next=15,Hy(o).then(a);case 15:e.sent.forEach((function(e){u.setProduct(e,r)}));case 17:return[].concat(i,o).forEach((function(e){var t=u.getToggledBrandGood(e,r);t&&A.set(e,t)})),e.abrupt("return",A);case 19:case"end":return e.stop()}}),e)})),o=function(){var e=this,t=arguments;return new Promise((function(r,n){var o=i.apply(e,t);function A(e){qy(o,r,n,A,a,"next",e)}function a(e){qy(o,r,n,A,a,"throw",e)}A(void 0)}))},function(e){return o.apply(this,arguments)})}])&&Jy(t.prototype,r),n&&Jy(t,n),e}();function zy(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function Xy(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){zy(o,n,i,A,a,"next",e)}function a(e){zy(o,n,i,A,a,"throw",e)}A(void 0)}))}}function Zy(e){return function(e){if(Array.isArray(e))return $y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return $y(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return $y(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $y(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function eC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function tC(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var rC=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Wy;eC(this,e),this.callback=t,this.brandGoodsTranslate=r,this.cached=new Map,this.models=[]}var t,r,n,i;return t=e,(r=[{key:"getParamModelFromId",value:function(e){if(this.cached.has(e))return this.cached.get(e);var t=this.callback(e);return t?(this.cached.set(e,t),t):void 0}},{key:"getUnSafeParamModel",value:function(e){return this.cached.get(e)}},{key:"getUnSafeObsBrandGoodToBrandGoodId",value:function(e){return this.brandGoodsTranslate.getToggledBrandGood(e)}},{key:"addParamModelLite",value:function(){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];(e=this.models).push.apply(e,Zy(r.map((function(e){return e.root||e}))))}},{key:"getUnSafeParamModelFromParamModelLite",value:function(e){var t,r=e.root||e;switch(e._origin||r._origin){case K.BRANDGOOD:case K.CATEGORY:break;case K.SENSE:var n=r._changeMap.originId||r.id;t=this.getUnSafeParamModel(n)}if(!t||r===e)return t;for(var i,o=e._changeMap.originId||e.id,A=[t];i=A.pop();){if(i.id===o)return i;A.push.apply(A,Zy(i.getChildNodes()))}}},{key:"attach",value:(i=Xy(s.a.mark((function e(){var t,r,n,i,o,A,a,u,c=this;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this.models,r={modelIds:[],category:[],brandGoodIds:[]},n=[];case 3:if(!(i=t.pop())){e.next=18;break}A=(o=i)._changeMap,a=o._origin,e.t0=a,e.next=e.t0===K.SENSE?8:e.t0===K.CATEGORY||e.t0===K.BRANDGOOD||e.t0===K.TEMPLATE_ID?11:12;break;case 8:return u=A.originId||i.id,r.modelIds.push(u),e.abrupt("break",12);case 11:return e.abrupt("break",12);case 12:if(!A.deleted){e.next=14;break}return e.abrupt("continue",3);case 14:A.update&&A.update.forEach((function(e){if(i&&e.type===W.STORE&&i.hasParam(e.attr)){var t=i.getParam(e.attr);t&&[V.MATERIAL,V.SHAPE].includes(t.getType())&&t.getValue()&&n.push(t.getValue())}})),t.push.apply(t,Zy(i.getChild()).concat(Zy(i.getAccessory()))),e.next=3;break;case 18:return e.next=20,Promise.allSettled(Zy(Object(tr.uniq)(r.modelIds).map(function(){var e=Xy(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.getParamModelFromId(t));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())));case 20:return e.next=22,this.brandGoodsTranslate.safeGetToggleBrandGood(n);case 22:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})}])&&tC(t.prototype,r),n&&tC(t,n),e}(),nC=r(733);function iC(e){return(iC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function oC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function AC(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function aC(e,t,r){return(aC="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=lC(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function sC(e,t){return(sC=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function uC(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=lC(e);if(t){var i=lC(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return cC(this,r)}}function cC(e,t){return!t||"object"!==iC(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function lC(e){return(lC=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var gC=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&sC(e,t)}(o,e);var t,r,n,i=uC(o);function o(){var e;return oC(this,o),(e=i.apply(this,arguments)).$actionInit=e.unitCreator.sync((function(e){e.latest(s.a.mark((function e(t,r){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.getAxr(Zp),e.next=3,Object(Mp.take)([n.$actionLoad.done.messageType(),n.$actionAddModelToSense.done.messageType(),n.$actionAddParamModelToSense.done.messageType(),n.$actionAddParamModelAssemblyToSense.done.messageType()]);case 3:if(n.state.state.main!==mp.SUCCESS){e.next=13;break}return e.next=6,Object(Mp.put)(this.$actionSetCamera.message(!0));case 6:return e.next=9,Object(Mp.take)(this.$actionSyncCamera.messageType());case 9:return e.next=11,Object(Mp.put)(this.$actionSetCamera.message(!1));case 11:e.next=6;break;case 13:case"end":return e.stop()}}),e,this)})))})),e.$actionSyncCamera=e.unitCreator.sync((function(e){})),e.$actionSetCamera=e.unitCreator.sync((function(e){e.latest(s.a.mark((function e(t,r){var n,i,o,A,a,u;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=r.core.design.getCustom(),i=n.getParamModels(),o=n.getParamModelAssemblies(),(A=r.scene3D).updateEnableCameraAnimation(!1),a=i.length?Object(nC.computeAssemblyBox)(i.map((function(e){return e.getBox3()})),i[0].getMatrix4()):Object(nC.computeAssemblyBox)(o.map((function(e){return e.getBox3()})),o[0].getMatrix4()),u=cd(a),A.updateInitCameraAttributes(u),t?r.scene3D.reset():r.scene3D.resetDistanceAndLookAt();case 9:case"end":return e.stop()}}),e)})))})),e}return t=o,(r=[{key:"init",value:function(){aC(lC(o.prototype),"init",this).call(this),this.$actionInit.dispatch()}}])&&AC(t.prototype,r),n&&AC(t,n),o}(Ad);function fC(e){return(fC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function hC(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=dC(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function pC(e){return function(e){if(Array.isArray(e))return IC(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||dC(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function dC(e,t){if(e){if("string"==typeof e)return IC(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?IC(e,t):void 0}}function IC(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function yC(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function CC(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){yC(o,n,i,A,a,"next",e)}function a(e){yC(o,n,i,A,a,"throw",e)}A(void 0)}))}}function EC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function BC(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function vC(e,t,r){return(vC="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_C(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function mC(e,t){return(mC=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function QC(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=_C(e);if(t){var i=_C(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return bC(this,r)}}function bC(e,t){return!t||"object"!==fC(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _C(e){return(_C=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var SC=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&mC(e,t)}(u,e);var t,r,n,i,o,A,a=QC(u);function u(){var e;return EC(this,u),(e=a.apply(this,arguments)).cameraController=e.partialCreator.create(gC),e.state=e.stateCreator.create({renderMode:ia.RenderMode.SHADING,translucent:!1,selectable:!0}),e.$reducerState=e.reducerCreator.create(e.state),e.$actionMergeState=e.unitCreator.sync((function(t){t.produce(e.$reducerState,(function(e,t){Object.assign(e,t)}))})),e.$actionToggleRenderMode=e.unitCreator.sync((function(e){e.latest(s.a.mark((function e(t,r){var n,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=ia.RenderMode.SHADING,i=!1,e.t0=t.mode,e.next=e.t0===Dp.SHADING?5:e.t0===Dp.OUTLINE_WITH_SHADING?7:e.t0===Dp.TRANSLUCENT?9:e.t0===Dp.OUTLINE_AND_TRANSLUCENT?11:14;break;case 5:return n=ia.RenderMode.SHADING,e.abrupt("break",14);case 7:return n=ia.RenderMode.OUTLINE_WITH_SHADING,e.abrupt("break",14);case 9:return i=!0,e.abrupt("break",14);case 11:return n=ia.RenderMode.OUTLINE_WITH_SHADING,i=!0,e.abrupt("break",14);case 14:return e.next=16,Object(Mp.put)(this.$actionMergeState.message({renderMode:n,translucent:i}));case 16:am().viewer.toggleShowModelOutline(n===ia.RenderMode.OUTLINE_WITH_SHADING),r.scene3D.updateRenderMode(n),am().viewer.triggerReducer(),this.emit(Sp.renderModeChange);case 20:case"end":return e.stop()}}),e,this)})))})),e.$actionToggleRenderBorder=e.unitCreator.sync((function(e){e.latest(s.a.mark((function e(t,r){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t?ia.RenderMode.OUTLINE_WITH_SHADING:ia.RenderMode.SHADING,e.next=3,Object(Mp.put)(this.$actionMergeState.message({renderMode:n}));case 3:am().viewer.toggleShowModelOutline(n===ia.RenderMode.OUTLINE_WITH_SHADING),r.scene3D.updateRenderMode(n),this.emit(Sp.renderModeChange);case 6:case"end":return e.stop()}}),e,this)})))})),e.$actionToggleRenderTranslucent=e.unitCreator.sync((function(e){e.latest(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(Mp.put)(this.$actionMergeState.message({translucent:t}));case 2:am().viewer.triggerReducer(),this.emit(Sp.renderModeChange);case 4:case"end":return e.stop()}}),e,this)})))})),e.$actionToggleSelectModel=e.unitCreator.sync((function(e){e.every(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(Mp.put)(this.$actionMergeState.message({selectable:t}));case 2:case"end":return e.stop()}}),e,this)})))})),e}return t=u,(r=[{key:"module",value:function(){return"scene"}},{key:"init",value:function(){var e=this;vC(_C(u.prototype),"init",this).call(this),am().viewer.registerReducer((function(t,r,n){n.opacity=e.state.state.translucent?wp.translucentModel:wp.opaqueModel})),am().viewer.registerReducer((function(e,t,r){r.visible=!e.getInvisible()}))}},{key:"getAllParamModels",value:function(){return this.stateManager.core.design.getCustom().getParamModels().filter((function(e){return!e.isAppendHardware}))}},{key:"getAllCustomModels",value:(A=CC(s.a.mark((function e(){var t;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.getAllParamModels(),e.abrupt("return",t.map((function(e){return Dy(e,{origin:K.SENSE})})));case 2:case"end":return e.stop()}}),e,this)}))),function(){return A.apply(this,arguments)})},{key:"getCustomModelById",value:(o=CC(s.a.mark((function e(t){var r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(r=this.getStateManager().core.pad.findModelOrAssemblyModelById(t))){e.next=3;break}return e.abrupt("return",Dy(r,{origin:K.SENSE}));case 3:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"save",value:(i=CC(s.a.mark((function e(t){var r,n,i,o,A,a,u,c,l;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t,n=this.getStateManager().core.pad,(i=new rC(n.findModelOrAssemblyModelById)).addParamModelLite.apply(i,pC(r)),e.next=6,i.attach();case 6:return e.next=8,Promise.all(r.map((function(e){return Ry(e,i)})));case 8:o=e.sent,A=[],a=[],u=hC(o);try{for(u.s();!(c=u.n()).done;)(l=c.value).create&&l.custom&&l.model&&A.push(l),!l.create&&l.model&&a.push(l.model)}catch(e){u.e(e)}finally{u.f()}(A.length||a.length)&&A.length&&A.forEach((function(e){var t;null===(t=e.custom)||void 0===t||t.addParamModels(e.model)})),am().viewer.triggerReducer();case 15:case"end":return e.stop()}}),e,this)}))),function(e){return i.apply(this,arguments)})}])&&BC(t.prototype,r),n&&BC(t,n),u}(qi.AXR);function wC(e){return(wC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function DC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function RC(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?DC(Object(r),!0).forEach((function(t){MC(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):DC(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function MC(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function xC(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,i=!1,o=void 0;try{for(var A,a=e[Symbol.iterator]();!(n=(A=a.next()).done)&&(r.push(A.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(i)throw o}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return PC(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return PC(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function PC(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function TC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function FC(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function OC(e,t,r){return(OC="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=GC(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function LC(e,t){return(LC=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function NC(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=GC(e);if(t){var i=GC(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return kC(this,r)}}function kC(e,t){return!t||"object"!==wC(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function GC(e){return(GC=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var UC={rawSelected:[],selectedData:[],selectedDataV2:[]},jC=function(e,t){var r=e.entityId+"%%"+e.entityType.toString(),n=t.entityId+"%%"+t.entityType.toString();return r>n?1:r===n?0:-1},VC=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&LC(e,t)}(o,e);var t,r,n,i=NC(o);function o(){var e;return TC(this,o),(e=i.apply(this,arguments)).state=e.stateCreator.create(UC).mutable(),e.onModelsChange=function(){var t=e.selected.map((function(t){return e.stateManager.core.pad.findModel(t.entityId)})).filter((function(e){return!!e})),r=e.state.state.selectedData;t.length===r.length&&Object(tr.unzip)([t,r]).every((function(e){var t=xC(e,2);return t[0]===t[1]}))||(e.state.reduce((function(e){return RC(RC({},e),{},{selectedData:t})})),e.emit(o.EVENT_SELECT_CHANGED))},e.onModelChangeV2=function(){setTimeout((function(){e.onModelsChange()}),0);var t=e.stateManager.core,r=t.pad,n=t.fittingDesign,i=n.getFittings(),A=n.getGrooveFittings(),a=e.rawSelected.map((function(e){switch(e.entityType){case LA:return r.findModelEx(e.entityId,Lu);case OA:return r.findParamModelAssembly(e.entityId);case xp:return i.find((function(t){return t.id===e.entityId}));case Pp:return A.find((function(t){return t.id===e.entityId}));default:return}})).filter((function(e){return!!e})),s=e.state.state.selectedDataV2;s.length===a.length&&Object(tr.unzip)([s,a]).every((function(e){var t=xC(e,2);return t[0]===t[1]}))||(e.state.reduce((function(e){return RC(RC({},e),{},{selectedDataV2:a})})),e.emit(o.EVENT_SELECT_CHANGED_V2))},e._onSelectionChange=function(){e.onStateChange()},e}return t=o,(r=[{key:"module",value:function(){return"select"}},{key:"select",value:function(e){this.selectionStateManager.select(e)}},{key:"unSelect",value:function(e){this.selectionStateManager.unSelect(e)}},{key:"getSelected",value:function(){return this.state.state.selectedData}},{key:"selectionStateManager",get:function(){return this.stateManager.core.kaf.selection}},{key:"init",value:function(){OC(GC(o.prototype),"init",this).call(this),this.enable()}},{key:"release",value:function(){this.disable(),OC(GC(o.prototype),"release",this).call(this)}},{key:"onEnable",value:function(e){OC(GC(o.prototype),"onEnable",this).call(this,e),this.rawSelected=[],this.selected=[],this.selectionStateManager.on(ds.UPDATE,this._onSelectionChange),this.stateManager.core.pad.on(Nu.EVENT_PARAM_MODELS_CHANGED,this.onModelChangeV2),$t.on(zt.FITTING_MODEL_CHANGE,this.onModelChangeV2),this.onStateChange()}},{key:"onDisable",value:function(e){this.stateManager.core.pad.off(Nu.EVENT_PARAM_MODELS_CHANGED,this.onModelChangeV2),$t.off(zt.FITTING_MODEL_CHANGE,this.onModelChangeV2),this.state.reduce((function(){return UC})),this.selectionStateManager.off(ds.UPDATE,this._onSelectionChange),this.rawSelected=[],this.selected=[],OC(GC(o.prototype),"onDisable",this).call(this,e)}},{key:"onStateChange",value:function(){var e=this.selectionStateManager.state.value;if(e.sort(jC),this.rawSelected!==e){this.rawSelected=e;var t=this.resolveSelected(e)||[];this.selectedIsChanged(this.selected,t)&&(this.selected=t),this.onModelChangeV2()}}},{key:"resolveSelected",value:function(e){return e.filter((function(e){return e.entityType===LA}))}},{key:"selectedIsChanged",value:function(e,t){if(e.length!==t.length)return!0;if(0===e.length&&0===t.length)return!1;for(var r=e.map((function(e){return e.entityId+"%%"+e.entityType.toString()})),n=t.map((function(e){return e.entityId+"%%"+e.entityType.toString()})),i=0,o=n.length;i<o;++i)if(r[i]!==n[i])return!0;return!1}}])&&FC(t.prototype,r),n&&FC(t,n),o}(qi.AXR);VC.EVENT_SELECT_CHANGED="EVENT_SELECT_CHANGED",VC.EVENT_SELECT_CHANGED_V2="EVENT_SELECT_CHANGED_V2";var HC={entry:Zp,scene:SC,select:VC,fittingDesign:fy,baseDesignInfo:hp,viewParamModel:kd};function YC(){return am().axr.axrs}var KC=Object(FA.getConnector)(),qC=KC.connect,JC=KC.setRootState;function WC(e,t,r){return qC((function(){return e(YC(),am().getStateManager())}),t,r)}var zC=r(1133),XC=r.n(zC);function ZC(e){return(ZC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function $C(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function eE(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function tE(e,t,r){return t&&eE(e.prototype,t),r&&eE(e,r),e}function rE(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&nE(e,t)}function nE(e,t){return(nE=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function iE(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=AE(e);if(t){var i=AE(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return oE(this,r)}}function oE(e,t){return!t||"object"!==ZC(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function AE(e){return(AE=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var aE=Symbol("layout"),sE=WC((function(e){return{status:e.entry.state}}),(function(e){return{status:e.status.main}}),function(e){rE(r,e);var t=iE(r);function r(){return $C(this,r),t.apply(this,arguments)}return tE(r,[{key:"render",value:function(){return this.state.views.map((function(e){return e.content}))}}]),r}(Ji.MountPoint)),uE=function(e){rE(r,e);var t=iE(r);function r(){return $C(this,r),t.apply(this,arguments)}return tE(r,[{key:"render",value:function(){return zi.a.createElement(sE,{mountPointId:aE})}}]),r}(zi.a.PureComponent);function cE(e){return(cE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function lE(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function gE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fE(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&hE(e,t)}function hE(e,t){return(hE=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function pE(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=IE(e);if(t){var i=IE(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return dE(this,r)}}function dE(e,t){return!t||"object"!==cE(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function IE(e){return(IE=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var yE=WC((function(e,t){return{scene3D:t.scene3D}}),(function(e){var t=e.scene3D;return{cameraType:t.cameraType,cameraAttributes:t.cameraAttributes,initCameraAttributes:t.initCameraAttributes,perspectiveCameraMode:t.perspectiveCameraMode,perspectiveCameraFov:t.perspectiveCameraFov,groundGridConfig:t.groundGridConfig,enableCameraAnimation:t.enableCameraAnimation,renderMode:t.renderMode}}),function(e){fE(r,e);var t=pE(r);function r(){return gE(this,r),t.apply(this,arguments)}return r}(Ji.Scene3D)),CE=WC((function(){return{}}),(function(){return{}}),function(e){fE(o,e);var t,r,n,i=pE(o);function o(){var e;return gE(this,o),(e=i.apply(this,arguments)).onInit=function(e){var t=e.viewer.config;t.autoInstance.enabled.set(!0),t.popMeshMerge.enabled.set(!0),t.background.active.set(ia.BackgroundMode.SolidColorBackground),t.background.solid.color.set(new ia.Color(_p.sceneBG)),t.ground.enabled.set(!1),t.postEffect.planarShadow.enabled.set(!1),t.postEffect.taa.enabled.set(!1),t.staticFrameCache.enabled.set(!1),t.isExtraCopyBeforeScreenEnabled.set(!1),t.postEffect.ao.enabled.set(!1),am().viewer.onScene3DInit(e)},e.onGrabStart=function(){e.props.rootState.scene3D.updateEnableCameraAnimation(!1),e.props.rootState.scene3D.updateGrabing(!0)},e.onGrabEnd=function(){e.props.rootState.scene3D.updateGrabing(!1)},e.onZoomStart=function(){e.props.rootState.scene3D.updateEnableCameraAnimation(!1),e.props.rootState.scene3D.updateZooming(!0)},e.onZoomEnd=function(){e.props.rootState.scene3D.updateZooming(!1)},e.onCameraAnimationEnd=function(){e.props.rootState.scene3D.updateEnableCameraAnimation(!1)},e}return t=o,(r=[{key:"render",value:function(){var e=this.props,t=e.rootState.scene3D,r=e.containerId,n=e.size;return zi.a.createElement(yE,{onInit:this.onInit,cameraRotatable:!0,containerId:r,size:n,onGrabStart:this.onGrabStart,onGrabEnd:this.onGrabEnd,onZoomStart:this.onZoomStart,onZoomEnd:this.onZoomEnd,onScaleUpdate:t.updateScale,onCameraAttributesChange:t.updateCameraAttributes,onCameraAnimationEnd:this.onCameraAnimationEnd})}}])&&lE(t.prototype,r),n&&lE(t,n),o}(zi.a.PureComponent));function EE(e){return(EE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function BE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vE(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function mE(e,t){return(mE=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function QE(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=_E(e);if(t){var i=_E(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return bE(this,r)}}function bE(e,t){return!t||"object"!==EE(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _E(e){return(_E=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var SE=WC((function(e,t){return{scene3D:t.scene3D}}),(function(e){return{size:e.scene3D.size}}),function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&mE(e,t)}(o,e);var t,r,n,i=QE(o);function o(){var e;return BE(this,o),(e=i.apply(this,arguments)).rootRef=zi.a.createRef(),e.updateLayout=Object(tr.throttle)((function(){var t=e.rootRef.current;if(t){var r=t.getBoundingClientRect();e.props.rootState.scene3D.updateSize(new Yr.a(r.width,r.height))}}),200),e}return t=o,(r=[{key:"componentDidMount",value:function(){this.updateLayout(),window.addEventListener("resize",this.updateLayout)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.updateLayout),this.updateLayout.cancel()}},{key:"render",value:function(){var e=this.props,t=e.size,r=e.className;return zi.a.createElement("div",{ref:this.rootRef,id:bp.SCENE_ID,className:r},zi.a.createElement(CE,{containerId:bp.SCENE_ID,size:new u.Vector2d(t.x,t.y)}))}}])&&vE(t.prototype,r),n&&vE(t,n),o}(zi.a.PureComponent));r(2094);function wE(e){return(wE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function DE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function RE(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function ME(e,t){return(ME=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function xE(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=TE(e);if(t){var i=TE(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return PE(this,r)}}function PE(e,t){return!t||"object"!==wE(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function TE(e){return(TE=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var FE=WC((function(){return{}}),(function(){return{}}),function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ME(e,t)}(o,e);var t,r,n,i=xE(o);function o(){return DE(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"render",value:function(){return zi.a.createElement(Ji.ViewMounter,{mountPointId:aE},zi.a.createElement(SE,{key:"s3",className:XC.a.scene3D}))}}])&&RE(t.prototype,r),n&&RE(t,n),o}(zi.a.PureComponent));function OE(e,t){return(OE=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function LE(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=kE(e);if(t){var i=kE(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return NE(this,r)}}function NE(e,t){return!t||"object"!==GE(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function kE(e){return(kE=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function GE(e){return(GE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var UE,jE=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":GE(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},VE=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":GE(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},HE=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&OE(e,t)}(r,e);var t=LE(r);function r(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(n=t.call(this)).$model=e,n.entityType=xp,n.entityId=e.id,n}return r}(Ji.Entity);HE=jE([Object(Ji.provideEntityAPIs)([new Ji.EntityAPIs.DrawableAPI3D((function(){var e=this;return{create:function(){return function(e){var t=e.$model.type;if(t===l.GROOVE)return YE(e);if(t===l.HOLE)return KE(e)}(e)},update:function(t){var r=e.$model,n=r.position,i=r.visible;t.position.set(n.x,n.y,n.z),t.visible=i,t.material&&(t.material.visible=i)}}})),new Ji.EntityAPIs.HighlightGeometryAPI3D((function(){return{geometry:this.$model.boundingBox}}))]),VE("design:paramtypes",["function"==typeof(UE=void 0!==Vr&&Vr)?UE:Object])],HE);var YE=function(e){var t=e.$model,r=t.position,n=t.size,i=t.rotate,o=t.visible,A=t.viewColor,a=t.opacity,s=new ia.BoxGeometry(n.x,n.y,n.z),u=new ia.MeshBasicMaterial({color:A,opacity:a,visible:o,transparent:!0}),c=new ia.Mesh(s,u);return c.position.set(r.x,r.y,r.z),c.rotation.set(i.x,i.y,i.z),c.visible=o,c},KE=function(e){var t=e.$model,r=t.position,n=t.visible,i=t.rotate,o=t.height,A=t.viewColor,a=t.opacity,s=t.fittingData.diameter/2,u=new ia.CylinderGeometry(s,s,o),c=new ia.MeshBasicMaterial({color:A,opacity:a,visible:n,transparent:!0}),l=new ia.Mesh(u,c);return l.position.set(r.x,r.y,r.z),l.rotation.set(i.x,i.y,i.z),l};function qE(e,t){if(e.length!==t.length)return[];for(var r=e.length,n=[],i=0;i<r-1;i++)n.push(e[i].x,e[i].y,e[i].z),n.push(e[i+1].x,e[i+1].y,e[i+1].z),n.push(t[i].x,t[i].y,t[i].z),n.push(t[i].x,t[i].y,t[i].z),n.push(t[i+1].x,t[i+1].y,t[i+1].z),n.push(e[i+1].x,e[i+1].y,e[i+1].z);return n}function JE(e){return function(e){if(Array.isArray(e))return WE(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return WE(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return WE(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function WE(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function zE(e,t){return(zE=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function XE(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=$E(e);if(t){var i=$E(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return ZE(this,r)}}function ZE(e,t){return!t||"object"!==eB(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function $E(e){return($E=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function eB(e){return(eB="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var tB,rB=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":eB(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},nB=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":eB(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},iB=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&zE(e,t)}(r,e);var t=XE(r);function r(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(n=t.call(this)).$model=e,n.entityType=Pp,n.entityId=e.id,n}return r}(Ji.Entity);function oB(e){var t=e.matrix,r=e.points,n=e.depth,i=e.color,o=e.side,A=e.position,a=e.opacity,s=new ia.LineBasicMaterial,u=new ia.MeshBasicMaterial({transparent:!0,opacity:a}),c=new ia.Mesh(void 0,u),l=new ia.Line(void 0,s),g=new ia.Group;return c.setAttribute("transparent-line-origin",!1),l.setAttribute("transparent-line-origin",!1),g.add(c),g.setAttribute("outline",!1),g.setAttribute("shadowCaster",!1),u.setValues({color:i,side:o}),g.applyMatrix(t),g.position.set(A.x,A.y,A.z),function(e){var t=e.area,r=e.outline,n=e.points,i=e.height,o=e.holes,A=!!r;if(!n||0===n.length)return;var a=n[0],s=new ia.Shape,u=A?new ia.Geometry:null;s.moveTo(a.x,a.y),n.forEach((function(e){s.lineTo(e.x,e.y),A&&u.vertices.push(new ia.Vector3(e.x,e.y,i))})),s.lineTo(a.x,a.y),o&&(s.holes=o);A&&(u.vertices.push(new ia.Vector3(a.x,a.y,i)),r.geometry&&r.geometry.dispose(),r.geometry=u);var c=new ia.ShapeGeometry(s);t.geometry&&t.geometry.dispose();t.geometry=c,t.position.set(0,0,i)}({area:c,points:r,height:n}),g}function AB(e){var t=new u.BBox3d;return[].concat(JE(e.getTopRenderPoints()),JE(e.getBottomRenderPoints())).forEach((function(e){t.addPoint(new u.Point3d(e))})),new $e.a(new at.a({x:t.width,y:t.height,z:t.depth}),new at.a(t.center),new at.a({x:0,y:0,z:0}))}function aB(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function sB(e,t){return(sB=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function uB(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=lB(e);if(t){var i=lB(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return cB(this,r)}}function cB(e,t){return!t||"object"!==gB(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function lB(e){return(lB=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function gB(e){return(gB="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}iB=rB([Object(Ji.provideEntityAPIs)([new Ji.EntityAPIs.DrawableAPI3D((function(){var e=this;return{create:function(){return function(e){var t=new ia.Group,r=e.pointToGlobalMatrix(),n=e.depth,i=e.viewColor,o=e.opacity,A=e.visible,a=void 0!==A&&A,s=e.path.getAllPolygonPoints(),c=new nt.a;c.fromString(r.toArray().join(","));var l=yd(c),g=li.a.decompose(c).position,f=oB({matrix:l,depth:0,points:s,color:i,side:ia.Side.FrontSide,position:g,opacity:o}),h=oB({matrix:l,depth:-n,points:s,color:i,side:ia.Side.BackSide,position:g,opacity:o}),p=[].concat(JE(s),[s[0]]),d=function(e){var t=e.matrix,r=e.side,n=e.position,i=e.color,o=e.opacity,A=new ia.MeshBasicMaterial({opacity:o,transparent:!0}),a=new ia.Mesh(new ia.BufferGeometry,A);if(A.setValues({side:r,color:i}),a.setAttribute("transparent-line-origin",!0),a.setAttribute("outline",!1),a.setAttribute("shadowCaster",!1),a.geometry instanceof ia.BufferGeometry){var s=qE(e.topPoints,e.bottomPoints);a.geometry.addAttribute("position",new ia.Float32BufferAttribute(s,3)),a.geometry.dispose()}return a.applyMatrix(t),a.position.set(n.x,n.y,n.z),a}({position:g,matrix:l,topPoints:p.map((function(e){return new u.Point3d(e.x,e.y,0)})),bottomPoints:p.map((function(e){return new u.Point3d(e.x,e.y,-n)})),color:i,side:ia.Side.DoubleSide,opacity:o});return t.add(f),t.add(h),t.add(d),[f,h,d,t].forEach((function(e){e.visible=a})),t}(e.$model)},update:function(t){var r=e.$model.visible;t.traverse((function(e){e.visible=r,e instanceof ia.Mesh&&e.material&&Object(tr.castArray)(e.material).forEach((function(e){e.visible=r}))})),t.visible=r}}})),new Ji.EntityAPIs.HighlightGeometryAPI3D((function(){return{geometry:AB(this.$model)}}))]),nB("design:paramtypes",["function"==typeof(tB=void 0!==vn&&vn)?tB:Object])],iB);var fB,hB=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":gB(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},pB=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":gB(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},dB=Ji.__INTERNAL__.Highlighters.generateWireGeometryForHighlighterGeometry,IB=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&sB(e,t)}(o,e);var t,r,n,i=uB(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this)).$model=e,t.entityType=Op,t.entityId=e.id,t}return t=o,(r=[{key:"createOutlineMesh",value:function(){var e=this.$model.hintOutline,t=e.color,r=e.opacity,n=this.$model.visible,i=function(e){var t=new ia.Geometry,r=e.getVertices().map((function(e){var t=e;return new ia.Vector3(t.x,t.y,t.z)}));e.getIndices().forEach((function(e){t.vertices.push(r[e.x],r[e.y])})),t.computeBoundingBox();var n=t.getBoundingBox().getCenter(new ia.Vector3);return t.vertices=t.vertices.map((function(e){return function(e,t){var r=t.clone().sub(e);return e.clone().add(r)}(n,e)})),t}(this.getGeometry()),o=new ia.LineBasicMaterial({color:t,opacity:r,transparent:!0}),A=new ia.LineSegments(i,o);return A.computeLineDistances(),A.renderOrder=999,A.setAttribute("outline",!1),A.setAttribute("transparent-line-origin",!0),A.setAttribute("shadowCaster",!1),A.visible=n,o.visible=n,A}},{key:"getGeometry",value:function(){var e,t=this.$model.linkModel;return e=t instanceof st.CoreParamModel?t.getConcatenatedBox3():t instanceof Vr?t.boundingBox:AB(t),dB(e)}}])&&aB(t.prototype,r),n&&aB(t,n),o}(Ji.Entity),yB=IB=hB([Object(Ji.provideEntityAPIs)([new Ji.EntityAPIs.DrawableAPI3D((function(){var e=this;return{create:function(){return e.createOutlineMesh()},update:function(t){var r=e.$model.visible;t.visible=r,t.material.visible=r}}}))]),pB("design:paramtypes",["function"==typeof(fB=void 0!==Rr&&Rr)?fB:Object])],IB);function CB(e){var t=new ia.BufferGeometry;if(t.index=new ia.BufferAttribute(new Uint16Array(e.indices),1),t.addAttribute("position",new ia.BufferAttribute(new Float32Array(e.vertices),3)),t.addAttribute("uv",new ia.BufferAttribute(new Float32Array(e.textures),2)),e.normals){var r=new Float32Array(e.normals);t.addAttribute("normal",new ia.BufferAttribute(r,3))}else t.computeVertexNormals();return t}function EB(e,t){return(EB=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function BB(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=mB(e);if(t){var i=mB(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return vB(this,r)}}function vB(e,t){return!t||"object"!==QB(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function mB(e){return(mB=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function QB(e){return(QB="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var bB,_B=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":QB(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},SB=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":QB(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},wB=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&EB(e,t)}(r,e);var t=BB(r);function r(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(n=t.call(this)).$model=e,n.entityType=Tp,n.entityId=e.id,n}return r}(Ji.Entity),DB=wB=_B([Object(Ji.provideEntityAPIs)([new Ji.EntityAPIs.DrawableAPI3D((function(){var e=this;return{create:function(){return function(e){var t=e.$model,r=t.geometryModel,n=t.viewColor,i=t.originPoints,o=new ia.Group,A=CB(r),a=new ia.MeshBasicMaterial({depthTest:!1,depthWrite:!1,color:n,side:ia.Side.DoubleSide}),s=new ia.Mesh(A,a);s.renderOrder=998,o.add(s),Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING&&o.add(i.map((function(e){var t=new ia.Mesh(RB,MB);return t.position.set(e.x,e.y,e.z),t.renderOrder=999,t})));return o}(e)},update:function(){}}}))]),SB("design:paramtypes",["function"==typeof(bB=void 0!==Nn&&Nn)?bB:Object])],wB),RB=new ia.SphereBufferGeometry(3),MB=new ia.MeshBasicMaterial({depthTest:!1,depthWrite:!1,color:"black"});function xB(e){return function(e){if(Array.isArray(e))return PB(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return PB(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return PB(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function PB(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function TB(e,t){return(TB=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function FB(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=LB(e);if(t){var i=LB(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return OB(this,r)}}function OB(e,t){return!t||"object"!==NB(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function LB(e){return(LB=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function NB(e){return(NB="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var kB,GB=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":NB(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},UB=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":NB(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},jB=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&TB(e,t)}(r,e);var t=FB(r);function r(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(n=t.call(this)).$model=e,n.entityType=Fp,n.entityId=e.id,n}return r}(Ji.Entity),VB=jB=GB([Object(Ji.provideEntityAPIs)([new Ji.EntityAPIs.DrawableAPI3D((function(){var e=this;return{create:function(){return function(e){var t=e.$model,r=t.plankFaces,n=t.linkModel,i=t.hintOutline,o=n.getConcatenatedMatrix(),A=new ia.Group;r&&r.forEach((function(e){var t=CB(Ti(e,o)),r=new ia.MeshBasicMaterial({depthTest:!0,depthWrite:!0,color:e.color,opacity:e.opacity,transparent:!0,side:ia.Side.DoubleSide}),n=new ia.Mesh(t,r);n.renderOrder=998,A.add(n)}));if(i){var a=n.getSize(),s=n.getWireFrames();if(!s){var u=jI(0,a),c=jI(5,a);s=[].concat(xB(Object(tr.zip)(u,[].concat(xB(u.slice(1)),[u[0]]))),xB(Object(tr.zip)(c,[].concat(xB(c.slice(1)),[c[0]]))),xB(Object(tr.zip)(u,c))).flat().map((function(e){return[e.x,e.y,e.z]})).flat()}var l=Object(tr.chunk)(s,3).map((function(e){return new at.a(e[0],e[1],e[2]).applyMatrix4(o)})).map((function(e){return[e.x,e.y,e.z]})).flat(),g=new ya({points:l,visible:!0,color:parseInt(i.color.replace(/^#/,""),16)});A.add(g)}return A}(e)},update:function(){}}}))]),UB("design:paramtypes",["function"==typeof(kB=void 0!==Kn&&Kn)?kB:Object])],jB);function HB(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function YB(e,t){return(YB=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function KB(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=JB(e);if(t){var i=JB(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return qB(this,r)}}function qB(e,t){return!t||"object"!==WB(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function JB(e){return(JB=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function WB(e){return(WB="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var zB,XB=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":WB(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},ZB=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":WB(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},$B=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&YB(e,t)}(o,e);var t,r,n,i=KB(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this)).$model=e,t.entityType=Lp,t.entityId=e.id,t}return t=o,(r=[{key:"createMesh",value:function(){var e=this.$model,t=e.points,r=e.viewColor,n=e.opacity,i=e.visible,o=e.linkModel,A=e.height;if(o){var a=t.map((function(e){return new u.Point3d(e.x,e.y,A/2)})),s=t.map((function(e){return new u.Point3d(e.x,e.y,-A/2)})),c=new ia.MeshBasicMaterial({opacity:n,transparent:!0}),l=new ia.Mesh(new ia.BufferGeometry,c);if(c.setValues({side:ia.Side.DoubleSide,color:r}),l.setAttribute("transparent-line-origin",!0),l.setAttribute("outline",!1),l.setAttribute("shadowCaster",!1),l.geometry instanceof ia.BufferGeometry){var g=qE(a,s);l.geometry.addAttribute("position",new ia.Float32BufferAttribute(g,3)),l.geometry.dispose()}var f=o.getConcatenatedMatrix(),h=new at.a(0,0,0).applyMatrix4(f);return l.position.set(h.x,h.y,h.z),l.visible=i,c.visible=i,l.rotation.setFromRotationMatrix(yd(f)),l}}}])&&HB(t.prototype,r),n&&HB(t,n),o}(Ji.Entity),ev=$B=XB([Object(Ji.provideEntityAPIs)([new Ji.EntityAPIs.DrawableAPI3D((function(){var e=this;return{create:function(){return e.createMesh()},update:function(t){var r=e.$model,n=r.visible,i=r.viewColor,o=r.opacity;t.visible=n,t.material.setValues({opacity:o,color:i}),t.material.visible=n}}}))]),ZB("design:paramtypes",["function"==typeof(zB=void 0!==ti&&ti)?zB:Object])],$B);var tv=function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.getDesignDoc=t,this.createFittingEntities=Ji.__unstable__.flatEntitiesCreator((function(e){return new HE(e)})),this.createIntersectEntities=Ji.__unstable__.flatEntitiesCreator((function(e){return new DB(e)})),this.createGrooveFittingEntities=Ji.__unstable__.flatEntitiesCreator((function(e){return new iB(e)})),this.createPlankFaceHintEntities=Ji.__unstable__.flatEntitiesCreator((function(e){return new VB(e)})),this.careateFittingHintEntities=Ji.__unstable__.flatEntitiesCreator((function(e){return new yB(e)})),this.careatePlankOutlineHintEntities=Ji.__unstable__.flatEntitiesCreator((function(e){return new ev(e)})),this.getFittingEntities=function(){var e=r.getDesignDoc();return e?r.createFittingEntities(e.getFittings()):[]},this.getGrooveFittingEntities=function(){var e=r.getDesignDoc();return e?r.createGrooveFittingEntities(e.getGrooveFittings()):[]},this.getIntersectedEntities=function(){var e=r.getDesignDoc();return e?r.createIntersectEntities(e.getIntersects()):[]},this.getPlankFaceHintEntities=function(){var e=r.getDesignDoc();return e?r.createPlankFaceHintEntities(e.getPlankFaceHintModels()):[]},this.getFittingHintEntities=function(){var e=r.getDesignDoc();return e?r.careateFittingHintEntities(e.getFittingHintModels()):[]},this.getPlankOutlineHintEntities=function(){var e=r.getDesignDoc();return e?r.careatePlankOutlineHintEntities(e.getPlankOutlineHintModels()):[]},this.getEntities=[this.getFittingEntities,this.getIntersectedEntities,this.getGrooveFittingEntities,this.getPlankFaceHintEntities,this.getFittingHintEntities,this.getPlankOutlineHintEntities]};function rv(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return nv(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return nv(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function nv(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function iv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var ov=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.disabled=!1,this.pressMap=new Map,this.resetPressStatus=function(){t.pressMap.forEach((function(e,r){t.pressMap.set(r,!1)}))},this.onKeyDown=function(e){var r=t.getKeyBoardKey(e);t.pressMap.get(r)||t.isPrevent(e)||t.pressMap.has(r)&&t.pressMap.set(r,!0)},this.onKeyUp=function(e){var r=t.getKeyBoardKey(e);t.pressMap.get(r)&&(t.isPrevent(e)||t.pressMap.has(r)&&t.pressMap.set(r,!1))},this.active()}var t,r,n;return t=e,(r=[{key:"addKeyboardKeyListener",value:function(e){var t=this,r=Object(tr.castArray)(e);if(r.some((function(e){return!t.isValidKeyboardKey(e)})))throw new Error("keyboard-key is invalid");var n,i=rv(r);try{for(i.s();!(n=i.n()).done;){var o=n.value;this.pressMap.set(o,!1)}}catch(e){i.e(e)}finally{i.f()}}},{key:"removeKeyboardKeyListener",value:function(e){var t,r=rv(Object(tr.castArray)(e));try{for(r.s();!(t=r.n()).done;){var n=t.value;this.pressMap.has(n)&&this.pressMap.delete(n)}}catch(e){r.e(e)}finally{r.f()}}},{key:"active",value:function(){document.addEventListener("keydown",this.onKeyDown),document.addEventListener("keyup",this.onKeyUp),document.addEventListener("mouseenter",this.resetPressStatus),this.disabled=!1}},{key:"dispose",value:function(){document.removeEventListener("keydown",this.onKeyDown),document.removeEventListener("keyup",this.onKeyUp),document.removeEventListener("mouseenter",this.resetPressStatus),this.disabled=!0,this.resetPressStatus()}},{key:"checkIsPress",value:function(e){var t=this;return Object(tr.castArray)(e).every((function(e){return t.pressMap.get(e)}))}},{key:"getKeyBoardKey",value:function(e){return e.key.toLowerCase()}},{key:"isPrevent",value:function(e){if(this.disabled)return!0;var t=e.target;if(!t)return!1;if("INPUT"===t.tagName){var r=t.type;return"radio"!==r&&"checkbox"!==r}return"SELECT"===t.tagName||"TEXTAREA"===t.tagName}},{key:"isValidKeyboardKey",value:function(e){return Xe.includes(e)}}])&&iv(t.prototype,r),n&&iv(t,n),e}(),Av=new Map([[ui.ParamModelCategory.FRAME,[ui.ParamModelCategory.DRAWER,ui.ParamModelCategory.SWING_DOOR,ui.ParamModelCategory.PARAM_FURNITURE,ui.ParamModelCategory.FASCIA_BOARD,ui.ParamModelCategory.SPECIAL_FRAME,ui.ParamModelCategory.EMBED_FRAME_W,ui.ParamModelCategory.POLE_W,ui.ParamModelCategory.SEGMENT_DOOR_CONTAINER,ui.ParamModelCategory.BOARD,ui.ParamModelCategory.DRAWER,ui.ParamModelCategory.SPACE_GROUP,ui.ParamModelCategory.SINGLE_SLIDING_DOOR,ui.ParamModelCategory.FRAME,ui.ParamModelCategory.SLIDING_DOOR_BOARD,ui.ParamModelCategory.PARAM_FURNITURE_PART,ui.ParamModelCategory.SANITARY_COMPONENT,ui.ParamModelCategory.DOOR_LEAF,ui.ParamModelCategory.DECORATIVE_MOLDING_C,ui.ParamModelCategory.DECORATIVE_MOLDING_W,ui.ParamModelCategory.HANDS_FREE,ui.ParamModelCategory.REPLACE_STRUCTURE_BOARD]],[ui.ParamModelCategory.SHOWER_ROOM,[ui.ParamModelCategory.DRAWER,ui.ParamModelCategory.SWING_DOOR,ui.ParamModelCategory.PARAM_FURNITURE,ui.ParamModelCategory.FASCIA_BOARD,ui.ParamModelCategory.SPECIAL_FRAME,ui.ParamModelCategory.EMBED_FRAME_W,ui.ParamModelCategory.POLE_W,ui.ParamModelCategory.SEGMENT_DOOR_CONTAINER,ui.ParamModelCategory.BOARD,ui.ParamModelCategory.DRAWER,ui.ParamModelCategory.SPACE_GROUP,ui.ParamModelCategory.SINGLE_SLIDING_DOOR,ui.ParamModelCategory.FRAME,ui.ParamModelCategory.PARAM_FURNITURE_PART,ui.ParamModelCategory.SANITARY_COMPONENT,ui.ParamModelCategory.DOOR_LEAF,ui.ParamModelCategory.REPLACE_STRUCTURE_BOARD]],[void 0,[ui.ParamModelCategory.DRAWER,ui.ParamModelCategory.SWING_DOOR,ui.ParamModelCategory.PARAM_FURNITURE,ui.ParamModelCategory.FASCIA_BOARD,ui.ParamModelCategory.SPECIAL_FRAME,ui.ParamModelCategory.EMBED_FRAME_W,ui.ParamModelCategory.BOARD,ui.ParamModelCategory.SPACE_GROUP,ui.ParamModelCategory.POLE_W,ui.ParamModelCategory.SINGLE_SLIDING_DOOR,ui.ParamModelCategory.SLIDING_DOOR_BOARD,ui.ParamModelCategory.DRAWER,ui.ParamModelCategory.RAIL,ui.ParamModelCategory.DOOR_LEAF]],[ui.ParamModelCategory.SLIDING_DOOR_C,[ui.ParamModelCategory.RAIL,ui.ParamModelCategory.SINGLE_SLIDING_DOOR]],[ui.ParamModelCategory.SPACE_GROUP,[ui.ParamModelCategory.DRAWER,ui.ParamModelCategory.SWING_DOOR,ui.ParamModelCategory.PARAM_FURNITURE,ui.ParamModelCategory.FASCIA_BOARD,ui.ParamModelCategory.SEGMENT_DOOR_CONTAINER,ui.ParamModelCategory.BOARD,ui.ParamModelCategory.SPECIAL_BOARD,ui.ParamModelCategory.SPACE_GROUP]],[ui.ParamModelCategory.SINGLE_SLIDING_DOOR,[ui.ParamModelCategory.SLIDING_DOOR_CORE,ui.ParamModelCategory.DOOR_WAIST_LINE]],[ui.ParamModelCategory.SEGMENT_DOOR_CONTAINER,[ui.ParamModelCategory.SWING_DOOR]],[ui.ParamModelCategory.REPLACE_STRUCTURE_BOARD,[ui.ParamModelCategory.BOARD]],[ui.ParamModelCategory.SWING_DOOR,[ui.ParamModelCategory.DOOR_CORE,ui.ParamModelCategory.DOOR_WAIST_LINE,ui.ParamModelCategory.DECORATIVE_MOLDING,ui.ParamModelCategory.BOARD]],[ui.ParamModelCategory.DRAWER,[ui.ParamModelCategory.DRAWER_PANEL,ui.ParamModelCategory.SWING_DOOR,ui.ParamModelCategory.BOARD]],[ui.ParamModelCategory.PARAM_FURNITURE,[ui.ParamModelCategory.FURNITURE_LEG]],[ui.ParamModelCategory.KADA,[ui.ParamModelCategory.BYOBU,ui.ParamModelCategory.BYOBU_FRAME,ui.ParamModelCategory.BYOBU_PANEL]]]);function av(e){return function(e){if(Array.isArray(e))return sv(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return sv(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return sv(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function sv(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function uv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var cv=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.prevModeSelectEntity=[],this.isAccessoryCache=new Map,this.designMode=Ve.PRODUCT,this.multiSelectShortCut="shift",this.pressManager=new ov,this.memoGetHintModelLite=Py()((function(e){return t.isFittingLikeModel(e)?fI(e):t.getParamModelLite(e)})),this.pressManager.addKeyboardKeyListener(this.multiSelectShortCut)}var t,r,n;return t=e,(r=[{key:"isAccessory",value:function(e){var t;if(this.isAccessoryCache.has(e.id))return this.isAccessoryCache.get(e.id);var r=null===(t=null==e?void 0:e.getParent)||void 0===t?void 0:t.call(e),n=(Av.get(r?r.getCategory().getRoot():void 0)||[]).some((function(t){return e.getCategory().belongsTo(t)}));return this.isAccessoryCache.set(e.getId(),n),n}},{key:"getAccessoryAtFirstLevel",value:function(e,t){for(var r,n,i=this,o=[],A=t;A&&A!==e;)o.unshift(A),A=(null===(r=A.getParent)||void 0===r?void 0:r.call(A))||(null===(n=A.getAssembly)||void 0===n?void 0:n.call(A));return o.find((function(e){return i.isAccessory(e)}))||t}},{key:"getParamModelLite",value:function(e){var t=(e.isRoot()?e:e.getRoot()).getAssembly();return t?Dy(e,{origin:K.SENSE},void 0,Dy(t,{origin:K.SENSE})):Dy(e,{origin:K.SENSE})}},{key:"topModelModeGetSelectModel",value:function(e,t){var r,n;if(this.isFittingLikeModel(e))return e;var i,o,A,a=e.isRoot()?e:e.getRoot(),s=a.getAssembly(),u=Array.isArray(this.curSelectEntity)?this.curSelectEntity[0]:this.curSelectEntity,c=!1;if(u&&(o=gm(u))&&!this.isFittingLikeModel(o)&&(u.entityType===LA?A=(A=o.isRoot()?o:o.getRoot()).getAssembly()||A:(c=!0,A=o),i=A===a||A===s),i){for(var l=!1,g=!1,f=o instanceof st.CoreParamModel?o.getParent():void 0,h=e;h;){if(h===o){l=!0;break}if(h===f){g=!0;break}h=(null===(r=h.getParent)||void 0===r?void 0:r.call(h))||(null===(n=h.getAssembly)||void 0===n?void 0:n.call(h))}if(t===He.CLICK)return l?o:g?this.getAccessoryAtFirstLevel(f,e):A instanceof st.CoreParamModelAssembly?(o.isRoot()?o:o.getRoot())===a?this.getAccessoryAtFirstLevel(a,e):a:this.getAccessoryAtFirstLevel(a,e);if(t===He.DB_CLICK)return l?c?a:this.getAccessoryAtFirstLevel(o,e):this.getAccessoryAtFirstLevel(a,e)}else{if(t===He.CLICK)return s||a;if(t===He.DB_CLICK)return s?a:this.getAccessoryAtFirstLevel(a,e)}}},{key:"accessoryModeGetSelectModel",value:function(e,t){var r,n;if(this.isFittingLikeModel(e))return e;var i=e.isRoot()?e:e.getRoot(),o=Array.isArray(this.curSelectEntity)?this.curSelectEntity[0]:this.curSelectEntity,A=o&&gm(o),a=!1;if(A&&!this.isFittingLikeModel(A)&&(a=(A.isRoot()?A:A.getRoot())===i),a){for(var s=!1,u=!1,c=null==A?void 0:A.getParent(),l=e;l;){if(l===A){s=!0;break}if(l===c){u=!0;break}l=(null===(r=l.getParent)||void 0===r?void 0:r.call(l))||(null===(n=l.getAssembly)||void 0===n?void 0:n.call(l))}if(t===He.CLICK)return s?A:this.getAccessoryAtFirstLevel(u?c:i,e);if(t===He.DB_CLICK){if(s)return this.getAccessoryAtFirstLevel(A,e);var g=this.getAccessoryAtFirstLevel(i,e);return this.getAccessoryAtFirstLevel(g,e)}}else{if(t===He.CLICK)return this.getAccessoryAtFirstLevel(i,e);if(t===He.DB_CLICK){var f=this.getAccessoryAtFirstLevel(i,e);return this.getAccessoryAtFirstLevel(f,e)}}}},{key:"topModelModeAndAccessoryModeHint",value:function(e){var t,r;if(this.isFittingLikeModel(e))return e;var n,i,o=e.isRoot()?e:e.getRoot(),A=o.getAssembly(),a=Array.isArray(this.curSelectEntity)?this.curSelectEntity[0]:this.curSelectEntity,s=!1;if(a&&(n=gm(a))&&!this.isFittingLikeModel(n)&&(s=(i=a.entityType===LA?(i=n.isRoot()?n:n.getRoot()).getAssembly()||i:n)===o||i===A),n&&s){for(var u=!1,c=!1,l=n instanceof st.CoreParamModel?n.getParent():void 0,g=e;g;){if(g===n){u=!0;break}if(g===l){c=!0;break}g=(null===(t=g.getParent)||void 0===t?void 0:t.call(g))||(null===(r=g.getAssembly)||void 0===r?void 0:r.call(g))}return u?this.isMultiSelect||Array.isArray(this.curSelectEntity)&&this.curSelectEntity.length>1?n:n instanceof st.CoreParamModelAssembly?o:this.getAccessoryAtFirstLevel(n,e):c?this.getAccessoryAtFirstLevel(l,e):this.designMode===Ve.TOP_MODEL&&o!==n&&o!==n.getRoot()?o:this.getAccessoryAtFirstLevel(o,e)}return this.designMode===Ve.TOP_MODEL?o.getAssembly()||o:this.getAccessoryAtFirstLevel(o,e)}},{key:"setCurSelectEntity",value:function(e){this.curSelectEntity=e}},{key:"getCurSelectEntity",value:function(){return this.curSelectEntity}},{key:"setCurHintEntity",value:function(e){this.curHintEntity=e}},{key:"getCurHintEntity",value:function(){return this.curHintEntity}},{key:"clearPrevModeSelectEntity",value:function(){this.prevModeSelectEntity.length&&(this.prevModeSelectEntity=[])}},{key:"getDesignMode",value:function(){return this.designMode}},{key:"setDesignMode",value:function(e,t){this.designMode=e,e===Ve.CUSTOM?(this.customModeFindSelectModel=null==t?void 0:t.findSelectModel,this.customModeFindHintModel=null==t?void 0:t.findHintModel,!this.pressManager.disabled&&this.pressManager.dispose()):(this.customModeFindSelectModel=void 0,this.customModeFindHintModel=void 0,this.pressManager.disabled&&this.pressManager.active(),this.prevModeSelectEntity=this.prevModeSelectEntity.concat(this.curSelectEntity&&Object(tr.castArray)(this.curSelectEntity)||[])),this.setCurSelectEntity(void 0),this.setCurHintEntity(void 0)}},{key:"genEntityDescriptor",value:function(e){var t=fm[e.type];return{entityId:e.id,entityType:t}}},{key:"customModeSelectModel",value:function(e,t){var r,n;n=this.isFittingLikeModel(e)?fI(e):this.getParamModelLite(e);var i=null===(r=this.customModeFindSelectModel)||void 0===r?void 0:r.call(this,n,t);return Object(tr.castArray)(i).filter((function(e){return e})).map(this.genEntityDescriptor)}},{key:"customModeHintModel",value:function(e){var t,r=this,n=this.memoGetHintModelLite(e),i=null===(t=this.customModeFindHintModel)||void 0===t?void 0:t.call(this,n);return clearTimeout(this.clearMemoTimer),this.clearMemoTimer=setTimeout((function(){r.memoGetHintModelLite.clear()}),1e3),Object(tr.castArray)(i).filter((function(e){return e})).map(this.genEntityDescriptor)}},{key:"isFittingLikeModel",value:function(e){return e instanceof vn||e instanceof Vr||e instanceof jt&&Boolean(e.isAppendHardware)}},{key:"getSelectEntity",value:function(e,t){var r;if(this.isMultiSelect&&this.designMode!==Ve.CUSTOM){switch(this.designMode){case Ve.TOP_MODEL:r=this.topModelModeGetSelectModel(e,t);break;case Ve.ACCESSORY:r=this.accessoryModeGetSelectModel(e,t);break;case Ve.PRODUCT:r=e}if(!r)return;var n=lm(r),i=Object(tr.castArray)(this.curSelectEntity).filter((function(e){return e}));this.prevModeSelectEntity.length&&i.push.apply(i,av(this.prevModeSelectEntity));var o=i[0]&&gm(i[0]);if(o&&this.isFittingLikeModel(o)!==this.isFittingLikeModel(r))return n;var A=i.filter((function(e){return e.entityId!==n.entityId}));return A.length!==i.length?A:[].concat(av(A),[n])}if(!Array.isArray(this.curSelectEntity)||!this.curSelectEntity.length){switch(this.designMode){case Ve.TOP_MODEL:r=this.topModelModeGetSelectModel(e,t);break;case Ve.ACCESSORY:r=this.accessoryModeGetSelectModel(e,t);break;case Ve.PRODUCT:r=e;break;case Ve.CUSTOM:return this.customModeSelectModel(e,t)}return lm(r||e)}}},{key:"getHintEntity",value:function(e){var t;switch(this.designMode){case Ve.TOP_MODEL:case Ve.ACCESSORY:t=this.topModelModeAndAccessoryModeHint(e);break;case Ve.PRODUCT:t=e;break;case Ve.CUSTOM:return this.customModeHintModel(e)}var r=this.curSelectEntity&&Object(tr.castArray)(this.curSelectEntity)||[];if(!([].concat(av(r),av(this.prevModeSelectEntity)).findIndex((function(e){return e.entityId===t.id}))>-1))return lm(t)}},{key:"registerMultiSelectShortcut",value:function(e){this.pressManager.removeKeyboardKeyListener(this.multiSelectShortCut),this.multiSelectShortCut=e,this.pressManager.addKeyboardKeyListener(this.multiSelectShortCut)}},{key:"isMultiSelect",get:function(){return this.pressManager.checkIsPress(this.multiSelectShortCut)}}])&&uv(t.prototype,r),n&&uv(t,n),e}();function lv(e){return(lv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function gv(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function hv(e,t){return(hv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function pv(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Iv(e);if(t){var i=Iv(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return dv(this,r)}}function dv(e,t){return!t||"object"!==lv(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Iv(e){return(Iv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var yv=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&hv(e,t)}(o,e);var t,r,n,i=pv(o);function o(){return gv(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"pickRayTarget",value:function(e){return e&&gm(e)}},{key:"selection",get:function(){return am().getStateManager().kaf.selection}},{key:"hint",get:function(){return am().getStateManager().kaf.kaf2.hint}},{key:"designModeCtx",get:function(){return am().designModeContext}}])&&fv(t.prototype,r),n&&fv(t,n),o}(Ji.ToolModule.Feature);function Cv(e){return(Cv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ev(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Bv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function vv(e,t){return(vv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function mv(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=bv(e);if(t){var i=bv(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Qv(this,r)}}function Qv(e,t){return!t||"object"!==Cv(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function bv(e){return(bv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var _v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&vv(e,t)}(o,e);var t,r,n,i=mv(o);function o(){var e;return Ev(this,o),(e=i.apply(this,arguments)).isMouseDown=!1,e}return t=o,(r=[{key:"onMouseDown",value:function(){this.isMouseDown=!0}},{key:"onMouseUp",value:function(){this.isMouseDown=!1}},{key:"onMouseMove",value:function(e){if(!this.isMouseDown){var t=this.context.pick(e.sceneId,e.event),r=this.pickRayTarget(null==t?void 0:t.entity);if($t.eventNames().includes(zt.PLANK_FACE_HOVER)&&r instanceof st.CoreParamModel){var n=t.entity,i=n.point,o={modelId:n.entityId,id:Ed(r,i)};$t.emit(zt.PLANK_FACE_HOVER,o)}if(r){var A=this.designModeCtx.getHintEntity(r);this.designModeCtx.getDesignMode(),Ve.CUSTOM,this.hint.hint(A)}else this.hint.hint(),this.designModeCtx.setCurHintEntity(void 0)}}}])&&Bv(t.prototype,r),n&&Bv(t,n),o}(yv);function Sv(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return wv(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return wv(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function wv(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Dv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Rv(e,t){return(Rv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Mv(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Pv(e);if(t){var i=Pv(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return xv(this,r)}}function xv(e,t){return!t||"object"!==Tv(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Pv(e){return(Pv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Tv(e){return(Tv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Fv=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Tv(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},Ov=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":Tv(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},Lv=Ji.__INTERNAL__.Highlighters.WireGeometry,Nv=Ji.__INTERNAL__.Highlighters.generateWireGeometryForHighlighterGeometry,kv=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Rv(e,t)}(o,e);var t,r,n,i=Mv(o);function o(e,t){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(r=i.call(this)).models=e,r.createFittingModelBox=t,r}return t=o,(r=[{key:"getGeometry",value:function(){var e,t=new Lv,r=Sv(this.models);try{for(r.s();!(e=r.n()).done;){var n=e.value,i=void 0;i=n instanceof st.CoreParamModel||n instanceof st.CoreParamModelAssembly?n.getConcatenatedBox3():this.createFittingModelBox(n);var o=Nv(i);t.append(o)}}catch(e){r.e(e)}finally{r.f()}return t}}])&&Dv(t.prototype,r),n&&Dv(t,n),o}(Ji.Entity),Gv=kv=Fv([Object(Ji.provideEntityAPIs)([new Ji.EntityAPIs.HighlightGeometryAPI3D((function(){return{geometry:this.getGeometry()}}))]),Ov("design:paramtypes",[Array,Function])],kv);function Uv(e){return(Uv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function jv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Vv(e,t){return(Vv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Hv(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Kv(e);if(t){var i=Kv(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Yv(this,r)}}function Yv(e,t){return!t||"object"!==Uv(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Kv(e){return(Kv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var qv=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Vv(e,t)}(o,e);var t,r,n,i=Hv(o);function o(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(e=i.call(this))._init(),e}return t=o,(r=[{key:"_init",value:function(){var e=this,t={accept:function(){return!0},priority:1,createMultiSelectionEntity:function(t){var r=t.map((function(e){return gm(e)}));return new Gv(r.filter((function(e){return e})),e.createFittingModelBox)}};this.selection.addMultiSelectionConfig(t)}},{key:"createFittingModelBox",value:function(e){return e instanceof Vr?e.boundingBox:AB(e)}},{key:"onClick",value:function(e){this.triggerClick(e,He.CLICK)}},{key:"onDblClick",value:function(e){this.designModeCtx.isMultiSelect||this.triggerClick(e,He.DB_CLICK)}},{key:"triggerClick",value:function(e,t){var r=this.context.pick(e.sceneId,e.event),n=this.pickRayTarget(null==r?void 0:r.entity);if($t.eventNames().includes(zt.PLANK_FACE_CLICK)&&n instanceof st.CoreParamModel){var i=r.entity,o=i.point,A={modelId:i.entityId,id:Ed(n,o)};$t.emit(zt.PLANK_FACE_CLICK,A)}if(n){var a=this.designModeCtx.getSelectEntity(n,t);this.designModeCtx.getDesignMode()===Ve.CUSTOM?a&&this.selection.select(a):(this.selection.select(a),this.designModeCtx.setCurSelectEntity(a))}else this.selection.select(),this.designModeCtx.setCurSelectEntity(void 0);this.designModeCtx.clearPrevModeSelectEntity()}}])&&jv(t.prototype,r),n&&jv(t,n),o}(yv);function Jv(e){return(Jv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Wv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function zv(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Wv(Object(r),!0).forEach((function(t){Xv(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Wv(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Xv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Zv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function $v(e,t,r){return($v="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=nm(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function em(e,t){return(em=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function tm(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=nm(e);if(t){var i=nm(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return rm(this,r)}}function rm(e,t){return!t||"object"!==Jv(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function nm(e){return(nm=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var im,om=new qi.SingletonRef,Am=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&em(e,t)}(o,e);var t,r,n,i=tm(o);function o(e,t){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(r=i.call(this,{id:"com.custom.pad",name:"cFrameApp",Component:FE,axrs:HC,singleton:om},e)).stateManager=t,r.viewer=new Rs,r.designModeContext=new cv,r}return t=o,(r=[{key:"init",value:function(){$v(nm(o.prototype),"init",this).call(this),this.initStateManager(),this.initApp()}},{key:"initStateManager",value:function(){var e=this.stateManager;e.initState(),JC(e);var t=this.getDependentPlugin(Ji.AppServicePlugin),r=this.getDependentPlugin(qh);e.kaf=t.stateManager,e.core=r.stateManager}},{key:"initNet",value:function(){$v(nm(o.prototype),"initNet",this).call(this),this.net.setSendPolicy(new Pc),this.client=new $u(this.net)}},{key:"initApp",value:function(){var e=this,t=this.stateManager,r=t.core,n=r.design,i=r.pad,o=this.getDependentPlugin(Ji.AppServicePlugin);this.viewer.config(o,{getCustom:function(){return n.getCustom()},getDoc:function(){return n.getDoc()},isEntitySelectable:function(){return e.axr.axrs.scene.state.state.selectable},pickActualInteractiveEntity:function(e,t){for(var r=t.point,n=i.findModelOrAssemblyModelById(e.entityId);n&&!Fy.includes(n.getType());)n=n.getParent();return n?{entityId:n.id,entityType:LA,point:r}:zv(zv({},e),{},{point:r})},paramModelSymbol:LA,filterParamModel:function(t){return!e.axr.axrs.fittingDesign.senseSetting.getSenseSettings().renderIgnoreCategory.includes(t.getCategory().categoryId)}}),this.viewer.registerReducer((function(e,t,r){r.interactionPriority=e.isAppendHardware?2:0})),o.registerEntityDocument(new tv((function(){return t.core.fittingDesign}))),t.kaf.toolbox.addIdleToolFeature((function(){return new qv})),t.kaf.toolbox.addIdleToolFeature((function(){return new _v})),o.setLayout(uE)}}])&&Zv(t.prototype,r),n&&Zv(t,n),o}(qi.PluginApplication),am=om.instance;function sm(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function um(e,t){var r=new Map;return function(){var n,i=t.apply(void 0,arguments);if(r.has(i))n=r.get(i);else if(n=e.apply(void 0,arguments),Object(tr.isObject)(n)&&Object(tr.isFunction)(n.then)&&Object(tr.isFunction)(n.catch)){var o=Promise.resolve(n);r.set(i,o),o.finally((function(){r.delete(i)}))}return n}}function cm(e){return e instanceof jt?LA:e instanceof Xt?OA:e instanceof Vr?xp:e instanceof vn?Pp:void 0}function lm(e){return{entityId:e.id,entityType:cm(e)}}function gm(e){var t=e.entityId,r=e.entityType,n=am().getStateManager().core,i=n.fittingDesign,o=n.pad;switch(r){case LA:return o.findModelOrAssemblyModelById(t);case OA:return o.findParamModelAssembly(t);case Pp:return i.getGrooveFittings().find((function(e){return e.id===t}));case xp:return i.getFittings().find((function(e){return e.id===t}));default:return}}var fm=(sm(im={},ze.PARAM_MODEL,LA),sm(im,ze.PARAM_MODEL_ASSEMBLY,OA),sm(im,ze.HOLE,xp),sm(im,ze.GROOVE,xp),sm(im,ze.HARDWARE_GROOVE,Pp),sm(im,ze.HARDWARE,LA),im);function hm(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function pm(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){hm(o,n,i,A,a,"next",e)}function a(e){hm(o,n,i,A,a,"throw",e)}A(void 0)}))}}var dm=new Map;function Im(e){return["designid","levelid","modelid","toolType"].map((function(t){return e[t]||""})).join(":")}var ym=um(function(){var e=pm(s.a.mark((function e(t){var r,n,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=Rc(),n=Im(t),!dm.has(n)){e.next=4;break}return e.abrupt("return",dm.get(n));case 4:return e.next=6,r.get("/cos/api/fitting-design",{params:t});case 6:return i=e.sent,dm.set(n,i.data.d),e.abrupt("return",i.data.d);case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Im);function Cm(){var e=Xh(Tf);"function"==typeof e.fittingDesignHasChanged&&e.fittingDesignHasChanged().catch((function(){}))}var Em,Bm,vm=function(){var e=pm(s.a.mark((function e(t,r){var n,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Rc(),i=Im(r),e.prev=2,e.next=5,n.post("/cos/api/fitting-design",t,{params:r});case 5:dm.set(i,t),Cm(),e.next=14;break;case 9:if(e.prev=9,e.t0=e.catch(2),o=e.t0,!Object(tr.isObject)(o)||"0"===o.c||!o.m){e.next=13;break}throw new Error("错误码:".concat(e.t0.c,";错误信息:").concat(e.t0.m));case 13:throw e.t0;case 14:case"end":return e.stop()}var o}),e,null,[[2,9]])})));return function(t,r){return e.apply(this,arguments)}}(),mm=function(){var e=pm(s.a.mark((function e(t){var r,n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Rc(),n=Im(t),e.prev=2,e.next=5,r.delete("/cos/api/fitting-design",{params:t});case 5:dm.has(n)&&dm.delete(n),Cm(),e.next=12;break;case 9:throw e.prev=9,e.t0=e.catch(2),e.t0;case 12:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(t){return e.apply(this,arguments)}}();function Qm(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function bm(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){Qm(o,n,i,A,a,"next",e)}function a(e){Qm(o,n,i,A,a,"throw",e)}A(void 0)}))}}!function(e){e.UNKNOWN="UNKNOWN",e.PENDING="PENDING",e.RUNNING="RUNNING",e.SAVING="SAVING",e.SUCCESS="SUCCESS",e.FAIL="FAIL",e.CANCEL="CANCEL",e.TIMEOUT="TIMEOUT"}(Em||(Em={})),function(e){e[e.CABINET=0]="CABINET",e[e.WARDROBE=1]="WARDROBE",e[e.DOOR_WINDOW=2]="DOOR_WINDOW"}(Bm||(Bm={}));var _m=function(){var e=bm(s.a.mark((function e(t){var r,n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(tr.castArray)(t),n=Xh(Yf),e.abrupt("return",n.getParamModelDataByIds(r));case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Sm=um(function(){var e=bm(s.a.mark((function e(t,r){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Xh(Zh.MiniAppParamModelJsonDataService),e.abrupt("return",n.getCachedModelJsonDataByModelId({modelIds:t,templateId:r}));case 2:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),(function(e,t){return e+(t||"")})),wm=um(function(){var e=bm(s.a.mark((function e(t,r,n){var i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=Xh(Zh.MiniAppParamModelJsonDataService),e.abrupt("return",i.getModelJsonDataByModelId({modelIds:t,templateId:r,timeout:n},{timeout:-1}));case 2:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),(function(e,t){return e+(t||"")}));function Dm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Rm(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Mm(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function xm(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){Mm(o,n,i,A,a,"next",e)}function a(e){Mm(o,n,i,A,a,"throw",e)}A(void 0)}))}}var Pm=Py()(function(){var e=xm(s.a.mark((function e(t){var r,n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Rc(),e.next=3,r.gzipGet("/custom-model/api/c/parammodeldata",{params:{obsbgid:t,cache:!0}});case 3:return n=e.sent,e.abrupt("return",n.data);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Dm(Object(r),!0).forEach((function(t){Rm(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Dm(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({promise:!0},Ty)),Tm=Py()(function(){var e=xm(s.a.mark((function e(t){var r,n,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Rc(),e.next=3,n.gzipPost("/dcs-resource/api/c/modelcenter/bgids",{bgIds:t});case 3:return i=e.sent,e.abrupt("return",(null===(r=i.data.d)||void 0===r?void 0:r.modelCenterMap)?Object(tr.mapValues)(i.data.d.modelCenterMap,(function(e){return JSON.parse(e)})):{});case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());var Fm=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)};function Om(e){return(Om="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Lm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Nm(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Lm(Object(r),!0).forEach((function(t){km(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Lm(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function km(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Gm(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function Um(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){Gm(o,n,i,A,a,"next",e)}function a(e){Gm(o,n,i,A,a,"throw",e)}A(void 0)}))}}function jm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Vm(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Hm(e,t){return(Hm=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ym(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=qm(e);if(t){var i=qm(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Km(this,r)}}function Km(e,t){return!t||"object"!==Om(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function qm(e){return(qm=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Jm=function(){return YC().fittingDesign.fittingDesignSense},Wm=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Hm(e,t)}(c,e);var t,r,n,i,o,A,a,u=Ym(c);function c(){return jm(this,c),u.apply(this,arguments)}return t=c,(r=[{key:"toggleAutoSave",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];Jm().$actionEnableAutoSave.dispatch(e)}},{key:"isAutoSave",value:function(){return Jm().isAutoSaveEnabled()}},{key:"getFittingDesignData",value:(a=Um(s.a.mark((function e(t){var r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t&&(YC().viewParamModel.state.state.currModelId!==t||Jm().state.state.design.id!==t)){e.next=3;break}return e.abrupt("return",this.getConnectedFittingDesign());case 3:return e.next=5,vd(t);case 5:return r=e.sent,e.abrupt("return",ym(Nm(Nm({},r),{},{modelid:t})));case 7:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"getConnectedFittingDesign",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return Jm().getConnectedFittingDesign(e,t)}},{key:"validateFittingDesign",value:function(e,t){var r=YC().entry.getStateManager().core.pad.findModelOrAssemblyModelById(t);if(!r)return{validated:!1};var n=YC().fittingDesign.senseSetting.getSenseSettings();return{validated:function(e){if(!e.isClosedPath())return!1;for(var t=e.points,r=e.lines,n=t.length,i=0;i<n;i++){var o={type:Mi.POINT,val:t[i]},A={type:Mi.LINE,val:r[i]};if(!ji(o.val))return!1;if(!Vi(A.val))return!1;if(!Yi(o,A))return!1;for(var a=i+1;a<n;a++){var s={type:Mi.POINT,val:t[a]},u={type:Mi.LINE,val:r[a]};if(!Yi(o,s))return!1;if(!Yi(o,u))return!1;if(!Yi(A,s))return!1;if(!Yi(A,u))return!1}}return!0}(Ki(e,r,Object(tr.pick)(n,["holeColor","grooveColor","holeOpacity","grooveOpacity"])).path)}}},{key:"appendFittingDesign",value:(A=Um(s.a.mark((function e(t){var r,n=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.length>1&&void 0!==n[1]?n[1]:{timeout:5e4},e.abrupt("return",Jm().appendFittingDataToFittingDesign(t,r));case 2:case"end":return e.stop()}}),e)}))),function(e){return A.apply(this,arguments)})},{key:"saveDesign",value:(o=Um(s.a.mark((function e(t){var r,n,i,o=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=o.length>1&&void 0!==o[1]?o[1]:{},n=r.timeout,i=fd(n),Jm().$actionSaveFittingDesign.started.dispatch({defer:i,design:t}),e.abrupt("return",i.promise);case 5:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})},{key:"clearDesign",value:(i=Um(s.a.mark((function e(t){var r,n,i,o,A;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(r=t||{}).timeout,i=void 0===n?5e4:n,o=r.modelId,A=fd(i),Jm().$actionClearFittingDesign.started.dispatch({defer:A,modelId:o}),e.abrupt("return",A.promise);case 4:case"end":return e.stop()}}),e)}))),function(e){return i.apply(this,arguments)})}])&&Vm(t.prototype,r),n&&Vm(t,n),c}(Fm);function zm(e){return(zm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Xm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Zm(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function $m(e,t){return($m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function eQ(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=rQ(e);if(t){var i=rQ(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return tQ(this,r)}}function tQ(e,t){return!t||"object"!==zm(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function rQ(e){return(rQ=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var nQ=(new fi.a).setFromCenterAndSize(new at.a(0,0,0),new at.a(200,200,100)),iQ=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&$m(e,t)}(o,e);var t,r,n,i=eQ(o);function o(){return Xm(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"resetDistanceAndLookAt",value:function(){var e=this.state,t=e.initCameraAttributes,r=t.position,n=t.lookAt,i=e.cameraAttributes.position,o=n.clone().sub(r).length(),A=n.clone().add(i.clone().sub(n).normalize().mul(o));this.updateCameraAttributes({position:A,lookAt:n})}},{key:"adjustInitCameraAttributesWithContent",value:function(){return nQ}}])&&Zm(t.prototype,r),n&&Zm(t,n),o}(Ji.Scene3DStateManager);function oQ(e){return(oQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function AQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function aQ(e,t){return(aQ=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function sQ(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=cQ(e);if(t){var i=cQ(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return uQ(this,r)}}function uQ(e,t){return!t||"object"!==oQ(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function cQ(e){return(cQ=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var lQ=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&aQ(e,t)}(r,e);var t=sQ(r);function r(){return AQ(this,r),t.apply(this,arguments)}return r}(Ji.types.combine({scene3D:iQ})),gQ=window.document.createElement("script");gQ.src="//at.alicdn.com/t/font_2369084_dyxfnutf0ac.js",window.document.body.appendChild(gQ);function fQ(e){return(fQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function hQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pQ(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function dQ(e,t){return(dQ=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function IQ(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=CQ(e);if(t){var i=CQ(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return yQ(this,r)}}function yQ(e,t){return!t||"object"!==fQ(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function CQ(e){return(CQ=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var EQ=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&dQ(e,t)}(o,e);var t,r,n,i=IQ(o);function o(){var e;return hQ(this,o),(e=i.apply(this,arguments)).rootState=new lQ,e}return t=o,(r=[{key:"stateManager",get:function(){return this.rootState}},{key:"onInitialize",value:function(){var e=new Am(this,this.rootState);e.init(),e.run()}}])&&pQ(t.prototype,r),n&&pQ(t,n),o}(Nh.BasePlugin);function BQ(e){return(BQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function vQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mQ(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function QQ(e,t){return(QQ=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function bQ(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=SQ(e);if(t){var i=SQ(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _Q(this,r)}}function _Q(e,t){return!t||"object"!==BQ(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function SQ(e){return(SQ=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}EQ.dependencies=[Ji.AppServicePlugin,qh];var wQ=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&QQ(e,t)}(o,e);var t,r,n,i=bQ(o);function o(){return vQ(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"toggleModelViewIntersected",value:function(e){YC().fittingDesign.intersected.$actionToggleShowIntersected.dispatch(e)}},{key:"toggleModelViewedIntersected",value:function(e){YC().fittingDesign.intersected.toggleShowIntersectGroupData(e)}}])&&mQ(t.prototype,r),n&&mQ(t,n),o}(Fm);function DQ(e){return(DQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function RQ(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function MQ(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){RQ(o,n,i,A,a,"next",e)}function a(e){RQ(o,n,i,A,a,"throw",e)}A(void 0)}))}}function xQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function PQ(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function TQ(e,t){return(TQ=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function FQ(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=LQ(e);if(t){var i=LQ(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return OQ(this,r)}}function OQ(e,t){return!t||"object"!==DQ(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function LQ(e){return(LQ=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var NQ=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&TQ(e,t)}(u,e);var t,r,n,i,o,A,a=FQ(u);function u(){return xQ(this,u),a.apply(this,arguments)}return t=u,(r=[{key:"getAllCustomModels",value:(A=MQ(s.a.mark((function e(){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",YC().scene.getAllCustomModels());case 1:case"end":return e.stop()}}),e)}))),function(){return A.apply(this,arguments)})},{key:"getCustomModelById",value:(o=MQ(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",YC().scene.getCustomModelById(t));case 1:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})},{key:"save",value:(i=MQ(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",YC().scene.save(t.models));case 1:case"end":return e.stop()}}),e)}))),function(e){return i.apply(this,arguments)})}])&&PQ(t.prototype,r),n&&PQ(t,n),u}(Fm);function kQ(e){return(kQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function GQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function UQ(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function jQ(e,t){return(jQ=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function VQ(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=YQ(e);if(t){var i=YQ(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return HQ(this,r)}}function HQ(e,t){return!t||"object"!==kQ(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function YQ(e){return(YQ=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var KQ=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&jQ(e,t)}(o,e);var t,r,n,i=VQ(o);function o(){return GQ(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"setFittingHint",value:function(e){YC().fittingDesign.fittingHint.setFittingHint(e)}},{key:"clearFittingHint",value:function(e){YC().fittingDesign.fittingHint.clearFittingHint(e)}}])&&UQ(t.prototype,r),n&&UQ(t,n),o}(Fm);function qQ(e){return(qQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function JQ(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function WQ(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){JQ(o,n,i,A,a,"next",e)}function a(e){JQ(o,n,i,A,a,"throw",e)}A(void 0)}))}}function zQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function XQ(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function ZQ(e,t){return(ZQ=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function $Q(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=tb(e);if(t){var i=tb(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return eb(this,r)}}function eb(e,t){return!t||"object"!==qQ(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function tb(e){return(tb=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var rb,nb,ib=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ZQ(e,t)}(a,e);var t,r,n,i,o,A=$Q(a);function a(){return zQ(this,a),A.apply(this,arguments)}return t=a,(r=[{key:"getAllFittingModels",value:(o=WQ(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",YC().fittingDesign.fittingModel.getAllFittingModels(t));case 1:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})},{key:"save",value:(i=WQ(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",YC().fittingDesign.fittingModel.save(t.models));case 1:case"end":return e.stop()}}),e)}))),function(e){return i.apply(this,arguments)})}])&&XQ(t.prototype,r),n&&XQ(t,n),a}(Fm);function ob(e){return(ob="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ab(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ab(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function sb(e,t){return(sb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ub(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=lb(e);if(t){var i=lb(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return cb(this,r)}}function cb(e,t){return!t||"object"!==ob(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function lb(e){return(lb=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}!function(e){e.View3D="view3d",e.Roamer="roamer"}(rb||(rb={})),function(e){e.UP="UP",e.DOWN="DOWN",e.LEFT="LEFT",e.RIGHT="RIGHT",e.FRONT="FRONT",e.BACK="BACK"}(nb||(nb={}));var gb=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&sb(e,t)}(o,e);var t,r,n,i=ub(o);function o(){return Ab(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"toggleCameraMode",value:function(e){var t;switch(e){case rb.View3D:t=Ji.PerspectiveCameraMode.View3D;break;case rb.Roamer:t=Ji.PerspectiveCameraMode.Roamer}am().getStateManager().scene3D.updatePerspectiveCameraMode(t)}},{key:"moveCamera",value:function(e){var t,r=am().getStateManager().scene3D;switch(e){case nb.UP:case nb.FRONT:t=Ji.ArrowType.UP;break;case nb.DOWN:case nb.BACK:t=Ji.ArrowType.DOWN;break;case nb.LEFT:t=Ji.ArrowType.LEFT;break;case nb.RIGHT:t=Ji.ArrowType.RIGHT}if(t){if(e===nb.UP||e===nb.DOWN)return void r.onQEPress(t);r.onWASDPress(t)}}}])&&ab(t.prototype,r),n&&ab(t,n),o}(Fm);function fb(e){return(fb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function hb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pb(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function db(e,t){return(db=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ib(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Cb(e);if(t){var i=Cb(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return yb(this,r)}}function yb(e,t){return!t||"object"!==fb(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Cb(e){return(Cb=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Eb=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&db(e,t)}(o,e);var t,r,n,i=Ib(o);function o(){return hb(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"setDefaultHint",value:function(e){YC().fittingDesign.plankFaceHint.setDefaultHintConfig(e)}},{key:"setModelHint",value:function(e){YC().fittingDesign.plankFaceHint.setModelHint(e)}},{key:"clearModelHint",value:function(e){YC().fittingDesign.plankFaceHint.clearModelHint(e)}}])&&pb(t.prototype,r),n&&pb(t,n),o}(Fm);function Bb(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function vb(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){Bb(o,n,i,A,a,"next",e)}function a(e){Bb(o,n,i,A,a,"throw",e)}A(void 0)}))}}function mb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Qb(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function bb(e,t){return(bb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _b(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=wb(e);if(t){var i=wb(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Sb(this,r)}}function Sb(e,t){return!t||"object"!==Db(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function wb(e){return(wb=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Db(e){return(Db="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Rb,Mb,xb=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Db(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},Pb=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":Db(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},Tb=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&bb(e,t)}(a,e);var t,r,n,i,o,A=_b(a);function a(){return mb(this,a),A.apply(this,arguments)}return t=a,(r=[{key:"getParamData",value:(o=vb(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",YC().viewParamModel.getParamModelJsonData(t));case 1:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})},{key:"getParamIntersected",value:(i=vb(s.a.mark((function e(t){var r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,YC().fittingDesign.intersected.getParamModelIntersectedData(t);case 2:return r=e.sent,e.abrupt("return",(n=r,{intersectedGroups:Object(tr.map)(n.intersectedGroups,(function(e){return pd(pd({},e),{},{intersecteds:Object(tr.map)(e.intersecteds,(function(e){return Object(tr.omit)(e,["shell"])}))})}))}));case 4:case"end":return e.stop()}var n}),e)}))),function(e){return i.apply(this,arguments)})},{key:"getTopParamModels",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.ignoreCategory||(e.ignoreCategory=Je),YC().viewParamModel.getTopModelList(e)}},{key:"getParamModelPhotoById",value:function(e){return YC().viewParamModel.getParamModelPhotoData(e)}}])&&Qb(t.prototype,r),n&&Qb(t,n),a}(Fm);function Fb(e){return(Fb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ob(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Lb(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Nb(e,t){return(Nb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function kb(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Ub(e);if(t){var i=Ub(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Gb(this,r)}}function Gb(e,t){return!t||"object"!==Fb(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ub(e){return(Ub=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}xb([je.observeAsyncApiDeco({serviceName:"ModelService"}),Pb("design:type",Function),Pb("design:paramtypes",["function"!=typeof!1&&Object]),Pb("design:returntype","function"==typeof(Rb="undefined"!=typeof Promise&&Promise)?Rb:Object)],Tb.prototype,"getParamData",null),xb([je.observeAsyncApiDeco({serviceName:"ModelService"}),Pb("design:type",Function),Pb("design:paramtypes",["function"!=typeof!1&&Object]),Pb("design:returntype","function"==typeof(Mb="undefined"!=typeof Promise&&Promise)?Mb:Object)],Tb.prototype,"getParamIntersected",null);var jb,Vb,Hb=function(){return YC().select},Yb=function(){return YC().baseDesignInfo};!function(e){e[e.NULL=0]="NULL",e[e.MODEL=1]="MODEL",e[e.CASBIN=2]="CASBIN"}(jb||(jb={})),function(e){e[e.MODEL=1]="MODEL",e[e.CASBIN=2]="CASBIN"}(Vb||(Vb={}));var Kb=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Nb(e,t)}(o,e);var t,r,n,i=kb(o);function o(){var e;return Ob(this,o),(e=i.apply(this,arguments)).hasWatchSelectionChange=!1,e.__generateEntity=function(e){return Object(tr.castArray)(e).map((function(e){var t={__sceneId:bp.SCENE_ID,entityId:e.id,entityType:LA};return e.type===Vb.CASBIN&&(t.entityId=Yb().state.casbinModelIdMap[e.id]),t}))},e.onSelectedChanged=function(){$t.emit(zt.SELECTION_SERVICE_MODEL_CHANGE,e.getSelected())},e}return t=o,(r=[{key:"getSelected",value:function(){var e=Hb().state.state.selectedData,t=YC().viewParamModel.state.state.allSubModels;if(e.length){var r=e[0].$model;if(r&&r instanceof jt&&r.isAppendHardware)return{data:[r.hardwareData],type:jb.CASBIN};var n=Object(tr.map)(e,"id"),i=t.filter((function(e){return n.includes(e.id)}));if(n.length)return{data:i,type:jb.MODEL}}return{data:[],type:jb.NULL}}},{key:"select",value:function(e){var t=this.__generateEntity(e);Hb().select(t)}},{key:"unSelect",value:function(e){if(e){var t=this.__generateEntity(e);Hb().unSelect(t)}else Hb().select([])}},{key:"startWatchSelectedChangedEvent",value:function(){this.hasWatchSelectionChange||(this.hasWatchSelectionChange=!0,Hb().on(VC.EVENT_SELECT_CHANGED,this.onSelectedChanged))}},{key:"on",value:function(e){this.startWatchSelectedChangedEvent(),$t.on(zt.SELECTION_SERVICE_MODEL_CHANGE,e)}},{key:"off",value:function(e){$t.off(zt.SELECTION_SERVICE_MODEL_CHANGE,e)}},{key:"once",value:function(e){this.startWatchSelectedChangedEvent(),$t.once(zt.SELECTION_SERVICE_MODEL_CHANGE,e)}},{key:"__onDestroy",value:function(){Hb().off(VC.EVENT_SELECT_CHANGED,this.onSelectedChanged)}}])&&Lb(t.prototype,r),n&&Lb(t,n),o}(Fm);function qb(e){return(qb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Jb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Wb(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function zb(e,t){return(zb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Xb(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=$b(e);if(t){var i=$b(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Zb(this,r)}}function Zb(e,t){return!t||"object"!==qb(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function $b(e){return($b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var e_=function(){return YC().select},t_=function(){return am().designModeContext},r_=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&zb(e,t)}(o,e);var t,r,n,i=Xb(o);function o(){var e;return Jb(this,o),(e=i.apply(this,arguments)).hasWatchSelectionChange=!1,e.plankFaceClickEvent={on:function(e){$t.on(zt.PLANK_FACE_CLICK,e)},once:function(e){$t.once(zt.PLANK_FACE_CLICK,e)},off:function(e){$t.off(zt.PLANK_FACE_CLICK,e)}},e.plankFaceHoverEvent={on:function(e){$t.on(zt.PLANK_FACE_HOVER,e)},once:function(e){$t.once(zt.PLANK_FACE_HOVER,e)},off:function(e){$t.off(zt.PLANK_FACE_HOVER,e)}},e.onSelectedChanged=function(){$t.emit(zt.SELECTION_SERVICE_V2_MODEL_CHANGE,e.getSelected())},e}return t=o,(r=[{key:"getSelected",value:function(){return e_().state.state.selectedDataV2.map(this._genElement).filter((function(e){return!!e}))}},{key:"select",value:function(e){var t=Object(tr.castArray)(e).map(this._genEntityFromElement);e_().select(t),t_().setCurSelectEntity(t)}},{key:"unSelect",value:function(e){if(e){var t=Object(tr.castArray)(e).map(this._genEntityFromElement);e_().unSelect(t);var r=t_().getCurSelectEntity();r&&(Array.isArray(r)?t_().setCurSelectEntity(Object(tr.difference)(r,t)):t.includes(r)&&t_().setCurSelectEntity(void 0))}else e_().select(),t_().setCurSelectEntity(void 0)}},{key:"on",value:function(e){this.startWatchSelectedChangedEvent(),$t.on(zt.SELECTION_SERVICE_V2_MODEL_CHANGE,e)}},{key:"off",value:function(e){$t.off(zt.SELECTION_SERVICE_V2_MODEL_CHANGE,e)}},{key:"once",value:function(e){this.startWatchSelectedChangedEvent(),$t.once(zt.SELECTION_SERVICE_V2_MODEL_CHANGE,e)}},{key:"startWatchSelectedChangedEvent",value:function(){this.hasWatchSelectionChange||(this.hasWatchSelectionChange=!0,e_().on(VC.EVENT_SELECT_CHANGED_V2,this.onSelectedChanged))}},{key:"_genEntityFromElement",value:function(e){return{entityId:e.id,entityType:fm[e.type]}}},{key:"_genElement",value:function(e){var t;if(e instanceof jt?t=e.isAppendHardware?ze.HARDWARE:ze.PARAM_MODEL:e instanceof Xt?t=ze.PARAM_MODEL_ASSEMBLY:e instanceof vn?t=ze.HARDWARE_GROOVE:e instanceof Vr&&(t=e.type===l.HOLE?ze.HOLE:ze.GROOVE),t)return{id:e.id,type:t}}},{key:"__onDestroy",value:function(){e_().off(VC.EVENT_SELECT_CHANGED,this.onSelectedChanged)}}])&&Wb(t.prototype,r),n&&Wb(t,n),o}(Fm);function n_(e){return(n_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i_(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function o_(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){i_(o,n,i,A,a,"next",e)}function a(e){i_(o,n,i,A,a,"throw",e)}A(void 0)}))}}function A_(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a_(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function s_(e,t){return(s_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u_(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=l_(e);if(t){var i=l_(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return c_(this,r)}}function c_(e,t){return!t||"object"!==n_(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function l_(e){return(l_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var g_=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s_(e,t)}(u,e);var t,r,n,i,o,A,a=u_(u);function u(){return A_(this,u),a.apply(this,arguments)}return t=u,(r=[{key:"viewSelected",value:(A=o_(s.a.mark((function e(){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",YC().viewParamModel.viewSelectedParamModel());case 1:case"end":return e.stop()}}),e)}))),function(){return A.apply(this,arguments)})},{key:"viewModelById",value:(o=o_(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",YC().viewParamModel.viewParamModelById(t));case 1:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})},{key:"resetPerspective",value:function(){var e=am().getStateManager().scene3D;e.updateEnableCameraAnimation(!0),e.reset()}},{key:"toggleModelBorder",value:function(e){YC().scene.$actionToggleRenderBorder.dispatch(e)}},{key:"toggleModelTransparent",value:function(e){YC().scene.$actionToggleRenderTranslucent.dispatch(e)}},{key:"setting",value:function(e){YC().fittingDesign.senseSetting.$actionSenseSetting.dispatch(e)}},{key:"refreshModel",value:(i=o_(s.a.mark((function e(){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",YC().viewParamModel.refreshCustomModelData());case 1:case"end":return e.stop()}}),e)}))),function(){return i.apply(this,arguments)})}])&&a_(t.prototype,r),n&&a_(t,n),u}(Fm),f_=r(244);function h_(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function p_(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?h_(Object(r),!0).forEach((function(t){d_(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):h_(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function d_(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function I_(e){return function(e){if(Array.isArray(e))return y_(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return y_(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return y_(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y_(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function C_(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var E_=function(){function e(t,r){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._isRealPath=!1,this._changeMap={},this.id=Br()(),this.modelID=t,this.paths=r,r.forEach((function(e){e.plankArea=n}))}var t,r,n;return t=e,(r=[{key:"getRealPaths",value:function(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this._isRealPath)throw new Error("There is no need to getRealPaths repeatedly.");var n=r.force,i=void 0!==n&&n,o=r.resetCenter,A=void 0===o||o;if(!i&&A&&this._realPathsResetCenterCache)return this._realPathsResetCenterCache;if(!i&&!A&&this._realPathsCache)return this._realPathsCache;if(!this.paths.length)return new e(this.modelID,[]);var a=this.getFace2ds();if(this.paths.length>1){var s=[];u.FacesBoolean.faces2DBoolean(a.slice(0,1),a.slice(1),u.FacesBoolean.FaceBooleanType.subtract,s),a=s}var c=0===a.length?a[0]:{loops:(t=[]).concat.apply(t,I_(a.map((function(e){return e.loops}))))};if(A){Object(f_.calculateFaceBBox)(c);var l=c.box.center,g=u.Matrix3.makeTranslation(-l.x,-l.y);a.forEach((function(e){e.loops.forEach((function(e){e.forEach((function(e){e.transform(g)}))}))}))}var f=a.map((function(e){return e.loops[0]})).map((function(e){return v_(We.OUTER,e)})),h=a.reduce((function(e,t){return e.push.apply(e,I_(t.loops.slice(1))),e}),[]).map((function(e){return v_(We.INNER,e,!0)})),p=new e(this.modelID,[].concat(I_(f),I_(h)));return A?this._realPathsResetCenterCache=p:this._realPathsCache=p,p._isRealPath=!0,p}},{key:"getCenterPoint",value:function(){var e=B_(this.paths.find((function(e){return e.type===We.OUTER})));Object(f_.calculateFaceBBox)(e);var t=e.box.center;return{x:t.x,y:t.y}}},{key:"getFace2ds",value:function(){return this.paths.map(B_)}},{key:"_trackUpdateField",value:function(e,t,r){this._changeMap.update=this._changeMap.update||[];var n=this._changeMap.update,i=e.field;t===r||n.some((function(t){return t.field===i&&t.context.id===e.context.id}))||n.push(e)}},{key:"changeMap",get:function(){return this._changeMap},set:function(e){this._changeMap=e}}])&&C_(t.prototype,r),n&&C_(t,n),e}();function B_(e){var t=[];if(e.lines.forEach((function(e){var r=e.start;r.getType()!==E.NONE&&t.push(r.getCurveLineAndPoints().curveLine),t.push(e.getRealLine())})),e.offset){var r=(0,u.LoopCCW.isPolygonCCW2D)(t.map((function(e){return e.startPoint})))?e.offset:-e.offset;return{loops:u.Path2dOffset.offsetPath2d(t,r).resultPaths}}return{loops:[t]}}function v_(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=t.map((function(e){return new $r({type:E.NONE,position:e.startPoint})})),i=t.map((function(e){var t;return t=e instanceof u.LineSeg2d?{type:B.SEGMENT}:e instanceof u.Arc2d?m_(e):Q_(e),new Wr(t)})),o=u.LoopCCW.isPolygonCCW2D(n.map((function(e){return e.getPosition()})));r!==o&&(n=n.reverse(),i=(i=i.reverse().map((function(e){return"boolean"==typeof e.clockwise&&(e.clockwise=!e.clockwise),e}))).slice(1).concat(i[0]));var A=__(n.map((function(e){return e.getPosition()})));return n=n.slice(A).concat(n.slice(0,A)),i=i.slice(A).concat(i.slice(0,A)),new sn({type:e,points:n,lines:i,forceCCW:!1})}function m_(e){var t={};t.type=B.CIRCLE_ARC,t.radius=e.radius,t.clockwise=!e.isCCW;var r=e.center,n=e.startPoint,i=e.endPoint,o=new u.LineSeg2d(n,i),A=o.length/2,a=new u.Vector2d(o.getPoint(A)),s=new u.Vector2d(r).subtracted(a).normalized();return t.clockwise?t.minorArc=s.isSameDirection(o.rightNormal):t.minorArc=s.isSameDirection(o.leftNormal),t}function Q_(e){var t={};return t.type=B.ELLIPSE_ARC,t.majorRadius=e.majorRadius,t.minorRadius=e.minorRadius,t.clockwise=!e.isCCW,t.ellipseCenter=e.ccs.origin,t}function b_(e){var t=e.changeMap.update,r=e._isRealPath?e.getCenterPoint():null,n=e._isRealPath?u.Matrix3.makeTranslation(-r.x,-r.y):void 0;t&&t.length>0&&(t.forEach((function(e){var t=e.field,r=e.context;"hint"===t&&((r=r).getHint()?Wc(r,n):function(e,t){var r=Vc().getStateManager().fittingDesign,n=r.getPlankOutlineHintModels(),i=n.findIndex((function(r){return r.linkModel.id===e&&r.id===t}));if(i>-1){var o=Hc(n);o.splice(i,1),r.setPlankOutlineHintModels(o)}}(r.path.plankArea.modelID,r.id))})),e.changeMap=p_(p_({},e.changeMap),{},{update:[]}))}function __(e){if(!e.length)return 0;var t=e[0].y,r=e[0].x;e.slice(1).forEach((function(e){t<e.y&&(t=e.y),r>e.x&&(r=e.x)}));var n,i,o=-r,A=-t;return e.forEach((function(t,r){var a=t.x,s=t.y,u=Math.pow(a+o,2)+Math.pow(s+A,2);void 0===n||u<n?(n=u,i=r):n===u&&e[i].x>t.x&&(i=r)})),i}function S_(e){return(S_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function w_(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function D_(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function R_(e,t){return(R_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function M_(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=P_(e);if(t){var i=P_(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return x_(this,r)}}function x_(e,t){return!t||"object"!==S_(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function P_(e){return(P_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var T_=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&R_(e,t)}(o,e);var t,r,n,i=M_(o);function o(){return w_(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"parseModelPlankPath",value:function(e){return t=e.modelID,r=e.data,n=[],r.path&&n.push(un(We.OUTER,r.path)),n.push.apply(n,I_(r.holes.map((function(e){return un(We.INNER,e)})))),new E_(t,n);var t,r,n}},{key:"syncModelPlankPath",value:function(e){b_(e)}}])&&D_(t.prototype,r),n&&D_(t,n),o}(Fm);function F_(e){return(F_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function O_(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function L_(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function N_(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function k_(e,t){return(k_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function G_(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=j_(e);if(t){var i=j_(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return U_(this,r)}}function U_(e,t){return!t||"object"!==F_(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function j_(e){return(j_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var V_=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&k_(e,t)}(a,e);var t,r,n,i,o,A=G_(a);function a(){return L_(this,a),A.apply(this,arguments)}return t=a,(r=[{key:"stable",value:(i=s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",YC().viewParamModel.validateModelStable(t.modelId));case 1:case"end":return e.stop()}}),e)})),o=function(){var e=this,t=arguments;return new Promise((function(r,n){var o=i.apply(e,t);function A(e){O_(o,r,n,A,a,"next",e)}function a(e){O_(o,r,n,A,a,"throw",e)}A(void 0)}))},function(e){return o.apply(this,arguments)})}])&&N_(t.prototype,r),n&&N_(t,n),a}(Fm);function H_(e){return(H_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Y_(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function K_(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function q_(e,t){return(q_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function J_(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=z_(e);if(t){var i=z_(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return W_(this,r)}}function W_(e,t){return!t||"object"!==H_(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function z_(e){return(z_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var X_=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&q_(e,t)}(o,e);var t,r,n,i=J_(o);function o(){return Y_(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"setDesignMode",value:function(e){var t=e.mode,r=e.customModeCb;am().designModeContext.setDesignMode(t,r)}},{key:"registerMultiSelectShortcut",value:function(e){am().designModeContext.registerMultiSelectShortcut(e)}}])&&K_(t.prototype,r),n&&K_(t,n),o}(Fm),Z_=r(426),$_=r.n(Z_),eS=new qi.I18NManager,tS="custom_order_split",rS={"custom.pad.resetPerspective":"重置视角","custom.pad.confirm":"确定","custom.pad.cannotAdd":"无法适配该模型","custom.pad.chooseBasicModule":"请选择基础模块","custom.pad.loadSeriesFailed":"加载系列失败","custom.pad.invalidSeries":"系列信息无效","custom.pad.invalidURL":"页面走丢了","custom.pad.loadDesignFailed":"产品加载失败","custom.pad.invalidDesign":"产品信息无效","custom.pad.loadFailed":"数据加载失败","custom.pad.invalidData":"数据无效","custom.pad.saveFailed":"产品保存失败","custom.pad.previewFailed":"生成预览图失败","custom.pad.save":"保存","custom.pad.saveAs":"另存为","custom.pad.saveTitle":"产品保存","custom.pad.saveAsTitle":"产品另存为","custom.pad.saveName":"产品名称","custom.pad.saveNameHolder":"请输入产品名称","custom.pad.saveRequired":"该项为必填项","custom.pad.savePos":"存储位置","custom.pad.savePersonal":"个人库","custom.pad.saveEnterprise":"企业库","custom.pad.cancel":"取消","custom.pad.askSave":"是否保存?","custom.pad.askSaveDesc":"是否要保存当前产品方案?","custom.pad.notSave":"不保存","custom.pad.getAuthFailed":"获取用户账号类型失败","custom.pad.uploadCoverFailed":"上传图片封面失败","custom.pad.hideDoor":"隐藏柜门","custom.pad.showDoor":"显示柜门","custom.pad.showDoorTip":"柜门已隐藏, 点击此处可显示柜门","custom.pad.shadingMode":"材质","custom.pad.outlineShadingMode":"材质 + 线框","custom.pad.frameStyle":"柜体样式","custom.pad.replaceFail":"修改样式失败","custom.pad.productNameExist":"产品名称已存在","custom.pad.saveSuccess":"产品保存成功","custom.pad.defaultSaveName":"未命名","custom.pad.showRuler":"显示尺寸","custom.pad.hideRuler":"隐藏尺寸"};function nS(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function iS(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){nS(o,n,i,A,a,"next",e)}function a(e){nS(o,n,i,A,a,"throw",e)}A(void 0)}))}}var oS=Object(tr.once)((function(){return!!Object(zc.parseServQueryParams)()}));function AS(){return aS.apply(this,arguments)}function aS(){return(aS=iS(s.a.mark((function e(){var t,r,n=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},r=zc.servkit.createTerminal({id:t.clientId||"custom-order-split",type:zc.EServTerminal.SLAVE,server:{service:{services:[]},serviceRefer:/.*/},session:{checkSession:!0,channel:{type:zc.EServChannel.WINDOW,config:{slave:{getWindow:function(e){return{target:window.parent,window:window}}}}}}}),e.next=4,r.openSession({timeout:t.timeout||3e4});case 4:return e.abrupt("return",r);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var sS=r(533),uS=r.n(sS),cS=r(1134),lS=r.n(cS);function gS(e){return(gS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fS(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hS(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function pS(e,t){return(pS=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function dS(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=yS(e);if(t){var i=yS(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return IS(this,r)}}function IS(e,t){return!t||"object"!==gS(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function yS(e){return(yS=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var CS=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&pS(e,t)}(o,e);var t,r,n,i=dS(o);function o(){return fS(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"render",value:function(){var e=this.props,t=e.tip,r=e.noImg,n=e.imgSrc,i=e.className;return zi.a.createElement("div",{className:uS()(lS.a.empty,i)},!r&&zi.a.createElement("img",{src:n||"//qhstaticssl.kujiale.com/newt/227/image/png/1549962437921/D1F6B2D9AF21335BEEF19C45580DE165.png"}),t&&zi.a.createElement("p",null,t))}}])&&hS(t.prototype,r),n&&hS(t,n),o}(zi.a.PureComponent);function ES(e){return(ES="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function BS(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vS(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function mS(e,t){return(mS=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function QS(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=_S(e);if(t){var i=_S(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return bS(this,r)}}function bS(e,t){return!t||"object"!==ES(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _S(e){return(_S=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var SS=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&mS(e,t)}(o,e);var t,r,n,i=QS(o);function o(){return BS(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"render",value:function(){var e=this.props;return zi.a.createElement(Ji.Scene3D,e)}}])&&vS(t.prototype,r),n&&vS(t,n),o}(Wi.PureComponent),wS=r(1135),DS=r.n(wS);function RS(e){return(RS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function MS(){return(MS=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function xS(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function PS(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function TS(e,t){return(TS=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function FS(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=LS(e);if(t){var i=LS(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return OS(this,r)}}function OS(e,t){return!t||"object"!==RS(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function LS(e){return(LS=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Wi.PureComponent;var NS=r(91);function kS(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,i=!1,o=void 0;try{for(var A,a=e[Symbol.iterator]();!(n=(A=a.next()).done)&&(r.push(A.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(i)throw o}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return GS(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return GS(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function GS(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}window.React=zi.a;var US=document.getElementById("root");function jS(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function VS(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function HS(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){VS(o,n,i,A,a,"next",e)}function a(e){VS(o,n,i,A,a,"throw",e)}A(void 0)}))}}function YS(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var KS=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.serviceMap=new Map,this.initLange(Ue.ZH_CN,{zh_CN:rS}),function(e){Kh=e}(this)}var t,r,n,i,o;return t=e,(r=[{key:"startOnApiCalledEvent",value:function(){var e=this,t={on:function(e){return $t.on(zt.API_CALLED,e),function(){return $t.off(zt.API_CALLED,e)}},once:function(e){return $t.once(zt.API_CALLED,e),function(){return $t.off(zt.API_CALLED,e)}},emit:function(e){$t.emit(zt.API_CALLED,e)}};je.setEvent(t),t.on((function(t){var r=t.args,n=t.errMsg,i=t.status,o=t.apiName,A=t.duration,a=t.serviceName,s=e.getCustomMiniAppService(Lf);if(s){var u="".concat(a,".").concat(o);if(s.logApiCalledInfo({status:i,apiType:"CUSTOM_SPLIT_API",apiName:u,duration:A}),!i){var c=n instanceof Error?n.message:n&&n.toString?n.toString():"unknown",l="\n called ".concat(u," api fail:\n arguments is ").concat(JSON.stringify(r),",\n errMsg is ").concat(c,"\n ");s.logApiError(new Error(l),"miniAppApiCalledError")}}}))}},{key:"isInCustomMiniAppMode",value:function(){return oS()}},{key:"createDebugUtils",value:function(){var e=this.serviceMap,t={enableDebug:function(){window.__customsdk__.services=e}};window.__customsdk__=t}},{key:"start",value:(o=HS(s.a.mark((function e(t){var r,n,i=this;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.createDebugUtils(),!this.isInCustomMiniAppMode()){e.next=8;break}if(zc.sappSDK.isStarted){e.next=5;break}return e.next=5,zc.sappSDK.setConfig({useTerminalId:null==t?void 0:t.clientId,onClose:function(){var e=HS(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i.stop();case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}).start();case 5:this.sappSDK=zc.sappSDK,e.next=13;break;case 8:return e.next=10,gd(30);case 10:return e.next=12,AS(t);case 12:this.sappSDK=e.sent;case 13:return this.startOnApiCalledEvent(),e.next=16,Promise.resolve([Ji.App,EQ]).then((function(e){var t=kS(e,2),r=t[0],n=t[1];(new r).registerPlugin(n).start({fpsDetectorEnabled:!0}),document.body.removeChild(US)})).catch((function(e){Object(NS.unmountComponentAtNode)(US),Object(NS.render)(zi.a.createElement(CS,null),US),console.error("micros/pad",e)}));case 16:return(r=this.getCustomMiniAppService(Pf))?(Rc().setMiniAppHttpProxyClientService(r),tp(Rc())):tp(Dc()),(Jh=new ep.AttachedService).config.setRequestClient(zh),Wh=new ep.ParamModelDataService({paramModelConstructor:jt,requestClient:zh}),new ep.ParamModelAssemblyDataService({paramModelAssemblyConstructor:Xt,requestClient:zh}),n=this.getService(g_),e.prev=20,e.next=23,n.viewSelected();case 23:e.next=28;break;case 25:e.prev=25,e.t0=e.catch(20),Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&console.error(e.t0);case 28:case"end":return e.stop()}}),e,this,[[20,25]])}))),function(e){return o.apply(this,arguments)})},{key:"initLange",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ue.ZH_CN,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};window.__PUB_LANG__=Object(tr.extend)(window.__PUB_LANG__,{kaf_core:{lang:{}},custom_model:{lange:{}}}),$_.a.init({lang:e,debug:!1,initImmediate:!0,translatorType:Z_.ENUM.TranslatorType.I18next,packages:[tS],resource:jS({},tS,t)}),eS.init({namespace:tS,resources:tS})}},{key:"stop",value:(i=HS(s.a.mark((function e(){var t;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=this.getCustomMiniAppService(Tf))){e.next=4;break}return e.next=4,t.lockModelBySplit();case 4:this.serviceMap.forEach((function(e){Object(tr.isFunction)(e.__onDestroy)&&e.__onDestroy()})),this.serviceMap=new Map;case 6:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"getService",value:function(e){if(Fm.isPrototypeOf(e)){var t=this.serviceMap,r=t.get(e);return r||(r=new e,t.set(e,r)),r}throw new Error("service not found!")}},{key:"getCustomMiniAppService",value:function(e){var t=this.sappSDK;if(!this.sappSDK)throw new Error("app not started!");return t instanceof zc.SappSDK?t.getService(e):t.client.getService(e)}},{key:"getCustomMiniAppServiceUnSafe",value:function(e){return this.getCustomMiniAppService(e)}}])&&YS(t.prototype,r),n&&YS(t,n),e}()},function(e,t,r){"use strict";r.r(t),r.d(t,"changeLanguage",(function(){return X})),r.d(t,"cloneInstance",(function(){return Z})),r.d(t,"createInstance",(function(){return $})),r.d(t,"dir",(function(){return ee})),r.d(t,"exists",(function(){return te})),r.d(t,"getFixedT",(function(){return re})),r.d(t,"init",(function(){return ne})),r.d(t,"loadLanguages",(function(){return ie})),r.d(t,"loadNamespaces",(function(){return oe})),r.d(t,"loadResources",(function(){return Ae})),r.d(t,"off",(function(){return ae})),r.d(t,"on",(function(){return se})),r.d(t,"setDefaultNamespace",(function(){return ue})),r.d(t,"t",(function(){return ce})),r.d(t,"use",(function(){return le}));var n=r(191),i=r.n(n),o=r(85),A=r.n(o),a=r(73),s=r.n(a),u=r(74),c=r.n(u),l=r(212),g=r.n(l),f=r(247),h=r.n(f),p=r(248),d=r.n(p),I=r(101),y=r.n(I),C=r(1126),E=r.n(C),B={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){var r;console&&console[e]&&(r=console)[e].apply(r,E()(t))}},v=new(function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};s()(this,e),this.init(t,r)}return c()(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||B,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,r,n){return n&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(r).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,A()({},{prefix:"".concat(this.prefix,":").concat(t,":")},this.options))}}]),e}()),m=function(){function e(){s()(this,e),this.observers={}}return c()(e,[{key:"on",value:function(e,t){var r=this;return e.split(" ").forEach((function(e){r.observers[e]=r.observers[e]||[],r.observers[e].push(t)})),this}},{key:"off",value:function(e,t){var r=this;this.observers[e]&&this.observers[e].forEach((function(){if(t){var n=r.observers[e].indexOf(t);n>-1&&r.observers[e].splice(n,1)}else delete r.observers[e]}))}},{key:"emit",value:function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];if(this.observers[e]){var i=[].concat(this.observers[e]);i.forEach((function(e){e.apply(void 0,r)}))}if(this.observers["*"]){var o=[].concat(this.observers["*"]);o.forEach((function(t){t.apply(t,[e].concat(r))}))}}}]),e}();function Q(){var e,t,r=new Promise((function(r,n){e=r,t=n}));return r.resolve=e,r.reject=t,r}function b(e){return null==e?"":""+e}function _(e,t,r){e.forEach((function(e){t[e]&&(r[e]=t[e])}))}function S(e,t,r){function n(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function i(){return!e||"string"==typeof e}for(var o="string"!=typeof t?[].concat(t):t.split(".");o.length>1;){if(i())return{};var A=n(o.shift());!e[A]&&r&&(e[A]=new r),e=e[A]}return i()?{}:{obj:e,k:n(o.shift())}}function w(e,t,r){var n=S(e,t,Object);n.obj[n.k]=r}function D(e,t){var r=S(e,t),n=r.obj,i=r.k;if(n)return n[i]}function R(e,t,r){for(var n in t)n in e?"string"==typeof e[n]||e[n]instanceof String||"string"==typeof t[n]||t[n]instanceof String?r&&(e[n]=t[n]):R(e[n],t[n],r):e[n]=t[n];return e}function M(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var x={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function P(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return x[e]})):e}var T=function(e){function t(e){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return s()(this,t),r=g()(this,h()(t).call(this)),m.call(y()(y()(r))),r.data=e||{},r.options=n,void 0===r.options.keySeparator&&(r.options.keySeparator="."),r}return d()(t,e),c()(t,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,o=[e,t];return r&&"string"!=typeof r&&(o=o.concat(r)),r&&"string"==typeof r&&(o=o.concat(i?r.split(i):r)),e.indexOf(".")>-1&&(o=e.split(".")),D(this.data,o)}},{key:"addResource",value:function(e,t,r,n){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},o=this.options.keySeparator;void 0===o&&(o=".");var A=[e,t];r&&(A=A.concat(o?r.split(o):r)),e.indexOf(".")>-1&&(n=t,t=(A=e.split("."))[1]),this.addNamespaces(t),w(this.data,A,n),i.silent||this.emit("added",e,t,r,n)}},{key:"addResources",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var i in r)"string"!=typeof r[i]&&"[object Array]"!==Object.prototype.toString.apply(r[i])||this.addResource(e,t,i,r[i],{silent:!0});n.silent||this.emit("added",e,t,r)}},{key:"addResourceBundle",value:function(e,t,r,n,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},a=[e,t];e.indexOf(".")>-1&&(n=r,r=t,t=(a=e.split("."))[1]),this.addNamespaces(t);var s=D(this.data,a)||{};n?R(s,r,i):s=A()({},s,r),w(this.data,a,s),o.silent||this.emit("added",e,t,r)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?A()({},{},this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"toJSON",value:function(){return this.data}}]),t}(m),F={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,r,n,i){var o=this;return e.forEach((function(e){o.processors[e]&&(t=o.processors[e].process(t,r,n,i))})),t}},O=function(e){function t(e){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return s()(this,t),r=g()(this,h()(t).call(this)),m.call(y()(y()(r))),_(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat"],e,y()(y()(r))),r.options=n,void 0===r.options.keySeparator&&(r.options.keySeparator="."),r.logger=v.create("translator"),r}return d()(t,e),c()(t,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},r=this.resolve(e,t);return r&&void 0!==r.res}},{key:"extractFromKey",value:function(e,t){var r=t.nsSeparator||this.options.nsSeparator;void 0===r&&(r=":");var n=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,i=t.ns||this.options.defaultNS;if(r&&e.indexOf(r)>-1){var o=e.split(r);(r!==n||r===n&&this.options.ns.indexOf(o[0])>-1)&&(i=o.shift()),e=o.join(n)}return"string"==typeof i&&(i=[i]),{key:e,namespaces:i}}},{key:"translate",value:function(e,t){var r=this;if("object"!==i()(t)&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var n=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=this.extractFromKey(e[e.length-1],t),a=o.key,s=o.namespaces,u=s[s.length-1],c=t.lng||this.language,l=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c&&"cimode"===c.toLowerCase()){if(l){var g=t.nsSeparator||this.options.nsSeparator;return u+g+a}return a}var f=this.resolve(e,t),h=f&&f.res,p=f&&f.usedKey||a,d=f&&f.exactUsedKey||a,I=Object.prototype.toString.apply(h),y=["[object Number]","[object Function]","[object RegExp]"],C=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,E=!this.i18nFormat||this.i18nFormat.handleAsObject,B="string"!=typeof h&&"boolean"!=typeof h&&"number"!=typeof h;if(E&&h&&B&&y.indexOf(I)<0&&("string"!=typeof C||"[object Array]"!==I)){if(!t.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(p,h,t):"key '".concat(a," (").concat(this.language,")' returned an object instead of string.");if(n){var v="[object Array]"===I,m=v?[]:{},Q=v?d:p;for(var b in h)if(Object.prototype.hasOwnProperty.call(h,b)){var _="".concat(Q).concat(n).concat(b);m[b]=this.translate(_,A()({},t,{joinArrays:!1,ns:s})),m[b]===_&&(m[b]=h[b])}h=m}}else if(E&&"string"==typeof C&&"[object Array]"===I)(h=h.join(C))&&(h=this.extendTranslation(h,e,t));else{var S=!1,w=!1;if(!this.isValidLookup(h)&&void 0!==t.defaultValue){if(S=!0,void 0!==t.count){var D=this.pluralResolver.getSuffix(c,t.count);h=t["defaultValue".concat(D)]}h||(h=t.defaultValue)}this.isValidLookup(h)||(w=!0,h=a);var R=t.defaultValue&&t.defaultValue!==h&&this.options.updateMissing;if(w||S||R){this.logger.log(R?"updateKey":"missingKey",c,u,a,R?t.defaultValue:h);var M=[],x=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&x&&x[0])for(var P=0;P<x.length;P++)M.push(x[P]);else"all"===this.options.saveMissingTo?M=this.languageUtils.toResolveHierarchy(t.lng||this.language):M.push(t.lng||this.language);var T=function(e,n){r.options.missingKeyHandler?r.options.missingKeyHandler(e,u,n,R?t.defaultValue:h,R,t):r.backendConnector&&r.backendConnector.saveMissing&&r.backendConnector.saveMissing(e,u,n,R?t.defaultValue:h,R,t),r.emit("missingKey",e,u,n,h)};if(this.options.saveMissing){var F=void 0!==t.count&&"string"!=typeof t.count;this.options.saveMissingPlurals&&F?M.forEach((function(e){r.pluralResolver.getPluralFormsOfKey(e,a).forEach((function(t){return T([e],t)}))})):T(M,a)}}h=this.extendTranslation(h,e,t,f),w&&h===a&&this.options.appendNamespaceToMissingKey&&(h="".concat(u,":").concat(a)),w&&this.options.parseMissingKeyHandler&&(h=this.options.parseMissingKeyHandler(h))}return h}},{key:"extendTranslation",value:function(e,t,r,n){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,r,n.usedLng,n.usedNS,n.usedKey,{resolved:n});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init(A()({},r,{interpolation:A()({},this.options.interpolation,r.interpolation)}));var o=r.replace&&"string"!=typeof r.replace?r.replace:r;this.options.interpolation.defaultVariables&&(o=A()({},this.options.interpolation.defaultVariables,o)),e=this.interpolator.interpolate(e,o,r.lng||this.language,r),!1!==r.nest&&(e=this.interpolator.nest(e,(function(){return i.translate.apply(i,arguments)}),r)),r.interpolation&&this.interpolator.reset()}var a=r.postProcess||this.options.postProcess,s="string"==typeof a?[a]:a;return null!=e&&s&&s.length&&!1!==r.applyPostProcessor&&(e=F.handle(s,e,t,r,this)),e}},{key:"resolve",value:function(e){var t,r,n,i,o,A=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((function(e){if(!A.isValidLookup(t)){var s=A.extractFromKey(e,a),u=s.key;r=u;var c=s.namespaces;A.options.fallbackNS&&(c=c.concat(A.options.fallbackNS));var l=void 0!==a.count&&"string"!=typeof a.count,g=void 0!==a.context&&"string"==typeof a.context&&""!==a.context,f=a.lngs?a.lngs:A.languageUtils.toResolveHierarchy(a.lng||A.language,a.fallbackLng);c.forEach((function(e){A.isValidLookup(t)||(o=e,f.forEach((function(r){if(!A.isValidLookup(t)){i=r;var o,s,c=u,f=[c];if(A.i18nFormat&&A.i18nFormat.addLookupKeys)A.i18nFormat.addLookupKeys(f,u,r,e,a);else l&&(o=A.pluralResolver.getSuffix(r,a.count)),l&&g&&f.push(c+o),g&&f.push(c+="".concat(A.options.contextSeparator).concat(a.context)),l&&f.push(c+=o);for(;s=f.pop();)A.isValidLookup(t)||(n=s,t=A.getResource(r,e,s,a))}})))}))}})),{res:t,usedKey:r,exactUsedKey:n,usedLng:i,usedNS:o}}},{key:"isValidLookup",value:function(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,r,n):this.resourceStore.getResource(e,t,r,n)}}]),t}(m);function L(e){return e.charAt(0).toUpperCase()+e.slice(1)}var N=function(){function e(t){s()(this,e),this.options=t,this.whitelist=this.options.whitelist||!1,this.logger=v.create("languageUtils")}return c()(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),this.formatLanguageCode(t.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],r=e.split("-");return this.options.lowerCaseLng?r=r.map((function(e){return e.toLowerCase()})):2===r.length?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=L(r[1].toLowerCase()))):3===r.length&&(r[0]=r[0].toLowerCase(),2===r[1].length&&(r[1]=r[1].toUpperCase()),"sgn"!==r[0]&&2===r[2].length&&(r[2]=r[2].toUpperCase()),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=L(r[1].toLowerCase())),t.indexOf(r[2].toLowerCase())>-1&&(r[2]=L(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isWhitelisted",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitWhitelist)&&(e=this.getLanguagePartFromCode(e)),!this.whitelist||!this.whitelist.length||this.whitelist.indexOf(e)>-1}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var r=e[t];return r||(r=e[this.getScriptPartFromCode(t)]),r||(r=e[this.formatLanguageCode(t)]),r||(r=e.default),r||[]}},{key:"toResolveHierarchy",value:function(e,t){var r=this,n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),i=[],o=function(e){e&&(r.isWhitelisted(e)?i.push(e):r.logger.warn("rejecting non-whitelisted language code: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):"string"==typeof e&&o(this.formatLanguageCode(e)),n.forEach((function(e){i.indexOf(e)<0&&o(r.formatLanguageCode(e))})),i}}]),e}(),k=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","id","ja","jbo","ka","kk","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he"],nr:[1,2,20,21],fc:22}],G={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0===e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0===e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0===e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1===e?0:2===e?1:(e<0||e>10)&&e%10==0?2:3)}};function U(){var e={};return k.forEach((function(t){t.lngs.forEach((function(r){e[r]={numbers:t.nr,plurals:G[t.fc]}}))})),e}var j=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};s()(this,e),this.languageUtils=t,this.options=r,this.logger=v.create("pluralResolver"),this.rules=U()}return c()(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=this.getRule(e);return t&&t.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){var r=this,n=[],i=this.getRule(e);return i?(i.numbers.forEach((function(i){var o=r.getSuffix(e,i);n.push("".concat(t).concat(o))})),n):n}},{key:"getSuffix",value:function(e,t){var r=this,n=this.getRule(e);if(n){var i=n.noAbs?n.plurals(t):n.plurals(Math.abs(t)),o=n.numbers[i];this.options.simplifyPluralSuffix&&2===n.numbers.length&&1===n.numbers[0]&&(2===o?o="plural":1===o&&(o=""));var A=function(){return r.options.prepend&&o.toString()?r.options.prepend+o.toString():o.toString()};return"v1"===this.options.compatibilityJSON?1===o?"":"number"==typeof o?"_plural_".concat(o.toString()):A():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===n.numbers.length&&1===n.numbers[0]?A():this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString()}return this.logger.warn("no plural rule found for: ".concat(e)),""}}]),e}(),V=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};s()(this,e),this.logger=v.create("interpolator"),this.init(t,!0)}return c()(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;t&&(this.options=e,this.format=e.interpolation&&e.interpolation.format||function(e){return e}),e.interpolation||(e.interpolation={escapeValue:!0});var r=e.interpolation;this.escape=void 0!==r.escape?r.escape:P,this.escapeValue=void 0===r.escapeValue||r.escapeValue,this.useRawValueToEscape=void 0!==r.useRawValueToEscape&&r.useRawValueToEscape,this.prefix=r.prefix?M(r.prefix):r.prefixEscaped||"{{",this.suffix=r.suffix?M(r.suffix):r.suffixEscaped||"}}",this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||",",this.unescapePrefix=r.unescapeSuffix?"":r.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":r.unescapeSuffix||"",this.nestingPrefix=r.nestingPrefix?M(r.nestingPrefix):r.nestingPrefixEscaped||M("$t("),this.nestingSuffix=r.nestingSuffix?M(r.nestingSuffix):r.nestingSuffixEscaped||M(")"),this.maxReplaces=r.maxReplaces?r.maxReplaces:1e3,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var r="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(r,"g")}},{key:"interpolate",value:function(e,t,r,n){var i,o,A,a=this;function s(e){return e.replace(/\$/g,"$$$$")}var u=function(e){if(e.indexOf(a.formatSeparator)<0)return D(t,e);var n=e.split(a.formatSeparator),i=n.shift().trim(),o=n.join(a.formatSeparator).trim();return a.format(D(t,i),o,r)};this.resetRegExp();var c=n&&n.missingInterpolationHandler||this.options.missingInterpolationHandler;for(A=0;(i=this.regexpUnescape.exec(e))&&(o=u(i[1].trim()),e=e.replace(i[0],o),this.regexpUnescape.lastIndex=0,!(++A>=this.maxReplaces)););for(A=0;i=this.regexp.exec(e);){if(void 0===(o=u(i[1].trim())))if("function"==typeof c){var l=c(e,i,n);o="string"==typeof l?l:""}else this.logger.warn("missed to pass in variable ".concat(i[1]," for interpolating ").concat(e)),o="";else"string"==typeof o||this.useRawValueToEscape||(o=b(o));if(o=this.escapeValue?s(this.escape(o)):s(o),e=e.replace(i[0],o),this.regexp.lastIndex=0,++A>=this.maxReplaces)break}return e}},{key:"nest",value:function(e,t){var r,n,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=A()({},i);function a(e,t){if(e.indexOf(",")<0)return e;var r=e.split(",");e=r.shift();var n=r.join(",");n=(n=this.interpolate(n,o)).replace(/'/g,'"');try{o=JSON.parse(n),t&&(o=A()({},t,o))}catch(t){this.logger.error("failed parsing options string in nesting for key ".concat(e),t)}return e}for(o.applyPostProcessor=!1;r=this.nestingRegexp.exec(e);){if((n=t(a.call(this,r[1].trim(),o),o))&&r[0]===e&&"string"!=typeof n)return n;"string"!=typeof n&&(n=b(n)),n||(this.logger.warn("missed to resolve ".concat(r[1]," for nesting ").concat(e)),n=""),e=e.replace(r[0],n),this.regexp.lastIndex=0}return e}}]),e}(),H=r(730),Y=r.n(H);var K=function(e){function t(e,r,n){var i,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return s()(this,t),i=g()(this,h()(t).call(this)),m.call(y()(y()(i))),i.backend=e,i.store=r,i.languageUtils=n.languageUtils,i.options=o,i.logger=v.create("backendConnector"),i.state={},i.queue=[],i.backend&&i.backend.init&&i.backend.init(n,o.backend,o),i}return d()(t,e),c()(t,[{key:"queueLoad",value:function(e,t,r,n){var i=this,o=[],A=[],a=[],s=[];return e.forEach((function(e){var n=!0;t.forEach((function(t){var a="".concat(e,"|").concat(t);!r.reload&&i.store.hasResourceBundle(e,t)?i.state[a]=2:i.state[a]<0||(1===i.state[a]?A.indexOf(a)<0&&A.push(a):(i.state[a]=1,n=!1,A.indexOf(a)<0&&A.push(a),o.indexOf(a)<0&&o.push(a),s.indexOf(t)<0&&s.push(t)))})),n||a.push(e)})),(o.length||A.length)&&this.queue.push({pending:A,loaded:{},errors:[],callback:n}),{toLoad:o,pending:A,toLoadLanguages:a,toLoadNamespaces:s}}},{key:"loaded",value:function(e,t,r){var n=e.split("|"),i=Y()(n,2),o=i[0],A=i[1];t&&this.emit("failedLoading",o,A,t),r&&this.store.addResourceBundle(o,A,r),this.state[e]=t?-1:2;var a={};this.queue.forEach((function(r){var n,i,s,u,c,l;n=r.loaded,i=A,u=S(n,[o],Object),c=u.obj,l=u.k,c[l]=c[l]||[],s&&(c[l]=c[l].concat(i)),s||c[l].push(i),function(e,t){for(var r=e.indexOf(t);-1!==r;)e.splice(r,1),r=e.indexOf(t)}(r.pending,e),t&&r.errors.push(t),0!==r.pending.length||r.done||(Object.keys(r.loaded).forEach((function(e){a[e]||(a[e]=[]),r.loaded[e].length&&r.loaded[e].forEach((function(t){a[e].indexOf(t)<0&&a[e].push(t)}))})),r.done=!0,r.errors.length?r.callback(r.errors):r.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function(e,t,r){var n=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:250,A=arguments.length>5?arguments[5]:void 0;return e.length?this.backend[r](e,t,(function(a,s){a&&s&&i<5?setTimeout((function(){n.read.call(n,e,t,r,i+1,2*o,A)}),o):A(a,s)})):A(null,{})}},{key:"prepareLoading",value:function(e,t){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var o=this.queueLoad(e,t,n,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach((function(e){r.loadOne(e)}))}},{key:"load",value:function(e,t,r){this.prepareLoading(e,t,{},r)}},{key:"reload",value:function(e,t,r){this.prepareLoading(e,t,{reload:!0},r)}},{key:"loadOne",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e.split("|"),i=Y()(n,2),o=i[0],A=i[1];this.read(o,A,"read",null,null,(function(n,i){n&&t.logger.warn("".concat(r,"loading namespace ").concat(A," for language ").concat(o," failed"),n),!n&&i&&t.logger.log("".concat(r,"loaded namespace ").concat(A," for language ").concat(o),i),t.loaded(e,n,i)}))}},{key:"saveMissing",value:function(e,t,r,n,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.backend&&this.backend.create&&this.backend.create(e,t,r,n,null,A()({},o,{isUpdate:i})),e&&e[0]&&this.store.addResource(e[0],t,r,n)}}]),t}(m);function q(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:function(){},parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===i()(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===i()(e[2])||"object"===i()(e[3])){var r=e[3]||e[2];Object.keys(r).forEach((function(e){t[e]=r[e]}))}return t},interpolation:{escapeValue:!0,format:function(e,t,r){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",maxReplaces:1e3}}}function J(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.whitelist&&e.whitelist.indexOf("cimode")<0&&(e.whitelist=e.whitelist.concat(["cimode"])),e}function W(){}var z=new(function(e){function t(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(s()(this,t),e=g()(this,h()(t).call(this)),m.call(y()(y()(e))),e.options=J(r),e.services={},e.logger=v,e.modules={external:[]},n&&!e.isInitialized&&!r.isClone){if(!e.options.initImmediate)return e.init(r,n),g()(e,y()(y()(e)));setTimeout((function(){e.init(r,n)}),0)}return e}return d()(t,e),c()(t,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;function n(e){return e?"function"==typeof e?new e:e:null}if("function"==typeof t&&(r=t,t={}),this.options=A()({},q(),this.options,J(t)),this.format=this.options.interpolation.format,r||(r=W),!this.options.isClone){this.modules.logger?v.init(n(this.modules.logger),this.options):v.init(null,this.options);var i=new N(this.options);this.store=new T(this.options.resources,this.options);var o=this.services;o.logger=v,o.resourceStore=this.store,o.languageUtils=i,o.pluralResolver=new j(i,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),o.interpolator=new V(this.options),o.backendConnector=new K(n(this.modules.backend),o.resourceStore,o,this.options),o.backendConnector.on("*",(function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];e.emit.apply(e,[t].concat(n))})),this.modules.languageDetector&&(o.languageDetector=n(this.modules.languageDetector),o.languageDetector.init(o,this.options.detection,this.options)),this.modules.i18nFormat&&(o.i18nFormat=n(this.modules.i18nFormat),o.i18nFormat.init&&o.i18nFormat.init(this)),this.translator=new O(this.services,this.options),this.translator.on("*",(function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];e.emit.apply(e,[t].concat(n))})),this.modules.external.forEach((function(t){t.init&&t.init(e)}))}var a=["getResource","addResource","addResources","addResourceBundle","removeResourceBundle","hasResourceBundle","getResourceBundle","getDataByLanguage"];a.forEach((function(t){e[t]=function(){var r;return(r=e.store)[t].apply(r,arguments)}}));var s=Q(),u=function(){e.changeLanguage(e.options.lng,(function(t,n){e.isInitialized=!0,e.logger.log("initialized",e.options),e.emit("initialized",e.options),s.resolve(n),r(t,n)}))};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),s}},{key:"loadResources",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:W;if(!this.options.resources||this.options.partialBundledLanguages){if(this.language&&"cimode"===this.language.toLowerCase())return t();var r=[],n=function(t){t&&e.services.languageUtils.toResolveHierarchy(t).forEach((function(e){r.indexOf(e)<0&&r.push(e)}))};if(this.language)n(this.language);else{var i=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);i.forEach((function(e){return n(e)}))}this.options.preload&&this.options.preload.forEach((function(e){return n(e)})),this.services.backendConnector.load(r,this.options.ns,t)}else t(null)}},{key:"reloadResources",value:function(e,t,r){var n=Q();return e||(e=this.languages),t||(t=this.options.ns),r||(r=W),this.services.backendConnector.reload(e,t,(function(e){n.resolve(),r(e)})),n}},{key:"use",value:function(e){return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&F.addPostProcessor(e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"changeLanguage",value:function(e,t){var r=this,n=Q();this.emit("languageChanging",e);var i=function(e){e&&(r.language=e,r.languages=r.services.languageUtils.toResolveHierarchy(e),r.translator.language||r.translator.changeLanguage(e),r.services.languageDetector&&r.services.languageDetector.cacheUserLanguage(e)),r.loadResources((function(i){!function(e,i){r.translator.changeLanguage(i),i&&(r.emit("languageChanged",i),r.logger.log("languageChanged",i)),n.resolve((function(){return r.t.apply(r,arguments)})),t&&t(e,(function(){return r.t.apply(r,arguments)}))}(i,e)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(i):i(e):i(this.services.languageDetector.detect()),n}},{key:"getFixedT",value:function(e,t){var r=this,n=function e(t,n){var o=A()({},n);if("object"!==i()(n)){for(var a=arguments.length,s=new Array(a>2?a-2:0),u=2;u<a;u++)s[u-2]=arguments[u];o=r.options.overloadTranslationOptionHandler([t,n].concat(s))}return o.lng=o.lng||e.lng,o.lngs=o.lngs||e.lngs,o.ns=o.ns||e.ns,r.t(t,o)};return"string"==typeof e?n.lng=e:n.lngs=e,n.ns=t,n}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"loadNamespaces",value:function(e,t){var r=this,n=Q();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((function(e){r.options.ns.indexOf(e)<0&&r.options.ns.push(e)})),this.loadResources((function(e){n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var r=Q();"string"==typeof e&&(e=[e]);var n=this.options.preload||[],i=e.filter((function(e){return n.indexOf(e)<0}));return i.length?(this.options.preload=n.concat(i),this.loadResources((function(e){r.resolve(),t&&t(e)})),r):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){if(e||(e=this.languages&&this.languages.length>0?this.languages[0]:this.language),!e)return"rtl";return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"].indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>=0?"rtl":"ltr"}},{key:"createInstance",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return new t(e,r)}},{key:"cloneInstance",value:function(){var e=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:W,i=A()({},this.options,r,{isClone:!0}),o=new t(i),a=["store","services","language"];return a.forEach((function(t){o[t]=e[t]})),o.translator=new O(o.services,o.options),o.translator.on("*",(function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];o.emit.apply(o,[e].concat(r))})),o.init(i,n),o.translator.options=o.options,o}}]),t}(m)),X=(t.default=z,z.changeLanguage.bind(z)),Z=z.cloneInstance.bind(z),$=z.createInstance.bind(z),ee=z.dir.bind(z),te=z.exists.bind(z),re=z.getFixedT.bind(z),ne=z.init.bind(z),ie=z.loadLanguages.bind(z),oe=z.loadNamespaces.bind(z),Ae=z.loadResources.bind(z),ae=z.off.bind(z),se=z.on.bind(z),ue=z.setDefaultNamespace.bind(z),ce=z.t.bind(z),le=z.use.bind(z)}])}));
149
+ ***************************************************************************** */var kf,Gf=function(e,t){return(Gf=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function Uf(e,t){function r(){this.constructor=e}Gf(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function jf(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Nf(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A}function Vf(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),A=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)A.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return A}function Hf(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Vf(arguments[t]));return e}!function(e){e.CABINET="CABINET",e.WARDROBE="WARDROBE",e.DOOR_WINDOW="DW",e.CABINET_COPY="CABINET_COPY",e.WARDROBE_COPY="WARDROBE_COPY",e.DOOR_WINDOW_COPY="DW_COPY"}(kf||(kf={}));var Yf=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Uf(t,e),t.prototype.getParamModelDataByIds=function(e,t){return Object(zc.API_UNSUPPORT)()},t.prototype.getTopParamModels=function(e){return Object(zc.API_UNSUPPORT)()},jf([zc.anno.decl.api()],t.prototype,"getParamModelDataByIds",null),jf([zc.anno.decl.api()],t.prototype,"getTopParamModels",null),t=jf([zc.anno.decl({id:"com.custom.miniapp.inner.service.model.param.data",version:"1.0.0",ACL:_g.INNER})],t)}(zc.ServService);var Kf,qf,Jf,Wf=function(e,t,r){return e(r={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&r.path)}},r.exports),r.exports}((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.PopBufferMtl=void 0,t.toPopBufferMtl=function(e){var t=e.parameters,r=new A;r.setObjName(e.objName),e.brandGoodId&&r.setBrandGoodId(e.brandGoodId);if(t)for(var i=0,o=t.length;i<o;i++){var a=t[i];switch(a.name){case"diffuseTexture":r.setDiffuseTexture(JSON.parse(a.value).defaultUrl);break;case"diffuseColor":r.setDiffuseColor((new n.default).fromString(a.value));break;case"refractColor":r.setRefractColor((new n.default).fromString(a.value));break;case"transparentType":r.setTransparentType(Number(a.value))}}return r};var r,n=(r=at.a)&&r.__esModule?r:{default:r};function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(o=n.key,A=void 0,A=function(e,t){if("object"!==i(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(o,"string"),"symbol"===i(A)?A:String(A)),n)}var o,A}var A=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,r,n;return t=e,(r=[{key:"getObjName",value:function(){return this.objName}},{key:"setObjName",value:function(e){return this.objName=e,this}},{key:"getBrandGoodId",value:function(){return this.brandGoodId}},{key:"setBrandGoodId",value:function(e){return this.brandGoodId=e,this}},{key:"getDiffuseTexture",value:function(){return this.diffuseTexture}},{key:"setDiffuseTexture",value:function(e){return this.diffuseTexture=e,this}},{key:"getDiffuseColor",value:function(){return this.diffuseColor}},{key:"setDiffuseColor",value:function(e){return this.diffuseColor=e,this}},{key:"getRefractColor",value:function(){return this.refractColor}},{key:"setRefractColor",value:function(e){return this.refractColor=e,this}},{key:"getTransparenType",value:function(){return this.transparentType}},{key:"setTransparentType",value:function(e){return this.transparentType=e,this}}])&&o(t.prototype,r),n&&o(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.PopBufferMtl=A})),zf=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Uf(t,e),t.prototype.toJSON=function(){return{paramPackages:Hf(this.paramPackages.values()),hardwares:Hf(this.products.values()),paramModelAttacheds:Array.from(this.paramModelAttacheds).map((function(e){var t=Vf(e,2);t[0];var r=t[1],n=new Sf.a;return Object(tr.extend)(n,r),n.parsedHoles=[],n.parsedInnerFrames=[],n})),displayInfoMap:Hf(this.displayInfos.values()),wireFrames:Object(tr.fromPairs)(Hf(this.wireGeometrysMap.entries()).map((function(e){return[e[0],e[1].vertices]})))}},t.prototype.serialize=function(){return JSON.stringify(this.toJSON())},t.prototype.unSerialize=function(e){var t=this,r="string"==typeof e?JSON.parse(e):e,n=Object(tr.omit)(r,["wireFrames","paramModelAttacheds"]);r.paramModelAttacheds&&(n.paramModelAttacheds=r.paramModelAttacheds.map((function(e){var t=new Sf.a;if(Object(tr.extend)(t,e),t.meshModels=t.meshModels.map((function(e){var t=e.displayMaterial,r=new mf.a,n=new Qn.a;return Object(tr.extend)(n,e.geometry),r.texture=e.texture,r.displayMaterial=t?Wf.toPopBufferMtl(t):void 0,r.geometry=n,r})),t.furnitureModel){var r=new Bf.FurnitureModel;Object(tr.extend)(r,t.furnitureModel),r.size=new at.a(r.size),r.position=new at.a(r.position),r.rotate=new at.a(r.rotate),r.scale=new at.a(r.scale),t.furnitureModel=r}return t}))),r.wireFrames&&Object(tr.each)(r.wireFrames,(function(e,r){t.addWireGeometrysMap(r,e)})),this.addCustomResources(n)},t}(bf.a);!function(e){e[e.willExit=0]="willExit"}(Kf||(Kf={})),function(e){e[e.exit=0]="exit"}(qf||(qf={})),function(e){e[e.personalLibrary=1]="personalLibrary",e[e.enterpriseLibrary=2]="enterpriseLibrary"}(Jf||(Jf={}));var Xf=r(245),Zf=r.n(Xf),$f=r(287),eh=r.n($f),th=r(1129),rh=r.n(th),nh=r(361),ih=r.n(nh),oh=r(723),Ah=r.n(oh),ah=r(1130),sh=r.n(ah),uh=r(727),ch=r.n(uh),lh=r(728),gh=r.n(lh),fh=r(207),hh=r.n(fh),ph=r(112),dh=r.n(ph),Ih=r(187),yh=r.n(Ih),Ch=r(530),Eh=r.n(Ch),Bh=r(1131),vh=r.n(Bh),mh=r(721),Qh=r.n(mh),bh=r(720),_h=r.n(bh),Sh=r(360),wh=r.n(Sh),Dh=r(242),Rh=r.n(Dh),Mh=r(732),xh=r.n(Mh),Ph=r(719),Th=r.n(Ph),Fh=r(1132),Oh=r.n(Fh),Lh=Object({DEPLOY_VERSION:1,APP_VERSION:1}).ENABLE_DEV_CHECK?[bi.a,fi.a,ih.a,$e.a,Ah.a,tt.a,sh.a,hh.a,dh.a,yh.a,Eh.a,nt.a,pi.a,Ii.a,Ci.a,vh.a,Qh.a,_h.a,ot.a,wh.a,Rh.a,xh.a,Mh.LineIndex,Bi.a,Th.a,Oh.a,Yr.a,at.a,ArrayBuffer,ia.Vector3,eh.a,rh.a,Js.ParamStore,ch.a,gh.a,mf.a,Qn.a,Bf.FurnitureModel,Map,ia.SkyBackground]:[];Object(Xf.inject)({isKnownImmutableInstance:function(e){return Lh.some((function(t){return e instanceof t}))}});Zf.a;var Nh=r(211);function kh(e){return(kh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Gh(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Uh(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function jh(e,t){return(jh=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Vh(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Yh(e);if(t){var i=Yh(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Hh(this,r)}}function Hh(e,t){return!t||"object"!==kh(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Yh(e){return(Yh=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Kh,qh=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&jh(e,t)}(o,e);var t,r,n,i=Vh(o);function o(){var e;return Gh(this,o),(e=i.apply(this,arguments)).rootState=new Wu,e}return t=o,(r=[{key:"stateManager",get:function(){return this.rootState}},{key:"onInitialize",value:function(){var e=new jc(this,this.rootState);e.init(),e.run()}}])&&Uh(t.prototype,r),n&&Uh(t,n),o}(Nh.BasePlugin);qh.dependencies=[Ji.AppServicePlugin];var Jh,Wh,zh,Xh=function(e){if(!Kh)throw new Error("please new Application before call method");return Kh.getCustomMiniAppService(e)},Zh=r(249),$h=r(108),ep=r(429);function tp(e){zh=e}function rp(e){return(rp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function np(e){return function(e){if(Array.isArray(e))return ip(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return ip(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ip(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ip(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function op(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Ap(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function ap(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){Ap(o,n,i,A,a,"next",e)}function a(e){Ap(o,n,i,A,a,"throw",e)}A(void 0)}))}}function sp(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function up(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function cp(e,t){return(cp=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function lp(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=fp(e);if(t){var i=fp(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return gp(this,r)}}function gp(e,t){return!t||"object"!==rp(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function fp(e){return(fp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var hp=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&cp(e,t)}(o,e);var t,r,n,i=lp(o);function o(){var e;return sp(this,o),(e=i.apply(this,arguments)).state={currentCustomData:void 0,designInfo:void 0,hardwarelist:[],casbinModelIdMap:{}},e.lastCurrentCustomDataArgs=[],e.getCurrentBaseDesignInfo=ap(s.a.mark((function t(){var r,n;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(r=e.state.designInfo)){t.next=3;break}return t.abrupt("return",r);case 3:return n=Xh(Zh.MiniAppDesignBaseInfoService),t.next=6,n.getDesignBaseInfo();case 6:return r=t.sent,e.state.designInfo=r,t.abrupt("return",r);case 9:case"end":return t.stop()}}),t)}))),e.getCurrentCustomData=function(){var t=ap(s.a.mark((function t(r){var n,i;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.state.currentCustomData,r){t.next=3;break}return t.abrupt("return",n);case 3:if(i=Object(tr.castArray)(r),!Object(tr.difference)(i,e.lastCurrentCustomDataArgs).length&&n){t.next=11;break}return t.next=8,Rm(r);case 8:n=t.sent,t.next=12;break;case 11:return t.abrupt("return",n);case 12:return e.lastCurrentCustomDataArgs=i,e.state.currentCustomData=n,t.abrupt("return",n);case 15:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.loadFittingHardwareToSense=function(){var t=ap(s.a.mark((function t(r){var n,i,o,A,a,u,c,l,g,f,h,p;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=Object(tr.uniq)(Object(tr.flatten)(Object(tr.map)(r.hardware,(function(e){return e.map((function(e){return e.brandGoodId}))})))),e.state.casbinModelIdMap={},n.length){t.next=4;break}return t.abrupt("return");case 4:return i=e.getStateManager().core,o=i.design,A=i.pad,t.next=8,Promise.allSettled(Object(tr.map)(n,function(){var e=ap(s.a.mark((function e(t){var r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Lm(t);case 2:return r=e.sent,e.abrupt("return",[t,r]);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 8:return a=t.sent,t.next=11,Nm(n);case 11:for(p in u=t.sent,c=Object(tr.mapValues)(Object(tr.keyBy)(Object(tr.filter)(a,(function(e){return"fulfilled"===e.status})).map((function(e){return e.value})),(function(e){return e[0]})),(function(e){return e[1]})),l=o.getCustom(),g=[],f={},h=function(e){var t=r.hardware[e],n=A.findModelOrAssemblyModelById(e);if(n){var i=n.getConcatenatedMatrix(),o=n.getSize(),a=(new nt.a).makeTranslation(new at.a(-o.x/2,o.y/2,-o.z/2)),s=i.clone().multiply(a),l=Object(tr.map)(t,(function(e){var t=c[e.brandGoodId],r=u[e.brandGoodId]||{x:0,y:0,z:0};if(t){var i=t.paramModelData,o=op(t,["paramModelData"]),A=e.rotate,a=(new jt).parse(i);Object($h.attach)(a,Object($h.toAttachedMap)(o)),a.setIsAppendHardware(!0),a.setLinkedIds(e.linkedIds),a.setHardwareData(e),a.linkParamModelId=n.id;var l=s.clone().multiply((new nt.a).compose(new at.a(e.position),new tt.a(A.x,A.y,A.z),new at.a(e.scale)).multiply((new nt.a).setPosition(new at.a(r)))),g=li.a.decompose(l),h=g.rotation,p=g.position,d=g.scale,I=new at.a(p);return a.setPosition({x:I.x,y:I.y,z:I.z}),a.setRotation({x:h.x,y:h.y,z:h.z}),a.setScale(d),a.assignUniqueId(),f[e.id]=a.id,a}})).filter((function(e){return!!e}));g.push.apply(g,np(l))}else Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING&&console.warn("当前五金信息找不到对应模型!")},r.hardware)h(p);if(!g.length){t.next=23;break}return t.next=21,Jh.updateAttacheds(g);case 21:l.addParamModels.apply(l,g),e.state.casbinModelIdMap=f;case 23:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e}return t=o,(r=[{key:"module",value:function(){return"baseDesignInfo"}}])&&up(t.prototype,r),n&&up(t,n),o}(qi.AXR);function pp(e){return(pp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function dp(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ip(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function yp(e,t){return(yp=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Cp(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Bp(e);if(t){var i=Bp(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Ep(this,r)}}function Ep(e,t){return!t||"object"!==pp(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Bp(e){return(Bp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var vp,mp,Qp,bp,_p,Sp,wp,Dp,Rp=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&yp(e,t)}(o,e);var t,r,n,i=Cp(o);function o(){var e;return dp(this,o),(e=i.apply(this,arguments)).paramModelConstructor=jt,e}return t=o,(r=[{key:"parseParamModelAssemblies",value:function(e){var t=this;return e.forEach((function(e){var r=(new Xt).parse(e,t,{isRootWorldMatrix:!0});t.addParamModelAssembly(r)})),this}}])&&Ip(t.prototype,r),n&&Ip(t,n),o}(zf),Mp=r(75),xp=Symbol("fitting-data"),Pp=Symbol("groove-fitting-entity"),Tp=Symbol("intersect-data"),Fp=Symbol("param-model-hint-entity"),Op=Symbol("fitting-hint-entity"),Lp=Symbol("plank-outline-hint-entity");!function(e){e.FAIL="fail",e.SUCCESS="success",e.LOADING="loading"}(vp||(vp={})),function(e){e[e.READY=0]="READY",e[e.LOADING=1]="LOADING",e[e.FAILED=2]="FAILED",e[e.INVALID=3]="INVALID",e[e.SUCCESS=4]="SUCCESS"}(mp||(mp={})),function(e){e[e.READY=0]="READY",e[e.RUNNING=1]="RUNNING",e[e.FAILED=2]="FAILED",e[e.SUCCESS=3]="SUCCESS"}(Qp||(Qp={})),function(e){e.SCENE_ID="cp"}(bp||(bp={})),function(e){e[e.theme=1735419]="theme",e[e.sceneBG=15461612]="sceneBG",e[e.outline=0]="outline"}(_p||(_p={})),function(e){e.selectBlank="sb",e.renderModeChange="r",e.doorVisibilityChange="d"}(Sp||(Sp={})),function(e){e[e.opaqueModel=1]="opaqueModel",e[e.translucentModel=.4]="translucentModel",e[e.transparentModel=0]="transparentModel"}(wp||(wp={})),function(e){e.SHADING="0",e.OUTLINE_WITH_SHADING="1",e.TRANSLUCENT="2",e.OUTLINE_AND_TRANSLUCENT="3"}(Dp||(Dp={}));var Np,kp=[];function Gp(e){return(Gp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Up(e){return function(e){if(Array.isArray(e))return jp(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return jp(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return jp(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function jp(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Vp(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function Hp(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){Vp(o,n,i,A,a,"next",e)}function a(e){Vp(o,n,i,A,a,"throw",e)}A(void 0)}))}}function Yp(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Kp(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qp(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Jp(e,t){return(Jp=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Wp(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Xp(e);if(t){var i=Xp(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return zp(this,r)}}function zp(e,t){return!t||"object"!==Gp(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Xp(e){return(Xp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}!function(e){e.design="design",e.series="series"}(Np||(Np={}));var Zp=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Jp(e,t)}(o,e);var t,r,n,i=Wp(o);function o(){var e;return Kp(this,o),(e=i.apply(this,arguments)).state=e.stateCreator.create({main:mp.READY,design:mp.READY,series:mp.READY}),e.$reducerState=e.reducerCreator.create(e.state),e.$actionLoad=e.unitCreator.async((function(t){t.started.latest(s.a.mark((function e(t,r){var n,i,o,A;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Wh.getParamModelDataByBrandGoodId(t);case 2:return n=e.sent,i=n.paramModelData,o=Yp(n,["paramModelData"]),A=(new jt).parse(i),Object($h.attach)(A,Object($h.toAttachedMap)(o)),e.next=9,Jh.updateAttacheds([A]);case 9:return r.core.design.getCustom().addParamModels(A),r.core.fittingDesign.setFittings(kp),e.next=13,Object(Mp.put)(this.$actionLoad.done.message({params:t,result:mp.SUCCESS}));case 13:case"end":return e.stop()}}),e,this)}))),t.done.produce(e.$reducerState,(function(e,t){e.main=t.result}))})),e.$actionAddModelToSense=e.unitCreator.async((function(t){t.started.latest(s.a.mark((function e(t,r){var n,i,o,A,a,u;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.custom,i=t.needAttach,o=n.getParamModels(),A=n.getParamModelAssemblies(),!i){e.next=6;break}return e.next=6,Promise.all(o.map(function(){var e=Hp(s.a.mark((function e(t){var r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Wh.getParamModelDataByBrandGoodId(t.getBrandGoodId());case 2:r=e.sent,Object($h.attach)(t,Object($h.toAttachedMap)(r));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 6:if(r.core.design.setCustom(n),a=o.filter((function(e){return!e.getAssembly()})),!i){e.next=12;break}return u=[].concat(Up(a),Up(A)),e.next=12,Jh.updateAttacheds(u);case 12:return e.next=14,Object(Mp.put)(this.$actionAddModelToSense.done.message({params:{custom:n,needAttach:i},result:mp.SUCCESS}));case 14:case"end":return e.stop()}}),e,this)}))),t.done.produce(e.$reducerState,(function(e,t){e.main=t.result}))})),e.$actionAddParamModelToSense=e.unitCreator.async((function(t){t.started.latest(s.a.mark((function e(t,r){var n,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=t.map((function(e){var t=e.paramModelData,r=Yp(e,["paramModelData"]),n=(new jt).parse(t,new Rp);return Object($h.attach)(n,Object($h.toAttachedMap)(r)),n})),e.next=3,Jh.updateAttacheds(i);case 3:return(n=r.core.design.getCustom()).addParamModels.apply(n,Up(i)),e.next=6,Object(Mp.put)(this.$actionAddParamModelToSense.done.message({params:t,result:mp.SUCCESS}));case 6:case"end":return e.stop()}}),e,this)}))),t.done.produce(e.$reducerState,(function(e,t){e.main=t.result}))})),e.$actionAddParamModelAssemblyToSense=e.unitCreator.async((function(t){t.started.latest(s.a.mark((function e(t,r){var n,i,o,A;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.core.design.getCustom(),i=new Rp,o=t.map((function(e){return(new Xt).parse(e,i)})),A=i.getParamModels(),e.next=6,Promise.all(A.map(function(){var e=Hp(s.a.mark((function e(t){var r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Wh.getParamModelDataByBrandGoodId(t.getBrandGoodId());case 2:r=e.sent,Object($h.attach)(t,Object($h.toAttachedMap)(r));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 6:return e.next=8,Jh.updateAttacheds(Up(o));case 8:return n.addParamModelAssemblies.apply(n,Up(o)),n.addParamModels.apply(n,Up(A)),e.next=12,Object(Mp.put)(this.$actionAddParamModelAssemblyToSense.done.message({params:t,result:mp.SUCCESS}));case 12:case"end":return e.stop()}}),e,this)}))),t.done.produce(e.$reducerState,(function(e,t){e.main=t.result}))})),e}return t=o,(r=[{key:"module",value:function(){return"entry"}}])&&qp(t.prototype,r),n&&qp(t,n),o}(qi.AXR);function $p(e){return($p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ed(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function td(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&rd(e,t)}function rd(e,t){return(rd=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function nd(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=od(e);if(t){var i=od(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return id(this,r)}}function id(e,t){return!t||"object"!==$p(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function od(e){return(od=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}qi.AXR;var Ad=function(e){td(r,e);var t=nd(r);function r(){return ed(this,r),t.apply(this,arguments)}return r}(qi.AXRPartial),ad=(qi.AXRManager,Math.sqrt(2)),sd=Math.PI/6,ud=Math.PI/3+Math.PI;function cd(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ud,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:sd,n=e.getPosition(),i=e.getSize(),o=n.clone(),A=i.length()*ad,a=new at.a(Math.cos(r)*Math.cos(t),Math.cos(r)*Math.sin(t),Math.sin(r)).mul(A).applyMatrix4(e.getMatrix());return{lookAt:o,position:a}}var ld,gd=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5e3,t=arguments.length>1?arguments[1]:void 0;return new Promise((function(r){setTimeout(r,e,t)}))};function fd(e){var t,r,n,i=function(e){return function(){void 0!==n&&(clearTimeout(n),n=void 0);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];e.call.apply(e,[this].concat(r))}};return{promise:new Promise((function(o,A){t=i(o),r=i(A),"number"==typeof e&&(n=setTimeout((function(){n=void 0,r(new Error("defer waiting timeout, ".concat(e,"ms")))}),e))})),resolve:t,reject:r}}function hd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function pd(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?hd(Object(r),!0).forEach((function(t){dd(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hd(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function dd(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Id(e){return e["@type"]===g.THROUGH_SHELL}function yd(e){var t=e.elements;return(new oa.a.Matrix4).set(t[0],t[4],t[8],t[12],t[1],t[5],t[9],t[13],t[2],t[6],t[10],t[14],t[3],t[7],t[11],t[15])}function Cd(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ed(e,t){var r,n=e.getSize(),i=(new nt.a).getInverse(e.getConcatenatedMatrix()),o=t.clone().applyMatrix4(yd(i)),A=o.x,a=o.y,s=o.z,u=(Cd(r={},ld.TOP,Math.abs(s-n.z/2)),Cd(r,ld.LEFT,Math.abs(A+n.x/2)),Cd(r,ld.BACK,Math.abs(a+n.y/2)),Cd(r,ld.RIGHT,Math.abs(A-n.x/2)),Cd(r,ld.FRONT,Math.abs(a-n.y/2)),Cd(r,ld.BOT,Math.abs(s+n.z/2)),r),c=Object.entries(u).reduce((function(e,t){return t[1]<e[1]?t:e}));return c[1]<.01?+c[0]:ld.UNKNOWN}function Bd(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}!function(e){e[e.UNKNOWN=-1]="UNKNOWN",e[e.TOP=0]="TOP",e[e.LEFT=1]="LEFT",e[e.BACK=2]="BACK",e[e.RIGHT=3]="RIGHT",e[e.FRONT=4]="FRONT",e[e.BOT=5]="BOT"}(ld||(ld={}));var vd=function(){var e,t=(e=s.a.mark((function e(t){var r,n,i,o,A,a,u,c,l,g,f;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=WC(),n=r.baseDesignInfo,e.next=3,n.getCurrentBaseDesignInfo();case 3:return i=e.sent,o=i.designId,A=i.levelid,a={modelid:null!=t?t:"",designid:o,levelid:A,toolType:0},u=n.getStateManager().core.design.getCustom(),t||((c=u.getParamModelAssemblies()).length?a.modelid=c[0].id:(l=u.getParamModels().filter((function(e){return!e.isAppendHardware}))).length&&(a.modelid=l[0].id)),e.next=11,n.getCurrentCustomData(null!=t?t:a.modelid);case 11:return g=e.sent,f=g.toolType,a.toolType=f,e.abrupt("return",a);case 15:case"end":return e.stop()}}),e)})),function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){Bd(o,n,i,A,a,"next",e)}function a(e){Bd(o,n,i,A,a,"throw",e)}A(void 0)}))});return function(e){return t.apply(this,arguments)}}(),md=r(243);function Qd(e){return function(e){if(Array.isArray(e))return bd(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return bd(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return bd(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function bd(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _d(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Rp;r.parseParamModels(e.paramModels).parseParamModelGroups(e.paramModelGroups).parseParamModelAssemblies(e.paramModelCombinations);var n=r.getParamModelAssemblies(),i=(t=Qd(r.getParamModels())).concat.apply(t,Qd(n.map((function(e){return e.getParamModels()}))));return i=i.filter((function(e){return!e.isAccessory()})),Object(tr.uniqBy)(md.ParamModelUtils.collectAccessories(i),"id").forEach((function(e){e.toLocalMatrix()})),{paramModels:i,paramModelAssemblies:n}}function Sd(e){return(Sd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function wd(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function Dd(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){wd(o,n,i,A,a,"next",e)}function a(e){wd(o,n,i,A,a,"throw",e)}A(void 0)}))}}function Rd(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Md(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function xd(e,t){return(xd=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Pd(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Fd(e);if(t){var i=Fd(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Td(this,r)}}function Td(e,t){return!t||"object"!==Sd(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Fd(e){return(Fd=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Od(e){return function(e){if(Array.isArray(e))return Ld(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Ld(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ld(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ld(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Nd(e){var t=e.map((function(e){return e.subModels&&e.subModels.length?Nd(e.subModels):[]})).flat();return t.push.apply(t,Od(e)),t}var kd=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&xd(e,t)}(g,e);var t,r,n,i,o,A,a,u,c,l=Pd(g);function g(){var e;return Rd(this,g),(e=l.apply(this,arguments)).state=e.stateCreator.create({loading:vp.FAIL,allSubModels:[],result:void 0,currModelId:""}),e.$reducerState=e.reducerCreator.create(e.state),e.$actionSetModelId=e.unitCreator.sync((function(t){t.produce(e.$reducerState,(function(e,t){e.currModelId!==t&&(e.result=void 0,e.allSubModels=[]),e.currModelId=t}))})),e.$actionLoadParamModelJsonData=e.unitCreator.async((function(t){t.started.every(s.a.mark((function e(t){var r,n,i,o,A,a,u,c,l,g,f,h,p,d,I,y,C;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.modelId,n=t.defer,i=t.hasFitting,o=void 0!==i&&i,A=t.force,a=void 0!==A&&A,u=t.templateId,c=t.timeout,l=this.state.state,g=l.currModelId,f=l.result,h=l.currTemplateId,r){e.next=4;break}throw new Error("not selected model!");case 4:if(p=r===g,d=h===u,I=this.$actionLoadParamModelJsonData,e.prev=7,y=p&&!a&&d?f:void 0,!o||y){e.next=13;break}return e.next=12,Mm(r,u);case 12:y=e.sent;case 13:if(y){e.next=18;break}return Em.delete(r),e.next=17,xm(r,u,c);case 17:y=e.sent;case 18:if(y){e.next=20;break}throw new Error("输入json数据出现异常");case 20:return C=p&&!u?Nd(y.paramModel):this.state.state.allSubModels,p&&WC().scene.$actionToggleSelectModel.dispatch(!0),e.next=24,I.done.dispatch({params:t,result:{ossContent:y,allSubModels:C}});case 24:e.next=31;break;case 26:return e.prev=26,e.t0=e.catch(7),e.next=30,I.failed.dispatch({params:t});case 30:n&&n.reject(e.t0);case 31:case"end":return e.stop()}}),e,this,[[7,26]])}))),t.done.every((function(e){var t=e.params.defer;t&&t.resolve(e.result.ossContent)})),t.started.produce(e.$reducerState,(function(e,t){e.loading=vp.LOADING})),t.done.produce(e.$reducerState,(function(e,t){var r=t.result,n=r.ossContent,i=r.allSubModels,o=t.params,A=o.templateId,a=o.modelId===e.currModelId;e.loading=vp.SUCCESS,e.result=a?n:e.result,e.allSubModels=a?i:e.allSubModels,e.currTemplateId=A})),t.failed.produce(e.$reducerState,(function(e,t){e.loading=vp.FAIL}))})),e}return t=g,(r=[{key:"module",value:function(){return"viewParamModel"}},{key:"viewParamModelById",value:(c=Dd(s.a.mark((function e(t){var r,n,i,o,A,a,u,c=this;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(tr.isArray)(t)?t[0]:t,this.$actionSetModelId.dispatchResolve(r),(n=WC().scene).cameraController.$actionInit.dispatch(),this.resetView(),(i=this.getAxr(Iy).fittingDesignSense).initFittingDesign(),function(){var e=Dd(s.a.mark((function e(){var t,n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=fd(),i.$actionLoadFittingDesign.started.dispatch({defer:t,params:{modelid:r}}),e.prev=2,e.next=5,t.promise;case 5:n=e.sent,e.next=11;break;case 8:e.prev=8,e.t0=e.catch(2),Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&console.log(e.t0);case 11:return e.prev=11,e.next=14,c.$actionLoadParamModelJsonData.started.dispatchResolve({modelId:r,hasFitting:!!n});case 14:return e.finish(11);case 15:case"end":return e.stop()}}),e,null,[[2,8,11,15]])})));return function(){return e.apply(this,arguments)}}()(),n.$actionToggleSelectModel.dispatchResolve(!1),e.next=12,this.getAxr(hp).getCurrentCustomData(r);case 12:return o=e.sent,A=new Rp,o.context&&A.unSerialize(o.context),a=_d(o,A),(u=new pt).addParamModels.apply(u,Od(a.paramModels)),u.addParamModelAssemblies.apply(u,Od(a.paramModelAssemblies)),e.next=21,this.getAxr(Zp).$actionAddModelToSense.started.dispatchResolve({custom:u,needAttach:!o.context});case 21:case"end":return e.stop()}}),e,this)}))),function(e){return c.apply(this,arguments)})},{key:"refreshCustomModelData",value:(u=Dd(s.a.mark((function e(){var t,r,n,i,o,A,a;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.getStateManager().core.design.getCustom(),r=t.getParamModels().filter((function(e){return!e.isAppendHardware})),n=t.getParamModelAssemblies(),i=this.state.state.currModelId,(0!==r.length||0!==n.length)&&i){e.next=6;break}throw new Error("No custom model in the scene!");case 6:return t.clearAllParamModels(),e.next=9,Rm(this.state.state.currModelId);case 9:return o=e.sent,A=new Rp,o.context&&A.unSerialize(o.context),a=_d(o,A),t.addParamModels.apply(t,Od(a.paramModels)),t.addParamModelAssemblies.apply(t,Od(a.paramModelAssemblies)),e.next=17,this.getAxr(Zp).$actionAddModelToSense.started.dispatchResolve({custom:t,needAttach:!o.context});case 17:case"end":return e.stop()}}),e,this)}))),function(){return u.apply(this,arguments)})},{key:"viewSelectedParamModel",value:(a=Dd(s.a.mark((function e(){var t,r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=Xh(Zh.MiniAppSelectModelService),e.next=3,null==t?void 0:t.getSelected();case 3:if(!(null==(r=e.sent)?void 0:r.length)){e.next=9;break}return e.next=7,this.viewParamModelById(Object(tr.map)(r,"id").filter((function(e){return!!e})));case 7:e.next=10;break;case 9:throw new Error("current not selected any parammodel!");case 10:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"getParamModelJsonData",value:(A=Dd(s.a.mark((function e(t){var r,n,i,o,A,a,u,c,l,g,f,h;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=this.state.state,i=(n=t||{}).timeout,o=void 0===i?5e4:i,A=n.modelId,a=void 0===A?r.currModelId:A,u=n.force,c=void 0!==u&&u,l=n.templateId,c){e.next=14;break}return f=fd(),this.getAxr(Iy).fittingDesignSense.$actionLoadFittingDesign.started.dispatch({defer:f,params:{modelid:a}}),e.prev=5,e.next=8,f.promise;case 8:g=e.sent,e.next=14;break;case 11:e.prev=11,e.t0=e.catch(5),console.log(e.t0);case 14:return h=fd(o),this.$actionLoadParamModelJsonData.started.dispatch({defer:h,modelId:a,hasFitting:!!g,force:c,templateId:l,timeout:"number"==typeof o?o/1e3:void 0}),e.abrupt("return",h.promise);case 17:case"end":return e.stop()}}),e,this,[[5,11]])}))),function(e){return A.apply(this,arguments)})},{key:"validateModelStable",value:function(e){var t=this.getStateManager().core.pad.findModelOrAssemblyModelById(e);if(t){for(var r=[t],n={total:0,invalidateTotal:0,validate:!0,invalidateList:[]};r.length;){var i=r.shift();i.getType()===ui.ParamModelType.PARAM_PRIMITIVE&&i.getLegal()?(n.total++,i.getVersionReflectedId()||(n.invalidateTotal++,n.validate=!1,n.invalidateList.push(i.id))):r.push.apply(r,Od(i.getChildNodes()))}return n}}},{key:"getTopModelList",value:(o=Dd(s.a.mark((function e(t){var r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Xh(Yf),e.next=3,r.getTopParamModels(t);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})},{key:"getParamModelPhotoData",value:(i=Dd(s.a.mark((function e(t){var r,n,i,o;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=Object(tr.castArray)(t),n=Xh(Zh.MiniAppParamModelDataInfoService),i=[],o=r.length-1;case 4:if(!(o>=0)){e.next=10;break}return e.next=7,n.getParamModelPhotoById(r[o]).then((function(e){i.push(e)}));case 7:--o,e.next=4;break;case 10:return e.abrupt("return",i);case 11:case"end":return e.stop()}}),e)}))),function(e){return i.apply(this,arguments)})},{key:"resetView",value:function(){var e=this.getStateManager().core,t=e.design.getCustom();t.clearAllParamModels();var r=t.getParamModelAssemblies();r.length&&r.map((function(e){return t.removeParamModelAssembly(e)})),e.fittingDesign.setIntersects([]),e.fittingDesign.setPlankFaceHintModels([]),e.fittingDesign.setFittingHintModels([]),e.fittingDesign.setPlankOutlineHintModels([])}}])&&Md(t.prototype,r),n&&Md(t,n),g}(qi.AXR);function Gd(e){return(Gd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ud(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function jd(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ud(Object(r),!0).forEach((function(t){Vd(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ud(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Vd(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Hd(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function Yd(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){Hd(o,n,i,A,a,"next",e)}function a(e){Hd(o,n,i,A,a,"throw",e)}A(void 0)}))}}function Kd(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qd(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Jd(e,t,r){return(Jd="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Zd(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function Wd(e,t){return(Wd=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function zd(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Zd(e);if(t){var i=Zd(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Xd(this,r)}}function Xd(e,t){return!t||"object"!==Gd(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Zd(e){return(Zd=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function $d(e){return function(e){if(Array.isArray(e))return eI(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return eI(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return eI(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function eI(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var tI={holes:{},grooves:{},hardwares:{},hardwareGrooves:{}};function rI(e){return Object(tr.values)(e).some((function(e){return Object(tr.isEmpty)(e)}))}function nI(e,t){var r=e.getParamModelAssemblies().find((function(e){return e.id===t}));if(r||(r=e.getParamModels().find((function(e){return e.id===t}))),!r)return[];for(var n=[],i=[r];i.length;){var o=i.shift();n.push(o.id),i.push.apply(i,$d(o.getChildNodes()))}return n}function iI(e){return Object(tr.uniq)(["holes","grooves","hardwares","hardwareGrooves"].map((function(t){return Object(tr.keys)(e[t]).sort()})).flat())}function oI(e,t){var r=new Set(t);return e.filter((function(e){return!r.has(e)}))}var AI=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Wd(e,t)}(o,e);var t,r,n,i=zd(o);function o(){var e;return Kd(this,o),(e=i.apply(this,arguments)).state=e.stateCreator.create({autoSave:!0,designLoading:vp.FAIL,design:Object(tr.cloneDeep)(tI)}),e.$reducerState=e.reducerCreator.create(e.state),e.$actionInit=e.unitCreator.sync((function(e){e.latest(s.a.mark((function e(t,r){var n,i,o,A,a,u,c;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=this.getAxr(Zp);case 1:return i=n.$actionAddModelToSense.done.messageType(),o=this.$actionRestoreFittingDesign.messageType(),e.next=6,Object(Mp.take)([i,o]);case 6:A=r.core,a=A.fittingDesign,u=A.design,a.setFittings([]),a.setGrooveFittings([]),u.getCustom().getParamModels().forEach((function(e){e.isAppendHardware&&e.dispose()})),c=this.state.state.design,this.fittingAddDataToFittingDesignSense(c),this.getAxr(hp).loadFittingHardwareToSense({hardware:c.hardwares}),e.next=1;break;case 16:case"end":return e.stop()}}),e,this)})))})),e.$actionEnableAutoSave=e.unitCreator.sync((function(t){t.produce(e.$reducerState,(function(e,t){e.autoSave=t}))})),e.initFittingDesign=function(){e.$actionRestoreFittingDesign.dispatch(Object(tr.cloneDeep)(tI))},e.getConnectedFittingDesign=function(){var t=Yd(s.a.mark((function t(r){var n,i,o,A,a,u,c,l,g,f,h=arguments;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=h.length>1&&void 0!==h[1]&&h[1],i=e.state.state.design,r){t.next=4;break}return t.abrupt("return",Object(tr.cloneDeep)(i));case 4:if(o={holes:{},grooves:{},hardwares:{},hardwareGrooves:{}},!n){t.next=26;break}A=i.hardwares||{},t.t0=s.a.keys(A);case 8:if((t.t1=t.t0()).done){t.next=18;break}if(c=t.t1.value,!A.hasOwnProperty(c)){t.next=16;break}if(!(l=Object(tr.find)(A[c]||[],(function(e){return e.id===r})))){t.next=16;break}return u=c,a=l,t.abrupt("break",18);case 16:t.next=8;break;case 18:if(a&&u){t.next=20;break}throw new Error("当前五金不存在!");case 20:g=a.linkedIds,f=function(e){return g.includes(e.id)},o.holes[u]=Object(tr.filter)(i.holes[u],f),o.grooves[u]=Object(tr.filter)(i.grooves[u],f),t.next=27;break;case 26:Object(tr.keys)(o).forEach((function(e){i[e]&&i[e][r]&&(o[e][r]=Object(tr.cloneDeep)(i[e][r]))}));case 27:return t.abrupt("return",o);case 28:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.fittingAddDataToFittingDesignSense=function(){var t=Yd(s.a.mark((function t(r){var n,i,o,A,a,u,c,g,f,h,p,d;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,gd(1);case 2:n=e.stateManager.core,i=n.fittingDesign,o=n.pad,A=WC().fittingDesign.senseSetting.getSenseSettings(),a=Object(tr.pick)(A,["holeColor","grooveColor","holeOpacity","grooveOpacity"]),u=r.holes,c=void 0===u?{}:u,g=r.grooves,f=void 0===g?{}:g,h=r.hardwareGrooves,p=void 0===h?{}:h,d={findRelativeModel:o.findModelOrAssemblyModelById,transformModel:Ai},i.setFittings([].concat($d(Jc(c,jd(jd({},d),{},{type:l.HOLE,defaultConfig:a}))),$d(Jc(f,jd(jd({},d),{},{type:l.GROOVE,defaultConfig:a}))))),i.setGrooveFittings(Jc(p,jd(jd({},d),{},{type:l.HARDWARE_GROOVE,transformModel:Ki,defaultConfig:a})));case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.appendFittingDataToFittingDesign=function(){var t=Yd(s.a.mark((function t(r,n){var i,o,A,a,u,c,l,g,f,h,p;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=e.state.state,A=o.design,a=o.autoSave,u=!r.id||r.id===A.id,c=tI,l=n.timeout,g=n.save,f=void 0===g?a:g,h={id:null!==(i=r.id)&&void 0!==i?i:A.id,holes:jd(jd({},u?A.holes:c.holes),r.holes||{}),grooves:jd(jd({},u?A.grooves:c.grooves),r.grooves||{}),hardwares:jd(jd({},u?A.hardwares:c.hardwares),r.hardwares||{}),hardwareGrooves:jd(jd({},u?A.hardwareGrooves:c.hardwareGrooves),r.hardwareGrooves||{})},Object(tr.pull)(Object(tr.keys)(h),"id").forEach((function(e){var t=h[e];Object(tr.keys)(t).forEach((function(e){0===t[e].length&&delete t[e]}))})),!f){t.next=12;break}return p=fd(l),e.$actionSaveFittingDesign.started.dispatch({defer:p,design:h}),t.abrupt("return",p.promise);case 12:e.$actionRestoreFittingDesign.dispatch(h);case 13:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),e.$actionRestoreFittingDesign=e.unitCreator.sync((function(t){t.produce(e.$reducerState,(function(e,t){e.design=t}))})),e.$actionLoadFittingDesign=e.unitCreator.async((function(e){e.started.every(s.a.mark((function e(t,r){var n,i,o,A,a=this;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.$actionLoadFittingDesign,i=t.params,e.next=4,vd(i.modelid);case 4:return o=e.sent,e.prev=5,e.next=8,vm(jd(jd({},i),o));case 8:A=e.sent,qi.Util.safeExec((function(){var e=r.core.design.getCustom(),n=a.getAxr(kd).state.state.currModelId;if(n===t.params.modelid&&A){var i=nI(e,n),o=iI(A),s=oI(o,i);Xh(Lf).log({logKey:"miniAppFittingDesignRead",modelId:n,fittingConnectedIds:o.join(","),notExistsIds:s.join(","),notExistsIdsCount:!!s.length})}})),n.done.dispatch({params:t,result:{designData:A,modelId:o.modelid}}),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(5),n.failed.dispatch({params:t});case 16:case"end":return e.stop()}}),e,this,[[5,13]])}))),e.done.every((function(e,t){var r=this.$actionRestoreFittingDesign,n=e.result.designData?e.result.designData:Object(tr.cloneDeep)(tI),i=this.getAxr(kd).state.state.currModelId;e.result.modelId===i&&r.dispatch(n);var o=e.params.defer;o&&o.resolve(e.result.designData)})),e.failed.every((function(e,t){var r,n=this.getAxr(kd).state.state.currModelId;(null===(r=e.result)||void 0===r?void 0:r.modelId)===n&&this.initFittingDesign();var i=e.params.defer;i&&i.reject(new Error("load fitting design error"))}))})),e.$actionClearFittingDesign=e.unitCreator.async((function(e){e.started.every(s.a.mark((function e(t,r){var n,i,o,A,a;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.getAxr(kd).state.state.currModelId,i=t.modelId,o=void 0===i?n:i,e.next=4,vd(o);case 4:return A=e.sent,a=this.$actionClearFittingDesign,e.prev=6,e.next=9,Sm(A);case 9:a.done.dispatch({params:t,result:void 0}),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(6),a.failed.dispatch({params:t});case 15:case"end":return e.stop()}}),e,this,[[6,12]])}))),e.done.every(s.a.mark((function e(t,r){var n,i,o;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=this.getAxr(kd).state.state.currModelId,(null!==(n=t.params.modelId)&&void 0!==n?n:i)===i&&this.initFittingDesign(),(o=t.params.defer)&&o.resolve();case 5:case"end":return e.stop()}}),e,this)}))),e.failed.every(s.a.mark((function e(t,r){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(n=t.params.defer)&&n.reject(new Error("delete error"));case 2:case"end":return e.stop()}}),e)})))})),e.$actionSaveFittingDesign=e.unitCreator.async((function(e){e.started.every(s.a.mark((function e(t,r){var n,i,o,A,a,u=this;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.state.state.design,i=t.design,o=void 0===i?n:i,e.next=4,vd(o.id);case 4:return A=e.sent,a=this.$actionSaveFittingDesign,qi.Util.safeExec((function(){var e=Xh(Lf),t=u.getAxr(kd).state.state.currModelId,i=r.core.design.getCustom();if(o&&(!o.id||t===A.modelid)){var a=nI(i,t),s=iI(o),c=oI(s,a);rI(Object(tr.omit)(n,["id"]))?e.log({logKey:"FittingDesignCreate",modelId:A.modelid,allModelIds:a.join(","),fittingConnectedIds:s.join(","),notExistsIds:c.join(","),notExistsIdsCount:!!c.length}):e.log({logKey:"FittingDesignUpdate",modelId:A.modelid,fittingConnectedIds:s.join(","),notExistsIds:c.join(","),notExistsIdsCount:!!c.length})}})),e.prev=7,e.next=10,_m(jd(jd({},o),{},{id:A.modelid}),A);case 10:a.done.dispatch({params:t,result:void 0}),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(7),a.failed.dispatch({params:t,result:e.t0});case 16:case"end":return e.stop()}}),e,this,[[7,13]])}))),e.failed.every(s.a.mark((function e(t,r){var n,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(n=t.params.defer)&&(i=t.result||new Error("保存失败"),n.reject(i));case 2:case"end":return e.stop()}}),e)}))),e.done.every(s.a.mark((function e(t,r){var n,i,o;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=t.params.design,i=this.getAxr(kd).state.state.currModelId,!n||n.id&&n.id!==i||this.$actionRestoreFittingDesign.dispatch(n),(o=t.params.defer)&&setTimeout((function(){o.resolve()}));case 5:case"end":return e.stop()}}),e,this)})))})),e}return t=o,(r=[{key:"init",value:function(){Jd(Zd(o.prototype),"init",this).call(this),this.$actionInit.dispatch()}},{key:"isAutoSaveEnabled",value:function(){return this.state.state.autoSave}}])&&qd(t.prototype,r),n&&qd(t,n),o}(Ad);function aI(e){return(aI="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function sI(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function uI(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function cI(e,t){return(cI=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function lI(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=fI(e);if(t){var i=fI(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return gI(this,r)}}function gI(e,t){return!t||"object"!==aI(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function fI(e){return(fI=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var hI=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&cI(e,t)}(o,e);var t,r,n,i=lI(o);function o(){var e;return sI(this,o),(e=i.apply(this,arguments)).state=e.stateCreator.create({option:{}}),e.$reducerState=e.reducerCreator.create(e.state),e.$actionUpdateFittingHintConf=e.unitCreator.sync((function(t){t.latest((function(){e.rerenderToSense()})),t.produce(e.$reducerState,(function(e,t){e.option=t}))})),e}return t=o,(r=[{key:"setFittingHint",value:function(e){this.$actionUpdateFittingHintConf.dispatch(e)}},{key:"clearFittingHint",value:function(e){var t=e?Object(tr.omit)(this.state.state.option,e):{};this.$actionUpdateFittingHintConf.dispatch(t)}},{key:"rerenderToSense",value:function(){var e=this.state.state.option,t=this.stateManager.core,r=t.design,n=t.fittingDesign,i=r.getCustom().getParamModels(),o=n.getFittings(),A=n.getGrooveFittings(),a=Object(tr.map)(e,(function(e,t){var r=i.find((function(e){return e.id===t&&e.isAppendHardware}))||o.find((function(e){return e.id===t}))||A.find((function(e){return e.id===t}));if(r)return new Rr({linkModel:r,hintOutline:e.outline})})).filter((function(e){return!!e}));n.setFittingHintModels(a)}}])&&uI(t.prototype,r),n&&uI(t,n),o}(Ad);function pI(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var dI=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.__changeMap={}}var t,r,n;return t=e,(r=[{key:"getHidden",value:function(){return this.isHidden}},{key:"setHidden",value:function(e){this.__trackUpdateField({field:"isHidden"},this.isHidden,e),this.isHidden=e}},{key:"__trackUpdateField",value:function(e,t,r){this.__changeMap.update=this.__changeMap.update||[];var n=this.__changeMap.update,i=e.field;t===r||n.some((function(e){return e.field===i}))||n.push({field:i})}}])&&pI(t.prototype,r),n&&pI(t,n),e}();function II(e){var t,r=new dI;if(r.id=e.id,e instanceof jt){if(!e.isAppendHardware)return;t=l.HARDWARE,r.isHidden=e.getInvisible(),r.originalData=e.hardwareData}else r.isHidden=!e.visible,t=e.type,r.originalData=e.fittingData;return r.linkParamModelId=e.linkParamModelId,r.modelType=t,r}function yI(e){return(yI="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function CI(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=BI(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function EI(e){return function(e){if(Array.isArray(e))return vI(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||BI(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function BI(e,t){if(e){if("string"==typeof e)return vI(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?vI(e,t):void 0}}function vI(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function mI(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function QI(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function bI(e,t){return(bI=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _I(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=wI(e);if(t){var i=wI(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return SI(this,r)}}function SI(e,t){return!t||"object"!==yI(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function wI(e){return(wI=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var DI=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&bI(e,t)}(o,e);var t,r,n,i=_I(o);function o(){return mI(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"getAllFittingModels",value:function(e){var t=new Set;if(e){var r=this.stateManager.core.pad.findModelOrAssemblyModelById(e);if(!r)return[];for(var n=[r];n.length;){var i=n.shift();t.add(i.id),n.push.apply(n,EI((null==i?void 0:i.getChildNodes())||[]))}}var o=this.findHardwareParamModels(this.stateManager.core.design.getCustom().getParamModels()),A=this.stateManager.core.fittingDesign.getFittings(),a=this.stateManager.core.fittingDesign.getGrooveFittings(),s=[].concat(EI(o),EI(A),EI(a));return t.size>0&&(s=s.filter((function(e){return t.has(e.linkParamModelId)}))),s.map((function(e){return II(e)}))}},{key:"findHardwareParamModels",value:function(e){var t,r=[],n=CI(e);try{for(n.s();!(t=n.n()).done;){var i=t.value;i.isAppendHardware&&r.push(i),r.push.apply(r,EI(this.findHardwareParamModels(i.getChildNodes())))}}catch(e){n.e(e)}finally{n.f()}return r}},{key:"save",value:function(e){var t,r=[],n=[],i=CI(e);try{for(i.s();!(t=i.n()).done;){var o=t.value;o.modelType===l.HARDWARE?r.push(o):n.push(o)}}catch(e){i.e(e)}finally{i.f()}this.saveHardwareFittingModelLite(r),this.saveFittingModelLite(n)}},{key:"saveHardwareFittingModelLite",value:function(e){var t=this.stateManager.core.pad;e.forEach((function(e){var r=t.findModelOrAssemblyModelById(e.id);if(r){var n=e.__changeMap.update;(void 0===n?[]:n).forEach((function(t){"isHidden"===t.field&&r.setInvisible(e.getHidden())})),e.__changeMap.update=[]}})),lm().viewer.triggerReducer()}},{key:"saveFittingModelLite",value:function(e){var t=this.stateManager.core.fittingDesign.getFittings(),r=this.stateManager.core.fittingDesign.getGrooveFittings(),n=this.stateManager.core.fittingDesign.getFittingHintModels();e.forEach((function(e){var i;e.modelType===l.HARDWARE_GROOVE?i=r.find((function(t){return t.id===e.id})):e.modelType!==l.HOLE&&e.modelType!==l.GROOVE||(i=t.find((function(t){return t.id===e.id})));var o=n.find((function(t){return t.linkModel.id===e.id}));if(i){var A=e.__changeMap.update;(void 0===A?[]:A).forEach((function(t){"isHidden"===t.field&&(null==i||i.setVisible(!e.getHidden()),null==o||o.setVisible(!e.getHidden()))})),e.__changeMap.update=[]}}))}}])&&QI(t.prototype,r),n&&QI(t,n),o}(Ad);function RI(e){return(RI="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function MI(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function xI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function PI(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?xI(Object(r),!0).forEach((function(t){TI(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xI(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function TI(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function FI(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function OI(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function LI(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function NI(e,t){return(NI=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function kI(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=UI(e);if(t){var i=UI(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return GI(this,r)}}function GI(e,t){return!t||"object"!==RI(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function UI(e){return(UI=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var jI=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&NI(e,t)}(a,e);var t,r,n,i,o,A=kI(a);function a(){var e;return OI(this,a),(e=A.apply(this,arguments)).state=e.stateCreator.create({intersectedLoading:vp.FAIL,intersectedResult:void 0,intersectedVisible:!1}),e.$reducerState=e.reducerCreator.create(e.state),e._getParamModelIntersectedCallback=[],e.$actionLoadParamModelIntersectedData=e.unitCreator.async((function(t){t.started.every(s.a.mark((function e(t,r){var n,i,o,A,a,u,c,l,g;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,vd(t.modelId);case 2:return n=e.sent,i=Xh(Ff),o=t.modelId,A=void 0===o?n.modelid:o,a=t.defer,u=FI(t,["modelId","defer"]),c=WC().viewParamModel.state.state.currModelId===A,l=this.$actionLoadParamModelIntersectedData,e.prev=7,e.next=10,i.getIntersectedById(PI({modelId:A},u));case 10:if(g=e.sent,!c){e.next=14;break}return e.next=14,l.done.dispatch({params:t,result:{result:g,modelId:A}});case 14:a&&a.resolve(g),e.next=22;break;case 17:return e.prev=17,e.t0=e.catch(7),e.next=21,l.failed.dispatch({params:t});case 21:a&&a.reject(e.t0);case 22:case"end":return e.stop()}}),e,this,[[7,17]])}))),t.done.every((function(t,r){var n=t.params.defer,i=WC().viewParamModel.state.state.currModelId;n&&n.resolve(t.result.result),t.result.modelId===i&&e.$actionAddIntersectedDataToSense.dispatch(t.result.result)})),t.failed.every((function(t,r){e._getParamModelIntersectedCallback.forEach((function(e){e.reject(new Error("load json error!"))}))})),t.started.produce(e.$reducerState,(function(e,t){e.intersectedLoading=vp.LOADING})),t.done.produce(e.$reducerState,(function(e,t){e.intersectedLoading=vp.SUCCESS,e.intersectedResult=t.result.result})),t.failed.produce(e.$reducerState,(function(e,t){e.intersectedLoading=vp.FAIL}))})),e.$actionAddIntersectedDataToSense=e.unitCreator.sync((function(t){t.every((function(t,r){var n=r.core,i=n.fittingDesign,o=n.pad,A=e.state.state.intersectedVisible,a=e.app.axr.axrs.fittingDesign.senseSetting.getSenseSettings(),s=a.intersectedColor,u=a.intersectedBodyColor,c=a.intersectedThroughColor,l=a.grooveIntersectedColor,f=a.grooveIntersectedBodyColor;i.setIntersects([]);var p=t.option,d=void 0===p?{}:p,I=t.intersectedGroups,y=Object(tr.map)(I,(function(e){var t=!0===d.references?1:0,r=e.intersecteds[t],n=r["@type"],i=e.intersectType;if(void 0!==d.plankFaceIds){var A=Id(r)?null:r.plankFaceId;if(!d.plankFaceIds.includes(A))return!1}var a=o.findModelOrAssemblyModelById(r.linkedModelId);if(a){var p=Pi(e,r,a),I=new Map([[h.BOTH_PLANK,new Map([[g.FACE,s],[g.SHELL,u],[g.THROUGH_SHELL,c]])],[h.PLANK_FURNITURE,new Map([[g.FACE,l],[g.SHELL,f]])]]).get(i).get(n);return p.setViewColor(I),p}})).filter((function(e){return!!e}));i.setIntersects(y),A||r.kaf.invisibleManager.hide("scene3d",Tp,y.map((function(e){return e.id})))}))})),e.$actionToggleShowIntersected=e.unitCreator.sync((function(t){t.latest((function(e,t){var r=t.core.fittingDesign;e?t.kaf.invisibleManager.display("scene3d",Tp,r.getIntersects().map((function(e){return e.id}))):t.kaf.invisibleManager.hide("scene3d",Tp,r.getIntersects().map((function(e){return e.id})))})),t.produce(e.$reducerState,(function(e,t){e.intersectedVisible=t}))})),e.toggleShowIntersectGroupData=function(t){var r=e.state.state.intersectedResult;if(!r)throw new Error("暂无交接数据!");e.$actionAddIntersectedDataToSense.dispatch(PI(PI({},r),{},{option:t}))},e}return t=a,(r=[{key:"getParamModelIntersectedData",value:(i=s.a.mark((function e(t){var r,n,i,o,A,a,u,c,l,g=this;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=WC().viewParamModel.state.state.currModelId,i=(n=t||{}).timeout,o=void 0===i?5e4:i,A=n.modelId,a=void 0===A?r:A,u=FI(n,["timeout","modelId"]),c=fd(o),this.$actionLoadParamModelIntersectedData.started.dispatch(PI(PI({modelId:a},u),{},{defer:c})),this._getParamModelIntersectedCallback.push(c),l=function(){var e=g._getParamModelIntersectedCallback.indexOf(c);g._getParamModelIntersectedCallback.splice(e,1)},e.abrupt("return",c.promise.then((function(e){return l(),e})).catch((function(e){return l(),Promise.reject(e)})));case 7:case"end":return e.stop()}}),e,this)})),o=function(){var e=this,t=arguments;return new Promise((function(r,n){var o=i.apply(e,t);function A(e){MI(o,r,n,A,a,"next",e)}function a(e){MI(o,r,n,A,a,"throw",e)}A(void 0)}))},function(e){return o.apply(this,arguments)})}])&&LI(t.prototype,r),n&&LI(t,n),a}(Ad);function VI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function HI(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?VI(Object(r),!0).forEach((function(t){YI(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):VI(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function YI(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function KI(e,t){var r=t.x/2,n=t.y/2,i=t.z/2,o=[{x:-r,y:-n,z:i},{x:r,y:-n,z:i},{x:r,y:n,z:i},{x:-r,y:n,z:i}],A=o.map((function(e){return HI(HI({},e),{},{z:-e.z})}));switch(e){case 0:return o;case 1:return[o[0],A[0],A[3],o[3]];case 2:return[o[0],A[0],A[1],o[1]];case 3:return[o[1],A[1],A[2],o[2]];case 4:return[o[2],A[2],A[3],o[3]];case 5:return A}return[]}function qI(e){return(qI="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function JI(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function WI(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function zI(e,t){return(zI=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function XI(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=$I(e);if(t){var i=$I(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return ZI(this,r)}}function ZI(e,t){return!t||"object"!==qI(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function $I(e){return($I=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ey={outline:{color:"#ff4d4f",opacity:.5},plankFace:{color:"#9318ff",opacity:.5}},ty=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&zI(e,t)}(o,e);var t,r,n,i=XI(o);function o(){var e;return JI(this,o),(e=i.apply(this,arguments)).state=e.stateCreator.create({option:{},defaultConfig:ey}),e.$reducerState=e.reducerCreator.create(e.state),e.$actionUpdateDefaultOption=e.unitCreator.sync((function(t){t.produce(e.$reducerState,(function(e,t){e.defaultConfig=Object(tr.extend)({},e.defaultConfig,t)}))})),e.$actionUpdateHintOption=e.unitCreator.sync((function(t){t.latest((function(){e.rerenderToSense()})),t.produce(e.$reducerState,(function(e,t){e.option=t}))})),e}return t=o,(r=[{key:"setDefaultHintConfig",value:function(e){this.$actionUpdateDefaultOption.dispatch(e)}},{key:"setModelHint",value:function(e){var t=this,r=Object(tr.mapValues)(e,(function(e){return function(e,t){var r={};return Object(tr.isObject)(e.hintOutline)?r.hintOutline=e.hintOutline:!0===e.hintOutline&&(r.hintOutline=t.outline),e.hintPlankFace&&e.hintPlankFace.length&&(r.hintPlankFace=e.hintPlankFace.map((function(e){var r="color"in e?e:t.plankFace,n=r.color,i=r.opacity;return Object(tr.isArray)(e.plankFaceId)?e.plankFaceId.map((function(e){return{color:n,opacity:i,plankFaceId:e}})):{plankFaceId:e.plankFaceId,color:n,opacity:i}})).flat()),r}(e,t.state.state.defaultConfig)}));this.$actionUpdateHintOption.dispatch(r)}},{key:"clearModelHint",value:function(e){var t=e?Object(tr.omit)(this.state.state.option,e):{};this.setModelHint(t)}},{key:"rerenderToSense",value:function(){var e=this.stateManager.core,t=e.fittingDesign,r=e.pad,n=this.state.state.option,i=Object(tr.map)(n,(function(e,t){var n=r.findModelOrAssemblyModelById(t);if(n)return function(e,t){var r={linkModel:t};if(e.hintPlankFace&&e.hintPlankFace.length){var n=t.getSize();r.plankFaces=e.hintPlankFace.map((function(e){var t=ri(e.plankFaceId,at.a).mul(.1),r=KI(e.plankFaceId,n).map((function(e){var r=new at.a(e).add(t);return{x:r.x,y:r.y,z:r.z}}));return HI(HI({},e),{},{points:r})}))}if(e.hintOutline&&(r.hintOutline=e.hintOutline),r.plankFaces||r.hintOutline)return new Kn(r)}(e,n)})).filter((function(e){return!!e}));t.setPlankFaceHintModels(i)}}])&&WI(t.prototype,r),n&&WI(t,n),o}(Ad);function ry(e){return(ry="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ny(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function iy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function oy(e,t){return(oy=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ay(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=sy(e);if(t){var i=sy(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return ay(this,r)}}function ay(e,t){return!t||"object"!==ry(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function sy(e){return(sy=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var uy=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&oy(e,t)}(o,e);var t,r,n,i=Ay(o);function o(){var e;return ny(this,o),(e=i.apply(this,arguments)).state=e.stateCreator.create({intersectedColor:16729344,intersectedBodyColor:16711935,intersectedThroughColor:9498256,grooveIntersectedColor:12092939,grooveIntersectedBodyColor:16776960,holeColor:65280,grooveColor:2003199,renderIgnoreCategory:Je,holeOpacity:1,grooveOpacity:1}),e.$reducerState=e.reducerCreator.create(e.state),e.$actionSenseSetting=e.unitCreator.sync((function(t){t.produce(e.$reducerState,(function(e,t){t.renderIgnoreCategory&&(t.renderIgnoreCategory=Object(tr.castArray)(t.renderIgnoreCategory)),Object(tr.extend)(e,t)}))})),e}return t=o,(r=[{key:"getSenseSettings",value:function(){return this.state.state}}])&&iy(t.prototype,r),n&&iy(t,n),o}(Ad);function cy(e){return(cy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ly(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function fy(e,t){return(fy=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function hy(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=dy(e);if(t){var i=dy(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return py(this,r)}}function py(e,t){return!t||"object"!==cy(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function dy(e){return(dy=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Iy=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&fy(e,t)}(o,e);var t,r,n,i=hy(o);function o(){var e;return ly(this,o),(e=i.apply(this,arguments)).fittingDesignSense=e.partialCreator.create(AI),e.intersected=e.partialCreator.create(jI),e.senseSetting=e.partialCreator.create(uy),e.fittingModel=e.partialCreator.create(DI),e.plankFaceHint=e.partialCreator.create(ty),e.fittingHint=e.partialCreator.create(hI),e}return t=o,(r=[{key:"module",value:function(){return"FittingDesign"}}])&&gy(t.prototype,r),n&&gy(t,n),o}(qi.AXR),yy=r(722),Cy=r.n(yy);function Ey(e){return(Ey="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function By(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function my(e,t){return(my=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Qy(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=_y(e);if(t){var i=_y(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return by(this,r)}}function by(e,t){return!t||"object"!==Ey(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _y(e){return(_y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Sy=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&my(e,t)}(o,e);var t,r,n,i=Qy(o);function o(){return By(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"getHidden",value:function(){return this.isHidden}},{key:"setHidden",value:function(e){this.__trackUpdateField({type:W.ATTRIBUTE,attr:"isHidden"},this.isHidden,e),this.isHidden=e}}])&&vy(t.prototype,r),n&&vy(t,n),o}(De);function wy(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Dy(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?wy(Object(r),!0).forEach((function(t){Ry(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wy(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ry(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var My={x:0,y:0,z:0},xy={x:0,y:0,z:0};function Py(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Map,n=arguments.length>3?arguments[3]:void 0,i=t.category,o=t.origin,A=new Sy,a=!(e instanceof jt)||e.isRoot(),s=n||a?e:e.getRoot(),u=s instanceof jt;A.id=s.id,A.isRoot=!u||s.isRoot(),A.isHidden=!!s.getInvisible();var c=$.ASSEMBLY;if(u?c=$.COMMON:e.isTemplateAssembly()&&(c=$.TEMPLATE_ASSEMBLY),A.modelType=c,A.position=A.isRoot?My:s.getPosition(),A.rotation=A.isRoot?xy:s.getRotation(),A.size="function"==typeof s.getScaledSize?s.getScaledSize():s.getSize(),A.params=Fy(s),A.category=i||s.getCategory().categoryId,u){var l=s.getModel();A.productId=null==l?void 0:l.obsBrandGoodId}return n&&(A.root=n),A.isRoot&&(A._origin=o),A.children=(u?s.getChildren():s.getParamModels()).map((function(e){return Py(e,t,r,n||A)})),A.accessories=(u?s.getAccessories():[]).map((function(e){return Py(e,t,r,n||A)})),r.set(A.id,A),s!==e&&r.has(e.id)?r.get(e.id):A}function Ty(e,t){var r=e.isRoot?e:e.root;if(!r)return{};var n=r._changeMap,i=t.getUnSafeParamModelFromParamModelLite(r);if(!i)return{};var o=i.getCustom(),A=n.cloned;return A&&(i=i.clone(!1)),i=function e(t,r,n,i){var o=t._changeMap;if(o.cloned&&o.deleted)return;if(o.deleted)return n.dispose(),n;var A=o.update,a=void 0===A?[]:A,s=o.addNodes,u=void 0===s?[]:s,c=i?Dy({},i):{parentModelLite:t,parentModel:n,rootModelLite:t,rootModel:n};a.forEach((function(e){if(e.type===W.ATTRIBUTE)switch(e.attr){case"position":n.setPosition(t.getPosition());break;case"rotate":n.setRotation(t.getRotation());break;case"isHidden":n.setInvisible(t.getHidden()),function(e){var t=e.getInvisible();WC().entry.getStateManager().core.fittingDesign.getPlankOutlineHintModels().forEach((function(r){r.linkModel.id===e.id&&r.setVisible(!t)}))}(n)}if(e.type===W.STORE){var i=n.getParamStore().getParam(e.attr),o=t.getParam(e.attr);if(i&&o){var A=o.getValue();[ui.ParamType.MATERIAL,ui.ParamType.SHAPE].includes(i.getType())&&(A=r.getUnSafeObsBrandGoodToBrandGoodId(A)),A&&i.setValue(A),o.getPrimitiveOverride()!==i.getPrimitiveOverride()&&i.setPrimitiveOverride(o.getPrimitiveOverride())}}})),u.forEach((function(i){var o=i.type,A=i.linkId,a=(o===Z.CHILD?t.getChild():t.getAccessory()).find((function(e){return e.id===A}));if(a){var s=r.getUnSafeParamModelFromParamModelLite(a);s&&((a._changeMap.cloned||a._origin!==K.SENSE)&&(s=s.clone(!1)),o===Z.CHILD?(s.setIsAppend(!0),s.setAppendType(Cy.a.CENTER),n.addChild(s)):n.addAccessory(s),e(a,r,s,Dy(Dy({},c),{},{parentModel:n,parentModelLite:t})),(a._changeMap.cloned||a._origin!==K.SENSE)&&s.assignUniqueId())}}));var l=function(i){return function(o){if(!u.some((function(e){return e.type===i&&e.linkId===o.id}))){var A=i===Z.ACCESSORY?n.getAccessories():n.getChildren(),a=o._changeMap.originId||o.id,s=A.find((function(e){return e.id===a}));s&&e(o,r,s,Dy(Dy({},c),{},{parentModel:n,parentModelLite:t}))}}};return t.getChild().forEach(l(Z.CHILD)),t.getAccessory().forEach(l(Z.ACCESSORY)),n}(r,t,i),A&&i&&i.assignUniqueId(),{create:A,custom:o,model:i}}function Fy(e){var t=new Map;return e.getParamStore().forEach((function(e,r){t.set(r,function(e){var t=new ye;if(t.data={type:e.getType(),displayName:e.getDisplayName(),name:e.getName(),value:e.getValue(),max:e.getMax(),min:e.getMin(),editable:e.getEditable(),optionValues:e.getOptionValues(),recommendValues:e.getRecommendValues(),primitiveOverride:e.getPrimitiveOverride(),step:e.getStep()},[V.MATERIAL,V.SHAPE].includes(t.getType())){var r=e.getProduct();t.data.value=r?r.obsBrandGoodId:""}return t}(e))})),t}var Oy=r(125),Ly=r.n(Oy),Ny={maxAge:6e5,max:20},ky=(Dp.SHADING,Dp.OUTLINE_WITH_SHADING,Dp.TRANSLUCENT,Dp.OUTLINE_AND_TRANSLUCENT,[st.ParamModelType.PARAM_ENTITY,st.ParamModelType.PARAM_FURNITURE,st.ParamModelType.PARAM_PRIMITIVE]);function Gy(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Uy(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Gy(Object(r),!0).forEach((function(t){jy(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Gy(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function jy(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Vy(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function Hy(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){Vy(o,n,i,A,a,"next",e)}function a(e){Vy(o,n,i,A,a,"throw",e)}A(void 0)}))}}Ly()(function(){var e=Hy(s.a.mark((function e(t){var r,n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Rc(),e.next=3,r.gzipPost("/dcs/api/c/products/available",{obsBgIds:t});case 3:return n=e.sent,e.abrupt("return",n.data);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Uy({promise:!0},Ny));function Yy(){return(Yy=Hy(s.a.mark((function e(t){var r,n,i,o,A;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Rc().gzipPost("/dcs-resource/api/c/productdata/obsbgid",{obsBgIds:t});case 2:if(r=e.sent,n=r.data,i=n.c,o=n.m,A=n.d,"0"!==i){e.next=11;break}return e.abrupt("return",A);case 11:throw new Error(i+o);case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ky(){return(Ky=Hy(s.a.mark((function e(t){var r,n,i,o,A;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Rc().gzipPost("/dcs-resource/api/c/productdata/bgid",{bgIds:t});case 2:if(r=e.sent,n=r.data,i=n.c,o=n.m,A=n.d,"0"!==i){e.next=11;break}return e.abrupt("return",A);case 11:throw new Error(i+o);case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var qy=Ly()((function(e){return Yy.apply(this,arguments)}),Uy(Uy({},Ny),{},{promise:!0})),Jy=Ly()((function(e){return Ky.apply(this,arguments)}),Uy(Uy({},Ny),{},{promise:!0}));function Wy(e){return function(e){if(Array.isArray(e))return zy(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return zy(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return zy(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function zy(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Xy(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function Zy(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var $y=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.cached=new Map}var t,r,n,i,o;return t=e,(r=[{key:"setProduct",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"__global__",r=this.cached.get(t);r||(r=new Map,this.cached.set(t,r)),r.set(e.brandGoodId,e.obsBrandGoodId),r.set(e.obsBrandGoodId,e.brandGoodId)}},{key:"getToggledBrandGood",value:function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"__global__";return null===(t=this.cached.get(r))||void 0===t?void 0:t.get(e)}},{key:"removeCachedModel",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"__global__";this.cached.delete(e)}},{key:"safeGetToggleBrandGood",value:(i=s.a.mark((function e(t){var r,n,i,o,A,a,u=this,c=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=c.length>1&&void 0!==c[1]?c[1]:"__global__",n=Object(tr.castArray)(t),i=[],o=[],A=new Map,n.forEach((function(e){var t=u.getToggledBrandGood(e,r);t?A.set(e,t):/^[0-9]$/.test(e.toString())?o.push(e):i.push(e)})),a=function(e){return[].concat(Wy(e.hardwares||[]),Wy(e.textures||[]),Wy(e.virtualModels||[]),Wy(e.paramModelProducts||[]),Wy(e.moldings||[]))},!i.length){e.next=12;break}return e.next=10,qy(i).then(a);case 10:e.sent.forEach((function(e){u.setProduct(e,r)}));case 12:if(!o.length){e.next=17;break}return e.next=15,Jy(o).then(a);case 15:e.sent.forEach((function(e){u.setProduct(e,r)}));case 17:return[].concat(i,o).forEach((function(e){var t=u.getToggledBrandGood(e,r);t&&A.set(e,t)})),e.abrupt("return",A);case 19:case"end":return e.stop()}}),e)})),o=function(){var e=this,t=arguments;return new Promise((function(r,n){var o=i.apply(e,t);function A(e){Xy(o,r,n,A,a,"next",e)}function a(e){Xy(o,r,n,A,a,"throw",e)}A(void 0)}))},function(e){return o.apply(this,arguments)})}])&&Zy(t.prototype,r),n&&Zy(t,n),e}();function eC(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function tC(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){eC(o,n,i,A,a,"next",e)}function a(e){eC(o,n,i,A,a,"throw",e)}A(void 0)}))}}function rC(e){return function(e){if(Array.isArray(e))return nC(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return nC(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return nC(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function nC(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function iC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function oC(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var AC=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new $y;iC(this,e),this.callback=t,this.brandGoodsTranslate=r,this.cached=new Map,this.models=[]}var t,r,n,i;return t=e,(r=[{key:"getParamModelFromId",value:function(e){if(this.cached.has(e))return this.cached.get(e);var t=this.callback(e);return t?(this.cached.set(e,t),t):void 0}},{key:"getUnSafeParamModel",value:function(e){return this.cached.get(e)}},{key:"getUnSafeObsBrandGoodToBrandGoodId",value:function(e){return this.brandGoodsTranslate.getToggledBrandGood(e)}},{key:"addParamModelLite",value:function(){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];(e=this.models).push.apply(e,rC(r.map((function(e){return e.root||e}))))}},{key:"getUnSafeParamModelFromParamModelLite",value:function(e){var t,r=e.root||e;switch(e._origin||r._origin){case K.BRANDGOOD:case K.CATEGORY:break;case K.SENSE:var n=r._changeMap.originId||r.id;t=this.getUnSafeParamModel(n)}if(!t||r===e)return t;for(var i,o=e._changeMap.originId||e.id,A=[t];i=A.pop();){if(i.id===o)return i;A.push.apply(A,rC(i.getChildNodes()))}}},{key:"attach",value:(i=tC(s.a.mark((function e(){var t,r,n,i,o,A,a,u,c=this;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this.models,r={modelIds:[],category:[],brandGoodIds:[]},n=[];case 3:if(!(i=t.pop())){e.next=18;break}A=(o=i)._changeMap,a=o._origin,e.t0=a,e.next=e.t0===K.SENSE?8:e.t0===K.CATEGORY||e.t0===K.BRANDGOOD||e.t0===K.TEMPLATE_ID?11:12;break;case 8:return u=A.originId||i.id,r.modelIds.push(u),e.abrupt("break",12);case 11:return e.abrupt("break",12);case 12:if(!A.deleted){e.next=14;break}return e.abrupt("continue",3);case 14:A.update&&A.update.forEach((function(e){if(i&&e.type===W.STORE&&i.hasParam(e.attr)){var t=i.getParam(e.attr);t&&[V.MATERIAL,V.SHAPE].includes(t.getType())&&t.getValue()&&n.push(t.getValue())}})),t.push.apply(t,rC(i.getChild()).concat(rC(i.getAccessory()))),e.next=3;break;case 18:return e.next=20,Promise.allSettled(rC(Object(tr.uniq)(r.modelIds).map(function(){var e=tC(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",c.getParamModelFromId(t));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())));case 20:return e.next=22,this.brandGoodsTranslate.safeGetToggleBrandGood(n);case 22:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})}])&&oC(t.prototype,r),n&&oC(t,n),e}(),aC=r(733);function sC(e){return(sC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function uC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cC(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function lC(e,t,r){return(lC="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=pC(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function gC(e,t){return(gC=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function fC(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=pC(e);if(t){var i=pC(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return hC(this,r)}}function hC(e,t){return!t||"object"!==sC(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function pC(e){return(pC=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var dC=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&gC(e,t)}(o,e);var t,r,n,i=fC(o);function o(){var e;return uC(this,o),(e=i.apply(this,arguments)).$actionInit=e.unitCreator.sync((function(e){e.latest(s.a.mark((function e(t,r){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.getAxr(Zp),e.next=3,Object(Mp.take)([n.$actionLoad.done.messageType(),n.$actionAddModelToSense.done.messageType(),n.$actionAddParamModelToSense.done.messageType(),n.$actionAddParamModelAssemblyToSense.done.messageType()]);case 3:if(n.state.state.main!==mp.SUCCESS){e.next=13;break}return e.next=6,Object(Mp.put)(this.$actionSetCamera.message(!0));case 6:return e.next=9,Object(Mp.take)(this.$actionSyncCamera.messageType());case 9:return e.next=11,Object(Mp.put)(this.$actionSetCamera.message(!1));case 11:e.next=6;break;case 13:case"end":return e.stop()}}),e,this)})))})),e.$actionSyncCamera=e.unitCreator.sync((function(e){})),e.$actionSetCamera=e.unitCreator.sync((function(e){e.latest(s.a.mark((function e(t,r){var n,i,o,A,a,u;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=r.core.design.getCustom(),i=n.getParamModels(),o=n.getParamModelAssemblies(),(A=r.scene3D).updateEnableCameraAnimation(!1),a=i.length?Object(aC.computeAssemblyBox)(i.map((function(e){return e.getBox3()})),i[0].getMatrix4()):Object(aC.computeAssemblyBox)(o.map((function(e){return e.getBox3()})),o[0].getMatrix4()),u=cd(a),A.updateInitCameraAttributes(u),t?r.scene3D.reset():r.scene3D.resetDistanceAndLookAt();case 9:case"end":return e.stop()}}),e)})))})),e}return t=o,(r=[{key:"init",value:function(){lC(pC(o.prototype),"init",this).call(this),this.$actionInit.dispatch()}}])&&cC(t.prototype,r),n&&cC(t,n),o}(Ad);function IC(e){return(IC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function yC(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=EC(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function CC(e){return function(e){if(Array.isArray(e))return BC(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||EC(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function EC(e,t){if(e){if("string"==typeof e)return BC(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?BC(e,t):void 0}}function BC(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function vC(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function mC(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){vC(o,n,i,A,a,"next",e)}function a(e){vC(o,n,i,A,a,"throw",e)}A(void 0)}))}}function QC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bC(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _C(e,t,r){return(_C="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=RC(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function SC(e,t){return(SC=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function wC(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=RC(e);if(t){var i=RC(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return DC(this,r)}}function DC(e,t){return!t||"object"!==IC(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function RC(e){return(RC=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var MC=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&SC(e,t)}(u,e);var t,r,n,i,o,A,a=wC(u);function u(){var e;return QC(this,u),(e=a.apply(this,arguments)).cameraController=e.partialCreator.create(dC),e.state=e.stateCreator.create({renderMode:ia.RenderMode.SHADING,translucent:!1,selectable:!0}),e.$reducerState=e.reducerCreator.create(e.state),e.$actionMergeState=e.unitCreator.sync((function(t){t.produce(e.$reducerState,(function(e,t){Object.assign(e,t)}))})),e.$actionToggleRenderMode=e.unitCreator.sync((function(e){e.latest(s.a.mark((function e(t,r){var n,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=ia.RenderMode.SHADING,i=!1,e.t0=t.mode,e.next=e.t0===Dp.SHADING?5:e.t0===Dp.OUTLINE_WITH_SHADING?7:e.t0===Dp.TRANSLUCENT?9:e.t0===Dp.OUTLINE_AND_TRANSLUCENT?11:14;break;case 5:return n=ia.RenderMode.SHADING,e.abrupt("break",14);case 7:return n=ia.RenderMode.OUTLINE_WITH_SHADING,e.abrupt("break",14);case 9:return i=!0,e.abrupt("break",14);case 11:return n=ia.RenderMode.OUTLINE_WITH_SHADING,i=!0,e.abrupt("break",14);case 14:return e.next=16,Object(Mp.put)(this.$actionMergeState.message({renderMode:n,translucent:i}));case 16:lm().viewer.toggleShowModelOutline(n===ia.RenderMode.OUTLINE_WITH_SHADING),r.scene3D.updateRenderMode(n),lm().viewer.triggerReducer(),this.emit(Sp.renderModeChange);case 20:case"end":return e.stop()}}),e,this)})))})),e.$actionToggleRenderBorder=e.unitCreator.sync((function(e){e.latest(s.a.mark((function e(t,r){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t?ia.RenderMode.OUTLINE_WITH_SHADING:ia.RenderMode.SHADING,e.next=3,Object(Mp.put)(this.$actionMergeState.message({renderMode:n}));case 3:lm().viewer.toggleShowModelOutline(n===ia.RenderMode.OUTLINE_WITH_SHADING),r.scene3D.updateRenderMode(n),this.emit(Sp.renderModeChange);case 6:case"end":return e.stop()}}),e,this)})))})),e.$actionToggleRenderTranslucent=e.unitCreator.sync((function(e){e.latest(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(Mp.put)(this.$actionMergeState.message({translucent:t}));case 2:lm().viewer.triggerReducer(),this.emit(Sp.renderModeChange);case 4:case"end":return e.stop()}}),e,this)})))})),e.$actionToggleSelectModel=e.unitCreator.sync((function(e){e.every(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(Mp.put)(this.$actionMergeState.message({selectable:t}));case 2:case"end":return e.stop()}}),e,this)})))})),e}return t=u,(r=[{key:"module",value:function(){return"scene"}},{key:"init",value:function(){var e=this;_C(RC(u.prototype),"init",this).call(this),lm().viewer.registerReducer((function(t,r,n){n.opacity=e.state.state.translucent?wp.translucentModel:wp.opaqueModel})),lm().viewer.registerReducer((function(e,t,r){r.visible=!e.getInvisible()}))}},{key:"getAllParamModels",value:function(){return this.stateManager.core.design.getCustom().getParamModels().filter((function(e){return!e.isAppendHardware}))}},{key:"getAllCustomModels",value:(A=mC(s.a.mark((function e(){var t;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.getAllParamModels(),e.abrupt("return",t.map((function(e){return Py(e,{origin:K.SENSE})})));case 2:case"end":return e.stop()}}),e,this)}))),function(){return A.apply(this,arguments)})},{key:"getCustomModelById",value:(o=mC(s.a.mark((function e(t){var r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(r=this.getStateManager().core.pad.findModelOrAssemblyModelById(t))){e.next=3;break}return e.abrupt("return",Py(r,{origin:K.SENSE}));case 3:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"save",value:(i=mC(s.a.mark((function e(t){var r,n,i,o,A,a,u,c,l;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t,n=this.getStateManager().core.pad,(i=new AC(n.findModelOrAssemblyModelById)).addParamModelLite.apply(i,CC(r)),e.next=6,i.attach();case 6:return e.next=8,Promise.all(r.map((function(e){return Ty(e,i)})));case 8:o=e.sent,A=[],a=[],u=yC(o);try{for(u.s();!(c=u.n()).done;)(l=c.value).create&&l.custom&&l.model&&A.push(l),!l.create&&l.model&&a.push(l.model)}catch(e){u.e(e)}finally{u.f()}(A.length||a.length)&&A.length&&A.forEach((function(e){var t;null===(t=e.custom)||void 0===t||t.addParamModels(e.model)})),lm().viewer.triggerReducer();case 15:case"end":return e.stop()}}),e,this)}))),function(e){return i.apply(this,arguments)})}])&&bC(t.prototype,r),n&&bC(t,n),u}(qi.AXR);function xC(e){return(xC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function PC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function TC(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?PC(Object(r),!0).forEach((function(t){FC(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):PC(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function FC(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function OC(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,i=!1,o=void 0;try{for(var A,a=e[Symbol.iterator]();!(n=(A=a.next()).done)&&(r.push(A.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(i)throw o}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return LC(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return LC(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function LC(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function NC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kC(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function GC(e,t,r){return(GC="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=HC(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function UC(e,t){return(UC=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function jC(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=HC(e);if(t){var i=HC(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return VC(this,r)}}function VC(e,t){return!t||"object"!==xC(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function HC(e){return(HC=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var YC={rawSelected:[],selectedData:[],selectedDataV2:[]},KC=function(e,t){var r=e.entityId+"%%"+e.entityType.toString(),n=t.entityId+"%%"+t.entityType.toString();return r>n?1:r===n?0:-1},qC=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&UC(e,t)}(o,e);var t,r,n,i=jC(o);function o(){var e;return NC(this,o),(e=i.apply(this,arguments)).state=e.stateCreator.create(YC).mutable(),e.onModelsChange=function(){var t=e.selected.map((function(t){return e.stateManager.core.pad.findModel(t.entityId)})).filter((function(e){return!!e})),r=e.state.state.selectedData;t.length===r.length&&Object(tr.unzip)([t,r]).every((function(e){var t=OC(e,2);return t[0]===t[1]}))||(e.state.reduce((function(e){return TC(TC({},e),{},{selectedData:t})})),e.emit(o.EVENT_SELECT_CHANGED))},e.onModelChangeV2=function(){setTimeout((function(){e.onModelsChange()}),0);var t=e.stateManager.core,r=t.pad,n=t.fittingDesign,i=n.getFittings(),A=n.getGrooveFittings(),a=e.rawSelected.map((function(e){switch(e.entityType){case LA:return r.findModelEx(e.entityId,Lu);case OA:return r.findParamModelAssembly(e.entityId);case xp:return i.find((function(t){return t.id===e.entityId}));case Pp:return A.find((function(t){return t.id===e.entityId}));default:return}})).filter((function(e){return!!e})),s=e.state.state.selectedDataV2;s.length===a.length&&Object(tr.unzip)([s,a]).every((function(e){var t=OC(e,2);return t[0]===t[1]}))||(e.state.reduce((function(e){return TC(TC({},e),{},{selectedDataV2:a})})),e.emit(o.EVENT_SELECT_CHANGED_V2))},e._onSelectionChange=function(){e.onStateChange()},e}return t=o,(r=[{key:"module",value:function(){return"select"}},{key:"select",value:function(e){this.selectionStateManager.select(e)}},{key:"unSelect",value:function(e){this.selectionStateManager.unSelect(e)}},{key:"getSelected",value:function(){return this.state.state.selectedData}},{key:"selectionStateManager",get:function(){return this.stateManager.core.kaf.selection}},{key:"init",value:function(){GC(HC(o.prototype),"init",this).call(this),this.enable()}},{key:"release",value:function(){this.disable(),GC(HC(o.prototype),"release",this).call(this)}},{key:"onEnable",value:function(e){GC(HC(o.prototype),"onEnable",this).call(this,e),this.rawSelected=[],this.selected=[],this.selectionStateManager.on(ds.UPDATE,this._onSelectionChange),this.stateManager.core.pad.on(Nu.EVENT_PARAM_MODELS_CHANGED,this.onModelChangeV2),$t.on(zt.FITTING_MODEL_CHANGE,this.onModelChangeV2),this.onStateChange()}},{key:"onDisable",value:function(e){this.stateManager.core.pad.off(Nu.EVENT_PARAM_MODELS_CHANGED,this.onModelChangeV2),$t.off(zt.FITTING_MODEL_CHANGE,this.onModelChangeV2),this.state.reduce((function(){return YC})),this.selectionStateManager.off(ds.UPDATE,this._onSelectionChange),this.rawSelected=[],this.selected=[],GC(HC(o.prototype),"onDisable",this).call(this,e)}},{key:"onStateChange",value:function(){var e=this.selectionStateManager.state.value;if(e.sort(KC),this.rawSelected!==e){this.rawSelected=e;var t=this.resolveSelected(e)||[];this.selectedIsChanged(this.selected,t)&&(this.selected=t),this.onModelChangeV2()}}},{key:"resolveSelected",value:function(e){return e.filter((function(e){return e.entityType===LA}))}},{key:"selectedIsChanged",value:function(e,t){if(e.length!==t.length)return!0;if(0===e.length&&0===t.length)return!1;for(var r=e.map((function(e){return e.entityId+"%%"+e.entityType.toString()})),n=t.map((function(e){return e.entityId+"%%"+e.entityType.toString()})),i=0,o=n.length;i<o;++i)if(r[i]!==n[i])return!0;return!1}}])&&kC(t.prototype,r),n&&kC(t,n),o}(qi.AXR);qC.EVENT_SELECT_CHANGED="EVENT_SELECT_CHANGED",qC.EVENT_SELECT_CHANGED_V2="EVENT_SELECT_CHANGED_V2";var JC={entry:Zp,scene:MC,select:qC,fittingDesign:Iy,baseDesignInfo:hp,viewParamModel:kd};function WC(){return lm().axr.axrs}var zC=Object(FA.getConnector)(),XC=zC.connect,ZC=zC.setRootState;function $C(e,t,r){return XC((function(){return e(WC(),lm().getStateManager())}),t,r)}var eE=r(1133),tE=r.n(eE);function rE(e){return(rE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function nE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function iE(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function oE(e,t,r){return t&&iE(e.prototype,t),r&&iE(e,r),e}function AE(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&aE(e,t)}function aE(e,t){return(aE=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function sE(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=cE(e);if(t){var i=cE(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return uE(this,r)}}function uE(e,t){return!t||"object"!==rE(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function cE(e){return(cE=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var lE=Symbol("layout"),gE=$C((function(e){return{status:e.entry.state}}),(function(e){return{status:e.status.main}}),function(e){AE(r,e);var t=sE(r);function r(){return nE(this,r),t.apply(this,arguments)}return oE(r,[{key:"render",value:function(){return this.state.views.map((function(e){return e.content}))}}]),r}(Ji.MountPoint)),fE=function(e){AE(r,e);var t=sE(r);function r(){return nE(this,r),t.apply(this,arguments)}return oE(r,[{key:"render",value:function(){return zi.a.createElement(gE,{mountPointId:lE})}}]),r}(zi.a.PureComponent);function hE(e){return(hE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function pE(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function dE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function IE(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&yE(e,t)}function yE(e,t){return(yE=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function CE(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=BE(e);if(t){var i=BE(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return EE(this,r)}}function EE(e,t){return!t||"object"!==hE(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function BE(e){return(BE=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var vE=$C((function(e,t){return{scene3D:t.scene3D}}),(function(e){var t=e.scene3D;return{cameraType:t.cameraType,cameraAttributes:t.cameraAttributes,initCameraAttributes:t.initCameraAttributes,perspectiveCameraMode:t.perspectiveCameraMode,perspectiveCameraFov:t.perspectiveCameraFov,groundGridConfig:t.groundGridConfig,enableCameraAnimation:t.enableCameraAnimation,renderMode:t.renderMode}}),function(e){IE(r,e);var t=CE(r);function r(){return dE(this,r),t.apply(this,arguments)}return r}(Ji.Scene3D)),mE=$C((function(){return{}}),(function(){return{}}),function(e){IE(o,e);var t,r,n,i=CE(o);function o(){var e;return dE(this,o),(e=i.apply(this,arguments)).onInit=function(e){var t=e.viewer.config;t.autoInstance.enabled.set(!0),t.popMeshMerge.enabled.set(!0),t.background.active.set(ia.BackgroundMode.SolidColorBackground),t.background.solid.color.set(new ia.Color(_p.sceneBG)),t.ground.enabled.set(!1),t.postEffect.planarShadow.enabled.set(!1),t.postEffect.taa.enabled.set(!1),t.staticFrameCache.enabled.set(!1),t.isExtraCopyBeforeScreenEnabled.set(!1),t.postEffect.ao.enabled.set(!1),lm().viewer.onScene3DInit(e)},e.onGrabStart=function(){e.props.rootState.scene3D.updateEnableCameraAnimation(!1),e.props.rootState.scene3D.updateGrabing(!0)},e.onGrabEnd=function(){e.props.rootState.scene3D.updateGrabing(!1)},e.onZoomStart=function(){e.props.rootState.scene3D.updateEnableCameraAnimation(!1),e.props.rootState.scene3D.updateZooming(!0)},e.onZoomEnd=function(){e.props.rootState.scene3D.updateZooming(!1)},e.onCameraAnimationEnd=function(){e.props.rootState.scene3D.updateEnableCameraAnimation(!1)},e}return t=o,(r=[{key:"render",value:function(){var e=this.props,t=e.rootState.scene3D,r=e.containerId,n=e.size;return zi.a.createElement(vE,{onInit:this.onInit,cameraRotatable:!0,containerId:r,size:n,onGrabStart:this.onGrabStart,onGrabEnd:this.onGrabEnd,onZoomStart:this.onZoomStart,onZoomEnd:this.onZoomEnd,onScaleUpdate:t.updateScale,onCameraAttributesChange:t.updateCameraAttributes,onCameraAnimationEnd:this.onCameraAnimationEnd})}}])&&pE(t.prototype,r),n&&pE(t,n),o}(zi.a.PureComponent));function QE(e){return(QE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function bE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _E(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function SE(e,t){return(SE=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function wE(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=RE(e);if(t){var i=RE(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return DE(this,r)}}function DE(e,t){return!t||"object"!==QE(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function RE(e){return(RE=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ME=$C((function(e,t){return{scene3D:t.scene3D}}),(function(e){return{size:e.scene3D.size}}),function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&SE(e,t)}(o,e);var t,r,n,i=wE(o);function o(){var e;return bE(this,o),(e=i.apply(this,arguments)).rootRef=zi.a.createRef(),e.updateLayout=Object(tr.throttle)((function(){var t=e.rootRef.current;if(t){var r=t.getBoundingClientRect();e.props.rootState.scene3D.updateSize(new Yr.a(r.width,r.height))}}),200),e}return t=o,(r=[{key:"componentDidMount",value:function(){this.updateLayout(),window.addEventListener("resize",this.updateLayout)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.updateLayout),this.updateLayout.cancel()}},{key:"render",value:function(){var e=this.props,t=e.size,r=e.className;return zi.a.createElement("div",{ref:this.rootRef,id:bp.SCENE_ID,className:r},zi.a.createElement(mE,{containerId:bp.SCENE_ID,size:new u.Vector2d(t.x,t.y)}))}}])&&_E(t.prototype,r),n&&_E(t,n),o}(zi.a.PureComponent));r(2094);function xE(e){return(xE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function PE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function TE(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function FE(e,t){return(FE=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function OE(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=NE(e);if(t){var i=NE(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return LE(this,r)}}function LE(e,t){return!t||"object"!==xE(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function NE(e){return(NE=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var kE=$C((function(){return{}}),(function(){return{}}),function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&FE(e,t)}(o,e);var t,r,n,i=OE(o);function o(){return PE(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"render",value:function(){return zi.a.createElement(Ji.ViewMounter,{mountPointId:lE},zi.a.createElement(ME,{key:"s3",className:tE.a.scene3D}))}}])&&TE(t.prototype,r),n&&TE(t,n),o}(zi.a.PureComponent));function GE(e,t){return(GE=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function UE(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=VE(e);if(t){var i=VE(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return jE(this,r)}}function jE(e,t){return!t||"object"!==HE(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function VE(e){return(VE=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function HE(e){return(HE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var YE,KE=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":HE(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},qE=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":HE(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},JE=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&GE(e,t)}(r,e);var t=UE(r);function r(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(n=t.call(this)).$model=e,n.entityType=xp,n.entityId=e.id,n}return r}(Ji.Entity);JE=KE([Object(Ji.provideEntityAPIs)([new Ji.EntityAPIs.DrawableAPI3D((function(){var e=this;return{create:function(){return function(e){var t=e.$model.type;if(t===l.GROOVE)return WE(e);if(t===l.HOLE)return zE(e)}(e)},update:function(t){var r=e.$model,n=r.position,i=r.visible;t.position.set(n.x,n.y,n.z),t.visible=i,t.material&&(t.material.visible=i)}}})),new Ji.EntityAPIs.HighlightGeometryAPI3D((function(){return{geometry:this.$model.boundingBox}}))]),qE("design:paramtypes",["function"==typeof(YE=void 0!==Vr&&Vr)?YE:Object])],JE);var WE=function(e){var t=e.$model,r=t.position,n=t.size,i=t.rotate,o=t.visible,A=t.viewColor,a=t.opacity,s=new ia.BoxGeometry(n.x,n.y,n.z),u=new ia.MeshBasicMaterial({color:A,opacity:a,visible:o,transparent:!0}),c=new ia.Mesh(s,u);return c.position.set(r.x,r.y,r.z),c.rotation.set(i.x,i.y,i.z),c.visible=o,c},zE=function(e){var t=e.$model,r=t.position,n=t.visible,i=t.rotate,o=t.height,A=t.viewColor,a=t.opacity,s=t.fittingData.diameter/2,u=new ia.CylinderGeometry(s,s,o),c=new ia.MeshBasicMaterial({color:A,opacity:a,visible:n,transparent:!0}),l=new ia.Mesh(u,c);return l.position.set(r.x,r.y,r.z),l.rotation.set(i.x,i.y,i.z),l};function XE(e,t){if(e.length!==t.length)return[];for(var r=e.length,n=[],i=0;i<r-1;i++)n.push(e[i].x,e[i].y,e[i].z),n.push(e[i+1].x,e[i+1].y,e[i+1].z),n.push(t[i].x,t[i].y,t[i].z),n.push(t[i].x,t[i].y,t[i].z),n.push(t[i+1].x,t[i+1].y,t[i+1].z),n.push(e[i+1].x,e[i+1].y,e[i+1].z);return n}function ZE(e){return function(e){if(Array.isArray(e))return $E(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return $E(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return $E(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $E(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function eB(e,t){return(eB=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function tB(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=nB(e);if(t){var i=nB(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return rB(this,r)}}function rB(e,t){return!t||"object"!==iB(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function nB(e){return(nB=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function iB(e){return(iB="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var oB,AB=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":iB(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},aB=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":iB(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},sB=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&eB(e,t)}(r,e);var t=tB(r);function r(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(n=t.call(this)).$model=e,n.entityType=Pp,n.entityId=e.id,n}return r}(Ji.Entity);function uB(e){var t=e.matrix,r=e.points,n=e.depth,i=e.color,o=e.side,A=e.position,a=e.opacity,s=new ia.LineBasicMaterial,u=new ia.MeshBasicMaterial({transparent:!0,opacity:a}),c=new ia.Mesh(void 0,u),l=new ia.Line(void 0,s),g=new ia.Group;return c.setAttribute("transparent-line-origin",!1),l.setAttribute("transparent-line-origin",!1),g.add(c),g.setAttribute("outline",!1),g.setAttribute("shadowCaster",!1),u.setValues({color:i,side:o}),g.applyMatrix(t),g.position.set(A.x,A.y,A.z),function(e){var t=e.area,r=e.outline,n=e.points,i=e.height,o=e.holes,A=!!r;if(!n||0===n.length)return;var a=n[0],s=new ia.Shape,u=A?new ia.Geometry:null;s.moveTo(a.x,a.y),n.forEach((function(e){s.lineTo(e.x,e.y),A&&u.vertices.push(new ia.Vector3(e.x,e.y,i))})),s.lineTo(a.x,a.y),o&&(s.holes=o);A&&(u.vertices.push(new ia.Vector3(a.x,a.y,i)),r.geometry&&r.geometry.dispose(),r.geometry=u);var c=new ia.ShapeGeometry(s);t.geometry&&t.geometry.dispose();t.geometry=c,t.position.set(0,0,i)}({area:c,points:r,height:n}),g}function cB(e){var t=new u.BBox3d;return[].concat(ZE(e.getTopRenderPoints()),ZE(e.getBottomRenderPoints())).forEach((function(e){t.addPoint(new u.Point3d(e))})),new $e.a(new at.a({x:t.width,y:t.height,z:t.depth}),new at.a(t.center),new at.a({x:0,y:0,z:0}))}function lB(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function gB(e,t){return(gB=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function fB(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=pB(e);if(t){var i=pB(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return hB(this,r)}}function hB(e,t){return!t||"object"!==dB(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function pB(e){return(pB=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function dB(e){return(dB="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}sB=AB([Object(Ji.provideEntityAPIs)([new Ji.EntityAPIs.DrawableAPI3D((function(){var e=this;return{create:function(){return function(e){var t=new ia.Group,r=e.pointToGlobalMatrix(),n=e.depth,i=e.viewColor,o=e.opacity,A=e.visible,a=void 0!==A&&A,s=e.path.getAllPolygonPoints(),c=new nt.a;c.fromString(r.toArray().join(","));var l=yd(c),g=li.a.decompose(c).position,f=uB({matrix:l,depth:0,points:s,color:i,side:ia.Side.FrontSide,position:g,opacity:o}),h=uB({matrix:l,depth:-n,points:s,color:i,side:ia.Side.BackSide,position:g,opacity:o}),p=[].concat(ZE(s),[s[0]]),d=function(e){var t=e.matrix,r=e.side,n=e.position,i=e.color,o=e.opacity,A=new ia.MeshBasicMaterial({opacity:o,transparent:!0}),a=new ia.Mesh(new ia.BufferGeometry,A);if(A.setValues({side:r,color:i}),a.setAttribute("transparent-line-origin",!0),a.setAttribute("outline",!1),a.setAttribute("shadowCaster",!1),a.geometry instanceof ia.BufferGeometry){var s=XE(e.topPoints,e.bottomPoints);a.geometry.addAttribute("position",new ia.Float32BufferAttribute(s,3)),a.geometry.dispose()}return a.applyMatrix(t),a.position.set(n.x,n.y,n.z),a}({position:g,matrix:l,topPoints:p.map((function(e){return new u.Point3d(e.x,e.y,0)})),bottomPoints:p.map((function(e){return new u.Point3d(e.x,e.y,-n)})),color:i,side:ia.Side.DoubleSide,opacity:o});return t.add(f),t.add(h),t.add(d),[f,h,d,t].forEach((function(e){e.visible=a})),t}(e.$model)},update:function(t){var r=e.$model.visible;t.traverse((function(e){e.visible=r,e instanceof ia.Mesh&&e.material&&Object(tr.castArray)(e.material).forEach((function(e){e.visible=r}))})),t.visible=r}}})),new Ji.EntityAPIs.HighlightGeometryAPI3D((function(){return{geometry:cB(this.$model)}}))]),aB("design:paramtypes",["function"==typeof(oB=void 0!==vn&&vn)?oB:Object])],sB);var IB,yB=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":dB(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},CB=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":dB(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},EB=Ji.__INTERNAL__.Highlighters.generateWireGeometryForHighlighterGeometry,BB=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&gB(e,t)}(o,e);var t,r,n,i=fB(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this)).$model=e,t.entityType=Op,t.entityId=e.id,t}return t=o,(r=[{key:"createOutlineMesh",value:function(){var e=this.$model.hintOutline,t=e.color,r=e.opacity,n=this.$model.visible,i=function(e){var t=new ia.Geometry,r=e.getVertices().map((function(e){var t=e;return new ia.Vector3(t.x,t.y,t.z)}));e.getIndices().forEach((function(e){t.vertices.push(r[e.x],r[e.y])})),t.computeBoundingBox();var n=t.getBoundingBox().getCenter(new ia.Vector3);return t.vertices=t.vertices.map((function(e){return function(e,t){var r=t.clone().sub(e);return e.clone().add(r)}(n,e)})),t}(this.getGeometry()),o=new ia.LineBasicMaterial({color:t,opacity:r,transparent:!0}),A=new ia.LineSegments(i,o);return A.computeLineDistances(),A.renderOrder=999,A.setAttribute("outline",!1),A.setAttribute("transparent-line-origin",!0),A.setAttribute("shadowCaster",!1),A.visible=n,o.visible=n,A}},{key:"getGeometry",value:function(){var e,t=this.$model.linkModel;return e=t instanceof st.CoreParamModel?t.getConcatenatedBox3():t instanceof Vr?t.boundingBox:cB(t),EB(e)}}])&&lB(t.prototype,r),n&&lB(t,n),o}(Ji.Entity),vB=BB=yB([Object(Ji.provideEntityAPIs)([new Ji.EntityAPIs.DrawableAPI3D((function(){var e=this;return{create:function(){return e.createOutlineMesh()},update:function(t){var r=e.$model.visible;t.visible=r,t.material.visible=r}}}))]),CB("design:paramtypes",["function"==typeof(IB=void 0!==Rr&&Rr)?IB:Object])],BB);function mB(e){var t=new ia.BufferGeometry;if(t.index=new ia.BufferAttribute(new Uint16Array(e.indices),1),t.addAttribute("position",new ia.BufferAttribute(new Float32Array(e.vertices),3)),t.addAttribute("uv",new ia.BufferAttribute(new Float32Array(e.textures),2)),e.normals){var r=new Float32Array(e.normals);t.addAttribute("normal",new ia.BufferAttribute(r,3))}else t.computeVertexNormals();return t}function QB(e,t){return(QB=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function bB(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=SB(e);if(t){var i=SB(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _B(this,r)}}function _B(e,t){return!t||"object"!==wB(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function SB(e){return(SB=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function wB(e){return(wB="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var DB,RB=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":wB(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},MB=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":wB(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},xB=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&QB(e,t)}(r,e);var t=bB(r);function r(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(n=t.call(this)).$model=e,n.entityType=Tp,n.entityId=e.id,n}return r}(Ji.Entity),PB=xB=RB([Object(Ji.provideEntityAPIs)([new Ji.EntityAPIs.DrawableAPI3D((function(){var e=this;return{create:function(){return function(e){var t=e.$model,r=t.geometryModel,n=t.viewColor,i=t.originPoints,o=new ia.Group,A=mB(r),a=new ia.MeshBasicMaterial({depthTest:!1,depthWrite:!1,color:n,side:ia.Side.DoubleSide}),s=new ia.Mesh(A,a);s.renderOrder=998,o.add(s),Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV_OR_TESTING&&o.add(i.map((function(e){var t=new ia.Mesh(TB,FB);return t.position.set(e.x,e.y,e.z),t.renderOrder=999,t})));return o}(e)},update:function(){}}}))]),MB("design:paramtypes",["function"==typeof(DB=void 0!==Nn&&Nn)?DB:Object])],xB),TB=new ia.SphereBufferGeometry(3),FB=new ia.MeshBasicMaterial({depthTest:!1,depthWrite:!1,color:"black"});function OB(e){return function(e){if(Array.isArray(e))return LB(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return LB(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return LB(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function LB(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function NB(e,t){return(NB=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function kB(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=UB(e);if(t){var i=UB(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return GB(this,r)}}function GB(e,t){return!t||"object"!==jB(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function UB(e){return(UB=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function jB(e){return(jB="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var VB,HB=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":jB(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},YB=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":jB(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},KB=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&NB(e,t)}(r,e);var t=kB(r);function r(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(n=t.call(this)).$model=e,n.entityType=Fp,n.entityId=e.id,n}return r}(Ji.Entity),qB=KB=HB([Object(Ji.provideEntityAPIs)([new Ji.EntityAPIs.DrawableAPI3D((function(){var e=this;return{create:function(){return function(e){var t=e.$model,r=t.plankFaces,n=t.linkModel,i=t.hintOutline,o=n.getConcatenatedMatrix(),A=new ia.Group;r&&r.forEach((function(e){var t=mB(Ti(e,o)),r=new ia.MeshBasicMaterial({depthTest:!0,depthWrite:!0,color:e.color,opacity:e.opacity,transparent:!0,side:ia.Side.DoubleSide}),n=new ia.Mesh(t,r);n.renderOrder=998,A.add(n)}));if(i){var a=n.getSize(),s=n.getWireFrames();if(!s){var u=KI(0,a),c=KI(5,a);s=[].concat(OB(Object(tr.zip)(u,[].concat(OB(u.slice(1)),[u[0]]))),OB(Object(tr.zip)(c,[].concat(OB(c.slice(1)),[c[0]]))),OB(Object(tr.zip)(u,c))).flat().map((function(e){return[e.x,e.y,e.z]})).flat()}var l=Object(tr.chunk)(s,3).map((function(e){return new at.a(e[0],e[1],e[2]).applyMatrix4(o)})).map((function(e){return[e.x,e.y,e.z]})).flat(),g=new ya({points:l,visible:!0,color:parseInt(i.color.replace(/^#/,""),16)});A.add(g)}return A}(e)},update:function(){}}}))]),YB("design:paramtypes",["function"==typeof(VB=void 0!==Kn&&Kn)?VB:Object])],KB);function JB(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function WB(e,t){return(WB=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function zB(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=ZB(e);if(t){var i=ZB(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return XB(this,r)}}function XB(e,t){return!t||"object"!==$B(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ZB(e){return(ZB=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function $B(e){return($B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var ev,tv=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":$B(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},rv=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":$B(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},nv=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&WB(e,t)}(o,e);var t,r,n,i=zB(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this)).$model=e,t.entityType=Lp,t.entityId=e.id,t}return t=o,(r=[{key:"createMesh",value:function(){var e=this.$model,t=e.points,r=e.viewColor,n=e.opacity,i=e.visible,o=e.linkModel,A=e.height;if(o){var a=t.map((function(e){return new u.Point3d(e.x,e.y,A/2)})),s=t.map((function(e){return new u.Point3d(e.x,e.y,-A/2)})),c=new ia.MeshBasicMaterial({opacity:n,transparent:!0}),l=new ia.Mesh(new ia.BufferGeometry,c);if(c.setValues({side:ia.Side.DoubleSide,color:r}),l.setAttribute("transparent-line-origin",!0),l.setAttribute("outline",!1),l.setAttribute("shadowCaster",!1),l.geometry instanceof ia.BufferGeometry){var g=XE(a,s);l.geometry.addAttribute("position",new ia.Float32BufferAttribute(g,3)),l.geometry.dispose()}var f=o.getConcatenatedMatrix(),h=new at.a(0,0,0).applyMatrix4(f);return l.position.set(h.x,h.y,h.z),l.visible=i,c.visible=i,l.rotation.setFromRotationMatrix(yd(f)),l}}}])&&JB(t.prototype,r),n&&JB(t,n),o}(Ji.Entity),iv=nv=tv([Object(Ji.provideEntityAPIs)([new Ji.EntityAPIs.DrawableAPI3D((function(){var e=this;return{create:function(){return e.createMesh()},update:function(t){var r=e.$model,n=r.visible,i=r.viewColor,o=r.opacity;t.visible=n,t.material.setValues({opacity:o,color:i}),t.material.visible=n}}}))]),rv("design:paramtypes",["function"==typeof(ev=void 0!==ti&&ti)?ev:Object])],nv);var ov=function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.getDesignDoc=t,this.createFittingEntities=Ji.__unstable__.flatEntitiesCreator((function(e){return new JE(e)})),this.createIntersectEntities=Ji.__unstable__.flatEntitiesCreator((function(e){return new PB(e)})),this.createGrooveFittingEntities=Ji.__unstable__.flatEntitiesCreator((function(e){return new sB(e)})),this.createPlankFaceHintEntities=Ji.__unstable__.flatEntitiesCreator((function(e){return new qB(e)})),this.careateFittingHintEntities=Ji.__unstable__.flatEntitiesCreator((function(e){return new vB(e)})),this.careatePlankOutlineHintEntities=Ji.__unstable__.flatEntitiesCreator((function(e){return new iv(e)})),this.getFittingEntities=function(){var e=r.getDesignDoc();return e?r.createFittingEntities(e.getFittings()):[]},this.getGrooveFittingEntities=function(){var e=r.getDesignDoc();return e?r.createGrooveFittingEntities(e.getGrooveFittings()):[]},this.getIntersectedEntities=function(){var e=r.getDesignDoc();return e?r.createIntersectEntities(e.getIntersects()):[]},this.getPlankFaceHintEntities=function(){var e=r.getDesignDoc();return e?r.createPlankFaceHintEntities(e.getPlankFaceHintModels()):[]},this.getFittingHintEntities=function(){var e=r.getDesignDoc();return e?r.careateFittingHintEntities(e.getFittingHintModels()):[]},this.getPlankOutlineHintEntities=function(){var e=r.getDesignDoc();return e?r.careatePlankOutlineHintEntities(e.getPlankOutlineHintModels()):[]},this.getEntities=[this.getFittingEntities,this.getIntersectedEntities,this.getGrooveFittingEntities,this.getPlankFaceHintEntities,this.getFittingHintEntities,this.getPlankOutlineHintEntities]};function Av(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return av(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return av(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function av(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function sv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var uv=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.disabled=!1,this.pressMap=new Map,this.resetPressStatus=function(){t.pressMap.forEach((function(e,r){t.pressMap.set(r,!1)}))},this.onKeyDown=function(e){var r=t.getKeyBoardKey(e);t.pressMap.get(r)||t.isPrevent(e)||t.pressMap.has(r)&&t.pressMap.set(r,!0)},this.onKeyUp=function(e){var r=t.getKeyBoardKey(e);t.pressMap.get(r)&&(t.isPrevent(e)||t.pressMap.has(r)&&t.pressMap.set(r,!1))},this.active()}var t,r,n;return t=e,(r=[{key:"addKeyboardKeyListener",value:function(e){var t=this,r=Object(tr.castArray)(e);if(r.some((function(e){return!t.isValidKeyboardKey(e)})))throw new Error("keyboard-key is invalid");var n,i=Av(r);try{for(i.s();!(n=i.n()).done;){var o=n.value;this.pressMap.set(o,!1)}}catch(e){i.e(e)}finally{i.f()}}},{key:"removeKeyboardKeyListener",value:function(e){var t,r=Av(Object(tr.castArray)(e));try{for(r.s();!(t=r.n()).done;){var n=t.value;this.pressMap.has(n)&&this.pressMap.delete(n)}}catch(e){r.e(e)}finally{r.f()}}},{key:"active",value:function(){document.addEventListener("keydown",this.onKeyDown),document.addEventListener("keyup",this.onKeyUp),document.addEventListener("mouseenter",this.resetPressStatus),this.disabled=!1}},{key:"dispose",value:function(){document.removeEventListener("keydown",this.onKeyDown),document.removeEventListener("keyup",this.onKeyUp),document.removeEventListener("mouseenter",this.resetPressStatus),this.disabled=!0,this.resetPressStatus()}},{key:"checkIsPress",value:function(e){var t=this;return Object(tr.castArray)(e).every((function(e){return t.pressMap.get(e)}))}},{key:"getKeyBoardKey",value:function(e){return e.key.toLowerCase()}},{key:"isPrevent",value:function(e){if(this.disabled)return!0;var t=e.target;if(!t)return!1;if("INPUT"===t.tagName){var r=t.type;return"radio"!==r&&"checkbox"!==r}return"SELECT"===t.tagName||"TEXTAREA"===t.tagName}},{key:"isValidKeyboardKey",value:function(e){return Xe.includes(e)}}])&&sv(t.prototype,r),n&&sv(t,n),e}(),cv=new Map([[ui.ParamModelCategory.FRAME,[ui.ParamModelCategory.DRAWER,ui.ParamModelCategory.SWING_DOOR,ui.ParamModelCategory.PARAM_FURNITURE,ui.ParamModelCategory.FASCIA_BOARD,ui.ParamModelCategory.SPECIAL_FRAME,ui.ParamModelCategory.EMBED_FRAME_W,ui.ParamModelCategory.POLE_W,ui.ParamModelCategory.SEGMENT_DOOR_CONTAINER,ui.ParamModelCategory.BOARD,ui.ParamModelCategory.DRAWER,ui.ParamModelCategory.SPACE_GROUP,ui.ParamModelCategory.SINGLE_SLIDING_DOOR,ui.ParamModelCategory.FRAME,ui.ParamModelCategory.SLIDING_DOOR_BOARD,ui.ParamModelCategory.PARAM_FURNITURE_PART,ui.ParamModelCategory.SANITARY_COMPONENT,ui.ParamModelCategory.DOOR_LEAF,ui.ParamModelCategory.DECORATIVE_MOLDING_C,ui.ParamModelCategory.DECORATIVE_MOLDING_W,ui.ParamModelCategory.HANDS_FREE,ui.ParamModelCategory.REPLACE_STRUCTURE_BOARD]],[ui.ParamModelCategory.SHOWER_ROOM,[ui.ParamModelCategory.DRAWER,ui.ParamModelCategory.SWING_DOOR,ui.ParamModelCategory.PARAM_FURNITURE,ui.ParamModelCategory.FASCIA_BOARD,ui.ParamModelCategory.SPECIAL_FRAME,ui.ParamModelCategory.EMBED_FRAME_W,ui.ParamModelCategory.POLE_W,ui.ParamModelCategory.SEGMENT_DOOR_CONTAINER,ui.ParamModelCategory.BOARD,ui.ParamModelCategory.DRAWER,ui.ParamModelCategory.SPACE_GROUP,ui.ParamModelCategory.SINGLE_SLIDING_DOOR,ui.ParamModelCategory.FRAME,ui.ParamModelCategory.PARAM_FURNITURE_PART,ui.ParamModelCategory.SANITARY_COMPONENT,ui.ParamModelCategory.DOOR_LEAF,ui.ParamModelCategory.REPLACE_STRUCTURE_BOARD]],[void 0,[ui.ParamModelCategory.DRAWER,ui.ParamModelCategory.SWING_DOOR,ui.ParamModelCategory.PARAM_FURNITURE,ui.ParamModelCategory.FASCIA_BOARD,ui.ParamModelCategory.SPECIAL_FRAME,ui.ParamModelCategory.EMBED_FRAME_W,ui.ParamModelCategory.BOARD,ui.ParamModelCategory.SPACE_GROUP,ui.ParamModelCategory.POLE_W,ui.ParamModelCategory.SINGLE_SLIDING_DOOR,ui.ParamModelCategory.SLIDING_DOOR_BOARD,ui.ParamModelCategory.DRAWER,ui.ParamModelCategory.RAIL,ui.ParamModelCategory.DOOR_LEAF]],[ui.ParamModelCategory.SLIDING_DOOR_C,[ui.ParamModelCategory.RAIL,ui.ParamModelCategory.SINGLE_SLIDING_DOOR]],[ui.ParamModelCategory.SPACE_GROUP,[ui.ParamModelCategory.DRAWER,ui.ParamModelCategory.SWING_DOOR,ui.ParamModelCategory.PARAM_FURNITURE,ui.ParamModelCategory.FASCIA_BOARD,ui.ParamModelCategory.SEGMENT_DOOR_CONTAINER,ui.ParamModelCategory.BOARD,ui.ParamModelCategory.SPECIAL_BOARD,ui.ParamModelCategory.SPACE_GROUP]],[ui.ParamModelCategory.SINGLE_SLIDING_DOOR,[ui.ParamModelCategory.SLIDING_DOOR_CORE,ui.ParamModelCategory.DOOR_WAIST_LINE]],[ui.ParamModelCategory.SEGMENT_DOOR_CONTAINER,[ui.ParamModelCategory.SWING_DOOR]],[ui.ParamModelCategory.REPLACE_STRUCTURE_BOARD,[ui.ParamModelCategory.BOARD]],[ui.ParamModelCategory.SWING_DOOR,[ui.ParamModelCategory.DOOR_CORE,ui.ParamModelCategory.DOOR_WAIST_LINE,ui.ParamModelCategory.DECORATIVE_MOLDING,ui.ParamModelCategory.BOARD]],[ui.ParamModelCategory.DRAWER,[ui.ParamModelCategory.DRAWER_PANEL,ui.ParamModelCategory.SWING_DOOR,ui.ParamModelCategory.BOARD]],[ui.ParamModelCategory.PARAM_FURNITURE,[ui.ParamModelCategory.FURNITURE_LEG]],[ui.ParamModelCategory.KADA,[ui.ParamModelCategory.BYOBU,ui.ParamModelCategory.BYOBU_FRAME,ui.ParamModelCategory.BYOBU_PANEL]]]);function lv(e){return function(e){if(Array.isArray(e))return gv(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return gv(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return gv(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function gv(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function fv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var hv=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.prevModeSelectEntity=[],this.isAccessoryCache=new Map,this.designMode=Ve.PRODUCT,this.multiSelectShortCut="shift",this.pressManager=new uv,this.memoGetHintModelLite=Ly()((function(e){return t.isFittingLikeModel(e)?II(e):t.getParamModelLite(e)})),this.pressManager.addKeyboardKeyListener(this.multiSelectShortCut)}var t,r,n;return t=e,(r=[{key:"isAccessory",value:function(e){var t;if(this.isAccessoryCache.has(e.id))return this.isAccessoryCache.get(e.id);var r=null===(t=null==e?void 0:e.getParent)||void 0===t?void 0:t.call(e),n=(cv.get(r?r.getCategory().getRoot():void 0)||[]).some((function(t){return e.getCategory().belongsTo(t)}));return this.isAccessoryCache.set(e.getId(),n),n}},{key:"getAccessoryAtFirstLevel",value:function(e,t){for(var r,n,i=this,o=[],A=t;A&&A!==e;)o.unshift(A),A=(null===(r=A.getParent)||void 0===r?void 0:r.call(A))||(null===(n=A.getAssembly)||void 0===n?void 0:n.call(A));return o.find((function(e){return i.isAccessory(e)}))||t}},{key:"getParamModelLite",value:function(e){var t=(e.isRoot()?e:e.getRoot()).getAssembly();return t?Py(e,{origin:K.SENSE},void 0,Py(t,{origin:K.SENSE})):Py(e,{origin:K.SENSE})}},{key:"topModelModeGetSelectModel",value:function(e,t){var r,n;if(this.isFittingLikeModel(e))return e;var i,o,A,a=e.isRoot()?e:e.getRoot(),s=a.getAssembly(),u=Array.isArray(this.curSelectEntity)?this.curSelectEntity[0]:this.curSelectEntity,c=!1;if(u&&(o=dm(u))&&!this.isFittingLikeModel(o)&&(u.entityType===LA?A=(A=o.isRoot()?o:o.getRoot()).getAssembly()||A:(c=!0,A=o),i=A===a||A===s),i){for(var l=!1,g=!1,f=o instanceof st.CoreParamModel?o.getParent():void 0,h=e;h;){if(h===o){l=!0;break}if(h===f){g=!0;break}h=(null===(r=h.getParent)||void 0===r?void 0:r.call(h))||(null===(n=h.getAssembly)||void 0===n?void 0:n.call(h))}if(t===He.CLICK)return l?o:g?this.getAccessoryAtFirstLevel(f,e):A instanceof st.CoreParamModelAssembly?(o.isRoot()?o:o.getRoot())===a?this.getAccessoryAtFirstLevel(a,e):a:this.getAccessoryAtFirstLevel(a,e);if(t===He.DB_CLICK)return l?c?a:this.getAccessoryAtFirstLevel(o,e):this.getAccessoryAtFirstLevel(a,e)}else{if(t===He.CLICK)return s||a;if(t===He.DB_CLICK)return s?a:this.getAccessoryAtFirstLevel(a,e)}}},{key:"accessoryModeGetSelectModel",value:function(e,t){var r,n;if(this.isFittingLikeModel(e))return e;var i=e.isRoot()?e:e.getRoot(),o=Array.isArray(this.curSelectEntity)?this.curSelectEntity[0]:this.curSelectEntity,A=o&&dm(o),a=!1;if(A&&!this.isFittingLikeModel(A)&&(a=(A.isRoot()?A:A.getRoot())===i),a){for(var s=!1,u=!1,c=null==A?void 0:A.getParent(),l=e;l;){if(l===A){s=!0;break}if(l===c){u=!0;break}l=(null===(r=l.getParent)||void 0===r?void 0:r.call(l))||(null===(n=l.getAssembly)||void 0===n?void 0:n.call(l))}if(t===He.CLICK)return s?A:this.getAccessoryAtFirstLevel(u?c:i,e);if(t===He.DB_CLICK){if(s)return this.getAccessoryAtFirstLevel(A,e);var g=this.getAccessoryAtFirstLevel(i,e);return this.getAccessoryAtFirstLevel(g,e)}}else{if(t===He.CLICK)return this.getAccessoryAtFirstLevel(i,e);if(t===He.DB_CLICK){var f=this.getAccessoryAtFirstLevel(i,e);return this.getAccessoryAtFirstLevel(f,e)}}}},{key:"topModelModeAndAccessoryModeHint",value:function(e){var t,r;if(this.isFittingLikeModel(e))return e;var n,i,o=e.isRoot()?e:e.getRoot(),A=o.getAssembly(),a=Array.isArray(this.curSelectEntity)?this.curSelectEntity[0]:this.curSelectEntity,s=!1;if(a&&(n=dm(a))&&!this.isFittingLikeModel(n)&&(s=(i=a.entityType===LA?(i=n.isRoot()?n:n.getRoot()).getAssembly()||i:n)===o||i===A),n&&s){for(var u=!1,c=!1,l=n instanceof st.CoreParamModel?n.getParent():void 0,g=e;g;){if(g===n){u=!0;break}if(g===l){c=!0;break}g=(null===(t=g.getParent)||void 0===t?void 0:t.call(g))||(null===(r=g.getAssembly)||void 0===r?void 0:r.call(g))}return u?this.isMultiSelect||Array.isArray(this.curSelectEntity)&&this.curSelectEntity.length>1?n:n instanceof st.CoreParamModelAssembly?o:this.getAccessoryAtFirstLevel(n,e):c?this.getAccessoryAtFirstLevel(l,e):this.designMode===Ve.TOP_MODEL&&o!==n&&o!==n.getRoot()?o:this.getAccessoryAtFirstLevel(o,e)}return this.designMode===Ve.TOP_MODEL?o.getAssembly()||o:this.getAccessoryAtFirstLevel(o,e)}},{key:"setCurSelectEntity",value:function(e){this.curSelectEntity=e}},{key:"getCurSelectEntity",value:function(){return this.curSelectEntity}},{key:"setCurHintEntity",value:function(e){this.curHintEntity=e}},{key:"getCurHintEntity",value:function(){return this.curHintEntity}},{key:"clearPrevModeSelectEntity",value:function(){this.prevModeSelectEntity.length&&(this.prevModeSelectEntity=[])}},{key:"getDesignMode",value:function(){return this.designMode}},{key:"setDesignMode",value:function(e,t){this.designMode=e,e===Ve.CUSTOM?(this.customModeFindSelectModel=null==t?void 0:t.findSelectModel,this.customModeFindHintModel=null==t?void 0:t.findHintModel,!this.pressManager.disabled&&this.pressManager.dispose()):(this.customModeFindSelectModel=void 0,this.customModeFindHintModel=void 0,this.pressManager.disabled&&this.pressManager.active(),this.prevModeSelectEntity=this.prevModeSelectEntity.concat(this.curSelectEntity&&Object(tr.castArray)(this.curSelectEntity)||[])),this.setCurSelectEntity(void 0),this.setCurHintEntity(void 0)}},{key:"genEntityDescriptor",value:function(e){var t=Im[e.type];return{entityId:e.id,entityType:t}}},{key:"customModeSelectModel",value:function(e,t){var r,n;n=this.isFittingLikeModel(e)?II(e):this.getParamModelLite(e);var i=null===(r=this.customModeFindSelectModel)||void 0===r?void 0:r.call(this,n,t);return Object(tr.castArray)(i).filter((function(e){return e})).map(this.genEntityDescriptor)}},{key:"customModeHintModel",value:function(e){var t,r=this,n=this.memoGetHintModelLite(e),i=null===(t=this.customModeFindHintModel)||void 0===t?void 0:t.call(this,n);return clearTimeout(this.clearMemoTimer),this.clearMemoTimer=setTimeout((function(){r.memoGetHintModelLite.clear()}),1e3),Object(tr.castArray)(i).filter((function(e){return e})).map(this.genEntityDescriptor)}},{key:"isFittingLikeModel",value:function(e){return e instanceof vn||e instanceof Vr||e instanceof jt&&Boolean(e.isAppendHardware)}},{key:"getSelectEntity",value:function(e,t){var r;if(this.isMultiSelect&&this.designMode!==Ve.CUSTOM){switch(this.designMode){case Ve.TOP_MODEL:r=this.topModelModeGetSelectModel(e,t);break;case Ve.ACCESSORY:r=this.accessoryModeGetSelectModel(e,t);break;case Ve.PRODUCT:r=e}if(!r)return;var n=pm(r),i=Object(tr.castArray)(this.curSelectEntity).filter((function(e){return e}));this.prevModeSelectEntity.length&&i.push.apply(i,lv(this.prevModeSelectEntity));var o=i[0]&&dm(i[0]);if(o&&this.isFittingLikeModel(o)!==this.isFittingLikeModel(r))return n;var A=i.filter((function(e){return e.entityId!==n.entityId}));return A.length!==i.length?A:[].concat(lv(A),[n])}if(!Array.isArray(this.curSelectEntity)||!this.curSelectEntity.length){switch(this.designMode){case Ve.TOP_MODEL:r=this.topModelModeGetSelectModel(e,t);break;case Ve.ACCESSORY:r=this.accessoryModeGetSelectModel(e,t);break;case Ve.PRODUCT:r=e;break;case Ve.CUSTOM:return this.customModeSelectModel(e,t)}return pm(r||e)}}},{key:"getHintEntity",value:function(e){var t;switch(this.designMode){case Ve.TOP_MODEL:case Ve.ACCESSORY:t=this.topModelModeAndAccessoryModeHint(e);break;case Ve.PRODUCT:t=e;break;case Ve.CUSTOM:return this.customModeHintModel(e)}var r=this.curSelectEntity&&Object(tr.castArray)(this.curSelectEntity)||[];if(!([].concat(lv(r),lv(this.prevModeSelectEntity)).findIndex((function(e){return e.entityId===t.id}))>-1))return pm(t)}},{key:"registerMultiSelectShortcut",value:function(e){this.pressManager.removeKeyboardKeyListener(this.multiSelectShortCut),this.multiSelectShortCut=e,this.pressManager.addKeyboardKeyListener(this.multiSelectShortCut)}},{key:"isMultiSelect",get:function(){return this.pressManager.checkIsPress(this.multiSelectShortCut)}}])&&fv(t.prototype,r),n&&fv(t,n),e}();function pv(e){return(pv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function dv(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Iv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function yv(e,t){return(yv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Cv(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Bv(e);if(t){var i=Bv(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Ev(this,r)}}function Ev(e,t){return!t||"object"!==pv(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Bv(e){return(Bv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var vv=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&yv(e,t)}(o,e);var t,r,n,i=Cv(o);function o(){return dv(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"pickRayTarget",value:function(e){return e&&dm(e)}},{key:"selection",get:function(){return lm().getStateManager().kaf.selection}},{key:"hint",get:function(){return lm().getStateManager().kaf.kaf2.hint}},{key:"designModeCtx",get:function(){return lm().designModeContext}}])&&Iv(t.prototype,r),n&&Iv(t,n),o}(Ji.ToolModule.Feature);function mv(e){return(mv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Qv(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _v(e,t){return(_v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Sv(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Dv(e);if(t){var i=Dv(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return wv(this,r)}}function wv(e,t){return!t||"object"!==mv(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Dv(e){return(Dv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Rv=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_v(e,t)}(o,e);var t,r,n,i=Sv(o);function o(){var e;return Qv(this,o),(e=i.apply(this,arguments)).isMouseDown=!1,e}return t=o,(r=[{key:"onMouseDown",value:function(){this.isMouseDown=!0}},{key:"onMouseUp",value:function(){this.isMouseDown=!1}},{key:"onMouseMove",value:function(e){if(!this.isMouseDown){var t=this.context.pick(e.sceneId,e.event),r=this.pickRayTarget(null==t?void 0:t.entity);if($t.eventNames().includes(zt.PLANK_FACE_HOVER)&&r instanceof st.CoreParamModel){var n=t.entity,i=n.point,o={modelId:n.entityId,id:Ed(r,i)};$t.emit(zt.PLANK_FACE_HOVER,o)}if(r){var A=this.designModeCtx.getHintEntity(r);this.designModeCtx.getDesignMode(),Ve.CUSTOM,this.hint.hint(A)}else this.hint.hint(),this.designModeCtx.setCurHintEntity(void 0)}}}])&&bv(t.prototype,r),n&&bv(t,n),o}(vv);function Mv(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return xv(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return xv(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,A=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return A=e.done,e},e:function(e){a=!0,o=e},f:function(){try{A||null==r.return||r.return()}finally{if(a)throw o}}}}function xv(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Pv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Tv(e,t){return(Tv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Fv(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Lv(e);if(t){var i=Lv(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Ov(this,r)}}function Ov(e,t){return!t||"object"!==Nv(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Lv(e){return(Lv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Nv(e){return(Nv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var kv=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Nv(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},Gv=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":Nv(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},Uv=Ji.__INTERNAL__.Highlighters.WireGeometry,jv=Ji.__INTERNAL__.Highlighters.generateWireGeometryForHighlighterGeometry,Vv=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Tv(e,t)}(o,e);var t,r,n,i=Fv(o);function o(e,t){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(r=i.call(this)).models=e,r.createFittingModelBox=t,r}return t=o,(r=[{key:"getGeometry",value:function(){var e,t=new Uv,r=Mv(this.models);try{for(r.s();!(e=r.n()).done;){var n=e.value,i=void 0;i=n instanceof st.CoreParamModel||n instanceof st.CoreParamModelAssembly?n.getConcatenatedBox3():this.createFittingModelBox(n);var o=jv(i);t.append(o)}}catch(e){r.e(e)}finally{r.f()}return t}}])&&Pv(t.prototype,r),n&&Pv(t,n),o}(Ji.Entity),Hv=Vv=kv([Object(Ji.provideEntityAPIs)([new Ji.EntityAPIs.HighlightGeometryAPI3D((function(){return{geometry:this.getGeometry()}}))]),Gv("design:paramtypes",[Array,Function])],Vv);function Yv(e){return(Yv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Kv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function qv(e,t){return(qv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Jv(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=zv(e);if(t){var i=zv(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Wv(this,r)}}function Wv(e,t){return!t||"object"!==Yv(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function zv(e){return(zv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Xv=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&qv(e,t)}(o,e);var t,r,n,i=Jv(o);function o(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(e=i.call(this))._init(),e}return t=o,(r=[{key:"_init",value:function(){var e=this,t={accept:function(){return!0},priority:1,createMultiSelectionEntity:function(t){var r=t.map((function(e){return dm(e)}));return new Hv(r.filter((function(e){return e})),e.createFittingModelBox)}};this.selection.addMultiSelectionConfig(t)}},{key:"createFittingModelBox",value:function(e){return e instanceof Vr?e.boundingBox:cB(e)}},{key:"onClick",value:function(e){this.triggerClick(e,He.CLICK)}},{key:"onDblClick",value:function(e){this.designModeCtx.isMultiSelect||this.triggerClick(e,He.DB_CLICK)}},{key:"triggerClick",value:function(e,t){var r=this.context.pick(e.sceneId,e.event),n=this.pickRayTarget(null==r?void 0:r.entity);if($t.eventNames().includes(zt.PLANK_FACE_CLICK)&&n instanceof st.CoreParamModel){var i=r.entity,o=i.point,A={modelId:i.entityId,id:Ed(n,o)};$t.emit(zt.PLANK_FACE_CLICK,A)}if(n){var a=this.designModeCtx.getSelectEntity(n,t);this.designModeCtx.getDesignMode()===Ve.CUSTOM?a&&this.selection.select(a):(this.selection.select(a),this.designModeCtx.setCurSelectEntity(a))}else this.selection.select(),this.designModeCtx.setCurSelectEntity(void 0);this.designModeCtx.clearPrevModeSelectEntity()}}])&&Kv(t.prototype,r),n&&Kv(t,n),o}(vv);function Zv(e){return(Zv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function $v(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function em(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?$v(Object(r),!0).forEach((function(t){tm(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$v(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function tm(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rm(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function nm(e,t,r){return(nm="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=am(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function im(e,t){return(im=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function om(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=am(e);if(t){var i=am(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Am(this,r)}}function Am(e,t){return!t||"object"!==Zv(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function am(e){return(am=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var sm,um=new qi.SingletonRef,cm=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&im(e,t)}(o,e);var t,r,n,i=om(o);function o(e,t){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(r=i.call(this,{id:"com.custom.pad",name:"cFrameApp",Component:kE,axrs:JC,singleton:um},e)).stateManager=t,r.viewer=new Rs,r.designModeContext=new hv,r}return t=o,(r=[{key:"init",value:function(){nm(am(o.prototype),"init",this).call(this),this.initStateManager(),this.initApp()}},{key:"initStateManager",value:function(){var e=this.stateManager;e.initState(),ZC(e);var t=this.getDependentPlugin(Ji.AppServicePlugin),r=this.getDependentPlugin(qh);e.kaf=t.stateManager,e.core=r.stateManager}},{key:"initNet",value:function(){nm(am(o.prototype),"initNet",this).call(this),this.net.setSendPolicy(new Pc),this.client=new $u(this.net)}},{key:"initApp",value:function(){var e=this,t=this.stateManager,r=t.core,n=r.design,i=r.pad,o=this.getDependentPlugin(Ji.AppServicePlugin);this.viewer.config(o,{getCustom:function(){return n.getCustom()},getDoc:function(){return n.getDoc()},isEntitySelectable:function(){return e.axr.axrs.scene.state.state.selectable},pickActualInteractiveEntity:function(e,t){for(var r=t.point,n=i.findModelOrAssemblyModelById(e.entityId);n&&!ky.includes(n.getType());)n=n.getParent();return n?{entityId:n.id,entityType:LA,point:r}:em(em({},e),{},{point:r})},paramModelSymbol:LA,filterParamModel:function(t){return!e.axr.axrs.fittingDesign.senseSetting.getSenseSettings().renderIgnoreCategory.includes(t.getCategory().categoryId)}}),this.viewer.registerReducer((function(e,t,r){r.interactionPriority=e.isAppendHardware?2:0})),o.registerEntityDocument(new ov((function(){return t.core.fittingDesign}))),t.kaf.toolbox.addIdleToolFeature((function(){return new Xv})),t.kaf.toolbox.addIdleToolFeature((function(){return new Rv})),o.setLayout(fE)}}])&&rm(t.prototype,r),n&&rm(t,n),o}(qi.PluginApplication),lm=um.instance;function gm(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function fm(e,t){var r=new Map;return function(){var n,i=t.apply(void 0,arguments);if(r.has(i))n=r.get(i);else if(n=e.apply(void 0,arguments),Object(tr.isObject)(n)&&Object(tr.isFunction)(n.then)&&Object(tr.isFunction)(n.catch)){var o=Promise.resolve(n);r.set(i,o),o.finally((function(){r.delete(i)}))}return n}}function hm(e){return e instanceof jt?LA:e instanceof Xt?OA:e instanceof Vr?xp:e instanceof vn?Pp:void 0}function pm(e){return{entityId:e.id,entityType:hm(e)}}function dm(e){var t=e.entityId,r=e.entityType,n=lm().getStateManager().core,i=n.fittingDesign,o=n.pad;switch(r){case LA:return o.findModelOrAssemblyModelById(t);case OA:return o.findParamModelAssembly(t);case Pp:return i.getGrooveFittings().find((function(e){return e.id===t}));case xp:return i.getFittings().find((function(e){return e.id===t}));default:return}}var Im=(gm(sm={},ze.PARAM_MODEL,LA),gm(sm,ze.PARAM_MODEL_ASSEMBLY,OA),gm(sm,ze.HOLE,xp),gm(sm,ze.GROOVE,xp),gm(sm,ze.HARDWARE_GROOVE,Pp),gm(sm,ze.HARDWARE,LA),sm);function ym(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function Cm(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){ym(o,n,i,A,a,"next",e)}function a(e){ym(o,n,i,A,a,"throw",e)}A(void 0)}))}}var Em=new Map;function Bm(e){return["designid","levelid","modelid","toolType"].map((function(t){return e[t]||""})).join(":")}var vm=fm(function(){var e=Cm(s.a.mark((function e(t){var r,n,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=Rc(),n=Bm(t),!Em.has(n)){e.next=4;break}return e.abrupt("return",Em.get(n));case 4:return e.next=6,r.get("/cos/api/fitting-design",{params:t});case 6:return i=e.sent,Em.set(n,i.data.d),e.abrupt("return",i.data.d);case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Bm);function mm(){var e=Xh(Tf);"function"==typeof e.fittingDesignHasChanged&&e.fittingDesignHasChanged().catch((function(){}))}var Qm,bm,_m=function(){var e=Cm(s.a.mark((function e(t,r){var n,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Rc(),i=Bm(r),e.prev=2,e.next=5,n.post("/cos/api/fitting-design",t,{params:r});case 5:Em.set(i,t),mm(),e.next=14;break;case 9:if(e.prev=9,e.t0=e.catch(2),o=e.t0,!Object(tr.isObject)(o)||"0"===o.c||!o.m){e.next=13;break}throw new Error("错误码:".concat(e.t0.c,";错误信息:").concat(e.t0.m));case 13:throw e.t0;case 14:case"end":return e.stop()}var o}),e,null,[[2,9]])})));return function(t,r){return e.apply(this,arguments)}}(),Sm=function(){var e=Cm(s.a.mark((function e(t){var r,n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Rc(),n=Bm(t),e.prev=2,e.next=5,r.delete("/cos/api/fitting-design",{params:t});case 5:Em.has(n)&&Em.delete(n),mm(),e.next=12;break;case 9:throw e.prev=9,e.t0=e.catch(2),e.t0;case 12:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(t){return e.apply(this,arguments)}}();function wm(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function Dm(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){wm(o,n,i,A,a,"next",e)}function a(e){wm(o,n,i,A,a,"throw",e)}A(void 0)}))}}!function(e){e.UNKNOWN="UNKNOWN",e.PENDING="PENDING",e.RUNNING="RUNNING",e.SAVING="SAVING",e.SUCCESS="SUCCESS",e.FAIL="FAIL",e.CANCEL="CANCEL",e.TIMEOUT="TIMEOUT"}(Qm||(Qm={})),function(e){e[e.CABINET=0]="CABINET",e[e.WARDROBE=1]="WARDROBE",e[e.DOOR_WINDOW=2]="DOOR_WINDOW"}(bm||(bm={}));var Rm=function(){var e=Dm(s.a.mark((function e(t){var r,n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Object(tr.castArray)(t),n=Xh(Yf),e.abrupt("return",n.getParamModelDataByIds(r));case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Mm=fm(function(){var e=Dm(s.a.mark((function e(t,r){var n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Xh(Zh.MiniAppParamModelJsonDataService),e.abrupt("return",n.getCachedModelJsonDataByModelId({modelIds:t,templateId:r}));case 2:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),(function(e,t){return e+(t||"")})),xm=fm(function(){var e=Dm(s.a.mark((function e(t,r,n){var i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=Xh(Zh.MiniAppParamModelJsonDataService),e.abrupt("return",i.getModelJsonDataByModelId({modelIds:t,templateId:r,timeout:n},{timeout:-1}));case 2:case"end":return e.stop()}}),e)})));return function(t,r,n){return e.apply(this,arguments)}}(),(function(e,t){return e+(t||"")}));function Pm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Tm(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Fm(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function Om(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){Fm(o,n,i,A,a,"next",e)}function a(e){Fm(o,n,i,A,a,"throw",e)}A(void 0)}))}}var Lm=Ly()(function(){var e=Om(s.a.mark((function e(t){var r,n;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Rc(),e.next=3,r.gzipGet("/custom-model/api/c/parammodeldata",{params:{obsbgid:t,cache:!0}});case 3:return n=e.sent,e.abrupt("return",n.data);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Pm(Object(r),!0).forEach((function(t){Tm(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Pm(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({promise:!0},Ny)),Nm=Ly()(function(){var e=Om(s.a.mark((function e(t){var r,n,i;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Rc(),e.next=3,n.gzipPost("/dcs-resource/api/c/modelcenter/bgids",{bgIds:t});case 3:return i=e.sent,e.abrupt("return",(null===(r=i.data.d)||void 0===r?void 0:r.modelCenterMap)?Object(tr.mapValues)(i.data.d.modelCenterMap,(function(e){return JSON.parse(e)})):{});case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());var km=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)};function Gm(e){return(Gm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Um(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function jm(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Um(Object(r),!0).forEach((function(t){Vm(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Um(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Vm(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Hm(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function Ym(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){Hm(o,n,i,A,a,"next",e)}function a(e){Hm(o,n,i,A,a,"throw",e)}A(void 0)}))}}function Km(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qm(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Jm(e,t){return(Jm=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Wm(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Xm(e);if(t){var i=Xm(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return zm(this,r)}}function zm(e,t){return!t||"object"!==Gm(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Xm(e){return(Xm=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Zm=function(){return WC().fittingDesign.fittingDesignSense},$m=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Jm(e,t)}(c,e);var t,r,n,i,o,A,a,u=Wm(c);function c(){return Km(this,c),u.apply(this,arguments)}return t=c,(r=[{key:"toggleAutoSave",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];Zm().$actionEnableAutoSave.dispatch(e)}},{key:"isAutoSave",value:function(){return Zm().isAutoSaveEnabled()}},{key:"getFittingDesignData",value:(a=Ym(s.a.mark((function e(t){var r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t&&(WC().viewParamModel.state.state.currModelId!==t||Zm().state.state.design.id!==t)){e.next=3;break}return e.abrupt("return",this.getConnectedFittingDesign());case 3:return e.next=5,vd(t);case 5:return r=e.sent,e.abrupt("return",vm(jm(jm({},r),{},{modelid:t})));case 7:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"getConnectedFittingDesign",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return Zm().getConnectedFittingDesign(e,t)}},{key:"validateFittingDesign",value:function(e,t){var r=WC().entry.getStateManager().core.pad.findModelOrAssemblyModelById(t);if(!r)return{validated:!1};var n=WC().fittingDesign.senseSetting.getSenseSettings();return{validated:function(e){if(!e.isClosedPath())return!1;for(var t=e.points,r=e.lines,n=t.length,i=0;i<n;i++){var o={type:Mi.POINT,val:t[i]},A={type:Mi.LINE,val:r[i]};if(!ji(o.val))return!1;if(!Vi(A.val))return!1;if(!Yi(o,A))return!1;for(var a=i+1;a<n;a++){var s={type:Mi.POINT,val:t[a]},u={type:Mi.LINE,val:r[a]};if(!Yi(o,s))return!1;if(!Yi(o,u))return!1;if(!Yi(A,s))return!1;if(!Yi(A,u))return!1}}return!0}(Ki(e,r,Object(tr.pick)(n,["holeColor","grooveColor","holeOpacity","grooveOpacity"])).path)}}},{key:"appendFittingDesign",value:(A=Ym(s.a.mark((function e(t){var r,n=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.length>1&&void 0!==n[1]?n[1]:{timeout:5e4},e.abrupt("return",Zm().appendFittingDataToFittingDesign(t,r));case 2:case"end":return e.stop()}}),e)}))),function(e){return A.apply(this,arguments)})},{key:"saveDesign",value:(o=Ym(s.a.mark((function e(t){var r,n,i,o=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=o.length>1&&void 0!==o[1]?o[1]:{},n=r.timeout,i=fd(n),Zm().$actionSaveFittingDesign.started.dispatch({defer:i,design:t}),e.abrupt("return",i.promise);case 5:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})},{key:"clearDesign",value:(i=Ym(s.a.mark((function e(t){var r,n,i,o,A;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(r=t||{}).timeout,i=void 0===n?5e4:n,o=r.modelId,A=fd(i),Zm().$actionClearFittingDesign.started.dispatch({defer:A,modelId:o}),e.abrupt("return",A.promise);case 4:case"end":return e.stop()}}),e)}))),function(e){return i.apply(this,arguments)})}])&&qm(t.prototype,r),n&&qm(t,n),c}(km);function eQ(e){return(eQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function tQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rQ(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function nQ(e,t){return(nQ=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function iQ(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=AQ(e);if(t){var i=AQ(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return oQ(this,r)}}function oQ(e,t){return!t||"object"!==eQ(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function AQ(e){return(AQ=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var aQ=(new fi.a).setFromCenterAndSize(new at.a(0,0,0),new at.a(200,200,100)),sQ=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&nQ(e,t)}(o,e);var t,r,n,i=iQ(o);function o(){return tQ(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"resetDistanceAndLookAt",value:function(){var e=this.state,t=e.initCameraAttributes,r=t.position,n=t.lookAt,i=e.cameraAttributes.position,o=n.clone().sub(r).length(),A=n.clone().add(i.clone().sub(n).normalize().mul(o));this.updateCameraAttributes({position:A,lookAt:n})}},{key:"adjustInitCameraAttributesWithContent",value:function(){return aQ}}])&&rQ(t.prototype,r),n&&rQ(t,n),o}(Ji.Scene3DStateManager);function uQ(e){return(uQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function cQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function lQ(e,t){return(lQ=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function gQ(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=hQ(e);if(t){var i=hQ(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return fQ(this,r)}}function fQ(e,t){return!t||"object"!==uQ(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function hQ(e){return(hQ=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var pQ=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&lQ(e,t)}(r,e);var t=gQ(r);function r(){return cQ(this,r),t.apply(this,arguments)}return r}(Ji.types.combine({scene3D:sQ})),dQ=window.document.createElement("script");dQ.src="//at.alicdn.com/t/font_2369084_dyxfnutf0ac.js",window.document.body.appendChild(dQ);function IQ(e){return(IQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function yQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function CQ(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function EQ(e,t){return(EQ=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function BQ(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=mQ(e);if(t){var i=mQ(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return vQ(this,r)}}function vQ(e,t){return!t||"object"!==IQ(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function mQ(e){return(mQ=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var QQ=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&EQ(e,t)}(o,e);var t,r,n,i=BQ(o);function o(){var e;return yQ(this,o),(e=i.apply(this,arguments)).rootState=new pQ,e}return t=o,(r=[{key:"stateManager",get:function(){return this.rootState}},{key:"onInitialize",value:function(){var e=new cm(this,this.rootState);e.init(),e.run()}}])&&CQ(t.prototype,r),n&&CQ(t,n),o}(Nh.BasePlugin);function bQ(e){return(bQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _Q(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function SQ(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function wQ(e,t){return(wQ=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function DQ(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=MQ(e);if(t){var i=MQ(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return RQ(this,r)}}function RQ(e,t){return!t||"object"!==bQ(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function MQ(e){return(MQ=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}QQ.dependencies=[Ji.AppServicePlugin,qh];var xQ=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&wQ(e,t)}(o,e);var t,r,n,i=DQ(o);function o(){return _Q(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"toggleModelViewIntersected",value:function(e){WC().fittingDesign.intersected.$actionToggleShowIntersected.dispatch(e)}},{key:"toggleModelViewedIntersected",value:function(e){WC().fittingDesign.intersected.toggleShowIntersectGroupData(e)}}])&&SQ(t.prototype,r),n&&SQ(t,n),o}(km);function PQ(e){return(PQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function TQ(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function FQ(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){TQ(o,n,i,A,a,"next",e)}function a(e){TQ(o,n,i,A,a,"throw",e)}A(void 0)}))}}function OQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function LQ(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function NQ(e,t){return(NQ=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function kQ(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=UQ(e);if(t){var i=UQ(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return GQ(this,r)}}function GQ(e,t){return!t||"object"!==PQ(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function UQ(e){return(UQ=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var jQ=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&NQ(e,t)}(u,e);var t,r,n,i,o,A,a=kQ(u);function u(){return OQ(this,u),a.apply(this,arguments)}return t=u,(r=[{key:"getAllCustomModels",value:(A=FQ(s.a.mark((function e(){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",WC().scene.getAllCustomModels());case 1:case"end":return e.stop()}}),e)}))),function(){return A.apply(this,arguments)})},{key:"getCustomModelById",value:(o=FQ(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",WC().scene.getCustomModelById(t));case 1:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})},{key:"save",value:(i=FQ(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",WC().scene.save(t.models));case 1:case"end":return e.stop()}}),e)}))),function(e){return i.apply(this,arguments)})}])&&LQ(t.prototype,r),n&&LQ(t,n),u}(km);function VQ(e){return(VQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function HQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function YQ(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function KQ(e,t){return(KQ=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function qQ(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=WQ(e);if(t){var i=WQ(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return JQ(this,r)}}function JQ(e,t){return!t||"object"!==VQ(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function WQ(e){return(WQ=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var zQ=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&KQ(e,t)}(o,e);var t,r,n,i=qQ(o);function o(){return HQ(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"setFittingHint",value:function(e){WC().fittingDesign.fittingHint.setFittingHint(e)}},{key:"clearFittingHint",value:function(e){WC().fittingDesign.fittingHint.clearFittingHint(e)}}])&&YQ(t.prototype,r),n&&YQ(t,n),o}(km);function XQ(e){return(XQ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ZQ(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function $Q(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){ZQ(o,n,i,A,a,"next",e)}function a(e){ZQ(o,n,i,A,a,"throw",e)}A(void 0)}))}}function eb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function tb(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function rb(e,t){return(rb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function nb(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=ob(e);if(t){var i=ob(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return ib(this,r)}}function ib(e,t){return!t||"object"!==XQ(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ob(e){return(ob=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ab,ab,sb=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&rb(e,t)}(a,e);var t,r,n,i,o,A=nb(a);function a(){return eb(this,a),A.apply(this,arguments)}return t=a,(r=[{key:"getAllFittingModels",value:(o=$Q(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",WC().fittingDesign.fittingModel.getAllFittingModels(t));case 1:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})},{key:"save",value:(i=$Q(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",WC().fittingDesign.fittingModel.save(t.models));case 1:case"end":return e.stop()}}),e)}))),function(e){return i.apply(this,arguments)})}])&&tb(t.prototype,r),n&&tb(t,n),a}(km);function ub(e){return(ub="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function cb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function lb(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function gb(e,t){return(gb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function fb(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=pb(e);if(t){var i=pb(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return hb(this,r)}}function hb(e,t){return!t||"object"!==ub(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function pb(e){return(pb=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}!function(e){e.View3D="view3d",e.Roamer="roamer"}(Ab||(Ab={})),function(e){e.UP="UP",e.DOWN="DOWN",e.LEFT="LEFT",e.RIGHT="RIGHT",e.FRONT="FRONT",e.BACK="BACK"}(ab||(ab={}));var db=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&gb(e,t)}(o,e);var t,r,n,i=fb(o);function o(){return cb(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"toggleCameraMode",value:function(e){var t;switch(e){case Ab.View3D:t=Ji.PerspectiveCameraMode.View3D;break;case Ab.Roamer:t=Ji.PerspectiveCameraMode.Roamer}lm().getStateManager().scene3D.updatePerspectiveCameraMode(t)}},{key:"moveCamera",value:function(e){var t,r=lm().getStateManager().scene3D;switch(e){case ab.UP:case ab.FRONT:t=Ji.ArrowType.UP;break;case ab.DOWN:case ab.BACK:t=Ji.ArrowType.DOWN;break;case ab.LEFT:t=Ji.ArrowType.LEFT;break;case ab.RIGHT:t=Ji.ArrowType.RIGHT}if(t){if(e===ab.UP||e===ab.DOWN)return void r.onQEPress(t);r.onWASDPress(t)}}}])&&lb(t.prototype,r),n&&lb(t,n),o}(km);function Ib(e){return(Ib="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function yb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Cb(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Eb(e,t){return(Eb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Bb(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=mb(e);if(t){var i=mb(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return vb(this,r)}}function vb(e,t){return!t||"object"!==Ib(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function mb(e){return(mb=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Qb=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Eb(e,t)}(o,e);var t,r,n,i=Bb(o);function o(){return yb(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"setDefaultHint",value:function(e){WC().fittingDesign.plankFaceHint.setDefaultHintConfig(e)}},{key:"setModelHint",value:function(e){WC().fittingDesign.plankFaceHint.setModelHint(e)}},{key:"clearModelHint",value:function(e){WC().fittingDesign.plankFaceHint.clearModelHint(e)}}])&&Cb(t.prototype,r),n&&Cb(t,n),o}(km);function bb(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function _b(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){bb(o,n,i,A,a,"next",e)}function a(e){bb(o,n,i,A,a,"throw",e)}A(void 0)}))}}function Sb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wb(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Db(e,t){return(Db=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Rb(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=xb(e);if(t){var i=xb(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Mb(this,r)}}function Mb(e,t){return!t||"object"!==Pb(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function xb(e){return(xb=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Pb(e){return(Pb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Tb,Fb,Ob=function(e,t,r,n){var i,o=arguments.length,A=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"===("undefined"==typeof Reflect?"undefined":Pb(Reflect))&&"function"==typeof Reflect.decorate)A=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(A=(o<3?i(A):o>3?i(t,r,A):i(t,r))||A);return o>3&&A&&Object.defineProperty(t,r,A),A},Lb=function(e,t){if("object"===("undefined"==typeof Reflect?"undefined":Pb(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},Nb=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Db(e,t)}(a,e);var t,r,n,i,o,A=Rb(a);function a(){return Sb(this,a),A.apply(this,arguments)}return t=a,(r=[{key:"getParamData",value:(o=_b(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",WC().viewParamModel.getParamModelJsonData(t));case 1:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})},{key:"getParamIntersected",value:(i=_b(s.a.mark((function e(t){var r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,WC().fittingDesign.intersected.getParamModelIntersectedData(t);case 2:return r=e.sent,e.abrupt("return",(n=r,{intersectedGroups:Object(tr.map)(n.intersectedGroups,(function(e){return pd(pd({},e),{},{intersecteds:Object(tr.map)(e.intersecteds,(function(e){return Object(tr.omit)(e,["shell"])}))})}))}));case 4:case"end":return e.stop()}var n}),e)}))),function(e){return i.apply(this,arguments)})},{key:"getTopParamModels",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.ignoreCategory||(e.ignoreCategory=Je),WC().viewParamModel.getTopModelList(e)}},{key:"getParamModelPhotoById",value:function(e){return WC().viewParamModel.getParamModelPhotoData(e)}}])&&wb(t.prototype,r),n&&wb(t,n),a}(km);function kb(e){return(kb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Gb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ub(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function jb(e,t){return(jb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Vb(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Yb(e);if(t){var i=Yb(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Hb(this,r)}}function Hb(e,t){return!t||"object"!==kb(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Yb(e){return(Yb=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Ob([je.observeAsyncApiDeco({serviceName:"ModelService"}),Lb("design:type",Function),Lb("design:paramtypes",["function"!=typeof!1&&Object]),Lb("design:returntype","function"==typeof(Tb="undefined"!=typeof Promise&&Promise)?Tb:Object)],Nb.prototype,"getParamData",null),Ob([je.observeAsyncApiDeco({serviceName:"ModelService"}),Lb("design:type",Function),Lb("design:paramtypes",["function"!=typeof!1&&Object]),Lb("design:returntype","function"==typeof(Fb="undefined"!=typeof Promise&&Promise)?Fb:Object)],Nb.prototype,"getParamIntersected",null);var Kb,qb,Jb=function(){return WC().select},Wb=function(){return WC().baseDesignInfo};!function(e){e[e.NULL=0]="NULL",e[e.MODEL=1]="MODEL",e[e.CASBIN=2]="CASBIN"}(Kb||(Kb={})),function(e){e[e.MODEL=1]="MODEL",e[e.CASBIN=2]="CASBIN"}(qb||(qb={}));var zb=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&jb(e,t)}(o,e);var t,r,n,i=Vb(o);function o(){var e;return Gb(this,o),(e=i.apply(this,arguments)).hasWatchSelectionChange=!1,e.__generateEntity=function(e){return Object(tr.castArray)(e).map((function(e){var t={__sceneId:bp.SCENE_ID,entityId:e.id,entityType:LA};return e.type===qb.CASBIN&&(t.entityId=Wb().state.casbinModelIdMap[e.id]),t}))},e.onSelectedChanged=function(){$t.emit(zt.SELECTION_SERVICE_MODEL_CHANGE,e.getSelected())},e}return t=o,(r=[{key:"getSelected",value:function(){var e=Jb().state.state.selectedData,t=WC().viewParamModel.state.state.allSubModels;if(e.length){var r=e[0].$model;if(r&&r instanceof jt&&r.isAppendHardware)return{data:[r.hardwareData],type:Kb.CASBIN};var n=Object(tr.map)(e,"id"),i=t.filter((function(e){return n.includes(e.id)}));if(n.length)return{data:i,type:Kb.MODEL}}return{data:[],type:Kb.NULL}}},{key:"select",value:function(e){var t=this.__generateEntity(e);Jb().select(t)}},{key:"unSelect",value:function(e){if(e){var t=this.__generateEntity(e);Jb().unSelect(t)}else Jb().select([])}},{key:"startWatchSelectedChangedEvent",value:function(){this.hasWatchSelectionChange||(this.hasWatchSelectionChange=!0,Jb().on(qC.EVENT_SELECT_CHANGED,this.onSelectedChanged))}},{key:"on",value:function(e){this.startWatchSelectedChangedEvent(),$t.on(zt.SELECTION_SERVICE_MODEL_CHANGE,e)}},{key:"off",value:function(e){$t.off(zt.SELECTION_SERVICE_MODEL_CHANGE,e)}},{key:"once",value:function(e){this.startWatchSelectedChangedEvent(),$t.once(zt.SELECTION_SERVICE_MODEL_CHANGE,e)}},{key:"__onDestroy",value:function(){Jb().off(qC.EVENT_SELECT_CHANGED,this.onSelectedChanged)}}])&&Ub(t.prototype,r),n&&Ub(t,n),o}(km);function Xb(e){return(Xb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Zb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $b(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function e_(e,t){return(e_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function t_(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=n_(e);if(t){var i=n_(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return r_(this,r)}}function r_(e,t){return!t||"object"!==Xb(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function n_(e){return(n_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var i_=function(){return WC().select},o_=function(){return lm().designModeContext},A_=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&e_(e,t)}(o,e);var t,r,n,i=t_(o);function o(){var e;return Zb(this,o),(e=i.apply(this,arguments)).hasWatchSelectionChange=!1,e.plankFaceClickEvent={on:function(e){$t.on(zt.PLANK_FACE_CLICK,e)},once:function(e){$t.once(zt.PLANK_FACE_CLICK,e)},off:function(e){$t.off(zt.PLANK_FACE_CLICK,e)}},e.plankFaceHoverEvent={on:function(e){$t.on(zt.PLANK_FACE_HOVER,e)},once:function(e){$t.once(zt.PLANK_FACE_HOVER,e)},off:function(e){$t.off(zt.PLANK_FACE_HOVER,e)}},e.onSelectedChanged=function(){$t.emit(zt.SELECTION_SERVICE_V2_MODEL_CHANGE,e.getSelected())},e}return t=o,(r=[{key:"getSelected",value:function(){return i_().state.state.selectedDataV2.map(this._genElement).filter((function(e){return!!e}))}},{key:"select",value:function(e){var t=Object(tr.castArray)(e).map(this._genEntityFromElement);i_().select(t),o_().setCurSelectEntity(t)}},{key:"unSelect",value:function(e){if(e){var t=Object(tr.castArray)(e).map(this._genEntityFromElement);i_().unSelect(t);var r=o_().getCurSelectEntity();r&&(Array.isArray(r)?o_().setCurSelectEntity(Object(tr.difference)(r,t)):t.includes(r)&&o_().setCurSelectEntity(void 0))}else i_().select(),o_().setCurSelectEntity(void 0)}},{key:"on",value:function(e){this.startWatchSelectedChangedEvent(),$t.on(zt.SELECTION_SERVICE_V2_MODEL_CHANGE,e)}},{key:"off",value:function(e){$t.off(zt.SELECTION_SERVICE_V2_MODEL_CHANGE,e)}},{key:"once",value:function(e){this.startWatchSelectedChangedEvent(),$t.once(zt.SELECTION_SERVICE_V2_MODEL_CHANGE,e)}},{key:"startWatchSelectedChangedEvent",value:function(){this.hasWatchSelectionChange||(this.hasWatchSelectionChange=!0,i_().on(qC.EVENT_SELECT_CHANGED_V2,this.onSelectedChanged))}},{key:"_genEntityFromElement",value:function(e){return{entityId:e.id,entityType:Im[e.type]}}},{key:"_genElement",value:function(e){var t;if(e instanceof jt?t=e.isAppendHardware?ze.HARDWARE:ze.PARAM_MODEL:e instanceof Xt?t=ze.PARAM_MODEL_ASSEMBLY:e instanceof vn?t=ze.HARDWARE_GROOVE:e instanceof Vr&&(t=e.type===l.HOLE?ze.HOLE:ze.GROOVE),t)return{id:e.id,type:t}}},{key:"__onDestroy",value:function(){i_().off(qC.EVENT_SELECT_CHANGED,this.onSelectedChanged)}}])&&$b(t.prototype,r),n&&$b(t,n),o}(km);function a_(e){return(a_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s_(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function u_(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){s_(o,n,i,A,a,"next",e)}function a(e){s_(o,n,i,A,a,"throw",e)}A(void 0)}))}}function c_(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l_(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function g_(e,t){return(g_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f_(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=p_(e);if(t){var i=p_(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return h_(this,r)}}function h_(e,t){return!t||"object"!==a_(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function p_(e){return(p_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var d_=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&g_(e,t)}(u,e);var t,r,n,i,o,A,a=f_(u);function u(){return c_(this,u),a.apply(this,arguments)}return t=u,(r=[{key:"viewSelected",value:(A=u_(s.a.mark((function e(){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",WC().viewParamModel.viewSelectedParamModel());case 1:case"end":return e.stop()}}),e)}))),function(){return A.apply(this,arguments)})},{key:"viewModelById",value:(o=u_(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",WC().viewParamModel.viewParamModelById(t));case 1:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})},{key:"resetPerspective",value:function(){var e=lm().getStateManager().scene3D;e.updateEnableCameraAnimation(!0),e.reset()}},{key:"toggleModelBorder",value:function(e){WC().scene.$actionToggleRenderBorder.dispatch(e)}},{key:"toggleModelTransparent",value:function(e){WC().scene.$actionToggleRenderTranslucent.dispatch(e)}},{key:"setting",value:function(e){WC().fittingDesign.senseSetting.$actionSenseSetting.dispatch(e)}},{key:"refreshModel",value:(i=u_(s.a.mark((function e(){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",WC().viewParamModel.refreshCustomModelData());case 1:case"end":return e.stop()}}),e)}))),function(){return i.apply(this,arguments)})}])&&l_(t.prototype,r),n&&l_(t,n),u}(km),I_=r(244);function y_(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function C_(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?y_(Object(r),!0).forEach((function(t){E_(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):y_(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function E_(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function B_(e){return function(e){if(Array.isArray(e))return v_(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return v_(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return v_(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v_(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function m_(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var Q_=function(){function e(t,r){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._isRealPath=!1,this._changeMap={},this.id=Br()(),this.modelID=t,this.paths=r,r.forEach((function(e){e.plankArea=n}))}var t,r,n;return t=e,(r=[{key:"getRealPaths",value:function(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this._isRealPath)throw new Error("There is no need to getRealPaths repeatedly.");var n=r.force,i=void 0!==n&&n,o=r.resetCenter,A=void 0===o||o;if(!i&&A&&this._realPathsResetCenterCache)return this._realPathsResetCenterCache;if(!i&&!A&&this._realPathsCache)return this._realPathsCache;if(!this.paths.length)return new e(this.modelID,[]);var a=this.getFace2ds();if(this.paths.length>1){var s=[];u.FacesBoolean.faces2DBoolean(a.slice(0,1),a.slice(1),u.FacesBoolean.FaceBooleanType.subtract,s),a=s}var c=0===a.length?a[0]:{loops:(t=[]).concat.apply(t,B_(a.map((function(e){return e.loops}))))};if(A){Object(I_.calculateFaceBBox)(c);var l=c.box.center,g=u.Matrix3.makeTranslation(-l.x,-l.y);a.forEach((function(e){e.loops.forEach((function(e){e.forEach((function(e){e.transform(g)}))}))}))}var f=a.map((function(e){return e.loops[0]})).map((function(e){return __(We.OUTER,e)})),h=a.reduce((function(e,t){return e.push.apply(e,B_(t.loops.slice(1))),e}),[]).map((function(e){return __(We.INNER,e,!0)})),p=new e(this.modelID,[].concat(B_(f),B_(h)));return A?this._realPathsResetCenterCache=p:this._realPathsCache=p,p._isRealPath=!0,p}},{key:"getCenterPoint",value:function(){var e=b_(this.paths.find((function(e){return e.type===We.OUTER})));Object(I_.calculateFaceBBox)(e);var t=e.box.center;return{x:t.x,y:t.y}}},{key:"getFace2ds",value:function(){return this.paths.map(b_)}},{key:"_trackUpdateField",value:function(e,t,r){this._changeMap.update=this._changeMap.update||[];var n=this._changeMap.update,i=e.field;t===r||n.some((function(t){return t.field===i&&t.context.id===e.context.id}))||n.push(e)}},{key:"changeMap",get:function(){return this._changeMap},set:function(e){this._changeMap=e}}])&&m_(t.prototype,r),n&&m_(t,n),e}();function b_(e){var t=[];if(e.lines.forEach((function(e){var r=e.start;r.getType()!==E.NONE&&t.push(r.getCurveLineAndPoints().curveLine),t.push(e.getRealLine())})),e.offset){var r=(0,u.LoopCCW.isPolygonCCW2D)(t.map((function(e){return e.startPoint})))?e.offset:-e.offset;return{loops:u.Path2dOffset.offsetPath2d(t,r).resultPaths}}return{loops:[t]}}function __(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=t.map((function(e){return new $r({type:E.NONE,position:e.startPoint})})),i=t.map((function(e){var t;return t=e instanceof u.LineSeg2d?{type:B.SEGMENT}:e instanceof u.Arc2d?S_(e):w_(e),new Wr(t)})),o=u.LoopCCW.isPolygonCCW2D(n.map((function(e){return e.getPosition()})));r!==o&&(n=n.reverse(),i=(i=i.reverse().map((function(e){return"boolean"==typeof e.clockwise&&(e.clockwise=!e.clockwise),e}))).slice(1).concat(i[0]));var A=R_(n.map((function(e){return e.getPosition()})));return n=n.slice(A).concat(n.slice(0,A)),i=i.slice(A).concat(i.slice(0,A)),new sn({type:e,points:n,lines:i,forceCCW:!1})}function S_(e){var t={};t.type=B.CIRCLE_ARC,t.radius=e.radius,t.clockwise=!e.isCCW;var r=e.center,n=e.startPoint,i=e.endPoint,o=new u.LineSeg2d(n,i),A=o.length/2,a=new u.Vector2d(o.getPoint(A)),s=new u.Vector2d(r).subtracted(a).normalized();return t.clockwise?t.minorArc=s.isSameDirection(o.rightNormal):t.minorArc=s.isSameDirection(o.leftNormal),t}function w_(e){var t={};return t.type=B.ELLIPSE_ARC,t.majorRadius=e.majorRadius,t.minorRadius=e.minorRadius,t.clockwise=!e.isCCW,t.ellipseCenter=e.ccs.origin,t}function D_(e){var t=e.changeMap.update,r=e._isRealPath?e.getCenterPoint():null,n=e._isRealPath?u.Matrix3.makeTranslation(-r.x,-r.y):void 0;t&&t.length>0&&(t.forEach((function(e){var t=e.field,r=e.context;"hint"===t&&((r=r).getHint()?Wc(r,n):function(e,t){var r=Vc().getStateManager().fittingDesign,n=r.getPlankOutlineHintModels(),i=n.findIndex((function(r){return r.linkModel.id===e&&r.id===t}));if(i>-1){var o=Hc(n);o.splice(i,1),r.setPlankOutlineHintModels(o)}}(r.path.plankArea.modelID,r.id))})),e.changeMap=C_(C_({},e.changeMap),{},{update:[]}))}function R_(e){if(!e.length)return 0;var t=e[0].y,r=e[0].x;e.slice(1).forEach((function(e){t<e.y&&(t=e.y),r>e.x&&(r=e.x)}));var n,i,o=-r,A=-t;return e.forEach((function(t,r){var a=t.x,s=t.y,u=Math.pow(a+o,2)+Math.pow(s+A,2);void 0===n||u<n?(n=u,i=r):n===u&&e[i].x>t.x&&(i=r)})),i}function M_(e){return(M_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function x_(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function P_(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function T_(e,t){return(T_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function F_(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=L_(e);if(t){var i=L_(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return O_(this,r)}}function O_(e,t){return!t||"object"!==M_(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function L_(e){return(L_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var N_=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&T_(e,t)}(o,e);var t,r,n,i=F_(o);function o(){return x_(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"parseModelPlankPath",value:function(e){return t=e.modelID,r=e.data,n=[],r.path&&n.push(un(We.OUTER,r.path)),n.push.apply(n,B_(r.holes.map((function(e){return un(We.INNER,e)})))),new Q_(t,n);var t,r,n}},{key:"syncModelPlankPath",value:function(e){D_(e)}}])&&P_(t.prototype,r),n&&P_(t,n),o}(km);function k_(e){return(k_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function G_(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function U_(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function j_(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function V_(e,t){return(V_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function H_(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=K_(e);if(t){var i=K_(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Y_(this,r)}}function Y_(e,t){return!t||"object"!==k_(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function K_(e){return(K_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var q_=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&V_(e,t)}(a,e);var t,r,n,i,o,A=H_(a);function a(){return U_(this,a),A.apply(this,arguments)}return t=a,(r=[{key:"stable",value:(i=s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",WC().viewParamModel.validateModelStable(t.modelId));case 1:case"end":return e.stop()}}),e)})),o=function(){var e=this,t=arguments;return new Promise((function(r,n){var o=i.apply(e,t);function A(e){G_(o,r,n,A,a,"next",e)}function a(e){G_(o,r,n,A,a,"throw",e)}A(void 0)}))},function(e){return o.apply(this,arguments)})}])&&j_(t.prototype,r),n&&j_(t,n),a}(km);function J_(e){return(J_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function W_(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function z_(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function X_(e,t){return(X_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Z_(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=eS(e);if(t){var i=eS(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return $_(this,r)}}function $_(e,t){return!t||"object"!==J_(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function eS(e){return(eS=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var tS=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&X_(e,t)}(o,e);var t,r,n,i=Z_(o);function o(){return W_(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"setDesignMode",value:function(e){var t=e.mode,r=e.customModeCb;lm().designModeContext.setDesignMode(t,r)}},{key:"registerMultiSelectShortcut",value:function(e){lm().designModeContext.registerMultiSelectShortcut(e)}}])&&z_(t.prototype,r),n&&z_(t,n),o}(km),rS=r(426),nS=r.n(rS),iS=new qi.I18NManager,oS="custom_order_split",AS={"custom.pad.resetPerspective":"重置视角","custom.pad.confirm":"确定","custom.pad.cannotAdd":"无法适配该模型","custom.pad.chooseBasicModule":"请选择基础模块","custom.pad.loadSeriesFailed":"加载系列失败","custom.pad.invalidSeries":"系列信息无效","custom.pad.invalidURL":"页面走丢了","custom.pad.loadDesignFailed":"产品加载失败","custom.pad.invalidDesign":"产品信息无效","custom.pad.loadFailed":"数据加载失败","custom.pad.invalidData":"数据无效","custom.pad.saveFailed":"产品保存失败","custom.pad.previewFailed":"生成预览图失败","custom.pad.save":"保存","custom.pad.saveAs":"另存为","custom.pad.saveTitle":"产品保存","custom.pad.saveAsTitle":"产品另存为","custom.pad.saveName":"产品名称","custom.pad.saveNameHolder":"请输入产品名称","custom.pad.saveRequired":"该项为必填项","custom.pad.savePos":"存储位置","custom.pad.savePersonal":"个人库","custom.pad.saveEnterprise":"企业库","custom.pad.cancel":"取消","custom.pad.askSave":"是否保存?","custom.pad.askSaveDesc":"是否要保存当前产品方案?","custom.pad.notSave":"不保存","custom.pad.getAuthFailed":"获取用户账号类型失败","custom.pad.uploadCoverFailed":"上传图片封面失败","custom.pad.hideDoor":"隐藏柜门","custom.pad.showDoor":"显示柜门","custom.pad.showDoorTip":"柜门已隐藏, 点击此处可显示柜门","custom.pad.shadingMode":"材质","custom.pad.outlineShadingMode":"材质 + 线框","custom.pad.frameStyle":"柜体样式","custom.pad.replaceFail":"修改样式失败","custom.pad.productNameExist":"产品名称已存在","custom.pad.saveSuccess":"产品保存成功","custom.pad.defaultSaveName":"未命名","custom.pad.showRuler":"显示尺寸","custom.pad.hideRuler":"隐藏尺寸"};function aS(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function sS(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){aS(o,n,i,A,a,"next",e)}function a(e){aS(o,n,i,A,a,"throw",e)}A(void 0)}))}}var uS=Object(tr.once)((function(){return!!Object(zc.parseServQueryParams)()}));function cS(){return lS.apply(this,arguments)}function lS(){return(lS=sS(s.a.mark((function e(){var t,r,n=arguments;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},r=zc.servkit.createTerminal({id:t.clientId||"custom-order-split",type:zc.EServTerminal.SLAVE,server:{service:{services:[]},serviceRefer:/.*/},session:{checkSession:!0,channel:{type:zc.EServChannel.WINDOW,config:{slave:{getWindow:function(e){return{target:window.parent,window:window}}}}}}}),e.next=4,r.openSession({timeout:t.timeout||3e4});case 4:return e.abrupt("return",r);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var gS=r(533),fS=r.n(gS),hS=r(1134),pS=r.n(hS);function dS(e){return(dS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function IS(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yS(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function CS(e,t){return(CS=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ES(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=vS(e);if(t){var i=vS(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return BS(this,r)}}function BS(e,t){return!t||"object"!==dS(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function vS(e){return(vS=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var mS=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&CS(e,t)}(o,e);var t,r,n,i=ES(o);function o(){return IS(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"render",value:function(){var e=this.props,t=e.tip,r=e.noImg,n=e.imgSrc,i=e.className;return zi.a.createElement("div",{className:fS()(pS.a.empty,i)},!r&&zi.a.createElement("img",{src:n||"//qhstaticssl.kujiale.com/newt/227/image/png/1549962437921/D1F6B2D9AF21335BEEF19C45580DE165.png"}),t&&zi.a.createElement("p",null,t))}}])&&yS(t.prototype,r),n&&yS(t,n),o}(zi.a.PureComponent);function QS(e){return(QS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function bS(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _S(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function SS(e,t){return(SS=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function wS(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=RS(e);if(t){var i=RS(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return DS(this,r)}}function DS(e,t){return!t||"object"!==QS(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function RS(e){return(RS=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var MS=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&SS(e,t)}(o,e);var t,r,n,i=wS(o);function o(){return bS(this,o),i.apply(this,arguments)}return t=o,(r=[{key:"render",value:function(){var e=this.props;return zi.a.createElement(Ji.Scene3D,e)}}])&&_S(t.prototype,r),n&&_S(t,n),o}(Wi.PureComponent),xS=r(1135),PS=r.n(xS);function TS(e){return(TS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function FS(){return(FS=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function OS(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function LS(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function NS(e,t){return(NS=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function kS(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=US(e);if(t){var i=US(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return GS(this,r)}}function GS(e,t){return!t||"object"!==TS(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function US(e){return(US=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Wi.PureComponent;var jS=r(91);function VS(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,i=!1,o=void 0;try{for(var A,a=e[Symbol.iterator]();!(n=(A=a.next()).done)&&(r.push(A.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(i)throw o}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return HS(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return HS(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function HS(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}window.React=zi.a;var YS=document.getElementById("root");function KS(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function qS(e,t,r,n,i,o,A){try{var a=e[o](A),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,i)}function JS(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function A(e){qS(o,n,i,A,a,"next",e)}function a(e){qS(o,n,i,A,a,"throw",e)}A(void 0)}))}}function WS(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var zS=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.serviceMap=new Map,this.initLange(Ue.ZH_CN,{zh_CN:AS}),function(e){Kh=e}(this)}var t,r,n,i,o;return t=e,(r=[{key:"startOnApiCalledEvent",value:function(){var e=this,t={on:function(e){return $t.on(zt.API_CALLED,e),function(){return $t.off(zt.API_CALLED,e)}},once:function(e){return $t.once(zt.API_CALLED,e),function(){return $t.off(zt.API_CALLED,e)}},emit:function(e){$t.emit(zt.API_CALLED,e)}};je.setEvent(t),t.on((function(t){var r=t.args,n=t.errMsg,i=t.status,o=t.apiName,A=t.duration,a=t.serviceName,s=e.getCustomMiniAppService(Lf);if(s){var u="".concat(a,".").concat(o);if(s.logApiCalledInfo({status:i,apiType:"CUSTOM_SPLIT_API",apiName:u,duration:A}),!i){var c=n instanceof Error?n.message:n&&n.toString?n.toString():"unknown",l="\n called ".concat(u," api fail:\n arguments is ").concat(JSON.stringify(r),",\n errMsg is ").concat(c,"\n ");s.logApiError({messagePrefix:"miniAppApiCalledError",name:"Error",message:l,stack:""})}}}))}},{key:"isInCustomMiniAppMode",value:function(){return uS()}},{key:"createDebugUtils",value:function(){var e=this.serviceMap,t={enableDebug:function(){window.__customsdk__.services=e}};window.__customsdk__=t}},{key:"start",value:(o=JS(s.a.mark((function e(t){var r,n,i=this;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.createDebugUtils(),!this.isInCustomMiniAppMode()){e.next=8;break}if(zc.sappSDK.isStarted){e.next=5;break}return e.next=5,zc.sappSDK.setConfig({useTerminalId:null==t?void 0:t.clientId,onClose:function(){var e=JS(s.a.mark((function e(t){return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i.stop();case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}).start();case 5:this.sappSDK=zc.sappSDK,e.next=13;break;case 8:return e.next=10,gd(30);case 10:return e.next=12,cS(t);case 12:this.sappSDK=e.sent;case 13:return this.startOnApiCalledEvent(),e.next=16,Promise.resolve([Ji.App,QQ]).then((function(e){var t=VS(e,2),r=t[0],n=t[1];(new r).registerPlugin(n).start({fpsDetectorEnabled:!0}),document.body.removeChild(YS)})).catch((function(e){Object(jS.unmountComponentAtNode)(YS),Object(jS.render)(zi.a.createElement(mS,null),YS),console.error("micros/pad",e)}));case 16:return(r=this.getCustomMiniAppService(Pf))?(Rc().setMiniAppHttpProxyClientService(r),tp(Rc())):tp(Dc()),(Jh=new ep.AttachedService).config.setRequestClient(zh),Wh=new ep.ParamModelDataService({paramModelConstructor:jt,requestClient:zh}),new ep.ParamModelAssemblyDataService({paramModelAssemblyConstructor:Xt,requestClient:zh}),n=this.getService(d_),e.prev=20,e.next=23,n.viewSelected();case 23:e.next=28;break;case 25:e.prev=25,e.t0=e.catch(20),Object({DEPLOY_VERSION:1,APP_VERSION:1}).IS_DEV&&console.error(e.t0);case 28:case"end":return e.stop()}}),e,this,[[20,25]])}))),function(e){return o.apply(this,arguments)})},{key:"initLange",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ue.ZH_CN,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};window.__PUB_LANG__=Object(tr.extend)(window.__PUB_LANG__,{kaf_core:{lang:{}},custom_model:{lange:{}}}),nS.a.init({lang:e,debug:!1,initImmediate:!0,translatorType:rS.ENUM.TranslatorType.I18next,packages:[oS],resource:KS({},oS,t)}),iS.init({namespace:oS,resources:oS})}},{key:"stop",value:(i=JS(s.a.mark((function e(){var t;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=this.getCustomMiniAppService(Tf))){e.next=4;break}return e.next=4,t.lockModelBySplit();case 4:this.serviceMap.forEach((function(e){Object(tr.isFunction)(e.__onDestroy)&&e.__onDestroy()})),this.serviceMap=new Map;case 6:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"getService",value:function(e){if(km.isPrototypeOf(e)){var t=this.serviceMap,r=t.get(e);return r||(r=new e,t.set(e,r)),r}throw new Error("service not found!")}},{key:"getCustomMiniAppService",value:function(e){var t=this.sappSDK;if(!this.sappSDK)throw new Error("app not started!");return t instanceof zc.SappSDK?t.getService(e):t.client.getService(e)}},{key:"getCustomMiniAppServiceUnSafe",value:function(e){return this.getCustomMiniAppService(e)}}])&&WS(t.prototype,r),n&&WS(t,n),e}()},function(e,t,r){"use strict";r.r(t),r.d(t,"changeLanguage",(function(){return X})),r.d(t,"cloneInstance",(function(){return Z})),r.d(t,"createInstance",(function(){return $})),r.d(t,"dir",(function(){return ee})),r.d(t,"exists",(function(){return te})),r.d(t,"getFixedT",(function(){return re})),r.d(t,"init",(function(){return ne})),r.d(t,"loadLanguages",(function(){return ie})),r.d(t,"loadNamespaces",(function(){return oe})),r.d(t,"loadResources",(function(){return Ae})),r.d(t,"off",(function(){return ae})),r.d(t,"on",(function(){return se})),r.d(t,"setDefaultNamespace",(function(){return ue})),r.d(t,"t",(function(){return ce})),r.d(t,"use",(function(){return le}));var n=r(191),i=r.n(n),o=r(85),A=r.n(o),a=r(73),s=r.n(a),u=r(74),c=r.n(u),l=r(212),g=r.n(l),f=r(247),h=r.n(f),p=r(248),d=r.n(p),I=r(101),y=r.n(I),C=r(1126),E=r.n(C),B={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){var r;console&&console[e]&&(r=console)[e].apply(r,E()(t))}},v=new(function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};s()(this,e),this.init(t,r)}return c()(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||B,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,r,n){return n&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(r).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,A()({},{prefix:"".concat(this.prefix,":").concat(t,":")},this.options))}}]),e}()),m=function(){function e(){s()(this,e),this.observers={}}return c()(e,[{key:"on",value:function(e,t){var r=this;return e.split(" ").forEach((function(e){r.observers[e]=r.observers[e]||[],r.observers[e].push(t)})),this}},{key:"off",value:function(e,t){var r=this;this.observers[e]&&this.observers[e].forEach((function(){if(t){var n=r.observers[e].indexOf(t);n>-1&&r.observers[e].splice(n,1)}else delete r.observers[e]}))}},{key:"emit",value:function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];if(this.observers[e]){var i=[].concat(this.observers[e]);i.forEach((function(e){e.apply(void 0,r)}))}if(this.observers["*"]){var o=[].concat(this.observers["*"]);o.forEach((function(t){t.apply(t,[e].concat(r))}))}}}]),e}();function Q(){var e,t,r=new Promise((function(r,n){e=r,t=n}));return r.resolve=e,r.reject=t,r}function b(e){return null==e?"":""+e}function _(e,t,r){e.forEach((function(e){t[e]&&(r[e]=t[e])}))}function S(e,t,r){function n(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function i(){return!e||"string"==typeof e}for(var o="string"!=typeof t?[].concat(t):t.split(".");o.length>1;){if(i())return{};var A=n(o.shift());!e[A]&&r&&(e[A]=new r),e=e[A]}return i()?{}:{obj:e,k:n(o.shift())}}function w(e,t,r){var n=S(e,t,Object);n.obj[n.k]=r}function D(e,t){var r=S(e,t),n=r.obj,i=r.k;if(n)return n[i]}function R(e,t,r){for(var n in t)n in e?"string"==typeof e[n]||e[n]instanceof String||"string"==typeof t[n]||t[n]instanceof String?r&&(e[n]=t[n]):R(e[n],t[n],r):e[n]=t[n];return e}function M(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var x={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function P(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return x[e]})):e}var T=function(e){function t(e){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return s()(this,t),r=g()(this,h()(t).call(this)),m.call(y()(y()(r))),r.data=e||{},r.options=n,void 0===r.options.keySeparator&&(r.options.keySeparator="."),r}return d()(t,e),c()(t,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,o=[e,t];return r&&"string"!=typeof r&&(o=o.concat(r)),r&&"string"==typeof r&&(o=o.concat(i?r.split(i):r)),e.indexOf(".")>-1&&(o=e.split(".")),D(this.data,o)}},{key:"addResource",value:function(e,t,r,n){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},o=this.options.keySeparator;void 0===o&&(o=".");var A=[e,t];r&&(A=A.concat(o?r.split(o):r)),e.indexOf(".")>-1&&(n=t,t=(A=e.split("."))[1]),this.addNamespaces(t),w(this.data,A,n),i.silent||this.emit("added",e,t,r,n)}},{key:"addResources",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var i in r)"string"!=typeof r[i]&&"[object Array]"!==Object.prototype.toString.apply(r[i])||this.addResource(e,t,i,r[i],{silent:!0});n.silent||this.emit("added",e,t,r)}},{key:"addResourceBundle",value:function(e,t,r,n,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},a=[e,t];e.indexOf(".")>-1&&(n=r,r=t,t=(a=e.split("."))[1]),this.addNamespaces(t);var s=D(this.data,a)||{};n?R(s,r,i):s=A()({},s,r),w(this.data,a,s),o.silent||this.emit("added",e,t,r)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?A()({},{},this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"toJSON",value:function(){return this.data}}]),t}(m),F={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,r,n,i){var o=this;return e.forEach((function(e){o.processors[e]&&(t=o.processors[e].process(t,r,n,i))})),t}},O=function(e){function t(e){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return s()(this,t),r=g()(this,h()(t).call(this)),m.call(y()(y()(r))),_(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat"],e,y()(y()(r))),r.options=n,void 0===r.options.keySeparator&&(r.options.keySeparator="."),r.logger=v.create("translator"),r}return d()(t,e),c()(t,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},r=this.resolve(e,t);return r&&void 0!==r.res}},{key:"extractFromKey",value:function(e,t){var r=t.nsSeparator||this.options.nsSeparator;void 0===r&&(r=":");var n=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,i=t.ns||this.options.defaultNS;if(r&&e.indexOf(r)>-1){var o=e.split(r);(r!==n||r===n&&this.options.ns.indexOf(o[0])>-1)&&(i=o.shift()),e=o.join(n)}return"string"==typeof i&&(i=[i]),{key:e,namespaces:i}}},{key:"translate",value:function(e,t){var r=this;if("object"!==i()(t)&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var n=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=this.extractFromKey(e[e.length-1],t),a=o.key,s=o.namespaces,u=s[s.length-1],c=t.lng||this.language,l=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c&&"cimode"===c.toLowerCase()){if(l){var g=t.nsSeparator||this.options.nsSeparator;return u+g+a}return a}var f=this.resolve(e,t),h=f&&f.res,p=f&&f.usedKey||a,d=f&&f.exactUsedKey||a,I=Object.prototype.toString.apply(h),y=["[object Number]","[object Function]","[object RegExp]"],C=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,E=!this.i18nFormat||this.i18nFormat.handleAsObject,B="string"!=typeof h&&"boolean"!=typeof h&&"number"!=typeof h;if(E&&h&&B&&y.indexOf(I)<0&&("string"!=typeof C||"[object Array]"!==I)){if(!t.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(p,h,t):"key '".concat(a," (").concat(this.language,")' returned an object instead of string.");if(n){var v="[object Array]"===I,m=v?[]:{},Q=v?d:p;for(var b in h)if(Object.prototype.hasOwnProperty.call(h,b)){var _="".concat(Q).concat(n).concat(b);m[b]=this.translate(_,A()({},t,{joinArrays:!1,ns:s})),m[b]===_&&(m[b]=h[b])}h=m}}else if(E&&"string"==typeof C&&"[object Array]"===I)(h=h.join(C))&&(h=this.extendTranslation(h,e,t));else{var S=!1,w=!1;if(!this.isValidLookup(h)&&void 0!==t.defaultValue){if(S=!0,void 0!==t.count){var D=this.pluralResolver.getSuffix(c,t.count);h=t["defaultValue".concat(D)]}h||(h=t.defaultValue)}this.isValidLookup(h)||(w=!0,h=a);var R=t.defaultValue&&t.defaultValue!==h&&this.options.updateMissing;if(w||S||R){this.logger.log(R?"updateKey":"missingKey",c,u,a,R?t.defaultValue:h);var M=[],x=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&x&&x[0])for(var P=0;P<x.length;P++)M.push(x[P]);else"all"===this.options.saveMissingTo?M=this.languageUtils.toResolveHierarchy(t.lng||this.language):M.push(t.lng||this.language);var T=function(e,n){r.options.missingKeyHandler?r.options.missingKeyHandler(e,u,n,R?t.defaultValue:h,R,t):r.backendConnector&&r.backendConnector.saveMissing&&r.backendConnector.saveMissing(e,u,n,R?t.defaultValue:h,R,t),r.emit("missingKey",e,u,n,h)};if(this.options.saveMissing){var F=void 0!==t.count&&"string"!=typeof t.count;this.options.saveMissingPlurals&&F?M.forEach((function(e){r.pluralResolver.getPluralFormsOfKey(e,a).forEach((function(t){return T([e],t)}))})):T(M,a)}}h=this.extendTranslation(h,e,t,f),w&&h===a&&this.options.appendNamespaceToMissingKey&&(h="".concat(u,":").concat(a)),w&&this.options.parseMissingKeyHandler&&(h=this.options.parseMissingKeyHandler(h))}return h}},{key:"extendTranslation",value:function(e,t,r,n){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,r,n.usedLng,n.usedNS,n.usedKey,{resolved:n});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init(A()({},r,{interpolation:A()({},this.options.interpolation,r.interpolation)}));var o=r.replace&&"string"!=typeof r.replace?r.replace:r;this.options.interpolation.defaultVariables&&(o=A()({},this.options.interpolation.defaultVariables,o)),e=this.interpolator.interpolate(e,o,r.lng||this.language,r),!1!==r.nest&&(e=this.interpolator.nest(e,(function(){return i.translate.apply(i,arguments)}),r)),r.interpolation&&this.interpolator.reset()}var a=r.postProcess||this.options.postProcess,s="string"==typeof a?[a]:a;return null!=e&&s&&s.length&&!1!==r.applyPostProcessor&&(e=F.handle(s,e,t,r,this)),e}},{key:"resolve",value:function(e){var t,r,n,i,o,A=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((function(e){if(!A.isValidLookup(t)){var s=A.extractFromKey(e,a),u=s.key;r=u;var c=s.namespaces;A.options.fallbackNS&&(c=c.concat(A.options.fallbackNS));var l=void 0!==a.count&&"string"!=typeof a.count,g=void 0!==a.context&&"string"==typeof a.context&&""!==a.context,f=a.lngs?a.lngs:A.languageUtils.toResolveHierarchy(a.lng||A.language,a.fallbackLng);c.forEach((function(e){A.isValidLookup(t)||(o=e,f.forEach((function(r){if(!A.isValidLookup(t)){i=r;var o,s,c=u,f=[c];if(A.i18nFormat&&A.i18nFormat.addLookupKeys)A.i18nFormat.addLookupKeys(f,u,r,e,a);else l&&(o=A.pluralResolver.getSuffix(r,a.count)),l&&g&&f.push(c+o),g&&f.push(c+="".concat(A.options.contextSeparator).concat(a.context)),l&&f.push(c+=o);for(;s=f.pop();)A.isValidLookup(t)||(n=s,t=A.getResource(r,e,s,a))}})))}))}})),{res:t,usedKey:r,exactUsedKey:n,usedLng:i,usedNS:o}}},{key:"isValidLookup",value:function(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,r,n):this.resourceStore.getResource(e,t,r,n)}}]),t}(m);function L(e){return e.charAt(0).toUpperCase()+e.slice(1)}var N=function(){function e(t){s()(this,e),this.options=t,this.whitelist=this.options.whitelist||!1,this.logger=v.create("languageUtils")}return c()(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),this.formatLanguageCode(t.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],r=e.split("-");return this.options.lowerCaseLng?r=r.map((function(e){return e.toLowerCase()})):2===r.length?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=L(r[1].toLowerCase()))):3===r.length&&(r[0]=r[0].toLowerCase(),2===r[1].length&&(r[1]=r[1].toUpperCase()),"sgn"!==r[0]&&2===r[2].length&&(r[2]=r[2].toUpperCase()),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=L(r[1].toLowerCase())),t.indexOf(r[2].toLowerCase())>-1&&(r[2]=L(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isWhitelisted",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitWhitelist)&&(e=this.getLanguagePartFromCode(e)),!this.whitelist||!this.whitelist.length||this.whitelist.indexOf(e)>-1}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var r=e[t];return r||(r=e[this.getScriptPartFromCode(t)]),r||(r=e[this.formatLanguageCode(t)]),r||(r=e.default),r||[]}},{key:"toResolveHierarchy",value:function(e,t){var r=this,n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),i=[],o=function(e){e&&(r.isWhitelisted(e)?i.push(e):r.logger.warn("rejecting non-whitelisted language code: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):"string"==typeof e&&o(this.formatLanguageCode(e)),n.forEach((function(e){i.indexOf(e)<0&&o(r.formatLanguageCode(e))})),i}}]),e}(),k=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","id","ja","jbo","ka","kk","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he"],nr:[1,2,20,21],fc:22}],G={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0===e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0===e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0===e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1===e?0:2===e?1:(e<0||e>10)&&e%10==0?2:3)}};function U(){var e={};return k.forEach((function(t){t.lngs.forEach((function(r){e[r]={numbers:t.nr,plurals:G[t.fc]}}))})),e}var j=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};s()(this,e),this.languageUtils=t,this.options=r,this.logger=v.create("pluralResolver"),this.rules=U()}return c()(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=this.getRule(e);return t&&t.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){var r=this,n=[],i=this.getRule(e);return i?(i.numbers.forEach((function(i){var o=r.getSuffix(e,i);n.push("".concat(t).concat(o))})),n):n}},{key:"getSuffix",value:function(e,t){var r=this,n=this.getRule(e);if(n){var i=n.noAbs?n.plurals(t):n.plurals(Math.abs(t)),o=n.numbers[i];this.options.simplifyPluralSuffix&&2===n.numbers.length&&1===n.numbers[0]&&(2===o?o="plural":1===o&&(o=""));var A=function(){return r.options.prepend&&o.toString()?r.options.prepend+o.toString():o.toString()};return"v1"===this.options.compatibilityJSON?1===o?"":"number"==typeof o?"_plural_".concat(o.toString()):A():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===n.numbers.length&&1===n.numbers[0]?A():this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString()}return this.logger.warn("no plural rule found for: ".concat(e)),""}}]),e}(),V=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};s()(this,e),this.logger=v.create("interpolator"),this.init(t,!0)}return c()(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;t&&(this.options=e,this.format=e.interpolation&&e.interpolation.format||function(e){return e}),e.interpolation||(e.interpolation={escapeValue:!0});var r=e.interpolation;this.escape=void 0!==r.escape?r.escape:P,this.escapeValue=void 0===r.escapeValue||r.escapeValue,this.useRawValueToEscape=void 0!==r.useRawValueToEscape&&r.useRawValueToEscape,this.prefix=r.prefix?M(r.prefix):r.prefixEscaped||"{{",this.suffix=r.suffix?M(r.suffix):r.suffixEscaped||"}}",this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||",",this.unescapePrefix=r.unescapeSuffix?"":r.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":r.unescapeSuffix||"",this.nestingPrefix=r.nestingPrefix?M(r.nestingPrefix):r.nestingPrefixEscaped||M("$t("),this.nestingSuffix=r.nestingSuffix?M(r.nestingSuffix):r.nestingSuffixEscaped||M(")"),this.maxReplaces=r.maxReplaces?r.maxReplaces:1e3,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var r="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(r,"g")}},{key:"interpolate",value:function(e,t,r,n){var i,o,A,a=this;function s(e){return e.replace(/\$/g,"$$$$")}var u=function(e){if(e.indexOf(a.formatSeparator)<0)return D(t,e);var n=e.split(a.formatSeparator),i=n.shift().trim(),o=n.join(a.formatSeparator).trim();return a.format(D(t,i),o,r)};this.resetRegExp();var c=n&&n.missingInterpolationHandler||this.options.missingInterpolationHandler;for(A=0;(i=this.regexpUnescape.exec(e))&&(o=u(i[1].trim()),e=e.replace(i[0],o),this.regexpUnescape.lastIndex=0,!(++A>=this.maxReplaces)););for(A=0;i=this.regexp.exec(e);){if(void 0===(o=u(i[1].trim())))if("function"==typeof c){var l=c(e,i,n);o="string"==typeof l?l:""}else this.logger.warn("missed to pass in variable ".concat(i[1]," for interpolating ").concat(e)),o="";else"string"==typeof o||this.useRawValueToEscape||(o=b(o));if(o=this.escapeValue?s(this.escape(o)):s(o),e=e.replace(i[0],o),this.regexp.lastIndex=0,++A>=this.maxReplaces)break}return e}},{key:"nest",value:function(e,t){var r,n,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=A()({},i);function a(e,t){if(e.indexOf(",")<0)return e;var r=e.split(",");e=r.shift();var n=r.join(",");n=(n=this.interpolate(n,o)).replace(/'/g,'"');try{o=JSON.parse(n),t&&(o=A()({},t,o))}catch(t){this.logger.error("failed parsing options string in nesting for key ".concat(e),t)}return e}for(o.applyPostProcessor=!1;r=this.nestingRegexp.exec(e);){if((n=t(a.call(this,r[1].trim(),o),o))&&r[0]===e&&"string"!=typeof n)return n;"string"!=typeof n&&(n=b(n)),n||(this.logger.warn("missed to resolve ".concat(r[1]," for nesting ").concat(e)),n=""),e=e.replace(r[0],n),this.regexp.lastIndex=0}return e}}]),e}(),H=r(730),Y=r.n(H);var K=function(e){function t(e,r,n){var i,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return s()(this,t),i=g()(this,h()(t).call(this)),m.call(y()(y()(i))),i.backend=e,i.store=r,i.languageUtils=n.languageUtils,i.options=o,i.logger=v.create("backendConnector"),i.state={},i.queue=[],i.backend&&i.backend.init&&i.backend.init(n,o.backend,o),i}return d()(t,e),c()(t,[{key:"queueLoad",value:function(e,t,r,n){var i=this,o=[],A=[],a=[],s=[];return e.forEach((function(e){var n=!0;t.forEach((function(t){var a="".concat(e,"|").concat(t);!r.reload&&i.store.hasResourceBundle(e,t)?i.state[a]=2:i.state[a]<0||(1===i.state[a]?A.indexOf(a)<0&&A.push(a):(i.state[a]=1,n=!1,A.indexOf(a)<0&&A.push(a),o.indexOf(a)<0&&o.push(a),s.indexOf(t)<0&&s.push(t)))})),n||a.push(e)})),(o.length||A.length)&&this.queue.push({pending:A,loaded:{},errors:[],callback:n}),{toLoad:o,pending:A,toLoadLanguages:a,toLoadNamespaces:s}}},{key:"loaded",value:function(e,t,r){var n=e.split("|"),i=Y()(n,2),o=i[0],A=i[1];t&&this.emit("failedLoading",o,A,t),r&&this.store.addResourceBundle(o,A,r),this.state[e]=t?-1:2;var a={};this.queue.forEach((function(r){var n,i,s,u,c,l;n=r.loaded,i=A,u=S(n,[o],Object),c=u.obj,l=u.k,c[l]=c[l]||[],s&&(c[l]=c[l].concat(i)),s||c[l].push(i),function(e,t){for(var r=e.indexOf(t);-1!==r;)e.splice(r,1),r=e.indexOf(t)}(r.pending,e),t&&r.errors.push(t),0!==r.pending.length||r.done||(Object.keys(r.loaded).forEach((function(e){a[e]||(a[e]=[]),r.loaded[e].length&&r.loaded[e].forEach((function(t){a[e].indexOf(t)<0&&a[e].push(t)}))})),r.done=!0,r.errors.length?r.callback(r.errors):r.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function(e,t,r){var n=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:250,A=arguments.length>5?arguments[5]:void 0;return e.length?this.backend[r](e,t,(function(a,s){a&&s&&i<5?setTimeout((function(){n.read.call(n,e,t,r,i+1,2*o,A)}),o):A(a,s)})):A(null,{})}},{key:"prepareLoading",value:function(e,t){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var o=this.queueLoad(e,t,n,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach((function(e){r.loadOne(e)}))}},{key:"load",value:function(e,t,r){this.prepareLoading(e,t,{},r)}},{key:"reload",value:function(e,t,r){this.prepareLoading(e,t,{reload:!0},r)}},{key:"loadOne",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e.split("|"),i=Y()(n,2),o=i[0],A=i[1];this.read(o,A,"read",null,null,(function(n,i){n&&t.logger.warn("".concat(r,"loading namespace ").concat(A," for language ").concat(o," failed"),n),!n&&i&&t.logger.log("".concat(r,"loaded namespace ").concat(A," for language ").concat(o),i),t.loaded(e,n,i)}))}},{key:"saveMissing",value:function(e,t,r,n,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.backend&&this.backend.create&&this.backend.create(e,t,r,n,null,A()({},o,{isUpdate:i})),e&&e[0]&&this.store.addResource(e[0],t,r,n)}}]),t}(m);function q(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:function(){},parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===i()(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===i()(e[2])||"object"===i()(e[3])){var r=e[3]||e[2];Object.keys(r).forEach((function(e){t[e]=r[e]}))}return t},interpolation:{escapeValue:!0,format:function(e,t,r){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",maxReplaces:1e3}}}function J(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.whitelist&&e.whitelist.indexOf("cimode")<0&&(e.whitelist=e.whitelist.concat(["cimode"])),e}function W(){}var z=new(function(e){function t(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(s()(this,t),e=g()(this,h()(t).call(this)),m.call(y()(y()(e))),e.options=J(r),e.services={},e.logger=v,e.modules={external:[]},n&&!e.isInitialized&&!r.isClone){if(!e.options.initImmediate)return e.init(r,n),g()(e,y()(y()(e)));setTimeout((function(){e.init(r,n)}),0)}return e}return d()(t,e),c()(t,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;function n(e){return e?"function"==typeof e?new e:e:null}if("function"==typeof t&&(r=t,t={}),this.options=A()({},q(),this.options,J(t)),this.format=this.options.interpolation.format,r||(r=W),!this.options.isClone){this.modules.logger?v.init(n(this.modules.logger),this.options):v.init(null,this.options);var i=new N(this.options);this.store=new T(this.options.resources,this.options);var o=this.services;o.logger=v,o.resourceStore=this.store,o.languageUtils=i,o.pluralResolver=new j(i,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),o.interpolator=new V(this.options),o.backendConnector=new K(n(this.modules.backend),o.resourceStore,o,this.options),o.backendConnector.on("*",(function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];e.emit.apply(e,[t].concat(n))})),this.modules.languageDetector&&(o.languageDetector=n(this.modules.languageDetector),o.languageDetector.init(o,this.options.detection,this.options)),this.modules.i18nFormat&&(o.i18nFormat=n(this.modules.i18nFormat),o.i18nFormat.init&&o.i18nFormat.init(this)),this.translator=new O(this.services,this.options),this.translator.on("*",(function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];e.emit.apply(e,[t].concat(n))})),this.modules.external.forEach((function(t){t.init&&t.init(e)}))}var a=["getResource","addResource","addResources","addResourceBundle","removeResourceBundle","hasResourceBundle","getResourceBundle","getDataByLanguage"];a.forEach((function(t){e[t]=function(){var r;return(r=e.store)[t].apply(r,arguments)}}));var s=Q(),u=function(){e.changeLanguage(e.options.lng,(function(t,n){e.isInitialized=!0,e.logger.log("initialized",e.options),e.emit("initialized",e.options),s.resolve(n),r(t,n)}))};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),s}},{key:"loadResources",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:W;if(!this.options.resources||this.options.partialBundledLanguages){if(this.language&&"cimode"===this.language.toLowerCase())return t();var r=[],n=function(t){t&&e.services.languageUtils.toResolveHierarchy(t).forEach((function(e){r.indexOf(e)<0&&r.push(e)}))};if(this.language)n(this.language);else{var i=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);i.forEach((function(e){return n(e)}))}this.options.preload&&this.options.preload.forEach((function(e){return n(e)})),this.services.backendConnector.load(r,this.options.ns,t)}else t(null)}},{key:"reloadResources",value:function(e,t,r){var n=Q();return e||(e=this.languages),t||(t=this.options.ns),r||(r=W),this.services.backendConnector.reload(e,t,(function(e){n.resolve(),r(e)})),n}},{key:"use",value:function(e){return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&F.addPostProcessor(e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"changeLanguage",value:function(e,t){var r=this,n=Q();this.emit("languageChanging",e);var i=function(e){e&&(r.language=e,r.languages=r.services.languageUtils.toResolveHierarchy(e),r.translator.language||r.translator.changeLanguage(e),r.services.languageDetector&&r.services.languageDetector.cacheUserLanguage(e)),r.loadResources((function(i){!function(e,i){r.translator.changeLanguage(i),i&&(r.emit("languageChanged",i),r.logger.log("languageChanged",i)),n.resolve((function(){return r.t.apply(r,arguments)})),t&&t(e,(function(){return r.t.apply(r,arguments)}))}(i,e)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(i):i(e):i(this.services.languageDetector.detect()),n}},{key:"getFixedT",value:function(e,t){var r=this,n=function e(t,n){var o=A()({},n);if("object"!==i()(n)){for(var a=arguments.length,s=new Array(a>2?a-2:0),u=2;u<a;u++)s[u-2]=arguments[u];o=r.options.overloadTranslationOptionHandler([t,n].concat(s))}return o.lng=o.lng||e.lng,o.lngs=o.lngs||e.lngs,o.ns=o.ns||e.ns,r.t(t,o)};return"string"==typeof e?n.lng=e:n.lngs=e,n.ns=t,n}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"loadNamespaces",value:function(e,t){var r=this,n=Q();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((function(e){r.options.ns.indexOf(e)<0&&r.options.ns.push(e)})),this.loadResources((function(e){n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var r=Q();"string"==typeof e&&(e=[e]);var n=this.options.preload||[],i=e.filter((function(e){return n.indexOf(e)<0}));return i.length?(this.options.preload=n.concat(i),this.loadResources((function(e){r.resolve(),t&&t(e)})),r):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){if(e||(e=this.languages&&this.languages.length>0?this.languages[0]:this.language),!e)return"rtl";return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"].indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>=0?"rtl":"ltr"}},{key:"createInstance",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return new t(e,r)}},{key:"cloneInstance",value:function(){var e=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:W,i=A()({},this.options,r,{isClone:!0}),o=new t(i),a=["store","services","language"];return a.forEach((function(t){o[t]=e[t]})),o.translator=new O(o.services,o.options),o.translator.on("*",(function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];o.emit.apply(o,[e].concat(r))})),o.init(i,n),o.translator.options=o.options,o}}]),t}(m)),X=(t.default=z,z.changeLanguage.bind(z)),Z=z.cloneInstance.bind(z),$=z.createInstance.bind(z),ee=z.dir.bind(z),te=z.exists.bind(z),re=z.getFixedT.bind(z),ne=z.init.bind(z),ie=z.loadLanguages.bind(z),oe=z.loadNamespaces.bind(z),Ae=z.loadResources.bind(z),ae=z.off.bind(z),se=z.on.bind(z),ue=z.setDefaultNamespace.bind(z),ce=z.t.bind(z),le=z.use.bind(z)}])}));