import{__read as i}from"../../../../node_modules/tslib/tslib.es6.js";import{mix as n}from"../../../../../popmotion/dist/es/utils/mix.js";function o(i,n){i.min=n.min,i.max=n.max}function t(i,n){o(i.x,n.x),o(i.y,n.y)}function a(i,n,o){return o+n*(i-o)}function m(i,n,o,t,m){return void 0!==m&&(i=a(i,m,t)),a(i,o,t)+n}function r(i,n,o,t,a){void 0===n&&(n=0),void 0===o&&(o=1),i.min=m(i.min,n,o,t,a),i.max=m(i.max,n,o,t,a)}function x(i,n){var o=n.x,t=n.y;r(i.x,o.translate,o.scale,o.originPoint),r(i.y,t.translate,t.scale,t.originPoint)}function e(o,t,a,m){var x=i(m,3),e=x[0],c=x[1],s=x[2];o.min=t.min,o.max=t.max;var u=void 0!==a[s]?a[s]:.5,f=n(t.min,t.max,u);r(o,a[e],a[c],f,a.scale)}var c=["x","scaleX","originX"],s=["y","scaleY","originY"];function u(i,n,o){e(i.x,n.x,o,c),e(i.y,n.y,o,s)}function f(i,n,o,t,m){return i=a(i-=n,1/o,t),void 0!==m&&(i=a(i,1/m,t)),i}function v(i,o,t,a,m){void 0===o&&(o=0),void 0===t&&(t=1),void 0===a&&(a=.5);var r=n(i.min,i.max,a)-o;i.min=f(i.min,o,t,r,m),i.max=f(i.max,o,t,r,m)}function l(n,o,t){var a=i(t,3),m=a[0],r=a[1],x=a[2];v(n,o[m],o[r],o[x],o.scale)}function d(i,n){l(i.x,n,c),l(i.y,n,s)}function y(i,n,o){var t=o.length;if(t){n.x=n.y=1;for(var a=0;a<t;a++){var m=o[a].getLayoutState().delta;n.x*=m.x.scale,n.y*=m.y.scale,x(i,m)}}}export{r as applyAxisDelta,e as applyAxisTransforms,x as applyBoxDelta,u as applyBoxTransforms,m as applyPointDelta,y as applyTreeDeltas,v as removeAxisDelta,l as removeAxisTransforms,d as removeBoxTransforms,f as removePointDelta,o as resetAxis,t as resetBox,a as scalePoint};
//# sourceMappingURL=delta-apply.js.map
