diff --git a/.editorconfig b/.editorconfig index 9cdbc2ed9..05e68a84b 100644 --- a/.editorconfig +++ b/.editorconfig @@ -6,6 +6,7 @@ end_of_line = lf insert_final_newline = false indent_style = space indent_size = 4 +quote_type = single trim_trailing_whitespace = true [*.md] diff --git a/.github/ISSUE_TEMPLATE/1_Bug_report.md b/.github/ISSUE_TEMPLATE/1_Bug_report.md index e6e55423f..cbb4616e7 100644 --- a/.github/ISSUE_TEMPLATE/1_Bug_report.md +++ b/.github/ISSUE_TEMPLATE/1_Bug_report.md @@ -17,9 +17,9 @@ about: 'Report a general issue.' #### Bagisto version - [ ] master branch +- [ ] 1.3.2 - [ ] 1.3.1 - [ ] 1.3.0 -- [ ] 1.2.0 ### Steps to reproduce diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 361429c11..725396757 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,10 +1,12 @@ -## Description - - +## Issue Reference + -## How to test this - +## Description + + +## How To Test This? + ## Documentation -- [ ] My pull request requires a update on the documentation repository. - +- [ ] My pull request requires an update on the documentation repository. + diff --git a/CHANGELOG for v1.x.x.md b/CHANGELOG for v1.x.x.md index 1261eb7f0..f0c92cca9 100644 --- a/CHANGELOG for v1.x.x.md +++ b/CHANGELOG for v1.x.x.md @@ -2,6 +2,200 @@ This changelog consists of the bug & security fixes and new features being included in the releases listed below. +## **v1.3.2 (7th of August 2021)** - *Release* + +* #5020 [feature] - Webvital score improvement. + +* #4855 [feature] - Autofilling of quantity. + +* #4632 [feature] - Gooogle captcha integration. + +* #4557 [feature] - Feature for sorting product review at customer's end. + +* #4463 [feature] - Show prices with or without taxes. + +* #4257 [feature] - Multi-lang support in admin. + +* #4102 [feature] - Payment history for orders. + +* #3477 [feature] - Image column in configurable products for variants. + +* #3453 [feature] - Automatic invoice generation. + +* #4927 [enhancement] - Allow the admin to set a payment term for invoices. + +* #4926 [enhancement] - Allow admin to set an invoice prefix and the first invoice number. + +* #4911 [enhancement] - Default variant selection for configurable product. + +* #4901 [enhancement] - Configurable product addition issue. + +* #4767 [enhancement] - PHP 8 Support. + +* #4449 [enhancement] - Laravel 8 Support. + +* #3834 [enhancement] - Ability to use multiple datagrids on single page. + +* #3251 [enhancement] - Add orders list to the customers details view. + +* #5053 [fixed] - showing validation on input fields while loading velocity + +* #5046 [fixed] - Add to cart button is not working in compare page for default theme. + +* #5045 [fixed] - Not getting product images where cache is exist. + +* #5042 [fixed] - Update the alert message when edit and save customer address. + +* #5033 [fixed] - Order status options after invoice generation on payment methods. + +* #5029 [fixed] - Header menu content list layout need to fix. + +* #5027 [fixed] - Fix customer account menu visibility in safari browser. + +* #5018 [fixed] - Invoice ID is not recognized in transactions when invoice id contains custom prefix/suffix. + +* #5013 [fixed] - No warning visible when user password doesn't match on the reset password page. + +* #5011 [fixed] - Admin filter options are not working in Safari. + +* #4992 [fixed] - Products image are getting stretch on search page. + +* #4989 [fixed] - In sales, the module that creates refund subtotal is showing different. + +* #4977 [fixed] - Configurable products are not visible on the category page if allow out of stock is disabled. +. +* #4969 [fixed] - Muliselect attribute options ID should not visible in compare product. + +* #4965 [fixed] - Filter labels in datagrids are not translated. + +* #4964 [fixed] - Search icon is missing in velocity theme Datagrid. + +* #4963 [fixed] - French locale translations are missing. + +* #4962 [fixed] - Able to access downloadable products even I have not purchased. + +* #4960 [fixed] - The invoice date is missing on invoices. + +* #4959 [fixed] - Getting exception when merging guest cart with customer cart with the configurable item. + +* #4951 [fixed] - Real-time compare number is not decreased when deleting a product from compare page. + +* #4948 [fixed] - Translation issue for the minimum order at cart checkout. + +* #4947 [fixed] - Getting all invoices (that are not linked to customer or customer's order) in the customer section in the admin panel. + +* #4941 [fixed] - The locale option should be visible with fields that are locale-based. + +* #4935 [fixed] - Slider is not removed from the store if slider date gets expired. + +* #4931 [fixed] - Root category name is missing when admin locale is not en. + +* #4924 [fixed] - The coupon code button should not disable if one coupon code is already applied. + +* #4921 [fixed] - Flag icons are missing when the locale is not en. + +* #4903 [fixed] - Contribution guide is missing. + +* #4896 [fixed] - Group product sort order functionality is not working. + +* #4886 [fixed] - Make Sample optional for downloadable products. + +* #4885 [fixed] - Hide shipping for virtual products + +* #4854 [fixed] - Filtering customer address page is always redirect to the customer profile tab. + +* #4848 [fixed] - Fix selected filter options alignment at customer panel. + +* #4847 [fixed] - Add ACL for customer order list. + +* #4840 [fixed] - Pagination alignment issue on customer end. + +* #4827 [fixed] - Shop by category disappears on hover. + +* #4823 [fixed] - UI bug at customer Invoice page if multiple invoices exist for same order id. + +* #4818 [fixed] - Getting qty error when move item to cart from the wishlist. + +* #4813 [fixed] - Compare product in velocity theme showing duplicated attribute after adding a new attribute family. + +* #4811 [fixed] - Getting error when redirect on review page. + +* #4807 [fixed] - Category logo icon is missing in API. + +* #4806 [fixed] - Not able to see the configurable products in the API. + +* #4804 [fixed] - The city field is missing in order confirmation emails. + +* #4800 [fixed] - Filter is not working in customer grid. + +* #4799 [fixed] - Product image resizing. + +* #4794 [fixed] - Admin logo is getting hidden when scrolling down the menu bar. + +* #4779 [fixed] - Image search is not working when out of stock is disabled. + +* #4773 [fixed] - Category condition is not getting set in catalog rule. + +* #4771 [fixed] - Datetime component should be enhanced as date component in UI package. + +* #4758 [fixed] - Bug when adding an item twice in the cart from the API. + +* #4752 [fixed] - Add endpoints for transactions API Done Enhancement. + +* #4751 [fixed] - The sidebar menu icon should be removed from admin. + +* #4748 [fixed] - Address is not saved on checkout. + +* #4735 [fixed] - Price filter issue. + +* #4730 [fixed] - All products are getting deleted when the associated category is deleted. + +* #4729 [fixed] - Products do not exist inside a category, still they are visible on the category page. + +* #4727 [fixed] - Error `addToCartHtml` is not defined on the compare page. + +* #4722 [fixed] - Getting exception on wishlist when adding a configurable item on wishlist. + +* #4715 [fixed] - Product name is breaking in invoice PDF. + +* #4713 [fixed] - Paypal IPN Issue Fixed - SA6. + +* #4710 [fixed] - Fixed currencies "value"s and "phone" fields formated for API. + +* #4709 [fixed] - Getting exception when update inactive item on cart. + +* #4708 [fixed] - Getting issue while selecting variant with no image. + +* #4707 [fixed] - Fixed admin theme not loading with custom admin URL. + +* #4702 [fixed] - Issue during exporting customers data. + +* #4698 [fixed] - Category slug should not translation based. + +* #4691 [fixed] - Distorted image issue. + +* #4690 [fixed] - Variant images are not visible in a sorted manner as uploaded in the backend. + +* #4686 [fixed] - Configurable item is still visible on the search page when out of stock is disabled. + +* #4685 [fixed] - Blank space remains on the homepage when disabling out-of-stock items from the backend. + +* #4682 [fixed] - Catalog rules and product price filter. + +* #4680 [fixed] - Check out page extremely slow. + +* #4677 [fixed] - API addresses, returns an error on create + not all fields are manipulated API. + +* #4668 [fixed] - Customer profile header is missing in responsive view. + +* #4564 [fixed] - Getting exception on admin interface when setup using webinstaller. + +* #4519 [fixed] - Tax should not be state or Pincode-dependent. It should be product category-dependent. + +* #3902 [fixed] - Duplicate order number getting generated when placed order simultaneously. + +* #3196 [fixed] - L x W x H/D on product description. + ## **v1.3.1 (22nd of February 2021)** - *Release* * #4659 [fixed] - Only show defaults option in Shipping. @@ -516,8 +710,6 @@ This changelog consists of the bug & security fixes and new features being inclu * #3457 [fixed] - number indicator are hidden on wishlist or compare icon RTL format -* #3453 [fixed] - Invoice state is always set to paid - * #3451 [fixed] - Change request regarding shipments * #3447 [fixed] - By default social login should be enabled diff --git a/README.md b/README.md index 56fdbf87a..13c9b1778 100755 --- a/README.md +++ b/README.md @@ -18,7 +18,8 @@ 4. [Installation & Configuration](#installation-and-configuration) 5. [License](#license) 6. [Security Vulnerabilities](#security-vulnerabilities) -7. [Miscellaneous](#miscellaneous) +7. [Modules](#modules) +8. [Miscellaneous](#miscellaneous) ### Introduction @@ -139,6 +140,11 @@ Bagisto is a truly opensource E-Commerce framework which will always be free und ### Security Vulnerabilities Please don't disclose security vulnerabilities publicly. If you find any security vulnerability in Bagisto then please email us: mailto:support@bagisto.com. +### Modules +[Available Modules](https://bagisto.com/en/extensions) + +Need something else? Email us at support@bagisto.com. + ### Miscellaneous #### Contribute diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index 3fc667cf3..ba47404a1 100755 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -14,10 +14,11 @@ class Kernel extends HttpKernel * @var array */ protected $middleware = [ - \Webkul\Core\Http\Middleware\CheckForMaintenanceMode::class, - \App\Http\Middleware\EncryptCookies::class, - \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, - \Illuminate\Session\Middleware\StartSession::class, + \Webkul\Core\Http\Middleware\CheckForMaintenanceMode::class, + \App\Http\Middleware\EncryptCookies::class, + \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, + \Illuminate\Session\Middleware\StartSession::class, + \Webkul\Core\Http\Middleware\SecureHeaders::class, ]; /** diff --git a/package.json b/package.json index 306f29c37..bce512a76 100755 --- a/package.json +++ b/package.json @@ -7,8 +7,7 @@ "watch-poll": "npm run watch -- --watch-poll", "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js", "prod": "npm run production", - "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", - "postinstall": "opencollective-postinstall" + "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js" }, "devDependencies": { "axios": "^0.21.0", @@ -25,12 +24,6 @@ "vue-template-compiler": "^2.6.11" }, "dependencies": { - "opencollective": "^1.0.3", - "opencollective-postinstall": "^2.0.1", "vee-validate": "^3.3.0" - }, - "collective": { - "type": "opencollective", - "url": "https://opencollective.com/bagisto" } } diff --git a/packages/Webkul/Admin/publishable/assets/js/admin.js b/packages/Webkul/Admin/publishable/assets/js/admin.js index 3a1f0a651..63be15637 100755 --- a/packages/Webkul/Admin/publishable/assets/js/admin.js +++ b/packages/Webkul/Admin/publishable/assets/js/admin.js @@ -1,2 +1,2 @@ /*! For license information please see admin.js.LICENSE.txt */ -!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=0)}({"+TvC":function(e,t,n){"use strict";n.r(t);var r={props:["iconClass"],methods:{toggle:function(){$(".aside-nav").is(":visible")?this.hide():this.show()},hide:function(){$(".aside-nav").hide((function(){$(".content-wrapper").css({marginLeft:"unset"}),$("#nav-expand-button").show()}))},show:function(){$("#nav-expand-button").hide(),$(".aside-nav").show((function(){$(".content-wrapper").css({marginLeft:"280px"})}))}}},i=(n("CQfq"),n("KHd+")),o=Object(i.a)(r,(function(){var e=this.$createElement,t=this._self._c||e;return t("span",{staticClass:"toggle-aside-nav",on:{click:this.toggle}},[t("i",{staticClass:"icon",class:this.iconClass})])}),[],!1,null,"36ed1904",null);t.default=o.exports},0:function(e,t,n){n("uPOf"),e.exports=n("w/dW")},"2SVd":function(e,t,n){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},"5oMp":function(e,t,n){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},"8oxB":function(e,t){var n,r,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function u(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var s,c=[],l=!1,f=-1;function d(){l&&s&&(l=!1,s.length?c=s.concat(c):f=-1,c.length&&p())}function p(){if(!l){var e=u(d);l=!0;for(var t=c.length;t;){for(s=c,c=[];++f1)for(var n=1;n0&&t-1 in e)}T.fn=T.prototype={jquery:"3.6.0",constructor:T,length:0,toArray:function(){return u.call(this)},get:function(e){return null==e?u.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=T.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return T.each(this,e)},map:function(e){return this.pushStack(T.map(this,(function(t,n){return e.call(t,n,t)})))},slice:function(){return this.pushStack(u.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(T.grep(this,(function(e,t){return(t+1)%2})))},odd:function(){return this.pushStack(T.grep(this,(function(e,t){return t%2})))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n+~]|"+P+")"+P+"*"),V=new RegExp(P+"|>"),W=new RegExp(R),Z=new RegExp("^"+F+"$"),Y={ID:new RegExp("^#("+F+")"),CLASS:new RegExp("^\\.("+F+")"),TAG:new RegExp("^("+F+"|[*])"),ATTR:new RegExp("^"+q),PSEUDO:new RegExp("^"+R),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+P+"*(even|odd|(([+-]|)(\\d*)n|)"+P+"*(?:([+-]|)"+P+"*(\\d+)|))"+P+"*\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+P+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+P+"*((?:-\\d)?\\d*)"+P+"*\\)|)(?=[^-]|$)","i")},X=/HTML$/i,G=/^(?:input|select|textarea|button)$/i,K=/^h\d$/i,Q=/^[^{]+\{\s*\[native \w/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+P+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){d()},ae=_e((function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{D.apply(O=M.call(w.childNodes),w.childNodes),O[w.childNodes.length].nodeType}catch(e){D={apply:O.length?function(e,t){N.apply(e,M.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}function ue(e,t,r,i){var o,u,c,l,f,h,g,y=t&&t.ownerDocument,w=t?t.nodeType:9;if(r=r||[],"string"!=typeof e||!e||1!==w&&9!==w&&11!==w)return r;if(!i&&(d(t),t=t||p,v)){if(11!==w&&(f=J.exec(e)))if(o=f[1]){if(9===w){if(!(c=t.getElementById(o)))return r;if(c.id===o)return r.push(c),r}else if(y&&(c=y.getElementById(o))&&b(t,c)&&c.id===o)return r.push(c),r}else{if(f[2])return D.apply(r,t.getElementsByTagName(e)),r;if((o=f[3])&&n.getElementsByClassName&&t.getElementsByClassName)return D.apply(r,t.getElementsByClassName(o)),r}if(n.qsa&&!k[e+" "]&&(!m||!m.test(e))&&(1!==w||"object"!==t.nodeName.toLowerCase())){if(g=e,y=t,1===w&&(V.test(e)||z.test(e))){for((y=ee.test(e)&&ge(t.parentNode)||t)===t&&n.scope||((l=t.getAttribute("id"))?l=l.replace(re,ie):t.setAttribute("id",l=_)),u=(h=a(e)).length;u--;)h[u]=(l?"#"+l:":scope")+" "+be(h[u]);g=h.join(",")}try{return D.apply(r,y.querySelectorAll(g)),r}catch(t){k(e,!0)}finally{l===_&&t.removeAttribute("id")}}}return s(e.replace(U,"$1"),t,r,i)}function se(){var e=[];return function t(n,i){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=i}}function ce(e){return e[_]=!0,e}function le(e){var t=p.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){for(var n=e.split("|"),i=n.length;i--;)r.attrHandle[n[i]]=t}function de(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function pe(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function he(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ve(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&ae(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function me(e){return ce((function(t){return t=+t,ce((function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))}))}))}function ge(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in n=ue.support={},o=ue.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!X.test(t||n&&n.nodeName||"HTML")},d=ue.setDocument=function(e){var t,i,a=e?e.ownerDocument||e:w;return a!=p&&9===a.nodeType&&a.documentElement?(h=(p=a).documentElement,v=!o(p),w!=p&&(i=p.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",oe,!1):i.attachEvent&&i.attachEvent("onunload",oe)),n.scope=le((function(e){return h.appendChild(e).appendChild(p.createElement("div")),void 0!==e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length})),n.attributes=le((function(e){return e.className="i",!e.getAttribute("className")})),n.getElementsByTagName=le((function(e){return e.appendChild(p.createComment("")),!e.getElementsByTagName("*").length})),n.getElementsByClassName=Q.test(p.getElementsByClassName),n.getById=le((function(e){return h.appendChild(e).id=_,!p.getElementsByName||!p.getElementsByName(_).length})),n.getById?(r.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&v){var n=t.getElementById(e);return n?[n]:[]}}):(r.filter.ID=function(e){var t=e.replace(te,ne);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&v){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),r.find.TAG=n.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},r.find.CLASS=n.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&v)return t.getElementsByClassName(e)},g=[],m=[],(n.qsa=Q.test(p.querySelectorAll))&&(le((function(e){var t;h.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&m.push("[*^$]="+P+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||m.push("\\["+P+"*(?:value|"+L+")"),e.querySelectorAll("[id~="+_+"-]").length||m.push("~="),(t=p.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||m.push("\\["+P+"*name"+P+"*="+P+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||m.push(":checked"),e.querySelectorAll("a#"+_+"+*").length||m.push(".#.+[+~]"),e.querySelectorAll("\\\f"),m.push("[\\r\\n\\f]")})),le((function(e){e.innerHTML="";var t=p.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&m.push("name"+P+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&m.push(":enabled",":disabled"),h.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&m.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),m.push(",.*:")}))),(n.matchesSelector=Q.test(y=h.matches||h.webkitMatchesSelector||h.mozMatchesSelector||h.oMatchesSelector||h.msMatchesSelector))&&le((function(e){n.disconnectedMatch=y.call(e,"*"),y.call(e,"[s!='']:x"),g.push("!=",R)})),m=m.length&&new RegExp(m.join("|")),g=g.length&&new RegExp(g.join("|")),t=Q.test(h.compareDocumentPosition),b=t||Q.test(h.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},S=t?function(e,t){if(e===t)return f=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===r?e==p||e.ownerDocument==w&&b(w,e)?-1:t==p||t.ownerDocument==w&&b(w,t)?1:l?I(l,e)-I(l,t):0:4&r?-1:1)}:function(e,t){if(e===t)return f=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],u=[t];if(!i||!o)return e==p?-1:t==p?1:i?-1:o?1:l?I(l,e)-I(l,t):0;if(i===o)return de(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)u.unshift(n);for(;a[r]===u[r];)r++;return r?de(a[r],u[r]):a[r]==w?-1:u[r]==w?1:0},p):p},ue.matches=function(e,t){return ue(e,null,null,t)},ue.matchesSelector=function(e,t){if(d(e),n.matchesSelector&&v&&!k[t+" "]&&(!g||!g.test(t))&&(!m||!m.test(t)))try{var r=y.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){k(t,!0)}return ue(t,p,null,[e]).length>0},ue.contains=function(e,t){return(e.ownerDocument||e)!=p&&d(e),b(e,t)},ue.attr=function(e,t){(e.ownerDocument||e)!=p&&d(e);var i=r.attrHandle[t.toLowerCase()],o=i&&E.call(r.attrHandle,t.toLowerCase())?i(e,t,!v):void 0;return void 0!==o?o:n.attributes||!v?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},ue.escape=function(e){return(e+"").replace(re,ie)},ue.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},ue.uniqueSort=function(e){var t,r=[],i=0,o=0;if(f=!n.detectDuplicates,l=!n.sortStable&&e.slice(0),e.sort(S),f){for(;t=e[o++];)t===e[o]&&(i=r.push(o));for(;i--;)e.splice(r[i],1)}return l=null,e},i=ue.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[r++];)n+=i(t);return n},(r=ue.selectors={cacheLength:50,createPseudo:ce,match:Y,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||ue.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&ue.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return Y.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&W.test(n)&&(t=a(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=C[e+" "];return t||(t=new RegExp("(^|"+P+")"+e+"("+P+"|$)"))&&C(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,n){return function(r){var i=ue.attr(r,e);return null==i?"!="===t:!t||(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i.replace(B," ")+" ").indexOf(n)>-1:"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),u="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,s){var c,l,f,d,p,h,v=o!==a?"nextSibling":"previousSibling",m=t.parentNode,g=u&&t.nodeName.toLowerCase(),y=!s&&!u,b=!1;if(m){if(o){for(;v;){for(d=t;d=d[v];)if(u?d.nodeName.toLowerCase()===g:1===d.nodeType)return!1;h=v="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&y){for(b=(p=(c=(l=(f=(d=m)[_]||(d[_]={}))[d.uniqueID]||(f[d.uniqueID]={}))[e]||[])[0]===x&&c[1])&&c[2],d=p&&m.childNodes[p];d=++p&&d&&d[v]||(b=p=0)||h.pop();)if(1===d.nodeType&&++b&&d===t){l[e]=[x,p,b];break}}else if(y&&(b=p=(c=(l=(f=(d=t)[_]||(d[_]={}))[d.uniqueID]||(f[d.uniqueID]={}))[e]||[])[0]===x&&c[1]),!1===b)for(;(d=++p&&d&&d[v]||(b=p=0)||h.pop())&&((u?d.nodeName.toLowerCase()!==g:1!==d.nodeType)||!++b||(y&&((l=(f=d[_]||(d[_]={}))[d.uniqueID]||(f[d.uniqueID]={}))[e]=[x,b]),d!==t)););return(b-=i)===r||b%r==0&&b/r>=0}}},PSEUDO:function(e,t){var n,i=r.pseudos[e]||r.setFilters[e.toLowerCase()]||ue.error("unsupported pseudo: "+e);return i[_]?i(t):i.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?ce((function(e,n){for(var r,o=i(e,t),a=o.length;a--;)e[r=I(e,o[a])]=!(n[r]=o[a])})):function(e){return i(e,0,n)}):i}},pseudos:{not:ce((function(e){var t=[],n=[],r=u(e.replace(U,"$1"));return r[_]?ce((function(e,t,n,i){for(var o,a=r(e,null,i,[]),u=e.length;u--;)(o=a[u])&&(e[u]=!(t[u]=o))})):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}})),has:ce((function(e){return function(t){return ue(e,t).length>0}})),contains:ce((function(e){return e=e.replace(te,ne),function(t){return(t.textContent||i(t)).indexOf(e)>-1}})),lang:ce((function(e){return Z.test(e||"")||ue.error("unsupported lang: "+e),e=e.replace(te,ne).toLowerCase(),function(t){var n;do{if(n=v?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}})),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===h},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:ve(!1),disabled:ve(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!r.pseudos.empty(e)},header:function(e){return K.test(e.nodeName)},input:function(e){return G.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:me((function(){return[0]})),last:me((function(e,t){return[t-1]})),eq:me((function(e,t,n){return[n<0?n+t:n]})),even:me((function(e,t){for(var n=0;nt?t:n;--r>=0;)e.push(r);return e})),gt:me((function(e,t,n){for(var r=n<0?n+t:n;++r1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function xe(e,t,n,r,i){for(var o,a=[],u=0,s=e.length,c=null!=t;u-1&&(o[c]=!(a[c]=f))}}else g=xe(g===a?g.splice(h,g.length):g),i?i(null,a,g,s):D.apply(a,g)}))}function Ce(e){for(var t,n,i,o=e.length,a=r.relative[e[0].type],u=a||r.relative[" "],s=a?1:0,l=_e((function(e){return e===t}),u,!0),f=_e((function(e){return I(t,e)>-1}),u,!0),d=[function(e,n,r){var i=!a&&(r||n!==c)||((t=n).nodeType?l(e,n,r):f(e,n,r));return t=null,i}];s1&&we(d),s>1&&be(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(U,"$1"),n,s0,i=e.length>0,o=function(o,a,u,s,l){var f,h,m,g=0,y="0",b=o&&[],_=[],w=c,T=o||i&&r.find.TAG("*",l),C=x+=null==w?1:Math.random()||.1,A=T.length;for(l&&(c=a==p||a||l);y!==A&&null!=(f=T[y]);y++){if(i&&f){for(h=0,a||f.ownerDocument==p||(d(f),u=!v);m=e[h++];)if(m(f,a||p,u)){s.push(f);break}l&&(x=C)}n&&((f=!m&&f)&&g--,o&&b.push(f))}if(g+=y,n&&y!==g){for(h=0;m=t[h++];)m(b,_,a,u);if(o){if(g>0)for(;y--;)b[y]||_[y]||(_[y]=j.call(s));_=xe(_)}D.apply(s,_),l&&!o&&_.length>0&&g+t.length>1&&ue.uniqueSort(s)}return l&&(x=C,c=w),b};return n?ce(o):o}(o,i))).selector=e}return u},s=ue.select=function(e,t,n,i){var o,s,c,l,f,d="function"==typeof e&&e,p=!i&&a(e=d.selector||e);if(n=n||[],1===p.length){if((s=p[0]=p[0].slice(0)).length>2&&"ID"===(c=s[0]).type&&9===t.nodeType&&v&&r.relative[s[1].type]){if(!(t=(r.find.ID(c.matches[0].replace(te,ne),t)||[])[0]))return n;d&&(t=t.parentNode),e=e.slice(s.shift().value.length)}for(o=Y.needsContext.test(e)?0:s.length;o--&&(c=s[o],!r.relative[l=c.type]);)if((f=r.find[l])&&(i=f(c.matches[0].replace(te,ne),ee.test(s[0].type)&&ge(t.parentNode)||t))){if(s.splice(o,1),!(e=i.length&&be(s)))return D.apply(n,i),n;break}}return(d||u(e,p))(i,t,!v,n,!t||ee.test(e)&&ge(t.parentNode)||t),n},n.sortStable=_.split("").sort(S).join("")===_,n.detectDuplicates=!!f,d(),n.sortDetached=le((function(e){return 1&e.compareDocumentPosition(p.createElement("fieldset"))})),le((function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")}))||fe("type|href|height|width",(function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)})),n.attributes&&le((function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")}))||fe("value",(function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue})),le((function(e){return null==e.getAttribute("disabled")}))||fe(L,(function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null})),ue}(n);T.find=A,T.expr=A.selectors,T.expr[":"]=T.expr.pseudos,T.uniqueSort=T.unique=A.uniqueSort,T.text=A.getText,T.isXMLDoc=A.isXML,T.contains=A.contains,T.escapeSelector=A.escape;var $=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&T(e).is(n))break;r.push(e)}return r},k=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},S=T.expr.match.needsContext;function E(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var O=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,t,n){return g(t)?T.grep(e,(function(e,r){return!!t.call(e,r,e)!==n})):t.nodeType?T.grep(e,(function(e){return e===t!==n})):"string"!=typeof t?T.grep(e,(function(e){return l.call(t,e)>-1!==n})):T.filter(t,e,n)}T.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?T.find.matchesSelector(r,e)?[r]:[]:T.find.matches(e,T.grep(t,(function(e){return 1===e.nodeType})))},T.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(T(e).filter((function(){for(t=0;t1?T.uniqueSort(n):n},filter:function(e){return this.pushStack(j(this,e||[],!1))},not:function(e){return this.pushStack(j(this,e||[],!0))},is:function(e){return!!j(this,"string"==typeof e&&S.test(e)?T(e):e||[],!1).length}});var N,D=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(T.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||N,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:D.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof T?t[0]:t,T.merge(this,T.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:b,!0)),O.test(r[1])&&T.isPlainObject(t))for(r in t)g(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=b.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):g(e)?void 0!==n.ready?n.ready(e):e(T):T.makeArray(e,this)}).prototype=T.fn,N=T(b);var M=/^(?:parents|prev(?:Until|All))/,I={children:!0,contents:!0,next:!0,prev:!0};function L(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}T.fn.extend({has:function(e){var t=T(e,this),n=t.length;return this.filter((function(){for(var e=0;e-1:1===n.nodeType&&T.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?T.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?l.call(T(e),this[0]):l.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(T.uniqueSort(T.merge(this.get(),T(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),T.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return $(e,"parentNode")},parentsUntil:function(e,t,n){return $(e,"parentNode",n)},next:function(e){return L(e,"nextSibling")},prev:function(e){return L(e,"previousSibling")},nextAll:function(e){return $(e,"nextSibling")},prevAll:function(e){return $(e,"previousSibling")},nextUntil:function(e,t,n){return $(e,"nextSibling",n)},prevUntil:function(e,t,n){return $(e,"previousSibling",n)},siblings:function(e){return k((e.parentNode||{}).firstChild,e)},children:function(e){return k(e.firstChild)},contents:function(e){return null!=e.contentDocument&&a(e.contentDocument)?e.contentDocument:(E(e,"template")&&(e=e.content||e),T.merge([],e.childNodes))}},(function(e,t){T.fn[e]=function(n,r){var i=T.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=T.filter(r,i)),this.length>1&&(I[e]||T.uniqueSort(i),M.test(e)&&i.reverse()),this.pushStack(i)}}));var P=/[^\x20\t\r\n\f]+/g;function F(e){return e}function q(e){throw e}function R(e,t,n,r){var i;try{e&&g(i=e.promise)?i.call(e).done(t).fail(n):e&&g(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}T.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return T.each(e.match(P)||[],(function(e,n){t[n]=!0})),t}(e):T.extend({},e);var t,n,r,i,o=[],a=[],u=-1,s=function(){for(i=i||e.once,r=t=!0;a.length;u=-1)for(n=a.shift();++u-1;)o.splice(n,1),n<=u&&u--})),this},has:function(e){return e?T.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=a=[],n||t||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=[e,(n=n||[]).slice?n.slice():n],a.push(n),t||s()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},T.extend({Deferred:function(e){var t=[["notify","progress",T.Callbacks("memory"),T.Callbacks("memory"),2],["resolve","done",T.Callbacks("once memory"),T.Callbacks("once memory"),0,"resolved"],["reject","fail",T.Callbacks("once memory"),T.Callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},catch:function(e){return i.then(null,e)},pipe:function(){var e=arguments;return T.Deferred((function(n){T.each(t,(function(t,r){var i=g(e[r[4]])&&e[r[4]];o[r[1]]((function(){var e=i&&i.apply(this,arguments);e&&g(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,i?[e]:arguments)}))})),e=null})).promise()},then:function(e,r,i){var o=0;function a(e,t,r,i){return function(){var u=this,s=arguments,c=function(){var n,c;if(!(e=o&&(r!==q&&(u=void 0,s=[n]),t.rejectWith(u,s))}};e?l():(T.Deferred.getStackHook&&(l.stackTrace=T.Deferred.getStackHook()),n.setTimeout(l))}}return T.Deferred((function(n){t[0][3].add(a(0,n,g(i)?i:F,n.notifyWith)),t[1][3].add(a(0,n,g(e)?e:F)),t[2][3].add(a(0,n,g(r)?r:q))})).promise()},promise:function(e){return null!=e?T.extend(e,i):i}},o={};return T.each(t,(function(e,n){var a=n[2],u=n[5];i[n[1]]=a.add,u&&a.add((function(){r=u}),t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),a.add(n[3].fire),o[n[0]]=function(){return o[n[0]+"With"](this===o?void 0:this,arguments),this},o[n[0]+"With"]=a.fireWith})),i.promise(o),e&&e.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),i=u.call(arguments),o=T.Deferred(),a=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?u.call(arguments):n,--t||o.resolveWith(r,i)}};if(t<=1&&(R(e,o.done(a(n)).resolve,o.reject,!t),"pending"===o.state()||g(i[n]&&i[n].then)))return o.then();for(;n--;)R(i[n],a(n),o.reject);return o.promise()}});var B=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;T.Deferred.exceptionHook=function(e,t){n.console&&n.console.warn&&e&&B.test(e.name)&&n.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},T.readyException=function(e){n.setTimeout((function(){throw e}))};var U=T.Deferred();function H(){b.removeEventListener("DOMContentLoaded",H),n.removeEventListener("load",H),T.ready()}T.fn.ready=function(e){return U.then(e).catch((function(e){T.readyException(e)})),this},T.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--T.readyWait:T.isReady)||(T.isReady=!0,!0!==e&&--T.readyWait>0||U.resolveWith(b,[T]))}}),T.ready.then=U.then,"complete"===b.readyState||"loading"!==b.readyState&&!b.documentElement.doScroll?n.setTimeout(T.ready):(b.addEventListener("DOMContentLoaded",H),n.addEventListener("load",H));var z=function(e,t,n,r,i,o,a){var u=0,s=e.length,c=null==n;if("object"===x(n))for(u in i=!0,n)z(e,t,u,n[u],!0,o,a);else if(void 0!==r&&(i=!0,g(r)||(a=!0),c&&(a?(t.call(e,r),t=null):(c=t,t=function(e,t,n){return c.call(T(e),n)})),t))for(;u1,null,!0)},removeData:function(e){return this.each((function(){Q.remove(this,e)}))}}),T.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=K.get(e,t),n&&(!r||Array.isArray(n)?r=K.access(e,t,T.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=T.queue(e,t),r=n.length,i=n.shift(),o=T._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,(function(){T.dequeue(e,t)}),o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return K.get(e,n)||K.access(e,n,{empty:T.Callbacks("once memory").add((function(){K.remove(e,[t+"queue",n])}))})}}),T.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length\x20\t\r\n\f]*)/i,ge=/^$|^module$|\/(?:java|ecma)script/i;pe=b.createDocumentFragment().appendChild(b.createElement("div")),(he=b.createElement("input")).setAttribute("type","radio"),he.setAttribute("checked","checked"),he.setAttribute("name","t"),pe.appendChild(he),m.checkClone=pe.cloneNode(!0).cloneNode(!0).lastChild.checked,pe.innerHTML="",m.noCloneChecked=!!pe.cloneNode(!0).lastChild.defaultValue,pe.innerHTML="",m.option=!!pe.lastChild;var ye={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function be(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&E(e,t)?T.merge([e],n):n}function _e(e,t){for(var n=0,r=e.length;n",""]);var we=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,u,s,c,l,f=t.createDocumentFragment(),d=[],p=0,h=e.length;p-1)i&&i.push(o);else if(c=ae(o),a=be(f.appendChild(o),"script"),c&&_e(a),n)for(l=0;o=a[l++];)ge.test(o.type||"")&&n.push(o);return f}var Te=/^([^.]*)(?:\.(.+)|)/;function Ce(){return!0}function Ae(){return!1}function $e(e,t){return e===function(){try{return b.activeElement}catch(e){}}()==("focus"===t)}function ke(e,t,n,r,i,o){var a,u;if("object"==typeof t){for(u in"string"!=typeof n&&(r=r||n,n=void 0),t)ke(e,u,n,r,t[u],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Ae;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return T().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=T.guid++)),e.each((function(){T.event.add(this,t,i,r,n)}))}function Se(e,t,n){n?(K.set(e,t,!1),T.event.add(e,t,{namespace:!1,handler:function(e){var r,i,o=K.get(this,t);if(1&e.isTrigger&&this[t]){if(o.length)(T.event.special[t]||{}).delegateType&&e.stopPropagation();else if(o=u.call(arguments),K.set(this,t,o),r=n(this,t),this[t](),o!==(i=K.get(this,t))||r?K.set(this,t,!1):i={},o!==i)return e.stopImmediatePropagation(),e.preventDefault(),i&&i.value}else o.length&&(K.set(this,t,{value:T.event.trigger(T.extend(o[0],T.Event.prototype),o.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===K.get(e,t)&&T.event.add(e,t,Ce)}T.event={global:{},add:function(e,t,n,r,i){var o,a,u,s,c,l,f,d,p,h,v,m=K.get(e);if(X(e))for(n.handler&&(n=(o=n).handler,i=o.selector),i&&T.find.matchesSelector(oe,i),n.guid||(n.guid=T.guid++),(s=m.events)||(s=m.events=Object.create(null)),(a=m.handle)||(a=m.handle=function(t){return void 0!==T&&T.event.triggered!==t.type?T.event.dispatch.apply(e,arguments):void 0}),c=(t=(t||"").match(P)||[""]).length;c--;)p=v=(u=Te.exec(t[c])||[])[1],h=(u[2]||"").split(".").sort(),p&&(f=T.event.special[p]||{},p=(i?f.delegateType:f.bindType)||p,f=T.event.special[p]||{},l=T.extend({type:p,origType:v,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&T.expr.match.needsContext.test(i),namespace:h.join(".")},o),(d=s[p])||((d=s[p]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(e,r,h,a)||e.addEventListener&&e.addEventListener(p,a)),f.add&&(f.add.call(e,l),l.handler.guid||(l.handler.guid=n.guid)),i?d.splice(d.delegateCount++,0,l):d.push(l),T.event.global[p]=!0)},remove:function(e,t,n,r,i){var o,a,u,s,c,l,f,d,p,h,v,m=K.hasData(e)&&K.get(e);if(m&&(s=m.events)){for(c=(t=(t||"").match(P)||[""]).length;c--;)if(p=v=(u=Te.exec(t[c])||[])[1],h=(u[2]||"").split(".").sort(),p){for(f=T.event.special[p]||{},d=s[p=(r?f.delegateType:f.bindType)||p]||[],u=u[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=d.length;o--;)l=d[o],!i&&v!==l.origType||n&&n.guid!==l.guid||u&&!u.test(l.namespace)||r&&r!==l.selector&&("**"!==r||!l.selector)||(d.splice(o,1),l.selector&&d.delegateCount--,f.remove&&f.remove.call(e,l));a&&!d.length&&(f.teardown&&!1!==f.teardown.call(e,h,m.handle)||T.removeEvent(e,p,m.handle),delete s[p])}else for(p in s)T.event.remove(e,p+t[c],n,r,!0);T.isEmptyObject(s)&&K.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,u=new Array(arguments.length),s=T.event.fix(e),c=(K.get(this,"events")||Object.create(null))[s.type]||[],l=T.event.special[s.type]||{};for(u[0]=s,t=1;t=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==e.type||!0!==c.disabled)){for(o=[],a={},n=0;n-1:T.find(i,this,null,[c]).length),a[i]&&o.push(r);o.length&&u.push({elem:c,handlers:o})}return c=this,s\s*$/g;function Ne(e,t){return E(e,"table")&&E(11!==t.nodeType?t:t.firstChild,"tr")&&T(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Me(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Ie(e,t){var n,r,i,o,a,u;if(1===t.nodeType){if(K.hasData(e)&&(u=K.get(e).events))for(i in K.remove(t,"handle events"),u)for(n=0,r=u[i].length;n1&&"string"==typeof h&&!m.checkClone&&Oe.test(h))return e.each((function(i){var o=e.eq(i);v&&(t[0]=h.call(this,i,o.html())),Pe(o,t,n,r)}));if(d&&(o=(i=xe(t,e[0].ownerDocument,!1,e,r)).firstChild,1===i.childNodes.length&&(i=o),o||r)){for(u=(a=T.map(be(i,"script"),De)).length;f0&&_e(a,!s&&be(e,"script")),u},cleanData:function(e){for(var t,n,r,i=T.event.special,o=0;void 0!==(n=e[o]);o++)if(X(n)){if(t=n[K.expando]){if(t.events)for(r in t.events)i[r]?T.event.remove(n,r):T.removeEvent(n,r,t.handle);n[K.expando]=void 0}n[Q.expando]&&(n[Q.expando]=void 0)}}}),T.fn.extend({detach:function(e){return Fe(this,e,!0)},remove:function(e){return Fe(this,e)},text:function(e){return z(this,(function(e){return void 0===e?T.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)}))}),null,e,arguments.length)},append:function(){return Pe(this,arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Ne(this,e).appendChild(e)}))},prepend:function(){return Pe(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Ne(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return Pe(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return Pe(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)}))},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(T.cleanData(be(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return T.clone(this,e,t)}))},html:function(e){return z(this,(function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Ee.test(e)&&!ye[(me.exec(e)||["",""])[1].toLowerCase()]){e=T.htmlPrefilter(e);try{for(;n=0&&(s+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-s-u-.5))||0),s}function tt(e,t,n){var r=Re(e),i=(!m.boxSizingReliable()||n)&&"border-box"===T.css(e,"boxSizing",!1,r),o=i,a=He(e,t,r),u="offset"+t[0].toUpperCase()+t.slice(1);if(qe.test(a)){if(!n)return a;a="auto"}return(!m.boxSizingReliable()&&i||!m.reliableTrDimensions()&&E(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===T.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===T.css(e,"boxSizing",!1,r),(o=u in e)&&(a=e[u])),(a=parseFloat(a)||0)+et(e,t,n||(i?"border":"content"),o,r,a)+"px"}function nt(e,t,n,r,i){return new nt.prototype.init(e,t,n,r,i)}T.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=He(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,u=Y(t),s=Ge.test(t),c=e.style;if(s||(t=Ye(u)),a=T.cssHooks[t]||T.cssHooks[u],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:c[t];"string"===(o=typeof n)&&(i=re.exec(n))&&i[1]&&(n=ce(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||s||(n+=i&&i[3]||(T.cssNumber[u]?"":"px")),m.clearCloneStyle||""!==n||0!==t.indexOf("background")||(c[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(s?c.setProperty(t,n):c[t]=n))}},css:function(e,t,n,r){var i,o,a,u=Y(t);return Ge.test(t)||(t=Ye(u)),(a=T.cssHooks[t]||T.cssHooks[u])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=He(e,t,r)),"normal"===i&&t in Qe&&(i=Qe[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),T.each(["height","width"],(function(e,t){T.cssHooks[t]={get:function(e,n,r){if(n)return!Xe.test(T.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?tt(e,t,r):Be(e,Ke,(function(){return tt(e,t,r)}))},set:function(e,n,r){var i,o=Re(e),a=!m.scrollboxSize()&&"absolute"===o.position,u=(a||r)&&"border-box"===T.css(e,"boxSizing",!1,o),s=r?et(e,t,r,u,o):0;return u&&a&&(s-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-et(e,t,"border",!1,o)-.5)),s&&(i=re.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=T.css(e,t)),Je(0,n,s)}}})),T.cssHooks.marginLeft=ze(m.reliableMarginLeft,(function(e,t){if(t)return(parseFloat(He(e,"marginLeft"))||e.getBoundingClientRect().left-Be(e,{marginLeft:0},(function(){return e.getBoundingClientRect().left})))+"px"})),T.each({margin:"",padding:"",border:"Width"},(function(e,t){T.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+ie[r]+t]=o[r]||o[r-2]||o[0];return i}},"margin"!==e&&(T.cssHooks[e+t].set=Je)})),T.fn.extend({css:function(e,t){return z(this,(function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=Re(e),i=t.length;a1)}}),T.Tween=nt,nt.prototype={constructor:nt,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||T.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(T.cssNumber[n]?"":"px")},cur:function(){var e=nt.propHooks[this.prop];return e&&e.get?e.get(this):nt.propHooks._default.get(this)},run:function(e){var t,n=nt.propHooks[this.prop];return this.options.duration?this.pos=t=T.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):nt.propHooks._default.set(this),this}},nt.prototype.init.prototype=nt.prototype,nt.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=T.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){T.fx.step[e.prop]?T.fx.step[e.prop](e):1!==e.elem.nodeType||!T.cssHooks[e.prop]&&null==e.elem.style[Ye(e.prop)]?e.elem[e.prop]=e.now:T.style(e.elem,e.prop,e.now+e.unit)}}},nt.propHooks.scrollTop=nt.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},T.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},T.fx=nt.prototype.init,T.fx.step={};var rt,it,ot=/^(?:toggle|show|hide)$/,at=/queueHooks$/;function ut(){it&&(!1===b.hidden&&n.requestAnimationFrame?n.requestAnimationFrame(ut):n.setTimeout(ut,T.fx.interval),T.fx.tick())}function st(){return n.setTimeout((function(){rt=void 0})),rt=Date.now()}function ct(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=ie[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function lt(e,t,n){for(var r,i=(ft.tweeners[t]||[]).concat(ft.tweeners["*"]),o=0,a=i.length;o1)},removeAttr:function(e){return this.each((function(){T.removeAttr(this,e)}))}}),T.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?T.prop(e,t,n):(1===o&&T.isXMLDoc(e)||(i=T.attrHooks[t.toLowerCase()]||(T.expr.match.bool.test(t)?dt:void 0)),void 0!==n?null===n?void T.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=T.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!m.radioValue&&"radio"===t&&E(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(P);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),dt={set:function(e,t,n){return!1===t?T.removeAttr(e,n):e.setAttribute(n,n),n}},T.each(T.expr.match.bool.source.match(/\w+/g),(function(e,t){var n=pt[t]||T.find.attr;pt[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=pt[a],pt[a]=i,i=null!=n(e,t,r)?a:null,pt[a]=o),i}}));var ht=/^(?:input|select|textarea|button)$/i,vt=/^(?:a|area)$/i;function mt(e){return(e.match(P)||[]).join(" ")}function gt(e){return e.getAttribute&&e.getAttribute("class")||""}function yt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(P)||[]}T.fn.extend({prop:function(e,t){return z(this,T.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each((function(){delete this[T.propFix[e]||e]}))}}),T.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&T.isXMLDoc(e)||(t=T.propFix[t]||t,i=T.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=T.find.attr(e,"tabindex");return t?parseInt(t,10):ht.test(e.nodeName)||vt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),m.optSelected||(T.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),T.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){T.propFix[this.toLowerCase()]=this})),T.fn.extend({addClass:function(e){var t,n,r,i,o,a,u,s=0;if(g(e))return this.each((function(t){T(this).addClass(e.call(this,t,gt(this)))}));if((t=yt(e)).length)for(;n=this[s++];)if(i=gt(n),r=1===n.nodeType&&" "+mt(i)+" "){for(a=0;o=t[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(u=mt(r))&&n.setAttribute("class",u)}return this},removeClass:function(e){var t,n,r,i,o,a,u,s=0;if(g(e))return this.each((function(t){T(this).removeClass(e.call(this,t,gt(this)))}));if(!arguments.length)return this.attr("class","");if((t=yt(e)).length)for(;n=this[s++];)if(i=gt(n),r=1===n.nodeType&&" "+mt(i)+" "){for(a=0;o=t[a++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");i!==(u=mt(r))&&n.setAttribute("class",u)}return this},toggleClass:function(e,t){var n=typeof e,r="string"===n||Array.isArray(e);return"boolean"==typeof t&&r?t?this.addClass(e):this.removeClass(e):g(e)?this.each((function(n){T(this).toggleClass(e.call(this,n,gt(this),t),t)})):this.each((function(){var t,i,o,a;if(r)for(i=0,o=T(this),a=yt(e);t=a[i++];)o.hasClass(t)?o.removeClass(t):o.addClass(t);else void 0!==e&&"boolean"!==n||((t=gt(this))&&K.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":K.get(this,"__className__")||""))}))},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+mt(gt(n))+" ").indexOf(t)>-1)return!0;return!1}});var bt=/\r/g;T.fn.extend({val:function(e){var t,n,r,i=this[0];return arguments.length?(r=g(e),this.each((function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,T(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=T.map(i,(function(e){return null==e?"":e+""}))),(t=T.valHooks[this.type]||T.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))}))):i?(t=T.valHooks[i.type]||T.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(bt,""):null==n?"":n:void 0}}),T.extend({valHooks:{option:{get:function(e){var t=T.find.attr(e,"value");return null!=t?t:mt(T.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,u=a?null:[],s=a?o+1:i.length;for(r=o<0?s:a?o:0;r-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),T.each(["radio","checkbox"],(function(){T.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=T.inArray(T(e).val(),t)>-1}},m.checkOn||(T.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})})),m.focusin="onfocusin"in n;var _t=/^(?:focusinfocus|focusoutblur)$/,wt=function(e){e.stopPropagation()};T.extend(T.event,{trigger:function(e,t,r,i){var o,a,u,s,c,l,f,d,h=[r||b],v=p.call(e,"type")?e.type:e,m=p.call(e,"namespace")?e.namespace.split("."):[];if(a=d=u=r=r||b,3!==r.nodeType&&8!==r.nodeType&&!_t.test(v+T.event.triggered)&&(v.indexOf(".")>-1&&(m=v.split("."),v=m.shift(),m.sort()),c=v.indexOf(":")<0&&"on"+v,(e=e[T.expando]?e:new T.Event(v,"object"==typeof e&&e)).isTrigger=i?2:3,e.namespace=m.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=r),t=null==t?[e]:T.makeArray(t,[e]),f=T.event.special[v]||{},i||!f.trigger||!1!==f.trigger.apply(r,t))){if(!i&&!f.noBubble&&!y(r)){for(s=f.delegateType||v,_t.test(s+v)||(a=a.parentNode);a;a=a.parentNode)h.push(a),u=a;u===(r.ownerDocument||b)&&h.push(u.defaultView||u.parentWindow||n)}for(o=0;(a=h[o++])&&!e.isPropagationStopped();)d=a,e.type=o>1?s:f.bindType||v,(l=(K.get(a,"events")||Object.create(null))[e.type]&&K.get(a,"handle"))&&l.apply(a,t),(l=c&&a[c])&&l.apply&&X(a)&&(e.result=l.apply(a,t),!1===e.result&&e.preventDefault());return e.type=v,i||e.isDefaultPrevented()||f._default&&!1!==f._default.apply(h.pop(),t)||!X(r)||c&&g(r[v])&&!y(r)&&((u=r[c])&&(r[c]=null),T.event.triggered=v,e.isPropagationStopped()&&d.addEventListener(v,wt),r[v](),e.isPropagationStopped()&&d.removeEventListener(v,wt),T.event.triggered=void 0,u&&(r[c]=u)),e.result}},simulate:function(e,t,n){var r=T.extend(new T.Event,n,{type:e,isSimulated:!0});T.event.trigger(r,null,t)}}),T.fn.extend({trigger:function(e,t){return this.each((function(){T.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var n=this[0];if(n)return T.event.trigger(e,t,n,!0)}}),m.focusin||T.each({focus:"focusin",blur:"focusout"},(function(e,t){var n=function(e){T.event.simulate(t,e.target,T.event.fix(e))};T.event.special[t]={setup:function(){var r=this.ownerDocument||this.document||this,i=K.access(r,t);i||r.addEventListener(e,n,!0),K.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this.document||this,i=K.access(r,t)-1;i?K.access(r,t,i):(r.removeEventListener(e,n,!0),K.remove(r,t))}}}));var xt=n.location,Tt={guid:Date.now()},Ct=/\?/;T.parseXML=function(e){var t,r;if(!e||"string"!=typeof e)return null;try{t=(new n.DOMParser).parseFromString(e,"text/xml")}catch(e){}return r=t&&t.getElementsByTagName("parsererror")[0],t&&!r||T.error("Invalid XML: "+(r?T.map(r.childNodes,(function(e){return e.textContent})).join("\n"):e)),t};var At=/\[\]$/,$t=/\r?\n/g,kt=/^(?:submit|button|image|reset|file)$/i,St=/^(?:input|select|textarea|keygen)/i;function Et(e,t,n,r){var i;if(Array.isArray(t))T.each(t,(function(t,i){n||At.test(e)?r(e,i):Et(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)}));else if(n||"object"!==x(t))r(e,t);else for(i in t)Et(e+"["+i+"]",t[i],n,r)}T.param=function(e,t){var n,r=[],i=function(e,t){var n=g(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!T.isPlainObject(e))T.each(e,(function(){i(this.name,this.value)}));else for(n in e)Et(n,e[n],t,i);return r.join("&")},T.fn.extend({serialize:function(){return T.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=T.prop(this,"elements");return e?T.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!T(this).is(":disabled")&&St.test(this.nodeName)&&!kt.test(e)&&(this.checked||!ve.test(e))})).map((function(e,t){var n=T(this).val();return null==n?null:Array.isArray(n)?T.map(n,(function(e){return{name:t.name,value:e.replace($t,"\r\n")}})):{name:t.name,value:n.replace($t,"\r\n")}})).get()}});var Ot=/%20/g,jt=/#.*$/,Nt=/([?&])_=[^&]*/,Dt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Mt=/^(?:GET|HEAD)$/,It=/^\/\//,Lt={},Pt={},Ft="*/".concat("*"),qt=b.createElement("a");function Rt(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(P)||[];if(g(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function Bt(e,t,n,r){var i={},o=e===Pt;function a(u){var s;return i[u]=!0,T.each(e[u]||[],(function(e,u){var c=u(t,n,r);return"string"!=typeof c||o||i[c]?o?!(s=c):void 0:(t.dataTypes.unshift(c),a(c),!1)})),s}return a(t.dataTypes[0])||!i["*"]&&a("*")}function Ut(e,t){var n,r,i=T.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&T.extend(!0,e,r),e}qt.href=xt.href,T.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:xt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(xt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Ft,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":T.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Ut(Ut(e,T.ajaxSettings),t):Ut(T.ajaxSettings,e)},ajaxPrefilter:Rt(Lt),ajaxTransport:Rt(Pt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var r,i,o,a,u,s,c,l,f,d,p=T.ajaxSetup({},t),h=p.context||p,v=p.context&&(h.nodeType||h.jquery)?T(h):T.event,m=T.Deferred(),g=T.Callbacks("once memory"),y=p.statusCode||{},_={},w={},x="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(c){if(!a)for(a={};t=Dt.exec(o);)a[t[1].toLowerCase()+" "]=(a[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=a[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return c?o:null},setRequestHeader:function(e,t){return null==c&&(e=w[e.toLowerCase()]=w[e.toLowerCase()]||e,_[e]=t),this},overrideMimeType:function(e){return null==c&&(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(c)C.always(e[C.status]);else for(t in e)y[t]=[y[t],e[t]];return this},abort:function(e){var t=e||x;return r&&r.abort(t),A(0,t),this}};if(m.promise(C),p.url=((e||p.url||xt.href)+"").replace(It,xt.protocol+"//"),p.type=t.method||t.type||p.method||p.type,p.dataTypes=(p.dataType||"*").toLowerCase().match(P)||[""],null==p.crossDomain){s=b.createElement("a");try{s.href=p.url,s.href=s.href,p.crossDomain=qt.protocol+"//"+qt.host!=s.protocol+"//"+s.host}catch(e){p.crossDomain=!0}}if(p.data&&p.processData&&"string"!=typeof p.data&&(p.data=T.param(p.data,p.traditional)),Bt(Lt,p,t,C),c)return C;for(f in(l=T.event&&p.global)&&0==T.active++&&T.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Mt.test(p.type),i=p.url.replace(jt,""),p.hasContent?p.data&&p.processData&&0===(p.contentType||"").indexOf("application/x-www-form-urlencoded")&&(p.data=p.data.replace(Ot,"+")):(d=p.url.slice(i.length),p.data&&(p.processData||"string"==typeof p.data)&&(i+=(Ct.test(i)?"&":"?")+p.data,delete p.data),!1===p.cache&&(i=i.replace(Nt,"$1"),d=(Ct.test(i)?"&":"?")+"_="+Tt.guid+++d),p.url=i+d),p.ifModified&&(T.lastModified[i]&&C.setRequestHeader("If-Modified-Since",T.lastModified[i]),T.etag[i]&&C.setRequestHeader("If-None-Match",T.etag[i])),(p.data&&p.hasContent&&!1!==p.contentType||t.contentType)&&C.setRequestHeader("Content-Type",p.contentType),C.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Ft+"; q=0.01":""):p.accepts["*"]),p.headers)C.setRequestHeader(f,p.headers[f]);if(p.beforeSend&&(!1===p.beforeSend.call(h,C,p)||c))return C.abort();if(x="abort",g.add(p.complete),C.done(p.success),C.fail(p.error),r=Bt(Pt,p,t,C)){if(C.readyState=1,l&&v.trigger("ajaxSend",[C,p]),c)return C;p.async&&p.timeout>0&&(u=n.setTimeout((function(){C.abort("timeout")}),p.timeout));try{c=!1,r.send(_,A)}catch(e){if(c)throw e;A(-1,e)}}else A(-1,"No Transport");function A(e,t,a,s){var f,d,b,_,w,x=t;c||(c=!0,u&&n.clearTimeout(u),r=void 0,o=s||"",C.readyState=e>0?4:0,f=e>=200&&e<300||304===e,a&&(_=function(e,t,n){for(var r,i,o,a,u=e.contents,s=e.dataTypes;"*"===s[0];)s.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in u)if(u[i]&&u[i].test(r)){s.unshift(i);break}if(s[0]in n)o=s[0];else{for(i in n){if(!s[0]||e.converters[i+" "+s[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==s[0]&&s.unshift(o),n[o]}(p,C,a)),!f&&T.inArray("script",p.dataTypes)>-1&&T.inArray("json",p.dataTypes)<0&&(p.converters["text script"]=function(){}),_=function(e,t,n,r){var i,o,a,u,s,c={},l=e.dataTypes.slice();if(l[1])for(a in e.converters)c[a.toLowerCase()]=e.converters[a];for(o=l.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!s&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),s=o,o=l.shift())if("*"===o)o=s;else if("*"!==s&&s!==o){if(!(a=c[s+" "+o]||c["* "+o]))for(i in c)if((u=i.split(" "))[1]===o&&(a=c[s+" "+u[0]]||c["* "+u[0]])){!0===a?a=c[i]:!0!==c[i]&&(o=u[0],l.unshift(u[1]));break}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+s+" to "+o}}}return{state:"success",data:t}}(p,_,C,f),f?(p.ifModified&&((w=C.getResponseHeader("Last-Modified"))&&(T.lastModified[i]=w),(w=C.getResponseHeader("etag"))&&(T.etag[i]=w)),204===e||"HEAD"===p.type?x="nocontent":304===e?x="notmodified":(x=_.state,d=_.data,f=!(b=_.error))):(b=x,!e&&x||(x="error",e<0&&(e=0))),C.status=e,C.statusText=(t||x)+"",f?m.resolveWith(h,[d,x,C]):m.rejectWith(h,[C,x,b]),C.statusCode(y),y=void 0,l&&v.trigger(f?"ajaxSuccess":"ajaxError",[C,p,f?d:b]),g.fireWith(h,[C,x]),l&&(v.trigger("ajaxComplete",[C,p]),--T.active||T.event.trigger("ajaxStop")))}return C},getJSON:function(e,t,n){return T.get(e,t,n,"json")},getScript:function(e,t){return T.get(e,void 0,t,"script")}}),T.each(["get","post"],(function(e,t){T[t]=function(e,n,r,i){return g(n)&&(i=i||r,r=n,n=void 0),T.ajax(T.extend({url:e,type:t,dataType:i,data:n,success:r},T.isPlainObject(e)&&e))}})),T.ajaxPrefilter((function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")})),T._evalUrl=function(e,t,n){return T.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){T.globalEval(e,t,n)}})},T.fn.extend({wrapAll:function(e){var t;return this[0]&&(g(e)&&(e=e.call(this[0])),t=T(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map((function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e})).append(this)),this},wrapInner:function(e){return g(e)?this.each((function(t){T(this).wrapInner(e.call(this,t))})):this.each((function(){var t=T(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)}))},wrap:function(e){var t=g(e);return this.each((function(n){T(this).wrapAll(t?e.call(this,n):e)}))},unwrap:function(e){return this.parent(e).not("body").each((function(){T(this).replaceWith(this.childNodes)})),this}}),T.expr.pseudos.hidden=function(e){return!T.expr.pseudos.visible(e)},T.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},T.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(e){}};var Ht={0:200,1223:204},zt=T.ajaxSettings.xhr();m.cors=!!zt&&"withCredentials"in zt,m.ajax=zt=!!zt,T.ajaxTransport((function(e){var t,r;if(m.cors||zt&&!e.crossDomain)return{send:function(i,o){var a,u=e.xhr();if(u.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(a in e.xhrFields)u[a]=e.xhrFields[a];for(a in e.mimeType&&u.overrideMimeType&&u.overrideMimeType(e.mimeType),e.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)u.setRequestHeader(a,i[a]);t=function(e){return function(){t&&(t=r=u.onload=u.onerror=u.onabort=u.ontimeout=u.onreadystatechange=null,"abort"===e?u.abort():"error"===e?"number"!=typeof u.status?o(0,"error"):o(u.status,u.statusText):o(Ht[u.status]||u.status,u.statusText,"text"!==(u.responseType||"text")||"string"!=typeof u.responseText?{binary:u.response}:{text:u.responseText},u.getAllResponseHeaders()))}},u.onload=t(),r=u.onerror=u.ontimeout=t("error"),void 0!==u.onabort?u.onabort=r:u.onreadystatechange=function(){4===u.readyState&&n.setTimeout((function(){t&&r()}))},t=t("abort");try{u.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}})),T.ajaxPrefilter((function(e){e.crossDomain&&(e.contents.script=!1)})),T.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return T.globalEval(e),e}}}),T.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")})),T.ajaxTransport("script",(function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(r,i){t=T(" diff --git a/packages/Webkul/Velocity/src/Resources/assets/js/UI/components/header-compare-with-badge.vue b/packages/Webkul/Velocity/src/Resources/assets/js/UI/components/header-compare-with-badge.vue new file mode 100644 index 000000000..9adc796b6 --- /dev/null +++ b/packages/Webkul/Velocity/src/Resources/assets/js/UI/components/header-compare-with-badge.vue @@ -0,0 +1,54 @@ + + + diff --git a/packages/Webkul/Velocity/src/Resources/assets/js/UI/components/header-mobile.vue b/packages/Webkul/Velocity/src/Resources/assets/js/UI/components/header-mobile.vue new file mode 100644 index 000000000..676112e98 --- /dev/null +++ b/packages/Webkul/Velocity/src/Resources/assets/js/UI/components/header-mobile.vue @@ -0,0 +1,475 @@ + + + diff --git a/packages/Webkul/Velocity/src/Resources/assets/js/UI/components/header-right-side.vue b/packages/Webkul/Velocity/src/Resources/assets/js/UI/components/header-right-side.vue new file mode 100644 index 000000000..68cbd9f29 --- /dev/null +++ b/packages/Webkul/Velocity/src/Resources/assets/js/UI/components/header-right-side.vue @@ -0,0 +1,22 @@ + + + diff --git a/packages/Webkul/Velocity/src/Resources/assets/js/UI/components/header-searchbar.vue b/packages/Webkul/Velocity/src/Resources/assets/js/UI/components/header-searchbar.vue new file mode 100644 index 000000000..fe8ab3144 --- /dev/null +++ b/packages/Webkul/Velocity/src/Resources/assets/js/UI/components/header-searchbar.vue @@ -0,0 +1,112 @@ + + + diff --git a/packages/Webkul/Velocity/src/Resources/assets/js/UI/components/header-sidebar.vue b/packages/Webkul/Velocity/src/Resources/assets/js/UI/components/header-sidebar.vue new file mode 100644 index 000000000..89af89328 --- /dev/null +++ b/packages/Webkul/Velocity/src/Resources/assets/js/UI/components/header-sidebar.vue @@ -0,0 +1,29 @@ + + + diff --git a/packages/Webkul/Velocity/src/Resources/assets/js/UI/components/header-wishlist-with-badge.vue b/packages/Webkul/Velocity/src/Resources/assets/js/UI/components/header-wishlist-with-badge.vue new file mode 100644 index 000000000..7269297c7 --- /dev/null +++ b/packages/Webkul/Velocity/src/Resources/assets/js/UI/components/header-wishlist-with-badge.vue @@ -0,0 +1,49 @@ + + + diff --git a/packages/Webkul/Velocity/src/Resources/assets/js/UI/components/hot-categories.vue b/packages/Webkul/Velocity/src/Resources/assets/js/UI/components/hot-categories.vue new file mode 100644 index 000000000..2ec9f9ed5 --- /dev/null +++ b/packages/Webkul/Velocity/src/Resources/assets/js/UI/components/hot-categories.vue @@ -0,0 +1,19 @@ + + + diff --git a/packages/Webkul/Velocity/src/Resources/assets/js/UI/components/image-logo.vue b/packages/Webkul/Velocity/src/Resources/assets/js/UI/components/image-logo.vue new file mode 100644 index 000000000..e7ed80665 --- /dev/null +++ b/packages/Webkul/Velocity/src/Resources/assets/js/UI/components/image-logo.vue @@ -0,0 +1,16 @@ + + + diff --git a/packages/Webkul/Velocity/src/Resources/assets/js/UI/components/image-search.vue b/packages/Webkul/Velocity/src/Resources/assets/js/UI/components/image-search.vue new file mode 100644 index 000000000..3f8e85fa6 --- /dev/null +++ b/packages/Webkul/Velocity/src/Resources/assets/js/UI/components/image-search.vue @@ -0,0 +1,164 @@ + + + diff --git a/packages/Webkul/Velocity/src/Resources/assets/js/UI/components/mini-cart-button.vue b/packages/Webkul/Velocity/src/Resources/assets/js/UI/components/mini-cart-button.vue new file mode 100644 index 000000000..1a3d31d58 --- /dev/null +++ b/packages/Webkul/Velocity/src/Resources/assets/js/UI/components/mini-cart-button.vue @@ -0,0 +1,42 @@ + + + diff --git a/packages/Webkul/Velocity/src/Resources/assets/js/UI/components/mini-cart.vue b/packages/Webkul/Velocity/src/Resources/assets/js/UI/components/mini-cart.vue index ca0a7af54..cfbe86bfe 100644 --- a/packages/Webkul/Velocity/src/Resources/assets/js/UI/components/mini-cart.vue +++ b/packages/Webkul/Velocity/src/Resources/assets/js/UI/components/mini-cart.vue @@ -1,37 +1,63 @@ diff --git a/packages/Webkul/Velocity/src/Resources/assets/js/UI/components/overlay-loader.vue b/packages/Webkul/Velocity/src/Resources/assets/js/UI/components/overlay-loader.vue new file mode 100644 index 000000000..aebb792b7 --- /dev/null +++ b/packages/Webkul/Velocity/src/Resources/assets/js/UI/components/overlay-loader.vue @@ -0,0 +1,19 @@ + + + + + diff --git a/packages/Webkul/Velocity/src/Resources/assets/js/UI/components/popular-categories.vue b/packages/Webkul/Velocity/src/Resources/assets/js/UI/components/popular-categories.vue new file mode 100644 index 000000000..2e6be464f --- /dev/null +++ b/packages/Webkul/Velocity/src/Resources/assets/js/UI/components/popular-categories.vue @@ -0,0 +1,19 @@ + + + diff --git a/packages/Webkul/Velocity/src/Resources/assets/js/UI/components/product-card.vue b/packages/Webkul/Velocity/src/Resources/assets/js/UI/components/product-card.vue index cd9b1297b..812ed4fbc 100644 --- a/packages/Webkul/Velocity/src/Resources/assets/js/UI/components/product-card.vue +++ b/packages/Webkul/Velocity/src/Resources/assets/js/UI/components/product-card.vue @@ -59,7 +59,7 @@ :title="product.name" :href="`${baseUrl}/${product.slug}`"> - {{ product.name | truncate }} + {{ product.name }} diff --git a/packages/Webkul/Velocity/src/Resources/assets/js/UI/components/product-collections.vue b/packages/Webkul/Velocity/src/Resources/assets/js/UI/components/product-collections.vue index c970169ff..bbb5253cc 100644 --- a/packages/Webkul/Velocity/src/Resources/assets/js/UI/components/product-collections.vue +++ b/packages/Webkul/Velocity/src/Resources/assets/js/UI/components/product-collections.vue @@ -51,7 +51,7 @@ props: { count: { type: String, - default: 10 + default: '10' }, productId: { type: String, diff --git a/packages/Webkul/Velocity/src/Resources/assets/js/UI/components/quantity-changer.vue b/packages/Webkul/Velocity/src/Resources/assets/js/UI/components/quantity-changer.vue new file mode 100644 index 000000000..bb27305dd --- /dev/null +++ b/packages/Webkul/Velocity/src/Resources/assets/js/UI/components/quantity-changer.vue @@ -0,0 +1,96 @@ + + + diff --git a/packages/Webkul/Velocity/src/Resources/assets/js/app-core.js b/packages/Webkul/Velocity/src/Resources/assets/js/app-core.js new file mode 100755 index 000000000..b223fbe0e --- /dev/null +++ b/packages/Webkul/Velocity/src/Resources/assets/js/app-core.js @@ -0,0 +1,93 @@ +/** + * Main imports. + */ +import Vue from 'vue'; +import axios from 'axios'; + +/** + * Helper functions. + */ +import { + getBaseUrl, + isMobile, + loadDynamicScript, + showAlert, + removeTrailingSlash +} from './app-helpers'; + +/** + * Vue prototype. + */ +Vue.prototype.$http = axios; + +/** + * Window assignation. + */ +window.Vue = Vue; + +window.eventBus = new Vue(); + +window.axios = axios; + +window.jQuery = window.$ = require('jquery'); + +window.BootstrapSass = require('bootstrap-sass'); + +window.getBaseUrl = getBaseUrl; + +window.isMobile = isMobile; + +window.loadDynamicScript = loadDynamicScript; + +window.showAlert = showAlert; + +/** + * Dynamic loading for mobile. + */ +$(function() { + /** + * Base url. + */ + let baseUrl = getBaseUrl(); + + /** + * Velocity JS path. Just make sure if you are renaming + * file then update this path also for mobile. + */ + let velocityJSPath = 'themes/velocity/assets/js/velocity.js'; + + if ( + isMobile() && + removeTrailingSlash(baseUrl) === + removeTrailingSlash(window.location.href) + ) { + /** + * Event for mobile to check the user interaction for the homepage. In mobile, + * if your viewport is having dynamic content then, feel free to override this. + * Else it is recommended to have some, static content in the viewport as the + * first impression to reduce LCP. + */ + document.addEventListener( + 'touchstart', + function dynamicScript() { + window.scrollTo(0, 0); + + document.body.style.overflow = 'hidden'; + + loadDynamicScript(`${baseUrl}/${velocityJSPath}`, () => { + window.scrollTo(0, 0); + + document.body.style.overflow = ''; + + this.removeEventListener('touchstart', dynamicScript); + }); + }, + false + ); + } else { + /** + * Else leave it default as previous. + */ + loadDynamicScript(`${baseUrl}/${velocityJSPath}`, () => {}); + } +}); diff --git a/packages/Webkul/Velocity/src/Resources/assets/js/app-helpers.js b/packages/Webkul/Velocity/src/Resources/assets/js/app-helpers.js new file mode 100644 index 000000000..8380049cd --- /dev/null +++ b/packages/Webkul/Velocity/src/Resources/assets/js/app-helpers.js @@ -0,0 +1,49 @@ +export function getBaseUrl() { + return document.querySelector('meta[name="base-url"]').content; +} + +export function isMobile() { + if ( + /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i | + /mobi/i.test(navigator.userAgent) + ) { + return true; + } + + return false; +} + +export function loadDynamicScript(src, onScriptLoaded) { + let dynamicScript = document.createElement('script'); + + dynamicScript.setAttribute('src', src); + + document.body.appendChild(dynamicScript); + + dynamicScript.addEventListener('load', onScriptLoaded, false); +} + +export function showAlert(messageType, messageLabel, message) { + if (messageType && message !== '') { + let alertId = Math.floor(Math.random() * 1000); + + let html = `
+ × + ${ + messageLabel ? messageLabel + '!' : '' + } ${message}. +
`; + + $('#alert-container') + .append(html) + .ready(() => { + window.setTimeout(() => { + $(`#alert-container #${alertId}`).remove(); + }, 5000); + }); + } +} + +export function removeTrailingSlash(site) { + return site.replace(/\/$/, ''); +} diff --git a/packages/Webkul/Velocity/src/Resources/assets/js/app.js b/packages/Webkul/Velocity/src/Resources/assets/js/app.js old mode 100755 new mode 100644 index 9c8d398a7..a04e0e7da --- a/packages/Webkul/Velocity/src/Resources/assets/js/app.js +++ b/packages/Webkul/Velocity/src/Resources/assets/js/app.js @@ -1,140 +1,169 @@ -import Vue from 'vue'; -import accounting from 'accounting'; +/** + * Main imports. + */ +import Accounting from 'accounting'; +import VeeValidate from 'vee-validate'; import VueCarousel from 'vue-carousel'; -import VueToast from 'vue-toast-notification'; -import 'vue-toast-notification/dist/index.css'; -import de from 'vee-validate/dist/locale/de'; +import 'lazysizes'; + +/** + * Lang imports. + */ import ar from 'vee-validate/dist/locale/ar'; +import de from 'vee-validate/dist/locale/de'; import fa from 'vee-validate/dist/locale/fa'; import fr from 'vee-validate/dist/locale/fr'; import nl from 'vee-validate/dist/locale/nl'; import tr from 'vee-validate/dist/locale/tr'; -import VeeValidate, { Validator } from 'vee-validate'; -import axios from 'axios'; -import 'lazysizes'; -window.axios = axios; -window.VeeValidate = VeeValidate; -window.jQuery = window.$ = require("jquery"); -window.BootstrapSass = require("bootstrap-sass"); - -Vue.use(VueToast); +/** + * Vue plugins. + */ Vue.use(VueCarousel); Vue.use(BootstrapSass); -Vue.prototype.$http = axios; - Vue.use(VeeValidate, { dictionary: { ar: ar, de: de, - fa: fa, - fr: fr, - nl: nl, - tr: tr, + fa: fa, + fr: fr, + nl: nl, + tr: tr } }); -Vue.filter('currency', function (value, argument) { - return accounting.formatMoney(value, argument); -}) +/** + * Filters. + */ +Vue.filter('currency', function(value, argument) { + return Accounting.formatMoney(value, argument); +}); -window.Vue = Vue; -window.Carousel = VueCarousel; - -// UI components -Vue.component("vue-slider", require("vue-slider-component")); +/** + * Global components. + **/ +Vue.component('vue-slider', require('vue-slider-component')); +Vue.component('mini-cart-button', require('./UI/components/mini-cart-button')); Vue.component('mini-cart', require('./UI/components/mini-cart')); Vue.component('modal-component', require('./UI/components/modal')); -Vue.component("add-to-cart", require("./UI/components/add-to-cart")); +Vue.component('add-to-cart', require('./UI/components/add-to-cart')); Vue.component('star-ratings', require('./UI/components/star-rating')); Vue.component('quantity-btn', require('./UI/components/quantity-btn')); +Vue.component('quantity-changer', require('./UI/components/quantity-changer')); Vue.component('proceed-to-checkout', require('./UI/components/proceed-to-checkout')); +Vue.component('compare-component-with-badge', require('./UI/components/header-compare-with-badge')); +Vue.component('searchbar-component', require('./UI/components/header-searchbar')); +Vue.component('wishlist-component-with-badge', require('./UI/components/header-wishlist-with-badge')); +Vue.component('mobile-header', require('./UI/components/header-mobile')); +Vue.component('sidebar-header', require('./UI/components/header-sidebar')); +Vue.component('right-side-header', require('./UI/components/header-right-side')); Vue.component('sidebar-component', require('./UI/components/sidebar')); -Vue.component("product-card", require("./UI/components/product-card")); -Vue.component("wishlist-component", require("./UI/components/wishlist")); +Vue.component('product-card', require('./UI/components/product-card')); +Vue.component('wishlist-component', require('./UI/components/wishlist')); Vue.component('carousel-component', require('./UI/components/carousel')); +Vue.component('slider-component', require('./UI/components/banners')); Vue.component('child-sidebar', require('./UI/components/child-sidebar')); Vue.component('card-list-header', require('./UI/components/card-header')); +Vue.component('logo-component', require('./UI/components/image-logo')); Vue.component('magnify-image', require('./UI/components/image-magnifier')); +Vue.component('image-search-component', require('./UI/components/image-search')); Vue.component('compare-component', require('./UI/components/product-compare')); -Vue.component("shimmer-component", require("./UI/components/shimmer-component")); +Vue.component('shimmer-component', require('./UI/components/shimmer-component')); Vue.component('responsive-sidebar', require('./UI/components/responsive-sidebar')); Vue.component('product-quick-view', require('./UI/components/product-quick-view')); Vue.component('product-quick-view-btn', require('./UI/components/product-quick-view-btn')); Vue.component('recently-viewed', require('./UI/components/recently-viewed')); Vue.component('product-collections', require('./UI/components/product-collections')); Vue.component('hot-category', require('./UI/components/hot-category')); +Vue.component('hot-categories', require('./UI/components/hot-categories')); Vue.component('popular-category', require('./UI/components/popular-category')); +Vue.component('popular-categories', require('./UI/components/popular-categories')); +Vue.component('velocity-overlay-loader', require('./UI/components/overlay-loader')); +Vue.component('vnode-injector', { + functional: true, + props: ['nodes'], + render(h, { props }) { + return props.nodes; + } +}); -window.eventBus = new Vue(); - -$(document).ready(function () { - // define a mixin object +/** + * Start from here. + **/ +$(function() { + /** + * Define a mixin object. + */ Vue.mixin(require('./UI/components/trans')); Vue.mixin({ - data: function () { + data: function() { return { - 'imageObserver': null, - 'navContainer': false, - 'headerItemsCount': 0, - 'sharedRootCategories': [], - 'responsiveSidebarTemplate': '', - 'responsiveSidebarKey': Math.random(), - 'baseUrl': document.querySelector("script[src$='velocity.js']").getAttribute('baseUrl') - } + imageObserver: null, + navContainer: false, + headerItemsCount: 0, + sharedRootCategories: [], + responsiveSidebarTemplate: '', + responsiveSidebarKey: Math.random(), + baseUrl: getBaseUrl(), + }; }, methods: { - redirect: function (route) { - route ? window.location.href = route : ''; + redirect: function(route) { + route ? (window.location.href = route) : ''; }, - debounceToggleSidebar: function (id, {target}, type) { - // setTimeout(() => { - this.toggleSidebar(id, target, type); - // }, 500); + debounceToggleSidebar: function(id, { target }, type) { + this.toggleSidebar(id, target, type); }, - toggleSidebar: function (id, {target}, type) { + toggleSidebar: function(id, { target }, type) { if ( - Array.from(target.classList)[0] == "main-category" - || Array.from(target.parentElement.classList)[0] == "main-category" + Array.from(target.classList)[0] == 'main-category' || + Array.from(target.parentElement.classList)[0] == + 'main-category' ) { let sidebar = $(`#sidebar-level-${id}`); if (sidebar && sidebar.length > 0) { - if (type == "mouseover") { + if (type == 'mouseover') { this.show(sidebar); - } else if (type == "mouseout") { + } else if (type == 'mouseout') { this.hide(sidebar); } } } else if ( - Array.from(target.classList)[0] == "category" - || Array.from(target.classList)[0] == "category-icon" - || Array.from(target.classList)[0] == "category-title" - || Array.from(target.classList)[0] == "category-content" - || Array.from(target.classList)[0] == "rango-arrow-right" + Array.from(target.classList)[0] == 'category' || + Array.from(target.classList)[0] == 'category-icon' || + Array.from(target.classList)[0] == 'category-title' || + Array.from(target.classList)[0] == 'category-content' || + Array.from(target.classList)[0] == 'rango-arrow-right' ) { let parentItem = target.closest('li'); if (target.id || parentItem.id.match('category-')) { - let subCategories = $(`#${target.id ? target.id : parentItem.id} .sub-categories`); + let subCategories = $( + `#${ + target.id ? target.id : parentItem.id + } .sub-categories` + ); if (subCategories && subCategories.length > 0) { let subCategories1 = Array.from(subCategories)[0]; subCategories1 = $(subCategories1); - if (type == "mouseover") { + if (type == 'mouseover') { this.show(subCategories1); - let sidebarChild = subCategories1.find('.sidebar'); + let sidebarChild = subCategories1.find( + '.sidebar' + ); this.show(sidebarChild); - } else if (type == "mouseout") { + } else if (type == 'mouseout') { this.hide(subCategories1); } } else { - if (type == "mouseout") { + if (type == 'mouseout') { let sidebar = $(`#${id}`); sidebar.hide(); } @@ -143,57 +172,53 @@ $(document).ready(function () { } }, - show: function (element) { + show: function(element) { element.show(); - element.mouseleave(({target}) => { + element.mouseleave(({ target }) => { $(target.closest('.sidebar')).hide(); }); }, - hide: function (element) { + hide: function(element) { element.hide(); }, - toggleButtonDisability ({event, actionType}) { + toggleButtonDisability({ event, actionType }) { let button = event.target.querySelector('button[type=submit]'); - button ? button.disabled = actionType : ''; + button ? (button.disabled = actionType) : ''; }, - onSubmit: function (event) { - this.toggleButtonDisability({event, actionType: true}); + onSubmit: function(event) { + this.toggleButtonDisability({ event, actionType: true }); - if(typeof tinyMCE !== 'undefined') - tinyMCE.triggerSave(); + if (typeof tinyMCE !== 'undefined') tinyMCE.triggerSave(); this.$validator.validateAll().then(result => { if (result) { event.target.submit(); } else { - this.toggleButtonDisability({event, actionType: false}); + this.toggleButtonDisability({ + event, + actionType: false + }); - eventBus.$emit('onFormError') + eventBus.$emit('onFormError'); } }); }, - isMobile: function () { - if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i|/mobi/i.test(navigator.userAgent)) { - if (this.isMaxWidthCrossInLandScape()) { - return false; - } - return true - } else { - return false - } + isMobile: function() { + return isMobile(); }, - isMaxWidthCrossInLandScape: function() { - return window.innerWidth > 900; + loadDynamicScript: function(src, onScriptLoaded) { + loadDynamicScript(src, onScriptLoaded); }, - getDynamicHTML: function (input) { - var _staticRenderFns; + getDynamicHTML: function(input) { + let _staticRenderFns, output; + const { render, staticRenderFns } = Vue.compile(input); if (this.$options.staticRenderFns.length > 0) { @@ -203,7 +228,7 @@ $(document).ready(function () { } try { - var output = render.call(this, this.$createElement); + output = render.call(this, this.$createElement); } catch (exception) { console.log(this.__('error.something_went_wrong')); } @@ -213,7 +238,7 @@ $(document).ready(function () { return output; }, - getStorageValue: function (key) { + getStorageValue: function(key) { let value = window.localStorage.getItem(key); if (value) { @@ -223,92 +248,75 @@ $(document).ready(function () { return value; }, - setStorageValue: function (key, value) { + setStorageValue: function(key, value) { window.localStorage.setItem(key, JSON.stringify(value)); return true; - }, + } } }); const app = new Vue({ - el: "#app", - VueToast, + el: '#app', - data: function () { + data: function() { return { + loading: false, modalIds: {}, miniCartKey: 0, quickView: false, productDetails: [], - showPageLoader: false, - } + }; }, - created: function () { - setTimeout(() => { - document.body.classList.remove("modal-open"); - }, 0); - - window.addEventListener('click', () => { - let modals = document.getElementsByClassName('sensitive-modal'); - - Array.from(modals).forEach(modal => { - modal.classList.add('hide'); - }); - }); - }, - - mounted: function () { - setTimeout(() => { - this.addServerErrors(); - }, 0); - - document.body.style.display = "block"; + mounted: function() { this.$validator.localize(document.documentElement.lang); + this.addServerErrors(); this.loadCategories(); this.addIntersectionObserver(); }, methods: { - onSubmit: function (event) { - this.toggleButtonDisability({event, actionType: true}); + onSubmit: function(event) { + this.toggleButtonDisability({ event, actionType: true }); - if(typeof tinyMCE !== 'undefined') - tinyMCE.triggerSave(); + if (typeof tinyMCE !== 'undefined') tinyMCE.triggerSave(); this.$validator.validateAll().then(result => { if (result) { event.target.submit(); } else { - this.toggleButtonDisability({event, actionType: false}); + this.toggleButtonDisability({ + event, + actionType: false + }); - eventBus.$emit('onFormError') + eventBus.$emit('onFormError'); } }); }, - toggleButtonDisable (value) { - var buttons = document.getElementsByTagName("button"); + toggleButtonDisable(value) { + let buttons = document.getElementsByTagName('button'); - for (var i = 0; i < buttons.length; i++) { + for (let i = 0; i < buttons.length; i++) { buttons[i].disabled = value; } }, - addServerErrors: function (scope = null) { - for (var key in serverErrors) { - var inputNames = []; + addServerErrors: function(scope = null) { + for (let key in serverErrors) { + let inputNames = []; key.split('.').forEach(function(chunk, index) { - if(index) { - inputNames.push('[' + chunk + ']') + if (index) { + inputNames.push('[' + chunk + ']'); } else { - inputNames.push(chunk) + inputNames.push(chunk); } - }) + }); - var inputName = inputNames.join(''); + let inputName = inputNames.join(''); const field = this.$validator.fields.find({ name: inputName, @@ -326,61 +334,62 @@ $(document).ready(function () { } }, - addFlashMessages: function () { + addFlashMessages: function() { if (window.flashMessages.alertMessage) window.alert(window.flashMessages.alertMessage); }, - showModal: function (id) { + showModal: function(id) { this.$set(this.modalIds, id, true); }, - loadCategories: function () { - this.$http.get(`${this.baseUrl}/categories`) - .then(response => { - this.sharedRootCategories = response.data.categories; - $(``).appendTo("head"); - }) - .catch(error => { - console.log('failed to load categories'); - }) - }, - - addIntersectionObserver: function () { - this.imageObserver = new IntersectionObserver((entries, imgObserver) => { - entries.forEach((entry) => { - if (entry.isIntersecting) { - const lazyImage = entry.target - lazyImage.src = lazyImage.dataset.src - } + loadCategories: function() { + this.$http + .get(`${this.baseUrl}/categories`) + .then(response => { + this.sharedRootCategories = response.data.categories; + $( + `` + ).appendTo('head'); }) - }); + .catch(error => { + console.log('failed to load categories'); + }); }, - showLoader: function () { - $('#loader').show(); - $('.overlay-loader').show(); - - document.body.classList.add("modal-open"); + addIntersectionObserver: function() { + this.imageObserver = new IntersectionObserver( + (entries, imgObserver) => { + entries.forEach(entry => { + if (entry.isIntersecting) { + const lazyImage = entry.target; + lazyImage.src = lazyImage.dataset.src; + } + }); + } + ); }, - hideLoader: function () { - $('#loader').hide(); - $('.overlay-loader').hide(); + showLoader: function() { + this.loading = true; + }, - document.body.classList.remove("modal-open"); - } + hideLoader: function() { + this.loading = false; + }, + + togglePopup: function() { + let accountModal = $('#account-modal'); + + let modal = $('#cart-modal-content'); + + if (modal) modal.addClass('hide'); + + accountModal.toggleClass('hide'); + }, } }); window.app = app; - - // for compilation of html coming from server - Vue.component('vnode-injector', { - functional: true, - props: ['nodes'], - render(h, {props}) { - return props.nodes; - } - }); }); diff --git a/packages/Webkul/Velocity/src/Resources/assets/sass/components/app.scss b/packages/Webkul/Velocity/src/Resources/assets/sass/components/app.scss index 4ca01fc2a..12bf7f365 100755 --- a/packages/Webkul/Velocity/src/Resources/assets/sass/components/app.scss +++ b/packages/Webkul/Velocity/src/Resources/assets/sass/components/app.scss @@ -1746,9 +1746,15 @@ min-height: 65vh; position: relative; } + .main-container-wrapper { + /** + * Sticky header for logo and search component. Just make sure + * this class should have height otherwise CLS score will reduce. + */ .sticky-header { top: 0px; + height: 55px; z-index: 100; position: sticky; background: white; @@ -1759,7 +1765,6 @@ } } - .search-container { padding: 30px 20px; @@ -2223,9 +2228,8 @@ position: relative; .VueCarousel-pagination { - bottom: 10px; - position: absolute; - + display: none; + button:focus, button:active { outline: none; diff --git a/packages/Webkul/Velocity/src/Resources/assets/sass/components/home.scss b/packages/Webkul/Velocity/src/Resources/assets/sass/components/home.scss index 60d85918e..e03f2bf51 100644 --- a/packages/Webkul/Velocity/src/Resources/assets/sass/components/home.scss +++ b/packages/Webkul/Velocity/src/Resources/assets/sass/components/home.scss @@ -1,6 +1,4 @@ body { - display: none; - overflow-x: hidden; scroll-behavior: smooth; .container-margin { @@ -463,8 +461,6 @@ header #search-form > *:focus { .main-content-wrapper { @extend .fs14; - margin: 0; - margin-bottom: 60px; display: inline-block; > .row { @@ -714,6 +710,10 @@ body::after { max-width: 1300px !important; } +.slider-container { + min-height: 400px; +} + .remove-padding-margin { width: 100% !important; margin: 0px !important; diff --git a/packages/Webkul/Velocity/src/Resources/assets/sass/components/media.scss b/packages/Webkul/Velocity/src/Resources/assets/sass/components/media.scss index 148ab9d51..7bde543ed 100644 --- a/packages/Webkul/Velocity/src/Resources/assets/sass/components/media.scss +++ b/packages/Webkul/Velocity/src/Resources/assets/sass/components/media.scss @@ -46,6 +46,10 @@ } } } + + .slider-container { + min-height: 290px; + } } /* medium devices */ @@ -143,7 +147,7 @@ .badge-wrapper, .badge-container { - top: -2px; + top: -32px; left: -12px; position: relative; @@ -987,6 +991,10 @@ position: absolute; display: inline-block; } + + .slider-container { + min-height: 220px; + } } /* medium devices */ @@ -1057,6 +1065,10 @@ .product-card-new { max-width: 18rem; } + + .slider-container { + min-height: 220px; + } } /* small devices */ @@ -1069,6 +1081,22 @@ position: unset; top: unset; } + + .slider-container { + min-height: 100px; + } + + .advertisement-four-container { + min-height: 992px; + + .advertisement-container-block { + min-height: 425px; + } + + .offers-ct-panel { + min-height: 425px; + } + } } /* very small devices */ @@ -1085,4 +1113,20 @@ .quick-view-in-list { display: none; } + + .slider-container { + min-height: 100px; + } + + .advertisement-four-container { + min-height: 992px; + + .advertisement-container-block { + min-height: 425px; + } + + .offers-ct-panel { + min-height: 425px; + } + } } \ No newline at end of file diff --git a/packages/Webkul/Velocity/src/Resources/assets/sass/components/shared.scss b/packages/Webkul/Velocity/src/Resources/assets/sass/components/shared.scss index 046a036f0..95c83b731 100644 --- a/packages/Webkul/Velocity/src/Resources/assets/sass/components/shared.scss +++ b/packages/Webkul/Velocity/src/Resources/assets/sass/components/shared.scss @@ -890,11 +890,12 @@ button[disabled] { } .modal-parent { + top: 0; width: 100%; height: 100%; - z-index: 5000; position: fixed; - background: rgba(255, 255, 255, 0.9); + background: rgba(256, 256, 256, 0.9); + z-index: 125; } .compare-icon, diff --git a/packages/Webkul/Velocity/src/Resources/assets/sass/static/material-icons.scss b/packages/Webkul/Velocity/src/Resources/assets/sass/static/material-icons.scss index f8083b027..6175fbd40 100644 --- a/packages/Webkul/Velocity/src/Resources/assets/sass/static/material-icons.scss +++ b/packages/Webkul/Velocity/src/Resources/assets/sass/static/material-icons.scss @@ -44,6 +44,8 @@ } .material-icons { + max-width: 30px; + overflow: hidden; font-family: 'Material Icons'; font-weight: normal; font-style: normal; @@ -60,6 +62,8 @@ } .material-icons-outlined { + max-width: 30px; + overflow: hidden; font-family: 'Material Icons Outlined'; font-weight: normal; font-style: normal; diff --git a/packages/Webkul/Velocity/src/Resources/lang/ar/app.php b/packages/Webkul/Velocity/src/Resources/lang/ar/app.php index 6b3d459a7..0b8dfcd56 100644 --- a/packages/Webkul/Velocity/src/Resources/lang/ar/app.php +++ b/packages/Webkul/Velocity/src/Resources/lang/ar/app.php @@ -301,7 +301,10 @@ return [ 'wishlist' => [ 'add-wishlist-text' => 'إضافة منتج إلى قائمة الأمنيات', 'remove-wishlist-text' => 'أزل المنتج من قائمة الأمنيات' - ] + ], + 'overlay-loader' => [ + 'message' => 'في تقدم', + ], ], 'responsive' => [ diff --git a/packages/Webkul/Velocity/src/Resources/lang/de/app.php b/packages/Webkul/Velocity/src/Resources/lang/de/app.php index be3068263..0f366dde9 100644 --- a/packages/Webkul/Velocity/src/Resources/lang/de/app.php +++ b/packages/Webkul/Velocity/src/Resources/lang/de/app.php @@ -301,7 +301,10 @@ return [ 'wishlist' => [ 'add-wishlist-text' => 'Produkt zur Wunschliste hinzufügen', 'remove-wishlist-text' => 'Produkt von der Wunschliste entfernen' - ] + ], + 'overlay-loader' => [ + 'message' => 'Im Gange', + ], ], 'responsive' => [ diff --git a/packages/Webkul/Velocity/src/Resources/lang/en/app.php b/packages/Webkul/Velocity/src/Resources/lang/en/app.php index 617b41cc8..031dc5ef2 100644 --- a/packages/Webkul/Velocity/src/Resources/lang/en/app.php +++ b/packages/Webkul/Velocity/src/Resources/lang/en/app.php @@ -301,7 +301,10 @@ return [ 'wishlist' => [ 'add-wishlist-text' => 'Add product to wishlist', 'remove-wishlist-text' => 'Remove product from wishlist' - ] + ], + 'overlay-loader' => [ + 'message' => 'In Progress', + ], ], 'responsive' => [ diff --git a/packages/Webkul/Velocity/src/Resources/lang/es/app.php b/packages/Webkul/Velocity/src/Resources/lang/es/app.php index ab47ea694..776e54886 100644 --- a/packages/Webkul/Velocity/src/Resources/lang/es/app.php +++ b/packages/Webkul/Velocity/src/Resources/lang/es/app.php @@ -301,7 +301,10 @@ return [ 'wishlist' => [ 'add-wishlist-text' => 'Agregar producto a la lista de deseos', 'remove-wishlist-text' => 'Eliminar producto de la lista de deseos' - ] + ], + 'overlay-loader' => [ + 'message' => 'En curso', + ], ], 'responsive' => [ diff --git a/packages/Webkul/Velocity/src/Resources/lang/fa/app.php b/packages/Webkul/Velocity/src/Resources/lang/fa/app.php index 84f440687..674793c90 100644 --- a/packages/Webkul/Velocity/src/Resources/lang/fa/app.php +++ b/packages/Webkul/Velocity/src/Resources/lang/fa/app.php @@ -300,7 +300,10 @@ return [ 'wishlist' => [ 'add-wishlist-text' => 'محصول را به لیست دلخواه اضافه کنید', 'remove-wishlist-text' => 'محصول را از لیست دلخواه حذف کنید' - ] + ], + 'overlay-loader' => [ + 'message' => 'در حال پیش رفت', + ], ], 'responsive' => [ diff --git a/packages/Webkul/Velocity/src/Resources/lang/fr/app.php b/packages/Webkul/Velocity/src/Resources/lang/fr/app.php index 34587f120..e6f9b9a2e 100644 --- a/packages/Webkul/Velocity/src/Resources/lang/fr/app.php +++ b/packages/Webkul/Velocity/src/Resources/lang/fr/app.php @@ -322,6 +322,10 @@ return [ 'add-wishlist-text' => 'Ajouter un produit à la liste de souhaits', 'remove-wishlist-text' => 'Supprimer le produit de la liste de souhaits', ], + + 'overlay-loader' => [ + 'message' => 'En cours', + ], ], 'responsive' => [ diff --git a/packages/Webkul/Velocity/src/Resources/lang/it/app.php b/packages/Webkul/Velocity/src/Resources/lang/it/app.php index 2030bcc0c..e9223c83f 100644 --- a/packages/Webkul/Velocity/src/Resources/lang/it/app.php +++ b/packages/Webkul/Velocity/src/Resources/lang/it/app.php @@ -303,7 +303,10 @@ return [ 'wishlist' => [ 'add-wishlist-text' => 'Aggiungi prodotto a wishlist', 'remove-wishlist-text' => 'Rimuovi prodotti da wishlist' - ] + ], + 'overlay-loader' => [ + 'message' => 'In corso', + ], ], 'responsive' => [ diff --git a/packages/Webkul/Velocity/src/Resources/lang/ja/app.php b/packages/Webkul/Velocity/src/Resources/lang/ja/app.php index 2a1ef33ae..4488d03a3 100644 --- a/packages/Webkul/Velocity/src/Resources/lang/ja/app.php +++ b/packages/Webkul/Velocity/src/Resources/lang/ja/app.php @@ -299,7 +299,10 @@ return [ 'wishlist' => [ 'add-wishlist-text' => '製品をウィッシュリストに追加', 'remove-wishlist-text' => 'ウィッシュリストから商品を削除', - ] + ], + 'overlay-loader' => [ + 'message' => '進行中', + ], ], 'responsive' => [ diff --git a/packages/Webkul/Velocity/src/Resources/lang/nl/app.php b/packages/Webkul/Velocity/src/Resources/lang/nl/app.php index dc8eb36d5..64d74baa3 100644 --- a/packages/Webkul/Velocity/src/Resources/lang/nl/app.php +++ b/packages/Webkul/Velocity/src/Resources/lang/nl/app.php @@ -301,7 +301,10 @@ return [ 'wishlist' => [ 'add-wishlist-text' => 'Toevoegen aan verlanglijst', 'remove-wishlist-text' => 'Remove product from wishlist' - ] + ], + 'overlay-loader' => [ + 'message' => 'Bezig', + ], ], 'responsive' => [ diff --git a/packages/Webkul/Velocity/src/Resources/lang/pl/app.php b/packages/Webkul/Velocity/src/Resources/lang/pl/app.php index 1d68ed36a..41403ae14 100644 --- a/packages/Webkul/Velocity/src/Resources/lang/pl/app.php +++ b/packages/Webkul/Velocity/src/Resources/lang/pl/app.php @@ -299,7 +299,10 @@ return [ 'wishlist' => [ 'add-wishlist-text' => 'Dodaj produkt do listy wyboru', 'remove-wishlist-text' => 'Usuń produkt z listy wyboru' - ] + ], + 'overlay-loader' => [ + 'message' => 'W trakcie', + ], ], 'responsive' => [ diff --git a/packages/Webkul/Velocity/src/Resources/lang/pt_BR/app.php b/packages/Webkul/Velocity/src/Resources/lang/pt_BR/app.php index 48d9b6515..22f48ae90 100644 --- a/packages/Webkul/Velocity/src/Resources/lang/pt_BR/app.php +++ b/packages/Webkul/Velocity/src/Resources/lang/pt_BR/app.php @@ -303,6 +303,9 @@ return [ 'add-wishlist-text' => 'Adicionar produto à lista de desejos', 'remove-wishlist-text' => 'Remover produto da lista de desejos', ], + 'overlay-loader' => [ + 'message' => 'Em progresso', + ], ], 'responsive' => [ diff --git a/packages/Webkul/Velocity/src/Resources/lang/tr/app.php b/packages/Webkul/Velocity/src/Resources/lang/tr/app.php index 81b8eaef5..5d3afd22b 100644 --- a/packages/Webkul/Velocity/src/Resources/lang/tr/app.php +++ b/packages/Webkul/Velocity/src/Resources/lang/tr/app.php @@ -298,7 +298,10 @@ return [ 'wishlist' => [ 'add-wishlist-text' => 'Ürünü dilek listenize ekleyin', 'remove-wishlist-text' => 'Ürünü dilek listenizden kaldırın' - ] + ], + 'overlay-loader' => [ + 'message' => 'Devam etmekte', + ], ], 'responsive' => [ diff --git a/packages/Webkul/Velocity/src/Resources/views/admin/category/create.blade.php b/packages/Webkul/Velocity/src/Resources/views/admin/category/create.blade.php index 62b1526e2..587efe206 100644 --- a/packages/Webkul/Velocity/src/Resources/views/admin/category/create.blade.php +++ b/packages/Webkul/Velocity/src/Resources/views/admin/category/create.blade.php @@ -47,7 +47,7 @@ @endforeach - @{{ errors.first('category_id') }} +
@@ -57,7 +57,7 @@ - @{{ errors.first('icon') }} +
@@ -67,7 +67,7 @@ - @{{ errors.first('tooltip') }} +
@@ -80,7 +80,7 @@ {{ __('velocity::app.admin.category.inactive') }} - @{{ errors.first('status') }} +
{!! view_render_event('bagisto.admin.category.create_form_accordian.general.content.after') !!} diff --git a/packages/Webkul/Velocity/src/Resources/views/admin/category/edit.blade.php b/packages/Webkul/Velocity/src/Resources/views/admin/category/edit.blade.php index 5871c66e7..bfce3a04a 100644 --- a/packages/Webkul/Velocity/src/Resources/views/admin/category/edit.blade.php +++ b/packages/Webkul/Velocity/src/Resources/views/admin/category/edit.blade.php @@ -48,7 +48,7 @@ @endforeach - @{{ errors.first('category_id') }} +
@@ -58,7 +58,7 @@ - @{{ errors.first('icon') }} +
@@ -68,7 +68,7 @@ - @{{ errors.first('tooltip') }} +
@@ -81,7 +81,7 @@ {{ __('velocity::app.admin.category.inactive') }} - @{{ errors.first('status') }} +
{!! view_render_event('bagisto.admin.category.edit_form_accordian.general.content.after', ['velocityCategory' => $velocityCategory]) !!} diff --git a/packages/Webkul/Velocity/src/Resources/views/admin/content/content-type/category.blade.php b/packages/Webkul/Velocity/src/Resources/views/admin/content/content-type/category.blade.php index 146949530..58152ca00 100644 --- a/packages/Webkul/Velocity/src/Resources/views/admin/content/content-type/category.blade.php +++ b/packages/Webkul/Velocity/src/Resources/views/admin/content/content-type/category.blade.php @@ -20,9 +20,7 @@ @input="$event.target.value=$event.target.value.toLowerCase()" data-vv-as=""{{ __('velocity::app.admin.contents.content.category-slug') }}"" /> - - @{{ errors.first('{!!$locale!!}[page_link]') }} - +
diff --git a/packages/Webkul/Velocity/src/Resources/views/admin/content/content-type/edit-product.blade.php b/packages/Webkul/Velocity/src/Resources/views/admin/content/content-type/edit-product.blade.php index 02ed70b80..8eb1799dd 100644 --- a/packages/Webkul/Velocity/src/Resources/views/admin/content/content-type/edit-product.blade.php +++ b/packages/Webkul/Velocity/src/Resources/views/admin/content/content-type/edit-product.blade.php @@ -20,7 +20,7 @@ @endforeach - @{{ errors.first('{!!$locale!!}[catalog_type]') }} +
diff --git a/packages/Webkul/Velocity/src/Resources/views/admin/content/content-type/link.blade.php b/packages/Webkul/Velocity/src/Resources/views/admin/content/content-type/link.blade.php index 9a97d5784..6480688bf 100644 --- a/packages/Webkul/Velocity/src/Resources/views/admin/content/content-type/link.blade.php +++ b/packages/Webkul/Velocity/src/Resources/views/admin/content/content-type/link.blade.php @@ -5,12 +5,12 @@ - @{{ errors.first('page_link') }} +
- + - @{{ errors.first('catalog_type') }} +
diff --git a/packages/Webkul/Velocity/src/Resources/views/admin/content/content-type/static.blade.php b/packages/Webkul/Velocity/src/Resources/views/admin/content/content-type/static.blade.php index d44eae558..6b66a0ff0 100644 --- a/packages/Webkul/Velocity/src/Resources/views/admin/content/content-type/static.blade.php +++ b/packages/Webkul/Velocity/src/Resources/views/admin/content/content-type/static.blade.php @@ -1,11 +1,11 @@ {!! view_render_event('bagisto.admin.content.create_form_accordian.content.static.before') !!} - +
- - - @{{ errors.first('description') }} + + +
- + {!! view_render_event('bagisto.admin.content.create_form_accordian.content.static.after') !!} \ No newline at end of file diff --git a/packages/Webkul/Velocity/src/Resources/views/admin/content/create.blade.php b/packages/Webkul/Velocity/src/Resources/views/admin/content/create.blade.php index 2569e3db1..a0cb4a5dc 100644 --- a/packages/Webkul/Velocity/src/Resources/views/admin/content/create.blade.php +++ b/packages/Webkul/Velocity/src/Resources/views/admin/content/create.blade.php @@ -44,7 +44,7 @@ {{ __('velocity::app.admin.contents.page.title') }} - @{{ errors.first('title') }} +
@@ -52,7 +52,7 @@ {{ __('velocity::app.admin.contents.page.position') }} - @{{ errors.first('position') }} +
@@ -65,7 +65,7 @@ {{ __('velocity::app.admin.contents.inactive') }} - @{{ errors.first('status') }} +
{!! view_render_event('bagisto.admin.content.create_form_accordian.page.controls.after') !!} @@ -108,7 +108,7 @@ - @{{ errors.first('custom_title') }} +
@@ -117,7 +117,7 @@ - @{{ errors.first('custom_heading') }} +
--}}
@@ -131,7 +131,7 @@ @endforeach - @{{ errors.first('content_type') }} +
diff --git a/packages/Webkul/Velocity/src/Resources/views/admin/content/edit.blade.php b/packages/Webkul/Velocity/src/Resources/views/admin/content/edit.blade.php index 5df3ce7c0..8607b6011 100644 --- a/packages/Webkul/Velocity/src/Resources/views/admin/content/edit.blade.php +++ b/packages/Webkul/Velocity/src/Resources/views/admin/content/edit.blade.php @@ -64,7 +64,7 @@ - @{{ errors.first('{!!$locale!!}[title]') }} +
@@ -72,7 +72,7 @@ {{ __('velocity::app.admin.contents.page.position') }} - @{{ errors.first('position') }} +
@@ -85,7 +85,7 @@ {{ __('velocity::app.admin.contents.active') }} - @{{ errors.first('status') }} +
{!! view_render_event('bagisto.admin.content.edit_form_accordian.page.controls.after', ['content' => $content]) !!} @@ -140,8 +140,8 @@ - @{{ errors.first('{!!$locale!!}[custom_title]') }} + v-if="errors.has('{{$locale}}[custom_title]')" + v-text="errors.first('{!!$locale!!}[custom_title]')"> @@ -161,8 +161,8 @@ - @{{ errors.first('{!!$locale!!}[custom_heading]') }} + v-if="errors.has('{{$locale}}[custom_heading]')" + v-text="errors.first('{!!$locale!!}[custom_heading]')"> --}} @@ -200,8 +200,8 @@ - @{{ errors.first('content_type') }} + v-if="errors.has('content_type')" + v-text="errors.first('content_type')"> @@ -225,8 +225,8 @@ - @{{ errors.first('{!!$locale!!}[page_link]') }} + v-if="errors.has('{{$locale}}[page_link]')" + v-text="errors.first('{!!$locale!!}[page_link]')"> @@ -272,8 +272,8 @@ - @{{ errors.first('{!!$locale!!}[description]') }} + v-if="errors.has('{{$locale}}[description]')" + v-text="errors.first('{!!$locale!!}[description]')"> diff --git a/packages/Webkul/Velocity/src/Resources/views/shop/UI/header.blade.php b/packages/Webkul/Velocity/src/Resources/views/shop/UI/header.blade.php deleted file mode 100644 index 86dede849..000000000 --- a/packages/Webkul/Velocity/src/Resources/views/shop/UI/header.blade.php +++ /dev/null @@ -1,575 +0,0 @@ -@push('scripts') - -@endpush - -@php - $cart = cart()->getCart(); - - $cartItemsCount = trans('shop::app.minicart.zero'); - - if ($cart) { - $cartItemsCount = $cart->items->count(); - } -@endphp - -@push('scripts') - -@endpush \ No newline at end of file diff --git a/packages/Webkul/Velocity/src/Resources/views/shop/UI/particals.blade.php b/packages/Webkul/Velocity/src/Resources/views/shop/UI/particals.blade.php deleted file mode 100644 index 669415dc0..000000000 --- a/packages/Webkul/Velocity/src/Resources/views/shop/UI/particals.blade.php +++ /dev/null @@ -1,475 +0,0 @@ -@push('scripts') - - - - - -@endpush - -@include('velocity::UI.header') - -@push('scripts') - - - - - - - - - - -@endpush \ No newline at end of file diff --git a/packages/Webkul/Velocity/src/Resources/views/shop/checkout/cart/index.blade.php b/packages/Webkul/Velocity/src/Resources/views/shop/checkout/cart/index.blade.php index f8ed0ca57..ca4d8dedc 100644 --- a/packages/Webkul/Velocity/src/Resources/views/shop/checkout/cart/index.blade.php +++ b/packages/Webkul/Velocity/src/Resources/views/shop/checkout/cart/index.blade.php @@ -166,7 +166,8 @@
+ quantity="{{ $item->quantity }}" + quantity-text="{{ __('shop::app.products.quantity') }}">
@@ -222,7 +223,8 @@
+ quantity="{{ $item->quantity }}" + quantity-text="{{ __('shop::app.products.quantity') }}">
diff --git a/packages/Webkul/Velocity/src/Resources/views/shop/checkout/cart/mini-cart.blade.php b/packages/Webkul/Velocity/src/Resources/views/shop/checkout/cart/mini-cart.blade.php index 223c4c80c..83478de82 100644 --- a/packages/Webkul/Velocity/src/Resources/views/shop/checkout/cart/mini-cart.blade.php +++ b/packages/Webkul/Velocity/src/Resources/views/shop/checkout/cart/mini-cart.blade.php @@ -1,11 +1,12 @@
+ subtotal-text="{{ __('shop::app.checkout.cart.cart-subtotal') }}">
\ No newline at end of file diff --git a/packages/Webkul/Velocity/src/Resources/views/shop/checkout/onepage.blade.php b/packages/Webkul/Velocity/src/Resources/views/shop/checkout/onepage.blade.php index 0e2f0e847..669569c36 100644 --- a/packages/Webkul/Velocity/src/Resources/views/shop/checkout/onepage.blade.php +++ b/packages/Webkul/Velocity/src/Resources/views/shop/checkout/onepage.blade.php @@ -9,12 +9,13 @@ @endsection @push('scripts') + + @include('shop::checkout.cart.coupon') - @endpush diff --git a/packages/Webkul/Velocity/src/Resources/views/shop/checkout/onepage/customer-info.blade.php b/packages/Webkul/Velocity/src/Resources/views/shop/checkout/onepage/customer-info.blade.php index 5d1790cda..9778ec5b0 100644 --- a/packages/Webkul/Velocity/src/Resources/views/shop/checkout/onepage/customer-info.blade.php +++ b/packages/Webkul/Velocity/src/Resources/views/shop/checkout/onepage/customer-info.blade.php @@ -72,8 +72,8 @@
- @{{ errors.first('address-form.billing[address_id]') }} + v-if="errors.has('address-form.billing[address_id]')" + v-text="errors.first('address-form.billing[address_id]')">
@@ -198,9 +198,7 @@
- - @{{ errors.first('address-form.shipping[address_id]') }} - +
diff --git a/packages/Webkul/Velocity/src/Resources/views/shop/checkout/onepage/customer-new-form.blade.php b/packages/Webkul/Velocity/src/Resources/views/shop/checkout/onepage/customer-new-form.blade.php index 92732accc..7e2557adb 100644 --- a/packages/Webkul/Velocity/src/Resources/views/shop/checkout/onepage/customer-new-form.blade.php +++ b/packages/Webkul/Velocity/src/Resources/views/shop/checkout/onepage/customer-new-form.blade.php @@ -18,9 +18,7 @@ @change="validateForm('address-form')" data-vv-as=""{{ __('shop::app.checkout.onepage.first-name') }}"" /> - - @{{ errors.first('address-form.shipping[first_name]') }} - +
@@ -38,9 +36,7 @@ @change="validateForm('address-form')" data-vv-as=""{{ __('shop::app.checkout.onepage.last-name') }}"" /> - - @{{ errors.first('address-form.shipping[last_name]') }} - +
@@ -58,9 +54,7 @@ @change="validateForm('address-form')" data-vv-as=""{{ __('shop::app.checkout.onepage.email') }}"" /> - - @{{ errors.first('address-form.shipping[email]') }} - +
@@ -78,9 +72,7 @@ @change="validateForm('address-form')" data-vv-as=""{{ __('shop::app.checkout.onepage.address1') }}"" /> - - @{{ errors.first('address-form.shipping[address1][]') }} - +
@if ( @@ -115,9 +107,7 @@ @change="validateForm('address-form')" data-vv-as=""{{ __('shop::app.checkout.onepage.city') }}"" /> - - @{{ errors.first('address-form.shipping[city]') }} - +
@@ -146,9 +136,7 @@
- - @{{ errors.first('address-form.shipping[country]') }} - + @@ -189,9 +177,7 @@ - - @{{ errors.first('address-form.shipping[state]') }} - +
@@ -209,9 +195,7 @@ @keyup="validateForm('address-form')" data-vv-as=""{{ __('shop::app.checkout.onepage.postcode') }}"" /> - - @{{ errors.first('address-form.shipping[postcode]') }} - +
@@ -229,9 +213,7 @@ @change="validateForm('address-form')" data-vv-as=""{{ __('shop::app.checkout.onepage.phone') }}"" /> - - @{{ errors.first('address-form.shipping[phone]') }} - +
@auth('customer') @@ -266,9 +248,7 @@ @change="validateForm('address-form')" data-vv-as=""{{ __('shop::app.checkout.onepage.company-name') }}"" /> - - @{{ errors.first('address-form.billing[company_name]') }} - +
@@ -286,9 +266,7 @@ @change="validateForm('address-form')" data-vv-as=""{{ __('shop::app.checkout.onepage.first-name') }}"" /> - - @{{ errors.first('address-form.billing[first_name]') }} - +
@@ -306,9 +284,7 @@ @change="validateForm('address-form')" data-vv-as=""{{ __('shop::app.checkout.onepage.last-name') }}"" /> - - @{{ errors.first('address-form.billing[last_name]') }} - +
@@ -327,9 +303,7 @@ @change="validateForm('address-form')" data-vv-as=""{{ __('shop::app.checkout.onepage.email') }}"" /> - - @{{ errors.first('address-form.billing[email]') }} - +
{{-- for customer login checkout --}} @@ -352,9 +326,7 @@ @change="validateForm('address-form')" data-vv-as=""{{ __('shop::app.checkout.onepage.address1') }}"" /> - - @{{ errors.first('address-form.billing[address1][]') }} - + @if ( @@ -388,9 +360,7 @@ @change="validateForm('address-form')" data-vv-as=""{{ __('shop::app.checkout.onepage.city') }}"" /> - - @{{ errors.first('address-form.billing[city]') }} - +
@@ -419,9 +389,7 @@
- - @{{ errors.first('address-form.billing[country]') }} - +
@@ -460,9 +428,7 @@
- - @{{ errors.first('address-form.billing[state]') }} - +
@@ -480,9 +446,7 @@ @change="validateForm('address-form')" data-vv-as=""{{ __('shop::app.checkout.onepage.postcode') }}"" /> - - @{{ errors.first('address-form.billing[postcode]') }} - +
@@ -500,9 +464,7 @@ @change="validateForm('address-form')" data-vv-as=""{{ __('shop::app.checkout.onepage.phone') }}"" /> - - @{{ errors.first('address-form.billing[phone]') }} - +
@if ($cart->haveStockableItems()) diff --git a/packages/Webkul/Velocity/src/Resources/views/shop/checkout/onepage/payment.blade.php b/packages/Webkul/Velocity/src/Resources/views/shop/checkout/onepage/payment.blade.php index be0f4af35..ff12426e6 100644 --- a/packages/Webkul/Velocity/src/Resources/views/shop/checkout/onepage/payment.blade.php +++ b/packages/Webkul/Velocity/src/Resources/views/shop/checkout/onepage/payment.blade.php @@ -2,7 +2,7 @@
- +

{{ __('shop::app.checkout.onepage.payment-methods') }}

@@ -58,9 +58,7 @@ @endforeach - - @{{ errors.first('payment-form.payment[method]') }} - +
diff --git a/packages/Webkul/Velocity/src/Resources/views/shop/checkout/onepage/shipping.blade.php b/packages/Webkul/Velocity/src/Resources/views/shop/checkout/onepage/shipping.blade.php index 044e8bd91..5b59cae80 100644 --- a/packages/Webkul/Velocity/src/Resources/views/shop/checkout/onepage/shipping.blade.php +++ b/packages/Webkul/Velocity/src/Resources/views/shop/checkout/onepage/shipping.blade.php @@ -50,9 +50,8 @@ - - @{{ errors.first('shipping-form.shipping_method') }} + v-if="errors.has('shipping-form.shipping_method')" + v-text="errors.first('shipping-form.shipping_method')"> diff --git a/packages/Webkul/Velocity/src/Resources/views/shop/customers/account/address/country-state.blade.php b/packages/Webkul/Velocity/src/Resources/views/shop/customers/account/address/country-state.blade.php index 6776aa123..30abdecb7 100644 --- a/packages/Webkul/Velocity/src/Resources/views/shop/customers/account/address/country-state.blade.php +++ b/packages/Webkul/Velocity/src/Resources/views/shop/customers/account/address/country-state.blade.php @@ -20,9 +20,7 @@ - - @{{ errors.first('country') }} - +
@@ -61,9 +59,7 @@
- - @{{ errors.first('state') }} - + diff --git a/packages/Webkul/Velocity/src/Resources/views/shop/customers/account/address/create.blade.php b/packages/Webkul/Velocity/src/Resources/views/shop/customers/account/address/create.blade.php index cd0273003..5d6ead2da 100644 --- a/packages/Webkul/Velocity/src/Resources/views/shop/customers/account/address/create.blade.php +++ b/packages/Webkul/Velocity/src/Resources/views/shop/customers/account/address/create.blade.php @@ -23,7 +23,7 @@
- @{{ errors.first('company_name') }} +
{!! view_render_event('bagisto.shop.customers.account.address.create_form_controls.company_name.after') !!} @@ -31,7 +31,7 @@
- @{{ errors.first('first_name') }} +
{!! view_render_event('bagisto.shop.customers.account.address.create_form_controls.first_name.after') !!} @@ -39,7 +39,7 @@
- @{{ errors.first('last_name') }} +
{!! view_render_event('bagisto.shop.customers.account.address.create_form_controls.last_name.after') !!} @@ -49,7 +49,7 @@ {{ __('shop::app.customer.account.address.create.vat_help_note') }} - @{{ errors.first('vat_id') }} + {!! view_render_event('bagisto.shop.customers.account.address.create_form_controls.vat_id.after') !!} @@ -61,7 +61,7 @@
- @{{ errors.first('address1[]') }} +
@if (core()->getConfigData('customer.settings.address.street_lines') && core()->getConfigData('customer.settings.address.street_lines') > 1) @@ -81,7 +81,7 @@
- @{{ errors.first('city') }} +
{!! view_render_event('bagisto.shop.customers.account.address.create_form_controls.city.after') !!} @@ -89,7 +89,7 @@
- @{{ errors.first('postcode') }} +
{!! view_render_event('bagisto.shop.customers.account.address.create_form_controls.postcode.after') !!} @@ -97,7 +97,7 @@
- @{{ errors.first('phone') }} +
{!! view_render_event('bagisto.shop.customers.account.address.create_form_controls.after') !!} diff --git a/packages/Webkul/Velocity/src/Resources/views/shop/customers/account/address/edit.blade.php b/packages/Webkul/Velocity/src/Resources/views/shop/customers/account/address/edit.blade.php index 225ea3cb4..b3d8f173e 100644 --- a/packages/Webkul/Velocity/src/Resources/views/shop/customers/account/address/edit.blade.php +++ b/packages/Webkul/Velocity/src/Resources/views/shop/customers/account/address/edit.blade.php @@ -26,7 +26,7 @@
- @{{ errors.first('company_name') }} +
{!! view_render_event('bagisto.shop.customers.account.address.edit_form_controls.company_name.after') !!} @@ -34,7 +34,7 @@
- @{{ errors.first('first_name') }} +
{!! view_render_event('bagisto.shop.customers.account.address.edit_form_controls.first_name.after') !!} @@ -42,7 +42,7 @@
- @{{ errors.first('last_name') }} +
{!! view_render_event('bagisto.shop.customers.account.address.edit_form_controls.last_name.after') !!} @@ -52,7 +52,7 @@ {{ __('shop::app.customer.account.address.create.vat_help_note') }} - @{{ errors.first('vat_id') }} + {!! view_render_event('bagisto.shop.customers.account.address.edit_form_controls.vat_id.after') !!} @@ -60,7 +60,7 @@
- @{{ errors.first('address1[]') }} +
@if (core()->getConfigData('customer.settings.address.street_lines') && core()->getConfigData('customer.settings.address.street_lines') > 1) @@ -80,7 +80,7 @@
- @{{ errors.first('city') }} +
{!! view_render_event('bagisto.shop.customers.account.address.edit_form_controls.create.after') !!} @@ -88,7 +88,7 @@
- @{{ errors.first('postcode') }} +
{!! view_render_event('bagisto.shop.customers.account.address.edit_form_controls.postcode.after') !!} @@ -96,7 +96,7 @@
- @{{ errors.first('phone') }} +
{!! view_render_event('bagisto.shop.customers.account.address.edit_form_controls.after', ['address' => $address]) !!} diff --git a/packages/Webkul/Velocity/src/Resources/views/shop/customers/account/index.blade.php b/packages/Webkul/Velocity/src/Resources/views/shop/customers/account/index.blade.php index 7ac37a044..daf4729a4 100644 --- a/packages/Webkul/Velocity/src/Resources/views/shop/customers/account/index.blade.php +++ b/packages/Webkul/Velocity/src/Resources/views/shop/customers/account/index.blade.php @@ -10,4 +10,8 @@ @yield('page-detail-wrapper') -@endsection \ No newline at end of file +@endsection + +@push('scripts') + +@endpush \ No newline at end of file diff --git a/packages/Webkul/Velocity/src/Resources/views/shop/customers/account/profile/edit.blade.php b/packages/Webkul/Velocity/src/Resources/views/shop/customers/account/profile/edit.blade.php index 14c70dd45..39039f6f3 100644 --- a/packages/Webkul/Velocity/src/Resources/views/shop/customers/account/profile/edit.blade.php +++ b/packages/Webkul/Velocity/src/Resources/views/shop/customers/account/profile/edit.blade.php @@ -30,7 +30,7 @@
- @{{ errors.first('first_name') }} +
@@ -90,7 +90,7 @@ - @{{ errors.first('gender') }} + @@ -109,9 +109,7 @@ value="{{ old('date_of_birth') ?? $customer->date_of_birth }}" v-validate="" data-vv-as=""{{ __('shop::app.customer.account.profile.dob') }}"" /> - - @{{ errors.first('date_of_birth') }} - + @@ -124,7 +122,7 @@
- @{{ errors.first('email') }} +
@@ -137,7 +135,7 @@
- @{{ errors.first('phone') }} +
@@ -168,9 +166,7 @@ type="password" v-validate="'min:6|max:18'" /> - - @{{ errors.first('password') }} - + @@ -185,9 +181,7 @@ - - @{{ errors.first('password_confirmation') }} - + diff --git a/packages/Webkul/Velocity/src/Resources/views/shop/customers/account/profile/index.blade.php b/packages/Webkul/Velocity/src/Resources/views/shop/customers/account/profile/index.blade.php index 10d9a2c1b..454402805 100644 --- a/packages/Webkul/Velocity/src/Resources/views/shop/customers/account/profile/index.blade.php +++ b/packages/Webkul/Velocity/src/Resources/views/shop/customers/account/profile/index.blade.php @@ -99,7 +99,7 @@
- @{{ errors.first('password') }} +
diff --git a/packages/Webkul/Velocity/src/Resources/views/shop/customers/account/wishlist/wishlist.blade.php b/packages/Webkul/Velocity/src/Resources/views/shop/customers/account/wishlist/wishlist.blade.php index aa8bf2f6c..5c00a8e2f 100644 --- a/packages/Webkul/Velocity/src/Resources/views/shop/customers/account/wishlist/wishlist.blade.php +++ b/packages/Webkul/Velocity/src/Resources/views/shop/customers/account/wishlist/wishlist.blade.php @@ -12,9 +12,16 @@ @if (count($items)) diff --git a/packages/Webkul/Velocity/src/Resources/views/shop/customers/session/index.blade.php b/packages/Webkul/Velocity/src/Resources/views/shop/customers/session/index.blade.php index 4c15d8ee7..f8b18e60f 100644 --- a/packages/Webkul/Velocity/src/Resources/views/shop/customers/session/index.blade.php +++ b/packages/Webkul/Velocity/src/Resources/views/shop/customers/session/index.blade.php @@ -56,9 +56,7 @@ value="{{ old('email') }}" data-vv-as=""{{ __('shop::app.customer.login-form.email') }}"" /> - - @{{ errors.first('email') }} - +
diff --git a/packages/Webkul/Velocity/src/Resources/views/shop/customers/signup/index.blade.php b/packages/Webkul/Velocity/src/Resources/views/shop/customers/signup/index.blade.php index 94c0480c7..f7638273b 100644 --- a/packages/Webkul/Velocity/src/Resources/views/shop/customers/signup/index.blade.php +++ b/packages/Webkul/Velocity/src/Resources/views/shop/customers/signup/index.blade.php @@ -53,9 +53,7 @@ value="{{ old('first_name') }}" data-vv-as=""{{ __('shop::app.customer.signup-form.firstname') }}"" /> - - @{{ errors.first('first_name') }} - +
{!! view_render_event('bagisto.shop.customers.signup_form_controls.firstname.after') !!} @@ -73,9 +71,7 @@ value="{{ old('last_name') }}" data-vv-as=""{{ __('shop::app.customer.signup-form.lastname') }}"" /> - - @{{ errors.first('last_name') }} - + {!! view_render_event('bagisto.shop.customers.signup_form_controls.lastname.after') !!} @@ -93,9 +89,7 @@ value="{{ old('email') }}" data-vv-as=""{{ __('shop::app.customer.signup-form.email') }}"" /> - - @{{ errors.first('email') }} - + {!! view_render_event('bagisto.shop.customers.signup_form_controls.email.after') !!} @@ -114,9 +108,7 @@ value="{{ old('password') }}" data-vv-as=""{{ __('shop::app.customer.signup-form.password') }}"" /> - - @{{ errors.first('password') }} - + {!! view_render_event('bagisto.shop.customers.signup_form_controls.password.after') !!} @@ -133,9 +125,7 @@ v-validate="'required|min:6|confirmed:password'" data-vv-as=""{{ __('shop::app.customer.signup-form.confirm_pass') }}"" /> - - @{{ errors.first('password_confirmation') }} - + {!! view_render_event('bagisto.shop.customers.signup_form_controls.password_confirmation.after') !!} diff --git a/packages/Webkul/Velocity/src/Resources/views/shop/customers/signup/reset-password.blade.php b/packages/Webkul/Velocity/src/Resources/views/shop/customers/signup/reset-password.blade.php index 75754743b..4f541c5ea 100644 --- a/packages/Webkul/Velocity/src/Resources/views/shop/customers/signup/reset-password.blade.php +++ b/packages/Webkul/Velocity/src/Resources/views/shop/customers/signup/reset-password.blade.php @@ -45,9 +45,7 @@ value="{{ old('email') }}" v-validate="'required|email'" /> - - @{{ errors.first('email') }} - +
@@ -62,9 +60,7 @@ type="password" v-validate="'required|min:6'" /> - - @{{ errors.first('password') }} - +
@@ -78,9 +74,7 @@ name="password_confirmation" v-validate="'required|min:6|confirmed:password'" /> - - @{{ errors.first('password_confirmation') }} - +
{!! view_render_event('bagisto.shop.customers.forget_password_form_controls.after') !!} diff --git a/packages/Webkul/Velocity/src/Resources/views/shop/home/advertisements/advertisement-four.blade.php b/packages/Webkul/Velocity/src/Resources/views/shop/home/advertisements/advertisement-four.blade.php index 690b19f69..7219c1239 100644 --- a/packages/Webkul/Velocity/src/Resources/views/shop/home/advertisements/advertisement-four.blade.php +++ b/packages/Webkul/Velocity/src/Resources/views/shop/home/advertisements/advertisement-four.blade.php @@ -1,12 +1,13 @@ @php $isRendered = false; $advertisementFour = null; + $isLazyLoad = ! isset($lazyload) ? true : ( $lazyload ? true : false ); @endphp @if ($velocityMetaData && $velocityMetaData->advertisement) @php $advertisement = json_decode($velocityMetaData->advertisement, true); - + if (isset($advertisement[4]) && is_array($advertisement[4])) { $advertisementFour = array_values(array_filter($advertisement[4])); } @@ -19,31 +20,49 @@
@endif @@ -74,9 +68,7 @@ v-validate="'required'" value="{{ old('comment') }}"> - - @{{ errors.first('comment') }} - +
@@ -111,3 +103,7 @@
@endsection + +@push('scripts') + +@endpush \ No newline at end of file diff --git a/packages/Webkul/Velocity/src/Resources/views/shop/products/view.blade.php b/packages/Webkul/Velocity/src/Resources/views/shop/products/view.blade.php index 9a3542eb0..5a1cca8a5 100644 --- a/packages/Webkul/Velocity/src/Resources/views/shop/products/view.blade.php +++ b/packages/Webkul/Velocity/src/Resources/views/shop/products/view.blade.php @@ -175,7 +175,7 @@ @if ($product->getTypeInstance()->showQuantityBox())
- +
@else @@ -216,6 +216,10 @@ @endsection @push('scripts') + + + + - - + - - + + + - - + + + + + - -
-
- -
+ + + + +
+
+
+
- connect_error) { - // retrieving admin entry - $prefix = $databaseData['DB_PREFIX'].'admins'; - $sql = "SELECT id, name FROM $prefix"; - $result = $conn->query($sql); + if (! $conn->connect_error) { + // retrieving admin entry + $prefix = $dbPrefix . 'admins'; + $sql = "SELECT id, name FROM $prefix"; + $result = $conn->query($sql); - if ($result) { - $installed = true; - } - } - - $conn->close(); - } else { + if ($result) { $installed = true; } } - if (!$installed) { + $conn->close(); + } else { + $installed = true; + } + } - // including classes - include __DIR__ . '/Classes/Requirement.php'; + if (! $installed) { + // including classes + include __DIR__ . '/Classes/Requirement.php'; - // including php files - include __DIR__ . '/Views/environment.blade.php'; - include __DIR__ . '/Views/migration.blade.php'; - include __DIR__ . '/Views/admin.blade.php'; - include __DIR__ . '/Views/email.blade.php'; - include __DIR__ . '/Views/finish.blade.php'; + // including php files + include __DIR__ . '/Views/environment.blade.php'; + include __DIR__ . '/Views/migration.blade.php'; + include __DIR__ . '/Views/admin.blade.php'; + include __DIR__ . '/Views/email.blade.php'; + include __DIR__ . '/Views/finish.blade.php'; - // object creation - $requirement = new Requirement(); - echo $requirement->render(); - } else { - // getting url - $actual_link = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; + // object creation + $requirement = new Requirement(); + echo $requirement->render(); + } else { + // getting url + $actual_link = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; - $url = explode("/", $actual_link); - array_pop($url); - array_pop($url); - $url = implode("/", $url); - $url = $url . '/404'; + $url = explode("/", $actual_link); + array_pop($url); + array_pop($url); + $url = implode("/", $url); + $url = $url . '/404'; - // redirecting to 404 error page - header("Location: $url"); - } - ?> + // redirecting to 404 error page + header("Location: $url"); + } + ?> -
- Bagisto a community project by Webkul -
+
+ Bagisto a community project by Webkul +
- - - - + + + + + \ No newline at end of file diff --git a/tests/unit/Tax/Helpers/TaxCest.php b/tests/unit/Tax/Helpers/TaxCest.php index ab1633d49..2ed03a977 100644 --- a/tests/unit/Tax/Helpers/TaxCest.php +++ b/tests/unit/Tax/Helpers/TaxCest.php @@ -3,19 +3,22 @@ namespace Tests\Unit\Tax\Helpers; use Cart; +use Illuminate\Support\Facades\Config; use UnitTester; +use Webkul\Tax\Models\TaxCategory; use Webkul\Tax\Models\TaxMap; use Webkul\Tax\Models\TaxRate; -use Webkul\Tax\Models\TaxCategory; -use Illuminate\Support\Facades\Config; class TaxCest { public $scenario; private const PRODUCT1_QTY = 11; + private const PRODUCT2_QTY = 7; + private const TAX_RATE_PRECISION = 4; + private const CART_TOTAL_PRECISION = 2; public function _before(UnitTester $I) @@ -72,27 +75,26 @@ class TaxCest 'quantity' => self::PRODUCT2_QTY, ]); - // rounded by precision of 2 because this are sums of corresponding tax categories + // rounded by precision of 2 because these are sums of corresponding tax categories $expectedTaxAmount1 = round( round(self::PRODUCT1_QTY * $product1->price, self::CART_TOTAL_PRECISION) - * $tax1->tax_rate / 100, + * $tax1->tax_rate / 100, self::CART_TOTAL_PRECISION ); $expectedTaxAmount2 = round( round(self::PRODUCT2_QTY * $product2->price, self::CART_TOTAL_PRECISION) - * $tax2->tax_rate / 100, + * $tax2->tax_rate / 100, self::CART_TOTAL_PRECISION ); $this->scenario = [ 'cart' => Cart::getCart(), 'expectedTaxRates' => [ - (string)round((float)$tax1->tax_rate, 4) => $expectedTaxAmount1, - (string)round((float)$tax2->tax_rate, 4) => $expectedTaxAmount2, + (string) round((float) $tax1->tax_rate, self::TAX_RATE_PRECISION) => $expectedTaxAmount1, + (string) round((float) $tax2->tax_rate, self::TAX_RATE_PRECISION) => $expectedTaxAmount2, ], - 'expectedTaxTotal' => - round($expectedTaxAmount1 + $expectedTaxAmount2, self::CART_TOTAL_PRECISION), + 'expectedTaxTotal' => round($expectedTaxAmount1 + $expectedTaxAmount2, self::CART_TOTAL_PRECISION), ]; } @@ -107,12 +109,7 @@ class TaxCest foreach ($this->scenario['expectedTaxRates'] as $taxRate => $taxAmount) { $I->assertTrue(array_key_exists($taxRate, $result)); - $difference = abs($taxAmount - round($result[$taxRate], 2)); - - /* just checking the small difference */ - if ($difference !== 0.01) { - $I->assertEquals($taxAmount, round($result[$taxRate], 2)); - } + $I->assertEquals($taxAmount, $result[$taxRate]); } }