/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["exports","../../../../../chunks/_rollupPluginBabelHelpers","../../../../../chunks/tslib.es6","../../../../../core/screenUtils","../../../../../core/accessorSupport/decorators/property","../../../../../core/arrayUtils","../../../../../core/has","../../../../../core/accessorSupport/ensureType","../../../../../core/accessorSupport/decorators/subclass","../../../../../chunks/vec3f64","../../../../../geometry/support/axisAngle","../../../../../chunks/sphere","../../../camera/constraintUtils","./MomentumController","../../utils/navigationUtils","../../../camera/constraintUtils/common"],(function(e,t,o,r,n,s,i,c,l,p,a,m,u,h,y,C){"use strict";e.ZoomSphericalMomentumController=function(e){function o(t){var o;return(o=e.call(this,t)||this).interactionType=C.InteractionType.ZOOM,o.radius=0,o.tmpSceneCenter=p.create(),o.tmpZoomAxisAngle=a.create(),o.sphere=m.create(),o}t._inheritsLoose(o,e);var n=o.prototype;return n.initialize=function(){this.sphere[3]=this.radius},n.momentumStep=function(e,t){const o=this.momentum.valueDelta(0,e);y.applyZoomOnSphere(this.sphere,t,o),this.constraintOptions.interactionType=C.InteractionType.ZOOM,u.applyAll(this.view,t,this.constraintOptions),y.sphereOrPlanePointFromScreenPoint(this.sphere,t,this.screenCenter,this.tmpSceneCenter),a.fromPoints(this.sceneCenter,this.tmpSceneCenter,this.tmpZoomAxisAngle),y.applyRotation(t,this.sphere,this.tmpZoomAxisAngle),this.constraintOptions.interactionType=C.InteractionType.PAN},t._createClass(o,[{key:"screenCenter",set:function(e){this._set("screenCenter",r.createScreenPointArray(e[0],e[1]))}},{key:"sceneCenter",set:function(e){this._set("sceneCenter",p.clone(e))}}]),o}(h.MomentumController),o.__decorate([n.property({constructOnly:!0})],e.ZoomSphericalMomentumController.prototype,"momentum",void 0),o.__decorate([n.property({constructOnly:!0})],e.ZoomSphericalMomentumController.prototype,"screenCenter",null),o.__decorate([n.property({constructOnly:!0})],e.ZoomSphericalMomentumController.prototype,"sceneCenter",null),o.__decorate([n.property({constructOnly:!0})],e.ZoomSphericalMomentumController.prototype,"radius",void 0),e.ZoomSphericalMomentumController=o.__decorate([l.subclass("esri.views.3d.state.controllers.momentum.ZoomSphericalMomentumController")],e.ZoomSphericalMomentumController),Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
