6c9681ed31342738cf213e66751623f1.json
29.9 KB
{"ast":null,"code":"\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Track = void 0;\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime/helpers/classCallCheck\"));\n\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime/helpers/createClass\"));\n\nvar _assertThisInitialized2 = _interopRequireDefault(require(\"@babel/runtime/helpers/assertThisInitialized\"));\n\nvar _inherits2 = _interopRequireDefault(require(\"@babel/runtime/helpers/inherits\"));\n\nvar _createSuper2 = _interopRequireDefault(require(\"@babel/runtime/helpers/createSuper\"));\n\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime/helpers/defineProperty\"));\n\nvar _objectSpread2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectSpread2\"));\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\n\nvar _innerSliderUtils = require(\"./utils/innerSliderUtils\"); // given specifications/props for a slide, fetch all the classes that need to be applied to the slide\n\n\nvar getSlideClasses = function getSlideClasses(spec) {\n var slickActive, slickCenter, slickCloned;\n var centerOffset, index;\n\n if (spec.rtl) {\n index = spec.slideCount - 1 - spec.index;\n } else {\n index = spec.index;\n }\n\n slickCloned = index < 0 || index >= spec.slideCount;\n\n if (spec.centerMode) {\n centerOffset = Math.floor(spec.slidesToShow / 2);\n slickCenter = (index - spec.currentSlide) % spec.slideCount === 0;\n\n if (index > spec.currentSlide - centerOffset - 1 && index <= spec.currentSlide + centerOffset) {\n slickActive = true;\n }\n } else {\n slickActive = spec.currentSlide <= index && index < spec.currentSlide + spec.slidesToShow;\n }\n\n var focusedSlide;\n\n if (spec.targetSlide < 0) {\n focusedSlide = spec.targetSlide + spec.slideCount;\n } else if (spec.targetSlide >= spec.slideCount) {\n focusedSlide = spec.targetSlide - spec.slideCount;\n } else {\n focusedSlide = spec.targetSlide;\n }\n\n var slickCurrent = index === focusedSlide;\n return {\n \"slick-slide\": true,\n \"slick-active\": slickActive,\n \"slick-center\": slickCenter,\n \"slick-cloned\": slickCloned,\n \"slick-current\": slickCurrent // dubious in case of RTL\n\n };\n};\n\nvar getSlideStyle = function getSlideStyle(spec) {\n var style = {};\n\n if (spec.variableWidth === undefined || spec.variableWidth === false) {\n style.width = spec.slideWidth;\n }\n\n if (spec.fade) {\n style.position = \"relative\";\n\n if (spec.vertical) {\n style.top = -spec.index * parseInt(spec.slideHeight);\n } else {\n style.left = -spec.index * parseInt(spec.slideWidth);\n }\n\n style.opacity = spec.currentSlide === spec.index ? 1 : 0;\n\n if (spec.useCSS) {\n style.transition = \"opacity \" + spec.speed + \"ms \" + spec.cssEase + \", \" + \"visibility \" + spec.speed + \"ms \" + spec.cssEase;\n }\n }\n\n return style;\n};\n\nvar getKey = function getKey(child, fallbackKey) {\n return child.key + \"-\" + fallbackKey;\n};\n\nvar renderSlides = function renderSlides(spec) {\n var key;\n var slides = [];\n var preCloneSlides = [];\n var postCloneSlides = [];\n\n var childrenCount = _react[\"default\"].Children.count(spec.children);\n\n var startIndex = (0, _innerSliderUtils.lazyStartIndex)(spec);\n var endIndex = (0, _innerSliderUtils.lazyEndIndex)(spec);\n\n _react[\"default\"].Children.forEach(spec.children, function (elem, index) {\n var child;\n var childOnClickOptions = {\n message: \"children\",\n index: index,\n slidesToScroll: spec.slidesToScroll,\n currentSlide: spec.currentSlide\n }; // in case of lazyLoad, whether or not we want to fetch the slide\n\n if (!spec.lazyLoad || spec.lazyLoad && spec.lazyLoadedList.indexOf(index) >= 0) {\n child = elem;\n } else {\n child = /*#__PURE__*/_react[\"default\"].createElement(\"div\", null);\n }\n\n var childStyle = getSlideStyle((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, spec), {}, {\n index: index\n }));\n var slideClass = child.props.className || \"\";\n var slideClasses = getSlideClasses((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, spec), {}, {\n index: index\n })); // push a cloned element of the desired slide\n\n slides.push( /*#__PURE__*/_react[\"default\"].cloneElement(child, {\n key: \"original\" + getKey(child, index),\n \"data-index\": index,\n className: (0, _classnames[\"default\"])(slideClasses, slideClass),\n tabIndex: \"-1\",\n \"aria-hidden\": !slideClasses[\"slick-active\"],\n style: (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({\n outline: \"none\"\n }, child.props.style || {}), childStyle),\n onClick: function onClick(e) {\n child.props && child.props.onClick && child.props.onClick(e);\n\n if (spec.focusOnSelect) {\n spec.focusOnSelect(childOnClickOptions);\n }\n }\n })); // if slide needs to be precloned or postcloned\n\n if (spec.infinite && spec.fade === false) {\n var preCloneNo = childrenCount - index;\n\n if (preCloneNo <= (0, _innerSliderUtils.getPreClones)(spec) && childrenCount !== spec.slidesToShow) {\n key = -preCloneNo;\n\n if (key >= startIndex) {\n child = elem;\n }\n\n slideClasses = getSlideClasses((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, spec), {}, {\n index: key\n }));\n preCloneSlides.push( /*#__PURE__*/_react[\"default\"].cloneElement(child, {\n key: \"precloned\" + getKey(child, key),\n \"data-index\": key,\n tabIndex: \"-1\",\n className: (0, _classnames[\"default\"])(slideClasses, slideClass),\n \"aria-hidden\": !slideClasses[\"slick-active\"],\n style: (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, child.props.style || {}), childStyle),\n onClick: function onClick(e) {\n child.props && child.props.onClick && child.props.onClick(e);\n\n if (spec.focusOnSelect) {\n spec.focusOnSelect(childOnClickOptions);\n }\n }\n }));\n }\n\n if (childrenCount !== spec.slidesToShow) {\n key = childrenCount + index;\n\n if (key < endIndex) {\n child = elem;\n }\n\n slideClasses = getSlideClasses((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, spec), {}, {\n index: key\n }));\n postCloneSlides.push( /*#__PURE__*/_react[\"default\"].cloneElement(child, {\n key: \"postcloned\" + getKey(child, key),\n \"data-index\": key,\n tabIndex: \"-1\",\n className: (0, _classnames[\"default\"])(slideClasses, slideClass),\n \"aria-hidden\": !slideClasses[\"slick-active\"],\n style: (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, child.props.style || {}), childStyle),\n onClick: function onClick(e) {\n child.props && child.props.onClick && child.props.onClick(e);\n\n if (spec.focusOnSelect) {\n spec.focusOnSelect(childOnClickOptions);\n }\n }\n }));\n }\n }\n });\n\n if (spec.rtl) {\n return preCloneSlides.concat(slides, postCloneSlides).reverse();\n } else {\n return preCloneSlides.concat(slides, postCloneSlides);\n }\n};\n\nvar Track = /*#__PURE__*/function (_React$PureComponent) {\n (0, _inherits2[\"default\"])(Track, _React$PureComponent);\n\n var _super = (0, _createSuper2[\"default\"])(Track);\n\n function Track() {\n var _this;\n\n (0, _classCallCheck2[\"default\"])(this, Track);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n (0, _defineProperty2[\"default\"])((0, _assertThisInitialized2[\"default\"])(_this), \"node\", null);\n (0, _defineProperty2[\"default\"])((0, _assertThisInitialized2[\"default\"])(_this), \"handleRef\", function (ref) {\n _this.node = ref;\n });\n return _this;\n }\n\n (0, _createClass2[\"default\"])(Track, [{\n key: \"render\",\n value: function render() {\n var slides = renderSlides(this.props);\n var _this$props = this.props,\n onMouseEnter = _this$props.onMouseEnter,\n onMouseOver = _this$props.onMouseOver,\n onMouseLeave = _this$props.onMouseLeave;\n var mouseEvents = {\n onMouseEnter: onMouseEnter,\n onMouseOver: onMouseOver,\n onMouseLeave: onMouseLeave\n };\n return /*#__PURE__*/_react[\"default\"].createElement(\"div\", (0, _extends2[\"default\"])({\n ref: this.handleRef,\n className: \"slick-track\",\n style: this.props.trackStyle\n }, mouseEvents), slides);\n }\n }]);\n return Track;\n}(_react[\"default\"].PureComponent);\n\nexports.Track = Track;","map":{"version":3,"sources":["C:/Users/kkwan_000/Desktop/git/2017110269/minsung/node_modules/@ant-design/react-slick/lib/track.js"],"names":["_interopRequireDefault","require","Object","defineProperty","exports","value","Track","_extends2","_classCallCheck2","_createClass2","_assertThisInitialized2","_inherits2","_createSuper2","_defineProperty2","_objectSpread2","_react","_classnames","_innerSliderUtils","getSlideClasses","spec","slickActive","slickCenter","slickCloned","centerOffset","index","rtl","slideCount","centerMode","Math","floor","slidesToShow","currentSlide","focusedSlide","targetSlide","slickCurrent","getSlideStyle","style","variableWidth","undefined","width","slideWidth","fade","position","vertical","top","parseInt","slideHeight","left","opacity","useCSS","transition","speed","cssEase","getKey","child","fallbackKey","key","renderSlides","slides","preCloneSlides","postCloneSlides","childrenCount","Children","count","children","startIndex","lazyStartIndex","endIndex","lazyEndIndex","forEach","elem","childOnClickOptions","message","slidesToScroll","lazyLoad","lazyLoadedList","indexOf","createElement","childStyle","slideClass","props","className","slideClasses","push","cloneElement","tabIndex","outline","onClick","e","focusOnSelect","infinite","preCloneNo","getPreClones","concat","reverse","_React$PureComponent","_super","_this","_len","arguments","length","args","Array","_key","call","apply","ref","node","render","_this$props","onMouseEnter","onMouseOver","onMouseLeave","mouseEvents","handleRef","trackStyle","PureComponent"],"mappings":"AAAA;;AAEA,IAAIA,sBAAsB,GAAGC,OAAO,CAAC,8CAAD,CAApC;;AAEAC,MAAM,CAACC,cAAP,CAAsBC,OAAtB,EAA+B,YAA/B,EAA6C;AAC3CC,EAAAA,KAAK,EAAE;AADoC,CAA7C;AAGAD,OAAO,CAACE,KAAR,GAAgB,KAAK,CAArB;;AAEA,IAAIC,SAAS,GAAGP,sBAAsB,CAACC,OAAO,CAAC,gCAAD,CAAR,CAAtC;;AAEA,IAAIO,gBAAgB,GAAGR,sBAAsB,CAACC,OAAO,CAAC,uCAAD,CAAR,CAA7C;;AAEA,IAAIQ,aAAa,GAAGT,sBAAsB,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M,CAAC,SAAD,CAAN,CAAkB8D,aAAlB,CAAgC,KAAhC,EAAuC,CAAC,GAAGtE,SAAS,CAAC,SAAD,CAAb,EAA0B;AACnFmG,QAAAA,GAAG,EAAE,KAAKQ,SADyE;AAEnFjC,QAAAA,SAAS,EAAE,aAFwE;AAGnF7C,QAAAA,KAAK,EAAE,KAAK4C,KAAL,CAAWmC;AAHiE,OAA1B,EAIxDF,WAJwD,CAAvC,EAIHvD,MAJG,CAApB;AAKD;AAlBmC,GAAD,CAArC;AAoBA,SAAOpD,KAAP;AACD,CA3CwB,CA2CvBS,MAAM,CAAC,SAAD,CAAN,CAAkBqG,aA3CK,CAAzB;;AA6CAhH,OAAO,CAACE,KAAR,GAAgBA,KAAhB","sourcesContent":["\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Track = void 0;\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime/helpers/classCallCheck\"));\n\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime/helpers/createClass\"));\n\nvar _assertThisInitialized2 = _interopRequireDefault(require(\"@babel/runtime/helpers/assertThisInitialized\"));\n\nvar _inherits2 = _interopRequireDefault(require(\"@babel/runtime/helpers/inherits\"));\n\nvar _createSuper2 = _interopRequireDefault(require(\"@babel/runtime/helpers/createSuper\"));\n\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime/helpers/defineProperty\"));\n\nvar _objectSpread2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectSpread2\"));\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\n\nvar _innerSliderUtils = require(\"./utils/innerSliderUtils\");\n\n// given specifications/props for a slide, fetch all the classes that need to be applied to the slide\nvar getSlideClasses = function getSlideClasses(spec) {\n var slickActive, slickCenter, slickCloned;\n var centerOffset, index;\n\n if (spec.rtl) {\n index = spec.slideCount - 1 - spec.index;\n } else {\n index = spec.index;\n }\n\n slickCloned = index < 0 || index >= spec.slideCount;\n\n if (spec.centerMode) {\n centerOffset = Math.floor(spec.slidesToShow / 2);\n slickCenter = (index - spec.currentSlide) % spec.slideCount === 0;\n\n if (index > spec.currentSlide - centerOffset - 1 && index <= spec.currentSlide + centerOffset) {\n slickActive = true;\n }\n } else {\n slickActive = spec.currentSlide <= index && index < spec.currentSlide + spec.slidesToShow;\n }\n\n var focusedSlide;\n\n if (spec.targetSlide < 0) {\n focusedSlide = spec.targetSlide + spec.slideCount;\n } else if (spec.targetSlide >= spec.slideCount) {\n focusedSlide = spec.targetSlide - spec.slideCount;\n } else {\n focusedSlide = spec.targetSlide;\n }\n\n var slickCurrent = index === focusedSlide;\n return {\n \"slick-slide\": true,\n \"slick-active\": slickActive,\n \"slick-center\": slickCenter,\n \"slick-cloned\": slickCloned,\n \"slick-current\": slickCurrent // dubious in case of RTL\n\n };\n};\n\nvar getSlideStyle = function getSlideStyle(spec) {\n var style = {};\n\n if (spec.variableWidth === undefined || spec.variableWidth === false) {\n style.width = spec.slideWidth;\n }\n\n if (spec.fade) {\n style.position = \"relative\";\n\n if (spec.vertical) {\n style.top = -spec.index * parseInt(spec.slideHeight);\n } else {\n style.left = -spec.index * parseInt(spec.slideWidth);\n }\n\n style.opacity = spec.currentSlide === spec.index ? 1 : 0;\n\n if (spec.useCSS) {\n style.transition = \"opacity \" + spec.speed + \"ms \" + spec.cssEase + \", \" + \"visibility \" + spec.speed + \"ms \" + spec.cssEase;\n }\n }\n\n return style;\n};\n\nvar getKey = function getKey(child, fallbackKey) {\n return child.key + \"-\" + fallbackKey;\n};\n\nvar renderSlides = function renderSlides(spec) {\n var key;\n var slides = [];\n var preCloneSlides = [];\n var postCloneSlides = [];\n\n var childrenCount = _react[\"default\"].Children.count(spec.children);\n\n var startIndex = (0, _innerSliderUtils.lazyStartIndex)(spec);\n var endIndex = (0, _innerSliderUtils.lazyEndIndex)(spec);\n\n _react[\"default\"].Children.forEach(spec.children, function (elem, index) {\n var child;\n var childOnClickOptions = {\n message: \"children\",\n index: index,\n slidesToScroll: spec.slidesToScroll,\n currentSlide: spec.currentSlide\n }; // in case of lazyLoad, whether or not we want to fetch the slide\n\n if (!spec.lazyLoad || spec.lazyLoad && spec.lazyLoadedList.indexOf(index) >= 0) {\n child = elem;\n } else {\n child = /*#__PURE__*/_react[\"default\"].createElement(\"div\", null);\n }\n\n var childStyle = getSlideStyle((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, spec), {}, {\n index: index\n }));\n var slideClass = child.props.className || \"\";\n var slideClasses = getSlideClasses((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, spec), {}, {\n index: index\n })); // push a cloned element of the desired slide\n\n slides.push( /*#__PURE__*/_react[\"default\"].cloneElement(child, {\n key: \"original\" + getKey(child, index),\n \"data-index\": index,\n className: (0, _classnames[\"default\"])(slideClasses, slideClass),\n tabIndex: \"-1\",\n \"aria-hidden\": !slideClasses[\"slick-active\"],\n style: (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({\n outline: \"none\"\n }, child.props.style || {}), childStyle),\n onClick: function onClick(e) {\n child.props && child.props.onClick && child.props.onClick(e);\n\n if (spec.focusOnSelect) {\n spec.focusOnSelect(childOnClickOptions);\n }\n }\n })); // if slide needs to be precloned or postcloned\n\n if (spec.infinite && spec.fade === false) {\n var preCloneNo = childrenCount - index;\n\n if (preCloneNo <= (0, _innerSliderUtils.getPreClones)(spec) && childrenCount !== spec.slidesToShow) {\n key = -preCloneNo;\n\n if (key >= startIndex) {\n child = elem;\n }\n\n slideClasses = getSlideClasses((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, spec), {}, {\n index: key\n }));\n preCloneSlides.push( /*#__PURE__*/_react[\"default\"].cloneElement(child, {\n key: \"precloned\" + getKey(child, key),\n \"data-index\": key,\n tabIndex: \"-1\",\n className: (0, _classnames[\"default\"])(slideClasses, slideClass),\n \"aria-hidden\": !slideClasses[\"slick-active\"],\n style: (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, child.props.style || {}), childStyle),\n onClick: function onClick(e) {\n child.props && child.props.onClick && child.props.onClick(e);\n\n if (spec.focusOnSelect) {\n spec.focusOnSelect(childOnClickOptions);\n }\n }\n }));\n }\n\n if (childrenCount !== spec.slidesToShow) {\n key = childrenCount + index;\n\n if (key < endIndex) {\n child = elem;\n }\n\n slideClasses = getSlideClasses((0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, spec), {}, {\n index: key\n }));\n postCloneSlides.push( /*#__PURE__*/_react[\"default\"].cloneElement(child, {\n key: \"postcloned\" + getKey(child, key),\n \"data-index\": key,\n tabIndex: \"-1\",\n className: (0, _classnames[\"default\"])(slideClasses, slideClass),\n \"aria-hidden\": !slideClasses[\"slick-active\"],\n style: (0, _objectSpread2[\"default\"])((0, _objectSpread2[\"default\"])({}, child.props.style || {}), childStyle),\n onClick: function onClick(e) {\n child.props && child.props.onClick && child.props.onClick(e);\n\n if (spec.focusOnSelect) {\n spec.focusOnSelect(childOnClickOptions);\n }\n }\n }));\n }\n }\n });\n\n if (spec.rtl) {\n return preCloneSlides.concat(slides, postCloneSlides).reverse();\n } else {\n return preCloneSlides.concat(slides, postCloneSlides);\n }\n};\n\nvar Track = /*#__PURE__*/function (_React$PureComponent) {\n (0, _inherits2[\"default\"])(Track, _React$PureComponent);\n\n var _super = (0, _createSuper2[\"default\"])(Track);\n\n function Track() {\n var _this;\n\n (0, _classCallCheck2[\"default\"])(this, Track);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n (0, _defineProperty2[\"default\"])((0, _assertThisInitialized2[\"default\"])(_this), \"node\", null);\n (0, _defineProperty2[\"default\"])((0, _assertThisInitialized2[\"default\"])(_this), \"handleRef\", function (ref) {\n _this.node = ref;\n });\n return _this;\n }\n\n (0, _createClass2[\"default\"])(Track, [{\n key: \"render\",\n value: function render() {\n var slides = renderSlides(this.props);\n var _this$props = this.props,\n onMouseEnter = _this$props.onMouseEnter,\n onMouseOver = _this$props.onMouseOver,\n onMouseLeave = _this$props.onMouseLeave;\n var mouseEvents = {\n onMouseEnter: onMouseEnter,\n onMouseOver: onMouseOver,\n onMouseLeave: onMouseLeave\n };\n return /*#__PURE__*/_react[\"default\"].createElement(\"div\", (0, _extends2[\"default\"])({\n ref: this.handleRef,\n className: \"slick-track\",\n style: this.props.trackStyle\n }, mouseEvents), slides);\n }\n }]);\n return Track;\n}(_react[\"default\"].PureComponent);\n\nexports.Track = Track;"]},"metadata":{},"sourceType":"script"}