1angular.module("YepCom").directive("memberOrders",function($http,$timeout,$ocLazyLoad,ngDialog,$localStorage,$translate){return{restrict:"E",replace:!0,template:'<div class="member-orders"><div class="c-text c-text--grey" ng-if="orders.length == 0">{{"u_vas_poka_net_zakazov_v_etom_magazine" | translate}}.</div><div class="c-table__wrapper s-margin-top-m" ng-if="orders.length > 0"><div class="order-view-list"><div class="item-order-view-short" ng-repeat="order in orders" ng-click="openSingleOrderModal(order)"><div class="order-params"><div class="param-item"><div class="h4-like h4-like--dark-blue h4-like--bold s-margin-bottom-16">{{"zakaz" | translate}} â {{order.yepstore_order_id||order.vk_order_id}}</div><div class="order-pay-status s-mb-16"><span class="s-text-warning" ng-if="!order.order_paid">{{"ne_oplachen" | translate}}</span> <span class="s-text-success" ng-if="order.order_paid">{{"oplachen" | translate}}</span></div><div><button class="c-button c-button--salmon" ng-click="refreshOrder($event, order)"><i class="fa fa-repeat" aria-hidden="true" translate-attr="{title: \'\'}" title="{{" povtorit_zakaz" | translate}}"></i> {{"povtorit" | translate}}</button></div></div><div class="param-item text-right"><div class="h4-like order-price s-margin-bottom-16">{{order.price}} {{currentCurrencyName}}.</div><div class="c-text c-text--small">{{order.created_at | date : "dd.MM.yyyy hh:mm"}}</div><div class="c-button c-button--outline">{{"podrobnee" | translate}}</div></div></div><div class="order-delvery" ng-if="order.shippingmethod"><div class="param-item"><div><span class="c-text s-margin-bottom-16">{{"dostavka" | translate}}:</span> <span class="h5-like s-margin-bottom-16">{{order.shippingmethod.name}}</span></div><div class="c-text c-text--small-italic s-margin-bottom-16">{{order.shippingmethod.description}}</div><div class="c-text s-margin-bottom-16" ng-if="order.shippingmethod.useaddress">{{order.deliveryaddress}}</div></div></div></div></div></div><forushopcart forusiteid="userData.website_id"></forushopcart></div>',scope:{userData:"=",siteData:"="},link:function(scope,element,attrs){$translate(["rub","grn","tng","som","sum"]).then(function(translations){scope.rub=translations.rub,scope.grn=translations.grn,scope.tng=translations.tng,scope.som=translations.som,scope.sum=translations.sum},function(translationIds){scope.rub=translationIds.rub,scope.grn=translationIds.grn,scope.tng=translationIds.tng,scope.som=translationIds.som,scope.sum=translationIds.sum}),scope.currentCurrencyName=scope.rub,scope.setCurrency=function(){var index,currencyList=[{val:"rub",name:scope.rub},{val:"usd",name:"usd"},{val:"eur",name:"eur"},{val:"UAH",name:scope.grn},{val:"KZT",name:scope.tng},{val:"KGS",name:scope.som},{val:"UZ",name:scope.sum}];scope.siteData&&scope.siteData.shopsite&&scope.siteData.shopsite.currency&&-1<(index=_.findIndex(currencyList,function(o){return o.val===scope.siteData.shopsite.currency}))&&(scope.currentCurrencyName=currencyList[index].name),scope.siteData.currentCurrencyName=scope.currentCurrencyName},scope.orders=[],scope.getMemberorders=function(){return $http({method:"GET",url:"/api/v1/shoporders/memberorders",data:{},headers:{"Content-Type":"application/json",Accept:"application/json",withCredentials:!0}}).then(function(res){res.data&&(scope.orders=res.data,scope.setCurrency())})},scope.disableClickFlag=!1,scope.openSingleOrderModal=function(order){if(!scope.disableClickFlag)return scope.disableClickFlag=!0,$timeout(function(){scope.disableClickFlag=!1},2e4),$http({method:"GET",url:"/api/v1/shoporders/showmemberorder?order_id="+order._id.$oid,data:{},headers:{"Content-Type":"application/json",Accept:"application/json",withCredentials:!0}}).then(function(res){scope.orderData=res,$ocLazyLoad.load({cache:!0},{name:"member-order-view.js",files:["/assets/js/member-order-view.js?"+(window.yepbuildversion||Math.floor(1e8*Math.random()))]}).then(function(){ngDialog.closeAll(),ngDialog.open({template:'<div class="ngdialog-holder"><div class="c-modal"><div class="c-modal__wrapper"><member-order-view user-data="userData" site-data="siteData" order-data="orderData"></member-order-view></div><div class="ngdialog-close"></div></div></div>',className:"t-modal t-modal--single-order",plain:!0,showClose:!0,closeByEscape:!0,closeByDocument:!0,scope:scope}),scope.disableClickFlag=!1})})},scope.refreshOrder=function(e,order){e.stopPropagation(),e.preventDefault(),$http({method:"GET",url:"/api/v1/shoporders/showmemberorder?order_id="+order._id.$oid,data:{},headers:{"Content-Type":"application/json",Accept:"application/json",withCredentials:!0}}).then(function(res){if(scope.orderData=res,scope.orderData&&scope.orderData.data&&(scope.orderData.data.hasOwnProperty("items")&&scope.$emit("addToCartAlltEvent",scope.orderData.data.items),scope.orderData.data.hasOwnProperty("goods"))&&scope.orderData.data.hasOwnProperty("order")&&scope.orderData.data.order&&scope.orderData.data.order.provider&&"vkontakte"==scope.orderData.data.order.provider){$localStorage.vkCartItems||($localStorage.vkCartItems=[]);for(var i=0;i<scope.orderData.data.goods.response.items.length;i++){var orderItem=scope.orderData.data.goods.response.items[i],productId=orderItem.owner_id+"_"+orderItem.id,product={id:productId,name:orderItem.title,category_id:orderItem.category.name,price:parseFloat(orderItem.price.amount)/100,amount:null,images:[scope.getVkImages(orderItem.photos[0].sizes)]},orderItem=0,index=_.findIndex(scope.orderData.data.order.provider_items,function(o){return o.id===productId}),index=(-1<index&&(orderItem=scope.orderData.data.order.provider_items[index].order_quantity),product.amount=orderItem,_.findIndex($localStorage.vkCartItems,function(o){return o.id===product.id}));-1<index?$localStorage.vkCartItems[index].amount=$localStorage.vkCartItems[index].amount+orderItem:$localStorage.vkCartItems.push({id:product.id,product:product,amount:orderItem})}$timeout(function(){scope.$emit("showCartEvent")},100)}})},scope.getVkImages=function(sizes){var large_image=_.maxBy(sizes,"width"),compact_image=_.findLast(sizes,function(n){return n.width<150&&90<n.width}),sizes=_.findLast(sizes,function(n){return n.width<80&&30<n.width});return{compact_image:compact_image.url||large_image.url,large_image:large_image.url,thumb_image:sizes.url||compact_image.url||large_image.url}},scope.getMemberorders()}}});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.