(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[32],{

/***/ "../ozone/lib/listing/component/ListingCard.classNames.js":
/*!****************************************************************!*\
  !*** ../ozone/lib/listing/component/ListingCard.classNames.js ***!
  \****************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var styling_1 = __webpack_require__(/*! @uifabric/styling */ "../../node_modules/@uifabric/styling/lib/index.js");
var utilities_1 = __webpack_require__(/*! @uifabric/utilities */ "../../node_modules/@uifabric/utilities/lib/index.js");
var getClassNames = utilities_1.memoizeFunction(function (styles, className, clickable) {
    return {
        root: styling_1.mergeStyles("listing-card", className, styles.root, clickable && styles.clickableRoot),
        details: styling_1.mergeStyles("listing-card-details", styles.details),
        title: styling_1.mergeStyles("listing-card-title", styles.title),
        shortDescription: styling_1.mergeStyles("listing-card-short-description", styles.shortDescription),
        previewContainer: styling_1.mergeStyles("listing-card-preview-container", styles.previewContainer)
    };
});
exports.getClassNames = getClassNames;


/***/ }),

/***/ "../ozone/lib/listing/component/ListingCard.js":
/*!*****************************************************!*\
  !*** ../ozone/lib/listing/component/ListingCard.js ***!
  \*****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
var React = __webpack_require__(/*! react */ "../../node_modules/react/index.js");
var ListingCard_styles_1 = __webpack_require__(/*! ./ListingCard.styles */ "../ozone/lib/listing/component/ListingCard.styles.js");
var ListingCard_classNames_1 = __webpack_require__(/*! ./ListingCard.classNames */ "../ozone/lib/listing/component/ListingCard.classNames.js");
var ListingPreview_1 = __webpack_require__(/*! ./ListingPreview */ "../ozone/lib/listing/component/ListingPreview.js");
var ListingCardStoreLink = /** @class */ (function (_super) {
    __extends(ListingCardStoreLink, _super);
    function ListingCardStoreLink() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    ListingCardStoreLink.prototype.render = function () {
        if (this.props.isBookmark) {
        }
        return null;
    };
    return ListingCardStoreLink;
}(React.Component));
var ListingCard = /** @class */ (function (_super) {
    __extends(ListingCard, _super);
    function ListingCard() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this._onClick = function () {
            _this.props.onClick(_this.props.listing);
        };
        return _this;
    }
    ListingCard.prototype.render = function () {
        var styles = ListingCard_styles_1.getStyles(undefined, this.props.styles);
        var classNames = ListingCard_classNames_1.getClassNames(styles, this.props.className, this.props.onClick ? true : false);
        return (React.createElement("div", { className: classNames.root, role: this.props.onClick ? "button" : undefined, onClick: this.props.onClick ? this._onClick : undefined, title: this.props.listing.description_short },
            React.createElement("div", { className: classNames.previewContainer },
                React.createElement(ListingPreview_1.ListingPreview, { listing: this.props.listing })),
            React.createElement("div", { className: classNames.details },
                React.createElement("div", { className: classNames.title }, this.props.listing.title),
                React.createElement("div", { className: classNames.shortDescription }, this.props.listing.description_short),
                React.createElement(ListingCardStoreLink, __assign({}, this.props)))));
    };
    return ListingCard;
}(React.Component));
exports.ListingCard = ListingCard;


/***/ }),

/***/ "../ozone/lib/listing/component/ListingCard.styles.js":
/*!************************************************************!*\
  !*** ../ozone/lib/listing/component/ListingCard.styles.js ***!
  \************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var styling_1 = __webpack_require__(/*! @uifabric/styling */ "../../node_modules/@uifabric/styling/lib/index.js");
var utilities_1 = __webpack_require__(/*! @uifabric/utilities */ "../../node_modules/@uifabric/utilities/lib/index.js");
var getStyles = utilities_1.memoizeFunction(function (theme, customStyles) {
    if (!theme) {
        theme = styling_1.getTheme();
    }
    var DefaultStyles = {
        root: {
            position: "relative",
            width: 228,
            minWidth: 228,
            height: 185,
            margin: 16,
            backgroundColor: theme.palette.white,
            boxShadow: "0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12)",
            border: "1px solid transparent",
            selectors: {
                "&:hover": {
                    border: "1px solid " + theme.palette.themeSecondary
                }
            }
        },
        clickableRoot: {
            cursor: "pointer"
        },
        previewContainer: {
            position: "absolute",
            display: "flex",
            justifyContent: "center",
            alignItems: "center",
            top: 0,
            left: 0,
            right: 0,
            height: 145
        },
        details: {
            position: "absolute",
            left: 0,
            bottom: 0,
            right: 0,
            height: 40,
            paddingLeft: 8,
            paddingRight: 8,
            paddingBottom: 8,
            color: theme.palette.neutralDark
        },
        title: {
            fontWeight: styling_1.FontWeights.semibold
        },
        shortDescription: {
            fontWeight: styling_1.FontWeights.light,
            textOverflow: "ellipsis",
            overflow: "hidden",
            whiteSpace: "nowrap"
        }
    };
    return styling_1.concatStyleSets(DefaultStyles, customStyles);
});
exports.getStyles = getStyles;


/***/ }),

/***/ "../ozone/lib/listing/component/ListingList.classNames.js":
/*!****************************************************************!*\
  !*** ../ozone/lib/listing/component/ListingList.classNames.js ***!
  \****************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var styling_1 = __webpack_require__(/*! @uifabric/styling */ "../../node_modules/@uifabric/styling/lib/index.js");
var utilities_1 = __webpack_require__(/*! @uifabric/utilities */ "../../node_modules/@uifabric/utilities/lib/index.js");
var getClassNames = utilities_1.memoizeFunction(function (styles, className, compact, wrapping) {
    return {
        root: styling_1.mergeStyles("listing-list", className, styles.root, compact && styles.compactRoot, wrapping && styles.wrappingRoot)
    };
});
exports.getClassNames = getClassNames;


/***/ }),

/***/ "../ozone/lib/listing/component/ListingList.js":
/*!*****************************************************!*\
  !*** ../ozone/lib/listing/component/ListingList.js ***!
  \*****************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var React = __webpack_require__(/*! react */ "../../node_modules/react/index.js");
var Sync_1 = __webpack_require__(/*! @twii/core-ui-fabric/lib/component/Sync */ "../core-ui-fabric/lib/component/Sync.js");
var ListingCard_1 = __webpack_require__(/*! ./ListingCard */ "../ozone/lib/listing/component/ListingCard.js");
var ListingList_styles_1 = __webpack_require__(/*! ./ListingList.styles */ "../ozone/lib/listing/component/ListingList.styles.js");
var ListingList_classNames_1 = __webpack_require__(/*! ./ListingList.classNames */ "../ozone/lib/listing/component/ListingList.classNames.js");
var defaultListingRenderer = function (listing, index, props) {
    return React.createElement(ListingCard_1.ListingCard, { key: listing.id, listing: listing, onClick: props.onSelectItem });
};
var ListingList = /** @class */ (function (_super) {
    __extends(ListingList, _super);
    function ListingList() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this._onRenderListing = function (listing, index) {
            var r = _this.props.onRenderListing || defaultListingRenderer;
            return r(listing, index, _this.props);
        };
        return _this;
    }
    ListingList.prototype.render = function () {
        if (this.props.listings && this.props.listings.length > 0) {
            var classNames = ListingList_classNames_1.getClassNames(ListingList_styles_1.getStyles(undefined, this.props.styles), this.props.className, this.props.compact, this.props.wrapping);
            var items = this.props.listings.map(this._onRenderListing);
            return (React.createElement("div", { className: classNames.root }, items));
        }
        return this.props.onRenderEmpty ? this.props.onRenderEmpty() : null;
    };
    return ListingList;
}(React.Component));
exports.ListingList = ListingList;
var ListingListContainer = /** @class */ (function (_super) {
    __extends(ListingListContainer, _super);
    function ListingListContainer() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this._onRenderDone = function () {
            return React.createElement(ListingList, { listings: _this.props.listings.itemsView, onSelectItem: _this.props.onSelectItem, compact: _this.props.compact, wrapping: _this.props.wrapping });
        };
        return _this;
    }
    ListingListContainer.prototype.componentWillMount = function () {
        this.props.listings.load();
    };
    ListingListContainer.prototype.render = function () {
        return React.createElement(Sync_1.Sync, { sync: this.props.listings.sync, onRenderDone: this._onRenderDone, syncLabel: "Loading Listings..." });
    };
    return ListingListContainer;
}(React.Component));
exports.ListingListContainer = ListingListContainer;


/***/ }),

/***/ "../ozone/lib/listing/component/ListingList.styles.js":
/*!************************************************************!*\
  !*** ../ozone/lib/listing/component/ListingList.styles.js ***!
  \************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var styling_1 = __webpack_require__(/*! @uifabric/styling */ "../../node_modules/@uifabric/styling/lib/index.js");
var utilities_1 = __webpack_require__(/*! @uifabric/utilities */ "../../node_modules/@uifabric/utilities/lib/index.js");
var getStyles = utilities_1.memoizeFunction(function (theme, customStyles) {
    if (!theme) {
        theme = styling_1.getTheme();
    }
    var DefaultStyles = {
        root: {},
        compactRoot: {
            display: "flex",
            alignItems: "center"
        },
        wrappingRoot: {
            flexWrap: "wrap"
        }
    };
    return styling_1.concatStyleSets(DefaultStyles, customStyles);
});
exports.getStyles = getStyles;


/***/ }),

/***/ "../ozone/lib/listing/component/ListingMenuHelper.js":
/*!***********************************************************!*\
  !*** ../ozone/lib/listing/component/ListingMenuHelper.js ***!
  \***********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var React = __webpack_require__(/*! react */ "../../node_modules/react/index.js");
var UserAdminContext_1 = __webpack_require__(/*! ../../user/UserAdminContext */ "../ozone/lib/user/UserAdminContext.js");
var Spinner_1 = __webpack_require__(/*! office-ui-fabric-react/lib/Spinner */ "../../node_modules/office-ui-fabric-react/lib/Spinner.js");
var Image_1 = __webpack_require__(/*! office-ui-fabric-react/lib/Image */ "../../node_modules/office-ui-fabric-react/lib/Image.js");
var onClickPlaceItem = function (e, item) {
    item.host.load({ path: item.path });
};
var createPlaceItem = function (host, item) {
    var r = Object.assign({}, item);
    r.host = host;
    r.canCheck = true;
    r.checked = item.hostCheck ? item.hostCheck(host) : host.path === item.path;
    r.active = r.checked;
    r.className = r.active ? "active" : undefined;
    if (!r.onClick) {
        r.onClick = onClickPlaceItem;
    }
    return r;
};
exports.createPlaceItem = createPlaceItem;
var createPlaceItems = function (opts) {
    var r = [
        createPlaceItem(opts.host, {
            key: "bookmarks",
            name: "Bookmarks",
            path: "/ozone/bookmarks",
            iconProps: {
                iconName: "DoubleBookmark"
            }
        }),
        createPlaceItem(opts.host, {
            key: "store",
            name: "Store",
            path: "/ozone/store",
            iconProps: {
                iconName: "Shop"
            }
        })
    ];
    if (UserAdminContext_1.UserAdminContext.value(opts.userProfile)) {
        r.push(createPlaceItem(opts.host, {
            key: "allListings",
            name: "All Listings",
            path: "/ozone/listings",
            iconProps: {
                iconName: "ViewAll"
            }
        }));
    }
    return r;
};
exports.createPlaceItems = createPlaceItems;
var createPlaceMenu = function (opts) {
    var placeItems = opts.placeItems || createPlaceItems(opts);
    if (opts.host.sync.syncing) {
        return {
            key: "place",
            name: "Loading...",
            onRenderIcon: function () {
                return React.createElement(Spinner_1.Spinner, { size: Spinner_1.SpinnerSize.small });
            },
            subMenuProps: {
                items: placeItems
            }
        };
    }
    var checkedItem = placeItems.find(function (item) { return item.checked; });
    if (checkedItem) {
        return {
            key: "place",
            name: checkedItem.name,
            iconProps: checkedItem.iconProps,
            onRenderIcon: checkedItem.onRenderIcon,
            subMenuProps: {
                items: placeItems
            }
        };
    }
    return {
        key: "place",
        name: opts.host.title,
        subMenuProps: {
            items: placeItems
        }
    };
};
exports.createPlaceMenu = createPlaceMenu;
var defaultRenderTitle = function (listingSupplier) {
    return listingSupplier.value.title;
};
var createListingPlaceItem = function (opts) {
    var host = opts.host, listingSupplier = opts.listingSupplier;
    var onRenderTitle = opts.onRenderTitle || defaultRenderTitle;
    return createPlaceItem(host, {
        key: opts.key,
        name: listingSupplier.sync.syncing ? "Loading..." : onRenderTitle(listingSupplier),
        path: opts.path,
        onRenderIcon: function () {
            if (listingSupplier.sync.syncing) {
                return React.createElement(Spinner_1.Spinner, { size: Spinner_1.SpinnerSize.small });
            }
            return listingSupplier.value.small_icon ? React.createElement(Image_1.Image, { src: listingSupplier.value.small_icon.url }) : null;
        }
    });
};
exports.createListingPlaceItem = createListingPlaceItem;


/***/ }),

/***/ "../ozone/lib/listing/component/ListingPreview.classNames.js":
/*!*******************************************************************!*\
  !*** ../ozone/lib/listing/component/ListingPreview.classNames.js ***!
  \*******************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var styling_1 = __webpack_require__(/*! @uifabric/styling */ "../../node_modules/@uifabric/styling/lib/index.js");
var utilities_1 = __webpack_require__(/*! @uifabric/utilities */ "../../node_modules/@uifabric/utilities/lib/index.js");
var getClassNames = utilities_1.memoizeFunction(function (styles, className) {
    return {
        root: styling_1.mergeStyles("listing-preview", className, styles.root),
        fallback: styling_1.mergeStyles("listing-preview-fallback", styles.fallback),
        fallbackIcon: styling_1.mergeStyles("listing-preview-fallback-icon", styles.fallbackIcon)
    };
});
exports.getClassNames = getClassNames;


/***/ }),

/***/ "../ozone/lib/listing/component/ListingPreview.js":
/*!********************************************************!*\
  !*** ../ozone/lib/listing/component/ListingPreview.js ***!
  \********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
var React = __webpack_require__(/*! react */ "../../node_modules/react/index.js");
var mobx_react_1 = __webpack_require__(/*! mobx-react */ "../../node_modules/mobx-react/index.module.js");
var ListingPreview_styles_1 = __webpack_require__(/*! ./ListingPreview.styles */ "../ozone/lib/listing/component/ListingPreview.styles.js");
var ListingPreview_classNames_1 = __webpack_require__(/*! ./ListingPreview.classNames */ "../ozone/lib/listing/component/ListingPreview.classNames.js");
var Image_1 = __webpack_require__(/*! office-ui-fabric-react/lib/Image */ "../../node_modules/office-ui-fabric-react/lib/Image.js");
var Icon_1 = __webpack_require__(/*! office-ui-fabric-react/lib/Icon */ "../../node_modules/office-ui-fabric-react/lib/Icon.js");
var ListingPreview = /** @class */ (function (_super) {
    __extends(ListingPreview, _super);
    function ListingPreview() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    ListingPreview.prototype._renderFallback = function () {
        return React.createElement("div", { className: this._classNames.fallback },
            React.createElement(Icon_1.Icon, { className: this._classNames.fallbackIcon, iconName: "Puzzle" }));
    };
    ListingPreview.prototype.render = function () {
        this._classNames = ListingPreview_classNames_1.getClassNames(ListingPreview_styles_1.getStyles(undefined, this.props.styles), this.props.className);
        var fallback;
        var image;
        if (this.props.listing.banner_icon && this.props.listing.banner_icon.url) {
            image = React.createElement(Image_1.Image, { src: this.props.listing.banner_icon.url, alt: this.props.listing.title, width: 220, height: 137 });
        }
        else {
            image = this._renderFallback();
        }
        return (React.createElement("div", { className: this._classNames.root }, image));
    };
    ListingPreview = __decorate([
        mobx_react_1.observer
    ], ListingPreview);
    return ListingPreview;
}(React.Component));
exports.ListingPreview = ListingPreview;


/***/ }),

/***/ "../ozone/lib/listing/component/ListingPreview.styles.js":
/*!***************************************************************!*\
  !*** ../ozone/lib/listing/component/ListingPreview.styles.js ***!
  \***************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var styling_1 = __webpack_require__(/*! @uifabric/styling */ "../../node_modules/@uifabric/styling/lib/index.js");
var utilities_1 = __webpack_require__(/*! @uifabric/utilities */ "../../node_modules/@uifabric/utilities/lib/index.js");
var getStyles = utilities_1.memoizeFunction(function (theme, customStyles) {
    if (!theme) {
        theme = styling_1.getTheme();
    }
    var DefaultStyles = {
        root: {
            display: "flex",
            justifyContent: "center",
            alignItems: "center",
            width: 228,
            height: 145
        },
        fallback: {
            display: "flex",
            justifyContent: "center",
            alignItems: "center",
            width: 220,
            height: 137,
            backgroundColor: theme.palette.neutralLight,
            color: theme.palette.themePrimary
        },
        fallbackIcon: {
            fontSize: styling_1.FontSizes.xxLarge
        }
    };
    return styling_1.concatStyleSets(DefaultStyles, customStyles);
});
exports.getStyles = getStyles;


/***/ }),

/***/ "../ozone/lib/listing/component/ListingStoreFront.classNames.js":
/*!**********************************************************************!*\
  !*** ../ozone/lib/listing/component/ListingStoreFront.classNames.js ***!
  \**********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var styling_1 = __webpack_require__(/*! @uifabric/styling */ "../../node_modules/@uifabric/styling/lib/index.js");
var utilities_1 = __webpack_require__(/*! @uifabric/utilities */ "../../node_modules/@uifabric/utilities/lib/index.js");
var getClassNames = utilities_1.memoizeFunction(function (styles, className) {
    return {
        root: styling_1.mergeStyles("listing-store-front", className, styles.root),
        header: styling_1.mergeStyles("listing-store-front-header", styles.header),
        searchInputContainer: styling_1.mergeStyles("listing-store-front-search-input-container", styles.searchInputContainer),
        body: styling_1.mergeStyles("listing-store-front-body", styles.body),
        section: styling_1.mergeStyles("listing-store-front-section", styles.section),
        sectionHeader: styling_1.mergeStyles("listing-store-front-section-header", styles.sectionHeader),
        sectionTitle: styling_1.mergeStyles("listing-store-front-section-title", styles.sectionTitle),
        sectionBody: styling_1.mergeStyles("listing-store-front-section-body", styles.sectionBody)
    };
});
exports.getClassNames = getClassNames;


/***/ }),

/***/ "../ozone/lib/listing/component/ListingStoreFront.js":
/*!***********************************************************!*\
  !*** ../ozone/lib/listing/component/ListingStoreFront.js ***!
  \***********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __assign = (this && this.__assign) || Object.assign || function(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
    }
    return t;
};
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
var React = __webpack_require__(/*! react */ "../../node_modules/react/index.js");
var mobx_react_1 = __webpack_require__(/*! mobx-react */ "../../node_modules/mobx-react/index.module.js");
var Sync_1 = __webpack_require__(/*! @twii/core-ui-fabric/lib/component/Sync */ "../core-ui-fabric/lib/component/Sync.js");
var ListingList_1 = __webpack_require__(/*! ./ListingList */ "../ozone/lib/listing/component/ListingList.js");
var ListingStoreFront_styles_1 = __webpack_require__(/*! ./ListingStoreFront.styles */ "../ozone/lib/listing/component/ListingStoreFront.styles.js");
var ListingStoreFront_classNames_1 = __webpack_require__(/*! ./ListingStoreFront.classNames */ "../ozone/lib/listing/component/ListingStoreFront.classNames.js");
var SearchBox_1 = __webpack_require__(/*! office-ui-fabric-react/lib/SearchBox */ "../../node_modules/office-ui-fabric-react/lib/SearchBox.js");
var MessageBar_1 = __webpack_require__(/*! office-ui-fabric-react/lib/MessageBar */ "../../node_modules/office-ui-fabric-react/lib/MessageBar.js");
var StringUtils_1 = __webpack_require__(/*! @twii/core/lib/StringUtils */ "../core/lib/StringUtils.js");
var ListingStoreFrontSection = /** @class */ (function (_super) {
    __extends(ListingStoreFrontSection, _super);
    function ListingStoreFrontSection() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    ListingStoreFrontSection.prototype.render = function () {
        var classNames = ListingStoreFront_classNames_1.getClassNames(ListingStoreFront_styles_1.getStyles(undefined));
        return (React.createElement("div", { className: classNames.section },
            React.createElement("div", { className: classNames.sectionHeader },
                React.createElement("div", { className: classNames.sectionTitle }, this.props.title)),
            React.createElement("div", { className: classNames.sectionBody }, this.props.children)));
    };
    ListingStoreFrontSection = __decorate([
        mobx_react_1.observer
    ], ListingStoreFrontSection);
    return ListingStoreFrontSection;
}(React.Component));
var ListingStoreFrontFeaturedSection = /** @class */ (function (_super) {
    __extends(ListingStoreFrontFeaturedSection, _super);
    function ListingStoreFrontFeaturedSection() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this._onRenderDone = function () {
            var featured = _this.props.storeFront.value ? _this.props.storeFront.value.featured : undefined;
            if (featured && featured.length > 0) {
                return React.createElement(ListingList_1.ListingList, { listings: featured, compact: true, wrapping: true, onSelectItem: _this.props.onSelectItem });
            }
            return React.createElement(MessageBar_1.MessageBar, { messageBarType: MessageBar_1.MessageBarType.info }, "No Featured Listings available");
        };
        return _this;
    }
    ListingStoreFrontFeaturedSection.prototype.render = function () {
        return (React.createElement(ListingStoreFrontSection, { title: "Featured" },
            React.createElement(Sync_1.Sync, { sync: this.props.storeFront.sync, onRenderDone: this._onRenderDone, syncLabel: "Loading Featured Listings..." })));
    };
    return ListingStoreFrontFeaturedSection;
}(React.Component));
var ListingStoreFrontMostPopularSection = /** @class */ (function (_super) {
    __extends(ListingStoreFrontMostPopularSection, _super);
    function ListingStoreFrontMostPopularSection() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this._onRenderDone = function () {
            var mostPopular = _this.props.storeFront.value ? _this.props.storeFront.value.most_popular : undefined;
            if (mostPopular && mostPopular.length > 0) {
                return React.createElement(ListingList_1.ListingList, { listings: mostPopular, compact: true, wrapping: true, onSelectItem: _this.props.onSelectItem });
            }
            return React.createElement(MessageBar_1.MessageBar, { messageBarType: MessageBar_1.MessageBarType.info }, "No Most Popular Listings available");
        };
        return _this;
    }
    ListingStoreFrontMostPopularSection.prototype.render = function () {
        return (React.createElement(ListingStoreFrontSection, { title: "Most Popular" },
            React.createElement(Sync_1.Sync, { sync: this.props.storeFront.sync, onRenderDone: this._onRenderDone, syncLabel: "Loading Most Popular Listings..." })));
    };
    return ListingStoreFrontMostPopularSection;
}(React.Component));
var ListingStoreFrontRecommendedSection = /** @class */ (function (_super) {
    __extends(ListingStoreFrontRecommendedSection, _super);
    function ListingStoreFrontRecommendedSection() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this._onRenderDone = function () {
            var recommended = _this.props.storeFront.value ? _this.props.storeFront.value.recommended : undefined;
            if (recommended && recommended.length > 0) {
                return React.createElement(ListingList_1.ListingList, { listings: recommended, compact: true, wrapping: true, onSelectItem: _this.props.onSelectItem });
            }
            return React.createElement(MessageBar_1.MessageBar, { messageBarType: MessageBar_1.MessageBarType.info }, "No Recommended Listings available");
        };
        return _this;
    }
    ListingStoreFrontRecommendedSection.prototype.render = function () {
        return (React.createElement(ListingStoreFrontSection, { title: "Recommended" },
            React.createElement(Sync_1.Sync, { sync: this.props.storeFront.sync, onRenderDone: this._onRenderDone, syncLabel: "Loading Recommended Listings..." })));
    };
    return ListingStoreFrontRecommendedSection;
}(React.Component));
var ListingStoreFrontRecentSection = /** @class */ (function (_super) {
    __extends(ListingStoreFrontRecentSection, _super);
    function ListingStoreFrontRecentSection() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this._onRenderDone = function () {
            var recent = _this.props.storeFront.value ? _this.props.storeFront.value.recent : undefined;
            if (recent && recent.length > 0) {
                return React.createElement(ListingList_1.ListingList, { listings: recent, compact: true, wrapping: true, onSelectItem: _this.props.onSelectItem });
            }
            return React.createElement(MessageBar_1.MessageBar, { messageBarType: MessageBar_1.MessageBarType.info }, "No Recent Listings available");
        };
        return _this;
    }
    ListingStoreFrontRecentSection.prototype.render = function () {
        return (React.createElement(ListingStoreFrontSection, { title: "Recent" },
            React.createElement(Sync_1.Sync, { sync: this.props.storeFront.sync, onRenderDone: this._onRenderDone, syncLabel: "Loading Recent Listings..." })));
    };
    return ListingStoreFrontRecentSection;
}(React.Component));
var ListingStoreFrontSearchInput = /** @class */ (function (_super) {
    __extends(ListingStoreFrontSearchInput, _super);
    function ListingStoreFrontSearchInput() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this._onSearchChange = function (newValue) {
            _this.props.storeFront.setSearchText(newValue);
        };
        return _this;
    }
    ListingStoreFrontSearchInput.prototype.render = function () {
        return React.createElement(SearchBox_1.SearchBox, { value: this.props.storeFront.searchText, placeholder: "Search Store", onChange: this._onSearchChange });
    };
    ListingStoreFrontSearchInput = __decorate([
        mobx_react_1.observer
    ], ListingStoreFrontSearchInput);
    return ListingStoreFrontSearchInput;
}(React.Component));
var ListingStoreFrontSearchResultsSection = /** @class */ (function (_super) {
    __extends(ListingStoreFrontSearchResultsSection, _super);
    function ListingStoreFrontSearchResultsSection() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this._onRenderDone = function () {
            if (_this.props.storeFront.searchResults && _this.props.storeFront.searchResults.length > 0) {
                return React.createElement(ListingList_1.ListingList, { listings: _this.props.storeFront.searchResults, compact: true, onSelectItem: _this.props.onSelectItem });
            }
            return React.createElement(MessageBar_1.MessageBar, { messageBarType: MessageBar_1.MessageBarType.info }, "No matching listings found");
        };
        return _this;
    }
    ListingStoreFrontSearchResultsSection.prototype.render = function () {
        if (StringUtils_1.isNotBlank(this.props.storeFront.searchText)) {
            return (React.createElement(ListingStoreFrontSection, { title: React.createElement("span", null,
                    "Listings matching ",
                    React.createElement("strong", null, this.props.storeFront.searchText)) },
                React.createElement(Sync_1.Sync, { sync: this.props.storeFront.searchSync, onRenderDone: this._onRenderDone, syncLabel: "Searching Listings..." })));
        }
        return null;
    };
    ListingStoreFrontSearchResultsSection = __decorate([
        mobx_react_1.observer
    ], ListingStoreFrontSearchResultsSection);
    return ListingStoreFrontSearchResultsSection;
}(React.Component));
var ListingStoreFront = /** @class */ (function (_super) {
    __extends(ListingStoreFront, _super);
    function ListingStoreFront() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this._onClickAdd = function () {
            _this.props.onAdd();
        };
        return _this;
    }
    ListingStoreFront.prototype.render = function () {
        var styles = ListingStoreFront_styles_1.getStyles(undefined, this.props.styles);
        var classNames = ListingStoreFront_classNames_1.getClassNames(styles);
        return (React.createElement("div", { className: classNames.root },
            React.createElement("div", { className: classNames.header },
                React.createElement("div", { className: classNames.searchInputContainer },
                    React.createElement(ListingStoreFrontSearchInput, __assign({}, this.props)))),
            React.createElement("div", { className: classNames.body },
                React.createElement(ListingStoreFrontSearchResultsSection, __assign({}, this.props)),
                React.createElement(ListingStoreFrontFeaturedSection, __assign({}, this.props)),
                React.createElement(ListingStoreFrontMostPopularSection, __assign({}, this.props)),
                React.createElement(ListingStoreFrontRecommendedSection, __assign({}, this.props)),
                React.createElement(ListingStoreFrontRecentSection, __assign({}, this.props)))));
    };
    return ListingStoreFront;
}(React.Component));
exports.ListingStoreFront = ListingStoreFront;
var ListingStoreFrontContainer = /** @class */ (function (_super) {
    __extends(ListingStoreFrontContainer, _super);
    function ListingStoreFrontContainer() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    ListingStoreFrontContainer.prototype.componentWillMount = function () {
        this.props.storeFront.load();
    };
    ListingStoreFrontContainer.prototype.render = function () {
        return React.createElement(ListingStoreFront, __assign({}, this.props));
    };
    return ListingStoreFrontContainer;
}(React.Component));
exports.ListingStoreFrontContainer = ListingStoreFrontContainer;


/***/ }),

/***/ "../ozone/lib/listing/component/ListingStoreFront.styles.js":
/*!******************************************************************!*\
  !*** ../ozone/lib/listing/component/ListingStoreFront.styles.js ***!
  \******************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var styling_1 = __webpack_require__(/*! @uifabric/styling */ "../../node_modules/@uifabric/styling/lib/index.js");
var utilities_1 = __webpack_require__(/*! @uifabric/utilities */ "../../node_modules/@uifabric/utilities/lib/index.js");
var getStyles = utilities_1.memoizeFunction(function (theme, customStyles) {
    if (!theme) {
        theme = styling_1.getTheme();
    }
    var DefaultStyles = {
        root: {},
        header: {
            paddingTop: 8,
            paddingBottom: 0,
            paddingLeft: 16,
            paddingRight: 16
        },
        searchInputContainer: {
            selectors: {
                ".ms-SearchBox": {
                    backgroundColor: theme.palette.white
                }
            }
        },
        body: {},
        section: {
            marginTop: 16
        },
        sectionHeader: {
            marginLeft: 16
        },
        sectionTitle: Object.assign({}, theme.fonts.large, {
            fontWeight: styling_1.FontWeights.semibold
        }),
        sectionBody: {}
    };
    return styling_1.concatStyleSets(DefaultStyles, customStyles);
});
exports.getStyles = getStyles;


/***/ }),

/***/ "../ozone/lib/listing/component/ListingStoreFrontApp.js":
/*!**************************************************************!*\
  !*** ../ozone/lib/listing/component/ListingStoreFrontApp.js ***!
  \**************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
var React = __webpack_require__(/*! react */ "../../node_modules/react/index.js");
var mobx_react_1 = __webpack_require__(/*! mobx-react */ "../../node_modules/mobx-react/index.module.js");
var ListingStoreFront_1 = __webpack_require__(/*! ./ListingStoreFront */ "../ozone/lib/listing/component/ListingStoreFront.js");
var ListingStoreFrontModel_1 = __webpack_require__(/*! ../model/ListingStoreFrontModel */ "../ozone/lib/listing/model/ListingStoreFrontModel.js");
var HostAppView_1 = __webpack_require__(/*! @twii/core-ui-fabric/lib/component/HostAppView */ "../core-ui-fabric/lib/component/HostAppView.js");
var ListingMenuHelper_1 = __webpack_require__(/*! ./ListingMenuHelper */ "../ozone/lib/listing/component/ListingMenuHelper.js");
var ListingStoreFrontApp = /** @class */ (function (_super) {
    __extends(ListingStoreFrontApp, _super);
    function ListingStoreFrontApp() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this._onSelectItem = function (listing) {
            _this.host.load({ path: "/ozone/listings/" + listing.id });
        };
        _this._onAdd = function () {
            _this.host.load({ path: "/ozone/listings/add" });
        };
        _this._onRefresh = function () {
            _this.listingStoreFront.refresh();
        };
        return _this;
    }
    Object.defineProperty(ListingStoreFrontApp.prototype, "host", {
        get: function () {
            return this.props.match.host;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ListingStoreFrontApp.prototype, "userProfile", {
        get: function () {
            return this.props.match.userProfile;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ListingStoreFrontApp.prototype, "listingStoreFront", {
        get: function () {
            return this.host.getState("listingStoreFront", function () {
                return new ListingStoreFrontModel_1.ListingStoreFrontModel();
            });
        },
        enumerable: true,
        configurable: true
    });
    ListingStoreFrontApp.prototype.componentWillMount = function () {
        this.host.setTitle("Store");
    };
    ListingStoreFrontApp.prototype.render = function () {
        var items = [
            ListingMenuHelper_1.createPlaceMenu({ host: this.host, userProfile: this.userProfile }),
            {
                key: "add",
                name: "Add Listing",
                iconProps: {
                    iconName: "Add"
                },
                onClick: this._onAdd
            }
        ];
        var farItems = [
            {
                key: "refresh",
                name: "Refresh",
                iconProps: {
                    iconName: "Refresh"
                },
                onClick: this._onRefresh,
                disabled: this.listingStoreFront.sync.syncing
            }
        ];
        return (React.createElement(HostAppView_1.HostAppView, { host: this.host, commandBarProps: { items: items, farItems: farItems } },
            React.createElement(ListingStoreFront_1.ListingStoreFrontContainer, { storeFront: this.listingStoreFront, onSelectItem: this._onSelectItem })));
    };
    ListingStoreFrontApp = __decorate([
        mobx_react_1.observer
    ], ListingStoreFrontApp);
    return ListingStoreFrontApp;
}(React.Component));
exports.ListingStoreFrontApp = ListingStoreFrontApp;
exports.default = ListingStoreFrontApp;


/***/ }),

/***/ "../ozone/lib/listing/model/ListingStoreFrontModel.js":
/*!************************************************************!*\
  !*** ../ozone/lib/listing/model/ListingStoreFrontModel.js ***!
  \************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
var mobx_1 = __webpack_require__(/*! mobx */ "../../node_modules/mobx/lib/mobx.module.js");
var ListingServiceContext_1 = __webpack_require__(/*! ../service/ListingServiceContext */ "../ozone/lib/listing/service/ListingServiceContext.js");
var StringUtils_1 = __webpack_require__(/*! @twii/core/lib/StringUtils */ "../core/lib/StringUtils.js");
var SyncSupplier_1 = __webpack_require__(/*! @twii/core/lib/model/SyncSupplier */ "../core/lib/model/SyncSupplier.js");
var Sync_1 = __webpack_require__(/*! @twii/core/lib/model/Sync */ "../core/lib/model/Sync.js");
var ListingStoreFrontModel = /** @class */ (function (_super) {
    __extends(ListingStoreFrontModel, _super);
    function ListingStoreFrontModel() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.searchSync = new Sync_1.Sync();
        _this.searchResults = [];
        _this._searchDelay = 500;
        _this._onSearchDone = function (results) {
            delete _this._searchTimeout;
            _this.searchResults = [];
            if (results) {
                results.forEach(function (r) {
                    _this.searchResults.push(r);
                });
            }
            _this.searchSync.syncEnd();
        };
        _this._onSearchError = function (error) {
            _this.searchResults = [];
            _this.searchSync.syncError(error);
        };
        _this._searchImpl = function () {
            var search = _this.searchText;
            if (StringUtils_1.isNotBlank(search)) {
                return ListingServiceContext_1.ListingServiceContext.value.searchListings({
                    search: search
                }).then(function (results) {
                    if (search === _this.searchText) {
                        _this._onSearchDone(results);
                    }
                }).catch(function (error) {
                    if (search === _this.searchText) {
                        _this._onSearchError(error);
                    }
                });
            }
            _this.sync.syncEnd();
            return Promise.resolve();
        };
        _this._refreshDone = function (data) {
            _this.setValue(data);
            _this.sync.syncEnd();
        };
        _this._refreshError = function (error) {
            _this.clearValue();
            _this.sync.syncError(error);
        };
        return _this;
    }
    ListingStoreFrontModel.prototype.setSearchText = function (searchText) {
        if (searchText !== this.searchText) {
            this.searchText = searchText;
            if (this._searchTimeout) {
                clearTimeout(this._searchTimeout);
            }
            if (StringUtils_1.isNotBlank(searchText)) {
                this.searchSync.syncStart({ type: "search" });
                this._searchTimeout = setTimeout(this._searchImpl, this._searchDelay);
            }
            else {
                this.searchSync.syncEnd();
            }
        }
    };
    ListingStoreFrontModel.prototype.refresh = function () {
        var ps = [];
        this.sync.syncStart();
        ps.push(ListingServiceContext_1.ListingServiceContext.value.getStoreFront().then(this._refreshDone).catch(this._refreshError));
        if (StringUtils_1.isNotBlank(this.searchText)) {
            this.sync.syncStart({ type: "search" });
            ps.push(this._searchImpl());
        }
        return Promise.all(ps);
    };
    __decorate([
        mobx_1.observable
    ], ListingStoreFrontModel.prototype, "searchSync", void 0);
    __decorate([
        mobx_1.observable
    ], ListingStoreFrontModel.prototype, "searchText", void 0);
    __decorate([
        mobx_1.observable
    ], ListingStoreFrontModel.prototype, "searchResults", void 0);
    __decorate([
        mobx_1.action
    ], ListingStoreFrontModel.prototype, "_onSearchDone", void 0);
    __decorate([
        mobx_1.action
    ], ListingStoreFrontModel.prototype, "_onSearchError", void 0);
    __decorate([
        mobx_1.action
    ], ListingStoreFrontModel.prototype, "setSearchText", null);
    __decorate([
        mobx_1.action
    ], ListingStoreFrontModel.prototype, "_refreshDone", void 0);
    __decorate([
        mobx_1.action
    ], ListingStoreFrontModel.prototype, "_refreshError", void 0);
    __decorate([
        mobx_1.action
    ], ListingStoreFrontModel.prototype, "refresh", null);
    return ListingStoreFrontModel;
}(SyncSupplier_1.SyncSupplier));
exports.ListingStoreFrontModel = ListingStoreFrontModel;


/***/ }),

/***/ "../ozone/lib/user/UserAdminContext.js":
/*!*********************************************!*\
  !*** ../ozone/lib/user/UserAdminContext.js ***!
  \*********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Context_1 = __webpack_require__(/*! @twii/core/lib/Context */ "../core/lib/Context.js");
var StringUtils_1 = __webpack_require__(/*! @twii/core/lib/StringUtils */ "../core/lib/StringUtils.js");
var defaultAdminCheck = function (userProfile) {
    return userProfile.user && userProfile.user.groups && userProfile.user.groups.some(function (g) {
        return StringUtils_1.equalsIgnoreCase(g.name, "admin");
    });
};
var UserAdminContext = new Context_1.Context({
    value: defaultAdminCheck
});
exports.UserAdminContext = UserAdminContext;


/***/ })

}]);
//# sourceMappingURL=32.js.map