{"html":"<a class=\"fp-btn-link fp-btn-reorder\" href=\"javascript:void(0);\" data-action=\"show-reorder-modal\" role=\"button\" title=\"<%= fp.ui.locale('shared-reorder', 'Reorder') %>\"><span class=\"fp-icon fp-icon-reorder\" aria-hidden=\"true\"></span><%= fp.ui.locale('shared-reorder', 'Reorder') %></a>","js":"var ReorderIndicator = fp.Module.ReorderIndicator || fp.Module.extend({\n    construct: function ($element, config, template, parent) {\n        this._super($element, config, template, parent);\n\n        _.defaults(this.config, {\n            productLimit: 32,\n            enableLocale: true,\n            extraProductFields: ',quantity_on_hand, quantity_on_hand_label'\n        });\n\n        this.scope.actions = [{\n            id: 'products',\n            label: fp.ui.locale('reorder-recent', 'Recent Products'),\n            title: fp.ui.locale('reorder-recent-purchased', 'Recently Purchased Products'),\n            notFound: fp.ui.locale('reorder-no-recent', 'You do not have any recent products.'),\n            viewAllLabel: fp.ui.locale('reorder-view-recent', 'View All Recent Products'),\n            viewAllLink: stateManager.href(fp.config.routeStates.product, {filter: 'is_bought_by_me'})\n        }, {\n            id: 'past-orders',\n            label: fp.ui.locale('reorder-past', 'Past Orders'),\n            title: fp.ui.locale('reorder-past', 'Past Orders'),\n            notFound: fp.ui.locale('reorder-no-past', 'You do not have any past orders.'),\n            viewAllLabel: fp.ui.locale('reorder-view-past', 'View All Past Orders'),\n            viewAllLink: stateManager.href(fp.config.routeStates.accountOrder)\n        }, ];\n\n        if(fp.hasInStoreReceipt) {\n            var receiptConfig = _.getObject(util.map.get('spcOrderData').get('in_store_receipt', null, true).config);\n            if(!receiptConfig.disable_reorder) {\n                var reorderLabel = receiptConfig.reorder_label || fp.ui.locale('reorder-in-store', 'Past In Store Receipts');\n                this.scope.actions.push({\n                    id: 'in-store-receipts',\n                    label: reorderLabel,\n                    title: reorderLabel,\n                    notFound: receiptConfig.no_list_results_label || fp.ui.locale('shared-no-store-receipts', 'You do not have any in past store receipts.'),\n                    viewAllLabel: receiptConfig.reorder_view_all_label || fp.ui.locale('reorder-view-in-store', 'View All Past In Store Receipts'),\n                    viewAllLink: stateManager.href(fp.config.routeStates.accountReceipt)\n                });\n            }\n        }\n        \n        this.scope.actions.push({\n            id: 'shopping-lists',\n            label: fp.ui.locale('reorder-shopping', 'Shopping Lists'),\n            title: fp.ui.locale('reorder-recent-list', 'Recent Shopping Lists'),\n            notFound: fp.ui.locale('reorder-no-with-items', 'You do not have any shopping lists with items.'),\n            viewAllLabel: fp.ui.locale('reorder-view-lists', 'View All Shopping Lists'),\n            viewAllLink: stateManager.href(fp.config.routeStates.accountList)\n        });\n    },\n    init: function(autoRender) {\n        delete this.__orderIndicatorModule;\n        delete this.__orderReadyModule;\n\n        var self = this,\n            promise = this._super(false),\n            orderIndicatorModule,\n            isEnabledLoggedIn = util.getBoolean(fp.config.enableOrderPlacedIndicator && util.isAuthenticated());\n\n        if (util.getBoolean(isEnabledLoggedIn && fp.user.new_order_count)) {\n            promise = promise\n                .then(function() {\n                    return fp.ui.loadModule({\n                            name: 'order-ready-indicator',\n                            elementSelector: self.config.elementSelector\n                        }, this)\n                        .then(function (module) {\n                            orderIndicatorModule = module;\n                            return module.init(false)\n                                .then(function() {\n                                    if(!orderIndicatorModule.enabled) {\n                                        orderIndicatorModule.destroy();\n                                        orderIndicatorModule = null;\n                                    }\n                                })\n                                .catch(function (error) {\n                                    if (error instanceof Error) {\n                                        fp.notifier.notify(error, {\n                                            severity: 'error',\n                                            metaData: {\n                                                'meta data': {\n                                                    'Module Name': module.config.name,\n                                                    'Module Selector': fp.S.getString(module.config.elementSelector).substr(0, 500),\n                                                    'Module Layout': module.config.layout\n                                                }\n                                            }\n                                        });\n                                    }\n                                    return $.when();\n                                });\n                        })\n                        .then(function() {\n                            if(!(orderIndicatorModule && orderIndicatorModule.enabled)) {\n                                return fp.ui.loadModule({\n                                        name: 'order-placed-indicator',\n                                        elementSelector: self.config.elementSelector\n                                    }, this)\n                                    .then(function (module) {\n                                        orderIndicatorModule = module;\n                                        return module.init(false)\n                                            .then(function() {\n                                                if(!orderIndicatorModule.enabled) {\n                                                    orderIndicatorModule.destroy();\n                                                    orderIndicatorModule = null;\n                                                }\n                                            })\n                                            .catch(function (error) {\n                                                if (error instanceof Error) {\n                                                    fp.notifier.notify(error, {\n                                                        severity: 'error',\n                                                        metaData: {\n                                                            'meta data': {\n                                                                'Module Name': module.config.name,\n                                                                'Module Selector': fp.S.getString(module.config.elementSelector).substr(0, 500),\n                                                                'Module Layout': module.config.layout\n                                                            }\n                                                        }\n                                                    });\n                                                }\n                                                return $.when();\n                                            });\n                                    });\n                            }\n                        });\n            });\n        }\n\n        return promise\n            .always(function () {\n                if (orderIndicatorModule && orderIndicatorModule.enabled) {\n                    self.__orderIndicatorModule = orderIndicatorModule;\n                }\n\n                if (util.getBoolean(autoRender, true)) self.render();\n            });\n\n    },\n    render: function (params) {\n        if(this.__orderIndicatorModule) {\n            this.__orderIndicatorModule.render();\n            return;\n        }\n\n        this._super(params);\n\n        this.$element\n            .removeClass('hidden')\n            .find('[data-action=\"show-reorder-modal\"]')\n            .off('click')\n            .on('click', $.proxy(this.showModal, this));\n\n        if(this.scope.stateParams.modal == 'reorder') {\n            this.showModal();\n        }\n    },\n    showModal: function(event) {\n        if(event) event.preventDefault();\n        if(ReorderIndicator.__$reorderModal) return;\n\n        var scope = this.scope,\n            stateManager = scope.stateManager;\n\n        if(scope.stateParams.modal_action_id) {\n            scope.action =  _.findWhere(scope.actions, {id: scope.stateParams.modal_action_id});\n        }\n        scope.action = _.getObject(scope.action || scope.actions[0]);\n\n        var params = {modal: 'reorder', modal_action_id: scope.action.id};\n        if(!util.isAuthenticated()) {\n            stateManager.go(fp.config.routeStates.login, {next: stateManager.href(stateManager.current, params)});\n            return;\n        }\n\n        stateManager.go(stateManager.current, params, {preventDefault: true, inherit: true});\n\n        this.__initModal();\n    },\n    __initModal: function() {\n        var self = this,\n            scope = this.scope,\n            deferredInit = $.Deferred(),\n            $modal = ReorderIndicator.__$reorderModal,\n            stateManager = scope.stateManager,\n            promiseShow,\n            promiseItems,\n            items,\n            hashedStores,\n            itemTotal\n\n        //fp.__$freshop.find('[data-role=\"modal-container\"] .modal[data-aria-hidden=\"false\"]:not(.fp-reorder-modal)')\n        //    .hide()\n        //    .removeClass('fade in');\n\n        scope.items = null;\n        scope.hashedStores = null;\n        this.__hashedItems = {};\n        this.__itemSkip = 0;\n\n        if($modal) {\n            $modal.idle('destroy');\n            fp.Component.destroyChildComponents(true, $modal);\n\n            $modal\n                .find('[data-role=\"title\"]')\n                .text(scope.action.title);\n\n            var $content = $modal\n                .find('[data-role=\"modal-content\"]')\n                .html(fp.ui.renderTemplate('component/0/animated-loading.html'));\n\n            deferredInit\n                .done(function(data) {\n                    $content.html(data);\n                });\n        }\n        else {\n            promiseShow = $.Deferred().promise();\n\n            $modal = fp.ui.showModal({\n                    name: 'reorder',\n                    template: 'component/0/reorder-modal.html',\n                    content: deferredInit.promise(),\n                    size: 'lg',\n                    className: 'fp-modal-product fp-reorder-modal',\n                    title: scope.action.title\n                })\n                .on('show.bs.modal.reorder', promiseShow.deferred().resolve)\n                .on('hidden.bs.modal.reorder', function () {\n                    stateManager.go(stateManager.current, {modal: null, modal_action_id: null}, {\n                        preventDefault: true,\n                        inherit: true\n                    });\n\n                    fp.Component.destroyChildComponents(true, $modal);\n\n                    delete ReorderIndicator.__$reorderModal;\n                })\n                .on('click', '[data-action^=\"checkout-\"]', function (event) {\n                    event.preventDefault();\n\n                    var $this = $(this),\n                        id = $this.attr('data-id'),\n                        action = $this.attr('data-action');\n\n                    switch (action) {\n                        case 'checkout-order':\n                        case 'checkout-in-store-receipt':\n                            var $addAllProductsModal,\n                                addProductsToListHtml = fp.ui.renderTemplate('component/0/add-products-to-list.html');\n\n                            function checkoutList (event, listId) {\n                                if (event && !$(event.target).hasClass('fp-btn-save')) return;\n\n                                util.showProgress();\n                                fp.formLoader.show($this);\n\n                                var payload = {},\n                                    selectedList = fp.listManager.getList(),\n                                    promiseListItems,\n                                    listItems;\n\n                                if (!listId) listId = fp.S.getString(selectedList.id, fp.defaultList.id);\n\n                                if (listId === fp.defaultList.id) {\n                                    if(action === 'checkout-in-store-receipt') {\n                                        payload.receipt_id = id;\n                                    }\n                                    else {\n                                        payload.order_id = id;\n                                    }\n                                }\n                                else {\n                                    payload.id = listId;\n\n                                    if(action === 'checkout-in-store-receipt') {\n                                        payload.receipt_id = id;\n                                    }\n                                    else {\n                                        payload.add_order = id;\n                                    }\n\n                                    if (listId != selectedList.id) {\n                                        promiseListItems = service.shoppingListItemService\n                                            .get({\n                                                shopping_list_id: listId,\n                                                limit: -1\n                                            })\n                                            .done(function (resp) {\n                                                listItems = resp.items;\n                                            });\n                                    }\n                                    else {\n                                        listItems = $.extend([], selectedList.items);\n                                    }\n                                }\n\n                                $.when(promiseListItems)\n                                    .always(function () {\n                                        service.getItemSaveCall(service.shoppingListService, payload.id)\n                                            .call(service.shoppingListService, payload)\n                                            .then(function (resp) {\n                                                return fp.listManager.getSelectedList(true, {id: resp.id});\n                                            })\n                                            .done(function (resp) {\n                                                fp.ui.hideModal($addAllProductsModal);\n                                                fp.ui.hideModal($modal);\n\n                                                var addedItems = [];\n                                                if(_.size(listItems)) {\n                                                    var hashedListItems = _.indexBy(listItems, 'id');\n                                                    _.each(fp.listManager.selectedList.items, function (item) {\n                                                        if(!_.has(hashedListItems, item.id)) addedItems.push(item);\n                                                    });\n                                                }\n                                                else {\n                                                    addedItems = $.extend(addedItems, fp.listManager.selectedList.items);\n                                                }\n\n                                                fp.trigger(fp.events.LIST_ITEMS_ADDED, {\n                                                    listManager: fp.listManager,\n                                                    selectedList: fp.listManager.selectedList,\n                                                    addedItems: addedItems\n                                                });\n\n                                                var order = _.getObject(self.__hashedItems[id]);\n                                                fp.trigger(fp.events.LIST_CHECKOUT, {\n                                                    listManager: fp.listManager,\n                                                    selectedList: fp.listManager.selectedList,\n                                                    fulfillment_type_id: order.fulfillment_type_id\n                                                });\n                                            })\n                                            .always(function () {\n                                                util.hideProgress();\n                                                fp.formLoader.hide();\n                                            });\n                                    });\n                            }\n\n                            if (!fp.ui.ListManager.getListQuantity()) {\n                                var hasFade = fp.$addAllProductsModal.hasClass('fade');\n                                fp.$addAllProductsModal.removeClass('fade');\n\n                                fp.trigger(fp.events.ADD_ALL_PRODUCTS_MODAL_SHOW, {\n                                    title: fp.ui.locale('reorder-add-checkout', 'Add Products To Shopping List And Checkout'),\n                                    content: addProductsToListHtml,\n                                    disableTrackItemsAdded: true,\n                                    callback: checkoutList\n                                });\n\n                                $modal.hide();\n                                $modal.prev('.modal-backdrop').hide();\n\n                                fp.$addAllProductsModal\n                                    .one('hide.bs.modal.reorder-add-all-products', function () {\n                                        $modal.show();\n                                        $modal.prev('.modal-backdrop').show();\n                                    })\n                                    .one('hidden.bs.modal.reorder-add-all-products', function () {\n                                        // fp.__$freshop.addClass('modal-open');\n                                        if(hasFade) fp.$addAllProductsModal.addClass('fade');\n                                    });\n\n                                return;\n                            }\n\n                            addProductsToListHtml = ' \\\n                                <h3>' + fp.ui.locale('reorder-can-add', 'You Can Add All Reorder Items To...') + '</h3> \\\n                                <div class=\"fp-orders-checkout-instructions\"> \\\n                                <hr /> \\\n                                <p>1. <span>' + fp.ui.locale('reorder-current-list', 'Your Current Shopping List & Checkout') + '</span> <a href=\"javascript:;\" class=\"fp-btn\" data-action=\"checkout-current-list\">' + fp.ui.locale('reorder-add-current-checkout', 'Add To Current Shopping List & Checkout') + '</a></p> \\\n                                <div class=\"fp-orders-checkout-separator\"><hr /><span>Or</span></div> \\\n                                <p>2. <span>' + fp.ui.locale('reorder-create-list', 'Create A New Shopping List & Checkout') + '</span> <a href=\"javascript:;\" class=\"fp-btn\" data-action=\"checkout-new-list\">' + fp.ui.locale('reorder-add-new-checkout', 'Add To New Shopping List & Checkout') + '</a></p> \\\n                                <hr /> \\\n                                </div> \\\n                                <div> \\\n                            ' + addProductsToListHtml;\n\n                            $addAllProductsModal = fp.ui.showModal({\n                                    name: 'add-all-products',\n                                    template: 'component/0/modal.html',\n                                    className: 'fp-add-all-products-modal',\n                                    title: fp.ui.locale('reorder-add-checkout', 'Add Products to Shopping List and Checkout'),\n                                    content: addProductsToListHtml,\n                                    //buttons: [{title: 'Use Current List', action: 'checkout-current-list'}, {title: 'Use New List', action: 'checkout-new-list'}],\n                                    cancelBtn: fp.ui.locale('shared-cancel', 'Cancel')\n                                })\n                                .off('click', '[data-action^=\"checkout-\"]')\n                                .on('click', '[data-action^=\"checkout-\"]', function (event) {\n                                    event.preventDefault();\n                                    var $this = $(this),\n                                        listId;\n                                    if ($this.attr('data-action') == 'checkout-new-list') {\n                                        listId = fp.defaultList.id;\n                                    }\n\n                                    util.showProgress();\n                                    fp.formLoader.show($this);\n\n                                    checkoutList(null, listId);\n                                });\n\n                            break;\n                        case 'checkout-list':\n                            fp.listManager.getSelectedList(true, {id: id})\n                                .done(function () {\n                                    fp.trigger(fp.events.LIST_CHECKOUT, {\n                                        listManager: fp.listManager,\n                                        selectedList: fp.listManager.selectedList\n                                    });\n                                });\n                            break;\n                    }\n                })\n                .on('click', '[data-action^=\"display-\"]', function (event) {\n                    event.preventDefault();\n\n                    var actionId = fp.S($(this).attr('data-action')).trimLeft('display-').s;\n                    if (scope.action.id == actionId) return;\n\n                    scope.action = _.findWhere(scope.actions, {id: actionId});\n                    stateManager.go(stateManager.current, {modal_action_id: scope.action.id}, {\n                        preventDefault: true,\n                        inherit: true\n                    });\n\n                    self.__initModal();\n                })\n                .on('click', '[data-action=\"start-shopping\"]', function (event) {\n                    event.preventDefault();\n\n                    if(stateManager.is(scope.states.product)) fp.ui.closeActiveModal();\n                    else scope.stateManager.go(fp.config.routeStates.product);\n                })\n                .on('click', '.active, [data-action=\"close-modal\"]', function (event) {\n                    event.preventDefault();\n                    var href = $(this).attr('href');\n\n                    if(stateManager.current.url == href) fp.ui.closeActiveModal();\n                    else window.location.href = href;\n                })\n                .toggleClass('fp-is-checkout-disabled', !fp.hasStoreFulfillment());\n\n            ReorderIndicator.__$reorderModal = $modal;\n        }\n\n        switch(scope.action.id) {\n            case 'shopping-lists':\n                promiseItems = service.shoppingListService\n                    .get({\n                        fields: 'id,name,updated_at,total_item_quantity,order_total',\n                        limit: 10\n                    })\n                    .done(function(resp) {\n                        items = resp.items;\n\n                        if(_.size(items)) {\n                            for (var i = 0; i < items.length; i++) {\n                                if(util.getInteger(items[i].total_item_quantity) == 0){\n                                    items.splice(i, 1);\n                                    i--;\n                                }\n                            }\n                        }\n\n                        if (_.size(items) > 5) {\n                            items.splice(5, items.length);\n                        }\n                    });\n                break;\n            case 'products':\n                var promiseMap = util.map.load({\n                        service: service.tagService,\n                        payload: {\n                            type: 'store_price_mode,product_status,sale_configuration_type'\n                        }\n                    }),\n                    promiseProducts = service.userProductBuyService\n                        .get({\n                            skip_upsell_products: fp.config.skipUpsellProducts ? true : undefined,\n                            sort: 'last_ordered_at',\n                            limit: self.config.productLimit\n                        }, {\n                            enableProducts: true,\n                            productFields: fp.productFields + self.config.extraProductFields\n                        })\n                        .done(function(resp) {\n                            itemTotal = resp.total;\n                            items = resp.items;\n                        });\n\n                promiseItems = $.when(promiseMap, promiseProducts);\n\n                break;\n            case 'in-store-receipts':\n                promiseItems = service.receiptService\n                    .get({\n                        limit: 5,\n                        sort: 'occurred_at!',\n                        store_id_cascade: true\n                    })\n                    .then(function(resp) {\n                        items = resp.items;\n                        var storeIds = _.chain(items).pluck('store_id').unique().value().join();\n                        if(storeIds) {\n                            return service.storeService\n                                .get({id: storeIds})\n                                .done(function(resp) {\n                                    scope.hashedStores = _.indexBy(resp.items, 'id');\n                                });\n                        }\n                    });\n                break;\n            default:\n                promiseItems = service.orderService\n                    .get({\n                        fields: 'id,fulfillment_type_id,placed_at,pos_final_amount,item_total,fulfillment_name',\n                        intent: 'past_orders',\n                        limit: 5,\n                        sort: 'created_at!'\n                    })\n                    .done(function(resp) {\n                        items = resp.items;\n                    }); \n                    break;\n        }\n\n        promiseItems\n            .always(function () {\n                var origItemSize = _.size(items);\n\n                scope.items = items;\n                self.__itemTotal = util.getInteger(itemTotal);\n\n                deferredInit.resolve(fp.ui.renderTemplate('component/0/reorder-modal/reorder-modal-content.html', scope));\n\n                $.when(promiseShow)\n                    .always(function() {\n                        $modal.toggleClass('fp-no-orders', !_.size(scope.items));\n\n                        self.__initItems(scope.items);\n\n                        if(scope.action.id == 'products') {\n                            var $body = $(document.body),\n                                $modalDialog = $modal.find('.modal-dialog');\n\n                            $modal\n                                .idle({\n                                    idle: 500,\n                                    events: 'scroll.idle',\n                                    onIdle: function () {\n                                        if(self.__promiseItems) return;\n                                        if(origItemSize >= self.__itemTotal) return;\n\n                                        if($modal.scrollTop() >= $modalDialog.outerHeight(true) - $body.height() - 50) {\n                                            var $infiniteLoader = $modal.find('[data-role=\"infinite-loader\"]').removeClass('hidden'),\n                                                skip = util.getInteger(self.__itemSkip) + self.config.productLimit;\n\n                                            self.__promiseItems = service.userProductBuyService\n                                                .get({\n                                                    skip_upsell_products: fp.config.skipUpsellProducts ? true : undefined,\n                                                    limit: self.config.productLimit,\n                                                    skip: skip\n                                                }, {\n                                                    enableProducts: true,\n                                                    productFields: fp.productFields + self.config.extraProductFields\n                                                })\n                                                .done(function(resp) {\n                                                    origItemSize += _.size(resp.items);\n\n                                                    self.__initItems(resp.items);\n                                                    self.__itemSkip = skip;\n                                                })\n                                                .always(function() {\n                                                    $infiniteLoader.addClass('hidden');\n\n                                                    _.delay(function() {\n                                                        delete self.__promiseItems;\n                                                    }, 200);\n                                                });\n                                        }\n                                    }\n                                });\n                        }\n                    });\n            });\n    },\n    destroy: function(persistUI) {\n        this._super(persistUI);\n\n        if(this.__orderIndicatorModule) {\n            this.__orderIndicatorModule.destroy(persistUI);\n            return;\n        }\n\n        var $modal = ReorderIndicator.__$reorderModal;\n        if($modal) {\n            delete ReorderIndicator.__$reorderModal;\n            $modal.idle('destroy');\n            fp.ui.hideModal($modal, true);\n            fp.Component.destroyChildComponents(persistUI, $modal);\n        }\n    },\n    __initItems: function(items) {\n        var $modal = ReorderIndicator.__$reorderModal;\n        if(!$modal) return;\n        if(!_.size(items)) return;\n        \n        var self = this,\n            scope = this.scope,\n            productCache = fp.cache.product.items,\n            $productList,\n            $oldProductList,\n            $actions,\n            productAction,\n            item;\n\n        if(scope.action.id == 'products') {\n            $productList = $oldProductList = $modal.find('[data-role=\"modal-content\"] .fp-product-list');\n            if(items != scope.items) {\n                $productList = $(fp.ui.renderTemplate('component/0/reorder-modal/product-list.html', {items: items}, null, true));\n            }\n        }\n        \n        for(var n=0;n<items.length;n++) {\n            item = items[n];\n\n            if(scope.action.id == 'products') {\n                if (item.product) {\n                    $actions = $productList.find('.fp-item .fp-item-action[data-product-id=' + item.product.id + ']');\n                    productAction = $actions.data('fp.ui.Component');\n                    if (productAction) productAction.destroy();\n\n                    new fp.ui.ProductActions($actions, {item: item.product, listManager: fp.listManager});\n                    \n                    if(item.product && item.product.quantity_on_hand) item.product.__product_quantity = _.min([item.product.quantity_on_hand,item.last_ordered_quantity]);\n                    else item.product.__product_quantity = item.last_ordered_quantity;\n\n                    productCache[item.product.id] = item.product;\n                }\n                else {\n                    item = null;\n                    items.splice(n, 1);\n                    n--;\n                }\n            }\n\n            if(item) {\n                self.__hashedItems[item.id] = item;\n            }\n        }\n\n        if(scope.action.id == 'products' && items != scope.items) {\n            _.concat(scope.items, items);\n            $oldProductList.append($productList.children());\n        }\n    },\n    __attachScopeEvents: function() {\n        if(this.__orderIndicatorModule) return;\n\n        this._super();\n\n        var scope = this.scope;\n\n        $(scope)\n            .on(fp.events.ROUTE_BEFORE_CHANGE, function (event, payload) {\n                var $modal = ReorderIndicator.__$reorderModal;\n                if($modal) fp.ui.closeActiveModal();\n\n                if(!(payload.toParams.modal == 'reorder' && payload.toParams.modal_action_id)) return;\n                if(!_.findWhere(scope.actions, {id: payload.toParams.modal_action_id})) {\n                    event.preventDefault();\n                    var params = $.extend({}, payload.toParams),\n                        options;\n\n                    if(payload.fromParams.modal_action_id) {\n                        params.modal_action_id = payload.fromParams.modal_action_id;\n                        options = {preventDefault: true};\n                    }\n                    else {\n                        params.modal_action_id = scope.actions[0].id;\n                    }\n\n                    _.defer(function() {\n                        scope.stateManager.go(payload.toState, params, options);\n                    });\n                }\n            });\n    }\n});\n\nfp.Module.ReorderIndicator = ReorderIndicator;\n\nreturn fp.Module.ReorderIndicator;\n//# sourceURL=module/reorder-indicator/reorder-indicator.js"}