<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14109" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="0ix-l0-XXd">
    <device id="retina4_7" orientation="portrait">
        <adaptation id="fullscreen"/>
    </device>
    <dependencies>
        <deployment identifier="iOS"/>
        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
        <capability name="Constraints to layout margins" minToolsVersion="6.0"/>
        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
    </dependencies>
    <scenes>
        <!--Main View Controller-->
        <scene sceneID="R0S-DT-azK">
            <objects>
                <tabBarController storyboardIdentifier="MainViewController" id="0ix-l0-XXd" customClass="MainViewController" customModule="ZhiHu_RxSwift" customModuleProvider="target" sceneMemberID="viewController">
                    <tabBar key="tabBar" hidden="YES" contentMode="scaleToFill" id="o64-H8-0Vh">
                        <rect key="frame" x="0.0" y="0.0" width="375" height="49"/>
                        <autoresizingMask key="autoresizingMask"/>
                        <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
                    </tabBar>
                    <connections>
                        <segue destination="UBg-MS-GQB" kind="relationship" relationship="viewControllers" id="Yrg-WS-pb7"/>
                        <segue destination="Bvq-nQ-APK" kind="relationship" relationship="viewControllers" id="Jce-4i-Q9k"/>
                    </connections>
                </tabBarController>
                <placeholder placeholderIdentifier="IBFirstResponder" id="a67-RX-X5F" userLabel="First Responder" sceneMemberID="firstResponder"/>
            </objects>
            <point key="canvasLocation" x="-1956" y="417"/>
        </scene>
        <!--Item-->
        <scene sceneID="C9R-mT-zxV">
            <objects>
                <navigationController navigationBarHidden="YES" id="UBg-MS-GQB" sceneMemberID="viewController">
                    <tabBarItem key="tabBarItem" title="Item" id="boV-mx-7gG"/>
                    <navigationBar key="navigationBar" contentMode="scaleToFill" id="qNf-Ve-ceV">
                        <autoresizingMask key="autoresizingMask"/>
                    </navigationBar>
                    <toolbar key="toolbar" opaque="NO" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="XV9-qj-CUm">
                        <autoresizingMask key="autoresizingMask"/>
                    </toolbar>
                    <connections>
                        <segue destination="BYZ-38-t0r" kind="relationship" relationship="rootViewController" id="qgZ-X9-GXF"/>
                    </connections>
                </navigationController>
                <placeholder placeholderIdentifier="IBFirstResponder" id="Ois-3U-Obk" userLabel="First Responder" sceneMemberID="firstResponder"/>
            </objects>
            <point key="canvasLocation" x="-900" y="139"/>
        </scene>
        <!--今日热闻-->
        <scene sceneID="tne-QT-ifu">
            <objects>
                <viewController wantsFullScreenLayout="YES" id="BYZ-38-t0r" customClass="HomeViewController" customModule="ZhiHu_RxSwift" customModuleProvider="target" sceneMemberID="viewController">
                    <layoutGuides>
                        <viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
                        <viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
                    </layoutGuides>
                    <view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
                        <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                        <subviews>
                            <tableView contentMode="scaleToFill" fixedFrame="YES" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="default" rowHeight="90" sectionHeaderHeight="18" sectionFooterHeight="18" translatesAutoresizingMaskIntoConstraints="NO" id="F7l-iV-u5T">
                                <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
                                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                <color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
                                <inset key="separatorInset" minX="15" minY="0.0" maxX="15" maxY="0.0"/>
                                <view key="tableHeaderView" contentMode="scaleToFill" id="sZe-uW-2Ps">
                                    <rect key="frame" x="0.0" y="0.0" width="375" height="200"/>
                                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                    <subviews>
                                        <collectionView multipleTouchEnabled="YES" contentMode="scaleToFill" fixedFrame="YES" pagingEnabled="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="sd2-32-OB5" customClass="BannerView" customModule="ZhiHu_RxSwift" customModuleProvider="target">
                                            <rect key="frame" x="0.0" y="0.0" width="375" height="200"/>
                                            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                            <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                                            <collectionViewFlowLayout key="collectionViewLayout" scrollDirection="horizontal" minimumLineSpacing="0.0" minimumInteritemSpacing="0.0" id="1XX-7u-2Bu">
                                                <size key="itemSize" width="375" height="200"/>
                                                <size key="headerReferenceSize" width="0.0" height="0.0"/>
                                                <size key="footerReferenceSize" width="0.0" height="0.0"/>
                                                <inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
                                            </collectionViewFlowLayout>
                                            <cells>
                                                <collectionViewCell opaque="NO" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" reuseIdentifier="BannerCell" id="OJ4-tx-5mX" customClass="BannerCell" customModule="ZhiHu_RxSwift" customModuleProvider="target">
                                                    <rect key="frame" x="0.0" y="0.0" width="375" height="200"/>
                                                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                                    <view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
                                                        <rect key="frame" x="0.0" y="0.0" width="375" height="200"/>
                                                        <autoresizingMask key="autoresizingMask"/>
                                                        <subviews>
                                                            <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" insetsLayoutMarginsFromSafeArea="NO" translatesAutoresizingMaskIntoConstraints="NO" id="nQj-yg-pDK">
                                                                <rect key="frame" x="0.0" y="0.0" width="375" height="200"/>
                                                                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                                            </imageView>
                                                            <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="Home_Image_Mask" translatesAutoresizingMaskIntoConstraints="NO" id="m15-fX-Z4A">
                                                                <rect key="frame" x="0.0" y="100" width="375" height="100"/>
                                                                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                                            </imageView>
                                                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="如果觉得我的文章对您有用，请随意打赏。您的支持将鼓励我继续创作！" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hZ3-sX-4BK">
                                                                <rect key="frame" x="15" y="124.5" width="345" height="50.5"/>
                                                                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                                                <fontDescription key="fontDescription" type="system" pointSize="21"/>
                                                                <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                                                                <nil key="highlightedColor"/>
                                                            </label>
                                                        </subviews>
                                                    </view>
                                                    <connections>
                                                        <outlet property="img" destination="nQj-yg-pDK" id="Idj-cd-3jT"/>
                                                        <outlet property="imgTitle" destination="hZ3-sX-4BK" id="N8b-sZ-6r3"/>
                                                    </connections>
                                                </collectionViewCell>
                                            </cells>
                                        </collectionView>
                                        <pageControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" numberOfPages="3" translatesAutoresizingMaskIntoConstraints="NO" id="nVG-Wv-ONK">
                                            <rect key="frame" x="0.0" y="163" width="375" height="37"/>
                                            <constraints>
                                                <constraint firstAttribute="height" constant="37" id="37n-tu-Hmh"/>
                                            </constraints>
                                        </pageControl>
                                    </subviews>
                                    <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                                    <constraints>
                                        <constraint firstAttribute="bottom" secondItem="nVG-Wv-ONK" secondAttribute="bottom" id="1X0-0v-ak8"/>
                                        <constraint firstAttribute="trailing" secondItem="nVG-Wv-ONK" secondAttribute="trailing" id="Ndx-YO-4PU"/>
                                        <constraint firstItem="nVG-Wv-ONK" firstAttribute="leading" secondItem="sZe-uW-2Ps" secondAttribute="leading" id="wOc-2G-3Og"/>
                                    </constraints>
                                </view>
                                <prototypes>
                                    <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="ListTableViewCell" rowHeight="90" id="JdP-Ne-y9E" customClass="ListTableViewCell" customModule="ZhiHu_RxSwift" customModuleProvider="target">
                                        <rect key="frame" x="0.0" y="255.5" width="375" height="90"/>
                                        <autoresizingMask key="autoresizingMask"/>
                                        <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="JdP-Ne-y9E" id="jC8-jl-m7c">
                                            <rect key="frame" x="0.0" y="0.0" width="375" height="89.5"/>
                                            <autoresizingMask key="autoresizingMask"/>
                                            <subviews>
                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="bfS-lH-Ndg">
                                                    <rect key="frame" x="15" y="14" width="255" height="18"/>
                                                    <fontDescription key="fontDescription" type="system" pointSize="15"/>
                                                    <color key="textColor" red="0.031364817172288895" green="0.031376998871564865" blue="0.03136405348777771" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                                    <nil key="highlightedColor"/>
                                                </label>
                                                <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="fMI-lW-cA9">
                                                    <rect key="frame" x="285" y="14" width="75" height="60"/>
                                                    <constraints>
                                                        <constraint firstAttribute="height" constant="60" id="OcG-8j-UnK"/>
                                                        <constraint firstAttribute="width" constant="75" id="gKk-NW-oIs"/>
                                                    </constraints>
                                                </imageView>
                                                <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Home_Morepic" translatesAutoresizingMaskIntoConstraints="NO" id="8fb-wD-lHY">
                                                    <rect key="frame" x="328" y="60" width="32" height="14"/>
                                                    <constraints>
                                                        <constraint firstAttribute="width" constant="32" id="6TG-gs-Hih"/>
                                                        <constraint firstAttribute="height" constant="14" id="kzZ-xG-ymC"/>
                                                    </constraints>
                                                </imageView>
                                            </subviews>
                                            <constraints>
                                                <constraint firstAttribute="trailing" secondItem="fMI-lW-cA9" secondAttribute="trailing" constant="15" id="7gi-uL-v0G"/>
                                                <constraint firstAttribute="trailing" secondItem="8fb-wD-lHY" secondAttribute="trailing" constant="15" id="8LD-Ms-Fsb"/>
                                                <constraint firstItem="bfS-lH-Ndg" firstAttribute="top" secondItem="fMI-lW-cA9" secondAttribute="top" id="8l3-sh-ncz"/>
                                                <constraint firstAttribute="bottom" secondItem="8fb-wD-lHY" secondAttribute="bottom" constant="15" id="DoB-W4-AVT"/>
                                                <constraint firstItem="bfS-lH-Ndg" firstAttribute="leading" secondItem="jC8-jl-m7c" secondAttribute="leading" constant="15" id="FR2-OP-cYG"/>
                                                <constraint firstItem="fMI-lW-cA9" firstAttribute="centerY" secondItem="jC8-jl-m7c" secondAttribute="centerY" id="NCx-MA-dHh"/>
                                                <constraint firstAttribute="trailing" secondItem="bfS-lH-Ndg" secondAttribute="trailing" constant="105" id="p14-fG-X3G"/>
                                            </constraints>
                                        </tableViewCellContentView>
                                        <connections>
                                            <outlet property="img" destination="fMI-lW-cA9" id="dRd-qN-crB"/>
                                            <outlet property="morepicImg" destination="8fb-wD-lHY" id="nEN-fb-uhu"/>
                                            <outlet property="title" destination="bfS-lH-Ndg" id="mbd-V3-Cwu"/>
                                        </connections>
                                    </tableViewCell>
                                </prototypes>
                            </tableView>
                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="GbC-wt-cOK">
                                <rect key="frame" x="0.0" y="0.0" width="375" height="64"/>
                                <subviews>
                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="今日热闻" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="uu9-Be-DbD">
                                        <rect key="frame" x="150.5" y="33" width="73.5" height="21"/>
                                        <fontDescription key="fontDescription" type="boldSystem" pointSize="18"/>
                                        <color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
                                        <nil key="highlightedColor"/>
                                    </label>
                                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="fvd-M9-REZ">
                                        <rect key="frame" x="8" y="26" width="40" height="35"/>
                                        <constraints>
                                            <constraint firstAttribute="height" constant="35" id="Uqb-Yi-8XZ"/>
                                            <constraint firstAttribute="width" constant="40" id="sjg-cz-9Zh"/>
                                        </constraints>
                                        <state key="normal" image="menu">
                                            <color key="titleColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
                                        </state>
                                    </button>
                                </subviews>
                                <color key="backgroundColor" red="0.24705882352941178" green="0.55294117647058827" blue="0.81568627450980391" alpha="0.0" colorSpace="calibratedRGB"/>
                                <constraints>
                                    <constraint firstAttribute="bottom" secondItem="uu9-Be-DbD" secondAttribute="bottom" constant="10" id="63h-JX-iVG"/>
                                    <constraint firstItem="fvd-M9-REZ" firstAttribute="leading" secondItem="GbC-wt-cOK" secondAttribute="leading" constant="8" id="HZQ-8v-R5J"/>
                                    <constraint firstItem="uu9-Be-DbD" firstAttribute="centerX" secondItem="GbC-wt-cOK" secondAttribute="centerX" id="Jez-wg-k8P"/>
                                    <constraint firstAttribute="height" constant="64" id="gaK-a4-Cls"/>
                                    <constraint firstItem="fvd-M9-REZ" firstAttribute="centerY" secondItem="uu9-Be-DbD" secondAttribute="centerY" id="jm0-uK-VIp"/>
                                </constraints>
                            </view>
                        </subviews>
                        <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                        <constraints>
                            <constraint firstItem="GbC-wt-cOK" firstAttribute="top" secondItem="8bC-Xf-vdC" secondAttribute="top" id="Bi4-VN-bpO"/>
                            <constraint firstItem="GbC-wt-cOK" firstAttribute="leading" secondItem="8bC-Xf-vdC" secondAttribute="leading" id="Z4b-tn-Jpk"/>
                            <constraint firstAttribute="trailing" secondItem="GbC-wt-cOK" secondAttribute="trailing" id="mSh-tN-hlP"/>
                        </constraints>
                    </view>
                    <navigationItem key="navigationItem" title="今日热闻" id="mfo-FT-KzG">
                        <barButtonItem key="leftBarButtonItem" image="menu" id="Hi8-xB-gM8">
                            <color key="tintColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                        </barButtonItem>
                    </navigationItem>
                    <simulatedStatusBarMetrics key="simulatedStatusBarMetrics" statusBarStyle="lightContent"/>
                    <connections>
                        <outlet property="bannerView" destination="sd2-32-OB5" id="zi0-fW-INs"/>
                        <outlet property="customNav" destination="GbC-wt-cOK" id="CsT-KT-xCb"/>
                        <outlet property="customNavHeight" destination="gaK-a4-Cls" id="RKC-CK-iyL"/>
                        <outlet property="headView" destination="sZe-uW-2Ps" id="uKz-Xp-ETO"/>
                        <outlet property="menuButton" destination="fvd-M9-REZ" id="iPE-kB-urA"/>
                        <outlet property="pageControl" destination="nVG-Wv-ONK" id="TyW-Xt-VMs"/>
                        <outlet property="tableView" destination="F7l-iV-u5T" id="K7P-1a-3fa"/>
                        <outlet property="titleLab" destination="uu9-Be-DbD" id="0YP-2y-fFM"/>
                    </connections>
                </viewController>
                <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
            </objects>
            <point key="canvasLocation" x="189.59999999999999" y="138.98050974512745"/>
        </scene>
        <!--Menu View Controller-->
        <scene sceneID="wNB-aP-6aD">
            <objects>
                <viewController storyboardIdentifier="MenuViewController" id="8Pj-g8-OBZ" customClass="MenuViewController" customModule="ZhiHu_RxSwift" customModuleProvider="target" sceneMemberID="viewController">
                    <layoutGuides>
                        <viewControllerLayoutGuide type="top" id="VgS-lW-dhg"/>
                        <viewControllerLayoutGuide type="bottom" id="Gwi-DD-B9d"/>
                    </layoutGuides>
                    <view key="view" contentMode="scaleToFill" id="lfb-qj-n5M">
                        <rect key="frame" x="0.0" y="0.0" width="225" height="667"/>
                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                        <subviews>
                            <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="none" rowHeight="50" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="qCj-ab-vUJ">
                                <rect key="frame" x="0.0" y="125" width="225" height="502"/>
                                <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
                                <prototypes>
                                    <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" misplaced="YES" selectionStyle="none" indentationWidth="10" reuseIdentifier="ThemeTableViewCell" rowHeight="50" id="qoq-xu-HK9" customClass="ThemeTableViewCell" customModule="ZhiHu_RxSwift" customModuleProvider="target">
                                        <rect key="frame" x="0.0" y="28" width="225" height="50"/>
                                        <autoresizingMask key="autoresizingMask"/>
                                        <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="qoq-xu-HK9" id="ilv-mh-Xw6">
                                            <rect key="frame" x="0.0" y="0.0" width="225" height="50"/>
                                            <autoresizingMask key="autoresizingMask"/>
                                            <subviews>
                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="首页" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="SQ0-qN-wJt">
                                                    <rect key="frame" x="15" y="16" width="31" height="18"/>
                                                    <fontDescription key="fontDescription" type="system" pointSize="15"/>
                                                    <color key="textColor" red="0.58431372549019611" green="0.59999999999999998" blue="0.61568627450980395" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
                                                    <nil key="highlightedColor"/>
                                                </label>
                                                <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="plus" translatesAutoresizingMaskIntoConstraints="NO" id="mY7-lg-q3B">
                                                    <rect key="frame" x="35" y="16" width="15" height="18"/>
                                                    <constraints>
                                                        <constraint firstAttribute="width" constant="15" id="Z7K-9j-9ml"/>
                                                        <constraint firstAttribute="height" constant="18" id="rPM-uL-plZ"/>
                                                    </constraints>
                                                </imageView>
                                                <imageView hidden="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Menu_Icon_Home" translatesAutoresizingMaskIntoConstraints="NO" id="IZX-gj-ors">
                                                    <rect key="frame" x="22" y="15" width="20" height="20"/>
                                                    <constraints>
                                                        <constraint firstAttribute="height" constant="20" id="2jF-T4-eYv"/>
                                                        <constraint firstAttribute="width" constant="20" id="DJW-cy-6v2"/>
                                                    </constraints>
                                                </imageView>
                                            </subviews>
                                            <constraints>
                                                <constraint firstAttribute="trailing" secondItem="mY7-lg-q3B" secondAttribute="trailing" constant="25" id="Jf4-nh-HUd"/>
                                                <constraint firstItem="SQ0-qN-wJt" firstAttribute="centerY" secondItem="ilv-mh-Xw6" secondAttribute="centerY" id="TQk-cY-ohn"/>
                                                <constraint firstItem="IZX-gj-ors" firstAttribute="centerY" secondItem="ilv-mh-Xw6" secondAttribute="centerY" id="VNo-R7-Qm9"/>
                                                <constraint firstItem="mY7-lg-q3B" firstAttribute="centerY" secondItem="ilv-mh-Xw6" secondAttribute="centerY" id="Y0K-E4-SUv"/>
                                                <constraint firstItem="SQ0-qN-wJt" firstAttribute="leading" secondItem="ilv-mh-Xw6" secondAttribute="leading" constant="15" id="iaS-8e-CMb"/>
                                                <constraint firstItem="IZX-gj-ors" firstAttribute="leading" secondItem="ilv-mh-Xw6" secondAttribute="leadingMargin" constant="7" id="z5Z-W3-WiJ"/>
                                            </constraints>
                                        </tableViewCellContentView>
                                        <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
                                        <connections>
                                            <outlet property="homeIcon" destination="IZX-gj-ors" id="YSE-1W-UaO"/>
                                            <outlet property="name" destination="SQ0-qN-wJt" id="hVN-B2-KZc"/>
                                            <outlet property="nameLeft" destination="iaS-8e-CMb" id="zLL-vy-X0c"/>
                                        </connections>
                                    </tableViewCell>
                                </prototypes>
                            </tableView>
                            <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Menu_Mask" translatesAutoresizingMaskIntoConstraints="NO" id="CYe-FF-KC4">
                                <rect key="frame" x="0.0" y="563" width="225" height="104"/>
                            </imageView>
                            <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Menu_Avatar" translatesAutoresizingMaskIntoConstraints="NO" id="pAa-yj-lVX">
                                <rect key="frame" x="15" y="30" width="35" height="35"/>
                            </imageView>
                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="刘看山" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="GSX-fR-Zr6">
                                <rect key="frame" x="65" y="38.5" width="46" height="18"/>
                                <fontDescription key="fontDescription" type="system" pointSize="15"/>
                                <color key="textColor" red="0.58442556858062744" green="0.59985589981079102" blue="0.61573654413223267" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
                                <nil key="highlightedColor"/>
                            </label>
                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="gHS-sX-A4o">
                                <rect key="frame" x="0.0" y="73" width="60" height="44"/>
                                <constraints>
                                    <constraint firstAttribute="width" constant="60" id="BJW-Cw-D8s"/>
                                    <constraint firstAttribute="height" constant="44" id="N1g-Ql-gB7"/>
                                </constraints>
                                <fontDescription key="fontDescription" type="system" pointSize="11"/>
                                <inset key="titleEdgeInsets" minX="-5" minY="20" maxX="15" maxY="0.0"/>
                                <inset key="imageEdgeInsets" minX="20" minY="0.0" maxX="10" maxY="20"/>
                                <state key="normal" title="收藏" image="Menu_Icon_Collect">
                                    <color key="titleColor" red="0.58442556859999995" green="0.59985589979999998" blue="0.61573654410000001" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
                                </state>
                            </button>
                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="eZq-bj-WEr">
                                <rect key="frame" x="140" y="73" width="60" height="44"/>
                                <constraints>
                                    <constraint firstAttribute="width" constant="60" id="ksh-Ef-Gel"/>
                                    <constraint firstAttribute="height" constant="44" id="mLd-ZP-1zh"/>
                                </constraints>
                                <fontDescription key="fontDescription" type="system" pointSize="11"/>
                                <inset key="titleEdgeInsets" minX="-5" minY="20" maxX="15" maxY="0.0"/>
                                <inset key="imageEdgeInsets" minX="20" minY="0.0" maxX="10" maxY="20"/>
                                <state key="normal" title="设置" image="Menu_Icon_Setting">
                                    <color key="titleColor" red="0.58442556859999995" green="0.59985589979999998" blue="0.61573654410000001" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
                                </state>
                            </button>
                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="51E-7O-DOU">
                                <rect key="frame" x="70" y="73" width="60" height="44"/>
                                <constraints>
                                    <constraint firstAttribute="width" constant="60" id="Xqi-Do-yWI"/>
                                    <constraint firstAttribute="height" constant="44" id="zsN-id-pgR"/>
                                </constraints>
                                <fontDescription key="fontDescription" type="system" pointSize="11"/>
                                <inset key="titleEdgeInsets" minX="-5" minY="20" maxX="15" maxY="0.0"/>
                                <inset key="imageEdgeInsets" minX="20" minY="0.0" maxX="10" maxY="20"/>
                                <state key="normal" title="消息" image="Menu_Icon_Message">
                                    <color key="titleColor" red="0.58442556859999995" green="0.59985589979999998" blue="0.61573654410000001" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
                                </state>
                            </button>
                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="8VK-y0-EpQ">
                                <rect key="frame" x="0.0" y="616" width="103" height="51"/>
                                <constraints>
                                    <constraint firstAttribute="height" constant="51" id="ncI-p6-yrl"/>
                                    <constraint firstAttribute="width" constant="103" id="zot-tQ-LDc"/>
                                </constraints>
                                <fontDescription key="fontDescription" type="system" pointSize="14"/>
                                <inset key="titleEdgeInsets" minX="15" minY="0.0" maxX="0.0" maxY="0.0"/>
                                <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="15" maxY="0.0"/>
                                <state key="normal" title="离线" image="Menu_Download">
                                    <color key="titleColor" red="0.58431372550000005" green="0.59999999999999998" blue="0.61568627450000002" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
                                </state>
                            </button>
                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="blk-dk-oHP">
                                <rect key="frame" x="102" y="616" width="107" height="51"/>
                                <constraints>
                                    <constraint firstAttribute="height" constant="51" id="JLi-da-GjR"/>
                                    <constraint firstAttribute="width" constant="107" id="S9j-SG-zTa"/>
                                </constraints>
                                <fontDescription key="fontDescription" type="system" pointSize="14"/>
                                <inset key="titleEdgeInsets" minX="15" minY="0.0" maxX="0.0" maxY="0.0"/>
                                <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="15" maxY="0.0"/>
                                <state key="normal" title="夜间" image="Menu_Dark">
                                    <color key="titleColor" red="0.58431372550000005" green="0.59999999999999998" blue="0.61568627450000002" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
                                </state>
                            </button>
                        </subviews>
                        <color key="backgroundColor" red="0.14137217402458191" green="0.16456712782382965" blue="0.18442715704441071" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
                        <constraints>
                            <constraint firstItem="eZq-bj-WEr" firstAttribute="centerY" secondItem="gHS-sX-A4o" secondAttribute="centerY" id="0bB-XZ-VjE"/>
                            <constraint firstItem="pAa-yj-lVX" firstAttribute="leading" secondItem="lfb-qj-n5M" secondAttribute="leading" constant="15" id="DWz-Vq-raX"/>
                            <constraint firstAttribute="trailing" secondItem="CYe-FF-KC4" secondAttribute="trailing" id="GbX-tP-NqW"/>
                            <constraint firstItem="GSX-fR-Zr6" firstAttribute="leading" secondItem="pAa-yj-lVX" secondAttribute="trailing" constant="15" id="GjX-Ig-a1y"/>
                            <constraint firstItem="GSX-fR-Zr6" firstAttribute="centerY" secondItem="pAa-yj-lVX" secondAttribute="centerY" id="KmT-Az-6wq"/>
                            <constraint firstItem="qCj-ab-vUJ" firstAttribute="top" secondItem="VgS-lW-dhg" secondAttribute="bottom" constant="105" id="LSZ-xu-O4v"/>
                            <constraint firstItem="blk-dk-oHP" firstAttribute="leading" secondItem="lfb-qj-n5M" secondAttribute="leadingMargin" constant="86" id="ND0-du-7P9"/>
                            <constraint firstItem="qCj-ab-vUJ" firstAttribute="leading" secondItem="lfb-qj-n5M" secondAttribute="leading" id="RHp-bx-STz"/>
                            <constraint firstItem="CYe-FF-KC4" firstAttribute="top" secondItem="qCj-ab-vUJ" secondAttribute="bottom" constant="-64" id="WJd-AT-ELV"/>
                            <constraint firstItem="8VK-y0-EpQ" firstAttribute="leading" secondItem="lfb-qj-n5M" secondAttribute="leading" id="ayy-aW-0vo"/>
                            <constraint firstItem="51E-7O-DOU" firstAttribute="centerY" secondItem="gHS-sX-A4o" secondAttribute="centerY" id="b6T-pK-o0L"/>
                            <constraint firstItem="pAa-yj-lVX" firstAttribute="top" secondItem="VgS-lW-dhg" secondAttribute="bottom" constant="10" id="cYb-AB-IOY"/>
                            <constraint firstItem="Gwi-DD-B9d" firstAttribute="top" secondItem="CYe-FF-KC4" secondAttribute="bottom" id="mKJ-ha-6VL"/>
                            <constraint firstItem="CYe-FF-KC4" firstAttribute="leading" secondItem="lfb-qj-n5M" secondAttribute="leading" id="oPf-ne-SC5"/>
                            <constraint firstItem="gHS-sX-A4o" firstAttribute="top" secondItem="pAa-yj-lVX" secondAttribute="bottom" constant="8" id="pah-32-XLf"/>
                            <constraint firstItem="51E-7O-DOU" firstAttribute="leading" secondItem="gHS-sX-A4o" secondAttribute="trailing" constant="10" id="q4e-2a-U0m"/>
                            <constraint firstAttribute="trailing" secondItem="qCj-ab-vUJ" secondAttribute="trailing" id="sDG-JB-FSP"/>
                            <constraint firstItem="Gwi-DD-B9d" firstAttribute="top" secondItem="blk-dk-oHP" secondAttribute="bottom" id="tLC-p5-xZ0"/>
                            <constraint firstItem="eZq-bj-WEr" firstAttribute="leading" secondItem="51E-7O-DOU" secondAttribute="trailing" constant="10" id="teo-GD-Z4b"/>
                            <constraint firstItem="Gwi-DD-B9d" firstAttribute="top" secondItem="8VK-y0-EpQ" secondAttribute="bottom" id="uM8-nS-8WJ"/>
                            <constraint firstItem="gHS-sX-A4o" firstAttribute="leading" secondItem="lfb-qj-n5M" secondAttribute="leading" id="uQu-BS-VNW"/>
                            <constraint firstItem="Gwi-DD-B9d" firstAttribute="top" secondItem="qCj-ab-vUJ" secondAttribute="bottom" constant="40" id="wl6-GO-fbg"/>
                        </constraints>
                    </view>
                    <simulatedStatusBarMetrics key="simulatedStatusBarMetrics" statusBarStyle="lightContent"/>
                    <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
                    <size key="freeformSize" width="225" height="667"/>
                    <connections>
                        <outlet property="tableView" destination="qCj-ab-vUJ" id="NIJ-2n-77G"/>
                    </connections>
                </viewController>
                <placeholder placeholderIdentifier="IBFirstResponder" id="bg9-AR-zL5" userLabel="First Responder" sceneMemberID="firstResponder"/>
            </objects>
            <point key="canvasLocation" x="-2439" y="417"/>
        </scene>
        <!--Item-->
        <scene sceneID="2VD-48-vAN">
            <objects>
                <navigationController navigationBarHidden="YES" id="Bvq-nQ-APK" sceneMemberID="viewController">
                    <tabBarItem key="tabBarItem" title="Item" id="Ehi-K6-X78"/>
                    <navigationBar key="navigationBar" contentMode="scaleToFill" id="KN7-qb-j24">
                        <autoresizingMask key="autoresizingMask"/>
                    </navigationBar>
                    <toolbar key="toolbar" opaque="NO" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="0P5-1V-bfu">
                        <autoresizingMask key="autoresizingMask"/>
                    </toolbar>
                    <connections>
                        <segue destination="g4J-YW-eEu" kind="relationship" relationship="rootViewController" id="B83-tZ-Eh5"/>
                    </connections>
                </navigationController>
                <placeholder placeholderIdentifier="IBFirstResponder" id="gIg-8z-1dJ" userLabel="First Responder" sceneMemberID="firstResponder"/>
            </objects>
            <point key="canvasLocation" x="-900" y="868"/>
        </scene>
        <!--Theme View Controller-->
        <scene sceneID="pRK-xu-kup">
            <objects>
                <viewController storyboardIdentifier="ThemeViewController" wantsFullScreenLayout="YES" id="g4J-YW-eEu" customClass="ThemeViewController" customModule="ZhiHu_RxSwift" customModuleProvider="target" sceneMemberID="viewController">
                    <layoutGuides>
                        <viewControllerLayoutGuide type="top" id="Udn-Ox-EAN"/>
                        <viewControllerLayoutGuide type="bottom" id="jlD-VW-4Bv"/>
                    </layoutGuides>
                    <view key="view" contentMode="scaleToFill" id="eii-ye-xJE">
                        <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                        <subviews>
                            <tableView contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="default" rowHeight="90" sectionHeaderHeight="1" sectionFooterHeight="1" translatesAutoresizingMaskIntoConstraints="NO" id="8fr-Zf-lEY">
                                <rect key="frame" x="0.0" y="64" width="375" height="603"/>
                                <color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
                                <inset key="separatorInset" minX="15" minY="0.0" maxX="15" maxY="0.0"/>
                                <prototypes>
                                    <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="ListTableViewCell" rowHeight="90" id="f4k-VX-dKz" customClass="ListTableViewCell" customModule="ZhiHu_RxSwift" customModuleProvider="target">
                                        <rect key="frame" x="0.0" y="55.5" width="375" height="90"/>
                                        <autoresizingMask key="autoresizingMask"/>
                                        <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="f4k-VX-dKz" id="Vlg-Vw-Ctd">
                                            <rect key="frame" x="0.0" y="0.0" width="375" height="89.5"/>
                                            <autoresizingMask key="autoresizingMask"/>
                                            <subviews>
                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="oDg-Ed-pxC">
                                                    <rect key="frame" x="15" y="14" width="255" height="18"/>
                                                    <fontDescription key="fontDescription" type="system" pointSize="15"/>
                                                    <color key="textColor" red="0.031364817170000003" green="0.031376998869999999" blue="0.031364053490000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                                    <nil key="highlightedColor"/>
                                                </label>
                                                <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="hPE-3F-KDG">
                                                    <rect key="frame" x="285" y="14" width="75" height="60"/>
                                                    <constraints>
                                                        <constraint firstAttribute="width" constant="75" id="8M0-0O-6ce"/>
                                                        <constraint firstAttribute="height" constant="60" id="yVa-mn-6TT"/>
                                                    </constraints>
                                                </imageView>
                                                <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Home_Morepic" translatesAutoresizingMaskIntoConstraints="NO" id="Fcq-6S-EzD">
                                                    <rect key="frame" x="328" y="60.5" width="32" height="14"/>
                                                    <constraints>
                                                        <constraint firstAttribute="height" constant="14" id="alk-il-jMk"/>
                                                        <constraint firstAttribute="width" constant="32" id="sJc-cS-70D"/>
                                                    </constraints>
                                                </imageView>
                                            </subviews>
                                            <constraints>
                                                <constraint firstAttribute="trailing" secondItem="hPE-3F-KDG" secondAttribute="trailing" constant="15" id="12G-zI-Aym"/>
                                                <constraint firstItem="oDg-Ed-pxC" firstAttribute="top" secondItem="hPE-3F-KDG" secondAttribute="top" id="6Jj-I4-J3t"/>
                                                <constraint firstAttribute="trailing" secondItem="oDg-Ed-pxC" secondAttribute="trailing" constant="105" id="71z-h9-aXJ"/>
                                                <constraint firstAttribute="bottom" secondItem="Fcq-6S-EzD" secondAttribute="bottom" constant="15" id="MVr-8t-hxl"/>
                                                <constraint firstItem="oDg-Ed-pxC" firstAttribute="leading" secondItem="Vlg-Vw-Ctd" secondAttribute="leading" constant="15" id="qbY-f8-jIG"/>
                                                <constraint firstAttribute="trailing" secondItem="Fcq-6S-EzD" secondAttribute="trailing" constant="15" id="rxg-3Y-O9Z"/>
                                                <constraint firstItem="hPE-3F-KDG" firstAttribute="centerY" secondItem="Vlg-Vw-Ctd" secondAttribute="centerY" id="vkq-tb-mL0"/>
                                            </constraints>
                                        </tableViewCellContentView>
                                        <connections>
                                            <outlet property="img" destination="hPE-3F-KDG" id="Wlv-Ha-xYp"/>
                                            <outlet property="morepicImg" destination="Fcq-6S-EzD" id="BjV-wY-cVz"/>
                                            <outlet property="title" destination="oDg-Ed-pxC" id="R0n-uK-5Pk"/>
                                            <outlet property="titleRight" destination="71z-h9-aXJ" id="rFF-xD-d1Y"/>
                                        </connections>
                                    </tableViewCell>
                                </prototypes>
                            </tableView>
                            <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="gmN-oj-IO0">
                                <rect key="frame" x="0.0" y="0.0" width="375" height="64"/>
                                <constraints>
                                    <constraint firstAttribute="height" constant="64" id="Qfa-YX-Mjg"/>
                                </constraints>
                            </imageView>
                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="uav-VW-Nbq">
                                <rect key="frame" x="10" y="26" width="40" height="35"/>
                                <constraints>
                                    <constraint firstAttribute="width" constant="40" id="TCW-sn-htK"/>
                                    <constraint firstAttribute="height" constant="35" id="x1C-HI-o04"/>
                                </constraints>
                                <state key="normal" image="Back_White">
                                    <color key="titleColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
                                </state>
                            </button>
                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="今日热闻" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9cc-rt-yGr">
                                <rect key="frame" x="151" y="33" width="73.5" height="21"/>
                                <fontDescription key="fontDescription" type="boldSystem" pointSize="18"/>
                                <color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
                                <nil key="highlightedColor"/>
                            </label>
                        </subviews>
                        <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                        <constraints>
                            <constraint firstAttribute="bottom" secondItem="8fr-Zf-lEY" secondAttribute="bottom" id="EHO-ot-RZX"/>
                            <constraint firstItem="9cc-rt-yGr" firstAttribute="centerX" secondItem="eii-ye-xJE" secondAttribute="centerX" id="M6m-Xj-Sk8"/>
                            <constraint firstItem="8fr-Zf-lEY" firstAttribute="leading" secondItem="eii-ye-xJE" secondAttribute="leading" id="OXZ-Wu-ec8"/>
                            <constraint firstItem="gmN-oj-IO0" firstAttribute="leading" secondItem="eii-ye-xJE" secondAttribute="leading" id="a85-Lc-QEg"/>
                            <constraint firstItem="uav-VW-Nbq" firstAttribute="centerY" secondItem="9cc-rt-yGr" secondAttribute="centerY" id="gTo-ki-W6o"/>
                            <constraint firstAttribute="trailing" secondItem="gmN-oj-IO0" secondAttribute="trailing" id="gni-FB-b8d"/>
                            <constraint firstItem="uav-VW-Nbq" firstAttribute="leading" secondItem="eii-ye-xJE" secondAttribute="leading" constant="10" id="ja3-oM-tfn"/>
                            <constraint firstAttribute="trailing" secondItem="8fr-Zf-lEY" secondAttribute="trailing" id="kyV-bu-a4B"/>
                            <constraint firstItem="8fr-Zf-lEY" firstAttribute="top" secondItem="9cc-rt-yGr" secondAttribute="bottom" constant="10" id="loj-kp-Udo"/>
                            <constraint firstItem="8fr-Zf-lEY" firstAttribute="top" secondItem="gmN-oj-IO0" secondAttribute="bottom" id="oK7-8w-E84"/>
                            <constraint firstItem="gmN-oj-IO0" firstAttribute="top" secondItem="eii-ye-xJE" secondAttribute="top" id="opr-aK-VyH"/>
                        </constraints>
                    </view>
                    <toolbarItems/>
                    <navigationItem key="navigationItem" id="1Cl-0G-GcR"/>
                    <simulatedToolbarMetrics key="simulatedBottomBarMetrics"/>
                    <connections>
                        <outlet property="headImg" destination="gmN-oj-IO0" id="wg5-Ev-kFs"/>
                        <outlet property="headImgH" destination="Qfa-YX-Mjg" id="eMn-15-km9"/>
                        <outlet property="menuButton" destination="uav-VW-Nbq" id="g8w-Cl-eHb"/>
                        <outlet property="tableView" destination="8fr-Zf-lEY" id="yys-ea-Qe6"/>
                        <outlet property="titleLab" destination="9cc-rt-yGr" id="zGk-sj-iKu"/>
                    </connections>
                </viewController>
                <placeholder placeholderIdentifier="IBFirstResponder" id="7zE-bG-1a5" sceneMemberID="firstResponder"/>
            </objects>
            <point key="canvasLocation" x="189.59999999999999" y="867.61619190404804"/>
        </scene>
        <!--View Controller-->
        <scene sceneID="Fkr-p0-XEH">
            <objects>
                <viewController id="Zeg-bd-oVe" sceneMemberID="viewController">
                    <layoutGuides>
                        <viewControllerLayoutGuide type="top" id="YJS-mb-Aoc"/>
                        <viewControllerLayoutGuide type="bottom" id="r8f-Ij-XkR"/>
                    </layoutGuides>
                    <view key="view" contentMode="scaleToFill" id="qGG-AJ-M9h">
                        <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                        <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                    </view>
                </viewController>
                <placeholder placeholderIdentifier="IBFirstResponder" id="v4D-xT-rtx" userLabel="First Responder" sceneMemberID="firstResponder"/>
            </objects>
        </scene>
    </scenes>
    <resources>
        <image name="Back_White" width="44" height="44"/>
        <image name="Home_Image_Mask" width="320" height="150"/>
        <image name="Home_Morepic" width="32" height="14"/>
        <image name="Menu_Avatar" width="35" height="35"/>
        <image name="Menu_Dark" width="22" height="22"/>
        <image name="Menu_Download" width="22" height="22"/>
        <image name="Menu_Icon_Collect" width="20" height="20"/>
        <image name="Menu_Icon_Home" width="20" height="20"/>
        <image name="Menu_Icon_Message" width="20" height="20"/>
        <image name="Menu_Icon_Setting" width="20" height="20"/>
        <image name="Menu_Mask" width="320" height="148"/>
        <image name="menu" width="22" height="17"/>
        <image name="plus" width="15" height="18"/>
    </resources>
</document>

{'repo_name': 'kLike/ZhiHu-RxSwift', 'stars': '370', 'repo_language': 'Swift', 'file_name': 'Info.plist', 'mime_type': 'text/xml', 'hash': 5667863845492666688, 'source_dataset': 'data'}


<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<!-- Translated using Transifex web application. For support, or if you would like to to help out, please visit your language team! -->
<!-- Malayalam language-Team URL: http://www.transifex.com/projects/p/XBMC-Main-Frodo/language/ml/ -->
<!-- Report language file syntax bugs at: http://trac.xbmc.org/ -->

<strings>
    <string id="30004">ഭാഷ</string>
</strings>

{'repo_name': 'quarnster/boxeebox-xbmc', 'stars': '117', 'repo_language': 'C++', 'file_name': 'strings.po', 'mime_type': 'text/x-po', 'hash': 6917138435372437610, 'source_dataset': 'data'}


/* No comment provided by engineer. */
"--- ALL CATEGORIES ---" = "--- Minden kategória ---";

/* No comment provided by engineer. */
"About" = "Névjegy";

/* No comment provided by engineer. */
"Add Comment" = "Új megjegyzés";

/* No comment provided by engineer. */
"Add Map" = "Térkép hozzáadása";

/* No comment provided by engineer. */
"Add Map By URL" = "Térkép hozzáadása URL-l";

/* No comment provided by engineer. */
"Add Map Error" = "Térkép hozzáadás hiba";

/* No comment provided by engineer. */
"Add Report" = "Új bejelentés";

/* No comment provided by engineer. */
"Added" = "Hozzáadva";

/* No comment provided by engineer. */
"Adding..." = "Hozzáadás...";

/* No comment provided by engineer. */
"All Categories" = "Minden kategória";

/* No comment provided by engineer. */
"All Checkins" = "Minden bejelentkezés";

/* No comment provided by engineer. */
"Anonymous" = "Névtelen";

/* No comment provided by engineer. */
"Are you sure you want to cancel?" = "Elvesszenek a bevitt adatok?";

/* No comment provided by engineer. */
"Authentication Required" = "Kötelező a bejelentkezés";

/* No comment provided by engineer. */
"By using this app, you agree to the following terms and policy:" = "Az alkalmazás használatával elfogadod az alábbi feltételeket:";

/* No comment provided by engineer. */
"Cancel" = "Mégsem";

/* No comment provided by engineer. */
"Categories" = "Kategóriák";

/* No comment provided by engineer. */
"Categories..." = "Kategóriák...";

/* No comment provided by engineer. */
"Category Required" = "Kategória megadása kötelező";

/* No comment provided by engineer. */
"Checkins..." = "Bejelentkezések...";

/* No comment provided by engineer. */
"Comment Queued" = "Megjegyzés elküldve";

/* No comment provided by engineer. */
"Comment Required" = "Megjegyzés megadása kötelező";

/* No comment provided by engineer. */
"Contact" = "Személyes információk (nem kötelező)";

/* No comment provided by engineer. */
"Date Required" = "Időpont megadása kötelező";

/* No comment provided by engineer. */
"Description Required" = "Leírás megadása kötelező";

/* No comment provided by engineer. */
"Details" = "Részletek";

/* No comment provided by engineer. */
"Display" = "Megjelenítés";

/* No comment provided by engineer. */
"Done" = "Kész";

/* No comment provided by engineer. */
"Double tap to move map pin to new location" = "A rajzszög dupla érintéssel helyezhető át.";

/* No comment provided by engineer. */
"Download Map Images" = "Download Map Images";

/* No comment provided by engineer. */
"Download Photos" = "Letöltés";

/* No comment provided by engineer. */
"Email Required" = "Email megadása kötelező";

/* No comment provided by engineer. */
"Enable OpenGeoSMS" = "OpenGeoSMS";

/* No comment provided by engineer. */
"Enter comment" = "Megjegyzés";

/* No comment provided by engineer. */
"Enter description" = "Leírás";

/* No comment provided by engineer. */
"Enter email" = "Email cím";

/* No comment provided by engineer. */
"Enter email address" = "Email cím";

/* No comment provided by engineer. */
"Enter first name" = "Keresztnév";

/* No comment provided by engineer. */
"Enter last name" = "Vezetéknév";

/* No comment provided by engineer. */
"Enter name" = "Név";

/* No comment provided by engineer. */
"Enter title" = "Bejelentés címe";

/* No comment provided by engineer. */
"Enter webpage" = "Hírforrás link";

/* No comment provided by engineer. */
"Error Saving Photo" = "Fénykép küldési hiba";

/* No comment provided by engineer. */
"Find Location" = "Helyszín keresése";

/* No comment provided by engineer. */
"Find Maps Around Me" = "Térkép keresése a közelben";

/* No comment provided by engineer. */
"Finding address..." = "Cím keresése...";

/* No comment provided by engineer. */
"Finding location..." = "Helyszín keresése...";

/* No comment provided by engineer. */
"for" = "for";

/* No comment provided by engineer. */
"Found" = "Megtalálva";

/* No comment provided by engineer. */
"Hide Status Bar" = "Státusz sor elrejtése";

/* No comment provided by engineer. */
"I Agree" = "Elfogadom";

/* No comment provided by engineer. */
"Icon Badge Number" = "Ikon badge számok";

/* No comment provided by engineer. */
"Internet Connection Required" = "Internet kapcsolat szükséges";

/* No comment provided by engineer. */
"Last synced" = "Utoljára frissítve";

/* No comment provided by engineer. */
"Latitude Required" = "Szélességi fok megadása kötelező";

/* No comment provided by engineer. */
"List" = "Bejelentések";

/* No comment provided by engineer. */
"Loading..." = "Betöltés...";

/* No comment provided by engineer. */
"Locating..." = "Helyszín megadása...";

/* No comment provided by engineer. */
"Location Required" = "Helyszín megadása kötelező";

/* No comment provided by engineer. */
"Locations..." = "Helyszínek...";

/* No comment provided by engineer. */
"Longitude Required" = "Hosszúsági fok megadása kötelező";

/* No comment provided by engineer. */
"Map" = "Térkép";

/* No comment provided by engineer. */
"Maps" = "Térképek";

/* No comment provided by engineer. */
"Maps..." = "Térképek...";

/* No comment provided by engineer. */
"Model" = "Model";

/* No comment provided by engineer. */
"Name Required" = "A nevet kötelező megadni";

/* No comment provided by engineer. */
"No" = "Nem";

/* No comment provided by engineer. */
"No Category" = "Nincs kategória";

/* No comment provided by engineer. */
"No checkins" = "Nincs bejelentkezés";

/* No comment provided by engineer. */
"No comments" = "Nincs megjegyzés";

/* No comment provided by engineer. */
"No Date" = "Nincs dátum";

/* No comment provided by engineer. */
"No Internet" = "Nincs internet";

/* No comment provided by engineer. */
"No Location" = "Nincs helyszín";

/* No comment provided by engineer. */
"No maps" = "Nincs térkép";

/* No comment provided by engineer. */
"No photos" = "Nincs fénykép";

/* No comment provided by engineer. */
"No reports" = "Nincs bejelentés";

/* No comment provided by engineer. */
"No videos" = "Nincs videó";

/* No comment provided by engineer. */
"No webpages" = "Nincs hírforrás link";

/* No comment provided by engineer. */
"Not verified" = "Nem ellenőrzött";

/* No comment provided by engineer. */
"Ok" = "Ok";

/* No comment provided by engineer. */
"OK" = "OK";

/* No comment provided by engineer. */
"Pending" = "Folyamatban";

/* No comment provided by engineer. */
"Pending Upload" = "Feltöltés folyamatban";

/* No comment provided by engineer. */
"Photos" = "Fényképek";

/* No comment provided by engineer. */
"Photos..." = "Fényképek...";

/* No comment provided by engineer. */
"Please verify your internet connection and try again." = "Ellenőrizd az internet kapcsolatodat és póbáld újra";

/* No comment provided by engineer. */
"Privacy Policy" = "Adatvédelmi nyilatkozat";

/* No comment provided by engineer. */
"Report Queued" = "Report Queued";

/* No comment provided by engineer. */
"Reports" = "Bejelentések";

/* No comment provided by engineer. */
"Reports..." = "Bejelentések...";

/* No comment provided by engineer. */
"Resize New Photos" = "Átméretezés";

/* No comment provided by engineer. */
"Resize Photo Width" = "Max. szélesség";

/* No comment provided by engineer. */
"Saved" = "Elmentve";

/* No comment provided by engineer. */
"Saving..." = "Mentés...";

/* No comment provided by engineer. */
"Search address..." = "Cím keresése...";

/* No comment provided by engineer. */
"Search checkins..." = "Bejelentkezések keresése...";

/* No comment provided by engineer. */
"Search reports..." = "Bejelentések keresése...";

/* No comment provided by engineer. */
"Searching..." = "Keresés...";

/* No comment provided by engineer. */
"Select a category" = "Válassz kategóriákat";

/* No comment provided by engineer. */
"Send" = "Küld";

/* No comment provided by engineer. */
"Send via OpenGeoSMS" = "OpenGeoSMS küldés";

/* No comment provided by engineer. */
"Sending..." = "Küldés...";

/* No comment provided by engineer. */
"Sent" = "Elküldve";

/* No comment provided by engineer. */
"Settings" = "Beállítások";

/* No comment provided by engineer. */
"Share Application" = "Bejelentés megosztása";

/* No comment provided by engineer. */
"SMS" = "SMS";

/* No comment provided by engineer. */
"Synchronize Error" = "Frissítési hiba";

/* No comment provided by engineer. */
"Syncing..." = "Frissítés...";

/* No comment provided by engineer. */
"Terms Of Service" = "Jogi nyilatkozat";

/* No comment provided by engineer. */
"Title Required" = "Cím megadása kötelező";

/* No comment provided by engineer. */
"Unable to add map to database" = "Nem sikerült a térkép hozzáadása";

/* No comment provided by engineer. */
"Unsaved Changes" = "Nem elküldött változások";

/* No comment provided by engineer. */
"Upload" = "Küld";

/* No comment provided by engineer. */
"Upload Error" = "Küldési hiba";

/* No comment provided by engineer. */
"Upload via Ushahidi API" = "Feltöltve Ushahidi API használatával";

/* No comment provided by engineer. */
"Uploaded" = "Elküldve";

/* No comment provided by engineer. */
"Uploaded report..." = "Bejelentés elküldése...";

/* No comment provided by engineer. */
"Uploaded video..." = "Videó elküldése...";

/* No comment provided by engineer. */
"Uploading..." = "Elküldés...";

/* No comment provided by engineer. */
"User Agreement" = "Jogi nyilatkozat";

/* No comment provided by engineer. */
"User Captured Video" = "Felhasználói videó";

/* No comment provided by engineer. */
"User Location" = "Helyszín";

/* No comment provided by engineer. */
"Verified" = "Ellenőrzött";

/* No comment provided by engineer. */
"Version" = "Version";

/* No comment provided by engineer. */
"Video Error" = "Video hiba";

/* No comment provided by engineer. */
"with" = "with";

/* No comment provided by engineer. */
"Yes" = "Igen";

/* No comment provided by engineer. */
"Your report has been uploaded and is pending approval." = "A bejelentésed feltöltésre került és ellenőrzésre vár.";

{'repo_name': 'ushahidi/Ushahidi_iPhone', 'stars': '127', 'repo_language': 'Objective-C', 'file_name': 'Ushahidi.xccheckout', 'mime_type': 'text/xml', 'hash': 2918771693067158349, 'source_dataset': 'data'}


package com.myapp.auth

import com.myapp.domain.UserDetailsImpl
import com.myapp.testing.TestUser
import com.nhaarman.mockito_kotlin.doReturn
import com.nhaarman.mockito_kotlin.mock
import org.assertj.core.api.Assertions.assertThat
import org.junit.Test
import org.mockito.Mockito.`when`
import javax.servlet.http.HttpServletRequest

class TokenAuthenticationServiceTest {

    private val tokenHandler: TokenHandler = mock()
    private val tokenAuthenticationService by lazy {
        TokenAuthenticationServiceImpl(
            tokenHandler = tokenHandler
        )
    }

    @Test
    fun `authentication get authentication from authorization header`() {
        val mockRequest = mock<HttpServletRequest> {
            on { getHeader("authorization") } doReturn "Bearer jwt123"
        }
        val dummyUserDetails = UserDetailsImpl(TestUser)
        `when`(tokenHandler.parseUserFromToken("jwt123")).doReturn(dummyUserDetails)

        val authentication = tokenAuthenticationService.authentication(mockRequest)

        assertThat(authentication).isNotNull()
        assertThat(authentication?.principal).isEqualTo(dummyUserDetails)
    }

    @Test
    fun `authentication returns null when no authorization header`() {
        val mockRequest = mock<HttpServletRequest>()

        val authentication = tokenAuthenticationService.authentication(mockRequest)

        assertThat(authentication).isNull()
    }

}

{'repo_name': 'springboot-angular2-tutorial/boot-app', 'stars': '112', 'repo_language': 'Kotlin', 'file_name': 'gradle-wrapper.properties', 'mime_type': 'text/plain', 'hash': -8098667165508194430, 'source_dataset': 'data'}


interface Foo extends Foo { // error
}

interface Foo2<T> extends Foo2<T> { // error
}

interface Foo3<T> extends Foo3<string> { // error
}

interface Bar implements Bar { // error
}

{'repo_name': 'microsoft/TypeScript', 'stars': '62256', 'repo_language': 'TypeScript', 'file_name': 'nestedBlockScopedBindings1.ts', 'mime_type': 'text/plain', 'hash': 259172492368384433, 'source_dataset': 'data'}


[netsh](https://attack.mitre.org/software/S0108) can be used to disable local firewall settings.(Citation: TechNet Netsh)(Citation: TechNet Netsh Firewall)

Microsoft. (n.d.). Using Netsh. Retrieved February 13, 2017.

Microsoft. (2009, June 3). Netsh Commands for Windows Firewall. Retrieved April 20, 2016.

{'repo_name': 'mitre/cti', 'stars': '619', 'repo_language': 'None', 'file_name': 'identity--c78cb6e5-0c4b-4611-8297-d1b8b55e40b5.json', 'mime_type': 'text/plain', 'hash': 454522461596797939, 'source_dataset': 'data'}


var suiteFiles = [
    "dom/accessors.js",
    "dom/createnodes.js",
    "dom/domtable.js",
    "dom/domwalk.js",
    "dom/domdivwalk.js",
    "dom/clonenodes.js",
    "dom/getelement.js",
    "dom/events.js",
    "dom/gridsort.js",
    "dom/template.js"
];

{'repo_name': 'trevorlinton/webkit.js', 'stars': '1804', 'repo_language': 'None', 'file_name': 'ProgramBinary.cpp', 'mime_type': 'text/x-c++', 'hash': 5022595027187296958, 'source_dataset': 'data'}


/*
 * (C) Copyright 2016 Nuxeo SA (http://nuxeo.com/) and others.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * Contributors:
 *     Thibaud Arguillere
 *     Miguel Nixo
 *     Michael Vachette
 */
package org.nuxeo.ecm.platform.pdf.tests;

import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.nuxeo.ecm.automation.AutomationService;
import org.nuxeo.ecm.automation.OperationChain;
import org.nuxeo.ecm.automation.OperationContext;
import org.nuxeo.ecm.automation.OperationException;
import org.nuxeo.ecm.automation.test.AutomationFeature;
import org.nuxeo.ecm.core.api.Blob;
import org.nuxeo.ecm.core.api.CoreSession;
import org.nuxeo.ecm.core.api.impl.blob.FileBlob;
import org.nuxeo.ecm.platform.pdf.operations.PDFWatermarkTextOperation;
import org.nuxeo.ecm.platform.pdf.service.PDFTransformationService;
import org.nuxeo.ecm.platform.pdf.service.watermark.WatermarkProperties;
import org.nuxeo.runtime.test.runner.Deploy;
import org.nuxeo.runtime.test.runner.Features;
import org.nuxeo.runtime.test.runner.FeaturesRunner;

import javax.inject.Inject;
import java.io.IOException;

@RunWith(FeaturesRunner.class)
@Features({ AutomationFeature.class })
@Deploy("org.nuxeo.ecm.platform.pdf")
public class PDFWatermarkingTextTest {

    private static final String TEXT_WATERMARK = "(c) Test Text Watermark";
    private static final String PDF_PATH = "/files/test-watermark.pdf";

    @Inject
    CoreSession coreSession;

    @Inject
    PDFTransformationService pdfTransformationService;

    @Inject
    AutomationService automationService;

    protected OperationContext ctx;

    @Before
    public void createOperationContext() {
        ctx = new OperationContext(coreSession);
    }

    @After
    public void closeOperationContext() {
        ctx.close();
    }

    @Test
    public void testServiceDefault() throws IOException {
        Blob blob = new FileBlob(getClass().getResourceAsStream(PDF_PATH));
        WatermarkProperties properties = pdfTransformationService.getDefaultProperties();
        Blob result = pdfTransformationService.applyTextWatermark(
                blob,TEXT_WATERMARK,properties);
        TestUtils.hasTextOnAllPages(result,TEXT_WATERMARK);
    }

    @Test
    public void testWatermarkCenter() throws IOException {
        Blob blob = new FileBlob(getClass().getResourceAsStream(PDF_PATH));
        WatermarkProperties properties = pdfTransformationService.getDefaultProperties();
        properties.setRelativeCoordinates(true);
        properties.setxPosition(0.5f);
        properties.setyPosition(0.5f);
        Blob result = pdfTransformationService.applyTextWatermark(
                blob,TEXT_WATERMARK,properties);
        TestUtils.hasTextOnAllPages(result,TEXT_WATERMARK);
    }

    @Test
    public void testWatermarkRotateUp() throws IOException {
        Blob blob = new FileBlob(getClass().getResourceAsStream(PDF_PATH));
        WatermarkProperties properties = pdfTransformationService.getDefaultProperties();
        properties.setRotation(45);
        Blob result = pdfTransformationService.applyTextWatermark(
                blob,TEXT_WATERMARK,properties);
        TestUtils.hasTextOnAllPages(result,TEXT_WATERMARK);
    }

    @Test
    public void testOpWithDefault() throws IOException, OperationException {
        Blob input = new FileBlob(getClass().getResourceAsStream(PDF_PATH));
        OperationChain chain;
        ctx.setInput(input);
        chain = new OperationChain("testWithDefault");
        chain.add(PDFWatermarkTextOperation.ID).set("text",TEXT_WATERMARK);
        Blob result = (Blob) automationService.run(ctx, chain);
        Assert.assertNotNull(result);
        TestUtils.hasTextOnAllPages(result,TEXT_WATERMARK);
    }

    @Test
    public void testOpWithProperties() throws IOException, OperationException {
        Blob input = new FileBlob(getClass().getResourceAsStream(PDF_PATH));
        OperationChain chain;
        ctx.setInput(input);
        chain = new OperationChain("testWithDefault");
        chain.add(PDFWatermarkTextOperation.ID).
                set("text",TEXT_WATERMARK).
                set("properties","alphaColor=1.0");
        Blob result = (Blob) automationService.run(ctx, chain);
        Assert.assertNotNull(result);
        TestUtils.hasTextOnAllPages(result,TEXT_WATERMARK);
    }

}

{'repo_name': 'nuxeo/nuxeo', 'stars': '373', 'repo_language': 'Java', 'file_name': 'ITTestDrivers.java', 'mime_type': 'text/x-java', 'hash': -9091049818636529423, 'source_dataset': 'data'}


/*
 * Copyright (c) 1997, 2003, Oracle and/or its affiliates. All rights reserved.
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * This code is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License version 2 only, as
 * published by the Free Software Foundation.  Oracle designates this
 * particular file as subject to the "Classpath" exception as provided
 * by Oracle in the LICENSE file that accompanied this code.
 *
 * This code is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 * version 2 for more details (a copy is included in the LICENSE file that
 * accompanied this code).
 *
 * You should have received a copy of the GNU General Public License version
 * 2 along with this work; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 *
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 * or visit www.oracle.com if you need additional information or have any
 * questions.
 */
package sun.io;

import sun.nio.cs.ext.*;

public class ByteToCharCp935 extends ByteToCharDBCS_EBCDIC {

    // Return the character set id
    public String getCharacterEncoding() {
        return "Cp935";
    }

    public ByteToCharCp935() {
        super((DoubleByte.Decoder)new IBM935().newDecoder());
    }
}

{'repo_name': 'openjdk-mirror/jdk7u-jdk', 'stars': '418', 'repo_language': 'Java', 'file_name': 'jar.1', 'mime_type': 'text/plain', 'hash': -1598148577091782299, 'source_dataset': 'data'}


//
// Wire
// Copyright (C) 2017 Wire Swiss GmbH
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see http://www.gnu.org/licenses/.
//

import Foundation

private let zmLog = ZMSLog(tag: "Services")

public struct ServiceUserData: Equatable {
    let provider: UUID
    let service: UUID

    public init(provider: UUID, service: UUID) {
        self.provider = provider
        self.service = service
    }
}

extension ServiceUser {
    var serviceUserData: ServiceUserData? {
        guard let providerIdentifier = self.providerIdentifier,
              let serviceIdentifier = self.serviceIdentifier,
              let provider = UUID(uuidString: providerIdentifier),
              let service = UUID(uuidString: serviceIdentifier)
        else {
                return nil
        }

        return ServiceUserData(provider: provider,
                               service: service)
    }
}

public final class ServiceProvider: NSObject {
    public let identifier: String

    public let name:  String
    public let email: String
    public let url:   String
    public let providerDescription: String

    init?(payload: [AnyHashable: Any]) {
        guard let identifier  = payload["id"] as? String,
              let name        = payload["name"] as? String,
              let email       = payload["email"] as? String,
              let url         = payload["url"] as? String,
              let description = payload["description"] as? String
            else {
                return nil
            }
        self.identifier  = identifier
        self.name        = name
        self.email       = email
        self.url         = url
        self.providerDescription = description

        super.init()
    }
}

public final class ServiceDetails: NSObject {
    public let serviceIdentifier:  String
    public let providerIdentifier: String

    public let name: String
    public let serviceDescription: String
    public let assets: [[String: Any]]
    public let tags: [String]

    init?(payload: [AnyHashable: Any]) {
        guard let serviceIdentifier   = payload["id"] as? String,
              let providerIdentifier  = payload["provider"] as? String,
              let name                = payload["name"] as? String,
              let description         = payload["description"] as? String,
              let assets              = payload["assets"] as? [[String: Any]],
              let tags                = payload["tags"] as? [String]
            else {
                return nil
            }

        self.serviceIdentifier  = serviceIdentifier
        self.providerIdentifier = providerIdentifier
        self.name               = name
        self.serviceDescription = description
        self.assets             = assets
        self.tags               = tags

        super.init()
    }
}

public extension ServiceUserData {
    fileprivate func requestToAddService(to conversation: ZMConversation) -> ZMTransportRequest {
        guard let remoteIdentifier = conversation.remoteIdentifier
        else {
            fatal("conversation is not synced with the backend")
        }

        let path = "/conversations/\(remoteIdentifier.transportString())/bots"

        let payload: NSDictionary = ["provider": self.provider.transportString(),
                                     "service": self.service.transportString(),
                                     "locale": NSLocale.formattedLocaleIdentifier()!]

        return ZMTransportRequest(path: path, method: .methodPOST, payload: payload as ZMTransportData)
    }

    fileprivate func requestToFetchProvider() -> ZMTransportRequest {
        let path = "/providers/\(provider.transportString())/"
        return ZMTransportRequest(path: path, method: .methodGET, payload: nil)
    }

    fileprivate func requestToFetchDetails() -> ZMTransportRequest {
        let path = "/providers/\(provider.transportString())/services/\(service.transportString())"
        return ZMTransportRequest(path: path, method: .methodGET, payload: nil)
    }
}

public extension ServiceUser {

    func fetchProvider(in userSession: ZMUserSession, completion: @escaping (ServiceProvider?)->()) {
        guard let serviceUserData = self.serviceUserData else {
            fatal("Not a service user")
        }

        let request = serviceUserData.requestToFetchProvider()

        request.add(ZMCompletionHandler(on: userSession.managedObjectContext, block: { (response) in

            guard response.httpStatus == 200,
                let responseDictionary = response.payload?.asDictionary(),
                let provider = ServiceProvider(payload: responseDictionary) else {
                    zmLog.error("Wrong response for fetching a provider: \(response)")
                    completion(nil)
                    return
            }

            completion(provider)
        }))

        userSession.transportSession.enqueueOneTime(request)
    }

    func fetchDetails(in userSession: ZMUserSession, completion: @escaping (ServiceDetails?)->()) {
        guard let serviceUserData = self.serviceUserData else {
            fatal("Not a service user")
        }

        let request = serviceUserData.requestToFetchDetails()

        request.add(ZMCompletionHandler(on: userSession.managedObjectContext, block: { (response) in

            guard response.httpStatus == 200,
                let responseDictionary = response.payload?.asDictionary(),
                let serviceDetails = ServiceDetails(payload: responseDictionary) else {
                    zmLog.error("Wrong response for fetching a service: \(response)")
                    completion(nil)
                    return
            }

            completion(serviceDetails)
        }))

        userSession.transportSession.enqueueOneTime(request)
    }

    func createConversation(in userSession: ZMUserSession, completionHandler: @escaping (Result<ZMConversation>) -> Void) {
        guard let eventProcessor = userSession.operationLoop?.syncStrategy else {
            completionHandler(.failure(AddBotError.general))
            return
        }

        createConversation(transportSession: userSession.transportSession,
                           eventProcessor: eventProcessor,
                           contextProvider: userSession,
                           completionHandler: completionHandler)
    }

    internal func createConversation(transportSession: TransportSessionType,
                                     eventProcessor: UpdateEventProcessor,
                                     contextProvider: ZMManagedObjectContextProvider,
                                     completionHandler: @escaping (Result<ZMConversation>) -> Void) {

        guard transportSession.reachability.mayBeReachable else {
            completionHandler(.failure(AddBotError.offline))
            return
        }

        guard let serviceUserData = serviceUserData else {
            completionHandler(.failure(AddBotError.general))
            return
        }

        let selfUser = ZMUser.selfUser(in: contextProvider.managedObjectContext)
        let conversation = ZMConversation.insertNewObject(in: contextProvider.managedObjectContext)

        conversation.lastModifiedDate = Date()
        conversation.conversationType = .group
        conversation.creator = selfUser
        conversation.team = selfUser.team

        var onCreatedRemotelyToken: NSObjectProtocol? = nil
        _ = onCreatedRemotelyToken // remove warning

        onCreatedRemotelyToken = conversation.onCreatedRemotely { [weak contextProvider] in
            guard let contextProvider = contextProvider else {
                completionHandler(.failure(AddBotError.general))
                return
            }

            conversation.add(serviceUser: serviceUserData,
                             transportSession: transportSession,
                             eventProcessor: eventProcessor,
                             contextProvider: contextProvider,
                             completionHandler: { (result) in
                                switch result {
                                case .success:
                                    completionHandler(.success(conversation))
                                case .failure(let error):
                                    completionHandler(.failure(error))
                                }

                                onCreatedRemotelyToken = nil
            })
        }

        contextProvider.managedObjectContext.saveOrRollback()
    }
}

public enum AddBotError: Int, Error {
    case offline
    case general
    /// In case the conversation is already full, the backend is going to refuse to add the bot to the conversation.
    case tooManyParticipants
    /// The bot service is not responding to wire backend.
    case botNotResponding
    /// The bot rejected to be added to the conversation.
    case botRejected
}

public enum AddBotResult {
    case success(conversation: ZMConversation)
    case failure(error: AddBotError)
}

extension AddBotError {
    init(response: ZMTransportResponse) {
        switch response.httpStatus {
        case 403:
            self = .tooManyParticipants
        case 419:
            self = .botRejected
        case 502:
            self = .botNotResponding
        default:
            self = .general
        }
    }
}

public extension ZMConversation {

    func add(serviceUser: ServiceUser, in userSession: ZMUserSession, completionHandler: @escaping (VoidResult) -> Void) {
        guard let serviceUserData = serviceUser.serviceUserData else {
            fatal("Not a service user")
        }

        add(serviceUser: serviceUserData, in: userSession, completionHandler: completionHandler)
    }

    func add(serviceUser serviceUserData: ServiceUserData, in userSession: ZMUserSession, completionHandler: @escaping (VoidResult) -> Void) {
        add(serviceUser: serviceUserData,
            transportSession: userSession.transportSession,
            eventProcessor: userSession.operationLoop!.syncStrategy,
            contextProvider: userSession,
            completionHandler: completionHandler)
    }

    internal func add(serviceUser serviceUserData: ServiceUserData,
                      transportSession: TransportSessionType,
                      eventProcessor: UpdateEventProcessor,
                      contextProvider: ZMManagedObjectContextProvider,
                      completionHandler: @escaping (VoidResult) -> Void) {

        guard transportSession.reachability.mayBeReachable else {
            completionHandler(.failure(AddBotError.offline))
            return
        }

        let request = serviceUserData.requestToAddService(to: self)

        request.add(ZMCompletionHandler(on: contextProvider.managedObjectContext, block: { [weak contextProvider] (response) in

            guard response.httpStatus == 201,
                  let responseDictionary = response.payload?.asDictionary(),
                  let userAddEventPayload = responseDictionary["event"] as? ZMTransportData,
                  let event = ZMUpdateEvent(fromEventStreamPayload: userAddEventPayload, uuid: nil) else {
                    completionHandler(.failure(AddBotError(response: response)))
                    return
            }

            completionHandler(.success)

            contextProvider?.syncManagedObjectContext.performGroupedBlock {
                eventProcessor.storeAndProcessUpdateEvents([event], ignoreBuffer: true)
            }
        }))

        transportSession.enqueueOneTime(request)
    }
}

{'repo_name': 'wireapp/wire-ios-sync-engine', 'stars': '147', 'repo_language': 'Swift', 'file_name': 'InfoPlist.strings', 'mime_type': 'text/plain', 'hash': 7217528943035147830, 'source_dataset': 'data'}


{'repo_name': 'openstack/designate', 'stars': '141', 'repo_language': 'Python', 'file_name': 'get-limits-response.json', 'mime_type': 'text/plain', 'hash': -7999186829702981769, 'source_dataset': 'data'}