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oB,OAAQ,CACjH,iBAAkB,QAClB,kBAAmB,QACnB,eAAgB,IAChBiC,EAAG,yHACF,MAAO,KACZ,I","sources":["webpack://lawline/./resources/assets/js/vue/apps/catalog/components/ProductRatingOptions.vue?4b9f","webpack://lawline/./resources/assets/js/vue/apps/catalog/components/ProductRatingOptions.vue","webpack://lawline/./resources/assets/js/vue/apps/catalog/components/ProductRatingOptions.vue?2ccd","webpack://lawline/./resources/assets/js/vue/shared/icon/O-DotsVertical.vue","webpack://lawline/./resources/assets/js/vue/shared/icon/O-DotsVertical.vue?dc4f"],"sourcesContent":["import { toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, createVNode as _createVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, withCtx as _withCtx } from \"vue\";\nvar _hoisted_1 = {\n  \"class\": \"ml-auto flex min-w-[200px] flex-col justify-items-stretch\"\n};\nvar _hoisted_2 = {\n  key: 0,\n  \"class\": \"rating mt-1 flex items-center text-right\"\n};\nvar _hoisted_3 = {\n  \"class\": \"font-bold leading-normal text-[#F5A623]\"\n};\nvar _hoisted_4 = {\n  key: 0,\n  \"class\": \"pl-1 text-sm text-gray-400\"\n};\nvar _hoisted_5 = {\n  \"class\": \"mt-3 flex flex-row justify-end sm:mt-auto\"\n};\nvar _hoisted_6 = {\n  \"class\": \"mr-3\"\n};\nvar _hoisted_7 = {\n  key: 0\n};\nvar _hoisted_8 = {\n  key: 1,\n  \"class\": \"text-slate-700 hover:bg-slate-50 hover:text-gray-900\",\n  href: \"/checkout\"\n};\nvar _hoisted_9 = [\"href\"];\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n  var _component_el_rate = _resolveComponent(\"el-rate\");\n  var _component_bookmark_outline = _resolveComponent(\"bookmark-outline\");\n  var _component_bookmark_solid = _resolveComponent(\"bookmark-solid\");\n  var _component_shopping_cart = _resolveComponent(\"shopping-cart\");\n  var _component_el_icon = _resolveComponent(\"el-icon\");\n  var _component_el_row = _resolveComponent(\"el-row\");\n  var _component_tickets = _resolveComponent(\"tickets\");\n  var _component_icon_dots_vertical = _resolveComponent(\"icon-dots-vertical\");\n  var _component_el_popover = _resolveComponent(\"el-popover\");\n  return _openBlock(), _createElementBlock(\"div\", _hoisted_1, [$props.product.show_rating ? (_openBlock(), _createElementBlock(\"div\", _hoisted_2, [_createElementVNode(\"span\", _hoisted_3, _toDisplayString($props.product.star_rating.toFixed(1)), 1), _createVNode(_component_el_rate, {\n    modelValue: $props.product.star_rating,\n    \"onUpdate:modelValue\": _cache[0] || (_cache[0] = function ($event) {\n      return $props.product.star_rating = $event;\n    }),\n    disabled: \"\",\n    colors: ['#F49E1E', '#F49E1E', '#F49E1E'],\n    \"text-color\": \"#F49E1E\"\n  }, null, 8, [\"modelValue\"]), $props.product.total_recommends ? (_openBlock(), _createElementBlock(\"span\", _hoisted_4, \"(\" + _toDisplayString($props.product.total_recommends) + \" ratings)\", 1)) : _createCommentVNode(\"\", true)])) : _createCommentVNode(\"\", true), _createElementVNode(\"div\", _hoisted_5, [_createElementVNode(\"div\", _hoisted_6, [$options.isSavable ? (_openBlock(), _createElementBlock(\"a\", {\n    key: 0,\n    title: \"Save to My Learning collection\",\n    \"class\": \"cursor-pointer text-ll-cerulean\",\n    onClick: _cache[1] || (_cache[1] = function () {\n      return $options.addOrUnhide && $options.addOrUnhide.apply($options, arguments);\n    })\n  }, [_createVNode(_component_bookmark_outline, {\n    \"class\": \"inline h-4 w-4\"\n  }), _cache[4] || (_cache[4] = _createElementVNode(\"span\", {\n    \"class\": \"text-lg font-medium text-ll-cerulean\"\n  }, \"Save\", -1))])) : _createCommentVNode(\"\", true), $options.isRemovable ? (_openBlock(), _createElementBlock(\"a\", {\n    key: 1,\n    title: \"Remove from My Learning collection\",\n    \"class\": \"cursor-pointer text-lg font-medium text-ll-cerulean\",\n    onClick: _cache[2] || (_cache[2] = function () {\n      return $options.remove && $options.remove.apply($options, arguments);\n    })\n  }, [_createVNode(_component_bookmark_solid, {\n    \"class\": \"inline h-4 w-4\"\n  }), _cache[5] || (_cache[5] = _createElementVNode(\"span\", {\n    \"class\": \"text-lg font-medium text-ll-cerulean\"\n  }, \"Remove\", -1))])) : _createCommentVNode(\"\", true)]), $props.product.type === 'Course' ? (_openBlock(), _createElementBlock(\"div\", _hoisted_7, [_createVNode(_component_el_popover, {\n    ref: \"popover\"\n  }, {\n    reference: _withCtx(function () {\n      return [_createVNode(_component_icon_dots_vertical, {\n        \"class\": \"h-6 w-6 cursor-pointer text-slate-700 hover:text-gray-900\"\n      })];\n    }),\n    \"default\": _withCtx(function () {\n      return [$options.canAddToCart ? (_openBlock(), _createElementBlock(\"a\", {\n        key: 0,\n        \"class\": \"text-slate-700 hover:bg-slate-50 hover:text-gray-900\",\n        onClick: _cache[3] || (_cache[3] = function ($event) {\n          return $options.addToCart();\n        })\n      }, [_createVNode(_component_el_row, {\n        \"class\": \"mb-0 cursor-pointer py-2\"\n      }, {\n        \"default\": _withCtx(function () {\n          return [_createVNode(_component_el_icon, null, {\n            \"default\": _withCtx(function () {\n              return [_createVNode(_component_shopping_cart)];\n            }),\n            _: 1\n          }), _cache[6] || (_cache[6] = _createElementVNode(\"span\", {\n            \"class\": \"pl-1\"\n          }, \"Add to Cart\", -1))];\n        }),\n        _: 1\n      })])) : _createCommentVNode(\"\", true), $props.product.in_cart ? (_openBlock(), _createElementBlock(\"a\", _hoisted_8, [_createVNode(_component_el_row, {\n        \"class\": \"mb-0 cursor-pointer py-2\"\n      }, {\n        \"default\": _withCtx(function () {\n          return [_createVNode(_component_el_icon, null, {\n            \"default\": _withCtx(function () {\n              return [_createVNode(_component_shopping_cart)];\n            }),\n            _: 1\n          }), _cache[7] || (_cache[7] = _createElementVNode(\"span\", {\n            \"class\": \"pl-1\"\n          }, \"View in Cart\", -1))];\n        }),\n        _: 1\n      })])) : _createCommentVNode(\"\", true), _createElementVNode(\"a\", {\n        \"class\": \"text-slate-700 hover:bg-slate-50 hover:text-gray-900\",\n        href: $props.product.url\n      }, [_createVNode(_component_el_row, {\n        \"class\": \"mb-0 cursor-pointer py-2\"\n      }, {\n        \"default\": _withCtx(function () {\n          return [_createVNode(_component_el_icon, null, {\n            \"default\": _withCtx(function () {\n              return [_createVNode(_component_tickets)];\n            }),\n            _: 1\n          }), _cache[8] || (_cache[8] = _createElementVNode(\"span\", {\n            \"class\": \"pl-1\"\n          }, \"View Details\", -1))];\n        }),\n        _: 1\n      })], 8, _hoisted_9)];\n    }),\n    _: 1\n  }, 512)])) : _createCommentVNode(\"\", true)])]);\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { defineAsyncComponent } from 'vue';\nimport { mapActions, mapGetters } from 'vuex';\nimport _find from 'lodash/find';\nimport IconDotsVertical from '@vue_shared/icon/O-DotsVertical';\nimport { ShoppingCart, Tickets } from '@element-plus/icons-vue';\n\nimport { ElMessage } from 'element-plus/es';\nimport 'element-plus/es/components/base/style/css';\nimport 'element-plus/es/components/message/style/css';\nexport default {\n  components: {\n    'bookmark-solid': defineAsyncComponent(function () {\n      return import('@vue_shared/icon/S-Bookmark');\n    }),\n    'bookmark-outline': defineAsyncComponent(function () {\n      return import('@vue_shared/icon/O-Bookmark');\n    }),\n    'course-materials-modal': defineAsyncComponent(function () {\n      return import('@vue_shared/components/CourseMaterialsModal');\n    }),\n    'icon-dots-vertical': IconDotsVertical,\n    ShoppingCart: ShoppingCart,\n    Tickets: Tickets\n  },\n  props: ['product'],\n  data: function data() {\n    return {\n      showCourseMaterialsModal: false,\n      addedToCart: false\n    };\n  },\n  computed: _objectSpread(_objectSpread({}, mapGetters('Search', {\n    isGuest: 'isGuest',\n    ownedProductCache: 'ownedProductCache',\n    ownedProductCacheProductIds: 'ownedProductCacheProductIds',\n    userSubscription: 'userSubscription'\n  })), {}, {\n    cachedOwnedProduct: function cachedOwnedProduct() {\n      var _this = this;\n      return _find(this.ownedProductCache, function (item) {\n        return item.id === _this.product.id;\n      });\n    },\n    isOwned: function isOwned() {\n      return this.ownedProductCacheProductIds.indexOf(this.product.id) > -1;\n    },\n    isRemovable: function isRemovable() {\n      if (this.isGuest || !this.isOwned) {\n        return false;\n      }\n      return this.cachedOwnedProduct.status !== 'Completed' && this.cachedOwnedProduct.visible;\n    },\n    isSavable: function isSavable() {\n      if (!this.isOwned) {\n        if (this.product.type === 'Course' && this.product.course_type_text === 'On Demand' && this.product.plan !== 'Premium') {\n          return true;\n        }\n\n        // right now learning paths and virtual events can't be saved without a subscription matching the plan\n        if (!this.userSubscription.active) {\n          return false;\n        }\n        return this.productAccessibleByUserSubscription;\n      }\n      return !this.cachedOwnedProduct.visible;\n    },\n    productAccessibleByUserSubscription: function productAccessibleByUserSubscription() {\n      switch (this.product.plan) {\n        case 'Premium':\n          return this.userSubscription.type === 'Premium';\n        case 'Plus':\n          return ['Premium', 'Plus', 'Unlimited'].indexOf(this.userSubscription.type) > -1;\n        case 'Essentials':\n          return ['Premium', 'Plus', 'Unlimited', 'Essentials', 'Basic'].indexOf(this.userSubscription.type) > -1;\n      }\n      return true;\n    },\n    canAddToCart: function canAddToCart() {\n      return !this.addedToCart && this.product.type === 'Course' && !this.product.in_cart && !this.product.non_accredited && !this.productAccessibleByUserSubscription && !this.isOwned;\n    }\n  }),\n  methods: _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, mapActions('MyCourse', ['hide', 'add'])), mapActions('Search', ['removeFromOwnedProductCache', 'updateOwnedProductCache'])), mapActions('Cart', ['addProduct'])), {}, {\n    remove: function remove() {\n      var _this2 = this;\n      this.hide(this.product.id).then(function () {\n        _this2.cachedOwnedProduct.visible = false;\n        ElMessage({\n          type: 'success',\n          message: 'Removed from your My Learning collection'\n        });\n      })[\"catch\"](function () {\n        ElMessage({\n          type: 'error',\n          message: 'Error - Please try again later.'\n        });\n      });\n    },\n    addOrUnhide: function addOrUnhide() {\n      var _this3 = this;\n      if (this.isGuest) {\n        window.location.href = \"/login?redirect=\".concat(window.location.href);\n        return;\n      }\n      this.add(this.product.id).then(function () {\n        _this3.updateOwnedProductCache([{\n          id: _this3.product.id,\n          visible: true\n        }]);\n        ElMessage({\n          type: 'success',\n          message: 'Saved to your My Learning collection'\n        });\n      });\n    },\n    addToCart: function addToCart() {\n      var _this4 = this;\n      this.addedToCart = true;\n      this.addProduct({\n        product_id: this.product.id\n      }).then(function () {\n        _this4.product.in_cart = true;\n        ElMessage({\n          type: 'success',\n          dangerouslyUseHTMLString: true,\n          message: 'Added to Cart'\n        });\n      });\n    }\n  })\n};","/* unplugin-vue-components disabled */import { render } from \"./ProductRatingOptions.vue?vue&type=template&id=ae47cc1e\"\nimport script from \"./ProductRatingOptions.vue?vue&type=script&lang=js\"\nexport * from \"./ProductRatingOptions.vue?vue&type=script&lang=js\"\n\nimport exportComponent from \"../../../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__","import { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\";\nvar _hoisted_1 = {\n  xmlns: \"http://www.w3.org/2000/svg\",\n  fill: \"none\",\n  viewBox: \"0 0 24 24\",\n  stroke: \"currentColor\"\n};\nexport function render(_ctx, _cache) {\n  return _openBlock(), _createElementBlock(\"svg\", _hoisted_1, _cache[0] || (_cache[0] = [_createElementVNode(\"path\", {\n    \"stroke-linecap\": \"round\",\n    \"stroke-linejoin\": \"round\",\n    \"stroke-width\": \"2\",\n    d: \"M12 5v.01M12 12v.01M12 19v.01M12 6a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2z\"\n  }, null, -1)]));\n}","/* unplugin-vue-components disabled */import { render } from \"./O-DotsVertical.vue?vue&type=template&id=3fa47304\"\nconst script = {}\n\nimport exportComponent from \"../../../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__"],"names":["_hoisted_1","_hoisted_2","key","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","href","_hoisted_9","_typeof","obj","Symbol","iterator","constructor","prototype","ownKeys","object","enumerableOnly","keys","Object","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","target","i","arguments","length","source","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","value","arg","input","hint","prim","toPrimitive","undefined","res","call","TypeError","String","Number","_toPrimitive","_toPropertyKey","configurable","writable","components","defineAsyncComponent","ShoppingCart","Tickets","props","data","showCourseMaterialsModal","addedToCart","computed","isGuest","ownedProductCache","ownedProductCacheProductIds","userSubscription","cachedOwnedProduct","_this","this","item","id","product","isOwned","indexOf","isRemovable","status","visible","isSavable","type","course_type_text","plan","active","productAccessibleByUserSubscription","canAddToCart","in_cart","non_accredited","methods","remove","_this2","hide","then","message","addOrUnhide","_this3","window","location","concat","add","updateOwnedProductCache","addToCart","_this4","addProduct","product_id","dangerouslyUseHTMLString","_ctx","_cache","$props","$setup","$data","$options","_component_el_rate","_component_bookmark_outline","_component_bookmark_solid","_component_shopping_cart","_component_el_icon","_component_el_row","_component_tickets","_component_icon_dots_vertical","_component_el_popover","show_rating","star_rating","toFixed","modelValue","$event","disabled","colors","total_recommends","title","onClick","ref","reference","_","url","xmlns","fill","viewBox","stroke","script","d"],"sourceRoot":""}