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

/***/ "../../node_modules/office-ui-fabric-react/lib/Image.js":
/*!**********************************************************************************!*\
  !*** C:/workspace/gitfish/twii/node_modules/office-ui-fabric-react/lib/Image.js ***!
  \**********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js");
tslib_1.__exportStar(__webpack_require__(/*! ./components/Image/index */ "../../node_modules/office-ui-fabric-react/lib/components/Image/index.js"), exports);
//# sourceMappingURL=Image.js.map

/***/ }),

/***/ "../../node_modules/office-ui-fabric-react/lib/SearchBox.js":
/*!**************************************************************************************!*\
  !*** C:/workspace/gitfish/twii/node_modules/office-ui-fabric-react/lib/SearchBox.js ***!
  \**************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js");
tslib_1.__exportStar(__webpack_require__(/*! ./components/SearchBox/index */ "../../node_modules/office-ui-fabric-react/lib/components/SearchBox/index.js"), exports);
//# sourceMappingURL=SearchBox.js.map

/***/ }),

/***/ "../../node_modules/office-ui-fabric-react/lib/components/Image/index.js":
/*!***************************************************************************************************!*\
  !*** C:/workspace/gitfish/twii/node_modules/office-ui-fabric-react/lib/components/Image/index.js ***!
  \***************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js");
tslib_1.__exportStar(__webpack_require__(/*! ./Image */ "../../node_modules/office-ui-fabric-react/lib/components/Image/Image.js"), exports);
tslib_1.__exportStar(__webpack_require__(/*! ./Image.base */ "../../node_modules/office-ui-fabric-react/lib/components/Image/Image.base.js"), exports);
tslib_1.__exportStar(__webpack_require__(/*! ./Image.types */ "../../node_modules/office-ui-fabric-react/lib/components/Image/Image.types.js"), exports);
//# sourceMappingURL=index.js.map

/***/ }),

/***/ "../../node_modules/office-ui-fabric-react/lib/components/SearchBox/SearchBox.base.js":
/*!****************************************************************************************************************!*\
  !*** C:/workspace/gitfish/twii/node_modules/office-ui-fabric-react/lib/components/SearchBox/SearchBox.base.js ***!
  \****************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js");
var React = __webpack_require__(/*! react */ "../../node_modules/react/index.js");
var Utilities_1 = __webpack_require__(/*! ../../Utilities */ "../../node_modules/office-ui-fabric-react/lib/Utilities.js");
var Button_1 = __webpack_require__(/*! ../../Button */ "../../node_modules/office-ui-fabric-react/lib/Button.js");
var Icon_1 = __webpack_require__(/*! ../../Icon */ "../../node_modules/office-ui-fabric-react/lib/Icon.js");
var getClassNames = Utilities_1.classNamesFunction();
var SearchBoxBase = /** @class */ (function (_super) {
    tslib_1.__extends(SearchBoxBase, _super);
    function SearchBoxBase(props) {
        var _this = _super.call(this, props) || this;
        _this._rootElement = Utilities_1.createRef();
        _this._inputElement = Utilities_1.createRef();
        _this._onClickFocus = function () {
            var inputElement = _this._inputElement.value;
            if (inputElement) {
                _this.focus();
                inputElement.selectionStart = inputElement.selectionEnd = 0;
            }
        };
        _this._onFocusCapture = function (ev) {
            _this.setState({
                hasFocus: true
            });
            _this._events.on(_this._rootElement.current, 'blur', _this._onBlur, true);
            if (_this.props.onFocus) {
                _this.props.onFocus(ev);
            }
        };
        _this._onClearClick = function (ev) {
            var clearButtonProps = _this.props.clearButtonProps;
            if (clearButtonProps && clearButtonProps.onClick) {
                clearButtonProps.onClick(ev);
            }
            if (!ev.defaultPrevented) {
                _this._onClear(ev);
            }
        };
        _this._onKeyDown = function (ev) {
            switch (ev.which) {
                case 27 /* escape */:
                    _this.props.onEscape && _this.props.onEscape(ev);
                    if (!ev.defaultPrevented) {
                        _this._onClear(ev);
                    }
                    break;
                case 13 /* enter */:
                    if (_this.props.onSearch && _this.state.value.length > 0) {
                        _this.props.onSearch(_this.state.value);
                    }
                    break;
                default:
                    _this.props.onKeyDown && _this.props.onKeyDown(ev);
                    if (!ev.defaultPrevented) {
                        return;
                    }
            }
            // We only get here if the keypress has been handled,
            // or preventDefault was called in case of default keyDown handler
            ev.preventDefault();
            ev.stopPropagation();
        };
        _this._onBlur = function (ev) {
            _this._events.off(_this._rootElement.current, 'blur');
            _this.setState({
                hasFocus: false
            });
            if (_this.props.onBlur) {
                _this.props.onBlur(ev);
            }
        };
        _this._onInputChange = function (ev) {
            var value = ev.target.value;
            if (value === _this._latestValue) {
                return;
            }
            _this._latestValue = value;
            _this.setState({ value: value });
            _this._callOnChange(value);
        };
        _this._warnDeprecations({
            'labelText': 'placeholder',
            'defaultValue': 'value'
        });
        _this._latestValue = props.value || '';
        _this.state = {
            value: _this._latestValue,
            hasFocus: false,
            id: Utilities_1.getId('SearchBox')
        };
        return _this;
    }
    SearchBoxBase.prototype.componentWillReceiveProps = function (newProps) {
        if (newProps.value !== undefined) {
            this._latestValue = newProps.value;
            this.setState({
                value: newProps.value
            });
        }
    };
    SearchBoxBase.prototype.render = function () {
        var _a = this.props, ariaLabel = _a.ariaLabel, placeholder = _a.placeholder, className = _a.className, disabled = _a.disabled, underlined = _a.underlined, getStyles = _a.getStyles, labelText = _a.labelText, theme = _a.theme, clearButtonProps = _a.clearButtonProps, disableAnimation = _a.disableAnimation;
        var _b = this.state, value = _b.value, hasFocus = _b.hasFocus, id = _b.id;
        var placeholderValue = labelText === undefined ? placeholder : labelText;
        var classNames = getClassNames(getStyles, {
            theme: theme,
            className: className,
            underlined: underlined,
            hasFocus: hasFocus,
            disabled: disabled,
            hasInput: value.length > 0,
            disableAnimation: disableAnimation
        });
        return (React.createElement("div", { ref: this._rootElement, className: classNames.root, onFocusCapture: this._onFocusCapture },
            React.createElement("div", { className: classNames.iconContainer, onClick: this._onClickFocus },
                React.createElement(Icon_1.Icon, { className: classNames.icon, iconName: 'Search' })),
            React.createElement("input", { id: id, className: classNames.field, placeholder: placeholderValue, onChange: this._onInputChange, onInput: this._onInputChange, onKeyDown: this._onKeyDown, value: value, disabled: this.props.disabled, "aria-label": ariaLabel ? ariaLabel : placeholder, ref: this._inputElement }),
            value.length > 0 &&
                React.createElement("div", { className: classNames.clearButton },
                    React.createElement(Button_1.IconButton, tslib_1.__assign({ styles: { root: { height: 'auto' }, icon: { fontSize: '12px' } }, iconProps: { iconName: 'Clear' } }, clearButtonProps, { onClick: this._onClearClick })))));
    };
    /**
     * Sets focus to the search box input field
     */
    SearchBoxBase.prototype.focus = function () {
        if (this._inputElement.current) {
            this._inputElement.current.focus();
        }
    };
    /**
     * Returns whether or not the SearchBox has focus
     */
    SearchBoxBase.prototype.hasFocus = function () {
        return !!this.state.hasFocus;
    };
    SearchBoxBase.prototype._onClear = function (ev) {
        this.props.onClear && this.props.onClear(ev);
        if (!ev.defaultPrevented) {
            this._latestValue = '';
            this.setState({
                value: ''
            });
            this._callOnChange('');
            ev.stopPropagation();
            ev.preventDefault();
            this.focus();
        }
    };
    SearchBoxBase.prototype._callOnChange = function (newValue) {
        var _a = this.props, onChange = _a.onChange, onChanged = _a.onChanged;
        // Call @deprecated method.
        if (onChanged) {
            onChanged(newValue);
        }
        if (onChange) {
            onChange(newValue);
        }
    };
    SearchBoxBase.defaultProps = {
        disableAnimation: false
    };
    SearchBoxBase = tslib_1.__decorate([
        Utilities_1.customizable('SearchBox', ['theme'])
    ], SearchBoxBase);
    return SearchBoxBase;
}(Utilities_1.BaseComponent));
exports.SearchBoxBase = SearchBoxBase;
//# sourceMappingURL=SearchBox.base.js.map

/***/ }),

/***/ "../../node_modules/office-ui-fabric-react/lib/components/SearchBox/SearchBox.js":
/*!***********************************************************************************************************!*\
  !*** C:/workspace/gitfish/twii/node_modules/office-ui-fabric-react/lib/components/SearchBox/SearchBox.js ***!
  \***********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Utilities_1 = __webpack_require__(/*! ../../Utilities */ "../../node_modules/office-ui-fabric-react/lib/Utilities.js");
var SearchBox_base_1 = __webpack_require__(/*! ./SearchBox.base */ "../../node_modules/office-ui-fabric-react/lib/components/SearchBox/SearchBox.base.js");
var SearchBox_styles_1 = __webpack_require__(/*! ./SearchBox.styles */ "../../node_modules/office-ui-fabric-react/lib/components/SearchBox/SearchBox.styles.js");
exports.SearchBox = Utilities_1.styled(SearchBox_base_1.SearchBoxBase, SearchBox_styles_1.getStyles);
//# sourceMappingURL=SearchBox.js.map

/***/ }),

/***/ "../../node_modules/office-ui-fabric-react/lib/components/SearchBox/SearchBox.styles.js":
/*!******************************************************************************************************************!*\
  !*** C:/workspace/gitfish/twii/node_modules/office-ui-fabric-react/lib/components/SearchBox/SearchBox.styles.js ***!
  \******************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var Styling_1 = __webpack_require__(/*! ../../Styling */ "../../node_modules/office-ui-fabric-react/lib/Styling.js");
function getStyles(props) {
    var theme = props.theme, underlined = props.underlined, disabled = props.disabled, hasFocus = props.hasFocus, className = props.className, hasInput = props.hasInput, disableAnimation = props.disableAnimation;
    var palette = theme.palette, fonts = theme.fonts, semanticColors = theme.semanticColors;
    return {
        root: [
            'ms-SearchBox',
            fonts.medium,
            Styling_1.normalize,
            {
                color: palette.neutralPrimary,
                display: 'flex',
                flexDirection: 'row',
                flexWrap: 'nowrap',
                alignItems: 'stretch',
                // The 1px top and bottom padding ensure the input field does not overlap the border
                padding: '1px 0 1px 4px',
                border: "1px solid " + palette.neutralTertiary,
                height: 32,
                selectors: (_a = {},
                    _a[Styling_1.HighContrastSelector] = {
                        border: '1px solid WindowText'
                    },
                    _a[':hover'] = {
                        borderColor: palette.neutralDark,
                        selectors: (_b = {},
                            _b[Styling_1.HighContrastSelector] = {
                                borderColor: 'Highlight'
                            },
                            _b)
                    },
                    _a[':hover $iconContainer'] = {
                        color: palette.themeDark
                    },
                    _a)
            },
            hasFocus && [
                'is-active',
                {
                    borderColor: palette.themePrimary,
                    selectors: (_c = {
                            ':hover': {
                                borderColor: palette.themePrimary,
                            }
                        },
                        _c[Styling_1.HighContrastSelector] = {
                            borderColor: 'Highlight'
                        },
                        _c)
                }
            ],
            disabled && [
                'is-disabled',
                {
                    borderColor: palette.neutralLighter,
                    backgroundColor: palette.neutralLighter,
                    pointerEvents: 'none',
                    cursor: 'default'
                }
            ],
            underlined && [
                'is-underlined',
                {
                    borderWidth: '0 0 1px 0',
                    // Underlined SearchBox has a larger padding left to vertically align with the waffle in product
                    padding: '1px 0 1px 8px'
                }
            ],
            underlined && disabled && {
                backgroundColor: 'transparent'
            },
            hasInput && 'can-clear',
            className
        ],
        iconContainer: [
            'ms-SearchBox-iconContainer',
            {
                display: 'flex',
                flexDirection: 'column',
                justifyContent: 'center',
                flexShrink: 0,
                fontSize: 16,
                width: 32,
                textAlign: 'center',
                color: palette.themePrimary,
                cursor: 'text'
            },
            hasFocus && {
                width: 4
            },
            disabled && {
                color: palette.neutralTertiary
            },
            !disableAnimation && {
                transition: "width " + Styling_1.AnimationVariables.durationValue1
            }
        ],
        icon: [
            'ms-SearchBox-icon',
            {
                opacity: 1,
            },
            hasFocus && {
                opacity: 0
            },
            !disableAnimation && {
                transition: "opacity " + Styling_1.AnimationVariables.durationValue1 + " 0s"
            }
        ],
        clearButton: [
            'ms-SearchBox-clearButton',
            {
                display: 'flex',
                flexDirection: 'row',
                alignItems: 'stretch',
                cursor: 'pointer',
                flexBasis: '32px',
                flexShrink: 0,
                padding: 1,
                color: palette.themePrimary
            }
        ],
        field: [
            'ms-SearchBox-field',
            Styling_1.normalize,
            {
                border: 'none',
                outline: 'none',
                fontWeight: 'inherit',
                fontFamily: 'inherit',
                fontSize: 'inherit',
                color: palette.neutralPrimary,
                backgroundColor: semanticColors.inputBackground,
                flex: '1 1 0px',
                overflow: 'hidden',
                textOverflow: 'ellipsis',
                // This padding forces the text placement to round up.
                paddingBottom: 0.5,
                // This removes the IE specific clear button in the input since we implimented our own
                selectors: {
                    '::-ms-clear': {
                        display: 'none'
                    },
                    '::placeholder': {
                        color: semanticColors.inputPlaceholderText,
                        opacity: 1
                    },
                    ':-ms-input-placeholder': {
                        color: semanticColors.inputPlaceholderText
                    }
                }
            },
            disabled && {
                color: palette.neutralTertiary
            }
        ]
    };
    var _a, _b, _c;
}
exports.getStyles = getStyles;
//# sourceMappingURL=SearchBox.styles.js.map

/***/ }),

/***/ "../../node_modules/office-ui-fabric-react/lib/components/SearchBox/index.js":
/*!*******************************************************************************************************!*\
  !*** C:/workspace/gitfish/twii/node_modules/office-ui-fabric-react/lib/components/SearchBox/index.js ***!
  \*******************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js");
tslib_1.__exportStar(__webpack_require__(/*! ./SearchBox */ "../../node_modules/office-ui-fabric-react/lib/components/SearchBox/SearchBox.js"), exports);
tslib_1.__exportStar(__webpack_require__(/*! ./SearchBox.base */ "../../node_modules/office-ui-fabric-react/lib/components/SearchBox/SearchBox.base.js"), exports);
//# sourceMappingURL=index.js.map

/***/ }),

/***/ "../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/ListingListApp.js":
/*!********************************************************!*\
  !*** ../ozone/lib/listing/component/ListingListApp.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 HostAppView_1 = __webpack_require__(/*! @twii/core-ui-fabric/lib/component/HostAppView */ "../core-ui-fabric/lib/component/HostAppView.js");
var ListingListModel_1 = __webpack_require__(/*! ../model/ListingListModel */ "../ozone/lib/listing/model/ListingListModel.js");
var ListingListPage_1 = __webpack_require__(/*! ./ListingListPage */ "../ozone/lib/listing/component/ListingListPage.js");
var ListingMenuHelper_1 = __webpack_require__(/*! ./ListingMenuHelper */ "../ozone/lib/listing/component/ListingMenuHelper.js");
var ListingListApp = /** @class */ (function (_super) {
    __extends(ListingListApp, _super);
    function ListingListApp() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this._onSelectItem = function (item) {
            _this.host.load({ path: "/ozone/listings/" + item.id });
        };
        _this._onAdd = function () {
            _this.host.load({ path: "/ozone/listings/add", query: { from: "list" } });
        };
        _this._onRefresh = function () {
            _this.listings.refresh();
        };
        return _this;
    }
    Object.defineProperty(ListingListApp.prototype, "host", {
        get: function () {
            return this.props.match.host;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ListingListApp.prototype, "userProfile", {
        get: function () {
            return this.props.match.userProfile;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ListingListApp.prototype, "listings", {
        get: function () {
            var listings = this.host.state.listings;
            if (!listings) {
                listings = new ListingListModel_1.ListingListModel();
                this.host.setState({ listings: listings });
            }
            return listings;
        },
        enumerable: true,
        configurable: true
    });
    ListingListApp.prototype.componentWillMount = function () {
        // we deliberately refresh here
        this.listings.load();
    };
    ListingListApp.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.listings.sync.syncing
            }
        ];
        return (React.createElement(HostAppView_1.HostAppView, { host: this.host, commandBarProps: { items: items, farItems: farItems } },
            React.createElement(ListingListPage_1.ListingListPage, { listings: this.listings, onSelectItem: this._onSelectItem, compact: true, wrapping: true })));
    };
    ListingListApp = __decorate([
        mobx_react_1.observer
    ], ListingListApp);
    return ListingListApp;
}(React.Component));
exports.ListingListApp = ListingListApp;
exports.default = ListingListApp;


/***/ }),

/***/ "../ozone/lib/listing/component/ListingListPage.classNames.js":
/*!********************************************************************!*\
  !*** ../ozone/lib/listing/component/ListingListPage.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-list-page", className, styles.root),
        header: styling_1.mergeStyles("listing-list-page-header", styles.header),
        body: styling_1.mergeStyles("listing-list-page-body", styles.body)
    };
});
exports.getClassNames = getClassNames;


/***/ }),

/***/ "../ozone/lib/listing/component/ListingListPage.js":
/*!*********************************************************!*\
  !*** ../ozone/lib/listing/component/ListingListPage.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 ListingList_1 = __webpack_require__(/*! ./ListingList */ "../ozone/lib/listing/component/ListingList.js");
var SearchBox_1 = __webpack_require__(/*! office-ui-fabric-react/lib/SearchBox */ "../../node_modules/office-ui-fabric-react/lib/SearchBox.js");
var ListingListPage_styles_1 = __webpack_require__(/*! ./ListingListPage.styles */ "../ozone/lib/listing/component/ListingListPage.styles.js");
var ListingListPage_classNames_1 = __webpack_require__(/*! ./ListingListPage.classNames */ "../ozone/lib/listing/component/ListingListPage.classNames.js");
var ListingListSearchInput = /** @class */ (function (_super) {
    __extends(ListingListSearchInput, _super);
    function ListingListSearchInput() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this._onSearchChange = function (newValue) {
            _this.props.listings.setSearchText(newValue);
        };
        return _this;
    }
    ListingListSearchInput.prototype.render = function () {
        return React.createElement(SearchBox_1.SearchBox, { value: this.props.listings.searchText, onChange: this._onSearchChange });
    };
    ListingListSearchInput = __decorate([
        mobx_react_1.observer
    ], ListingListSearchInput);
    return ListingListSearchInput;
}(React.Component));
var ListingListPage = /** @class */ (function (_super) {
    __extends(ListingListPage, _super);
    function ListingListPage() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    ListingListPage.prototype.render = function () {
        var classNames = ListingListPage_classNames_1.getClassNames(ListingListPage_styles_1.getStyles(undefined, this.props.styles), this.props.className);
        return (React.createElement("div", { className: classNames.root },
            React.createElement("div", { className: classNames.header },
                React.createElement(ListingListSearchInput, __assign({}, this.props))),
            React.createElement("div", { className: classNames.body },
                React.createElement(ListingList_1.ListingListContainer, __assign({}, this.props)))));
    };
    return ListingListPage;
}(React.Component));
exports.ListingListPage = ListingListPage;


/***/ }),

/***/ "../ozone/lib/listing/component/ListingListPage.styles.js":
/*!****************************************************************!*\
  !*** ../ozone/lib/listing/component/ListingListPage.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: {
            padding: 8
        },
        body: {}
    };
    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/model/ListingListModel.js":
/*!******************************************************!*\
  !*** ../ozone/lib/listing/model/ListingListModel.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 ListModel_1 = __webpack_require__(/*! @twii/core/lib/model/ListModel */ "../core/lib/model/ListModel.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 ListingListModel = /** @class */ (function (_super) {
    __extends(ListingListModel, _super);
    function ListingListModel() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this._searchDelay = 500;
        _this._refreshDone = function (res) {
            delete _this._searchTimeout;
            _this._counts = res.counts;
            _this.setItems(res.listings);
        };
        _this._refreshError = function (error) {
            _this.clearItems();
            _this.sync.syncError(error);
        };
        _this._searchImpl = function () {
            var search = _this.searchText;
            var request;
            if (StringUtils_1.isNotBlank(search)) {
                request = {
                    search: search
                };
            }
            return _this.listingService.getListings(request).then(function (results) {
                if (search === _this.searchText) {
                    _this._refreshDone(results);
                }
            }).catch(function (error) {
                if (search === _this.searchText) {
                    _this._refreshError(error);
                }
            });
        };
        return _this;
    }
    Object.defineProperty(ListingListModel.prototype, "listingService", {
        get: function () {
            return this._listingService || ListingServiceContext_1.ListingServiceContext.value;
        },
        set: function (value) {
            this._listingService = value;
        },
        enumerable: true,
        configurable: true
    });
    ListingListModel.prototype.setSearchText = function (searchText) {
        if (searchText !== this.searchText) {
            this.searchText = searchText;
            if (this._searchTimeout) {
                clearTimeout(this._searchTimeout);
            }
            this.sync.syncStart();
            this._searchTimeout = setTimeout(this._searchImpl, this._searchDelay);
        }
    };
    Object.defineProperty(ListingListModel.prototype, "counts", {
        get: function () {
            return Object.assign({}, this._counts);
        },
        enumerable: true,
        configurable: true
    });
    ListingListModel.prototype.refresh = function () {
        this.sync.syncStart();
        return this._searchImpl();
    };
    __decorate([
        mobx_1.observable
    ], ListingListModel.prototype, "searchText", void 0);
    __decorate([
        mobx_1.observable
    ], ListingListModel.prototype, "_counts", void 0);
    __decorate([
        mobx_1.action
    ], ListingListModel.prototype, "setSearchText", null);
    __decorate([
        mobx_1.computed
    ], ListingListModel.prototype, "counts", null);
    __decorate([
        mobx_1.action
    ], ListingListModel.prototype, "_refreshDone", void 0);
    __decorate([
        mobx_1.action
    ], ListingListModel.prototype, "_refreshError", void 0);
    __decorate([
        mobx_1.action
    ], ListingListModel.prototype, "_searchImpl", void 0);
    __decorate([
        mobx_1.action
    ], ListingListModel.prototype, "refresh", null);
    return ListingListModel;
}(ListModel_1.ListModel));
exports.default = ListingListModel;
exports.ListingListModel = ListingListModel;


/***/ }),

/***/ "../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=31.js.map