2d01124573212145eef95451e572e8c2.json 6.41 KB
{"ast":null,"code":"'use strict';var _interopRequireDefault=require(\"@babel/runtime/helpers/interopRequireDefault\");Object.defineProperty(exports,\"__esModule\",{value:true});exports.default=void 0;var _AnimatedInterpolation=_interopRequireDefault(require(\"./AnimatedInterpolation\"));var _AnimatedNode=_interopRequireDefault(require(\"./AnimatedNode\"));var _AnimatedWithChildren2=_interopRequireDefault(require(\"./AnimatedWithChildren\"));function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype);subClass.prototype.constructor=subClass;subClass.__proto__=superClass;}var AnimatedDiffClamp=function(_AnimatedWithChildren){_inheritsLoose(AnimatedDiffClamp,_AnimatedWithChildren);function AnimatedDiffClamp(a,min,max){var _this;_this=_AnimatedWithChildren.call(this)||this;_this._a=a;_this._min=min;_this._max=max;_this._value=_this._lastValue=_this._a.__getValue();return _this;}var _proto=AnimatedDiffClamp.prototype;_proto.__makeNative=function __makeNative(){this._a.__makeNative();_AnimatedWithChildren.prototype.__makeNative.call(this);};_proto.interpolate=function interpolate(config){return new _AnimatedInterpolation.default(this,config);};_proto.__getValue=function __getValue(){var value=this._a.__getValue();var diff=value-this._lastValue;this._lastValue=value;this._value=Math.min(Math.max(this._value+diff,this._min),this._max);return this._value;};_proto.__attach=function __attach(){this._a.__addChild(this);};_proto.__detach=function __detach(){this._a.__removeChild(this);_AnimatedWithChildren.prototype.__detach.call(this);};_proto.__getNativeConfig=function __getNativeConfig(){return{type:'diffclamp',input:this._a.__getNativeTag(),min:this._min,max:this._max};};return AnimatedDiffClamp;}(_AnimatedWithChildren2.default);var _default=AnimatedDiffClamp;exports.default=_default;","map":{"version":3,"sources":["C:/Users/bluej/Desktop/2_2/searchGuide/searchGuide/node_modules/react-native-web/dist/vendor/react-native/Animated/nodes/AnimatedDiffClamp.js"],"names":["_inheritsLoose","subClass","superClass","prototype","Object","create","constructor","__proto__","AnimatedDiffClamp","_AnimatedWithChildren","a","min","max","_this","call","_a","_min","_max","_value","_lastValue","__getValue","_proto","__makeNative","interpolate","config","AnimatedInterpolation","value","diff","Math","__attach","__addChild","__detach","__removeChild","__getNativeConfig","type","input","__getNativeTag","AnimatedWithChildren"],"mappings":"AASA,a,mKAIA,sFACA,oEACA,qFAJA,QAASA,CAAAA,cAAT,CAAwBC,QAAxB,CAAkCC,UAAlC,CAA8C,CAAED,QAAQ,CAACE,SAAT,CAAqBC,MAAM,CAACC,MAAP,CAAcH,UAAU,CAACC,SAAzB,CAArB,CAA0DF,QAAQ,CAACE,SAAT,CAAmBG,WAAnB,CAAiCL,QAAjC,CAA2CA,QAAQ,CAACM,SAAT,CAAqBL,UAArB,CAAkC,CAMvL,GAAIM,CAAAA,iBAAiB,CAErB,SAAUC,qBAAV,CAAiC,CAC/BT,cAAc,CAACQ,iBAAD,CAAoBC,qBAApB,CAAd,CAEA,QAASD,CAAAA,iBAAT,CAA2BE,CAA3B,CAA8BC,GAA9B,CAAmCC,GAAnC,CAAwC,CACtC,GAAIC,CAAAA,KAAJ,CAEAA,KAAK,CAAGJ,qBAAqB,CAACK,IAAtB,CAA2B,IAA3B,GAAoC,IAA5C,CACAD,KAAK,CAACE,EAAN,CAAWL,CAAX,CACAG,KAAK,CAACG,IAAN,CAAaL,GAAb,CACAE,KAAK,CAACI,IAAN,CAAaL,GAAb,CACAC,KAAK,CAACK,MAAN,CAAeL,KAAK,CAACM,UAAN,CAAmBN,KAAK,CAACE,EAAN,CAASK,UAAT,EAAlC,CACA,MAAOP,CAAAA,KAAP,CACD,CAED,GAAIQ,CAAAA,MAAM,CAAGb,iBAAiB,CAACL,SAA/B,CAEAkB,MAAM,CAACC,YAAP,CAAsB,QAASA,CAAAA,YAAT,EAAwB,CAC5C,KAAKP,EAAL,CAAQO,YAAR,GAEAb,qBAAqB,CAACN,SAAtB,CAAgCmB,YAAhC,CAA6CR,IAA7C,CAAkD,IAAlD,EACD,CAJD,CAMAO,MAAM,CAACE,WAAP,CAAqB,QAASA,CAAAA,WAAT,CAAqBC,MAArB,CAA6B,CAChD,MAAO,IAAIC,+BAAJ,CAA0B,IAA1B,CAAgCD,MAAhC,CAAP,CACD,CAFD,CAIAH,MAAM,CAACD,UAAP,CAAoB,QAASA,CAAAA,UAAT,EAAsB,CACxC,GAAIM,CAAAA,KAAK,CAAG,KAAKX,EAAL,CAAQK,UAAR,EAAZ,CAEA,GAAIO,CAAAA,IAAI,CAAGD,KAAK,CAAG,KAAKP,UAAxB,CACA,KAAKA,UAAL,CAAkBO,KAAlB,CACA,KAAKR,MAAL,CAAcU,IAAI,CAACjB,GAAL,CAASiB,IAAI,CAAChB,GAAL,CAAS,KAAKM,MAAL,CAAcS,IAAvB,CAA6B,KAAKX,IAAlC,CAAT,CAAkD,KAAKC,IAAvD,CAAd,CACA,MAAO,MAAKC,MAAZ,CACD,CAPD,CASAG,MAAM,CAACQ,QAAP,CAAkB,QAASA,CAAAA,QAAT,EAAoB,CACpC,KAAKd,EAAL,CAAQe,UAAR,CAAmB,IAAnB,EACD,CAFD,CAIAT,MAAM,CAACU,QAAP,CAAkB,QAASA,CAAAA,QAAT,EAAoB,CACpC,KAAKhB,EAAL,CAAQiB,aAAR,CAAsB,IAAtB,EAEAvB,qBAAqB,CAACN,SAAtB,CAAgC4B,QAAhC,CAAyCjB,IAAzC,CAA8C,IAA9C,EACD,CAJD,CAMAO,MAAM,CAACY,iBAAP,CAA2B,QAASA,CAAAA,iBAAT,EAA6B,CACtD,MAAO,CACLC,IAAI,CAAE,WADD,CAELC,KAAK,CAAE,KAAKpB,EAAL,CAAQqB,cAAR,EAFF,CAGLzB,GAAG,CAAE,KAAKK,IAHL,CAILJ,GAAG,CAAE,KAAKK,IAJL,CAAP,CAMD,CAPD,CASA,MAAOT,CAAAA,iBAAP,CACD,CAvDD,CAuDE6B,8BAvDF,CAFA,C,aA2De7B,iB","sourcesContent":["/**\n * Copyright (c) 2015-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nimport AnimatedInterpolation from './AnimatedInterpolation';\nimport AnimatedNode from './AnimatedNode';\nimport AnimatedWithChildren from './AnimatedWithChildren';\n\nvar AnimatedDiffClamp =\n/*#__PURE__*/\nfunction (_AnimatedWithChildren) {\n  _inheritsLoose(AnimatedDiffClamp, _AnimatedWithChildren);\n\n  function AnimatedDiffClamp(a, min, max) {\n    var _this;\n\n    _this = _AnimatedWithChildren.call(this) || this;\n    _this._a = a;\n    _this._min = min;\n    _this._max = max;\n    _this._value = _this._lastValue = _this._a.__getValue();\n    return _this;\n  }\n\n  var _proto = AnimatedDiffClamp.prototype;\n\n  _proto.__makeNative = function __makeNative() {\n    this._a.__makeNative();\n\n    _AnimatedWithChildren.prototype.__makeNative.call(this);\n  };\n\n  _proto.interpolate = function interpolate(config) {\n    return new AnimatedInterpolation(this, config);\n  };\n\n  _proto.__getValue = function __getValue() {\n    var value = this._a.__getValue();\n\n    var diff = value - this._lastValue;\n    this._lastValue = value;\n    this._value = Math.min(Math.max(this._value + diff, this._min), this._max);\n    return this._value;\n  };\n\n  _proto.__attach = function __attach() {\n    this._a.__addChild(this);\n  };\n\n  _proto.__detach = function __detach() {\n    this._a.__removeChild(this);\n\n    _AnimatedWithChildren.prototype.__detach.call(this);\n  };\n\n  _proto.__getNativeConfig = function __getNativeConfig() {\n    return {\n      type: 'diffclamp',\n      input: this._a.__getNativeTag(),\n      min: this._min,\n      max: this._max\n    };\n  };\n\n  return AnimatedDiffClamp;\n}(AnimatedWithChildren);\n\nexport default AnimatedDiffClamp;"]},"metadata":{},"sourceType":"script"}